instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
),
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Popover(ComponentNamespace):
"""Namespace for Popover components."""
root = staticmethod(PopoverRoot.create)
trigger = staticmethod(PopoverTrigger.create)
backdrop = staticmethod(PopoverBackdrop.create)
portal = staticmethod(PopoverPortal.create)
positioner = staticmethod(PopoverPositioner.create)
popup = staticmethod(PopoverPopup.create)
arrow = staticmethod(PopoverArrow.create)
title = staticmethod(PopoverTitle.create)
|
close = staticmethod(PopoverClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPopover.create)
popover = Popover()
| description = staticmethod(PopoverDescription.create) |
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Popover(ComponentNamespace):
"""Namespace for Popover components."""
root = staticmethod(PopoverRoot.create)
trigger = staticmethod(PopoverTrigger.create)
backdrop = staticmethod(PopoverBackdrop.create)
portal = staticmethod(PopoverPortal.create)
positioner = staticmethod(PopoverPositioner.create)
popup = staticmethod(PopoverPopup.create)
arrow = staticmethod(PopoverArrow.create)
title = staticmethod(PopoverTitle.create)
description = staticmethod(PopoverDescription.create)
|
class_names = ClassNames
__call__ = staticmethod(HighLevelPopover.create)
popover = Popover()
| close = staticmethod(PopoverClose.create) |
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Popover(ComponentNamespace):
"""Namespace for Popover components."""
root = staticmethod(PopoverRoot.create)
trigger = staticmethod(PopoverTrigger.create)
backdrop = staticmethod(PopoverBackdrop.create)
portal = staticmethod(PopoverPortal.create)
positioner = staticmethod(PopoverPositioner.create)
popup = staticmethod(PopoverPopup.create)
arrow = staticmethod(PopoverArrow.create)
title = staticmethod(PopoverTitle.create)
description = staticmethod(PopoverDescription.create)
close = staticmethod(PopoverClose.create)
|
__call__ = staticmethod(HighLevelPopover.create)
popover = Popover()
| class_names = ClassNames |
assNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Popover(ComponentNamespace):
"""Namespace for Popover components."""
root = staticmethod(PopoverRoot.create)
trigger = staticmethod(PopoverTrigger.create)
backdrop = staticmethod(PopoverBackdrop.create)
portal = staticmethod(PopoverPortal.create)
positioner = staticmethod(PopoverPositioner.create)
popup = staticmethod(PopoverPopup.create)
arrow = staticmethod(PopoverArrow.create)
title = staticmethod(PopoverTitle.create)
description = staticmethod(PopoverDescription.create)
close = staticmethod(PopoverClose.create)
class_names = ClassNames
|
popover = Popover()
| __call__ = staticmethod(HighLevelPopover.create) |
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Popover(ComponentNamespace):
"""Namespace for Popover components."""
root = staticmethod(PopoverRoot.create)
trigger = staticmethod(PopoverTrigger.create)
backdrop = staticmethod(PopoverBackdrop.create)
portal = staticmethod(PopoverPortal.create)
positioner = staticmethod(PopoverPositioner.create)
popup = staticmethod(PopoverPopup.create)
arrow = staticmethod(PopoverArrow.create)
title = staticmethod(PopoverTitle.create)
description = staticmethod(PopoverDescription.create)
close = staticmethod(PopoverClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPopover.create)
| popover = Popover() | |
"""Custom preview card component."""
|
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.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side | from typing import Literal |
"""Custom preview card component."""
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.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rot | from reflex.components.component import Component, ComponentNamespace |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
|
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.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotat | from reflex.event import EventHandler, passthrough_event_spec |
"""Custom preview card component."""
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.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[si | from reflex.utils.imports import ImportVar |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
|
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class Previ | from reflex.vars.base import Var |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
|
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview | from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
|
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{P | from reflex_ui.utils.twmerge import cn |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
|
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def | LiteralAlign = Literal["start", "center", "end"] |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
|
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component | LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"] |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
|
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard" | LiteralPosition = Literal["absolute", "fixed"] |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
|
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML element."""
tag = "PreviewCard.Root"
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_chan | class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180" |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
|
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all | TRIGGER = "" |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
|
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the previ | BACKDROP = "" |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
|
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't | PORTAL = "" |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
|
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML | POSITIONER = "" |
"""Custom preview card component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
|
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML element."""
tag = "PreviewCard.Root"
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the p | POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3" |
ping 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.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
|
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML element."""
tag = "PreviewCard.Root"
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_chan | ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180" |
import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
|
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML element."""
tag = "PreviewCard.Root"
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmet | class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False) |
erge import cn
LiteralAlign = Literal["start", "center", "end"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
|
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML element."""
tag = "PreviewCard.Root"
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 6 | library = f"{PACKAGE_NAME}/preview-card" |
nd"]
LiteralSide = Literal["bottom", "inline-end", "inline-start", "left", "right", "top"]
LiteralPosition = Literal["absolute", "fixed"]
class ClassNames:
"""Class names for preview card components."""
ROOT = ""
TRIGGER = ""
BACKDROP = ""
PORTAL = ""
POSITIONER = ""
POPUP = "origin-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
|
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML element."""
tag = "PreviewCard.Root"
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmet | def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False) |
in-(--transform-origin) rounded-ui-xl p-3 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none min-w-64 flex flex-col gap-3"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
class PreviewCardBaseComponent(BaseUIComponent):
"""Base component for preview card components."""
library = f"{PACKAGE_NAME}/preview-card"
@property
def import_var(self):
"""Return the import variable for the preview card component."""
return ImportVar(tag="PreviewCard", package_path="", install=False)
class PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML element."""
|
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
| tag = "PreviewCard.Root" |
PreviewCardRoot(PreviewCardBaseComponent):
"""Groups all parts of the preview card. Doesn't render its own HTML element."""
tag = "PreviewCard.Root"
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
|
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props) |
lement."""
tag = "PreviewCard.Root"
# Whether the preview card is initially open. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
|
return super().create(*children, **props)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
| props["data-slot"] = "preview-card" |
en. To render a controlled preview card, use the `open` prop instead. Defaults to false.
default_open: Var[bool]
# Whether the preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props)
|
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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]
class PreviewCardPositioner(PreviewCardBaseComponent):
| class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
he preview card is currently open.
open: Var[bool]
# Event handler called when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
|
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is append | tag = "PreviewCard.Trigger" |
led when the preview card is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
|
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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]
class PreviewCardPositioner(PreviewCardBaseComponent):
| def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
# Event handler called after any animations complete when the preview card is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
|
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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. Defa | props["data-slot"] = "preview-card-trigger" |
event_spec(bool)]
# How long to wait before the preview card opens. Specified in milliseconds. Defaults to 600.
delay: Var[int]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
|
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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]
class PreviewCardPositioner(PreviewCardBaseComponent):
"""Positions the preview card against the trigger. Renders a <div> element."""
tag = "PreviewCard.Positioner"
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str]
# How to align the popup relative to the specified side. Defaults to center.
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the popup. Defaults to 0.
align_offset: | class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props) |
nt]
# How long to wait before closing the preview card that was opened on hover. Specified in milliseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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]
class PreviewCardPositioner(PreviewCardBaseComponent):
"""Positions the preview card against the trigger. Renders a <div> element."""
tag = "PreviewCard.Positioner"
# Determines how to handle collisions when p | tag = "PreviewCard.Backdrop" |
liseconds. Defaults to 300.
close_delay: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
|
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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]
class PreviewCardPositioner(PreviewCardBaseComponent):
"""Positions the preview card against the trigger. Renders a <div> element."""
tag = "PreviewCard.Positioner"
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str]
# How to align the popup relative to the specified side. Defaults to center.
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the popup. Defaults to 0.
align_offset: | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props) |
omponent:
"""Create the preview card root component."""
props["data-slot"] = "preview-card"
return super().create(*children, **props)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
|
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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]
class PreviewCardPositioner(PreviewCardBaseComponent):
"""Positions the preview card against the trigger. Renders a <div> element."""
tag = "PreviewCard.Positioner"
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str]
# How to align the popup relative to the specified side. Defaults to center.
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Also accepts | props["data-slot"] = "preview-card-backdrop" |
rops)
class PreviewCardTrigger(PreviewCardBaseComponent):
"""A button that opens the preview card. Renders a <button> element."""
tag = "PreviewCard.Trigger"
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
|
class PreviewCardPositioner(PreviewCardBaseComponent):
"""Positions the preview card against the trigger. Renders a <div> element."""
tag = "PreviewCard.Positioner"
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str]
# How to align the popup relative to the specified side. Defaults to center.
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the popup. 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 bottom.
side: Var[LiteralSide]
# Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the popup. Defaults to 0.
side_offset: Var[int]
# Minimum distance to maintain between the arrow and the edges of | class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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] |
ponent]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card trigger component."""
props["data-slot"] = "preview-card-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class PreviewCardBackdrop(PreviewCardBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
|
# 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]
class PreviewCardPositioner(PreviewCardBaseComponent):
"""Positions the preview card against the trigger. Renders a <div> element."""
tag = "PreviewCard.Positioner"
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str]
# How to align the popup relative to the specified side. Defaults to center.
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the popup. 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 bottom.
side: Var[LiteralSide]
# Distance between the anchor and the popup | tag = "PreviewCard.Portal" |
beneath the popup. Renders a <div> element."""
tag = "PreviewCard.Backdrop"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card backdrop component."""
props["data-slot"] = "preview-card-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class PreviewCardPortal(PreviewCardBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "PreviewCard.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]
class PreviewCardPositioner(PreviewCardBaseComponent):
"""Positions the preview card against the trigger. Renders a <div> element."""
|
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str]
# How to align the popup relative to the specified side. Defaults to center.
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the popup. 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 bottom.
side: Var[LiteralSide]
# Distance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the popup. 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 | tag = "PreviewCard.Positioner" |
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 to maintain from the edge of the collision boundary. Defaults to 5.
collision_padding: Var[int | list[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[LiteralPosition]
# Whether the popup tracks any layout shift of its positioning anchor. Defaults to true.
track_anchor: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
|
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*chi | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card positioner component."""
props["data-slot"] = "preview-card-positioner"
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props) |
# 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 | list[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[LiteralPosition]
# Whether the popup tracks any layout shift of its positioning anchor. Defaults to true.
track_anchor: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card positioner component."""
|
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow | props["data-slot"] = "preview-card-positioner" |
p 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 | list[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[LiteralPosition]
# Whether the popup tracks any layout shift of its positioning anchor. Defaults to true.
track_anchor: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card positioner component."""
props["data-slot"] = "preview-card-positioner"
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
|
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anch | class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props) |
of the collision boundary. Defaults to 5.
collision_padding: Var[int | list[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[LiteralPosition]
# Whether the popup tracks any layout shift of its positioning anchor. Defaults to true.
track_anchor: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card positioner component."""
props["data-slot"] = "preview-card-positioner"
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
| tag = "PreviewCard.Popup" |
r 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[LiteralPosition]
# Whether the popup tracks any layout shift of its positioning anchor. Defaults to true.
track_anchor: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card positioner component."""
props["data-slot"] = "preview-card-positioner"
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
|
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anch | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props) |
y: Var[bool]
# Determines which CSS position property to use. Defaults to absolute.
position_method: Var[LiteralPosition]
# Whether the popup tracks any layout shift of its positioning anchor. Defaults to true.
track_anchor: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card positioner component."""
props["data-slot"] = "preview-card-positioner"
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
|
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_pa | props["data-slot"] = "preview-card-popup" |
the popup tracks any layout shift of its positioning anchor. Defaults to true.
track_anchor: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card positioner component."""
props["data-slot"] = "preview-card-positioner"
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
|
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts | class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props) |
nt]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card positioner component."""
props["data-slot"] = "preview-card-positioner"
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUICompo | tag = "PreviewCard.Arrow" |
the preview card positioner component."""
props["data-slot"] = "preview-card-positioner"
props.setdefault("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
|
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props) |
ult("side_offset", 8)
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class PreviewCardPopup(PreviewCardBaseComponent):
"""A container for the preview card contents. Renders a <div> element."""
tag = "PreviewCard.Popup"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
|
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Re | props["data-slot"] = "preview-card-arrow" |
ls, *children, **props) -> BaseUIComponent:
"""Create the preview card popup component."""
props["data-slot"] = "preview-card-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class PreviewCardArrow(PreviewCardBaseComponent):
"""Displays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
|
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner | _positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
} |
lays an element positioned against the preview card anchor. Renders a <div> element."""
tag = "PreviewCard.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the preview card arrow component."""
props["data-slot"] = "preview-card-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
|
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.crea | _portal_props = {"container", "keep_mounted"} |
HighLevelPreviewCard(PreviewCardRoot):
"""High level wrapper for the PreviewCard component."""
trigger: Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts
|
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for Pre | positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
} |
Var[Component | None]
content: Var[str | Component | None]
# Props for different component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
|
trigger = props.pop("trigger", None)
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigge | portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} |
erent component parts
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
|
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
| trigger = props.pop("trigger", None) |
{
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
|
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop | content = props.pop("content", None) |
"side",
"side_offset",
"arrow_padding",
"collision_padding",
"collision_boundary",
"sticky",
"position_method",
"track_anchor",
"anchor",
"collision_avoidance",
}
_portal_props = {"container", "keep_mounted"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a preview card component.
Args:
*children: Additional children to include in the preview card.
**props: Additional properties to apply to the preview card component.
Returns:
The preview card component.
"""
# Extract props for different parts
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
content = props.pop("content", None)
|
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPor | class_name = props.pop("class_name", "") |
eturns:
The preview card component.
"""
# Extract props for different parts
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
|
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
] |
.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
|
preview_card = PreviewCard()
| class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create) |
rops.pop(k) for k in cls._portal_props & props.keys()}
trigger = props.pop("trigger", None)
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
|
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| root = staticmethod(PreviewCardRoot.create) |
eys()}
trigger = props.pop("trigger", None)
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
|
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| trigger = staticmethod(PreviewCardTrigger.create) |
content = props.pop("content", None)
class_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
|
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| backdrop = staticmethod(PreviewCardBackdrop.create) |
s_name = props.pop("class_name", "")
return PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
|
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| portal = staticmethod(PreviewCardPortal.create) |
PreviewCardRoot.create(
PreviewCardTrigger.create(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
|
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| positioner = staticmethod(PreviewCardPositioner.create) |
te(render_=trigger) if trigger is not None else None,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
|
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| popup = staticmethod(PreviewCardPopup.create) |
ne,
PreviewCardPortal.create(
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
|
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| arrow = staticmethod(PreviewCardArrow.create) |
PreviewCardPositioner.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
|
__call__ = staticmethod(HighLevelPreviewCard.create)
preview_card = PreviewCard()
| class_names = ClassNames |
.create(
PreviewCardPopup.create(
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
|
preview_card = PreviewCard()
| __call__ = staticmethod(HighLevelPreviewCard.create) |
content,
*children,
class_name=cn(ClassNames.POPUP, class_name),
),
**positioner_props,
),
**portal_props,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class PreviewCard(ComponentNamespace):
"""Namespace for PreviewCard components."""
root = staticmethod(PreviewCardRoot.create)
trigger = staticmethod(PreviewCardTrigger.create)
backdrop = staticmethod(PreviewCardBackdrop.create)
portal = staticmethod(PreviewCardPortal.create)
positioner = staticmethod(PreviewCardPositioner.create)
popup = staticmethod(PreviewCardPopup.create)
arrow = staticmethod(PreviewCardArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelPreviewCard.create)
| preview_card = PreviewCard() | |
"""Custom scroll area component."""
|
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
| from typing import Literal |
"""Custom scroll area component."""
from typing import Literal
|
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACK | from reflex.components.component import Component, ComponentNamespace |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
|
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def | from reflex.components.core.cond import cond |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
|
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the im | from reflex.utils.imports import ImportVar |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
from reflex.utils.imports import ImportVar
|
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area | from reflex.vars.base import Var |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
|
from reflex_ui.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path=" | from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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 scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoo | from reflex_ui.utils.twmerge import cn |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
|
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scrol | LiteralOrientation = Literal["horizontal", "vertical"] |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
|
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, | class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3" |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
|
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls | ROOT = "h-full outline-none focus:outline-none" |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
|
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
| VIEWPORT = "h-full overscroll-contain" |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
|
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create | CONTENT = "" |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
|
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the | SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100" |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
|
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "Sc | SCROLLBAR_VERTICAL = "w-2" |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
|
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render | SCROLLBAR_HORIZONTAL = "h-2" |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
|
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod | THUMB = "w-full rounded-full bg-secondary-a5" |
"""Custom scroll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
|
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, | CORNER = "bg-secondary-a3" |
croll area component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
|
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of th | class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False) |
omponentNamespace
from reflex.components.core.cond import cond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
|
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
c | library = f"{PACKAGE_NAME}/scroll-area" |
ond
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.utils.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
|
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of th | def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False) |
s.twmerge import cn
LiteralOrientation = Literal["horizontal", "vertical"]
class ClassNames:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
|
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class ScrollAreaScrollbar(ScrollAreaBaseComponent): | class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props) |
mes:
"""Class names for scroll area components."""
ROOT = "h-full outline-none focus:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
|
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
| tag = "ScrollArea.Root" |
:outline-none"
VIEWPORT = "h-full overscroll-contain"
CONTENT = ""
SCROLLBAR_BASE = "flex touch-none p-0.5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
|
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class ScrollAreaScrollbar(ScrollAreaBaseComponent): | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props) |
5 opacity-0 transition-[colors,opacity] delay-200 select-none data-hovering:opacity-100 data-hovering:delay-0 data-hovering:duration-100 data-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
|
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
| props["data-slot"] = "scroll-area" |
ata-scrolling:opacity-100 data-scrolling:delay-0 data-scrolling:duration-100"
SCROLLBAR_VERTICAL = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
|
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class ScrollAreaScrollbar(ScrollAreaBaseComponent):
"""The scrollbar of the scroll area."""
tag = "ScrollArea.Scrollbar"
# Orientation of the scrollbar
orientation: Var[LiteralOrientation] = Var.create("vertical")
# Whether to keep the HTML element in the DOM when the viewport isn't scrollable
keep_mounted: Var[bool] = Var.create(False)
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll | class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props) |
L = "w-2"
SCROLLBAR_HORIZONTAL = "h-2"
THUMB = "w-full rounded-full bg-secondary-a5"
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
|
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class ScrollAreaScrollbar(ScrollAreaBaseComponent):
"""The scrollbar of the scroll area."""
tag = "ScrollArea.Scrollbar"
# Orientation of the scrollbar
orientatio | tag = "ScrollArea.Viewport" |
CORNER = "bg-secondary-a3"
class ScrollAreaBaseComponent(BaseUIComponent):
"""Base component for scroll area components."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
|
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class ScrollAreaScrollbar(ScrollAreaBaseComponent):
"""The scrollbar of the scroll area."""
tag = "ScrollArea.Scrollbar"
# Orientation of the scrollbar
orientation: Var[LiteralOrientation] = Var.create("vertical")
# Whether to keep the HTML element in the DOM when the viewport isn't scrollable
keep_mounted: Var[bool] = Var.create(False)
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props) |
ents."""
library = f"{PACKAGE_NAME}/scroll-area"
@property
def import_var(self):
"""Return the import variable for the scroll area component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
|
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class ScrollAreaScrollbar(ScrollAreaBaseComponent):
"""The scrollbar of the scroll area."""
tag = "ScrollArea.Scrollbar"
# Orientation of the scrollbar
orientation: Var[LiteralOrientation] = Var.create("vertical")
# Whether to keep the HTML element in the DOM when the viewport isn't scrollable
keep_mounted: Var[bool] = Var.create(False)
# Render prop
render_: Var[Component]
| props["data-slot"] = "scroll-area-viewport" |
a component."""
return ImportVar(tag="ScrollArea", package_path="", install=False)
class ScrollAreaRoot(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
|
class ScrollAreaScrollbar(ScrollAreaBaseComponent):
"""The scrollbar of the scroll area."""
tag = "ScrollArea.Scrollbar"
# Orientation of the scrollbar
orientation: Var[LiteralOrientation] = Var.create("vertical")
# Whether to keep the HTML element in the DOM when the viewport isn't scrollable
keep_mounted: Var[bool] = Var.create(False)
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area scrollbar component."""
props["data-slot"] = "scroll-area-scrollbar"
orientation = props.get("orientation", "vertical")
scrollbar_classes = cn(
ClassNames.SCROLLBAR_BASE,
cond(
orientation == "vertical",
ClassNames.SCROLLBAR_VERTICAL,
ClassNames.SCROLLBAR_HORIZONTAL,
),
)
cls.set_class_name(scrollbar_classes, props)
return super().creat | class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props) |
(ScrollAreaBaseComponent):
"""The root of the scroll area."""
tag = "ScrollArea.Root"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
|
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class ScrollAreaScrollbar(ScrollAreaBaseComponent):
"""The scrollbar of the scroll area."""
tag = "ScrollArea.Scrollbar"
# Orientation of the scrollbar
orientation: Var[LiteralOrientation] = Var.create("vertical")
# Whether to keep the HTML element in the DOM when the viewport isn't scrollable
keep_mounted: Var[bool] = Var.create(False)
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area scrollbar component."""
props["data-slot"] = "scroll-area-scrollbar"
orientation = props.get("orientation", "vertical")
| tag = "ScrollArea.Content" |
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
|
class ScrollAreaScrollbar(ScrollAreaBaseComponent):
"""The scrollbar of the scroll area."""
tag = "ScrollArea.Scrollbar"
# Orientation of the scrollbar
orientation: Var[LiteralOrientation] = Var.create("vertical")
# Whether to keep the HTML element in the DOM when the viewport isn't scrollable
keep_mounted: Var[bool] = Var.create(False)
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area scrollbar component."""
props["data-slot"] = "scroll-area-scrollbar"
orientation = props.get("orientation", "vertical")
scrollbar_classes = cn(
ClassNames.SCROLLBAR_BASE,
cond(
orientation == "vertical",
ClassNames.SCROLLBAR_VERTICAL,
ClassNames.SCROLLBAR_HORIZONTAL,
),
)
cls.set_class_name(scrollbar_classes, props)
return super().creat | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
props["data-slot"] = "scroll-area-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props) |
nt:
"""Create the scroll area root component."""
props["data-slot"] = "scroll-area"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class ScrollAreaViewport(ScrollAreaBaseComponent):
"""The viewport of the scroll area."""
tag = "ScrollArea.Viewport"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area viewport component."""
props["data-slot"] = "scroll-area-viewport"
cls.set_class_name(ClassNames.VIEWPORT, props)
return super().create(*children, **props)
class ScrollAreaContent(ScrollAreaBaseComponent):
"""A container for the content of the scroll area."""
tag = "ScrollArea.Content"
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area content component."""
|
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class ScrollAreaScrollbar(ScrollAreaBaseComponent):
"""The scrollbar of the scroll area."""
tag = "ScrollArea.Scrollbar"
# Orientation of the scrollbar
orientation: Var[LiteralOrientation] = Var.create("vertical")
# Whether to keep the HTML element in the DOM when the viewport isn't scrollable
keep_mounted: Var[bool] = Var.create(False)
# Render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the scroll area scrollbar component."""
props["data-slot"] = "scroll-area-scrollbar"
orientation = props.get("orientation", "vertical")
scrollbar_classes = cn(
ClassNames.SCROLLBAR_BASE,
cond(
orientation == "vertical",
ClassNames.SCROLLBAR_VERTICAL,
ClassNames.SCROLLBAR_HORIZONTAL,
| props["data-slot"] = "scroll-area-content" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.