@mirohq/design-system-combobox 0.1.0-combobox.2 → 0.1.0-combobox.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/hooks/use-combobox-context.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/partials/portal.tsx","../src/partials/group.styled.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/combobox.styled.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n top: '6px',\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren } from 'react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\n\ninterface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n value?: string[]\n defaultValue?: string[]\n searchValue?: string\n direction?: Direction\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState?: boolean | undefined\n setValue: React.Dispatch<React.SetStateAction<string[]>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n setSearchValue: React.Dispatch<React.SetStateAction<string | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n defaultOpen,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n ...restProps\n}: PropsWithChildren<ComboboxProviderProps>): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n const [openState, setOpenState] = useState(defaultOpen)\n const [value, setValue] = useState(valueProp ?? [])\n const [defaultValue, setDefaultValue] = useState(defaultValueProp)\n const [searchValue, setSearchValue] = useState<string | undefined>()\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n searchValue,\n setSearchValue,\n triggerRef,\n contentRef,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox } from '@ariakit/react'\nimport {\n booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { IconChevronDown } from '@mirohq/design-system-icons'\nimport { Input } from '@mirohq/design-system-input'\nimport type { InputProps } from '@mirohq/design-system-input'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { StyledActionButton } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport type TriggerProps = InputProps & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n}\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value,\n triggerRef,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value?.length === 0 ? placeholder : undefined,\n }\n\n const variants = {\n size,\n }\n\n return (\n <RadixPopover.Anchor ref={mergeRefs([triggerRef, forwardRef])}>\n <Combobox\n render={\n <Input {...inputProps} {...variants}>\n {children}\n {/* @todo https://miro.atlassian.net/browse/CLC-335 */}\n <StyledActionButton label='custom label'>\n <IconChevronDown size='small' weight='thin' />\n </StyledActionButton>\n </Input>\n }\n />\n </RadixPopover.Anchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '1.5',\n minWidth: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n marginTop: '$200',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Combobox's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(({ children, ...restProps }, forwardRef) => {\n const { triggerRef, contentRef } = useComboboxContext()\n\n return (\n <StyledContent\n {...restProps}\n ref={mergeRefs([forwardRef, contentRef])}\n onOpenAutoFocus={event => event.preventDefault()}\n onInteractOutside={event => {\n const target = event.target as Element | null\n const isTrigger = target === triggerRef.current\n const isContent =\n (target != null && contentRef.current?.contains(target)) ?? false\n if (isTrigger || isContent) {\n event.preventDefault()\n }\n }}\n >\n {children}\n </StyledContent>\n )\n})\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'flex',\n alignItems: 'center',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: 1.5,\n position: 'relative',\n userSelect: 'none',\n padding: '6px 0',\n paddingInline: '$150 $100',\n\n ...focus.css({\n boxShadow: '$focus-small',\n outline: '1px solid transparent',\n }),\n\n '&:hover:not([aria-disabled=\"true\"])': {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport * as Ariakit from '@ariakit/react'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n\n return (\n <StyledItem\n {...restProps}\n {...restAriaDisabledProps}\n focusable\n accessibleWhenDisabled={ariaDisabled === true}\n disabled={ariaDisabled === true || disabled}\n ref={forwardRef}\n value={value}\n >\n <Ariakit.ComboboxItemCheck />\n {children}\n </StyledItem>\n )\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 * 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 { Group } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(Group, {})\n\nexport type StyledGroupProps = StrictComponentProps<typeof StyledGroup>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroup } from './group.styled'\nimport type { StyledGroupProps } from './group.styled'\n\nexport interface GroupProps extends StyledGroupProps {}\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>((props, forwardRef) => <StyledGroup {...props} ref={forwardRef} />)\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledValue = styled(Primitive.span, {})\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport const Value = React.forwardRef<ElementRef<typeof StyledValue>>(\n (props, forwardRef) => {\n const { value } = useComboboxContext()\n const isEmpty = value?.length === 0\n\n if (isEmpty) {\n return null\n }\n\n return (\n <StyledValue ref={forwardRef} {...props}>\n {value}\n </StyledValue>\n )\n }\n)\n","import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledComboboxContent = styled(Primitive.div, {})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport * as Ariakit from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Group } from './partials/group'\nimport { GroupLabel } from './partials/group-label'\nimport { Value } from './partials/value'\nimport { StyledComboboxContent } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n // setSelectedValue from Ariakit.ComboboxProvider expects to accept a union string | string[], type cast is required to specify that it's a multi value\n onValueChange?.(newValue as string[])\n setValue(newValue as string[])\n }\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={setOpenState}>\n <Ariakit.ComboboxProvider\n open={openState}\n setOpen={setOpenState}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent {...restProps} ref={forwardRef} dir={direction}>\n {children}\n </StyledComboboxContent>\n </Ariakit.ComboboxProvider>\n </RadixPopover.Root>\n )\n})\n\nexport const Combobox = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n {\n 'aria-disabled': ariaDisabled,\n defaultOpen = false,\n open,\n valid,\n disabled,\n readOnly,\n required,\n value,\n defaultValue,\n onOpen,\n onValueChange,\n direction = 'ltr',\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n defaultOpen={defaultOpen}\n open={open}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n >\n <Root {...restProps} value={value} ref={forwardRef} />\n </ComboboxProvider>\n )\n) as ForwardRefExoticComponent<ComboboxProps> & Partials\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\n"],"names":["Combobox","RadixPortal","Group","GroupLabel"],"mappings":";;;;;;;;;;;;;;;AAGa,MAAA,kBAAA,GAAqB,MAAO,CAAA,KAAA,CAAM,YAAc,EAAA;AAAA,EAC3D,QAAU,EAAA,UAAA;AAAA,EACV,KAAO,EAAA,MAAA;AAAA,EACP,GAAK,EAAA,KAAA;AACP,CAAC,CAAA;;ACqBD,MAAM,eAAA,GAAkB,aAAoC,CAAA,EAAS,CAAA,CAAA;AAE9D,MAAM,mBAAmB,CAAC;AAAA,EAC/B,QAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAO,EAAA,SAAA;AAAA,EACP,YAAc,EAAA,gBAAA;AAAA,EACd,GAAG,SAAA;AACL,CAA6D,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AA;AAAA,IACA,YAAA;AAAA,IACA,MAAA;AAAA,IACA,aAAA;AAAA,IACA,SAAY,GAAA,KAAA;AAAA,IACZ,GAAG,SAAA;AAAA,KAEL,UAEA,qBAAA,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,YAAA;AAAA,MACA,KAAA;AAAA,MACA,WAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,eAAe,EAAA,YAAA;AAAA,MACf,SAAA;AAAA,MAEA,8BAAC,IAAM,EAAA,EAAA,GAAG,SAAW,EAAA,KAAA,EAAc,KAAK,UAAY,EAAA,CAAA;AAAA,KAAA;AAAA,GACtD;AAEJ,EAAA;AAYA,QAAA,CAAS,MAAS,GAAA,MAAA,CAAA;AAClB,QAAA,CAAS,OAAU,GAAA,OAAA,CAAA;AACnB,QAAA,CAAS,OAAU,GAAA,OAAA,CAAA;AACnB,QAAA,CAAS,IAAO,GAAA,IAAA,CAAA;AAChB,QAAA,CAAS,KAAQ,GAAA,KAAA,CAAA;AACjB,QAAA,CAAS,UAAa,GAAA,UAAA,CAAA;AACtB,QAAA,CAAS,KAAQ,GAAA,KAAA;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/hooks/use-combobox-context.tsx","../src/partials/trigger-action-button.styled.tsx","../src/partials/trigger-action-button.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/util.ts","../src/partials/content.tsx","../src/partials/portal.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/chip/chip.styled.tsx","../src/chip/left-icon.styled.tsx","../src/chip/left-slot.tsx","../src/chip/chip.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.styled.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n\n '&&&': {\n height: 'max-content',\n },\n\n '& input': {\n minWidth: '30px',\n flexBasis: 0,\n flexGrow: 1,\n marginRight: '$300',\n },\n\n variants: {\n size: {\n large: {\n minHeight: '$10',\n padding: '5px $100',\n },\n 'x-large': {\n minHeight: '$12',\n padding: '9px $150',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren, ReactNode } from 'react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\n\ninterface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n value?: string[]\n defaultValue?: string[]\n onSearchValueChange?: (value: string) => void\n direction?: Direction\n autoFilter?: boolean\n noResultsText?: ReactNode\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean>>\n openState: boolean\n setValue: React.Dispatch<React.SetStateAction<string[]>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string>>\n filteredItems: Set<string>\n setFilteredItems: React.Dispatch<React.SetStateAction<Set<string>>>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n defaultOpen,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onSearchValueChange,\n autoFilter = true,\n ...restProps\n}: PropsWithChildren<ComboboxProviderProps>): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n const [openState, setOpenState] = useState(defaultOpen ?? false)\n const [value, setValue] = useState(valueProp ?? [])\n const [defaultValue, setDefaultValue] = useState(defaultValueProp)\n const [filteredItems, setFilteredItems] = useState(new Set<string>())\n const [searchValue, setSearchValue] = useState('')\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n onSearchValueChange,\n triggerRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n filteredItems,\n setFilteredItems,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n large: {\n top: '5px',\n },\n 'x-large': {\n top: '9px',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n\nexport type StyledActionButtonProps = StrictComponentProps<\n typeof StyledActionButton\n>\n","import React, { useCallback } from 'react'\nimport { IconChevronDown, IconCross } from '@mirohq/design-system-icons'\n\nimport type { StyledActionButtonProps } from './trigger-action-button.styled'\nimport { StyledActionButton } from './trigger-action-button.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport type TriggerActionButtonProps = Omit<\n StyledActionButtonProps,\n 'label'\n> & {\n /**\n * The label text for Trigger's action button when Combobox is empty. Open/Close action will be performed.\n * Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox has values selected. Clear Combobox values action\n * will be performed. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n}\n\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n clearActionLabel,\n size,\n}) => {\n const { setOpenState, value, setValue } = useComboboxContext()\n\n const isEmpty = value === undefined || value.length === 0\n\n const ActionButtonIcon = isEmpty ? IconChevronDown : IconCross\n const label = isEmpty ? openActionLabel : clearActionLabel\n\n const onActionButtonClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (!isEmpty) {\n setValue([])\n } else {\n setOpenState(prevOpen => !prevOpen)\n }\n\n event.stopPropagation()\n },\n [isEmpty, setValue, setOpenState]\n )\n\n return (\n <StyledActionButton label={label} size={size} onClick={onActionButtonClick}>\n <ActionButtonIcon size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox } from '@ariakit/react'\nimport {\n booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<TriggerActionButtonProps, 'openActionLabel' | 'clearActionLabel'> & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n clearActionLabel,\n onChange,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value,\n triggerRef,\n onSearchValueChange,\n searchValue,\n setSearchValue,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value?.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined || value?.length !== 0 || focused\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onSearchValueChange?.(e.target.value)\n onChange?.(e)\n }\n\n return (\n <RadixPopover.Anchor ref={mergeRefs([triggerRef, forwardRef])}>\n <Combobox\n render={\n <StyledInput\n value={searchValue}\n onChange={onInputChange}\n {...inputProps}\n size={size}\n >\n {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n clearActionLabel={clearActionLabel}\n size={size}\n />\n </StyledInput>\n }\n />\n </RadixPopover.Anchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '1.5',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n marginTop: '$200',\n padding: '$150',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n paddingX: '$100',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '$200',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: 1.5,\n position: 'relative',\n userSelect: 'none',\n paddingX: '$100',\n paddingY: '10px',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems } = useComboboxContext()\n\n if (autoFilter !== false && !filteredItems.has(value)) {\n return null\n }\n\n return (\n <StyledItem\n {...restProps}\n {...restAriaDisabledProps}\n focusable\n accessibleWhenDisabled={ariaDisabled === true}\n disabled={ariaDisabled === true || disabled}\n ref={forwardRef}\n value={value}\n >\n {children}\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark size='small' />\n </AriakitComboboxItemCheck>\n </StyledItem>\n )\n }\n)\n","import React from 'react'\nimport type { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nconst isInsideRef = (\n element: Element | null,\n ref: React.RefObject<Element>\n): boolean => (element != null && ref.current?.contains(element)) ?? false\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Combobox's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(({ children, ...restProps }, forwardRef) => {\n const {\n triggerRef,\n contentRef,\n autoFilter,\n filteredItems,\n setFilteredItems,\n searchValue,\n noResultsText,\n } = useComboboxContext()\n\n useEffect(() => {\n const childrenItemValues = getChildrenItemValues(children)\n\n setFilteredItems(\n new Set(\n autoFilter === false\n ? childrenItemValues\n : childrenItemValues.filter(child =>\n child.toLowerCase().includes(searchValue.toLowerCase())\n )\n )\n )\n }, [children, autoFilter, setFilteredItems, searchValue])\n\n return (\n <StyledContent\n {...restProps}\n ref={mergeRefs([forwardRef, contentRef])}\n onOpenAutoFocus={event => event.preventDefault()}\n onInteractOutside={event => {\n const target = event.target as Element | null\n const isTrigger = isInsideRef(target, triggerRef)\n const isContent = isInsideRef(target, contentRef)\n\n if (isTrigger || isContent) {\n event.preventDefault()\n }\n }}\n >\n {filteredItems.size === 0 ? noResultsText : children}\n </StyledContent>\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 * 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, { useMemo } from 'react'\nimport { Group as AriakitGroup } from '@ariakit/react'\nimport type { ElementRef } from 'react'\nimport type { GroupProps as AriakitGroupProps } from '@ariakit/react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nexport type GroupProps = AriakitGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof AriakitGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, filteredItems } = useComboboxContext()\n\n const childValues = useMemo(\n // don't perform calculation if auto filter is disabled\n () => (autoFilter !== false ? getChildrenItemValues(children) : []),\n [children, autoFilter]\n )\n const hasVisibleChildren = useMemo(\n () =>\n // don't perform calculation if auto filter is disabled\n autoFilter !== false\n ? childValues.some(value => filteredItems.has(value))\n : true,\n [childValues, filteredItems, autoFilter]\n )\n\n if (!hasVisibleChildren) {\n return null\n }\n\n return (\n <AriakitGroup {...rest} ref={forwardRef}>\n {children}\n </AriakitGroup>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {\n padding: '$100',\n color: '$text-neutrals-subtle',\n fontSize: '$150',\n textTransform: 'uppercase',\n fontWeight: 650,\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n background: '$gray-100',\n color: '$gray-900',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n ...focus.css({\n boxShadow: '$focus-small-outline',\n borderColor: '$blue-400 !important',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeChipAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeChipAriaLabel}>\n <IconCross size='small' weight='thin' color='gray-500' />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Value: FC<ValueProps> = ({ removeChipAriaLabel }) => {\n const {\n value,\n setValue,\n disabled,\n 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const isEmpty = value === undefined || value.length === 0\n const isDisabled = ariaDisabled === true || disabled\n\n const onItemRemove = (item: string): void => {\n setValue(prevValue => prevValue.filter(value => value !== item))\n }\n\n if (isEmpty) {\n return null\n }\n\n return (\n <>\n {value.map(item => (\n <StyledValue\n key={item}\n onRemove={() => onItemRemove(item)}\n disabled={isDisabled}\n removeChipAriaLabel={removeChipAriaLabel}\n >\n {item}\n </StyledValue>\n ))}\n </>\n )\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(Primitive.div, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '$100 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSeparator } from './separator.styled'\nimport type { StyledSeparatorProps } from './separator.styled'\n\nexport interface SeparatorProps extends StyledSeparatorProps {}\n\nexport const Separator = React.forwardRef<\n ElementRef<typeof StyledSeparator>,\n SeparatorProps\n>((props, forwardRef) => (\n <StyledSeparator {...props} ref={forwardRef} aria-hidden />\n))\n","import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledComboboxContent = styled(Primitive.div, {})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent, ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Group } from './partials/group'\nimport { GroupLabel } from './partials/group-label'\nimport { Value } from './partials/value'\nimport { Separator } from './partials/separator'\nimport { StyledComboboxContent } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n // setSelectedValue from Ariakit.ComboboxProvider expects to accept a union string | string[], type cast is required to specify that it's a multi value\n onValueChange?.(newValue as string[])\n setValue(newValue as string[])\n }\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={setOpenState}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={setOpenState}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent {...restProps} ref={forwardRef} dir={direction}>\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n})\n\nexport const Combobox = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n {\n 'aria-disabled': ariaDisabled,\n defaultOpen = false,\n open,\n valid,\n disabled,\n readOnly,\n required,\n value,\n defaultValue,\n onSearchValueChange,\n onOpen,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onSearchValueChange={onSearchValueChange}\n defaultOpen={defaultOpen}\n open={open}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n autoFilter={autoFilter}\n noResultsText={noResultsText}\n >\n <Root\n {...restProps}\n noResultsText={noResultsText}\n value={value}\n ref={forwardRef}\n />\n </ComboboxProvider>\n )\n) as ForwardRefExoticComponent<ComboboxProps> & Partials\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n Separator: typeof Separator\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\nCombobox.Separator = Separator\n"],"names":["Combobox","AriakitComboboxItemCheck","RadixPortal","AriakitGroup","GroupLabel","value","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;AAGa,MAAA,WAAA,GAAc,OAAO,KAAO,EAAA;AAAA,EACvC,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,CAAA;AAAA,EACV,GAAK,EAAA,OAAA;AAAA,EAEL,KAAO,EAAA;AAAA,IACL,MAAQ,EAAA,aAAA;AAAA,GACV;AAAA,EAEA,SAAW,EAAA;AAAA,IACT,QAAU,EAAA,MAAA;AAAA,IACV,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,IACV,WAAa,EAAA,MAAA;AAAA,GACf;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA;AAAA,QACL,SAAW,EAAA,KAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,OACX;AAAA,MACA,SAAW,EAAA;AAAA,QACT,SAAW,EAAA,KAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,OACX;AAAA,KACF;AAAA,GACF;AAAA,EA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