{"version":3,"file":"Spotlight.mjs","names":[],"sources":["../../../src/spotlight/Spotlight.tsx"],"sourcesContent":["/*!\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n  FloatingFocusManager,\n  FloatingOverlay,\n  FloatingPortal,\n  useMergeRefs,\n} from '@floating-ui/react';\nimport classNames from 'classnames';\nimport React, {\n  createContext,\n  useContext,\n  useEffect,\n  useId,\n  useRef,\n  useState,\n} from 'react';\n\nimport {\n  type CommonProps,\n  type PolymorphicCommonProps,\n} from '../_common/types';\nimport { placementTranslation, type Popover } from '../popover';\nimport { StatusLabel } from '../status-label';\nimport { useNeedleTheme } from '../theme';\nimport { Typography } from '../typography';\nimport { useSpotlightContext } from './SpotlightProvider';\n\n// Local instance context to pass stable ARIA ids to subcomponents\ntype SpotlightInstanceContextType = {\n  headerId?: string;\n  descriptionId?: string;\n  setHeaderId?: (id: string | undefined) => void;\n  setDescriptionId?: (id: string | undefined) => void;\n};\n\nconst SpotlightInstanceContext =\n  createContext<SpotlightInstanceContextType | null>(null);\n\nconst useSpotlightInstance = (): SpotlightInstanceContextType => {\n  const ctx = useContext(SpotlightInstanceContext);\n  if (ctx === null) {\n    throw new Error(\n      'Spotlight subcomponents must be used within <Spotlight />',\n    );\n  }\n  return ctx;\n};\nimport { useSpotlight } from './use-spotlight';\n\ntype SpotlightHeaderProps = {\n  /** The spotlight header content */\n  children?: React.ReactNode;\n};\n\nconst SpotlightHeader = <T extends React.ElementType = 'div'>({\n  children,\n  className,\n  as,\n  style,\n  htmlAttributes,\n  ref,\n  ...restProps\n}: PolymorphicCommonProps<T, SpotlightHeaderProps>) => {\n  const classes = classNames('ndl-spotlight-header', className);\n  const { headerId, setHeaderId } = useSpotlightInstance();\n  const Component: React.ElementType = as ?? 'div';\n\n  useEffect(() => {\n    if (Boolean(htmlAttributes?.id) === true) {\n      setHeaderId?.(htmlAttributes?.id);\n    }\n  }, [setHeaderId, htmlAttributes?.id]);\n\n  return (\n    <Typography\n      as={Component}\n      className={classes}\n      ref={ref}\n      style={style}\n      variant=\"title-4\"\n      {...restProps}\n      htmlAttributes={{ ...htmlAttributes, id: headerId }}\n    >\n      {children}\n    </Typography>\n  );\n};\n\nSpotlightHeader.displayName = 'Spotlight.Header';\n\ntype SpotlightBodyProps = {\n  /** The spotlight body content */\n  children?: React.ReactNode;\n};\n\nconst SpotlightBody = <T extends React.ElementType = 'div'>({\n  children,\n  className,\n  as,\n  style,\n  htmlAttributes,\n  ref,\n  ...restProps\n}: PolymorphicCommonProps<T, SpotlightBodyProps>) => {\n  const classes = classNames('ndl-spotlight-body', className);\n  const { descriptionId, setDescriptionId } = useSpotlightInstance();\n  const Component: React.ElementType = as ?? 'div';\n\n  useEffect(() => {\n    if (Boolean(htmlAttributes?.id) === true) {\n      setDescriptionId?.(htmlAttributes?.id);\n    }\n  }, [setDescriptionId, htmlAttributes?.id]);\n\n  return (\n    <Typography\n      as={Component}\n      className={classes}\n      ref={ref}\n      style={style}\n      variant=\"body-medium\"\n      {...restProps}\n      htmlAttributes={{ ...htmlAttributes, id: descriptionId }}\n    >\n      {children}\n    </Typography>\n  );\n};\n\nSpotlightBody.displayName = 'Spotlight.Body';\n\ntype SpotlightLabelProps = Omit<\n  React.ComponentProps<typeof StatusLabel>,\n  'color' | 'fill'\n>;\n\nconst SpotlightLabel = <T extends React.ElementType = 'div'>({\n  className,\n  children,\n  hasIcon,\n  as,\n  style,\n  htmlAttributes,\n  ref,\n  ...restProps\n}: PolymorphicCommonProps<T, SpotlightLabelProps>) => {\n  useSpotlightContext();\n  const classes = classNames('ndl-spotlight-label', className);\n\n  return (\n    <StatusLabel\n      fill=\"semi-filled\"\n      variant=\"discovery\"\n      hasIcon={hasIcon}\n      ref={ref}\n      as={as}\n      className={classes}\n      style={style}\n      {...restProps}\n      {...htmlAttributes}\n    >\n      {children}\n    </StatusLabel>\n  );\n};\n\nSpotlightLabel.displayName = 'Spotlight.Label';\n\ntype SpotlightImageProps = {\n  /** A string that represents the URL of the image */\n  src: string;\n  /** A string that represents the alt text of the image */\n  alt: string;\n};\n\nconst SpotlightImage = ({\n  src,\n  alt,\n  className,\n  style,\n  htmlAttributes,\n  ref,\n  ...restProps\n}: CommonProps<'img', SpotlightImageProps>) => {\n  useSpotlightContext();\n  const classes = classNames(\n    'ndl-spotlight-image ndl-typography-body-medium',\n    className,\n  );\n\n  return (\n    <img\n      src={src}\n      alt={alt}\n      ref={ref}\n      className={classes}\n      style={style}\n      {...restProps}\n      {...htmlAttributes}\n    />\n  );\n};\n\nSpotlightImage.displayName = 'Spotlight.Image';\n\ntype SpotlightIconWrapperProps = {\n  /** Content displayed in the icon wrapper */\n  children?: React.ReactNode;\n};\n\nconst SpotlightIconWrapper = <T extends React.ElementType = 'div'>({\n  children,\n  className,\n  as,\n  style,\n  htmlAttributes,\n  ref,\n  ...restProps\n}: PolymorphicCommonProps<T, SpotlightIconWrapperProps>) => {\n  useSpotlightContext();\n  const classes = classNames('ndl-spotlight-icon-wrapper', className);\n  const Component = as ?? 'div';\n\n  return (\n    <Component\n      ref={ref}\n      className={classes}\n      style={style}\n      {...restProps}\n      {...htmlAttributes}\n    >\n      {children}\n    </Component>\n  );\n};\n\nSpotlightIconWrapper.displayName = 'Spotlight.IconWrapper';\n\nexport type SpotlightCloseAction = 'clickOutside' | 'escapeKeyDown';\n\nexport type SpotlightProps = {\n  /** The id of the `SpotlightTarget` that this `Spotlight` should be rendered next to */\n  target: string;\n  /** The actions to be displayed in the Spotlight. Should only be TextButton or OutlinedButton components. */\n  actions?: React.ReactNode;\n  /** A ReactNode that can be put in the left corner of the Spotlight (left of action buttons). It should be used to display the current step if you have a multi-step tour */\n  beforeActions?: React.ReactNode;\n  /** A callback function that is called if the Spotlight is closed by either clicking outside the Spotlight, or by pressing the Escape key. The function has one argument: action (string that can be either \"clickOutside\" or \"escapeKeyDown\") */\n  onClose?: (action: SpotlightCloseAction) => void;\n  /** Callback function called when the spotlight is opened */\n  onOpen?: () => void;\n  /** Children should be Spotlight subcomponents */\n  children?: React.ReactNode;\n} & Pick<\n  React.ComponentProps<typeof Popover>,\n  'placement' | 'initialFocus' | 'shouldCloseOnClickOutside'\n>;\n\nconst SpotlightComponent = ({\n  target,\n  beforeActions,\n  actions,\n  initialFocus,\n  onClose,\n  placement,\n  children,\n  className,\n  style,\n  htmlAttributes,\n  shouldCloseOnClickOutside = false,\n  onOpen,\n  ref,\n  ...restProps\n}: CommonProps<'div', SpotlightProps>) => {\n  const generatedHeaderId = useId();\n  const generatedDescriptionId = useId();\n  const [targetElement, setTargetElement] = useState<HTMLElement | null>(null);\n  const actionsRef = useRef<HTMLDivElement | null>(null);\n\n  const {\n    hasOverlay,\n    isActiveSpotlight,\n    isOpen,\n    registeredTargets,\n    setActiveSpotlight,\n    setIsOpen,\n  } = useSpotlightContext();\n\n  const [headerId, setHeaderId] = useState<string | undefined>(\n    generatedHeaderId,\n  );\n  const [descriptionId, setDescriptionId] = useState<string | undefined>(\n    generatedDescriptionId,\n  );\n\n  // Determine if a Header child exists\n  const hasHeaderChild = React.useMemo(() => {\n    const childrenArray = React.Children.toArray(children);\n    return childrenArray.some(\n      (child) => React.isValidElement(child) && child.type === SpotlightHeader,\n    );\n  }, [children]);\n\n  // Source ARIA from htmlAttributes\n  const ariaLabel = htmlAttributes?.['aria-label'];\n  const ariaLabelledBy =\n    htmlAttributes?.['aria-labelledby'] ??\n    (hasHeaderChild ? headerId : undefined);\n  const ariaDescribedBy = htmlAttributes?.['aria-describedby'] ?? descriptionId;\n\n  if (ariaLabel === undefined && !ariaLabelledBy) {\n    console.warn(\n      'The Spotlight is missing aria-label and Header. Please add one of them for accessibility.',\n    );\n  }\n\n  const onOpenChange = (isOpen: boolean, event?: Event) => {\n    if (!isOpen) {\n      if (event instanceof PointerEvent) {\n        onClose?.('clickOutside');\n      } else if (event instanceof KeyboardEvent) {\n        onClose?.('escapeKeyDown');\n      }\n      setActiveSpotlight(null);\n      setIsOpen(false);\n    }\n  };\n\n  const spotlight = useSpotlight({\n    anchorElement: targetElement,\n    initialFocus,\n    isOpen: isActiveSpotlight(target) && isOpen && !!targetElement,\n    onOpenChange,\n    placement: placement ? placementTranslation[placement] : undefined,\n    shouldCloseOnClickOutside,\n  });\n\n  const mergedRef = useMergeRefs([spotlight.refs.setFloating, ref]);\n\n  const { themeClassName } = useNeedleTheme();\n  const classes = classNames('ndl-spotlight', themeClassName, className);\n\n  useEffect(() => {\n    setTargetElement(registeredTargets[target]?.current);\n  }, [target, registeredTargets]);\n\n  useEffect(() => {\n    if (isOpen && isActiveSpotlight(target)) {\n      onOpen?.();\n    }\n  }, [isOpen, onOpen, isActiveSpotlight, target]);\n\n  const findInitialFocus = () => {\n    if (spotlight.initialFocus !== undefined) {\n      return spotlight.initialFocus;\n    }\n    if (!actionsRef.current) {\n      return undefined;\n    }\n    const focusableEls = actionsRef.current.querySelectorAll(\n      'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])',\n    );\n    return focusableEls.length - 1;\n  };\n\n  if (!spotlight.context.open) {\n    return null;\n  }\n\n  return (\n    <FloatingPortal>\n      <FloatingFocusManager\n        context={spotlight.context}\n        modal={true}\n        initialFocus={findInitialFocus()}\n      >\n        <SpotlightInstanceContext.Provider\n          value={{\n            descriptionId,\n            headerId,\n            setDescriptionId,\n            setHeaderId,\n          }}\n        >\n          {hasOverlay === true && (\n            <FloatingOverlay\n              className=\"ndl-spotlight-overlay ndl-spotlight-overlay-top\"\n              onPointerDown={(event) => {\n                event.stopPropagation();\n                event.preventDefault();\n              }}\n              onTouchStart={(event) => {\n                event.stopPropagation();\n                event.preventDefault();\n              }}\n            />\n          )}\n          <div\n            ref={mergedRef}\n            className={classes}\n            style={{\n              ...spotlight.floatingStyles,\n              ...spotlight.transitionStyles,\n              ...style,\n            }}\n            {...spotlight.getFloatingProps({\n              ...htmlAttributes,\n              'aria-describedby': ariaDescribedBy,\n              'aria-label': ariaLabel,\n              'aria-labelledby': ariaLabelledBy,\n              'aria-modal': 'true',\n            })}\n            {...restProps}\n          >\n            <div>{children}</div>\n            {(Boolean(beforeActions) || Boolean(actions)) && (\n              <div className=\"ndl-spotlight-footer\">\n                <Typography variant=\"body-medium\">{beforeActions}</Typography>\n                {Boolean(actions) && (\n                  <div className=\"ndl-spotlight-actions\" ref={actionsRef}>\n                    {actions}\n                  </div>\n                )}\n              </div>\n            )}\n          </div>\n        </SpotlightInstanceContext.Provider>\n      </FloatingFocusManager>\n    </FloatingPortal>\n  );\n};\n\nSpotlightComponent.displayName = 'Spotlight';\n\nconst Spotlight = Object.assign(SpotlightComponent, {\n  Body: SpotlightBody,\n  Header: SpotlightHeader,\n  IconWrapper: SpotlightIconWrapper,\n  Image: SpotlightImage,\n  Label: SpotlightLabel,\n});\n\nexport { Spotlight };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0EE;CACA;CACA;CACA;CACA;CACA;;;CAoCA;CACA;CACA;CACA;CACA;CACA;;;CAoCA;CACA;CACA;CACA;CACA;CACA;CACA;;;CAiCA;CACA;CACA;CACA;CACA;CACA;;;CA8BA;CACA;CACA;CACA;CACA;CACA;;;CA2CA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AA5OF,MAAM,2BACJ,cAAmD,IAAI;AAEzD,MAAM,6BAA2D;CAC/D,MAAM,MAAM,WAAW,wBAAwB;CAC/C,IAAI,QAAQ,MACV,MAAM,IAAI,MACR,2DACF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