{"version":3,"file":"Overrides.mjs","names":[],"sources":["../../../src/select/Overrides.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 */\n\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport { createContext, type JSX, type ReactNode, useContext } from 'react';\nimport {\n  type ClearIndicatorProps,\n  type CommonPropsAndClassName,\n  components,\n  type ControlProps,\n  type DropdownIndicatorProps,\n  type GroupBase,\n  type IndicatorsContainerProps,\n  type InputProps,\n  type MenuListProps,\n  type MenuPlacement,\n  type MenuPosition,\n  type MenuProps,\n  type MultiValueProps,\n  type OptionProps,\n  type PlaceholderProps,\n  type SingleValueProps,\n  type ValueContainerProps,\n} from 'react-select';\n\n/**\n * react-select does not re-export MenuPortalProps from its public API.\n * The deep import path (react-select/dist/declarations/src/components/Menu)\n * is incompatible with moduleResolution:\"bundler\".\n *\n * Defined locally using publicly exported react-select types until upstream\n * merges the export: https://github.com/JedWatson/react-select/pull/6007\n */\ninterface MenuPortalProps<\n  Option,\n  IsMulti extends boolean,\n  Group extends GroupBase<Option>,\n> extends CommonPropsAndClassName<Option, IsMulti, Group> {\n  appendTo: HTMLElement | undefined;\n  children: ReactNode;\n  controlElement: HTMLDivElement | null;\n  innerProps: JSX.IntrinsicElements['div'];\n  menuPlacement: MenuPlacement;\n  menuPosition: MenuPosition;\n}\n\nimport { Checkbox } from '../checkbox';\nimport { ChevronDownIconOutline } from '../icons/generated/heroIcons/ChevronDownIconOutline';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { Tag } from '../tag';\nimport { useNeedleTheme } from '../theme';\nimport { type SelectOverrideCustomProps } from './types';\n\n/**\n * Field state read by the overrides through context rather than closed over\n * by the override factories. A factory input changing produces new component\n * types, which makes react-select remount the control and drop input focus.\n */\ntype SelectFieldContextValue = {\n  hasError: boolean;\n  messageId?: string;\n};\n\nexport const SelectFieldContext = createContext<SelectFieldContextValue>({\n  hasError: false,\n});\n\n/**\n * React-select triggers control/indicator interactions on mouseDown which breaks WCAG 2.5.2 Pointer Cancellation.\n * This helper shifts mouseDown to mouseUp to allow users to cancel by dragging away.\n */\nconst shiftMouseDownToMouseUp = (\n  innerProps?: React.HTMLAttributes<HTMLDivElement>,\n  stopPropagation = false,\n): React.HTMLAttributes<HTMLDivElement> => {\n  const baseProps = innerProps ?? {};\n  const maybeStopPropagation = (event: React.SyntheticEvent) =>\n    stopPropagation && event.stopPropagation();\n\n  return {\n    ...baseProps,\n    onMouseDown: (event) => {\n      event.preventDefault();\n      maybeStopPropagation(event);\n    },\n    onMouseUp: (event) => {\n      baseProps.onMouseUp?.(event);\n      baseProps.onMouseDown?.(event);\n      maybeStopPropagation(event);\n    },\n    onTouchEnd: (event) => {\n      baseProps.onTouchEnd?.(event);\n      baseProps.onMouseDown?.(\n        event as unknown as React.MouseEvent<HTMLDivElement>,\n      );\n      maybeStopPropagation(event);\n    },\n    onTouchStart: (event) => {\n      event.preventDefault();\n      maybeStopPropagation(event);\n    },\n  };\n};\n\n/**\n * React-select triggers option selection on click which fires on mouseDown.\n * This helper shifts the click handler to mouseUp/touchEnd to allow users to cancel by dragging away.\n */\nconst shiftOptionClickToMouseUp = (\n  innerProps?: React.HTMLAttributes<HTMLDivElement>,\n): React.HTMLAttributes<HTMLDivElement> => {\n  const baseProps = innerProps ?? {};\n\n  return {\n    ...baseProps,\n    // Remove onClick to prevent double-execution (onMouseUp already calls it, and browser would fire click after mouseup)\n    onClick: undefined,\n    onMouseDown: (event: React.MouseEvent<HTMLDivElement>) => {\n      event.preventDefault();\n    },\n    onMouseUp: (event: React.MouseEvent<HTMLDivElement>) => {\n      baseProps.onMouseUp?.(event);\n      baseProps.onClick?.(event);\n    },\n    onTouchEnd: (event: React.TouchEvent<HTMLDivElement>) => {\n      baseProps.onTouchEnd?.(event);\n      baseProps.onClick?.(event as unknown as React.MouseEvent<HTMLDivElement>);\n    },\n    onTouchStart: (event: React.TouchEvent<HTMLDivElement>) => {\n      event.preventDefault();\n    },\n  };\n};\n\nexport const DropdownIndicatorCurrying = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component(\n    props: DropdownIndicatorProps<OptionType, IsMulti, GroupType>,\n  ) {\n    const classes = classNames('ndl-select-dropdown-indicator', {\n      'ndl-disabled': props.isDisabled,\n      'ndl-focused': props.isFocused,\n      'ndl-is-multi': props.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n\n    // stopPropagation so that we prevent the control from also toggling the menu (double-toggle)\n    const indicatorInnerProps = shiftMouseDownToMouseUp(props.innerProps, true);\n\n    return (\n      <components.DropdownIndicator\n        {...props}\n        className={classes}\n        innerProps={indicatorInnerProps}\n      >\n        <ChevronDownIconOutline\n          className=\"ndl-select-icon\"\n          style={{\n            transform: props.selectProps.menuIsOpen\n              ? 'rotate(180deg)'\n              : 'rotate(0deg)',\n            transitionDuration: tokens.motion.duration.quick,\n          }}\n        />\n      </components.DropdownIndicator>\n    );\n  };\n\nexport const CustomClearIndication = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({\n    className,\n    innerProps,\n    ...restProps\n  }: ClearIndicatorProps<OptionType, IsMulti, GroupType>) {\n    const classes = classNames('ndl-select-clear', className, {\n      'ndl-focused': restProps.isFocused,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n\n    const handleClear = () => {\n      restProps.clearValue?.();\n    };\n\n    // Stop propagation to prevent react-select's keyboard handling.\n    const handleKeyDown = (event: React.KeyboardEvent) => {\n      if (event.key === '') {\n        event.preventDefault();\n      }\n      event.stopPropagation();\n      event.nativeEvent.stopImmediatePropagation?.();\n    };\n\n    // Prevent react-select's default clear-on-mousedown/touchend behavior.\n    const preventAndStop = (event: React.SyntheticEvent) => {\n      event.preventDefault();\n      event.stopPropagation();\n    };\n\n    const safeInnerProps: typeof innerProps = {\n      ...innerProps,\n      'aria-hidden': undefined, // Remove to allow focusable button inside\n      onMouseDown: preventAndStop,\n      onMouseUp: preventAndStop,\n      onTouchEnd: preventAndStop,\n    };\n\n    return (\n      <components.ClearIndicator\n        className={classes}\n        innerProps={safeInnerProps}\n        {...restProps}\n      >\n        <button\n          type=\"button\"\n          className=\"ndl-select-clear-button\"\n          onClick={handleClear}\n          onKeyDown={handleKeyDown}\n          aria-label=\"Clear selection\"\n        >\n          <XMarkIconOutline />\n        </button>\n        <div className=\"ndl-select-divider\" />\n      </components.ClearIndicator>\n    );\n  };\n\nexport const CustomMultiValue = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({\n    children,\n    className,\n    ...restProps\n  }: MultiValueProps<OptionType, IsMulti, GroupType>) {\n    const classes = classNames('ndl-select-multi-value', className, {\n      'ndl-disabled': restProps.isDisabled,\n      'ndl-focused': restProps.isFocused,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n    return (\n      <components.MultiValueContainer\n        {...restProps}\n        innerProps={{\n          className: classes,\n        }}\n      >\n        <Tag\n          size={size}\n          onClick={(event) => {\n            event.preventDefault();\n            restProps.removeProps.onClick?.(\n              event as unknown as React.MouseEvent<HTMLDivElement, MouseEvent>,\n            );\n          }}\n          htmlAttributes={{\n            onMouseDown: (mouseDownEvent) => mouseDownEvent.preventDefault(),\n          }}\n        >\n          {children}\n        </Tag>\n      </components.MultiValueContainer>\n    );\n  };\n\nexport const CustomPlaceholder = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({\n    children,\n    className,\n    ...restProps\n  }: PlaceholderProps<OptionType, IsMulti, GroupType>) {\n    const classes = classNames('ndl-select-placeholder', className, {\n      'ndl-disabled': restProps.isDisabled,\n      'ndl-focused': restProps.isFocused,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n    return (\n      <components.Placeholder {...restProps} className={classes}>\n        {children}\n      </components.Placeholder>\n    );\n  };\n\nexport const CustomControl = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n  isClean,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({ children, className, ...restProps }: ControlProps) {\n    const { hasError } = useContext(SelectFieldContext);\n    const classes = classNames('ndl-select-control', className, {\n      'ndl-clean': isClean,\n      'ndl-disabled': restProps.isDisabled,\n      'ndl-focused': restProps.isFocused,\n      'ndl-has-error': hasError,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n\n    const controlInnerProps = shiftMouseDownToMouseUp(restProps.innerProps);\n\n    return (\n      <components.Control\n        {...restProps}\n        className={classes}\n        innerProps={controlInnerProps}\n      >\n        {children}\n      </components.Control>\n    );\n  };\n\nexport const CustomIndicatorsContainer = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({\n    children,\n    className,\n    ...restProps\n  }: IndicatorsContainerProps) {\n    const classes = classNames('ndl-select-indicators-container', className, {\n      'ndl-disabled': restProps.isDisabled,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n    return (\n      <components.IndicatorsContainer {...restProps} className={classes}>\n        {children}\n      </components.IndicatorsContainer>\n    );\n  };\n\nexport const CustomValueContainer = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({\n    children,\n    className,\n    ...restProps\n  }: ValueContainerProps) {\n    const classes = classNames('ndl-select-value-container', className, {\n      'ndl-disabled': restProps.isDisabled,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n    return (\n      <components.ValueContainer {...restProps} className={classes}>\n        {children}\n      </components.ValueContainer>\n    );\n  };\n\nexport const CustomInput = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({ className, ...restProps }: InputProps) {\n    const { messageId } = useContext(SelectFieldContext);\n    const classes = classNames('ndl-select-input', className, {\n      'ndl-disabled': restProps.isDisabled,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n\n    const combinedAriaDescribedBy = [restProps['aria-describedby'], messageId]\n      .filter(Boolean)\n      .join(' ');\n\n    return (\n      <components.Input\n        {...restProps}\n        className={classes}\n        aria-describedby={combinedAriaDescribedBy}\n      />\n    );\n  };\n\nexport const CustomSingleValue = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({ className, ...restProps }: SingleValueProps) {\n    const classes = classNames('ndl-select-single-value', className, {\n      'ndl-disabled': restProps.isDisabled,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n    return <components.SingleValue {...restProps} className={classes} />;\n  };\n\n/** Overrides that are part of the popover menu */\n\nexport const CustomMenu = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({ children, className, ...restProps }: MenuProps) {\n    const { themeClassName } = useNeedleTheme();\n    const classes = classNames('ndl-select-menu', className, themeClassName, {\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n    return (\n      <components.Menu {...restProps} className={classes}>\n        {children}\n      </components.Menu>\n    );\n  };\n\nexport const CustomMenuPortal = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({\n    children,\n    className,\n    ...restProps\n  }: MenuPortalProps<OptionType, IsMulti, GroupType>) {\n    const classes = classNames(className, 'ndl-select-menu-portal', {\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n    return (\n      <components.MenuPortal {...restProps} className={classes}>\n        {children}\n      </components.MenuPortal>\n    );\n  };\n\nexport const CustomMenuList = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({\n    children,\n    className,\n    ...restProps\n  }: MenuListProps<OptionType, IsMulti, GroupType>) {\n    const classes = classNames(className, 'ndl-select-menu-list', {\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-small': size === 'small',\n    });\n    return (\n      <components.MenuList {...restProps} className={classes}>\n        {children}\n      </components.MenuList>\n    );\n  };\n\nexport const CustomOption = <\n  OptionType,\n  IsMulti extends boolean = false,\n  GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>({\n  size,\n}: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>) =>\n  function Component({\n    children,\n    className,\n    ...restProps\n  }: OptionProps<OptionType, IsMulti, GroupType>) {\n    const classes = classNames(className, 'ndl-select-option', {\n      'ndl-disabled': restProps.isDisabled,\n      'ndl-focused': restProps.isFocused,\n      'ndl-is-multi': restProps.isMulti,\n      'ndl-large': size === 'large',\n      'ndl-medium': size === 'medium',\n      'ndl-selected': restProps.isSelected,\n      'ndl-small': size === 'small',\n    });\n    const optionInnerProps = shiftOptionClickToMouseUp(restProps.innerProps);\n\n    return (\n      <components.Option\n        {...restProps}\n        className={classes}\n        innerProps={optionInnerProps}\n      >\n        {restProps.isMulti === true && (\n          <Checkbox\n            isChecked={restProps.isSelected}\n            ariaLabel={restProps.label}\n            isDisabled={restProps.isDisabled}\n            htmlAttributes={{\n              'aria-hidden': true,\n              disabled: true,\n              onPointerDown: (event) => {\n                event.preventDefault();\n              },\n              onPointerUp: (event) => {\n                restProps.innerProps.onClick?.(event);\n              },\n              onTouchEnd: (event) => {\n                restProps.innerProps.onClick?.(\n                  event as unknown as React.MouseEvent<\n                    HTMLDivElement,\n                    MouseEvent\n                  >,\n                );\n              },\n              onTouchStart: (event) => {\n                event.preventDefault();\n              },\n              role: 'presentation',\n              tabIndex: -1,\n            }}\n          />\n        )}\n        {children}\n      </components.Option>\n    );\n  };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0MI,MAAA,YAAA,CAAA,aACA,YAAA;AAkEA,MAAA,aAAA,CAAA,YACA,WAAA;AA4CA,MAAA,aAAA,CAAA,YACA,WAAA;AA0BmB,MAAA,aAAA,CAAA,YAAU,WAAA;AAkC7B,MAAA,aAAA,CAAA,YACA,WAAA;AAyBA,MAAA,aAAA,CAAA,YACA,WAAA;AAwBmB,MAAA,aAAA,CAAA,WAAA;AA8BA,MAAA,aAAA,CAAA,WAAA;AAoBA,MAAA,aAAA,CAAA,YAAU,WAAA;AAuB7B,MAAA,cAAA,CAAA,YACA,WAAA;AAwBA,MAAA,cAAA,CAAA,YACA,WAAA;AAwBA,MAAA,cAAA,CAAA,YACA,WAAA;AApdJ,MAAa,qBAAqB,cAAuC,EACvE,UAAU,MACZ,CAAC;;;;;AAMD,MAAM,2BACJ,YACA,kBAAkB,UACuB;CACzC,MAAM,YAAY,eAAA,QAAA,eAAA,KAAA,IAAA,aAAc,CAAC;CACjC,MAAM,wBAAwB,UAC5B,mBAAmB,MAAM,gBAAgB;CAE3C,OAAA,eAAA,eAAA,CAAA,GACK,SAAA,GAAA,CAAA,GAAA;EACH,cAAc,UAAU;GACtB,MAAM,eAAe;GACrB,qBAAqB,KAAK;EAC5B;EACA,YAAY,UAAU;;GACpB,CAAA,uBAAA,UAAU,eAAA,QAAA,yBAAA,KAAA,KAAA,qBAAA,KAAA,WAAY,KAAK;GAC3B,CAAA,wBAAA,UAAU,iBAAA,QAAA,0BAAA,KAAA,KAAA,sBAAA,KAAA,WAAc,KAAK;GAC7B,qBAAqB,KAAK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