File size: 1,361 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
import { defineSlotRecipe } from "../def"
export const hoverCardSlotRecipe = defineSlotRecipe({
className: "hover-card",
slots: ["arrow", "arrowTip", "trigger", "positioner", "content"],
base: {
content: {
position: "relative",
display: "flex",
flexDirection: "column",
textStyle: "sm",
"--hovercard-bg": "colors.bg.panel",
bg: "var(--hovercard-bg)",
boxShadow: "lg",
maxWidth: "80",
borderRadius: "l3",
zIndex: "popover",
transformOrigin: "var(--transform-origin)",
outline: "0",
_open: {
animationStyle: "slide-fade-in",
animationDuration: "fast",
},
_closed: {
animationStyle: "slide-fade-out",
animationDuration: "faster",
},
},
arrow: {
"--arrow-size": "sizes.3",
"--arrow-background": "var(--hovercard-bg)",
},
arrowTip: {
borderTopWidth: "0.5px",
borderInlineStartWidth: "0.5px",
},
},
variants: {
size: {
xs: {
content: {
padding: "3",
},
},
sm: {
content: {
padding: "4",
},
},
md: {
content: {
padding: "5",
},
},
lg: {
content: {
padding: "6",
},
},
},
},
defaultVariants: {
size: "md",
},
})
|