@mirohq/design-system-popover 5.0.18 → 5.0.19-themes.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -71,30 +71,30 @@ const StyledContent = designSystemStitches.styled(RadixPopover.Content, {
71
71
  });
72
72
 
73
73
  const getAlignXStyle = (side, width) => ({
74
- [`[data-side="${side}"][data-align="start"] > &`]: {
75
- left: `${width * 2}px`
74
+ ['[data-side="'.concat(side, '"][data-align="start"] > &')]: {
75
+ left: "".concat(width * 2, "px")
76
76
  },
77
- [`[data-side="${side}"][data-align="center"] > &`]: {
78
- left: `calc(50% - ${width / 2}px)`
77
+ ['[data-side="'.concat(side, '"][data-align="center"] > &')]: {
78
+ left: "calc(50% - ".concat(width / 2, "px)")
79
79
  },
80
- [`[data-side="${side}"][data-align="end"] > &`]: {
81
- left: `calc(100% - ${width * 3}px)`
80
+ ['[data-side="'.concat(side, '"][data-align="end"] > &')]: {
81
+ left: "calc(100% - ".concat(width * 3, "px)")
82
82
  }
83
83
  });
84
84
  const getAlignYStyle = (side, width, height) => ({
85
- [`[data-side="${side}"][data-align="start"] > &`]: {
86
- bottom: `calc(100% - (${height - width}px))`
85
+ ['[data-side="'.concat(side, '"][data-align="start"] > &')]: {
86
+ bottom: "calc(100% - (".concat(height - width, "px))")
87
87
  },
88
- [`[data-side="${side}"][data-align="center"] > &`]: {
89
- bottom: `calc(50% - ${height / 2}px)`
88
+ ['[data-side="'.concat(side, '"][data-align="center"] > &')]: {
89
+ bottom: "calc(50% - ".concat(height / 2, "px)")
90
90
  },
91
- [`[data-side="${side}"][data-align="end"] > &`]: { bottom: `-${width}px` }
91
+ ['[data-side="'.concat(side, '"][data-align="end"] > &')]: { bottom: "-".concat(width, "px") }
92
92
  });
93
93
  const getPlacement = (width, height) => {
94
94
  const halfHeight = height / 2;
95
95
  const halfWidth = width / 2;
96
96
  return {
97
- '[data-side="top"] > &': { bottom: `-${height}px` },
97
+ '[data-side="top"] > &': { bottom: "-".concat(height, "px") },
98
98
  ...getAlignXStyle("top", width),
99
99
  '[data-side="bottom"] > &': {
100
100
  bottom: "100%",
@@ -102,12 +102,12 @@ const getPlacement = (width, height) => {
102
102
  },
103
103
  ...getAlignXStyle("bottom", width),
104
104
  '[data-side="right"] > &': {
105
- left: `-${halfHeight + halfWidth}px`,
105
+ left: "-".concat(halfHeight + halfWidth, "px"),
106
106
  transform: "rotate(90deg)"
107
107
  },
108
108
  ...getAlignYStyle("right", width, height),
109
109
  '[data-side="left"] > &': {
110
- left: `calc(100% + ${halfHeight - halfWidth}px)`,
110
+ left: "calc(100% + ".concat(halfHeight - halfWidth, "px)"),
111
111
  transform: "rotate(270deg)"
112
112
  },
113
113
  ...getAlignYStyle("left", width, height)
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/partials/trigger.styled.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/line.styled.tsx","../src/partials/line.tsx","../src/partials/arrow.styled.tsx","../src/use-popover-context.tsx","../src/partials/arrow.tsx","../src/partials/content.tsx","../src/partials/close.styled.tsx","../src/partials/close.tsx","../src/partials/portal.tsx","../src/popover.tsx"],"sourcesContent":["import { Trigger as RadixTrigger } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledTrigger = styled(RadixTrigger)\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\n\nexport interface TriggerProps extends StyledTriggerProps {}\n\n/**\n * The trigger component is used to render the trigger element for the popover.\n */\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>((props, forwardRef) => <StyledTrigger {...props} ref={forwardRef} />)\n","import { Content as RadixContent } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { animations } from '@mirohq/design-system-styles'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledContent = styled(RadixContent, {\n backgroundColor: '$black',\n borderRadius: '$50',\n color: '$white',\n padding: '$200',\n boxShadow: '0 $1 $4 rgba(9, 9, 9, 0.4)',\n fontSize: '14px',\n lineHeight: '20px',\n '@media (prefers-reduced-motion: no-preference)': {\n animationDuration: '220ms',\n animationTimingFunction: 'ease',\n willChange: 'opacity',\n '&[data-state=\"open\"]': {\n animationName: animations.fadeIn,\n },\n '&[data-state=\"closed\"]': {\n animationName: animations.fadeOut,\n },\n },\n variants: {\n variant: {\n light: {\n background: '$white',\n boxShadow: '$50',\n color: '$black',\n },\n dark: {},\n },\n },\n zIndex: '$popover',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\ntype Side = 'top' | 'right' | 'bottom' | 'left'\n\ninterface AlignStyle {\n [x: string]: CSSProperties\n}\n\nconst getAlignXStyle = (side: Side, width: number): AlignStyle => ({\n [`[data-side=\"${side}\"][data-align=\"start\"] > &`]: {\n left: `${width * 2}px`,\n },\n [`[data-side=\"${side}\"][data-align=\"center\"] > &`]: {\n left: `calc(50% - ${width / 2}px)`,\n },\n [`[data-side=\"${side}\"][data-align=\"end\"] > &`]: {\n left: `calc(100% - ${width * 3}px)`,\n },\n})\n\nconst getAlignYStyle = (\n side: Side,\n width: number,\n height: number\n): AlignStyle => ({\n [`[data-side=\"${side}\"][data-align=\"start\"] > &`]: {\n bottom: `calc(100% - (${height - width}px))`,\n },\n [`[data-side=\"${side}\"][data-align=\"center\"] > &`]: {\n bottom: `calc(50% - ${height / 2}px)`,\n },\n [`[data-side=\"${side}\"][data-align=\"end\"] > &`]: { bottom: `-${width}px` },\n})\n\nexport const getPlacement = (width: number, height: number): any => {\n const halfHeight = height / 2\n const halfWidth = width / 2\n\n return {\n '[data-side=\"top\"] > &': { bottom: `-${height}px` },\n ...getAlignXStyle('top', width),\n '[data-side=\"bottom\"] > &': {\n bottom: '100%',\n transform: 'rotate(180deg)',\n },\n ...getAlignXStyle('bottom', width),\n '[data-side=\"right\"] > &': {\n left: `-${halfHeight + halfWidth}px`,\n transform: 'rotate(90deg)',\n },\n ...getAlignYStyle('right', width, height),\n '[data-side=\"left\"] > &': {\n left: `calc(100% + ${halfHeight - halfWidth}px)`,\n transform: 'rotate(270deg)',\n },\n ...getAlignYStyle('left', width, height),\n }\n}\n\nexport const StyledLine = styled(Primitive.span, {\n width: '6px',\n height: '50px',\n position: 'absolute',\n rect: {\n fill: '$black',\n },\n 'svg #line': {\n width: '44px',\n height: '1px',\n transform: 'rotate(90 3.5 0)',\n },\n 'svg #circle': {\n width: '6px',\n height: '6px',\n rx: '3px',\n transform: 'rotate(90 6 44)',\n },\n})\n\nexport type StyledLineProps = StrictComponentProps<typeof StyledLine>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledLine, getPlacement } from './line.styled'\nimport type { StyledLineProps } from './line.styled'\n\nexport interface LineProps extends StyledLineProps {}\n\nexport const Line = React.forwardRef<ElementRef<typeof StyledLine>, LineProps>(\n (props, forwardRef) => {\n const placement = getPlacement(6, 50)\n return (\n <StyledLine\n {...props}\n css={{ ...placement }}\n ref={forwardRef}\n aria-hidden\n >\n <svg viewBox='0 0 6 50'>\n <rect id='line' x='3.5' transform='rotate(90 3.5 0)' />\n <rect id='circle' x='6' y='44' transform='rotate(90 6 44)' />\n </svg>\n </StyledLine>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Arrow as RadixArrow } from '@radix-ui/react-popover'\n\nexport const StyledArrow = styled(RadixArrow, {\n fill: '$black',\n height: '$1',\n paddingX: '2px',\n width: '$3',\n variants: {\n variant: {\n light: {\n fill: '$white',\n },\n dark: {},\n },\n },\n})\n\nexport type StyledArrowProps = StrictComponentProps<typeof StyledArrow>\n","import React, { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nimport type { Variant } from './types'\n\ninterface PopoverValues {\n variant?: Variant\n}\n\ninterface PopoverContextProps {\n variant?: Variant\n}\n\nconst PopoverContext = createContext<PopoverContextProps>({} as any)\n\n/**\n * The PopoverProvider is used to manage the state of the popover,\n * when it opens or closes, and what triggers it.\n */\nexport const PopoverProvider = ({\n children,\n variant,\n}: PropsWithChildren<PopoverValues>): any => (\n <PopoverContext.Provider\n value={{\n variant,\n }}\n >\n {children}\n </PopoverContext.Provider>\n)\n\n/**\n * The usePopoverContext hook is used to access the state of the popover.\n */\nexport const usePopoverContext = (): PopoverContextProps =>\n useContext(PopoverContext)\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledArrow } from './arrow.styled'\nimport type { StyledArrowProps } from './arrow.styled'\nimport { usePopoverContext } from '../use-popover-context'\n\nexport interface ArrowProps extends StyledArrowProps {}\n\nexport const Arrow = React.forwardRef<\n ElementRef<typeof StyledArrow>,\n ArrowProps\n>((props, forwardRef) => {\n const { variant } = usePopoverContext()\n return (\n <StyledArrow {...props} variant={variant} aria-hidden ref={forwardRef} />\n )\n})\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useSize } from '@radix-ui/react-use-size'\n\nimport { StyledContent } from './content.styled'\nimport { Line } from './line'\nimport { Arrow } from './arrow'\nimport { usePopoverContext } from '../use-popover-context'\nimport type { StyledContentProps } from './content.styled'\nimport type {\n Align,\n Side,\n AnchorType,\n PointerDownOutsideEvent,\n FocusOutsideEvent,\n} from '../types'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with window edges.\n */\n avoidCollisions?: boolean\n\n /**\n * The preferred alignment against the trigger. May change when collisions occur.\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment option.\n */\n alignOffset?: number\n\n /**\n * The distance in pixels from the trigger's edge to the popover's anchor. Works only with the \"arrow\" or \"none\"\n * anchor.\n */\n sideOffset?: number\n\n /**\n * The preferred side of the trigger to render against when open.\n * Will be reversed when collisions occur and avoidCollisions is enabled.\n */\n side?: Side\n\n /**\n * The distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides).\n */\n collisionPadding?: number\n\n /**\n * The type of anchor to render.\n */\n anchor?: AnchorType\n\n /**\n * Whether to render in a Portal when open.\n */\n portalled?: boolean\n\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The element used as the collision boundary. By default this is the\n * viewport, though you can provide additional element(s) to be included in\n * this check.\n */\n collisionBoundary?: Element | null\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in\n * the boundary as long as the trigger is at least partially in the boundary\n * whilst \"always\" will keep the content in the boundary regardless.\n */\n sticky?: 'partial' | 'always'\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n */\n hideWhenDetached?: boolean\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * Event handler called when focus moves outside the bounds of the component.\n * It can be prevented by calling event.preventDefault.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void\n\n /**\n * Event handler called when the escape key is down. It can be prevented by\n * calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when an interaction (pointer or focus event) happens\n * outside the bounds of the component. It can be prevented by calling\n * event.preventDefault.\n */\n onInteractOutside?: (\n event: PointerDownOutsideEvent | FocusOutsideEvent\n ) => void\n\n /**\n * Event handler called when focus moves into the component after opening.\n * It can be prevented by calling event.preventDefault().\n */\n onOpenAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing.\n * It can be prevented by calling event.preventDefault().\n */\n onCloseAutoFocus?: (event: Event) => void\n}\n\n/**\n * The content component is used to render rich content elements for the popover.\n */\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n align = 'center',\n alignOffset = 0,\n sideOffset = 0,\n avoidCollisions = true,\n collisionPadding = 0,\n side = 'top',\n children,\n anchor = 'line',\n sticky = 'partial',\n hideWhenDetached = false,\n ...restProps\n },\n forwardRef\n ) => {\n const [line, setLine] = React.useState<HTMLElement | null>(null)\n const lineSize = useSize(line)\n const { variant } = usePopoverContext()\n\n const anchorEl = React.useMemo(() => {\n switch (anchor) {\n case 'arrow':\n return <Arrow />\n case 'line':\n return <Line ref={setLine} />\n default:\n return null\n }\n }, [anchor, setLine])\n\n return (\n <StyledContent\n {...restProps}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n side={side}\n sideOffset={anchor === 'line' ? lineSize?.height : sideOffset}\n ref={forwardRef}\n role='dialog'\n aria-modal='true'\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\n variant={variant}\n >\n {children}\n {anchorEl}\n </StyledContent>\n )\n }\n)\n","import { Close as RadixClose } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledClose = styled(RadixClose, {\n all: 'unset',\n fontFamily: 'inherit',\n height: '$6',\n width: '$6',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: '$white',\n position: 'absolute',\n top: '5px',\n right: '5px',\n borderRadius: '$50',\n cursor: 'pointer',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.12)',\n },\n '&:focus-visible': {\n boxShadow: '$focus-controls',\n },\n\n variants: {\n variant: {\n light: {\n color: '$black',\n },\n dark: {\n '&:focus-visible': {\n boxShadow:\n '0 0 0 1px #0F0F0F, 0 0 0 3px #6881FF, 0 0 0 5px #4961f699',\n },\n },\n },\n },\n})\n\nexport type StyledCloseProps = StrictComponentProps<typeof StyledClose>\n","import React from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport type { ElementRef } from 'react'\n\nimport { StyledClose } from './close.styled'\nimport { usePopoverContext } from '../use-popover-context'\nimport type { StyledCloseProps } from './close.styled'\n\nexport interface CloseProps extends StyledCloseProps {}\n\nexport const Close = React.forwardRef<\n ElementRef<typeof StyledClose>,\n CloseProps\n>((props, forwardRef) => {\n const { variant } = usePopoverContext()\n\n return (\n <StyledClose\n {...props}\n ref={forwardRef}\n data-testid='close-icon'\n variant={variant}\n >\n <IconCross size='small' />\n </StyledClose>\n )\n})\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries. If used on this part,\n * it will be inherited by Popover.Content.\n */\n forceMount?: true\n\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React from 'react'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Close } from './partials/close'\nimport { Portal } from './partials/portal'\nimport { PopoverProvider } from './use-popover-context'\nimport type { Variant } from './types'\n\nexport interface PopoverProps {\n /**\n * The current controlled state of the popover.\n */\n open?: boolean\n\n /**\n * The initial open state of the popover. Use when you don't need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * Event handler called when the popover opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the popover closes.\n */\n onClose?: () => void\n\n /**\n * Defines whether the interaction with outside elements will be enabled.\n */\n interactOutside?: boolean\n\n /**\n * Change the popover's appearance\n */\n variant?: Variant\n\n /**\n * The content\n */\n children: React.ReactNode\n}\n\nconst Root: React.FC<PopoverProps> = ({ onOpen, onClose, ...restProps }) => (\n <RadixPopover.Root\n {...restProps}\n onOpenChange={value => {\n if (value) {\n onOpen?.()\n } else {\n onClose?.()\n }\n }}\n modal={false}\n />\n)\n\nexport const Popover: React.FC<PopoverProps> & Partials = ({\n open,\n defaultOpen = false,\n onOpen,\n onClose,\n variant = 'dark',\n ...restProps\n}) => (\n <PopoverProvider variant={variant}>\n <Root\n {...restProps}\n open={open}\n defaultOpen={defaultOpen}\n onOpen={onOpen}\n onClose={onClose}\n />\n </PopoverProvider>\n)\n\n// Partials\n// -----------------------------------------------------------------------------\ninterface Partials {\n Trigger: typeof Trigger\n Content: typeof Content\n Close: typeof Close\n Portal: typeof Portal\n}\n\nPopover.Trigger = Trigger\nPopover.Content = Content\nPopover.Close = Close\nPopover.Portal = Portal\n"],"names":["styled","RadixTrigger","React","jsx","RadixContent","animations","Primitive","jsxs","RadixArrow","createContext","useContext","useSize","RadixClose","IconCross","RadixPortal","RadixPopover"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,aAAA,GAAgBA,4BAAOC,oBAAY,CAAA;;ACOzC,MAAM,OAAU,GAAAC,yBAAA,CAAM,UAG3B,CAAA,CAAC,KAAO,EAAA,UAAA,qBAAgBC,cAAA,CAAA,aAAA,EAAA,EAAe,GAAG,KAAA,EAAO,GAAK,EAAA,UAAA,EAAY,CAAE,CAAA;;ACTzD,MAAA,aAAA,GAAgBH,4BAAOI,oBAAc,EAAA;AAAA,EAChD,eAAiB,EAAA,QAAA;AAAA,EACjB,YAAc,EAAA,KAAA;AAAA,EACd,KAAO,EAAA,QAAA;AAAA,EACP,OAAS,EAAA,MAAA;AAAA,EACT,SAAW,EAAA,4BAAA;AAAA,EACX,QAAU,EAAA,MAAA;AAAA,EACV,UAAY,EAAA,MAAA;AAAA,EACZ,gDAAkD,EAAA;AAAA,IAChD,iBAAmB,EAAA,OAAA;AAAA,IACnB,uBAAyB,EAAA,M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.styled.tsx","../src/partials/line.styled.tsx","../src/partials/line.tsx","../src/partials/arrow.styled.tsx","../src/use-popover-context.tsx","../src/partials/arrow.tsx","../src/partials/content.tsx","../src/partials/close.styled.tsx","../src/partials/close.tsx","../src/partials/portal.tsx","../src/popover.tsx"],"sourcesContent":["import { Trigger as RadixTrigger } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledTrigger = styled(RadixTrigger)\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\n\nexport interface TriggerProps extends StyledTriggerProps {}\n\n/**\n * The trigger component is used to render the trigger element for the popover.\n */\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>((props, forwardRef) => <StyledTrigger {...props} ref={forwardRef} />)\n","import { Content as RadixContent } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { animations } from '@mirohq/design-system-styles'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledContent = styled(RadixContent, {\n backgroundColor: '$black',\n borderRadius: '$50',\n color: '$white',\n padding: '$200',\n boxShadow: '0 $1 $4 rgba(9, 9, 9, 0.4)',\n fontSize: '14px',\n lineHeight: '20px',\n '@media (prefers-reduced-motion: no-preference)': {\n animationDuration: '220ms',\n animationTimingFunction: 'ease',\n willChange: 'opacity',\n '&[data-state=\"open\"]': {\n animationName: animations.fadeIn,\n },\n '&[data-state=\"closed\"]': {\n animationName: animations.fadeOut,\n },\n },\n variants: {\n variant: {\n light: {\n background: '$white',\n boxShadow: '$50',\n color: '$black',\n },\n dark: {},\n },\n },\n zIndex: '$popover',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\ntype Side = 'top' | 'right' | 'bottom' | 'left'\n\ninterface AlignStyle {\n [x: string]: CSSProperties\n}\n\nconst getAlignXStyle = (side: Side, width: number): AlignStyle => ({\n [`[data-side=\"${side}\"][data-align=\"start\"] > &`]: {\n left: `${width * 2}px`,\n },\n [`[data-side=\"${side}\"][data-align=\"center\"] > &`]: {\n left: `calc(50% - ${width / 2}px)`,\n },\n [`[data-side=\"${side}\"][data-align=\"end\"] > &`]: {\n left: `calc(100% - ${width * 3}px)`,\n },\n})\n\nconst getAlignYStyle = (\n side: Side,\n width: number,\n height: number\n): AlignStyle => ({\n [`[data-side=\"${side}\"][data-align=\"start\"] > &`]: {\n bottom: `calc(100% - (${height - width}px))`,\n },\n [`[data-side=\"${side}\"][data-align=\"center\"] > &`]: {\n bottom: `calc(50% - ${height / 2}px)`,\n },\n [`[data-side=\"${side}\"][data-align=\"end\"] > &`]: { bottom: `-${width}px` },\n})\n\nexport const getPlacement = (width: number, height: number): any => {\n const halfHeight = height / 2\n const halfWidth = width / 2\n\n return {\n '[data-side=\"top\"] > &': { bottom: `-${height}px` },\n ...getAlignXStyle('top', width),\n '[data-side=\"bottom\"] > &': {\n bottom: '100%',\n transform: 'rotate(180deg)',\n },\n ...getAlignXStyle('bottom', width),\n '[data-side=\"right\"] > &': {\n left: `-${halfHeight + halfWidth}px`,\n transform: 'rotate(90deg)',\n },\n ...getAlignYStyle('right', width, height),\n '[data-side=\"left\"] > &': {\n left: `calc(100% + ${halfHeight - halfWidth}px)`,\n transform: 'rotate(270deg)',\n },\n ...getAlignYStyle('left', width, height),\n }\n}\n\nexport const StyledLine = styled(Primitive.span, {\n width: '6px',\n height: '50px',\n position: 'absolute',\n rect: {\n fill: '$black',\n },\n 'svg #line': {\n width: '44px',\n height: '1px',\n transform: 'rotate(90 3.5 0)',\n },\n 'svg #circle': {\n width: '6px',\n height: '6px',\n rx: '3px',\n transform: 'rotate(90 6 44)',\n },\n})\n\nexport type StyledLineProps = StrictComponentProps<typeof StyledLine>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledLine, getPlacement } from './line.styled'\nimport type { StyledLineProps } from './line.styled'\n\nexport interface LineProps extends StyledLineProps {}\n\nexport const Line = React.forwardRef<ElementRef<typeof StyledLine>, LineProps>(\n (props, forwardRef) => {\n const placement = getPlacement(6, 50)\n return (\n <StyledLine\n {...props}\n css={{ ...placement }}\n ref={forwardRef}\n aria-hidden\n >\n <svg viewBox='0 0 6 50'>\n <rect id='line' x='3.5' transform='rotate(90 3.5 0)' />\n <rect id='circle' x='6' y='44' transform='rotate(90 6 44)' />\n </svg>\n </StyledLine>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Arrow as RadixArrow } from '@radix-ui/react-popover'\n\nexport const StyledArrow = styled(RadixArrow, {\n fill: '$black',\n height: '$1',\n paddingX: '2px',\n width: '$3',\n variants: {\n variant: {\n light: {\n fill: '$white',\n },\n dark: {},\n },\n },\n})\n\nexport type StyledArrowProps = StrictComponentProps<typeof StyledArrow>\n","import React, { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nimport type { Variant } from './types'\n\ninterface PopoverValues {\n variant?: Variant\n}\n\ninterface PopoverContextProps {\n variant?: Variant\n}\n\nconst PopoverContext = createContext<PopoverContextProps>({} as any)\n\n/**\n * The PopoverProvider is used to manage the state of the popover,\n * when it opens or closes, and what triggers it.\n */\nexport const PopoverProvider = ({\n children,\n variant,\n}: PropsWithChildren<PopoverValues>): any => (\n <PopoverContext.Provider\n value={{\n variant,\n }}\n >\n {children}\n </PopoverContext.Provider>\n)\n\n/**\n * The usePopoverContext hook is used to access the state of the popover.\n */\nexport const usePopoverContext = (): PopoverContextProps =>\n useContext(PopoverContext)\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledArrow } from './arrow.styled'\nimport type { StyledArrowProps } from './arrow.styled'\nimport { usePopoverContext } from '../use-popover-context'\n\nexport interface ArrowProps extends StyledArrowProps {}\n\nexport const Arrow = React.forwardRef<\n ElementRef<typeof StyledArrow>,\n ArrowProps\n>((props, forwardRef) => {\n const { variant } = usePopoverContext()\n return (\n <StyledArrow {...props} variant={variant} aria-hidden ref={forwardRef} />\n )\n})\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useSize } from '@radix-ui/react-use-size'\n\nimport { StyledContent } from './content.styled'\nimport { Line } from './line'\nimport { Arrow } from './arrow'\nimport { usePopoverContext } from '../use-popover-context'\nimport type { StyledContentProps } from './content.styled'\nimport type {\n Align,\n Side,\n AnchorType,\n PointerDownOutsideEvent,\n FocusOutsideEvent,\n} from '../types'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with window edges.\n */\n avoidCollisions?: boolean\n\n /**\n * The preferred alignment against the trigger. May change when collisions occur.\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment option.\n */\n alignOffset?: number\n\n /**\n * The distance in pixels from the trigger's edge to the popover's anchor. Works only with the \"arrow\" or \"none\"\n * anchor.\n */\n sideOffset?: number\n\n /**\n * The preferred side of the trigger to render against when open.\n * Will be reversed when collisions occur and avoidCollisions is enabled.\n */\n side?: Side\n\n /**\n * The distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides).\n */\n collisionPadding?: number\n\n /**\n * The type of anchor to render.\n */\n anchor?: AnchorType\n\n /**\n * Whether to render in a Portal when open.\n */\n portalled?: boolean\n\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The element used as the collision boundary. By default this is the\n * viewport, though you can provide additional element(s) to be included in\n * this check.\n */\n collisionBoundary?: Element | null\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in\n * the boundary as long as the trigger is at least partially in the boundary\n * whilst \"always\" will keep the content in the boundary regardless.\n */\n sticky?: 'partial' | 'always'\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n */\n hideWhenDetached?: boolean\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * Event handler called when focus moves outside the bounds of the component.\n * It can be prevented by calling event.preventDefault.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void\n\n /**\n * Event handler called when the escape key is down. It can be prevented by\n * calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when an interaction (pointer or focus event) happens\n * outside the bounds of the component. It can be prevented by calling\n * event.preventDefault.\n */\n onInteractOutside?: (\n event: PointerDownOutsideEvent | FocusOutsideEvent\n ) => void\n\n /**\n * Event handler called when focus moves into the component after opening.\n * It can be prevented by calling event.preventDefault().\n */\n onOpenAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing.\n * It can be prevented by calling event.preventDefault().\n */\n onCloseAutoFocus?: (event: Event) => void\n}\n\n/**\n * The content component is used to render rich content elements for the popover.\n */\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n align = 'center',\n alignOffset = 0,\n sideOffset = 0,\n avoidCollisions = true,\n collisionPadding = 0,\n side = 'top',\n children,\n anchor = 'line',\n sticky = 'partial',\n hideWhenDetached = false,\n ...restProps\n },\n forwardRef\n ) => {\n const [line, setLine] = React.useState<HTMLElement | null>(null)\n const lineSize = useSize(line)\n const { variant } = usePopoverContext()\n\n const anchorEl = React.useMemo(() => {\n switch (anchor) {\n case 'arrow':\n return <Arrow />\n case 'line':\n return <Line ref={setLine} />\n default:\n return null\n }\n }, [anchor, setLine])\n\n return (\n <StyledContent\n {...restProps}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n side={side}\n sideOffset={anchor === 'line' ? lineSize?.height : sideOffset}\n ref={forwardRef}\n role='dialog'\n aria-modal='true'\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\n variant={variant}\n >\n {children}\n {anchorEl}\n </StyledContent>\n )\n }\n)\n","import { Close as RadixClose } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledClose = styled(RadixClose, {\n all: 'unset',\n fontFamily: 'inherit',\n height: '$6',\n width: '$6',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: '$white',\n position: 'absolute',\n top: '5px',\n right: '5px',\n borderRadius: '$50',\n cursor: 'pointer',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.12)',\n },\n '&:focus-visible': {\n boxShadow: '$focus-controls',\n },\n\n variants: {\n variant: {\n light: {\n color: '$black',\n },\n dark: {\n '&:focus-visible': {\n boxShadow:\n '0 0 0 1px #0F0F0F, 0 0 0 3px #6881FF, 0 0 0 5px #4961f699',\n },\n },\n },\n },\n})\n\nexport type StyledCloseProps = StrictComponentProps<typeof StyledClose>\n","import React from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport type { ElementRef } from 'react'\n\nimport { StyledClose } from './close.styled'\nimport { usePopoverContext } from '../use-popover-context'\nimport type { StyledCloseProps } from './close.styled'\n\nexport interface CloseProps extends StyledCloseProps {}\n\nexport const Close = React.forwardRef<\n ElementRef<typeof StyledClose>,\n CloseProps\n>((props, forwardRef) => {\n const { variant } = usePopoverContext()\n\n return (\n <StyledClose\n {...props}\n ref={forwardRef}\n data-testid='close-icon'\n variant={variant}\n >\n <IconCross size='small' />\n </StyledClose>\n )\n})\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries. If used on this part,\n * it will be inherited by Popover.Content.\n */\n forceMount?: true\n\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React from 'react'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Close } from './partials/close'\nimport { Portal } from './partials/portal'\nimport { PopoverProvider } from './use-popover-context'\nimport type { Variant } from './types'\n\nexport interface PopoverProps {\n /**\n * The current controlled state of the popover.\n */\n open?: boolean\n\n /**\n * The initial open state of the popover. Use when you don't need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * Event handler called when the popover opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the popover closes.\n */\n onClose?: () => void\n\n /**\n * Defines whether the interaction with outside elements will be enabled.\n */\n interactOutside?: boolean\n\n /**\n * Change the popover's appearance\n */\n variant?: Variant\n\n /**\n * The content\n */\n children: React.ReactNode\n}\n\nconst Root: React.FC<PopoverProps> = ({ onOpen, onClose, ...restProps }) => (\n <RadixPopover.Root\n {...restProps}\n onOpenChange={value => {\n if (value) {\n onOpen?.()\n } else {\n onClose?.()\n }\n }}\n modal={false}\n />\n)\n\nexport const Popover: React.FC<PopoverProps> & Partials = ({\n open,\n defaultOpen = false,\n onOpen,\n onClose,\n variant = 'dark',\n ...restProps\n}) => (\n <PopoverProvider variant={variant}>\n <Root\n {...restProps}\n open={open}\n defaultOpen={defaultOpen}\n onOpen={onOpen}\n onClose={onClose}\n />\n </PopoverProvider>\n)\n\n// Partials\n// -----------------------------------------------------------------------------\ninterface Partials {\n Trigger: typeof Trigger\n Content: typeof Content\n Close: typeof Close\n Portal: typeof Portal\n}\n\nPopover.Trigger = Trigger\nPopover.Content = Content\nPopover.Close = Close\nPopover.Portal = Portal\n"],"names":["styled","RadixTrigger","React","jsx","RadixContent","animations","Primitive","jsxs","RadixArrow","createContext","useContext","useSize","RadixClose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,OACK,MAAA;AACL,QAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,EAAA,CAAA;AAAA,OACF;AAAA,KACF;AAAA,IACA,KAAO,EAAA,KAAA;AAAA,GAAA;AACT,CAAA,CAAA;AAGK,MAAM,UAA6C,CAAC;AAAA,EACzD,IAAA;AAAA,EACA,WAAc,GAAA,KAAA;AAAA,EACd,MAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAU,GAAA,MAAA;AAAA,EACV,GAAG,SAAA;AACL,CACE,qBAAAZ,cAAA,CAAC,mBAAgB,OACf,EAAA,QAAA,kBAAAA,cAAA;AAAA,EAAC,IAAA;AAAA,EAAA;AAAA,IACE,GAAG,SAAA;AAAA,IACJ,IAAA;AAAA,IACA,WAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,GAAA;AACF,CACF,EAAA,EAAA;AAYF,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,OAAA,CAAQ,MAAS,GAAA,MAAA;;;;;;;;;"}
package/dist/module.js CHANGED
@@ -45,30 +45,30 @@ const StyledContent = styled(Content$1, {
45
45
  });
46
46
 
47
47
  const getAlignXStyle = (side, width) => ({
48
- [`[data-side="${side}"][data-align="start"] > &`]: {
49
- left: `${width * 2}px`
48
+ ['[data-side="'.concat(side, '"][data-align="start"] > &')]: {
49
+ left: "".concat(width * 2, "px")
50
50
  },
51
- [`[data-side="${side}"][data-align="center"] > &`]: {
52
- left: `calc(50% - ${width / 2}px)`
51
+ ['[data-side="'.concat(side, '"][data-align="center"] > &')]: {
52
+ left: "calc(50% - ".concat(width / 2, "px)")
53
53
  },
54
- [`[data-side="${side}"][data-align="end"] > &`]: {
55
- left: `calc(100% - ${width * 3}px)`
54
+ ['[data-side="'.concat(side, '"][data-align="end"] > &')]: {
55
+ left: "calc(100% - ".concat(width * 3, "px)")
56
56
  }
57
57
  });
58
58
  const getAlignYStyle = (side, width, height) => ({
59
- [`[data-side="${side}"][data-align="start"] > &`]: {
60
- bottom: `calc(100% - (${height - width}px))`
59
+ ['[data-side="'.concat(side, '"][data-align="start"] > &')]: {
60
+ bottom: "calc(100% - (".concat(height - width, "px))")
61
61
  },
62
- [`[data-side="${side}"][data-align="center"] > &`]: {
63
- bottom: `calc(50% - ${height / 2}px)`
62
+ ['[data-side="'.concat(side, '"][data-align="center"] > &')]: {
63
+ bottom: "calc(50% - ".concat(height / 2, "px)")
64
64
  },
65
- [`[data-side="${side}"][data-align="end"] > &`]: { bottom: `-${width}px` }
65
+ ['[data-side="'.concat(side, '"][data-align="end"] > &')]: { bottom: "-".concat(width, "px") }
66
66
  });
67
67
  const getPlacement = (width, height) => {
68
68
  const halfHeight = height / 2;
69
69
  const halfWidth = width / 2;
70
70
  return {
71
- '[data-side="top"] > &': { bottom: `-${height}px` },
71
+ '[data-side="top"] > &': { bottom: "-".concat(height, "px") },
72
72
  ...getAlignXStyle("top", width),
73
73
  '[data-side="bottom"] > &': {
74
74
  bottom: "100%",
@@ -76,12 +76,12 @@ const getPlacement = (width, height) => {
76
76
  },
77
77
  ...getAlignXStyle("bottom", width),
78
78
  '[data-side="right"] > &': {
79
- left: `-${halfHeight + halfWidth}px`,
79
+ left: "-".concat(halfHeight + halfWidth, "px"),
80
80
  transform: "rotate(90deg)"
81
81
  },
82
82
  ...getAlignYStyle("right", width, height),
83
83
  '[data-side="left"] > &': {
84
- left: `calc(100% + ${halfHeight - halfWidth}px)`,
84
+ left: "calc(100% + ".concat(halfHeight - halfWidth, "px)"),
85
85
  transform: "rotate(270deg)"
86
86
  },
87
87
  ...getAlignYStyle("left", width, height)
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/line.styled.tsx","../src/partials/line.tsx","../src/partials/arrow.styled.tsx","../src/use-popover-context.tsx","../src/partials/arrow.tsx","../src/partials/content.tsx","../src/partials/close.styled.tsx","../src/partials/close.tsx","../src/partials/portal.tsx","../src/popover.tsx"],"sourcesContent":["import { Trigger as RadixTrigger } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledTrigger = styled(RadixTrigger)\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\n\nexport interface TriggerProps extends StyledTriggerProps {}\n\n/**\n * The trigger component is used to render the trigger element for the popover.\n */\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>((props, forwardRef) => <StyledTrigger {...props} ref={forwardRef} />)\n","import { Content as RadixContent } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { animations } from '@mirohq/design-system-styles'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledContent = styled(RadixContent, {\n backgroundColor: '$black',\n borderRadius: '$50',\n color: '$white',\n padding: '$200',\n boxShadow: '0 $1 $4 rgba(9, 9, 9, 0.4)',\n fontSize: '14px',\n lineHeight: '20px',\n '@media (prefers-reduced-motion: no-preference)': {\n animationDuration: '220ms',\n animationTimingFunction: 'ease',\n willChange: 'opacity',\n '&[data-state=\"open\"]': {\n animationName: animations.fadeIn,\n },\n '&[data-state=\"closed\"]': {\n animationName: animations.fadeOut,\n },\n },\n variants: {\n variant: {\n light: {\n background: '$white',\n boxShadow: '$50',\n color: '$black',\n },\n dark: {},\n },\n },\n zIndex: '$popover',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\ntype Side = 'top' | 'right' | 'bottom' | 'left'\n\ninterface AlignStyle {\n [x: string]: CSSProperties\n}\n\nconst getAlignXStyle = (side: Side, width: number): AlignStyle => ({\n [`[data-side=\"${side}\"][data-align=\"start\"] > &`]: {\n left: `${width * 2}px`,\n },\n [`[data-side=\"${side}\"][data-align=\"center\"] > &`]: {\n left: `calc(50% - ${width / 2}px)`,\n },\n [`[data-side=\"${side}\"][data-align=\"end\"] > &`]: {\n left: `calc(100% - ${width * 3}px)`,\n },\n})\n\nconst getAlignYStyle = (\n side: Side,\n width: number,\n height: number\n): AlignStyle => ({\n [`[data-side=\"${side}\"][data-align=\"start\"] > &`]: {\n bottom: `calc(100% - (${height - width}px))`,\n },\n [`[data-side=\"${side}\"][data-align=\"center\"] > &`]: {\n bottom: `calc(50% - ${height / 2}px)`,\n },\n [`[data-side=\"${side}\"][data-align=\"end\"] > &`]: { bottom: `-${width}px` },\n})\n\nexport const getPlacement = (width: number, height: number): any => {\n const halfHeight = height / 2\n const halfWidth = width / 2\n\n return {\n '[data-side=\"top\"] > &': { bottom: `-${height}px` },\n ...getAlignXStyle('top', width),\n '[data-side=\"bottom\"] > &': {\n bottom: '100%',\n transform: 'rotate(180deg)',\n },\n ...getAlignXStyle('bottom', width),\n '[data-side=\"right\"] > &': {\n left: `-${halfHeight + halfWidth}px`,\n transform: 'rotate(90deg)',\n },\n ...getAlignYStyle('right', width, height),\n '[data-side=\"left\"] > &': {\n left: `calc(100% + ${halfHeight - halfWidth}px)`,\n transform: 'rotate(270deg)',\n },\n ...getAlignYStyle('left', width, height),\n }\n}\n\nexport const StyledLine = styled(Primitive.span, {\n width: '6px',\n height: '50px',\n position: 'absolute',\n rect: {\n fill: '$black',\n },\n 'svg #line': {\n width: '44px',\n height: '1px',\n transform: 'rotate(90 3.5 0)',\n },\n 'svg #circle': {\n width: '6px',\n height: '6px',\n rx: '3px',\n transform: 'rotate(90 6 44)',\n },\n})\n\nexport type StyledLineProps = StrictComponentProps<typeof StyledLine>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledLine, getPlacement } from './line.styled'\nimport type { StyledLineProps } from './line.styled'\n\nexport interface LineProps extends StyledLineProps {}\n\nexport const Line = React.forwardRef<ElementRef<typeof StyledLine>, LineProps>(\n (props, forwardRef) => {\n const placement = getPlacement(6, 50)\n return (\n <StyledLine\n {...props}\n css={{ ...placement }}\n ref={forwardRef}\n aria-hidden\n >\n <svg viewBox='0 0 6 50'>\n <rect id='line' x='3.5' transform='rotate(90 3.5 0)' />\n <rect id='circle' x='6' y='44' transform='rotate(90 6 44)' />\n </svg>\n </StyledLine>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Arrow as RadixArrow } from '@radix-ui/react-popover'\n\nexport const StyledArrow = styled(RadixArrow, {\n fill: '$black',\n height: '$1',\n paddingX: '2px',\n width: '$3',\n variants: {\n variant: {\n light: {\n fill: '$white',\n },\n dark: {},\n },\n },\n})\n\nexport type StyledArrowProps = StrictComponentProps<typeof StyledArrow>\n","import React, { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nimport type { Variant } from './types'\n\ninterface PopoverValues {\n variant?: Variant\n}\n\ninterface PopoverContextProps {\n variant?: Variant\n}\n\nconst PopoverContext = createContext<PopoverContextProps>({} as any)\n\n/**\n * The PopoverProvider is used to manage the state of the popover,\n * when it opens or closes, and what triggers it.\n */\nexport const PopoverProvider = ({\n children,\n variant,\n}: PropsWithChildren<PopoverValues>): any => (\n <PopoverContext.Provider\n value={{\n variant,\n }}\n >\n {children}\n </PopoverContext.Provider>\n)\n\n/**\n * The usePopoverContext hook is used to access the state of the popover.\n */\nexport const usePopoverContext = (): PopoverContextProps =>\n useContext(PopoverContext)\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledArrow } from './arrow.styled'\nimport type { StyledArrowProps } from './arrow.styled'\nimport { usePopoverContext } from '../use-popover-context'\n\nexport interface ArrowProps extends StyledArrowProps {}\n\nexport const Arrow = React.forwardRef<\n ElementRef<typeof StyledArrow>,\n ArrowProps\n>((props, forwardRef) => {\n const { variant } = usePopoverContext()\n return (\n <StyledArrow {...props} variant={variant} aria-hidden ref={forwardRef} />\n )\n})\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useSize } from '@radix-ui/react-use-size'\n\nimport { StyledContent } from './content.styled'\nimport { Line } from './line'\nimport { Arrow } from './arrow'\nimport { usePopoverContext } from '../use-popover-context'\nimport type { StyledContentProps } from './content.styled'\nimport type {\n Align,\n Side,\n AnchorType,\n PointerDownOutsideEvent,\n FocusOutsideEvent,\n} from '../types'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with window edges.\n */\n avoidCollisions?: boolean\n\n /**\n * The preferred alignment against the trigger. May change when collisions occur.\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment option.\n */\n alignOffset?: number\n\n /**\n * The distance in pixels from the trigger's edge to the popover's anchor. Works only with the \"arrow\" or \"none\"\n * anchor.\n */\n sideOffset?: number\n\n /**\n * The preferred side of the trigger to render against when open.\n * Will be reversed when collisions occur and avoidCollisions is enabled.\n */\n side?: Side\n\n /**\n * The distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides).\n */\n collisionPadding?: number\n\n /**\n * The type of anchor to render.\n */\n anchor?: AnchorType\n\n /**\n * Whether to render in a Portal when open.\n */\n portalled?: boolean\n\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The element used as the collision boundary. By default this is the\n * viewport, though you can provide additional element(s) to be included in\n * this check.\n */\n collisionBoundary?: Element | null\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in\n * the boundary as long as the trigger is at least partially in the boundary\n * whilst \"always\" will keep the content in the boundary regardless.\n */\n sticky?: 'partial' | 'always'\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n */\n hideWhenDetached?: boolean\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * Event handler called when focus moves outside the bounds of the component.\n * It can be prevented by calling event.preventDefault.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void\n\n /**\n * Event handler called when the escape key is down. It can be prevented by\n * calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when an interaction (pointer or focus event) happens\n * outside the bounds of the component. It can be prevented by calling\n * event.preventDefault.\n */\n onInteractOutside?: (\n event: PointerDownOutsideEvent | FocusOutsideEvent\n ) => void\n\n /**\n * Event handler called when focus moves into the component after opening.\n * It can be prevented by calling event.preventDefault().\n */\n onOpenAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing.\n * It can be prevented by calling event.preventDefault().\n */\n onCloseAutoFocus?: (event: Event) => void\n}\n\n/**\n * The content component is used to render rich content elements for the popover.\n */\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n align = 'center',\n alignOffset = 0,\n sideOffset = 0,\n avoidCollisions = true,\n collisionPadding = 0,\n side = 'top',\n children,\n anchor = 'line',\n sticky = 'partial',\n hideWhenDetached = false,\n ...restProps\n },\n forwardRef\n ) => {\n const [line, setLine] = React.useState<HTMLElement | null>(null)\n const lineSize = useSize(line)\n const { variant } = usePopoverContext()\n\n const anchorEl = React.useMemo(() => {\n switch (anchor) {\n case 'arrow':\n return <Arrow />\n case 'line':\n return <Line ref={setLine} />\n default:\n return null\n }\n }, [anchor, setLine])\n\n return (\n <StyledContent\n {...restProps}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n side={side}\n sideOffset={anchor === 'line' ? lineSize?.height : sideOffset}\n ref={forwardRef}\n role='dialog'\n aria-modal='true'\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\n variant={variant}\n >\n {children}\n {anchorEl}\n </StyledContent>\n )\n }\n)\n","import { Close as RadixClose } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledClose = styled(RadixClose, {\n all: 'unset',\n fontFamily: 'inherit',\n height: '$6',\n width: '$6',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: '$white',\n position: 'absolute',\n top: '5px',\n right: '5px',\n borderRadius: '$50',\n cursor: 'pointer',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.12)',\n },\n '&:focus-visible': {\n boxShadow: '$focus-controls',\n },\n\n variants: {\n variant: {\n light: {\n color: '$black',\n },\n dark: {\n '&:focus-visible': {\n boxShadow:\n '0 0 0 1px #0F0F0F, 0 0 0 3px #6881FF, 0 0 0 5px #4961f699',\n },\n },\n },\n },\n})\n\nexport type StyledCloseProps = StrictComponentProps<typeof StyledClose>\n","import React from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport type { ElementRef } from 'react'\n\nimport { StyledClose } from './close.styled'\nimport { usePopoverContext } from '../use-popover-context'\nimport type { StyledCloseProps } from './close.styled'\n\nexport interface CloseProps extends StyledCloseProps {}\n\nexport const Close = React.forwardRef<\n ElementRef<typeof StyledClose>,\n CloseProps\n>((props, forwardRef) => {\n const { variant } = usePopoverContext()\n\n return (\n <StyledClose\n {...props}\n ref={forwardRef}\n data-testid='close-icon'\n variant={variant}\n >\n <IconCross size='small' />\n </StyledClose>\n )\n})\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries. If used on this part,\n * it will be inherited by Popover.Content.\n */\n forceMount?: true\n\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React from 'react'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Close } from './partials/close'\nimport { Portal } from './partials/portal'\nimport { PopoverProvider } from './use-popover-context'\nimport type { Variant } from './types'\n\nexport interface PopoverProps {\n /**\n * The current controlled state of the popover.\n */\n open?: boolean\n\n /**\n * The initial open state of the popover. Use when you don't need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * Event handler called when the popover opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the popover closes.\n */\n onClose?: () => void\n\n /**\n * Defines whether the interaction with outside elements will be enabled.\n */\n interactOutside?: boolean\n\n /**\n * Change the popover's appearance\n */\n variant?: Variant\n\n /**\n * The content\n */\n children: React.ReactNode\n}\n\nconst Root: React.FC<PopoverProps> = ({ onOpen, onClose, ...restProps }) => (\n <RadixPopover.Root\n {...restProps}\n onOpenChange={value => {\n if (value) {\n onOpen?.()\n } else {\n onClose?.()\n }\n }}\n modal={false}\n />\n)\n\nexport const Popover: React.FC<PopoverProps> & Partials = ({\n open,\n defaultOpen = false,\n onOpen,\n onClose,\n variant = 'dark',\n ...restProps\n}) => (\n <PopoverProvider variant={variant}>\n <Root\n {...restProps}\n open={open}\n defaultOpen={defaultOpen}\n onOpen={onOpen}\n onClose={onClose}\n />\n </PopoverProvider>\n)\n\n// Partials\n// -----------------------------------------------------------------------------\ninterface Partials {\n Trigger: typeof Trigger\n Content: typeof Content\n Close: typeof Close\n Portal: typeof Portal\n}\n\nPopover.Trigger = Trigger\nPopover.Content = Content\nPopover.Close = Close\nPopover.Portal = Portal\n"],"names":["RadixTrigger","RadixContent","RadixArrow","RadixClose","RadixPortal"],"mappings":";;;;;;;;;;AAIa,MAAA,aAAA,GAAgB,OAAOA,SAAY,CAAA;;ACOzC,MAAM,OAAU,GAAA,KAAA,CA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;AAAA,EAAC,IAAA;AAAA,EAAA;AAAA,IACE,GAAG,SAAA;AAAA,IACJ,IAAA;AAAA,IACA,WAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,GAAA;AACF,CACF,EAAA,EAAA;AAYF,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,OAAA,CAAQ,MAAS,GAAA,MAAA;;;;;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/line.styled.tsx","../src/partials/line.tsx","../src/partials/arrow.styled.tsx","../src/use-popover-context.tsx","../src/partials/arrow.tsx","../src/partials/content.tsx","../src/partials/close.styled.tsx","../src/partials/close.tsx","../src/partials/portal.tsx","../src/popover.tsx"],"sourcesContent":["import { Trigger as RadixTrigger } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledTrigger = styled(RadixTrigger)\nexport type StyledTriggerProps = StrictComponentProps<typeof StyledTrigger>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledTrigger } from './trigger.styled'\nimport type { StyledTriggerProps } from './trigger.styled'\n\nexport interface TriggerProps extends StyledTriggerProps {}\n\n/**\n * The trigger component is used to render the trigger element for the popover.\n */\nexport const Trigger = React.forwardRef<\n ElementRef<typeof StyledTrigger>,\n TriggerProps\n>((props, forwardRef) => <StyledTrigger {...props} ref={forwardRef} />)\n","import { Content as RadixContent } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { animations } from '@mirohq/design-system-styles'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledContent = styled(RadixContent, {\n backgroundColor: '$black',\n borderRadius: '$50',\n color: '$white',\n padding: '$200',\n boxShadow: '0 $1 $4 rgba(9, 9, 9, 0.4)',\n fontSize: '14px',\n lineHeight: '20px',\n '@media (prefers-reduced-motion: no-preference)': {\n animationDuration: '220ms',\n animationTimingFunction: 'ease',\n willChange: 'opacity',\n '&[data-state=\"open\"]': {\n animationName: animations.fadeIn,\n },\n '&[data-state=\"closed\"]': {\n animationName: animations.fadeOut,\n },\n },\n variants: {\n variant: {\n light: {\n background: '$white',\n boxShadow: '$50',\n color: '$black',\n },\n dark: {},\n },\n },\n zIndex: '$popover',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\ntype Side = 'top' | 'right' | 'bottom' | 'left'\n\ninterface AlignStyle {\n [x: string]: CSSProperties\n}\n\nconst getAlignXStyle = (side: Side, width: number): AlignStyle => ({\n [`[data-side=\"${side}\"][data-align=\"start\"] > &`]: {\n left: `${width * 2}px`,\n },\n [`[data-side=\"${side}\"][data-align=\"center\"] > &`]: {\n left: `calc(50% - ${width / 2}px)`,\n },\n [`[data-side=\"${side}\"][data-align=\"end\"] > &`]: {\n left: `calc(100% - ${width * 3}px)`,\n },\n})\n\nconst getAlignYStyle = (\n side: Side,\n width: number,\n height: number\n): AlignStyle => ({\n [`[data-side=\"${side}\"][data-align=\"start\"] > &`]: {\n bottom: `calc(100% - (${height - width}px))`,\n },\n [`[data-side=\"${side}\"][data-align=\"center\"] > &`]: {\n bottom: `calc(50% - ${height / 2}px)`,\n },\n [`[data-side=\"${side}\"][data-align=\"end\"] > &`]: { bottom: `-${width}px` },\n})\n\nexport const getPlacement = (width: number, height: number): any => {\n const halfHeight = height / 2\n const halfWidth = width / 2\n\n return {\n '[data-side=\"top\"] > &': { bottom: `-${height}px` },\n ...getAlignXStyle('top', width),\n '[data-side=\"bottom\"] > &': {\n bottom: '100%',\n transform: 'rotate(180deg)',\n },\n ...getAlignXStyle('bottom', width),\n '[data-side=\"right\"] > &': {\n left: `-${halfHeight + halfWidth}px`,\n transform: 'rotate(90deg)',\n },\n ...getAlignYStyle('right', width, height),\n '[data-side=\"left\"] > &': {\n left: `calc(100% + ${halfHeight - halfWidth}px)`,\n transform: 'rotate(270deg)',\n },\n ...getAlignYStyle('left', width, height),\n }\n}\n\nexport const StyledLine = styled(Primitive.span, {\n width: '6px',\n height: '50px',\n position: 'absolute',\n rect: {\n fill: '$black',\n },\n 'svg #line': {\n width: '44px',\n height: '1px',\n transform: 'rotate(90 3.5 0)',\n },\n 'svg #circle': {\n width: '6px',\n height: '6px',\n rx: '3px',\n transform: 'rotate(90 6 44)',\n },\n})\n\nexport type StyledLineProps = StrictComponentProps<typeof StyledLine>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledLine, getPlacement } from './line.styled'\nimport type { StyledLineProps } from './line.styled'\n\nexport interface LineProps extends StyledLineProps {}\n\nexport const Line = React.forwardRef<ElementRef<typeof StyledLine>, LineProps>(\n (props, forwardRef) => {\n const placement = getPlacement(6, 50)\n return (\n <StyledLine\n {...props}\n css={{ ...placement }}\n ref={forwardRef}\n aria-hidden\n >\n <svg viewBox='0 0 6 50'>\n <rect id='line' x='3.5' transform='rotate(90 3.5 0)' />\n <rect id='circle' x='6' y='44' transform='rotate(90 6 44)' />\n </svg>\n </StyledLine>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Arrow as RadixArrow } from '@radix-ui/react-popover'\n\nexport const StyledArrow = styled(RadixArrow, {\n fill: '$black',\n height: '$1',\n paddingX: '2px',\n width: '$3',\n variants: {\n variant: {\n light: {\n fill: '$white',\n },\n dark: {},\n },\n },\n})\n\nexport type StyledArrowProps = StrictComponentProps<typeof StyledArrow>\n","import React, { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\n\nimport type { Variant } from './types'\n\ninterface PopoverValues {\n variant?: Variant\n}\n\ninterface PopoverContextProps {\n variant?: Variant\n}\n\nconst PopoverContext = createContext<PopoverContextProps>({} as any)\n\n/**\n * The PopoverProvider is used to manage the state of the popover,\n * when it opens or closes, and what triggers it.\n */\nexport const PopoverProvider = ({\n children,\n variant,\n}: PropsWithChildren<PopoverValues>): any => (\n <PopoverContext.Provider\n value={{\n variant,\n }}\n >\n {children}\n </PopoverContext.Provider>\n)\n\n/**\n * The usePopoverContext hook is used to access the state of the popover.\n */\nexport const usePopoverContext = (): PopoverContextProps =>\n useContext(PopoverContext)\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledArrow } from './arrow.styled'\nimport type { StyledArrowProps } from './arrow.styled'\nimport { usePopoverContext } from '../use-popover-context'\n\nexport interface ArrowProps extends StyledArrowProps {}\n\nexport const Arrow = React.forwardRef<\n ElementRef<typeof StyledArrow>,\n ArrowProps\n>((props, forwardRef) => {\n const { variant } = usePopoverContext()\n return (\n <StyledArrow {...props} variant={variant} aria-hidden ref={forwardRef} />\n )\n})\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useSize } from '@radix-ui/react-use-size'\n\nimport { StyledContent } from './content.styled'\nimport { Line } from './line'\nimport { Arrow } from './arrow'\nimport { usePopoverContext } from '../use-popover-context'\nimport type { StyledContentProps } from './content.styled'\nimport type {\n Align,\n Side,\n AnchorType,\n PointerDownOutsideEvent,\n FocusOutsideEvent,\n} from '../types'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with window edges.\n */\n avoidCollisions?: boolean\n\n /**\n * The preferred alignment against the trigger. May change when collisions occur.\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment option.\n */\n alignOffset?: number\n\n /**\n * The distance in pixels from the trigger's edge to the popover's anchor. Works only with the \"arrow\" or \"none\"\n * anchor.\n */\n sideOffset?: number\n\n /**\n * The preferred side of the trigger to render against when open.\n * Will be reversed when collisions occur and avoidCollisions is enabled.\n */\n side?: Side\n\n /**\n * The distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides).\n */\n collisionPadding?: number\n\n /**\n * The type of anchor to render.\n */\n anchor?: AnchorType\n\n /**\n * Whether to render in a Portal when open.\n */\n portalled?: boolean\n\n /**\n * Used to force mounting when more control is needed. Useful when controlling\n * animation with React animation libraries.\n */\n forceMount?: true\n\n /**\n * The element used as the collision boundary. By default this is the\n * viewport, though you can provide additional element(s) to be included in\n * this check.\n */\n collisionBoundary?: Element | null\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in\n * the boundary as long as the trigger is at least partially in the boundary\n * whilst \"always\" will keep the content in the boundary regardless.\n */\n sticky?: 'partial' | 'always'\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n */\n hideWhenDetached?: boolean\n\n /**\n * Event handler called when a pointer event occurs outside the bounds of the\n * component. It can be prevented by calling event.preventDefault.\n */\n onPointerDownOutside?: (event: PointerDownOutsideEvent) => void\n\n /**\n * Event handler called when focus moves outside the bounds of the component.\n * It can be prevented by calling event.preventDefault.\n */\n onFocusOutside?: (event: FocusOutsideEvent) => void\n\n /**\n * Event handler called when the escape key is down. It can be prevented by\n * calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\n\n /**\n * Event handler called when an interaction (pointer or focus event) happens\n * outside the bounds of the component. It can be prevented by calling\n * event.preventDefault.\n */\n onInteractOutside?: (\n event: PointerDownOutsideEvent | FocusOutsideEvent\n ) => void\n\n /**\n * Event handler called when focus moves into the component after opening.\n * It can be prevented by calling event.preventDefault().\n */\n onOpenAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing.\n * It can be prevented by calling event.preventDefault().\n */\n onCloseAutoFocus?: (event: Event) => void\n}\n\n/**\n * The content component is used to render rich content elements for the popover.\n */\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n align = 'center',\n alignOffset = 0,\n sideOffset = 0,\n avoidCollisions = true,\n collisionPadding = 0,\n side = 'top',\n children,\n anchor = 'line',\n sticky = 'partial',\n hideWhenDetached = false,\n ...restProps\n },\n forwardRef\n ) => {\n const [line, setLine] = React.useState<HTMLElement | null>(null)\n const lineSize = useSize(line)\n const { variant } = usePopoverContext()\n\n const anchorEl = React.useMemo(() => {\n switch (anchor) {\n case 'arrow':\n return <Arrow />\n case 'line':\n return <Line ref={setLine} />\n default:\n return null\n }\n }, [anchor, setLine])\n\n return (\n <StyledContent\n {...restProps}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n side={side}\n sideOffset={anchor === 'line' ? lineSize?.height : sideOffset}\n ref={forwardRef}\n role='dialog'\n aria-modal='true'\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\n variant={variant}\n >\n {children}\n {anchorEl}\n </StyledContent>\n )\n }\n)\n","import { Close as RadixClose } from '@radix-ui/react-popover'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledClose = styled(RadixClose, {\n all: 'unset',\n fontFamily: 'inherit',\n height: '$6',\n width: '$6',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: '$white',\n position: 'absolute',\n top: '5px',\n right: '5px',\n borderRadius: '$50',\n cursor: 'pointer',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.12)',\n },\n '&:focus-visible': {\n boxShadow: '$focus-controls',\n },\n\n variants: {\n variant: {\n light: {\n color: '$black',\n },\n dark: {\n '&:focus-visible': {\n boxShadow:\n '0 0 0 1px #0F0F0F, 0 0 0 3px #6881FF, 0 0 0 5px #4961f699',\n },\n },\n },\n },\n})\n\nexport type StyledCloseProps = StrictComponentProps<typeof StyledClose>\n","import React from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport type { ElementRef } from 'react'\n\nimport { StyledClose } from './close.styled'\nimport { usePopoverContext } from '../use-popover-context'\nimport type { StyledCloseProps } from './close.styled'\n\nexport interface CloseProps extends StyledCloseProps {}\n\nexport const Close = React.forwardRef<\n ElementRef<typeof StyledClose>,\n CloseProps\n>((props, forwardRef) => {\n const { variant } = usePopoverContext()\n\n return (\n <StyledClose\n {...props}\n ref={forwardRef}\n data-testid='close-icon'\n variant={variant}\n >\n <IconCross size='small' />\n </StyledClose>\n )\n})\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Used to force mounting when more control is needed. Useful when\n * controlling animation with React animation libraries. If used on this part,\n * it will be inherited by Popover.Content.\n */\n forceMount?: true\n\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React from 'react'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Close } from './partials/close'\nimport { Portal } from './partials/portal'\nimport { PopoverProvider } from './use-popover-context'\nimport type { Variant } from './types'\n\nexport interface PopoverProps {\n /**\n * The current controlled state of the popover.\n */\n open?: boolean\n\n /**\n * The initial open state of the popover. Use when you don't need to control its open state.\n */\n defaultOpen?: boolean\n\n /**\n * Event handler called when the popover opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the popover closes.\n */\n onClose?: () => void\n\n /**\n * Defines whether the interaction with outside elements will be enabled.\n */\n interactOutside?: boolean\n\n /**\n * Change the popover's appearance\n */\n variant?: Variant\n\n /**\n * The content\n */\n children: React.ReactNode\n}\n\nconst Root: React.FC<PopoverProps> = ({ onOpen, onClose, ...restProps }) => (\n <RadixPopover.Root\n {...restProps}\n onOpenChange={value => {\n if (value) {\n onOpen?.()\n } else {\n onClose?.()\n }\n }}\n modal={false}\n />\n)\n\nexport const Popover: React.FC<PopoverProps> & Partials = ({\n open,\n defaultOpen = false,\n onOpen,\n onClose,\n variant = 'dark',\n ...restProps\n}) => (\n <PopoverProvider variant={variant}>\n <Root\n {...restProps}\n open={open}\n defaultOpen={defaultOpen}\n onOpen={onOpen}\n onClose={onClose}\n />\n </PopoverProvider>\n)\n\n// Partials\n// -----------------------------------------------------------------------------\ninterface Partials {\n Trigger: typeof Trigger\n Content: typeof Content\n Close: typeof Close\n Portal: typeof Portal\n}\n\nPopover.Trigger = Trigger\nPopover.Content = Content\nPopover.Close = Close\nPopover.Portal = Portal\n"],"names":["RadixTrigger","RadixContent","RadixArrow","RadixClose","RadixPortal"],"mappings":";;;;;;;;;;AAIa,MAAA,aAAA,GAAgB,OAAOA,SAAY,CAAA;;ACOzC,MAAM,OAAU,GAAA,KAAA,CAAM,UAG3B,CAAA,CAAC,KAAO,EAAA,UAAA,qBAAgB,GAAA,CAAA,aAAA,EAAA,EAAe,GAAG,KAAA,EAAO,GAAK,EAAA,UAAA,EAAY,CAAE,CAAA;;ACTzD,MAAA,aAAA,GAAgB,OAAOC,SAAc,EAAA;AAAA,EAChD,eAAiB,EAAA,QAAA;AAAA,EACjB,YAAc,EAAA,KAAA;AAAA,EACd,KAAO,EAAA,QAAA;AAAA,EACP,OAAS,EAAA,MAAA;AAAA,EACT,SAAW,EAAA,4BAAA;AAAA,EACX,QAAU,EAAA,MAAA;AAAA,EACV,UAAY,EAAA,MAAA;AAAA,EACZ,gDAAkD,EAAA;AAAA,IAChD,iBAAmB,EAAA,OAAA;AAAA,IACnB,uBAAyB,EAAA,MAAA;AAAA,IACzB,UAAY,EAAA,SAAA;AAAA,IACZ,sBAAwB,EAAA;AAAA,MACtB,eAAe,UAAW,CAAA,MAAA;AAAA,KAC5B;AAAA,IACA,wBAA0B,EAAA;AAAA,MACxB,eAAe,UAAW,CAAA,OAAA;AAAA,KAC5B;AAAA,GACF;AAAA,EACA,QAAU,EAAA;AAAA,IACR,OAAS,EAAA;AAAA,MACP,KAAO,EAAA;AAAA,QACL,UAAY,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AAQ,OAAS,EAAA,GAAG,WAC1D,qBAAA,GAAA;AAAA,EAAC,YAAa,CAAA,IAAA;AAAA,EAAb;AAAA,IACE,GAAG,SAAA;AAAA,IACJ,cAAc,CAAS,KAAA,KAAA;AACrB,MAAA,IAAI,KAAO,EAAA;AACT,QAAA,MAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,MAAA,EAAA,CAAA;AAAA,OACK,MAAA;AACL,QAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,EAAA,CAAA;AAAA,OACF;AAAA,KACF;AAAA,IACA,KAAO,EAAA,KAAA;AAAA,GAAA;AACT,CAAA,CAAA;AAGK,MAAM,UAA6C,CAAC;AAAA,EACzD,IAAA;AAAA,EACA,WAAc,GAAA,KAAA;AAAA,EACd,MAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAU,GAAA,MAAA;AAAA,EACV,GAAG,SAAA;AACL,CACE,qBAAA,GAAA,CAAC,mBAAgB,OACf,EAAA,QAAA,kBAAA,GAAA;AAAA,EAAC,IAAA;AAAA,EAAA;AAAA,IACE,GAAG,SAAA;AAAA,IACJ,IAAA;AAAA,IACA,WAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,GAAA;AACF,CACF,EAAA,EAAA;AAYF,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,OAAU,GAAA,OAAA,CAAA;AAClB,OAAA,CAAQ,KAAQ,GAAA,KAAA,CAAA;AAChB,OAAA,CAAQ,MAAS,GAAA,MAAA;;;;;;;;"}
package/dist/types.d.ts CHANGED
@@ -16,6 +16,7 @@ declare const StyledTrigger: react.ForwardRefExoticComponent<Omit<Omit<{}, never
16
16
  readonly lg: "4px";
17
17
  };
18
18
  colors: {
19
+ readonly black: any;
19
20
  readonly 'blue-100': any;
20
21
  readonly 'blue-200': any;
21
22
  readonly 'blue-300': any;
@@ -35,6 +36,15 @@ declare const StyledTrigger: react.ForwardRefExoticComponent<Omit<Omit<{}, never
35
36
  readonly 'gray-700': any;
36
37
  readonly 'gray-800': any;
37
38
  readonly 'gray-900': any;
39
+ readonly 'green-100': any;
40
+ readonly 'green-200': any;
41
+ readonly 'green-300': any;
42
+ readonly 'green-400': any;
43
+ readonly 'green-500': any;
44
+ readonly 'green-600': any;
45
+ readonly 'green-700': any;
46
+ readonly 'green-800': any;
47
+ readonly 'green-900': any;
38
48
  readonly 'indigo-100': any;
39
49
  readonly 'indigo-200': any;
40
50
  readonly 'indigo-300': any;
@@ -53,6 +63,8 @@ declare const StyledTrigger: react.ForwardRefExoticComponent<Omit<Omit<{}, never
53
63
  readonly 'red-700': any;
54
64
  readonly 'red-800': any;
55
65
  readonly 'red-900': any;
66
+ readonly transparent: any;
67
+ readonly white: any;
56
68
  readonly 'yellow-100': any;
57
69
  readonly 'yellow-200': any;
58
70
  readonly 'yellow-300': any;
@@ -62,113 +74,112 @@ declare const StyledTrigger: react.ForwardRefExoticComponent<Omit<Omit<{}, never
62
74
  readonly 'yellow-700': any;
63
75
  readonly 'yellow-800': any;
64
76
  readonly 'yellow-900': any;
65
- readonly 'green-100': any;
66
- readonly 'green-200': any;
67
- readonly 'green-300': any;
68
- readonly 'green-400': any;
69
- readonly 'green-500': any;
70
- readonly 'green-600': any;
71
- readonly 'green-700': any;
72
- readonly 'green-800': any;
73
- readonly 'green-900': any;
74
- readonly black: any;
75
- readonly white: any;
76
- readonly transparent: any;
77
- readonly 'background-danger'?: any;
78
- readonly 'background-danger-hover'?: any;
79
- readonly 'background-danger-prominent'?: any;
80
- readonly 'background-danger-prominent-active'?: any;
81
- readonly 'background-danger-prominent-hover'?: any;
82
- readonly 'background-neutrals'?: any;
83
- readonly 'background-neutrals-container'?: any;
84
- readonly 'background-neutrals-controls-disabled'?: any;
85
- readonly 'background-neutrals-disabled'?: any;
86
- readonly 'background-neutrals-inactive'?: any;
87
- readonly 'background-neutrals-inactive-hover'?: any;
88
- readonly 'background-neutrals-inverted'?: any;
89
- readonly 'background-neutrals-inverted-subtle'?: any;
90
- readonly 'background-neutrals-page'?: any;
91
- readonly 'background-neutrals-page-subtle'?: any;
92
- readonly 'background-neutrals-scrolls'?: any;
93
- readonly 'background-neutrals-scrolls-hover'?: any;
94
- readonly 'background-neutrals-subtle'?: any;
95
- readonly 'background-neutrals-subtle-active'?: any;
96
- readonly 'background-neutrals-subtle-hover'?: any;
97
- readonly 'background-primary-prominent'?: any;
98
- readonly 'background-primary-prominent-active'?: any;
99
- readonly 'background-primary-prominent-hover'?: any;
100
- readonly 'background-primary-prominent-selected'?: any;
101
- readonly 'background-primary-subtle'?: any;
102
- readonly 'background-primary-subtle-active'?: any;
103
- readonly 'background-primary-subtle-hover'?: any;
104
- readonly 'background-primary-subtle-selected'?: any;
105
- readonly 'background-success'?: any;
106
- readonly 'background-warning-prominent'?: any;
107
- readonly 'background-warning-subtle'?: any;
108
- readonly 'text-danger'?: any;
109
- readonly 'text-danger-active'?: any;
110
- readonly 'text-danger-hover'?: any;
111
- readonly 'text-danger-inverted'?: any;
112
- readonly 'text-neutrals'?: any;
113
- readonly 'text-neutrals-disabled'?: any;
114
- readonly 'text-neutrals-inverted'?: any;
115
- readonly 'text-neutrals-placeholder'?: any;
116
- readonly 'text-neutrals-placeholder-only'?: any;
117
- readonly 'text-neutrals-subtle'?: any;
118
- readonly 'text-neutrals-subtle-active'?: any;
119
- readonly 'text-neutrals-subtle-hover'?: any;
120
- readonly 'text-primary'?: any;
121
- readonly 'text-primary-active'?: any;
122
- readonly 'text-primary-hover'?: any;
123
- readonly 'text-primary-inverted'?: any;
124
- readonly 'text-primary-inverted-subtle'?: any;
125
- readonly 'text-primary-selected'?: any;
126
- readonly 'text-success'?: any;
127
- readonly 'text-warning'?: any;
128
- readonly 'icon-danger'?: any;
129
- readonly 'icon-danger-active'?: any;
130
- readonly 'icon-danger-hover'?: any;
131
- readonly 'icon-danger-inverted'?: any;
132
- readonly 'icon-neutrals'?: any;
133
- readonly 'icon-neutrals-disabled'?: any;
134
- readonly 'icon-neutrals-inactive'?: any;
135
- readonly 'icon-neutrals-inactive-hover'?: any;
136
- readonly 'icon-neutrals-inverted'?: any;
137
- readonly 'icon-neutrals-search'?: any;
138
- readonly 'icon-neutrals-subtle'?: any;
139
- readonly 'icon-neutrals-text'?: any;
140
- readonly 'icon-primary'?: any;
141
- readonly 'icon-primary-active'?: any;
142
- readonly 'icon-primary-hover'?: any;
143
- readonly 'icon-primary-inverted'?: any;
144
- readonly 'icon-primary-selected'?: any;
145
- readonly 'icon-success'?: any;
146
- readonly 'icon-success-inverted'?: any;
147
- readonly 'icon-warning'?: any;
148
- readonly 'icon-warning-prominent'?: any;
149
- readonly 'border-danger'?: any;
150
- readonly 'border-danger-active'?: any;
151
- readonly 'border-danger-hover'?: any;
152
- readonly 'border-focus-inner'?: any;
153
- readonly 'border-focus-middle'?: any;
154
- readonly 'border-focus-outer'?: any;
155
- readonly 'border-neutrals'?: any;
156
- readonly 'border-neutrals-active'?: any;
157
- readonly 'border-neutrals-controls'?: any;
158
- readonly 'border-neutrals-controls-disabled'?: any;
159
- readonly 'border-neutrals-disabled'?: any;
160
- readonly 'border-neutrals-hover'?: any;
161
- readonly 'border-neutrals-inverted'?: any;
162
- readonly 'border-neutrals-subtle'?: any;
163
- readonly 'border-neutrals-text-subtle'?: any;
164
- readonly 'border-neutrals-text-subtle-active'?: any;
165
- readonly 'border-neutrals-text-subtle-hover'?: any;
166
- readonly 'border-primary'?: any;
167
- readonly 'border-primary-active'?: any;
168
- readonly 'border-primary-hover'?: any;
169
- readonly 'border-primary-inverted'?: any;
170
- readonly 'border-success'?: any;
171
- readonly 'border-warning'?: any;
77
+ "background-alpha-active"?: any;
78
+ "background-alpha-hover"?: any;
79
+ "background-danger-prominent"?: any;
80
+ "background-danger-prominent-active"?: any;
81
+ "background-danger-prominent-hover"?: any;
82
+ "background-danger-subtle"?: any;
83
+ "background-danger-subtle-active"?: any;
84
+ "background-danger-subtle-hover"?: any;
85
+ "background-neutrals"?: any;
86
+ "background-neutrals-active"?: any;
87
+ "background-neutrals-container"?: any;
88
+ "background-neutrals-controls-disabled"?: any;
89
+ "background-neutrals-disabled"?: any;
90
+ "background-neutrals-hover"?: any;
91
+ "background-neutrals-inactive"?: any;
92
+ "background-neutrals-inactive-hover"?: any;
93
+ "background-neutrals-inverted"?: any;
94
+ "background-neutrals-inverted-subtle"?: any;
95
+ "background-neutrals-page"?: any;
96
+ "background-neutrals-page-subtle"?: any;
97
+ "background-neutrals-scrolls"?: any;
98
+ "background-neutrals-scrolls-hover"?: any;
99
+ "background-neutrals-subtle"?: any;
100
+ "background-neutrals-subtle-active"?: any;
101
+ "background-neutrals-subtle-hover"?: any;
102
+ "background-primary-prominent"?: any;
103
+ "background-primary-prominent-active"?: any;
104
+ "background-primary-prominent-hover"?: any;
105
+ "background-primary-prominent-selected"?: any;
106
+ "background-primary-subtle"?: any;
107
+ "background-primary-subtle-active"?: any;
108
+ "background-primary-subtle-hover"?: any;
109
+ "background-primary-subtle-selected"?: any;
110
+ "background-success"?: any;
111
+ "background-warning-prominent"?: any;
112
+ "background-warning-subtle"?: any;
113
+ "border-danger"?: any;
114
+ "border-danger-active"?: any;
115
+ "border-danger-hover"?: any;
116
+ "border-focus-inner"?: any;
117
+ "border-focus-middle"?: any;
118
+ "border-focus-outer"?: any;
119
+ "border-neutrals"?: any;
120
+ "border-neutrals-active"?: any;
121
+ "border-neutrals-controls"?: any;
122
+ "border-neutrals-controls-disabled"?: any;
123
+ "border-neutrals-disabled"?: any;
124
+ "border-neutrals-hover"?: any;
125
+ "border-neutrals-inverted"?: any;
126
+ "border-neutrals-subtle"?: any;
127
+ "border-neutrals-text"?: any;
128
+ "border-neutrals-text-active"?: any;
129
+ "border-neutrals-text-hover"?: any;
130
+ "border-neutrals-text-subtle"?: any;
131
+ "border-neutrals-text-subtle-active"?: any;
132
+ "border-neutrals-text-subtle-hover"?: any;
133
+ "border-neutrals-transparent"?: any;
134
+ "border-primary"?: any;
135
+ "border-primary-active"?: any;
136
+ "border-primary-hover"?: any;
137
+ "border-primary-inverted"?: any;
138
+ "border-success"?: any;
139
+ "border-warning"?: any;
140
+ "icon-danger"?: any;
141
+ "icon-danger-active"?: any;
142
+ "icon-danger-hover"?: any;
143
+ "icon-danger-inverted"?: any;
144
+ "icon-neutrals"?: any;
145
+ "icon-neutrals-disabled"?: any;
146
+ "icon-neutrals-inactive"?: any;
147
+ "icon-neutrals-inactive-hover"?: any;
148
+ "icon-neutrals-inverted"?: any;
149
+ "icon-neutrals-search"?: any;
150
+ "icon-neutrals-subtle"?: any;
151
+ "icon-neutrals-text"?: any;
152
+ "icon-primary"?: any;
153
+ "icon-primary-active"?: any;
154
+ "icon-primary-hover"?: any;
155
+ "icon-primary-inverted"?: any;
156
+ "icon-primary-selected"?: any;
157
+ "icon-success"?: any;
158
+ "icon-success-inverted"?: any;
159
+ "icon-warning"?: any;
160
+ "icon-warning-prominent"?: any;
161
+ "text-danger"?: any;
162
+ "text-danger-active"?: any;
163
+ "text-danger-hover"?: any;
164
+ "text-danger-inverted"?: any;
165
+ "text-neutrals"?: any;
166
+ "text-neutrals-active"?: any;
167
+ "text-neutrals-disabled"?: any;
168
+ "text-neutrals-hover"?: any;
169
+ "text-neutrals-inverted"?: any;
170
+ "text-neutrals-placeholder"?: any;
171
+ "text-neutrals-placeholder-only"?: any;
172
+ "text-neutrals-subtle"?: any;
173
+ "text-neutrals-subtle-active"?: any;
174
+ "text-neutrals-subtle-hover"?: any;
175
+ "text-primary"?: any;
176
+ "text-primary-active"?: any;
177
+ "text-primary-hover"?: any;
178
+ "text-primary-inverted"?: any;
179
+ "text-primary-inverted-subtle"?: any;
180
+ "text-primary-selected"?: any;
181
+ "text-success"?: any;
182
+ "text-warning"?: any;
172
183
  };
173
184
  'font-sizes': {
174
185
  readonly 150: "0.75rem";
@@ -477,6 +488,7 @@ declare const StyledContent: react.ForwardRefExoticComponent<Omit<Omit<{
477
488
  readonly lg: "4px";
478
489
  };
479
490
  colors: {
491
+ readonly black: any;
480
492
  readonly 'blue-100': any;
481
493
  readonly 'blue-200': any;
482
494
  readonly 'blue-300': any;
@@ -496,6 +508,15 @@ declare const StyledContent: react.ForwardRefExoticComponent<Omit<Omit<{
496
508
  readonly 'gray-700': any;
497
509
  readonly 'gray-800': any;
498
510
  readonly 'gray-900': any;
511
+ readonly 'green-100': any;
512
+ readonly 'green-200': any;
513
+ readonly 'green-300': any;
514
+ readonly 'green-400': any;
515
+ readonly 'green-500': any;
516
+ readonly 'green-600': any;
517
+ readonly 'green-700': any;
518
+ readonly 'green-800': any;
519
+ readonly 'green-900': any;
499
520
  readonly 'indigo-100': any;
500
521
  readonly 'indigo-200': any;
501
522
  readonly 'indigo-300': any;
@@ -514,6 +535,8 @@ declare const StyledContent: react.ForwardRefExoticComponent<Omit<Omit<{
514
535
  readonly 'red-700': any;
515
536
  readonly 'red-800': any;
516
537
  readonly 'red-900': any;
538
+ readonly transparent: any;
539
+ readonly white: any;
517
540
  readonly 'yellow-100': any;
518
541
  readonly 'yellow-200': any;
519
542
  readonly 'yellow-300': any;
@@ -523,113 +546,112 @@ declare const StyledContent: react.ForwardRefExoticComponent<Omit<Omit<{
523
546
  readonly 'yellow-700': any;
524
547
  readonly 'yellow-800': any;
525
548
  readonly 'yellow-900': any;
526
- readonly 'green-100': any;
527
- readonly 'green-200': any;
528
- readonly 'green-300': any;
529
- readonly 'green-400': any;
530
- readonly 'green-500': any;
531
- readonly 'green-600': any;
532
- readonly 'green-700': any;
533
- readonly 'green-800': any;
534
- readonly 'green-900': any;
535
- readonly black: any;
536
- readonly white: any;
537
- readonly transparent: any;
538
- readonly 'background-danger'?: any;
539
- readonly 'background-danger-hover'?: any;
540
- readonly 'background-danger-prominent'?: any;
541
- readonly 'background-danger-prominent-active'?: any;
542
- readonly 'background-danger-prominent-hover'?: any;
543
- readonly 'background-neutrals'?: any;
544
- readonly 'background-neutrals-container'?: any;
545
- readonly 'background-neutrals-controls-disabled'?: any;
546
- readonly 'background-neutrals-disabled'?: any;
547
- readonly 'background-neutrals-inactive'?: any;
548
- readonly 'background-neutrals-inactive-hover'?: any;
549
- readonly 'background-neutrals-inverted'?: any;
550
- readonly 'background-neutrals-inverted-subtle'?: any;
551
- readonly 'background-neutrals-page'?: any;
552
- readonly 'background-neutrals-page-subtle'?: any;
553
- readonly 'background-neutrals-scrolls'?: any;
554
- readonly 'background-neutrals-scrolls-hover'?: any;
555
- readonly 'background-neutrals-subtle'?: any;
556
- readonly 'background-neutrals-subtle-active'?: any;
557
- readonly 'background-neutrals-subtle-hover'?: any;
558
- readonly 'background-primary-prominent'?: any;
559
- readonly 'background-primary-prominent-active'?: any;
560
- readonly 'background-primary-prominent-hover'?: any;
561
- readonly 'background-primary-prominent-selected'?: any;
562
- readonly 'background-primary-subtle'?: any;
563
- readonly 'background-primary-subtle-active'?: any;
564
- readonly 'background-primary-subtle-hover'?: any;
565
- readonly 'background-primary-subtle-selected'?: any;
566
- readonly 'background-success'?: any;
567
- readonly 'background-warning-prominent'?: any;
568
- readonly 'background-warning-subtle'?: any;
569
- readonly 'text-danger'?: any;
570
- readonly 'text-danger-active'?: any;
571
- readonly 'text-danger-hover'?: any;
572
- readonly 'text-danger-inverted'?: any;
573
- readonly 'text-neutrals'?: any;
574
- readonly 'text-neutrals-disabled'?: any;
575
- readonly 'text-neutrals-inverted'?: any;
576
- readonly 'text-neutrals-placeholder'?: any;
577
- readonly 'text-neutrals-placeholder-only'?: any;
578
- readonly 'text-neutrals-subtle'?: any;
579
- readonly 'text-neutrals-subtle-active'?: any;
580
- readonly 'text-neutrals-subtle-hover'?: any;
581
- readonly 'text-primary'?: any;
582
- readonly 'text-primary-active'?: any;
583
- readonly 'text-primary-hover'?: any;
584
- readonly 'text-primary-inverted'?: any;
585
- readonly 'text-primary-inverted-subtle'?: any;
586
- readonly 'text-primary-selected'?: any;
587
- readonly 'text-success'?: any;
588
- readonly 'text-warning'?: any;
589
- readonly 'icon-danger'?: any;
590
- readonly 'icon-danger-active'?: any;
591
- readonly 'icon-danger-hover'?: any;
592
- readonly 'icon-danger-inverted'?: any;
593
- readonly 'icon-neutrals'?: any;
594
- readonly 'icon-neutrals-disabled'?: any;
595
- readonly 'icon-neutrals-inactive'?: any;
596
- readonly 'icon-neutrals-inactive-hover'?: any;
597
- readonly 'icon-neutrals-inverted'?: any;
598
- readonly 'icon-neutrals-search'?: any;
599
- readonly 'icon-neutrals-subtle'?: any;
600
- readonly 'icon-neutrals-text'?: any;
601
- readonly 'icon-primary'?: any;
602
- readonly 'icon-primary-active'?: any;
603
- readonly 'icon-primary-hover'?: any;
604
- readonly 'icon-primary-inverted'?: any;
605
- readonly 'icon-primary-selected'?: any;
606
- readonly 'icon-success'?: any;
607
- readonly 'icon-success-inverted'?: any;
608
- readonly 'icon-warning'?: any;
609
- readonly 'icon-warning-prominent'?: any;
610
- readonly 'border-danger'?: any;
611
- readonly 'border-danger-active'?: any;
612
- readonly 'border-danger-hover'?: any;
613
- readonly 'border-focus-inner'?: any;
614
- readonly 'border-focus-middle'?: any;
615
- readonly 'border-focus-outer'?: any;
616
- readonly 'border-neutrals'?: any;
617
- readonly 'border-neutrals-active'?: any;
618
- readonly 'border-neutrals-controls'?: any;
619
- readonly 'border-neutrals-controls-disabled'?: any;
620
- readonly 'border-neutrals-disabled'?: any;
621
- readonly 'border-neutrals-hover'?: any;
622
- readonly 'border-neutrals-inverted'?: any;
623
- readonly 'border-neutrals-subtle'?: any;
624
- readonly 'border-neutrals-text-subtle'?: any;
625
- readonly 'border-neutrals-text-subtle-active'?: any;
626
- readonly 'border-neutrals-text-subtle-hover'?: any;
627
- readonly 'border-primary'?: any;
628
- readonly 'border-primary-active'?: any;
629
- readonly 'border-primary-hover'?: any;
630
- readonly 'border-primary-inverted'?: any;
631
- readonly 'border-success'?: any;
632
- readonly 'border-warning'?: any;
549
+ "background-alpha-active"?: any;
550
+ "background-alpha-hover"?: any;
551
+ "background-danger-prominent"?: any;
552
+ "background-danger-prominent-active"?: any;
553
+ "background-danger-prominent-hover"?: any;
554
+ "background-danger-subtle"?: any;
555
+ "background-danger-subtle-active"?: any;
556
+ "background-danger-subtle-hover"?: any;
557
+ "background-neutrals"?: any;
558
+ "background-neutrals-active"?: any;
559
+ "background-neutrals-container"?: any;
560
+ "background-neutrals-controls-disabled"?: any;
561
+ "background-neutrals-disabled"?: any;
562
+ "background-neutrals-hover"?: any;
563
+ "background-neutrals-inactive"?: any;
564
+ "background-neutrals-inactive-hover"?: any;
565
+ "background-neutrals-inverted"?: any;
566
+ "background-neutrals-inverted-subtle"?: any;
567
+ "background-neutrals-page"?: any;
568
+ "background-neutrals-page-subtle"?: any;
569
+ "background-neutrals-scrolls"?: any;
570
+ "background-neutrals-scrolls-hover"?: any;
571
+ "background-neutrals-subtle"?: any;
572
+ "background-neutrals-subtle-active"?: any;
573
+ "background-neutrals-subtle-hover"?: any;
574
+ "background-primary-prominent"?: any;
575
+ "background-primary-prominent-active"?: any;
576
+ "background-primary-prominent-hover"?: any;
577
+ "background-primary-prominent-selected"?: any;
578
+ "background-primary-subtle"?: any;
579
+ "background-primary-subtle-active"?: any;
580
+ "background-primary-subtle-hover"?: any;
581
+ "background-primary-subtle-selected"?: any;
582
+ "background-success"?: any;
583
+ "background-warning-prominent"?: any;
584
+ "background-warning-subtle"?: any;
585
+ "border-danger"?: any;
586
+ "border-danger-active"?: any;
587
+ "border-danger-hover"?: any;
588
+ "border-focus-inner"?: any;
589
+ "border-focus-middle"?: any;
590
+ "border-focus-outer"?: any;
591
+ "border-neutrals"?: any;
592
+ "border-neutrals-active"?: any;
593
+ "border-neutrals-controls"?: any;
594
+ "border-neutrals-controls-disabled"?: any;
595
+ "border-neutrals-disabled"?: any;
596
+ "border-neutrals-hover"?: any;
597
+ "border-neutrals-inverted"?: any;
598
+ "border-neutrals-subtle"?: any;
599
+ "border-neutrals-text"?: any;
600
+ "border-neutrals-text-active"?: any;
601
+ "border-neutrals-text-hover"?: any;
602
+ "border-neutrals-text-subtle"?: any;
603
+ "border-neutrals-text-subtle-active"?: any;
604
+ "border-neutrals-text-subtle-hover"?: any;
605
+ "border-neutrals-transparent"?: any;
606
+ "border-primary"?: any;
607
+ "border-primary-active"?: any;
608
+ "border-primary-hover"?: any;
609
+ "border-primary-inverted"?: any;
610
+ "border-success"?: any;
611
+ "border-warning"?: any;
612
+ "icon-danger"?: any;
613
+ "icon-danger-active"?: any;
614
+ "icon-danger-hover"?: any;
615
+ "icon-danger-inverted"?: any;
616
+ "icon-neutrals"?: any;
617
+ "icon-neutrals-disabled"?: any;
618
+ "icon-neutrals-inactive"?: any;
619
+ "icon-neutrals-inactive-hover"?: any;
620
+ "icon-neutrals-inverted"?: any;
621
+ "icon-neutrals-search"?: any;
622
+ "icon-neutrals-subtle"?: any;
623
+ "icon-neutrals-text"?: any;
624
+ "icon-primary"?: any;
625
+ "icon-primary-active"?: any;
626
+ "icon-primary-hover"?: any;
627
+ "icon-primary-inverted"?: any;
628
+ "icon-primary-selected"?: any;
629
+ "icon-success"?: any;
630
+ "icon-success-inverted"?: any;
631
+ "icon-warning"?: any;
632
+ "icon-warning-prominent"?: any;
633
+ "text-danger"?: any;
634
+ "text-danger-active"?: any;
635
+ "text-danger-hover"?: any;
636
+ "text-danger-inverted"?: any;
637
+ "text-neutrals"?: any;
638
+ "text-neutrals-active"?: any;
639
+ "text-neutrals-disabled"?: any;
640
+ "text-neutrals-hover"?: any;
641
+ "text-neutrals-inverted"?: any;
642
+ "text-neutrals-placeholder"?: any;
643
+ "text-neutrals-placeholder-only"?: any;
644
+ "text-neutrals-subtle"?: any;
645
+ "text-neutrals-subtle-active"?: any;
646
+ "text-neutrals-subtle-hover"?: any;
647
+ "text-primary"?: any;
648
+ "text-primary-active"?: any;
649
+ "text-primary-hover"?: any;
650
+ "text-primary-inverted"?: any;
651
+ "text-primary-inverted-subtle"?: any;
652
+ "text-primary-selected"?: any;
653
+ "text-success"?: any;
654
+ "text-warning"?: any;
633
655
  };
634
656
  'font-sizes': {
635
657
  readonly 150: "0.75rem";
@@ -1056,6 +1078,7 @@ declare const StyledClose: react.ForwardRefExoticComponent<Omit<Omit<{
1056
1078
  readonly lg: "4px";
1057
1079
  };
1058
1080
  colors: {
1081
+ readonly black: any;
1059
1082
  readonly 'blue-100': any;
1060
1083
  readonly 'blue-200': any;
1061
1084
  readonly 'blue-300': any;
@@ -1075,6 +1098,15 @@ declare const StyledClose: react.ForwardRefExoticComponent<Omit<Omit<{
1075
1098
  readonly 'gray-700': any;
1076
1099
  readonly 'gray-800': any;
1077
1100
  readonly 'gray-900': any;
1101
+ readonly 'green-100': any;
1102
+ readonly 'green-200': any;
1103
+ readonly 'green-300': any;
1104
+ readonly 'green-400': any;
1105
+ readonly 'green-500': any;
1106
+ readonly 'green-600': any;
1107
+ readonly 'green-700': any;
1108
+ readonly 'green-800': any;
1109
+ readonly 'green-900': any;
1078
1110
  readonly 'indigo-100': any;
1079
1111
  readonly 'indigo-200': any;
1080
1112
  readonly 'indigo-300': any;
@@ -1093,6 +1125,8 @@ declare const StyledClose: react.ForwardRefExoticComponent<Omit<Omit<{
1093
1125
  readonly 'red-700': any;
1094
1126
  readonly 'red-800': any;
1095
1127
  readonly 'red-900': any;
1128
+ readonly transparent: any;
1129
+ readonly white: any;
1096
1130
  readonly 'yellow-100': any;
1097
1131
  readonly 'yellow-200': any;
1098
1132
  readonly 'yellow-300': any;
@@ -1102,113 +1136,112 @@ declare const StyledClose: react.ForwardRefExoticComponent<Omit<Omit<{
1102
1136
  readonly 'yellow-700': any;
1103
1137
  readonly 'yellow-800': any;
1104
1138
  readonly 'yellow-900': any;
1105
- readonly 'green-100': any;
1106
- readonly 'green-200': any;
1107
- readonly 'green-300': any;
1108
- readonly 'green-400': any;
1109
- readonly 'green-500': any;
1110
- readonly 'green-600': any;
1111
- readonly 'green-700': any;
1112
- readonly 'green-800': any;
1113
- readonly 'green-900': any;
1114
- readonly black: any;
1115
- readonly white: any;
1116
- readonly transparent: any;
1117
- readonly 'background-danger'?: any;
1118
- readonly 'background-danger-hover'?: any;
1119
- readonly 'background-danger-prominent'?: any;
1120
- readonly 'background-danger-prominent-active'?: any;
1121
- readonly 'background-danger-prominent-hover'?: any;
1122
- readonly 'background-neutrals'?: any;
1123
- readonly 'background-neutrals-container'?: any;
1124
- readonly 'background-neutrals-controls-disabled'?: any;
1125
- readonly 'background-neutrals-disabled'?: any;
1126
- readonly 'background-neutrals-inactive'?: any;
1127
- readonly 'background-neutrals-inactive-hover'?: any;
1128
- readonly 'background-neutrals-inverted'?: any;
1129
- readonly 'background-neutrals-inverted-subtle'?: any;
1130
- readonly 'background-neutrals-page'?: any;
1131
- readonly 'background-neutrals-page-subtle'?: any;
1132
- readonly 'background-neutrals-scrolls'?: any;
1133
- readonly 'background-neutrals-scrolls-hover'?: any;
1134
- readonly 'background-neutrals-subtle'?: any;
1135
- readonly 'background-neutrals-subtle-active'?: any;
1136
- readonly 'background-neutrals-subtle-hover'?: any;
1137
- readonly 'background-primary-prominent'?: any;
1138
- readonly 'background-primary-prominent-active'?: any;
1139
- readonly 'background-primary-prominent-hover'?: any;
1140
- readonly 'background-primary-prominent-selected'?: any;
1141
- readonly 'background-primary-subtle'?: any;
1142
- readonly 'background-primary-subtle-active'?: any;
1143
- readonly 'background-primary-subtle-hover'?: any;
1144
- readonly 'background-primary-subtle-selected'?: any;
1145
- readonly 'background-success'?: any;
1146
- readonly 'background-warning-prominent'?: any;
1147
- readonly 'background-warning-subtle'?: any;
1148
- readonly 'text-danger'?: any;
1149
- readonly 'text-danger-active'?: any;
1150
- readonly 'text-danger-hover'?: any;
1151
- readonly 'text-danger-inverted'?: any;
1152
- readonly 'text-neutrals'?: any;
1153
- readonly 'text-neutrals-disabled'?: any;
1154
- readonly 'text-neutrals-inverted'?: any;
1155
- readonly 'text-neutrals-placeholder'?: any;
1156
- readonly 'text-neutrals-placeholder-only'?: any;
1157
- readonly 'text-neutrals-subtle'?: any;
1158
- readonly 'text-neutrals-subtle-active'?: any;
1159
- readonly 'text-neutrals-subtle-hover'?: any;
1160
- readonly 'text-primary'?: any;
1161
- readonly 'text-primary-active'?: any;
1162
- readonly 'text-primary-hover'?: any;
1163
- readonly 'text-primary-inverted'?: any;
1164
- readonly 'text-primary-inverted-subtle'?: any;
1165
- readonly 'text-primary-selected'?: any;
1166
- readonly 'text-success'?: any;
1167
- readonly 'text-warning'?: any;
1168
- readonly 'icon-danger'?: any;
1169
- readonly 'icon-danger-active'?: any;
1170
- readonly 'icon-danger-hover'?: any;
1171
- readonly 'icon-danger-inverted'?: any;
1172
- readonly 'icon-neutrals'?: any;
1173
- readonly 'icon-neutrals-disabled'?: any;
1174
- readonly 'icon-neutrals-inactive'?: any;
1175
- readonly 'icon-neutrals-inactive-hover'?: any;
1176
- readonly 'icon-neutrals-inverted'?: any;
1177
- readonly 'icon-neutrals-search'?: any;
1178
- readonly 'icon-neutrals-subtle'?: any;
1179
- readonly 'icon-neutrals-text'?: any;
1180
- readonly 'icon-primary'?: any;
1181
- readonly 'icon-primary-active'?: any;
1182
- readonly 'icon-primary-hover'?: any;
1183
- readonly 'icon-primary-inverted'?: any;
1184
- readonly 'icon-primary-selected'?: any;
1185
- readonly 'icon-success'?: any;
1186
- readonly 'icon-success-inverted'?: any;
1187
- readonly 'icon-warning'?: any;
1188
- readonly 'icon-warning-prominent'?: any;
1189
- readonly 'border-danger'?: any;
1190
- readonly 'border-danger-active'?: any;
1191
- readonly 'border-danger-hover'?: any;
1192
- readonly 'border-focus-inner'?: any;
1193
- readonly 'border-focus-middle'?: any;
1194
- readonly 'border-focus-outer'?: any;
1195
- readonly 'border-neutrals'?: any;
1196
- readonly 'border-neutrals-active'?: any;
1197
- readonly 'border-neutrals-controls'?: any;
1198
- readonly 'border-neutrals-controls-disabled'?: any;
1199
- readonly 'border-neutrals-disabled'?: any;
1200
- readonly 'border-neutrals-hover'?: any;
1201
- readonly 'border-neutrals-inverted'?: any;
1202
- readonly 'border-neutrals-subtle'?: any;
1203
- readonly 'border-neutrals-text-subtle'?: any;
1204
- readonly 'border-neutrals-text-subtle-active'?: any;
1205
- readonly 'border-neutrals-text-subtle-hover'?: any;
1206
- readonly 'border-primary'?: any;
1207
- readonly 'border-primary-active'?: any;
1208
- readonly 'border-primary-hover'?: any;
1209
- readonly 'border-primary-inverted'?: any;
1210
- readonly 'border-success'?: any;
1211
- readonly 'border-warning'?: any;
1139
+ "background-alpha-active"?: any;
1140
+ "background-alpha-hover"?: any;
1141
+ "background-danger-prominent"?: any;
1142
+ "background-danger-prominent-active"?: any;
1143
+ "background-danger-prominent-hover"?: any;
1144
+ "background-danger-subtle"?: any;
1145
+ "background-danger-subtle-active"?: any;
1146
+ "background-danger-subtle-hover"?: any;
1147
+ "background-neutrals"?: any;
1148
+ "background-neutrals-active"?: any;
1149
+ "background-neutrals-container"?: any;
1150
+ "background-neutrals-controls-disabled"?: any;
1151
+ "background-neutrals-disabled"?: any;
1152
+ "background-neutrals-hover"?: any;
1153
+ "background-neutrals-inactive"?: any;
1154
+ "background-neutrals-inactive-hover"?: any;
1155
+ "background-neutrals-inverted"?: any;
1156
+ "background-neutrals-inverted-subtle"?: any;
1157
+ "background-neutrals-page"?: any;
1158
+ "background-neutrals-page-subtle"?: any;
1159
+ "background-neutrals-scrolls"?: any;
1160
+ "background-neutrals-scrolls-hover"?: any;
1161
+ "background-neutrals-subtle"?: any;
1162
+ "background-neutrals-subtle-active"?: any;
1163
+ "background-neutrals-subtle-hover"?: any;
1164
+ "background-primary-prominent"?: any;
1165
+ "background-primary-prominent-active"?: any;
1166
+ "background-primary-prominent-hover"?: any;
1167
+ "background-primary-prominent-selected"?: any;
1168
+ "background-primary-subtle"?: any;
1169
+ "background-primary-subtle-active"?: any;
1170
+ "background-primary-subtle-hover"?: any;
1171
+ "background-primary-subtle-selected"?: any;
1172
+ "background-success"?: any;
1173
+ "background-warning-prominent"?: any;
1174
+ "background-warning-subtle"?: any;
1175
+ "border-danger"?: any;
1176
+ "border-danger-active"?: any;
1177
+ "border-danger-hover"?: any;
1178
+ "border-focus-inner"?: any;
1179
+ "border-focus-middle"?: any;
1180
+ "border-focus-outer"?: any;
1181
+ "border-neutrals"?: any;
1182
+ "border-neutrals-active"?: any;
1183
+ "border-neutrals-controls"?: any;
1184
+ "border-neutrals-controls-disabled"?: any;
1185
+ "border-neutrals-disabled"?: any;
1186
+ "border-neutrals-hover"?: any;
1187
+ "border-neutrals-inverted"?: any;
1188
+ "border-neutrals-subtle"?: any;
1189
+ "border-neutrals-text"?: any;
1190
+ "border-neutrals-text-active"?: any;
1191
+ "border-neutrals-text-hover"?: any;
1192
+ "border-neutrals-text-subtle"?: any;
1193
+ "border-neutrals-text-subtle-active"?: any;
1194
+ "border-neutrals-text-subtle-hover"?: any;
1195
+ "border-neutrals-transparent"?: any;
1196
+ "border-primary"?: any;
1197
+ "border-primary-active"?: any;
1198
+ "border-primary-hover"?: any;
1199
+ "border-primary-inverted"?: any;
1200
+ "border-success"?: any;
1201
+ "border-warning"?: any;
1202
+ "icon-danger"?: any;
1203
+ "icon-danger-active"?: any;
1204
+ "icon-danger-hover"?: any;
1205
+ "icon-danger-inverted"?: any;
1206
+ "icon-neutrals"?: any;
1207
+ "icon-neutrals-disabled"?: any;
1208
+ "icon-neutrals-inactive"?: any;
1209
+ "icon-neutrals-inactive-hover"?: any;
1210
+ "icon-neutrals-inverted"?: any;
1211
+ "icon-neutrals-search"?: any;
1212
+ "icon-neutrals-subtle"?: any;
1213
+ "icon-neutrals-text"?: any;
1214
+ "icon-primary"?: any;
1215
+ "icon-primary-active"?: any;
1216
+ "icon-primary-hover"?: any;
1217
+ "icon-primary-inverted"?: any;
1218
+ "icon-primary-selected"?: any;
1219
+ "icon-success"?: any;
1220
+ "icon-success-inverted"?: any;
1221
+ "icon-warning"?: any;
1222
+ "icon-warning-prominent"?: any;
1223
+ "text-danger"?: any;
1224
+ "text-danger-active"?: any;
1225
+ "text-danger-hover"?: any;
1226
+ "text-danger-inverted"?: any;
1227
+ "text-neutrals"?: any;
1228
+ "text-neutrals-active"?: any;
1229
+ "text-neutrals-disabled"?: any;
1230
+ "text-neutrals-hover"?: any;
1231
+ "text-neutrals-inverted"?: any;
1232
+ "text-neutrals-placeholder"?: any;
1233
+ "text-neutrals-placeholder-only"?: any;
1234
+ "text-neutrals-subtle"?: any;
1235
+ "text-neutrals-subtle-active"?: any;
1236
+ "text-neutrals-subtle-hover"?: any;
1237
+ "text-primary"?: any;
1238
+ "text-primary-active"?: any;
1239
+ "text-primary-hover"?: any;
1240
+ "text-primary-inverted"?: any;
1241
+ "text-primary-inverted-subtle"?: any;
1242
+ "text-primary-selected"?: any;
1243
+ "text-success"?: any;
1244
+ "text-warning"?: any;
1212
1245
  };
1213
1246
  'font-sizes': {
1214
1247
  readonly 150: "0.75rem";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-popover",
3
- "version": "5.0.18",
3
+ "version": "5.0.19-themes.0",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -29,10 +29,10 @@
29
29
  "dependencies": {
30
30
  "@radix-ui/react-popover": "^1.0.0",
31
31
  "@radix-ui/react-use-size": "^1.0.1",
32
- "@mirohq/design-system-icons": "^0.27.0",
32
+ "@mirohq/design-system-icons": "^0.27.1-themes.0",
33
33
  "@mirohq/design-system-primitive": "^1.1.0",
34
- "@mirohq/design-system-stitches": "^2.3.4",
35
- "@mirohq/design-system-styles": "^1.1.0"
34
+ "@mirohq/design-system-stitches": "^2.3.5-themes.0",
35
+ "@mirohq/design-system-styles": "^1.1.1-themes.0"
36
36
  },
37
37
  "scripts": {
38
38
  "build": "rollup -c ../../../rollup.config.js",