feat: migrate Modal Popover and Tooltip with shared overlay foundation
This commit is contained in:
@@ -891,3 +891,90 @@ export const accordionVariants = tv({
|
||||
});
|
||||
|
||||
export type AccordionVariants = VariantProps<typeof accordionVariants>;
|
||||
|
||||
export const modalVariants = tv({
|
||||
defaultVariants: {
|
||||
scroll: "inside",
|
||||
size: "md",
|
||||
variant: "opaque",
|
||||
},
|
||||
slots: {
|
||||
backdrop: "hv-modal__backdrop",
|
||||
body: "hv-modal__body",
|
||||
closeTrigger: "hv-modal__close-trigger",
|
||||
container: "hv-modal__container",
|
||||
dialog: "hv-modal__dialog",
|
||||
footer: "hv-modal__footer",
|
||||
header: "hv-modal__header",
|
||||
heading: "hv-modal__heading",
|
||||
icon: "hv-modal__icon",
|
||||
trigger: "hv-modal__trigger",
|
||||
},
|
||||
variants: {
|
||||
scroll: {
|
||||
inside: {
|
||||
body: "hv-modal__body--scroll-inside",
|
||||
dialog: "hv-modal__dialog--scroll-inside",
|
||||
},
|
||||
outside: {
|
||||
body: "hv-modal__body--scroll-outside",
|
||||
container: "hv-modal__container--scroll-outside",
|
||||
dialog: "hv-modal__dialog--scroll-outside",
|
||||
},
|
||||
},
|
||||
size: {
|
||||
cover: {
|
||||
dialog: "hv-modal__dialog--cover",
|
||||
},
|
||||
full: {
|
||||
container: "hv-modal__container--full",
|
||||
dialog: "hv-modal__dialog--full",
|
||||
},
|
||||
lg: {
|
||||
dialog: "hv-modal__dialog--lg",
|
||||
},
|
||||
md: {
|
||||
dialog: "hv-modal__dialog--md",
|
||||
},
|
||||
sm: {
|
||||
dialog: "hv-modal__dialog--sm",
|
||||
},
|
||||
xs: {
|
||||
dialog: "hv-modal__dialog--xs",
|
||||
},
|
||||
},
|
||||
variant: {
|
||||
blur: {
|
||||
backdrop: "hv-modal__backdrop--blur",
|
||||
},
|
||||
opaque: {
|
||||
backdrop: "hv-modal__backdrop--opaque",
|
||||
},
|
||||
transparent: {
|
||||
backdrop: "hv-modal__backdrop--transparent",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export type ModalVariants = VariantProps<typeof modalVariants>;
|
||||
|
||||
export const popoverVariants = tv({
|
||||
slots: {
|
||||
base: "hv-popover",
|
||||
dialog: "hv-popover__dialog",
|
||||
heading: "hv-popover__heading",
|
||||
trigger: "hv-popover__trigger",
|
||||
},
|
||||
});
|
||||
|
||||
export type PopoverVariants = VariantProps<typeof popoverVariants>;
|
||||
|
||||
export const tooltipVariants = tv({
|
||||
slots: {
|
||||
base: "hv-tooltip",
|
||||
trigger: "hv-tooltip__trigger",
|
||||
},
|
||||
});
|
||||
|
||||
export type TooltipVariants = VariantProps<typeof tooltipVariants>;
|
||||
|
||||
Reference in New Issue
Block a user