@mirohq/design-system-combobox 0.6.0-new-focus-keyboard.1 → 1.0.0-pdl-removing-ffs.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 +4 -28
- package/dist/main.js.map +1 -1
- package/dist/module.js +5 -29
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +21 -21
- package/package.json +15 -16
package/dist/main.js
CHANGED
|
@@ -12,7 +12,6 @@ var designSystemBaseTooltip = require('@mirohq/design-system-base-tooltip');
|
|
|
12
12
|
var designSystemUsePrevious = require('@mirohq/design-system-use-previous');
|
|
13
13
|
var designSystemBaseInput = require('@mirohq/design-system-base-input');
|
|
14
14
|
var utils = require('@react-aria/utils');
|
|
15
|
-
var designSystemExperiments = require('@mirohq/design-system-experiments');
|
|
16
15
|
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
17
16
|
var reactUseControllableState = require('@radix-ui/react-use-controllable-state');
|
|
18
17
|
var designSystemIcons = require('@mirohq/design-system-icons');
|
|
@@ -80,23 +79,12 @@ const StyledBaseInput = designSystemStitches.styled(designSystemBaseInput.BaseIn
|
|
|
80
79
|
minHeight: "$12",
|
|
81
80
|
height: "auto",
|
|
82
81
|
padding: "5px $100",
|
|
83
|
-
paddingRight: "$500"
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
v1: {
|
|
87
|
-
true: {}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
compoundVariants: [
|
|
91
|
-
{
|
|
92
|
-
v1: true,
|
|
93
|
-
size: "x-large",
|
|
94
|
-
css: {
|
|
82
|
+
paddingRight: "$500",
|
|
95
83
|
fontSize: "$200",
|
|
96
84
|
lineHeight: "$500"
|
|
97
85
|
}
|
|
98
86
|
}
|
|
99
|
-
|
|
87
|
+
}
|
|
100
88
|
});
|
|
101
89
|
|
|
102
90
|
function searchQueryMatch(displayedText, searchValue) {
|
|
@@ -292,7 +280,6 @@ const Trigger = React__default["default"].forwardRef(
|
|
|
292
280
|
ariaInvalid: formFieldAriaInvalid,
|
|
293
281
|
valid: formFieldValid
|
|
294
282
|
} = designSystemBaseForm.useFormFieldContext();
|
|
295
|
-
const [v1] = designSystemExperiments.useNewDesignLanguage();
|
|
296
283
|
React.useEffect(() => {
|
|
297
284
|
setSize(size);
|
|
298
285
|
}, [size, setSize]);
|
|
@@ -340,7 +327,6 @@ const Trigger = React__default["default"].forwardRef(
|
|
|
340
327
|
size,
|
|
341
328
|
onChange: onInputChange,
|
|
342
329
|
css,
|
|
343
|
-
v1,
|
|
344
330
|
className,
|
|
345
331
|
children: [
|
|
346
332
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -686,8 +672,6 @@ const Root = React__default["default"].forwardRef(
|
|
|
686
672
|
"aria-disabled": ariaDisabled,
|
|
687
673
|
disabled,
|
|
688
674
|
direction,
|
|
689
|
-
size,
|
|
690
|
-
placeholder,
|
|
691
675
|
triggerRef
|
|
692
676
|
} = useComboboxContext();
|
|
693
677
|
const {
|
|
@@ -695,9 +679,6 @@ const Root = React__default["default"].forwardRef(
|
|
|
695
679
|
setDisabled,
|
|
696
680
|
setAriaDisabled,
|
|
697
681
|
setReadOnly,
|
|
698
|
-
label,
|
|
699
|
-
isFloatingLabel,
|
|
700
|
-
focused,
|
|
701
682
|
formElementRef
|
|
702
683
|
} = designSystemBaseForm.useFormFieldContext();
|
|
703
684
|
React.useEffect(() => {
|
|
@@ -722,8 +703,6 @@ const Root = React__default["default"].forwardRef(
|
|
|
722
703
|
ignoreNextTooltip();
|
|
723
704
|
}
|
|
724
705
|
}, [ignoreNextTooltip, openState, prevOpen]);
|
|
725
|
-
const shouldUseFloatingLabel = label !== null && isFloatingLabel;
|
|
726
|
-
const isFloating = placeholder !== void 0 || value.length !== 0 || focused;
|
|
727
706
|
const onSetSelectedValue = (newValue) => {
|
|
728
707
|
setValue(typeof newValue === "string" ? [newValue] : newValue);
|
|
729
708
|
};
|
|
@@ -741,17 +720,14 @@ const Root = React__default["default"].forwardRef(
|
|
|
741
720
|
setOpen: onOpenChange,
|
|
742
721
|
selectedValue: value,
|
|
743
722
|
setSelectedValue: onSetSelectedValue,
|
|
744
|
-
children: /* @__PURE__ */ jsxRuntime.
|
|
723
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
745
724
|
StyledComboboxContent,
|
|
746
725
|
{
|
|
747
726
|
ref: forwardRef,
|
|
748
727
|
...restProps,
|
|
749
728
|
dir: direction,
|
|
750
729
|
"data-form-element": "select",
|
|
751
|
-
children
|
|
752
|
-
shouldUseFloatingLabel && /* @__PURE__ */ jsxRuntime.jsx(designSystemBaseForm.FloatingLabel, { floating: isFloating, size, children: label }),
|
|
753
|
-
children
|
|
754
|
-
]
|
|
730
|
+
children
|
|
755
731
|
}
|
|
756
732
|
)
|
|
757
733
|
}
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/partials/trigger.styled.tsx","../src/utils.ts","../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/hooks/use-document-fragment.ts","../src/hooks/use-invisible-content.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/hooks/use-group-context.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.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.styled.tsx","../src/partials/no-result.styled.tsx","../src/partials/no-result.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { BaseInput } from '@mirohq/design-system-base-input'\nimport type { ComponentPropsWithRef } from 'react'\n\nexport const StyledBaseInput = styled(BaseInput, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '$50',\n\n '&[data-valid], &[data-invalid]': {\n // we don't need a bigger padding here as Input component will render its own icon\n paddingRight: '$100',\n },\n\n '& input': {\n minWidth: '$8',\n flexBasis: 0,\n flexGrow: 1,\n },\n\n variants: {\n size: {\n medium: {\n minHeight: '$8',\n height: 'auto',\n padding: '3px $100',\n paddingRight: '$500',\n fontSize: '$175',\n },\n large: {\n minHeight: '$10',\n height: 'auto',\n padding: '5px $100',\n paddingRight: '$500',\n },\n 'x-large': {\n minHeight: '$12',\n height: 'auto',\n padding: '5px $100',\n paddingRight: '$500',\n },\n },\n v1: {\n true: {},\n },\n },\n compoundVariants: [\n {\n v1: true,\n size: 'x-large',\n css: {\n fontSize: '$200',\n lineHeight: '$500',\n },\n },\n ],\n})\n\nexport type StyledBaseInputProps = ComponentPropsWithRef<typeof StyledBaseInput>\n","export function searchQueryMatch(\n displayedText: string,\n searchValue: string\n): boolean {\n return displayedText.toLowerCase().includes(searchValue.toLowerCase())\n}\n","import React, {\n createContext,\n useContext,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport type { PropsWithChildren } from 'react'\nimport { useControllableState } from '@radix-ui/react-use-controllable-state'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\nimport type { StyledBaseInputProps } from '../partials/trigger.styled'\nimport { searchQueryMatch } from '../utils'\n\ninterface ItemData {\n displayedText: string\n groupId: string | undefined\n}\n\ninterface ComboboxProviderSharedProps extends FormElementProps {\n value?: string[]\n direction?: Direction\n autoFilter: boolean\n}\n\ninterface ComboboxContextProps extends ComboboxProviderSharedProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState: boolean\n\n setValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n\n triggerRef: React.RefObject<HTMLInputElement>\n inputRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string | undefined>>\n\n placeholder?: string\n setPlaceholder: React.Dispatch<React.SetStateAction<string | undefined>>\n\n size: StyledBaseInputProps['size']\n setSize: React.Dispatch<React.SetStateAction<StyledBaseInputProps['size']>>\n\n /**\n * includes all visible and hidden items to render Chips and get filtered items\n */\n itemsMap: Map<string, ItemData>\n setItemsMap: React.Dispatch<React.SetStateAction<Map<string, ItemData>>>\n\n /**\n * @returns filtered items based on itemsMap\n * @returns empty array when searchValue is empty or auto filtering is disabled\n */\n filteredItems: ItemData[]\n}\n\ninterface ComboboxProviderProps extends ComboboxProviderSharedProps {\n open?: boolean\n defaultOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n\n defaultValue?: string[]\n onValueChange?: (value: string[]) => void\n\n searchValue?: string\n onSearchValueChange?: (value: string) => void\n}\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n open: openProp,\n defaultOpen,\n onOpen,\n onClose,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange,\n searchValue: searchValueProp,\n onSearchValueChange,\n autoFilter,\n ...restProps\n}: PropsWithChildren<ComboboxProviderProps>): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n // todo MDS-1141: remove default false value\n const [openState = false, setOpenState] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: state => {\n if (state) {\n onOpen?.()\n } else {\n onClose?.()\n }\n },\n })\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValueProp,\n onChange: onValueChange,\n })\n\n // todo MDS-1141: remove default false value\n const [searchValue = '', setSearchValue] = useControllableState({\n prop: searchValueProp,\n defaultProp: '',\n onChange: onSearchValueChange,\n })\n\n const [size, setSize] = useState<StyledBaseInputProps['size']>()\n const [placeholder, setPlaceholder] = useState<string | undefined>()\n\n const [itemsMap, setItemsMap] = useState<Map<string, ItemData>>(new Map())\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n const filteredItems = useMemo(() => {\n if (searchValue.length > 0) {\n return Array.from(itemsMap.values()).filter(item =>\n searchQueryMatch(item.displayedText, searchValue)\n )\n }\n\n return []\n }, [itemsMap, searchValue])\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n triggerRef,\n inputRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n itemsMap,\n setItemsMap,\n filteredItems,\n placeholder,\n setPlaceholder,\n size,\n setSize,\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 { BaseInput } from '@mirohq/design-system-base-input'\n\nexport const StyledActionButton = styled(BaseInput.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n medium: {\n top: '1px',\n },\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'\nimport { Trigger as RadixTrigger } from '@radix-ui/react-popover'\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 openActionLabel: string\n closeActionLabel: string\n clearable?: boolean\n clearActionLabel?: string\n}\n\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n closeActionLabel,\n clearActionLabel,\n clearable,\n size,\n}) => {\n const { openState, setOpenState, value = [], setValue } = useComboboxContext()\n\n const isEmpty = value.length === 0\n\n const onToggleClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (openState) {\n // open action will be performed by radix since it's RadixTrigger\n setOpenState(false)\n }\n\n event.stopPropagation()\n },\n [setOpenState, openState]\n )\n\n const onClearClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n setValue([])\n\n event.stopPropagation()\n },\n [setValue]\n )\n\n if (isEmpty || clearable === false || clearActionLabel === undefined) {\n return (\n <RadixTrigger asChild aria-haspopup='listbox'>\n <StyledActionButton\n label={openState ? closeActionLabel : openActionLabel}\n size={size}\n onClick={onToggleClick}\n >\n <IconChevronDown size='small' weight='thin' />\n </StyledActionButton>\n </RadixTrigger>\n )\n }\n\n return (\n <StyledActionButton\n label={clearActionLabel}\n size={size}\n onClick={onClearClick}\n >\n <IconCross size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox as AriakitComboboxTrigger } from '@ariakit/react'\nimport {\n booleanify,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { Anchor as RadixAnchor } from '@radix-ui/react-popover'\nimport type {\n BaseInputProps,\n BaseInputStyledProps,\n} from '@mirohq/design-system-base-input'\nimport { BaseInput } from '@mirohq/design-system-base-input'\nimport { mergeProps } from '@react-aria/utils'\nimport { useNewDesignLanguage } from '@mirohq/design-system-experiments'\n\nimport { StyledBaseInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\n\ninterface TriggerSharedProps extends Omit<BaseInputStyledProps, 'size'> {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: BaseInputProps['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 /**\n * The label text for Trigger's action button when Combobox is empty and closed. Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox is empty and open. Will be rendered in a Tooltip.\n */\n closeActionLabel: string\n\n /**\n * Show a button to clear the Combobox value.\n * @default true\n */\n clearable?: boolean\n}\n\nexport type TriggerProps = TriggerSharedProps &\n (\n | { clearable: false; clearActionLabel?: never }\n | {\n /**\n * The label text for Trigger's action button when Combobox has values selected. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n }\n )\n\nexport const Trigger = React.forwardRef<ElementRef<'input'>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n closeActionLabel,\n clearable = true,\n clearActionLabel,\n onChange,\n onFocus,\n css,\n // @ts-expect-error className required when extending the component with styled()\n className,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value = [],\n readOnly,\n triggerRef,\n inputRef,\n searchValue,\n setSearchValue,\n setOpenState,\n setSize,\n setPlaceholder,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n } = useFormFieldContext()\n\n const [v1] = useNewDesignLanguage()\n\n useEffect(() => {\n setSize(size)\n }, [size, setSize])\n\n useEffect(() => {\n setPlaceholder(placeholder)\n }, [setPlaceholder, placeholder])\n\n const valid = formFieldValid ?? comboboxValid\n\n const scrollIntoView = (\n event: React.FocusEvent<HTMLInputElement>\n ): void => {\n const trigger = triggerRef?.current\n const baseInput = inputRef?.current?.parentElement\n\n if (baseInput != null && trigger != null) {\n event.preventDefault()\n baseInput.scrollTo({\n top: trigger.scrollHeight,\n })\n }\n\n if (onFocus !== undefined) {\n onFocus(event)\n }\n }\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onChange?.(e)\n }\n\n return (\n <RadixAnchor\n ref={mergeRefs([triggerRef, forwardRef])}\n // todo MDS-1112: move this logic to AriakitComboboxTrigger's showOnClick\n onClick={() => {\n if (\n !booleanify(disabled) &&\n !booleanify(ariaDisabled) &&\n !booleanify(readOnly)\n ) {\n setOpenState(true)\n }\n }}\n >\n <AriakitComboboxTrigger\n render={({ ref: ariakitTriggerRef, ...ariakitProps }) => (\n <StyledBaseInput\n aria-disabled={ariaDisabled}\n valid={valid}\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n onChange={onInputChange}\n css={css}\n v1={v1}\n // @ts-expect-error className required when extending the component with styled()\n className={className}\n >\n <BaseInput.Input\n {...mergeProps(ariakitProps, restProps)}\n ref={mergeRefs([\n inputRef,\n ariakitTriggerRef as React.RefObject<HTMLInputElement>,\n ])}\n value={searchValue}\n id={id ?? formElementId}\n aria-describedby={stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n )}\n aria-invalid={ariaInvalid ?? formFieldAriaInvalid}\n placeholder={\n children === null ||\n children === undefined ||\n value.length === 0\n ? placeholder\n : undefined\n }\n onFocus={scrollIntoView}\n />\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n closeActionLabel={closeActionLabel}\n clearActionLabel={clearActionLabel}\n clearable={clearable}\n size={size}\n />\n </StyledBaseInput>\n )}\n />\n </RadixAnchor>\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'\nimport {\n contentStyles,\n itemsContainerStyles,\n} from '@mirohq/design-system-base-select'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledItemsContainer = styled(Primitive.div, itemsContainerStyles)\n\nexport const StyledContent = styled(RadixPopover.Content, {\n ...contentStyles,\n width: 'var(--radix-popover-trigger-width)',\n overflowY: 'auto',\n boxSizing: 'border-box',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\n\nexport const useDocumentFragment = (): DocumentFragment | undefined => {\n const [fragment, setFragment] = React.useState<DocumentFragment>()\n\n // we need `useLayoutEffect` here because `DocumentFragment` doesn't exist on the server\n useLayoutEffect(() => {\n setFragment(new DocumentFragment())\n }, [])\n\n return fragment\n}\n","import React, { useCallback } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useDocumentFragment } from './use-document-fragment'\n\n/**\n * Render content in DocumentFragment so items can send its text value to context,\n * otherwise we will have empty chips.\n * Content won't be visible in DOM.\n */\nexport const useInvisibleContent = (): ((\n children: React.ReactNode\n) => React.ReactElement | null) => {\n const fragment = useDocumentFragment()\n\n return useCallback(\n (children: React.ReactNode): React.ReactElement | null =>\n fragment !== undefined\n ? createPortal(<div>{children}</div>, fragment)\n : null,\n [fragment]\n )\n}\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\nimport { ScrollArea } from '@mirohq/design-system-scroll-area'\nimport { theme } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\nimport { ComboboxList as AriakitComboboxList } from '@ariakit/react'\n\nimport { StyledContent, StyledItemsContainer } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport type {\n Align,\n Overflow,\n PointerDownOutsideEvent,\n Side,\n Sticky,\n} from '../types'\nimport { useInvisibleContent } from '../hooks/use-invisible-content'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\nconst RADIX_CONTENT_AVAILABLE_HEIGHT =\n 'var(--radix-popover-content-available-height)'\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 /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\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 * The preferred side of the anchor to render against when open. Will be\n * reversed when collisions occur and avoidCollisions is enabled.\n * @default 'bottom'\n */\n side?: Side\n\n /**\n * The distance in pixels from the anchor.\n * @default CONTENT_OFFSET\n */\n sideOffset?: number\n\n /**\n * The preferred alignment against the anchor. May change when collisions\n * occur.\n * @default 'center'\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options.\n * @default 0\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with boundary edges.\n * @default true\n */\n avoidCollisions?: boolean\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 distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides), or a partial padding\n * object, for example: { top: 20, left: 20 }.\n * @default 0\n */\n collisionPadding?: number | Partial<Record<Side, number>>\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in the\n * boundary as long as the trigger is at least partially in the boundary whilst\n * \"always\" will keep the content in the boundary regardless.\n * @default 'partial'\n */\n sticky?: Sticky\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n * @default true\n */\n hideWhenDetached?: boolean\n\n /**\n * The max height for the content.\n */\n maxHeight?: CSSProperties['maxHeight']\n\n /**\n * Setting overflow as \"visible\" means that the content can extend beyond\n * its collision boundary without any clipping or scrolling being\n * applied.\n * When set to \"auto,\" a scrollbar is added if the content exceeds its\n * boundaries. If no maxHeight is defined, it will be automatically adjusted\n * to fit the remaining space between the trigger and the boundary edge.\n * @default 'visible'\n */\n overflow?: Overflow\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n side = 'bottom',\n sideOffset = CONTENT_OFFSET,\n align = 'center',\n alignOffset = 0,\n collisionPadding = 0,\n avoidCollisions = true,\n sticky = 'partial',\n hideWhenDetached = true,\n overflow = 'visible',\n maxHeight,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const { triggerRef, contentRef, direction, openState } =\n useComboboxContext()\n\n const getInvisibleContent = useInvisibleContent()\n\n if (!openState) {\n return getInvisibleContent(children)\n }\n\n const content = <StyledItemsContainer>{children}</StyledItemsContainer>\n\n return (\n <StyledContent\n {...restProps}\n dir={direction}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\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 {/* we have to specify role here otherwise it would be overwritten by Radix.Content */}\n <AriakitComboboxList role='listbox'>\n {overflow === 'auto' ? (\n <ScrollArea type='always' dir={direction}>\n <ScrollArea.Viewport\n css={{\n maxHeight:\n maxHeight !== undefined\n ? `min(${RADIX_CONTENT_AVAILABLE_HEIGHT}, ${\n typeof maxHeight === 'number'\n ? `${maxHeight}px`\n : maxHeight\n })`\n : RADIX_CONTENT_AVAILABLE_HEIGHT,\n }}\n >\n {content}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea>\n ) : (\n content\n )}\n </AriakitComboboxList>\n </StyledContent>\n )\n }\n)\n","import { ComboboxItem } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { itemStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledItem = styled(ComboboxItem, itemStyles)\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React, { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\ninterface GroupProviderSharedProps extends FormElementProps {\n groupId?: string\n}\n\ninterface GroupContextProps extends GroupProviderSharedProps {}\n\ninterface GroupProviderProps extends GroupProviderSharedProps {}\n\nconst GroupContext = createContext<GroupContextProps>({} as any)\n\nexport const GroupProvider = ({\n children,\n ...restProps\n}: PropsWithChildren<GroupProviderProps>): JSX.Element => (\n <GroupContext.Provider\n value={{\n ...restProps,\n }}\n >\n {children}\n </GroupContext.Provider>\n)\n\nexport const useGroupContext = (): GroupContextProps => useContext(GroupContext)\n","import React, { useMemo } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { mergeProps } from '@react-aria/utils'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\nimport { StyledItemCheck } from '@mirohq/design-system-base-select'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { useGroupContext } from '../hooks/use-group-context'\nimport { searchQueryMatch } from '../utils'\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 {\n searchValue,\n autoFilter,\n setItemsMap,\n triggerRef,\n inputRef,\n value: comboboxValue = [],\n } = useComboboxContext()\n\n const { groupId } = useGroupContext()\n\n const displayedText = useMemo((): string => {\n if (textValue !== undefined) {\n return textValue\n }\n\n return typeof children === 'string' ? children : ''\n }, [textValue, children])\n\n useLayoutEffect(() => {\n setItemsMap(\n prevState => new Map(prevState.set(value, { displayedText, groupId }))\n )\n\n return () => {\n setItemsMap(prevState => {\n prevState.delete(value)\n return new Map(prevState)\n })\n }\n }, [setItemsMap, groupId, value, displayedText])\n\n if (\n autoFilter &&\n searchValue.length > 0 &&\n !searchQueryMatch(displayedText, searchValue)\n ) {\n return null\n }\n\n const scrollIntoView = (event: React.MouseEvent<HTMLDivElement>): void => {\n if (\n inputRef?.current?.parentElement != null &&\n triggerRef?.current != null\n ) {\n inputRef.current.parentElement.scrollTo({\n top: triggerRef.current.scrollHeight,\n })\n }\n\n if (restProps.onClick !== undefined) {\n restProps.onClick(event)\n }\n }\n\n // todo MDS-1142 find a better way to fix blinking.\n // We need to use custom state because Ariakit changes its state internally on click even for controlled Combobox\n // and it case `aria-selected` value and checkmark to blink.\n const isSelected = comboboxValue.includes(value)\n\n return (\n <StyledItem\n {...mergeProps(restProps, restAriaDisabledProps)}\n focusable\n hideOnClick={false}\n accessibleWhenDisabled={booleanify(ariaDisabled)}\n disabled={booleanify(ariaDisabled) || disabled}\n ref={forwardRef}\n value={value}\n onClick={scrollIntoView}\n aria-selected={isSelected}\n >\n <AriakitComboboxItemCheck\n checked={isSelected}\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\n size='small'\n data-testid={\n process.env.NODE_ENV === 'test'\n ? 'combobox-item-check'\n : undefined\n }\n />\n </AriakitComboboxItemCheck>\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\nimport { useComboboxContext } from '../hooks/use-combobox-context'\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> = ({\n forceMount: forceMountProp,\n ...restProps\n}) => {\n const { openState } = useComboboxContext()\n\n // We always need to render content with items to be able to render Chips in Value,\n // but without forceMount Radix will not render Portal when Popover is closed\n const forceMount = !openState || forceMountProp\n\n return <RadixPortal forceMount={forceMount} {...restProps} />\n}\n","import { Group as AriakitGroup } from '@ariakit/react'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(AriakitGroup, {})\n\nexport type StyledGroupProps = StrictComponentProps<typeof StyledGroup>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useId } from '@mirohq/design-system-use-id'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport type { StyledGroupProps } from './group.styled'\nimport { StyledGroup } from './group.styled'\nimport { useInvisibleContent } from '../hooks/use-invisible-content'\nimport { GroupProvider } from '../hooks/use-group-context'\n\nexport type GroupProps = StyledGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, searchValue, filteredItems } = useComboboxContext()\n\n const id = useId()\n const getInvisibleContent = useInvisibleContent()\n\n let hasVisibleContent = true\n\n if (autoFilter && searchValue.length > 0) {\n hasVisibleContent = filteredItems.some(item => item.groupId === id)\n }\n\n return (\n <GroupProvider groupId={id}>\n {hasVisibleContent ? (\n <StyledGroup {...rest} ref={forwardRef}>\n {children}\n </StyledGroup>\n ) : (\n getInvisibleContent(children)\n )}\n </GroupProvider>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { groupLabelStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledGroupLabel = styled(GroupLabel, groupLabelStyles)\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 React, { useCallback } from 'react'\nimport type { FC } from 'react'\nimport { Chip } from '@mirohq/design-system-chip'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ValueProps {\n /**\n * The label to make the remove button recognizable by the screen readers.\n */\n unselectAriaLabel: string\n}\n\nexport const Value: FC<ValueProps> = ({ unselectAriaLabel }) => {\n const {\n value = [],\n setValue,\n disabled,\n readOnly,\n 'aria-disabled': ariaDisabled,\n itemsMap,\n } = useComboboxContext()\n const canRemoveItem =\n !booleanify(ariaDisabled) && !booleanify(disabled) && !booleanify(readOnly)\n\n const onItemRemove = useCallback(\n (item: string): void => {\n setValue(prevValue => prevValue?.filter(value => value !== item))\n },\n [setValue]\n )\n\n const getItemText = useCallback(\n (itemValue: string) => {\n const itemData = itemsMap.get(itemValue)\n if (itemData === undefined || itemData.displayedText === '') {\n return null\n }\n\n return (\n <Chip\n key={itemValue}\n onRemove={e => {\n onItemRemove(itemValue)\n e.stopPropagation()\n }}\n removable={canRemoveItem}\n removeAriaLabel={`${unselectAriaLabel} ${itemData.displayedText}`}\n data-testid={\n process.env.NODE_ENV === 'test'\n ? `combobox-value-${itemValue}`\n : undefined\n }\n >\n {itemData.displayedText}\n </Chip>\n )\n },\n [canRemoveItem, itemsMap, onItemRemove, unselectAriaLabel]\n )\n\n return <>{value.map(getItemText)}</>\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { separatorStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledSeparator = styled(Primitive.div, separatorStyles)\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\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 const { autoFilter, searchValue } = useComboboxContext()\n\n if (autoFilter && searchValue.length > 0) {\n return null\n }\n\n return <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 StyledNativeSelect = styled(Primitive.select, {\n // if we support autoComplete, we would have to use visually-hidden styles here\n display: 'none',\n})\n\nexport const StyledComboboxContent = styled(Primitive.div, {\n position: 'relative',\n width: '100%',\n})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledNoResult = styled(Primitive.div, {\n padding: '$100',\n})\n\nexport type StyledNoResultProps = StrictComponentProps<typeof StyledNoResult>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\n\nimport type { StyledNoResultProps } from './no-result.styled'\nimport { StyledNoResult } from './no-result.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface NoResultProps extends StyledNoResultProps {\n /**\n * The content.\n */\n children?: ReactNode\n}\n\nexport const NoResult = React.forwardRef<\n ElementRef<typeof StyledNoResult>,\n NoResultProps\n>((props, forwardRef) => {\n const { autoFilter, searchValue, filteredItems, itemsMap } =\n useComboboxContext()\n\n // when filtering is disabled or idle, just checking if there are any items provided\n const noActiveFiltering =\n !autoFilter || (autoFilter && searchValue.length === 0)\n\n const isVisible = noActiveFiltering\n ? itemsMap.size === 0\n : filteredItems.length === 0\n\n if (isVisible) {\n return <StyledNoResult {...props} ref={forwardRef} />\n }\n\n return null\n})\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport {\n BaseTooltipProvider,\n useBaseTooltipContext,\n} from '@mirohq/design-system-base-tooltip'\nimport { usePrevious } from '@mirohq/design-system-use-previous'\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, StyledNativeSelect } from './combobox.styled'\nimport type { StyledComboboxProps } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { Direction } from './types'\nimport { NoResult } from './partials/no-result'\n\nexport interface ComboboxProps extends FormElementProps, StyledComboboxProps {\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 controlled search value to filter items. Should be used in conjunction with\n * onSearchValueChange.\n */\n searchValue?: string\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 * The name of the combobox. Submitted with its owning form as part of a\n * name/value pair.\n */\n name?: string\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n { value: valueProp, onValueChange, name, children, ...restProps },\n forwardRef\n ) => {\n const {\n openState,\n setOpenState,\n value = [],\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n size,\n placeholder,\n triggerRef,\n } = useComboboxContext()\n\n const {\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n label,\n isFloatingLabel,\n focused,\n formElementRef,\n } = useFormFieldContext<HTMLSelectElement>()\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 { ignoreNextTooltip } = useBaseTooltipContext()\n const prevOpen = usePrevious(openState)\n\n useEffect(() => {\n if (prevOpen === true && !openState) {\n ignoreNextTooltip()\n }\n }, [ignoreNextTooltip, openState, prevOpen])\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined || value.length !== 0 || focused\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n setValue(typeof newValue === 'string' ? [newValue] : newValue)\n }\n\n const onOpenChange = (value: boolean): void => {\n if (!booleanify(readOnly)) {\n setOpenState(value)\n }\n }\n\n const isFormControl = Boolean(triggerRef.current?.closest('form'))\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={onOpenChange}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={onOpenChange}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent\n ref={forwardRef}\n {...restProps}\n dir={direction}\n data-form-element='select'\n >\n {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n {isFormControl && (\n <StyledNativeSelect\n multiple\n autoComplete='off'\n name={name}\n tabIndex={-1}\n aria-hidden='true'\n ref={formElementRef}\n required={required}\n disabled={disabled}\n aria-disabled={ariaDisabled}\n value={value}\n // since we don't support autoComplete there is no way this select value will change,\n // although we still need to provide `onChange` since we use `value` and not `defaultValue`\n onChange={() => {}}\n >\n {value.length === 0 ? (\n <option value='' />\n ) : (\n // since we don't support autoComplete we can render here only selected values\n value.map(itemValue => (\n <option key={itemValue} value={itemValue}>\n {itemValue}\n </option>\n ))\n )}\n </StyledNativeSelect>\n )}\n </RadixPopover.Root>\n )\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 onClose,\n searchValue,\n onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\n searchValue={searchValue}\n onSearchValueChange={onSearchValueChange}\n defaultOpen={defaultOpen}\n open={open}\n onOpen={onOpen}\n onClose={onClose}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n autoFilter={autoFilter}\n >\n <BaseTooltipProvider>\n <Root {...restProps} value={value} ref={forwardRef} />\n </BaseTooltipProvider>\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 NoResult: typeof NoResult\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\nCombobox.NoResult = NoResult\n"],"names":["styled","BaseInput","createContext","useRef","useControllableState","useState","useFormFieldContext","useMemo","jsx","useContext","useCallback","RadixTrigger","IconChevronDown","IconCross","React","useNewDesignLanguage","useEffect","RadixAnchor","mergeRefs","booleanify","AriakitComboboxTrigger","jsxs","mergeProps","stringAttrValue","Primitive","itemsContainerStyles","RadixPopover","contentStyles","useLayoutEffect","createPortal","theme","AriakitComboboxList","ScrollArea","ComboboxItem","itemStyles","useAriaDisabled","AriakitComboboxItemCheck","StyledItemCheck","IconCheckMark","RadixPortal","AriakitGroup","useId","GroupLabel","groupLabelStyles","value","Chip","Fragment","separatorStyles","useBaseTooltipContext","usePrevious","AriakitComboboxProvider","FloatingLabel","B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AAA,EAAY,CACtD,EAAA,CAAA;AAAA,KAAA;AAAA,GACF;AAEJ,EAAA;AAcA,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,CAAA;AACjB,QAAA,CAAS,SAAY,GAAA,SAAA,CAAA;AACrB,QAAA,CAAS,QAAW,GAAA,QAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/partials/trigger.styled.tsx","../src/utils.ts","../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/hooks/use-document-fragment.ts","../src/hooks/use-invisible-content.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/hooks/use-group-context.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.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.styled.tsx","../src/partials/no-result.styled.tsx","../src/partials/no-result.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { BaseInput } from '@mirohq/design-system-base-input'\nimport type { ComponentPropsWithRef } from 'react'\n\nexport const StyledBaseInput = styled(BaseInput, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '$50',\n\n '&[data-valid], &[data-invalid]': {\n // we don't need a bigger padding here as Input component will render its own icon\n paddingRight: '$100',\n },\n\n '& input': {\n minWidth: '$8',\n flexBasis: 0,\n flexGrow: 1,\n },\n\n variants: {\n size: {\n medium: {\n minHeight: '$8',\n height: 'auto',\n padding: '3px $100',\n paddingRight: '$500',\n fontSize: '$175',\n },\n large: {\n minHeight: '$10',\n height: 'auto',\n padding: '5px $100',\n paddingRight: '$500',\n },\n 'x-large': {\n minHeight: '$12',\n height: 'auto',\n padding: '5px $100',\n paddingRight: '$500',\n fontSize: '$200',\n lineHeight: '$500',\n },\n },\n },\n})\n\nexport type StyledBaseInputProps = ComponentPropsWithRef<typeof StyledBaseInput>\n","export function searchQueryMatch(\n displayedText: string,\n searchValue: string\n): boolean {\n return displayedText.toLowerCase().includes(searchValue.toLowerCase())\n}\n","import React, {\n createContext,\n useContext,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { useControllableState } from '@radix-ui/react-use-controllable-state'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\nimport type { StyledBaseInputProps } from '../partials/trigger.styled'\nimport { searchQueryMatch } from '../utils'\n\ninterface ItemData {\n displayedText: string\n groupId: string | undefined\n}\n\ninterface ComboboxProviderSharedProps extends FormElementProps {\n value?: string[]\n direction?: Direction\n autoFilter: boolean\n}\n\ninterface ComboboxContextProps extends ComboboxProviderSharedProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState: boolean\n\n setValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n\n triggerRef: React.RefObject<HTMLInputElement>\n inputRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string | undefined>>\n\n placeholder?: string\n setPlaceholder: React.Dispatch<React.SetStateAction<string | undefined>>\n\n size: StyledBaseInputProps['size']\n setSize: React.Dispatch<React.SetStateAction<StyledBaseInputProps['size']>>\n\n /**\n * includes all visible and hidden items to render Chips and get filtered items\n */\n itemsMap: Map<string, ItemData>\n setItemsMap: React.Dispatch<React.SetStateAction<Map<string, ItemData>>>\n\n /**\n * @returns filtered items based on itemsMap\n * @returns empty array when searchValue is empty or auto filtering is disabled\n */\n filteredItems: ItemData[]\n}\n\ninterface ComboboxProviderProps extends ComboboxProviderSharedProps {\n children?: React.ReactNode\n open?: boolean\n defaultOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n\n defaultValue?: string[]\n onValueChange?: (value: string[]) => void\n\n searchValue?: string\n onSearchValueChange?: (value: string) => void\n}\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n open: openProp,\n defaultOpen,\n onOpen,\n onClose,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange,\n searchValue: searchValueProp,\n onSearchValueChange,\n autoFilter,\n ...restProps\n}: ComboboxProviderProps): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n // todo MDS-1141: remove default false value\n const [openState = false, setOpenState] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: state => {\n if (state) {\n onOpen?.()\n } else {\n onClose?.()\n }\n },\n })\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValueProp,\n onChange: onValueChange,\n })\n\n // todo MDS-1141: remove default false value\n const [searchValue = '', setSearchValue] = useControllableState({\n prop: searchValueProp,\n defaultProp: '',\n onChange: onSearchValueChange,\n })\n\n const [size, setSize] = useState<StyledBaseInputProps['size']>()\n const [placeholder, setPlaceholder] = useState<string | undefined>()\n\n const [itemsMap, setItemsMap] = useState<Map<string, ItemData>>(new Map())\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n const filteredItems = useMemo(() => {\n if (searchValue.length > 0) {\n return Array.from(itemsMap.values()).filter(item =>\n searchQueryMatch(item.displayedText, searchValue)\n )\n }\n\n return []\n }, [itemsMap, searchValue])\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n triggerRef,\n inputRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n itemsMap,\n setItemsMap,\n filteredItems,\n placeholder,\n setPlaceholder,\n size,\n setSize,\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 { BaseInput } from '@mirohq/design-system-base-input'\n\nexport const StyledActionButton = styled(BaseInput.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n medium: {\n top: '1px',\n },\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'\nimport { Trigger as RadixTrigger } from '@radix-ui/react-popover'\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 openActionLabel: string\n closeActionLabel: string\n clearable?: boolean\n clearActionLabel?: string\n}\n\nexport const TriggerActionButton = ({\n openActionLabel,\n closeActionLabel,\n clearActionLabel,\n clearable,\n size,\n}: TriggerActionButtonProps): React.ReactNode => {\n const { openState, setOpenState, value = [], setValue } = useComboboxContext()\n\n const isEmpty = value.length === 0\n\n const onToggleClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (openState) {\n // open action will be performed by radix since it's RadixTrigger\n setOpenState(false)\n }\n\n event.stopPropagation()\n },\n [setOpenState, openState]\n )\n\n const onClearClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n setValue([])\n\n event.stopPropagation()\n },\n [setValue]\n )\n\n if (isEmpty || clearable === false || clearActionLabel === undefined) {\n return (\n <RadixTrigger asChild aria-haspopup='listbox'>\n <StyledActionButton\n label={openState ? closeActionLabel : openActionLabel}\n size={size}\n onClick={onToggleClick}\n >\n <IconChevronDown size='small' weight='thin' />\n </StyledActionButton>\n </RadixTrigger>\n )\n }\n\n return (\n <StyledActionButton\n label={clearActionLabel}\n size={size}\n onClick={onClearClick}\n >\n <IconCross size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox as AriakitComboboxTrigger } from '@ariakit/react'\nimport {\n booleanify,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { Anchor as RadixAnchor } from '@radix-ui/react-popover'\nimport type {\n BaseInputProps,\n BaseInputStyledProps,\n} from '@mirohq/design-system-base-input'\nimport { BaseInput } from '@mirohq/design-system-base-input'\nimport { mergeProps } from '@react-aria/utils'\n\nimport { StyledBaseInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\n\ninterface TriggerSharedProps extends Omit<BaseInputStyledProps, 'size'> {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: BaseInputProps['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 /**\n * The label text for Trigger's action button when Combobox is empty and closed. Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox is empty and open. Will be rendered in a Tooltip.\n */\n closeActionLabel: string\n\n /**\n * Show a button to clear the Combobox value.\n * @default true\n */\n clearable?: boolean\n}\n\nexport type TriggerProps = TriggerSharedProps &\n (\n | { clearable: false; clearActionLabel?: never }\n | {\n /**\n * The label text for Trigger's action button when Combobox has values selected. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n }\n )\n\nexport const Trigger = React.forwardRef<ElementRef<'input'>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n closeActionLabel,\n clearable = true,\n clearActionLabel,\n onChange,\n onFocus,\n css,\n // @ts-expect-error className required when extending the component with styled()\n className,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value = [],\n readOnly,\n triggerRef,\n inputRef,\n searchValue,\n setSearchValue,\n setOpenState,\n setSize,\n setPlaceholder,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n } = useFormFieldContext()\n\n useEffect(() => {\n setSize(size)\n }, [size, setSize])\n\n useEffect(() => {\n setPlaceholder(placeholder)\n }, [setPlaceholder, placeholder])\n\n const valid = formFieldValid ?? comboboxValid\n\n const scrollIntoView = (\n event: React.FocusEvent<HTMLInputElement>\n ): void => {\n const trigger = triggerRef?.current\n const baseInput = inputRef?.current?.parentElement\n\n if (baseInput != null && trigger != null) {\n event.preventDefault()\n baseInput.scrollTo({\n top: trigger.scrollHeight,\n })\n }\n\n if (onFocus !== undefined) {\n onFocus(event)\n }\n }\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onChange?.(e)\n }\n\n return (\n <RadixAnchor\n ref={mergeRefs([triggerRef, forwardRef])}\n // todo MDS-1112: move this logic to AriakitComboboxTrigger's showOnClick\n onClick={() => {\n if (\n !booleanify(disabled) &&\n !booleanify(ariaDisabled) &&\n !booleanify(readOnly)\n ) {\n setOpenState(true)\n }\n }}\n >\n <AriakitComboboxTrigger\n render={({ ref: ariakitTriggerRef, ...ariakitProps }) => (\n <StyledBaseInput\n aria-disabled={ariaDisabled}\n valid={valid}\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n onChange={onInputChange}\n css={css}\n // @ts-expect-error className required when extending the component with styled()\n className={className}\n >\n <BaseInput.Input\n {...mergeProps(ariakitProps, restProps)}\n ref={mergeRefs([\n inputRef,\n ariakitTriggerRef as React.RefObject<HTMLInputElement>,\n ])}\n value={searchValue}\n id={id ?? formElementId}\n aria-describedby={stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n )}\n aria-invalid={ariaInvalid ?? formFieldAriaInvalid}\n placeholder={\n children === null ||\n children === undefined ||\n value.length === 0\n ? placeholder\n : undefined\n }\n onFocus={scrollIntoView}\n />\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n closeActionLabel={closeActionLabel}\n clearActionLabel={clearActionLabel}\n clearable={clearable}\n size={size}\n />\n </StyledBaseInput>\n )}\n />\n </RadixAnchor>\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'\nimport {\n contentStyles,\n itemsContainerStyles,\n} from '@mirohq/design-system-base-select'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledItemsContainer = styled(Primitive.div, itemsContainerStyles)\n\nexport const StyledContent = styled(RadixPopover.Content, {\n ...contentStyles,\n width: 'var(--radix-popover-trigger-width)',\n overflowY: 'auto',\n boxSizing: 'border-box',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\n\nexport const useDocumentFragment = (): DocumentFragment | undefined => {\n const [fragment, setFragment] = React.useState<DocumentFragment>()\n\n // we need `useLayoutEffect` here because `DocumentFragment` doesn't exist on the server\n useLayoutEffect(() => {\n setFragment(new DocumentFragment())\n }, [])\n\n return fragment\n}\n","import React, { useCallback } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useDocumentFragment } from './use-document-fragment'\n\n/**\n * Render content in DocumentFragment so items can send its text value to context,\n * otherwise we will have empty chips.\n * Content won't be visible in DOM.\n */\nexport const useInvisibleContent = (): ((\n children: React.ReactNode\n) => React.ReactElement | null) => {\n const fragment = useDocumentFragment()\n\n return useCallback(\n (children: React.ReactNode): React.ReactElement | null =>\n fragment !== undefined\n ? createPortal(<div>{children}</div>, fragment)\n : null,\n [fragment]\n )\n}\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\nimport { ScrollArea } from '@mirohq/design-system-scroll-area'\nimport { theme } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\nimport { ComboboxList as AriakitComboboxList } from '@ariakit/react'\n\nimport { StyledContent, StyledItemsContainer } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport type {\n Align,\n Overflow,\n PointerDownOutsideEvent,\n Side,\n Sticky,\n} from '../types'\nimport { useInvisibleContent } from '../hooks/use-invisible-content'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\nconst RADIX_CONTENT_AVAILABLE_HEIGHT =\n 'var(--radix-popover-content-available-height)'\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 /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\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 * The preferred side of the anchor to render against when open. Will be\n * reversed when collisions occur and avoidCollisions is enabled.\n * @default 'bottom'\n */\n side?: Side\n\n /**\n * The distance in pixels from the anchor.\n * @default CONTENT_OFFSET\n */\n sideOffset?: number\n\n /**\n * The preferred alignment against the anchor. May change when collisions\n * occur.\n * @default 'center'\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options.\n * @default 0\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with boundary edges.\n * @default true\n */\n avoidCollisions?: boolean\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 distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides), or a partial padding\n * object, for example: { top: 20, left: 20 }.\n * @default 0\n */\n collisionPadding?: number | Partial<Record<Side, number>>\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in the\n * boundary as long as the trigger is at least partially in the boundary whilst\n * \"always\" will keep the content in the boundary regardless.\n * @default 'partial'\n */\n sticky?: Sticky\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n * @default true\n */\n hideWhenDetached?: boolean\n\n /**\n * The max height for the content.\n */\n maxHeight?: CSSProperties['maxHeight']\n\n /**\n * Setting overflow as \"visible\" means that the content can extend beyond\n * its collision boundary without any clipping or scrolling being\n * applied.\n * When set to \"auto,\" a scrollbar is added if the content exceeds its\n * boundaries. If no maxHeight is defined, it will be automatically adjusted\n * to fit the remaining space between the trigger and the boundary edge.\n * @default 'visible'\n */\n overflow?: Overflow\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n side = 'bottom',\n sideOffset = CONTENT_OFFSET,\n align = 'center',\n alignOffset = 0,\n collisionPadding = 0,\n avoidCollisions = true,\n sticky = 'partial',\n hideWhenDetached = true,\n overflow = 'visible',\n maxHeight,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const { triggerRef, contentRef, direction, openState } =\n useComboboxContext()\n\n const getInvisibleContent = useInvisibleContent()\n\n if (!openState) {\n return getInvisibleContent(children)\n }\n\n const content = <StyledItemsContainer>{children}</StyledItemsContainer>\n\n return (\n <StyledContent\n {...restProps}\n dir={direction}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\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 {/* we have to specify role here otherwise it would be overwritten by Radix.Content */}\n <AriakitComboboxList role='listbox'>\n {overflow === 'auto' ? (\n <ScrollArea type='always' dir={direction}>\n <ScrollArea.Viewport\n css={{\n maxHeight:\n maxHeight !== undefined\n ? `min(${RADIX_CONTENT_AVAILABLE_HEIGHT}, ${\n typeof maxHeight === 'number'\n ? `${maxHeight}px`\n : maxHeight\n })`\n : RADIX_CONTENT_AVAILABLE_HEIGHT,\n }}\n >\n {content}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea>\n ) : (\n content\n )}\n </AriakitComboboxList>\n </StyledContent>\n )\n }\n)\n","import { ComboboxItem } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { itemStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledItem = styled(ComboboxItem, itemStyles)\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React, { createContext, useContext } from 'react'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\ninterface GroupProviderSharedProps extends FormElementProps {\n groupId?: string\n}\n\ninterface GroupContextProps extends GroupProviderSharedProps {}\n\ninterface GroupProviderProps extends GroupProviderSharedProps {\n children: React.ReactNode\n}\n\nconst GroupContext = createContext<GroupContextProps>({} as any)\n\nexport const GroupProvider = ({\n children,\n ...restProps\n}: GroupProviderProps): JSX.Element => (\n <GroupContext.Provider\n value={{\n ...restProps,\n }}\n >\n {children}\n </GroupContext.Provider>\n)\n\nexport const useGroupContext = (): GroupContextProps => useContext(GroupContext)\n","import React, { useMemo } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { mergeProps } from '@react-aria/utils'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\nimport { StyledItemCheck } from '@mirohq/design-system-base-select'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { useGroupContext } from '../hooks/use-group-context'\nimport { searchQueryMatch } from '../utils'\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 {\n searchValue,\n autoFilter,\n setItemsMap,\n triggerRef,\n inputRef,\n value: comboboxValue = [],\n } = useComboboxContext()\n\n const { groupId } = useGroupContext()\n\n const displayedText = useMemo((): string => {\n if (textValue !== undefined) {\n return textValue\n }\n\n return typeof children === 'string' ? children : ''\n }, [textValue, children])\n\n useLayoutEffect(() => {\n setItemsMap(\n prevState => new Map(prevState.set(value, { displayedText, groupId }))\n )\n\n return () => {\n setItemsMap(prevState => {\n prevState.delete(value)\n return new Map(prevState)\n })\n }\n }, [setItemsMap, groupId, value, displayedText])\n\n if (\n autoFilter &&\n searchValue.length > 0 &&\n !searchQueryMatch(displayedText, searchValue)\n ) {\n return null\n }\n\n const scrollIntoView = (event: React.MouseEvent<HTMLDivElement>): void => {\n if (\n inputRef?.current?.parentElement != null &&\n triggerRef?.current != null\n ) {\n inputRef.current.parentElement.scrollTo({\n top: triggerRef.current.scrollHeight,\n })\n }\n\n if (restProps.onClick !== undefined) {\n restProps.onClick(event)\n }\n }\n\n // todo MDS-1142 find a better way to fix blinking.\n // We need to use custom state because Ariakit changes its state internally on click even for controlled Combobox\n // and it case `aria-selected` value and checkmark to blink.\n const isSelected = comboboxValue.includes(value)\n\n return (\n <StyledItem\n {...mergeProps(restProps, restAriaDisabledProps)}\n focusable\n hideOnClick={false}\n accessibleWhenDisabled={booleanify(ariaDisabled)}\n disabled={booleanify(ariaDisabled) || disabled}\n ref={forwardRef}\n value={value}\n onClick={scrollIntoView}\n aria-selected={isSelected}\n >\n <AriakitComboboxItemCheck\n checked={isSelected}\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\n size='small'\n data-testid={\n process.env.NODE_ENV === 'test'\n ? 'combobox-item-check'\n : undefined\n }\n />\n </AriakitComboboxItemCheck>\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\nimport { useComboboxContext } from '../hooks/use-combobox-context'\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 = ({\n forceMount: forceMountProp,\n ...restProps\n}: PortalProps): React.ReactNode => {\n const { openState } = useComboboxContext()\n\n // We always need to render content with items to be able to render Chips in Value,\n // but without forceMount Radix will not render Portal when Popover is closed\n const forceMount = !openState || forceMountProp\n\n return <RadixPortal forceMount={forceMount} {...restProps} />\n}\n","import { Group as AriakitGroup } from '@ariakit/react'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(AriakitGroup, {})\n\nexport type StyledGroupProps = StrictComponentProps<typeof StyledGroup>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useId } from '@mirohq/design-system-use-id'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport type { StyledGroupProps } from './group.styled'\nimport { StyledGroup } from './group.styled'\nimport { useInvisibleContent } from '../hooks/use-invisible-content'\nimport { GroupProvider } from '../hooks/use-group-context'\n\nexport type GroupProps = StyledGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, searchValue, filteredItems } = useComboboxContext()\n\n const id = useId()\n const getInvisibleContent = useInvisibleContent()\n\n let hasVisibleContent = true\n\n if (autoFilter && searchValue.length > 0) {\n hasVisibleContent = filteredItems.some(item => item.groupId === id)\n }\n\n return (\n <GroupProvider groupId={id}>\n {hasVisibleContent ? (\n <StyledGroup {...rest} ref={forwardRef}>\n {children}\n </StyledGroup>\n ) : (\n getInvisibleContent(children)\n )}\n </GroupProvider>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { groupLabelStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledGroupLabel = styled(GroupLabel, groupLabelStyles)\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 React, { useCallback } from 'react'\nimport type { FC } from 'react'\nimport { Chip } from '@mirohq/design-system-chip'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ValueProps {\n /**\n * The label to make the remove button recognizable by the screen readers.\n */\n unselectAriaLabel: string\n}\n\nexport const Value: FC<ValueProps> = ({ unselectAriaLabel }) => {\n const {\n value = [],\n setValue,\n disabled,\n readOnly,\n 'aria-disabled': ariaDisabled,\n itemsMap,\n } = useComboboxContext()\n const canRemoveItem =\n !booleanify(ariaDisabled) && !booleanify(disabled) && !booleanify(readOnly)\n\n const onItemRemove = useCallback(\n (item: string): void => {\n setValue(prevValue => prevValue?.filter(value => value !== item))\n },\n [setValue]\n )\n\n const getItemText = useCallback(\n (itemValue: string) => {\n const itemData = itemsMap.get(itemValue)\n if (itemData === undefined || itemData.displayedText === '') {\n return null\n }\n\n return (\n <Chip\n key={itemValue}\n onRemove={e => {\n onItemRemove(itemValue)\n e.stopPropagation()\n }}\n removable={canRemoveItem}\n removeAriaLabel={`${unselectAriaLabel} ${itemData.displayedText}`}\n data-testid={\n process.env.NODE_ENV === 'test'\n ? `combobox-value-${itemValue}`\n : undefined\n }\n >\n {itemData.displayedText}\n </Chip>\n )\n },\n [canRemoveItem, itemsMap, onItemRemove, unselectAriaLabel]\n )\n\n return <>{value.map(getItemText)}</>\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { separatorStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledSeparator = styled(Primitive.div, separatorStyles)\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\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 const { autoFilter, searchValue } = useComboboxContext()\n\n if (autoFilter && searchValue.length > 0) {\n return null\n }\n\n return <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 StyledNativeSelect = styled(Primitive.select, {\n // if we support autoComplete, we would have to use visually-hidden styles here\n display: 'none',\n})\n\nexport const StyledComboboxContent = styled(Primitive.div, {\n position: 'relative',\n width: '100%',\n})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledNoResult = styled(Primitive.div, {\n padding: '$100',\n})\n\nexport type StyledNoResultProps = StrictComponentProps<typeof StyledNoResult>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\n\nimport type { StyledNoResultProps } from './no-result.styled'\nimport { StyledNoResult } from './no-result.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface NoResultProps extends StyledNoResultProps {\n /**\n * The content.\n */\n children?: ReactNode\n}\n\nexport const NoResult = React.forwardRef<\n ElementRef<typeof StyledNoResult>,\n NoResultProps\n>((props, forwardRef) => {\n const { autoFilter, searchValue, filteredItems, itemsMap } =\n useComboboxContext()\n\n // when filtering is disabled or idle, just checking if there are any items provided\n const noActiveFiltering =\n !autoFilter || (autoFilter && searchValue.length === 0)\n\n const isVisible = noActiveFiltering\n ? itemsMap.size === 0\n : filteredItems.length === 0\n\n if (isVisible) {\n return <StyledNoResult {...props} ref={forwardRef} />\n }\n\n return null\n})\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport {\n BaseTooltipProvider,\n useBaseTooltipContext,\n} from '@mirohq/design-system-base-tooltip'\nimport { usePrevious } from '@mirohq/design-system-use-previous'\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, StyledNativeSelect } from './combobox.styled'\nimport type { StyledComboboxProps } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { Direction } from './types'\nimport { NoResult } from './partials/no-result'\n\nexport interface ComboboxProps extends FormElementProps, StyledComboboxProps {\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 controlled search value to filter items. Should be used in conjunction with\n * onSearchValueChange.\n */\n searchValue?: string\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 * The name of the combobox. Submitted with its owning form as part of a\n * name/value pair.\n */\n name?: string\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n { value: valueProp, onValueChange, name, children, ...restProps },\n forwardRef\n ) => {\n const {\n openState,\n setOpenState,\n value = [],\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n triggerRef,\n } = useComboboxContext()\n\n const {\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n formElementRef,\n } = useFormFieldContext<HTMLSelectElement>()\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 { ignoreNextTooltip } = useBaseTooltipContext()\n const prevOpen = usePrevious(openState)\n\n useEffect(() => {\n if (prevOpen === true && !openState) {\n ignoreNextTooltip()\n }\n }, [ignoreNextTooltip, openState, prevOpen])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n setValue(typeof newValue === 'string' ? [newValue] : newValue)\n }\n\n const onOpenChange = (value: boolean): void => {\n if (!booleanify(readOnly)) {\n setOpenState(value)\n }\n }\n\n const isFormControl = Boolean(triggerRef.current?.closest('form'))\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={onOpenChange}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={onOpenChange}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent\n ref={forwardRef}\n {...restProps}\n dir={direction}\n data-form-element='select'\n >\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n {isFormControl && (\n <StyledNativeSelect\n multiple\n autoComplete='off'\n name={name}\n tabIndex={-1}\n aria-hidden='true'\n ref={formElementRef}\n required={required}\n disabled={disabled}\n aria-disabled={ariaDisabled}\n value={value}\n // since we don't support autoComplete there is no way this select value will change,\n // although we still need to provide `onChange` since we use `value` and not `defaultValue`\n onChange={() => {}}\n >\n {value.length === 0 ? (\n <option value='' />\n ) : (\n // since we don't support autoComplete we can render here only selected values\n value.map(itemValue => (\n <option key={itemValue} value={itemValue}>\n {itemValue}\n </option>\n ))\n )}\n </StyledNativeSelect>\n )}\n </RadixPopover.Root>\n )\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 onClose,\n searchValue,\n onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\n searchValue={searchValue}\n onSearchValueChange={onSearchValueChange}\n defaultOpen={defaultOpen}\n open={open}\n onOpen={onOpen}\n onClose={onClose}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n autoFilter={autoFilter}\n >\n <BaseTooltipProvider>\n <Root {...restProps} value={value} ref={forwardRef} />\n </BaseTooltipProvider>\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 NoResult: typeof NoResult\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\nCombobox.NoResult = NoResult\n"],"names":["styled","BaseInput","createContext","useRef","useControllableState","useState","useFormFieldContext","useMemo","jsx","useContext","useCallback","RadixTrigger","IconChevronDown","IconCross","React","useEffect","RadixAnchor","mergeRefs","booleanify","AriakitComboboxTrigger","jsxs","mergeProps","stringAttrValue","Primitive","itemsContainerStyles","RadixPopover","contentStyles","useLayoutEffect","createPortal","theme","AriakitComboboxList","ScrollArea","ComboboxItem","itemStyles","useAriaDisabled","AriakitComboboxItemCheck","StyledItemCheck","IconCheckMark","RadixPortal","AriakitGroup","useId","GroupLabel","groupLabelStyles","value","Chip","Fragment","separatorStyles","useBaseTooltipContext","usePrevious","AriakitComboboxProvider","BaseTooltipProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,eAAA,GAAkBA,4BAAOC,+BAAW,EAAA;AAAA,EAC/C,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,CAAA;AAAA,EACV,GAAK,EAAA,KAAA;AAAA,EAEL,gCAAkC,EAAA;AAAA;AAAA,IAEhC,YAAc,EAAA,MAAA;AAAA,GAChB;AAAA,EAEA,SAAW,EAAA;AAAA,IACT,QAAU,EAAA,IAAA;AAAA,IACV,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,GACZ;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,SAAW,EAAA,IAAA;AAA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c,GAAK,EAAA,UAAA,EAAY,CACtD,EAAA,CAAA;AAAA,KAAA;AAAA,GACF;AAEJ,EAAA;AAcA,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,CAAA;AACjB,QAAA,CAAS,SAAY,GAAA,SAAA,CAAA;AACrB,QAAA,CAAS,QAAW,GAAA,QAAA;;;;;;;;;"}
|
package/dist/module.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import React, { createContext, useRef, useState, useMemo, useContext, useCallback, useEffect } from 'react';
|
|
3
3
|
import { Combobox as Combobox$1, ComboboxList, ComboboxItem, ComboboxItemCheck, Group as Group$1, GroupLabel as GroupLabel$1, ComboboxProvider as ComboboxProvider$1 } from '@ariakit/react';
|
|
4
|
-
import { useFormFieldContext
|
|
4
|
+
import { useFormFieldContext } from '@mirohq/design-system-base-form';
|
|
5
5
|
import { mergeRefs, booleanify, stringAttrValue } from '@mirohq/design-system-utils';
|
|
6
6
|
import * as RadixPopover from '@radix-ui/react-popover';
|
|
7
7
|
import { Trigger as Trigger$1, Anchor, Portal as Portal$1 } from '@radix-ui/react-popover';
|
|
@@ -9,7 +9,6 @@ import { useBaseTooltipContext, BaseTooltipProvider } from '@mirohq/design-syste
|
|
|
9
9
|
import { usePrevious } from '@mirohq/design-system-use-previous';
|
|
10
10
|
import { BaseInput } from '@mirohq/design-system-base-input';
|
|
11
11
|
import { mergeProps } from '@react-aria/utils';
|
|
12
|
-
import { useNewDesignLanguage } from '@mirohq/design-system-experiments';
|
|
13
12
|
import { styled, theme } from '@mirohq/design-system-stitches';
|
|
14
13
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
15
14
|
import { IconChevronDown, IconCross, IconCheckMark } from '@mirohq/design-system-icons';
|
|
@@ -54,23 +53,12 @@ const StyledBaseInput = styled(BaseInput, {
|
|
|
54
53
|
minHeight: "$12",
|
|
55
54
|
height: "auto",
|
|
56
55
|
padding: "5px $100",
|
|
57
|
-
paddingRight: "$500"
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
v1: {
|
|
61
|
-
true: {}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
compoundVariants: [
|
|
65
|
-
{
|
|
66
|
-
v1: true,
|
|
67
|
-
size: "x-large",
|
|
68
|
-
css: {
|
|
56
|
+
paddingRight: "$500",
|
|
69
57
|
fontSize: "$200",
|
|
70
58
|
lineHeight: "$500"
|
|
71
59
|
}
|
|
72
60
|
}
|
|
73
|
-
|
|
61
|
+
}
|
|
74
62
|
});
|
|
75
63
|
|
|
76
64
|
function searchQueryMatch(displayedText, searchValue) {
|
|
@@ -266,7 +254,6 @@ const Trigger = React.forwardRef(
|
|
|
266
254
|
ariaInvalid: formFieldAriaInvalid,
|
|
267
255
|
valid: formFieldValid
|
|
268
256
|
} = useFormFieldContext();
|
|
269
|
-
const [v1] = useNewDesignLanguage();
|
|
270
257
|
useEffect(() => {
|
|
271
258
|
setSize(size);
|
|
272
259
|
}, [size, setSize]);
|
|
@@ -314,7 +301,6 @@ const Trigger = React.forwardRef(
|
|
|
314
301
|
size,
|
|
315
302
|
onChange: onInputChange,
|
|
316
303
|
css,
|
|
317
|
-
v1,
|
|
318
304
|
className,
|
|
319
305
|
children: [
|
|
320
306
|
/* @__PURE__ */ jsx(
|
|
@@ -660,8 +646,6 @@ const Root = React.forwardRef(
|
|
|
660
646
|
"aria-disabled": ariaDisabled,
|
|
661
647
|
disabled,
|
|
662
648
|
direction,
|
|
663
|
-
size,
|
|
664
|
-
placeholder,
|
|
665
649
|
triggerRef
|
|
666
650
|
} = useComboboxContext();
|
|
667
651
|
const {
|
|
@@ -669,9 +653,6 @@ const Root = React.forwardRef(
|
|
|
669
653
|
setDisabled,
|
|
670
654
|
setAriaDisabled,
|
|
671
655
|
setReadOnly,
|
|
672
|
-
label,
|
|
673
|
-
isFloatingLabel,
|
|
674
|
-
focused,
|
|
675
656
|
formElementRef
|
|
676
657
|
} = useFormFieldContext();
|
|
677
658
|
useEffect(() => {
|
|
@@ -696,8 +677,6 @@ const Root = React.forwardRef(
|
|
|
696
677
|
ignoreNextTooltip();
|
|
697
678
|
}
|
|
698
679
|
}, [ignoreNextTooltip, openState, prevOpen]);
|
|
699
|
-
const shouldUseFloatingLabel = label !== null && isFloatingLabel;
|
|
700
|
-
const isFloating = placeholder !== void 0 || value.length !== 0 || focused;
|
|
701
680
|
const onSetSelectedValue = (newValue) => {
|
|
702
681
|
setValue(typeof newValue === "string" ? [newValue] : newValue);
|
|
703
682
|
};
|
|
@@ -715,17 +694,14 @@ const Root = React.forwardRef(
|
|
|
715
694
|
setOpen: onOpenChange,
|
|
716
695
|
selectedValue: value,
|
|
717
696
|
setSelectedValue: onSetSelectedValue,
|
|
718
|
-
children: /* @__PURE__ */
|
|
697
|
+
children: /* @__PURE__ */ jsx(
|
|
719
698
|
StyledComboboxContent,
|
|
720
699
|
{
|
|
721
700
|
ref: forwardRef,
|
|
722
701
|
...restProps,
|
|
723
702
|
dir: direction,
|
|
724
703
|
"data-form-element": "select",
|
|
725
|
-
children
|
|
726
|
-
shouldUseFloatingLabel && /* @__PURE__ */ jsx(FloatingLabel, { floating: isFloating, size, children: label }),
|
|
727
|
-
children
|
|
728
|
-
]
|
|
704
|
+
children
|
|
729
705
|
}
|
|
730
706
|
)
|
|
731
707
|
}
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/utils.ts","../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/hooks/use-document-fragment.ts","../src/hooks/use-invisible-content.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/hooks/use-group-context.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.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.styled.tsx","../src/partials/no-result.styled.tsx","../src/partials/no-result.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { BaseInput } from '@mirohq/design-system-base-input'\nimport type { ComponentPropsWithRef } from 'react'\n\nexport const StyledBaseInput = styled(BaseInput, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '$50',\n\n '&[data-valid], &[data-invalid]': {\n // we don't need a bigger padding here as Input component will render its own icon\n paddingRight: '$100',\n },\n\n '& input': {\n minWidth: '$8',\n flexBasis: 0,\n flexGrow: 1,\n },\n\n variants: {\n size: {\n medium: {\n minHeight: '$8',\n height: 'auto',\n padding: '3px $100',\n paddingRight: '$500',\n fontSize: '$175',\n },\n large: {\n minHeight: '$10',\n height: 'auto',\n padding: '5px $100',\n paddingRight: '$500',\n },\n 'x-large': {\n minHeight: '$12',\n height: 'auto',\n padding: '5px $100',\n paddingRight: '$500',\n },\n },\n v1: {\n true: {},\n },\n },\n compoundVariants: [\n {\n v1: true,\n size: 'x-large',\n css: {\n fontSize: '$200',\n lineHeight: '$500',\n },\n },\n ],\n})\n\nexport type StyledBaseInputProps = ComponentPropsWithRef<typeof StyledBaseInput>\n","export function searchQueryMatch(\n displayedText: string,\n searchValue: string\n): boolean {\n return displayedText.toLowerCase().includes(searchValue.toLowerCase())\n}\n","import React, {\n createContext,\n useContext,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport type { PropsWithChildren } from 'react'\nimport { useControllableState } from '@radix-ui/react-use-controllable-state'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\nimport type { StyledBaseInputProps } from '../partials/trigger.styled'\nimport { searchQueryMatch } from '../utils'\n\ninterface ItemData {\n displayedText: string\n groupId: string | undefined\n}\n\ninterface ComboboxProviderSharedProps extends FormElementProps {\n value?: string[]\n direction?: Direction\n autoFilter: boolean\n}\n\ninterface ComboboxContextProps extends ComboboxProviderSharedProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState: boolean\n\n setValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n\n triggerRef: React.RefObject<HTMLInputElement>\n inputRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string | undefined>>\n\n placeholder?: string\n setPlaceholder: React.Dispatch<React.SetStateAction<string | undefined>>\n\n size: StyledBaseInputProps['size']\n setSize: React.Dispatch<React.SetStateAction<StyledBaseInputProps['size']>>\n\n /**\n * includes all visible and hidden items to render Chips and get filtered items\n */\n itemsMap: Map<string, ItemData>\n setItemsMap: React.Dispatch<React.SetStateAction<Map<string, ItemData>>>\n\n /**\n * @returns filtered items based on itemsMap\n * @returns empty array when searchValue is empty or auto filtering is disabled\n */\n filteredItems: ItemData[]\n}\n\ninterface ComboboxProviderProps extends ComboboxProviderSharedProps {\n open?: boolean\n defaultOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n\n defaultValue?: string[]\n onValueChange?: (value: string[]) => void\n\n searchValue?: string\n onSearchValueChange?: (value: string) => void\n}\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n open: openProp,\n defaultOpen,\n onOpen,\n onClose,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange,\n searchValue: searchValueProp,\n onSearchValueChange,\n autoFilter,\n ...restProps\n}: PropsWithChildren<ComboboxProviderProps>): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n // todo MDS-1141: remove default false value\n const [openState = false, setOpenState] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: state => {\n if (state) {\n onOpen?.()\n } else {\n onClose?.()\n }\n },\n })\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValueProp,\n onChange: onValueChange,\n })\n\n // todo MDS-1141: remove default false value\n const [searchValue = '', setSearchValue] = useControllableState({\n prop: searchValueProp,\n defaultProp: '',\n onChange: onSearchValueChange,\n })\n\n const [size, setSize] = useState<StyledBaseInputProps['size']>()\n const [placeholder, setPlaceholder] = useState<string | undefined>()\n\n const [itemsMap, setItemsMap] = useState<Map<string, ItemData>>(new Map())\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n const filteredItems = useMemo(() => {\n if (searchValue.length > 0) {\n return Array.from(itemsMap.values()).filter(item =>\n searchQueryMatch(item.displayedText, searchValue)\n )\n }\n\n return []\n }, [itemsMap, searchValue])\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n triggerRef,\n inputRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n itemsMap,\n setItemsMap,\n filteredItems,\n placeholder,\n setPlaceholder,\n size,\n setSize,\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 { BaseInput } from '@mirohq/design-system-base-input'\n\nexport const StyledActionButton = styled(BaseInput.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n medium: {\n top: '1px',\n },\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'\nimport { Trigger as RadixTrigger } from '@radix-ui/react-popover'\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 openActionLabel: string\n closeActionLabel: string\n clearable?: boolean\n clearActionLabel?: string\n}\n\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n closeActionLabel,\n clearActionLabel,\n clearable,\n size,\n}) => {\n const { openState, setOpenState, value = [], setValue } = useComboboxContext()\n\n const isEmpty = value.length === 0\n\n const onToggleClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (openState) {\n // open action will be performed by radix since it's RadixTrigger\n setOpenState(false)\n }\n\n event.stopPropagation()\n },\n [setOpenState, openState]\n )\n\n const onClearClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n setValue([])\n\n event.stopPropagation()\n },\n [setValue]\n )\n\n if (isEmpty || clearable === false || clearActionLabel === undefined) {\n return (\n <RadixTrigger asChild aria-haspopup='listbox'>\n <StyledActionButton\n label={openState ? closeActionLabel : openActionLabel}\n size={size}\n onClick={onToggleClick}\n >\n <IconChevronDown size='small' weight='thin' />\n </StyledActionButton>\n </RadixTrigger>\n )\n }\n\n return (\n <StyledActionButton\n label={clearActionLabel}\n size={size}\n onClick={onClearClick}\n >\n <IconCross size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox as AriakitComboboxTrigger } from '@ariakit/react'\nimport {\n booleanify,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { Anchor as RadixAnchor } from '@radix-ui/react-popover'\nimport type {\n BaseInputProps,\n BaseInputStyledProps,\n} from '@mirohq/design-system-base-input'\nimport { BaseInput } from '@mirohq/design-system-base-input'\nimport { mergeProps } from '@react-aria/utils'\nimport { useNewDesignLanguage } from '@mirohq/design-system-experiments'\n\nimport { StyledBaseInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\n\ninterface TriggerSharedProps extends Omit<BaseInputStyledProps, 'size'> {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: BaseInputProps['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 /**\n * The label text for Trigger's action button when Combobox is empty and closed. Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox is empty and open. Will be rendered in a Tooltip.\n */\n closeActionLabel: string\n\n /**\n * Show a button to clear the Combobox value.\n * @default true\n */\n clearable?: boolean\n}\n\nexport type TriggerProps = TriggerSharedProps &\n (\n | { clearable: false; clearActionLabel?: never }\n | {\n /**\n * The label text for Trigger's action button when Combobox has values selected. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n }\n )\n\nexport const Trigger = React.forwardRef<ElementRef<'input'>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n closeActionLabel,\n clearable = true,\n clearActionLabel,\n onChange,\n onFocus,\n css,\n // @ts-expect-error className required when extending the component with styled()\n className,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value = [],\n readOnly,\n triggerRef,\n inputRef,\n searchValue,\n setSearchValue,\n setOpenState,\n setSize,\n setPlaceholder,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n } = useFormFieldContext()\n\n const [v1] = useNewDesignLanguage()\n\n useEffect(() => {\n setSize(size)\n }, [size, setSize])\n\n useEffect(() => {\n setPlaceholder(placeholder)\n }, [setPlaceholder, placeholder])\n\n const valid = formFieldValid ?? comboboxValid\n\n const scrollIntoView = (\n event: React.FocusEvent<HTMLInputElement>\n ): void => {\n const trigger = triggerRef?.current\n const baseInput = inputRef?.current?.parentElement\n\n if (baseInput != null && trigger != null) {\n event.preventDefault()\n baseInput.scrollTo({\n top: trigger.scrollHeight,\n })\n }\n\n if (onFocus !== undefined) {\n onFocus(event)\n }\n }\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onChange?.(e)\n }\n\n return (\n <RadixAnchor\n ref={mergeRefs([triggerRef, forwardRef])}\n // todo MDS-1112: move this logic to AriakitComboboxTrigger's showOnClick\n onClick={() => {\n if (\n !booleanify(disabled) &&\n !booleanify(ariaDisabled) &&\n !booleanify(readOnly)\n ) {\n setOpenState(true)\n }\n }}\n >\n <AriakitComboboxTrigger\n render={({ ref: ariakitTriggerRef, ...ariakitProps }) => (\n <StyledBaseInput\n aria-disabled={ariaDisabled}\n valid={valid}\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n onChange={onInputChange}\n css={css}\n v1={v1}\n // @ts-expect-error className required when extending the component with styled()\n className={className}\n >\n <BaseInput.Input\n {...mergeProps(ariakitProps, restProps)}\n ref={mergeRefs([\n inputRef,\n ariakitTriggerRef as React.RefObject<HTMLInputElement>,\n ])}\n value={searchValue}\n id={id ?? formElementId}\n aria-describedby={stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n )}\n aria-invalid={ariaInvalid ?? formFieldAriaInvalid}\n placeholder={\n children === null ||\n children === undefined ||\n value.length === 0\n ? placeholder\n : undefined\n }\n onFocus={scrollIntoView}\n />\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n closeActionLabel={closeActionLabel}\n clearActionLabel={clearActionLabel}\n clearable={clearable}\n size={size}\n />\n </StyledBaseInput>\n )}\n />\n </RadixAnchor>\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'\nimport {\n contentStyles,\n itemsContainerStyles,\n} from '@mirohq/design-system-base-select'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledItemsContainer = styled(Primitive.div, itemsContainerStyles)\n\nexport const StyledContent = styled(RadixPopover.Content, {\n ...contentStyles,\n width: 'var(--radix-popover-trigger-width)',\n overflowY: 'auto',\n boxSizing: 'border-box',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\n\nexport const useDocumentFragment = (): DocumentFragment | undefined => {\n const [fragment, setFragment] = React.useState<DocumentFragment>()\n\n // we need `useLayoutEffect` here because `DocumentFragment` doesn't exist on the server\n useLayoutEffect(() => {\n setFragment(new DocumentFragment())\n }, [])\n\n return fragment\n}\n","import React, { useCallback } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useDocumentFragment } from './use-document-fragment'\n\n/**\n * Render content in DocumentFragment so items can send its text value to context,\n * otherwise we will have empty chips.\n * Content won't be visible in DOM.\n */\nexport const useInvisibleContent = (): ((\n children: React.ReactNode\n) => React.ReactElement | null) => {\n const fragment = useDocumentFragment()\n\n return useCallback(\n (children: React.ReactNode): React.ReactElement | null =>\n fragment !== undefined\n ? createPortal(<div>{children}</div>, fragment)\n : null,\n [fragment]\n )\n}\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\nimport { ScrollArea } from '@mirohq/design-system-scroll-area'\nimport { theme } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\nimport { ComboboxList as AriakitComboboxList } from '@ariakit/react'\n\nimport { StyledContent, StyledItemsContainer } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport type {\n Align,\n Overflow,\n PointerDownOutsideEvent,\n Side,\n Sticky,\n} from '../types'\nimport { useInvisibleContent } from '../hooks/use-invisible-content'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\nconst RADIX_CONTENT_AVAILABLE_HEIGHT =\n 'var(--radix-popover-content-available-height)'\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 /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\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 * The preferred side of the anchor to render against when open. Will be\n * reversed when collisions occur and avoidCollisions is enabled.\n * @default 'bottom'\n */\n side?: Side\n\n /**\n * The distance in pixels from the anchor.\n * @default CONTENT_OFFSET\n */\n sideOffset?: number\n\n /**\n * The preferred alignment against the anchor. May change when collisions\n * occur.\n * @default 'center'\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options.\n * @default 0\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with boundary edges.\n * @default true\n */\n avoidCollisions?: boolean\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 distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides), or a partial padding\n * object, for example: { top: 20, left: 20 }.\n * @default 0\n */\n collisionPadding?: number | Partial<Record<Side, number>>\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in the\n * boundary as long as the trigger is at least partially in the boundary whilst\n * \"always\" will keep the content in the boundary regardless.\n * @default 'partial'\n */\n sticky?: Sticky\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n * @default true\n */\n hideWhenDetached?: boolean\n\n /**\n * The max height for the content.\n */\n maxHeight?: CSSProperties['maxHeight']\n\n /**\n * Setting overflow as \"visible\" means that the content can extend beyond\n * its collision boundary without any clipping or scrolling being\n * applied.\n * When set to \"auto,\" a scrollbar is added if the content exceeds its\n * boundaries. If no maxHeight is defined, it will be automatically adjusted\n * to fit the remaining space between the trigger and the boundary edge.\n * @default 'visible'\n */\n overflow?: Overflow\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n side = 'bottom',\n sideOffset = CONTENT_OFFSET,\n align = 'center',\n alignOffset = 0,\n collisionPadding = 0,\n avoidCollisions = true,\n sticky = 'partial',\n hideWhenDetached = true,\n overflow = 'visible',\n maxHeight,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const { triggerRef, contentRef, direction, openState } =\n useComboboxContext()\n\n const getInvisibleContent = useInvisibleContent()\n\n if (!openState) {\n return getInvisibleContent(children)\n }\n\n const content = <StyledItemsContainer>{children}</StyledItemsContainer>\n\n return (\n <StyledContent\n {...restProps}\n dir={direction}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\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 {/* we have to specify role here otherwise it would be overwritten by Radix.Content */}\n <AriakitComboboxList role='listbox'>\n {overflow === 'auto' ? (\n <ScrollArea type='always' dir={direction}>\n <ScrollArea.Viewport\n css={{\n maxHeight:\n maxHeight !== undefined\n ? `min(${RADIX_CONTENT_AVAILABLE_HEIGHT}, ${\n typeof maxHeight === 'number'\n ? `${maxHeight}px`\n : maxHeight\n })`\n : RADIX_CONTENT_AVAILABLE_HEIGHT,\n }}\n >\n {content}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea>\n ) : (\n content\n )}\n </AriakitComboboxList>\n </StyledContent>\n )\n }\n)\n","import { ComboboxItem } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { itemStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledItem = styled(ComboboxItem, itemStyles)\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React, { createContext, useContext } from 'react'\nimport type { PropsWithChildren } from 'react'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\ninterface GroupProviderSharedProps extends FormElementProps {\n groupId?: string\n}\n\ninterface GroupContextProps extends GroupProviderSharedProps {}\n\ninterface GroupProviderProps extends GroupProviderSharedProps {}\n\nconst GroupContext = createContext<GroupContextProps>({} as any)\n\nexport const GroupProvider = ({\n children,\n ...restProps\n}: PropsWithChildren<GroupProviderProps>): JSX.Element => (\n <GroupContext.Provider\n value={{\n ...restProps,\n }}\n >\n {children}\n </GroupContext.Provider>\n)\n\nexport const useGroupContext = (): GroupContextProps => useContext(GroupContext)\n","import React, { useMemo } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { mergeProps } from '@react-aria/utils'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\nimport { StyledItemCheck } from '@mirohq/design-system-base-select'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { useGroupContext } from '../hooks/use-group-context'\nimport { searchQueryMatch } from '../utils'\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 {\n searchValue,\n autoFilter,\n setItemsMap,\n triggerRef,\n inputRef,\n value: comboboxValue = [],\n } = useComboboxContext()\n\n const { groupId } = useGroupContext()\n\n const displayedText = useMemo((): string => {\n if (textValue !== undefined) {\n return textValue\n }\n\n return typeof children === 'string' ? children : ''\n }, [textValue, children])\n\n useLayoutEffect(() => {\n setItemsMap(\n prevState => new Map(prevState.set(value, { displayedText, groupId }))\n )\n\n return () => {\n setItemsMap(prevState => {\n prevState.delete(value)\n return new Map(prevState)\n })\n }\n }, [setItemsMap, groupId, value, displayedText])\n\n if (\n autoFilter &&\n searchValue.length > 0 &&\n !searchQueryMatch(displayedText, searchValue)\n ) {\n return null\n }\n\n const scrollIntoView = (event: React.MouseEvent<HTMLDivElement>): void => {\n if (\n inputRef?.current?.parentElement != null &&\n triggerRef?.current != null\n ) {\n inputRef.current.parentElement.scrollTo({\n top: triggerRef.current.scrollHeight,\n })\n }\n\n if (restProps.onClick !== undefined) {\n restProps.onClick(event)\n }\n }\n\n // todo MDS-1142 find a better way to fix blinking.\n // We need to use custom state because Ariakit changes its state internally on click even for controlled Combobox\n // and it case `aria-selected` value and checkmark to blink.\n const isSelected = comboboxValue.includes(value)\n\n return (\n <StyledItem\n {...mergeProps(restProps, restAriaDisabledProps)}\n focusable\n hideOnClick={false}\n accessibleWhenDisabled={booleanify(ariaDisabled)}\n disabled={booleanify(ariaDisabled) || disabled}\n ref={forwardRef}\n value={value}\n onClick={scrollIntoView}\n aria-selected={isSelected}\n >\n <AriakitComboboxItemCheck\n checked={isSelected}\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\n size='small'\n data-testid={\n process.env.NODE_ENV === 'test'\n ? 'combobox-item-check'\n : undefined\n }\n />\n </AriakitComboboxItemCheck>\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\nimport { useComboboxContext } from '../hooks/use-combobox-context'\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> = ({\n forceMount: forceMountProp,\n ...restProps\n}) => {\n const { openState } = useComboboxContext()\n\n // We always need to render content with items to be able to render Chips in Value,\n // but without forceMount Radix will not render Portal when Popover is closed\n const forceMount = !openState || forceMountProp\n\n return <RadixPortal forceMount={forceMount} {...restProps} />\n}\n","import { Group as AriakitGroup } from '@ariakit/react'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(AriakitGroup, {})\n\nexport type StyledGroupProps = StrictComponentProps<typeof StyledGroup>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useId } from '@mirohq/design-system-use-id'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport type { StyledGroupProps } from './group.styled'\nimport { StyledGroup } from './group.styled'\nimport { useInvisibleContent } from '../hooks/use-invisible-content'\nimport { GroupProvider } from '../hooks/use-group-context'\n\nexport type GroupProps = StyledGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, searchValue, filteredItems } = useComboboxContext()\n\n const id = useId()\n const getInvisibleContent = useInvisibleContent()\n\n let hasVisibleContent = true\n\n if (autoFilter && searchValue.length > 0) {\n hasVisibleContent = filteredItems.some(item => item.groupId === id)\n }\n\n return (\n <GroupProvider groupId={id}>\n {hasVisibleContent ? (\n <StyledGroup {...rest} ref={forwardRef}>\n {children}\n </StyledGroup>\n ) : (\n getInvisibleContent(children)\n )}\n </GroupProvider>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { groupLabelStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledGroupLabel = styled(GroupLabel, groupLabelStyles)\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 React, { useCallback } from 'react'\nimport type { FC } from 'react'\nimport { Chip } from '@mirohq/design-system-chip'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ValueProps {\n /**\n * The label to make the remove button recognizable by the screen readers.\n */\n unselectAriaLabel: string\n}\n\nexport const Value: FC<ValueProps> = ({ unselectAriaLabel }) => {\n const {\n value = [],\n setValue,\n disabled,\n readOnly,\n 'aria-disabled': ariaDisabled,\n itemsMap,\n } = useComboboxContext()\n const canRemoveItem =\n !booleanify(ariaDisabled) && !booleanify(disabled) && !booleanify(readOnly)\n\n const onItemRemove = useCallback(\n (item: string): void => {\n setValue(prevValue => prevValue?.filter(value => value !== item))\n },\n [setValue]\n )\n\n const getItemText = useCallback(\n (itemValue: string) => {\n const itemData = itemsMap.get(itemValue)\n if (itemData === undefined || itemData.displayedText === '') {\n return null\n }\n\n return (\n <Chip\n key={itemValue}\n onRemove={e => {\n onItemRemove(itemValue)\n e.stopPropagation()\n }}\n removable={canRemoveItem}\n removeAriaLabel={`${unselectAriaLabel} ${itemData.displayedText}`}\n data-testid={\n process.env.NODE_ENV === 'test'\n ? `combobox-value-${itemValue}`\n : undefined\n }\n >\n {itemData.displayedText}\n </Chip>\n )\n },\n [canRemoveItem, itemsMap, onItemRemove, unselectAriaLabel]\n )\n\n return <>{value.map(getItemText)}</>\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { separatorStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledSeparator = styled(Primitive.div, separatorStyles)\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\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 const { autoFilter, searchValue } = useComboboxContext()\n\n if (autoFilter && searchValue.length > 0) {\n return null\n }\n\n return <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 StyledNativeSelect = styled(Primitive.select, {\n // if we support autoComplete, we would have to use visually-hidden styles here\n display: 'none',\n})\n\nexport const StyledComboboxContent = styled(Primitive.div, {\n position: 'relative',\n width: '100%',\n})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledNoResult = styled(Primitive.div, {\n padding: '$100',\n})\n\nexport type StyledNoResultProps = StrictComponentProps<typeof StyledNoResult>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\n\nimport type { StyledNoResultProps } from './no-result.styled'\nimport { StyledNoResult } from './no-result.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface NoResultProps extends StyledNoResultProps {\n /**\n * The content.\n */\n children?: ReactNode\n}\n\nexport const NoResult = React.forwardRef<\n ElementRef<typeof StyledNoResult>,\n NoResultProps\n>((props, forwardRef) => {\n const { autoFilter, searchValue, filteredItems, itemsMap } =\n useComboboxContext()\n\n // when filtering is disabled or idle, just checking if there are any items provided\n const noActiveFiltering =\n !autoFilter || (autoFilter && searchValue.length === 0)\n\n const isVisible = noActiveFiltering\n ? itemsMap.size === 0\n : filteredItems.length === 0\n\n if (isVisible) {\n return <StyledNoResult {...props} ref={forwardRef} />\n }\n\n return null\n})\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport {\n BaseTooltipProvider,\n useBaseTooltipContext,\n} from '@mirohq/design-system-base-tooltip'\nimport { usePrevious } from '@mirohq/design-system-use-previous'\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, StyledNativeSelect } from './combobox.styled'\nimport type { StyledComboboxProps } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { Direction } from './types'\nimport { NoResult } from './partials/no-result'\n\nexport interface ComboboxProps extends FormElementProps, StyledComboboxProps {\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 controlled search value to filter items. Should be used in conjunction with\n * onSearchValueChange.\n */\n searchValue?: string\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 * The name of the combobox. Submitted with its owning form as part of a\n * name/value pair.\n */\n name?: string\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n { value: valueProp, onValueChange, name, children, ...restProps },\n forwardRef\n ) => {\n const {\n openState,\n setOpenState,\n value = [],\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n size,\n placeholder,\n triggerRef,\n } = useComboboxContext()\n\n const {\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n label,\n isFloatingLabel,\n focused,\n formElementRef,\n } = useFormFieldContext<HTMLSelectElement>()\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 { ignoreNextTooltip } = useBaseTooltipContext()\n const prevOpen = usePrevious(openState)\n\n useEffect(() => {\n if (prevOpen === true && !openState) {\n ignoreNextTooltip()\n }\n }, [ignoreNextTooltip, openState, prevOpen])\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined || value.length !== 0 || focused\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n setValue(typeof newValue === 'string' ? [newValue] : newValue)\n }\n\n const onOpenChange = (value: boolean): void => {\n if (!booleanify(readOnly)) {\n setOpenState(value)\n }\n }\n\n const isFormControl = Boolean(triggerRef.current?.closest('form'))\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={onOpenChange}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={onOpenChange}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent\n ref={forwardRef}\n {...restProps}\n dir={direction}\n data-form-element='select'\n >\n {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n {isFormControl && (\n <StyledNativeSelect\n multiple\n autoComplete='off'\n name={name}\n tabIndex={-1}\n aria-hidden='true'\n ref={formElementRef}\n required={required}\n disabled={disabled}\n aria-disabled={ariaDisabled}\n value={value}\n // since we don't support autoComplete there is no way this select value will change,\n // although we still need to provide `onChange` since we use `value` and not `defaultValue`\n onChange={() => {}}\n >\n {value.length === 0 ? (\n <option value='' />\n ) : (\n // since we don't support autoComplete we can render here only selected values\n value.map(itemValue => (\n <option key={itemValue} value={itemValue}>\n {itemValue}\n </option>\n ))\n )}\n </StyledNativeSelect>\n )}\n </RadixPopover.Root>\n )\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 onClose,\n searchValue,\n onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\n searchValue={searchValue}\n onSearchValueChange={onSearchValueChange}\n defaultOpen={defaultOpen}\n open={open}\n onOpen={onOpen}\n onClose={onClose}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n autoFilter={autoFilter}\n >\n <BaseTooltipProvider>\n <Root {...restProps} value={value} ref={forwardRef} />\n </BaseTooltipProvider>\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 NoResult: typeof NoResult\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\nCombobox.NoResult = NoResult\n"],"names":["RadixTrigger","RadixAnchor","AriakitComboboxTrigger","AriakitComboboxList","AriakitComboboxItemCheck","RadixPortal","AriakitGroup","GroupLabel","value","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,eAAA,GAAkB,OAAO,SAAW,EAAA;AAAA,EAC/C,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,CAAA;AAAA,EACV,GAAK,EAAA,KAAA;AAAA,EAEL,gCAAkC,EAAA;AAAA;AAAA,IAEhC,YAAc,EAAA,MAAA;AAAA,GAChB;AAAA,EAEA,SAAW,EAAA;AAAA,IACT,QAAU,EAAA,IAAA;AAAA,IACV,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,GACZ;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,SAAW,EAAA,IAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,OAAS,EAAA,UAAA;AAAA,QACT,YAAc,EAAA,MAAA;AAAA,QACd,QAAU,EAAA,MAAA;AAAA,OACZ;AAAA,MACA,KAAO,EAAA;AAAA,QACL,SAAW,EAAA,KAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,OAAS,EAAA,UAAA;AAAA,QACT,YAAc,EAAA,MAAA;AAAA,OAChB;AAAA,MACA,SAAW,EAAA;AAAA,QACT,SAAW,EAAA,KAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,OAAS,EAAA,UAAA;AAAA,QACT,YAAc,EAAA,MAAA;AAAA,OAChB;AAAA,KACF;AAAA,IACA,EAAI,EAAA;AAAA,MACF,MAAM,EAAC;AAAA,KAC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,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,CAAA;AACjB,QAAA,CAAS,SAAY,GAAA,SAAA,CAAA;AACrB,QAAA,CAAS,QAAW,GAAA,QAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/utils.ts","../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/hooks/use-document-fragment.ts","../src/hooks/use-invisible-content.tsx","../src/partials/content.tsx","../src/partials/item.styled.tsx","../src/hooks/use-group-context.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.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.styled.tsx","../src/partials/no-result.styled.tsx","../src/partials/no-result.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { BaseInput } from '@mirohq/design-system-base-input'\nimport type { ComponentPropsWithRef } from 'react'\n\nexport const StyledBaseInput = styled(BaseInput, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '$50',\n\n '&[data-valid], &[data-invalid]': {\n // we don't need a bigger padding here as Input component will render its own icon\n paddingRight: '$100',\n },\n\n '& input': {\n minWidth: '$8',\n flexBasis: 0,\n flexGrow: 1,\n },\n\n variants: {\n size: {\n medium: {\n minHeight: '$8',\n height: 'auto',\n padding: '3px $100',\n paddingRight: '$500',\n fontSize: '$175',\n },\n large: {\n minHeight: '$10',\n height: 'auto',\n padding: '5px $100',\n paddingRight: '$500',\n },\n 'x-large': {\n minHeight: '$12',\n height: 'auto',\n padding: '5px $100',\n paddingRight: '$500',\n fontSize: '$200',\n lineHeight: '$500',\n },\n },\n },\n})\n\nexport type StyledBaseInputProps = ComponentPropsWithRef<typeof StyledBaseInput>\n","export function searchQueryMatch(\n displayedText: string,\n searchValue: string\n): boolean {\n return displayedText.toLowerCase().includes(searchValue.toLowerCase())\n}\n","import React, {\n createContext,\n useContext,\n useMemo,\n useRef,\n useState,\n} from 'react'\nimport { useControllableState } from '@radix-ui/react-use-controllable-state'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\nimport type { StyledBaseInputProps } from '../partials/trigger.styled'\nimport { searchQueryMatch } from '../utils'\n\ninterface ItemData {\n displayedText: string\n groupId: string | undefined\n}\n\ninterface ComboboxProviderSharedProps extends FormElementProps {\n value?: string[]\n direction?: Direction\n autoFilter: boolean\n}\n\ninterface ComboboxContextProps extends ComboboxProviderSharedProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState: boolean\n\n setValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n\n triggerRef: React.RefObject<HTMLInputElement>\n inputRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string | undefined>>\n\n placeholder?: string\n setPlaceholder: React.Dispatch<React.SetStateAction<string | undefined>>\n\n size: StyledBaseInputProps['size']\n setSize: React.Dispatch<React.SetStateAction<StyledBaseInputProps['size']>>\n\n /**\n * includes all visible and hidden items to render Chips and get filtered items\n */\n itemsMap: Map<string, ItemData>\n setItemsMap: React.Dispatch<React.SetStateAction<Map<string, ItemData>>>\n\n /**\n * @returns filtered items based on itemsMap\n * @returns empty array when searchValue is empty or auto filtering is disabled\n */\n filteredItems: ItemData[]\n}\n\ninterface ComboboxProviderProps extends ComboboxProviderSharedProps {\n children?: React.ReactNode\n open?: boolean\n defaultOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n\n defaultValue?: string[]\n onValueChange?: (value: string[]) => void\n\n searchValue?: string\n onSearchValueChange?: (value: string) => void\n}\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n open: openProp,\n defaultOpen,\n onOpen,\n onClose,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange,\n searchValue: searchValueProp,\n onSearchValueChange,\n autoFilter,\n ...restProps\n}: ComboboxProviderProps): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n // todo MDS-1141: remove default false value\n const [openState = false, setOpenState] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: state => {\n if (state) {\n onOpen?.()\n } else {\n onClose?.()\n }\n },\n })\n const [value, setValue] = useControllableState({\n prop: valueProp,\n defaultProp: defaultValueProp,\n onChange: onValueChange,\n })\n\n // todo MDS-1141: remove default false value\n const [searchValue = '', setSearchValue] = useControllableState({\n prop: searchValueProp,\n defaultProp: '',\n onChange: onSearchValueChange,\n })\n\n const [size, setSize] = useState<StyledBaseInputProps['size']>()\n const [placeholder, setPlaceholder] = useState<string | undefined>()\n\n const [itemsMap, setItemsMap] = useState<Map<string, ItemData>>(new Map())\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n const filteredItems = useMemo(() => {\n if (searchValue.length > 0) {\n return Array.from(itemsMap.values()).filter(item =>\n searchQueryMatch(item.displayedText, searchValue)\n )\n }\n\n return []\n }, [itemsMap, searchValue])\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n triggerRef,\n inputRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n itemsMap,\n setItemsMap,\n filteredItems,\n placeholder,\n setPlaceholder,\n size,\n setSize,\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 { BaseInput } from '@mirohq/design-system-base-input'\n\nexport const StyledActionButton = styled(BaseInput.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n medium: {\n top: '1px',\n },\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'\nimport { Trigger as RadixTrigger } from '@radix-ui/react-popover'\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 openActionLabel: string\n closeActionLabel: string\n clearable?: boolean\n clearActionLabel?: string\n}\n\nexport const TriggerActionButton = ({\n openActionLabel,\n closeActionLabel,\n clearActionLabel,\n clearable,\n size,\n}: TriggerActionButtonProps): React.ReactNode => {\n const { openState, setOpenState, value = [], setValue } = useComboboxContext()\n\n const isEmpty = value.length === 0\n\n const onToggleClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (openState) {\n // open action will be performed by radix since it's RadixTrigger\n setOpenState(false)\n }\n\n event.stopPropagation()\n },\n [setOpenState, openState]\n )\n\n const onClearClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n setValue([])\n\n event.stopPropagation()\n },\n [setValue]\n )\n\n if (isEmpty || clearable === false || clearActionLabel === undefined) {\n return (\n <RadixTrigger asChild aria-haspopup='listbox'>\n <StyledActionButton\n label={openState ? closeActionLabel : openActionLabel}\n size={size}\n onClick={onToggleClick}\n >\n <IconChevronDown size='small' weight='thin' />\n </StyledActionButton>\n </RadixTrigger>\n )\n }\n\n return (\n <StyledActionButton\n label={clearActionLabel}\n size={size}\n onClick={onClearClick}\n >\n <IconCross size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox as AriakitComboboxTrigger } from '@ariakit/react'\nimport {\n booleanify,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { Anchor as RadixAnchor } from '@radix-ui/react-popover'\nimport type {\n BaseInputProps,\n BaseInputStyledProps,\n} from '@mirohq/design-system-base-input'\nimport { BaseInput } from '@mirohq/design-system-base-input'\nimport { mergeProps } from '@react-aria/utils'\n\nimport { StyledBaseInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\n\ninterface TriggerSharedProps extends Omit<BaseInputStyledProps, 'size'> {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: BaseInputProps['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 /**\n * The label text for Trigger's action button when Combobox is empty and closed. Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox is empty and open. Will be rendered in a Tooltip.\n */\n closeActionLabel: string\n\n /**\n * Show a button to clear the Combobox value.\n * @default true\n */\n clearable?: boolean\n}\n\nexport type TriggerProps = TriggerSharedProps &\n (\n | { clearable: false; clearActionLabel?: never }\n | {\n /**\n * The label text for Trigger's action button when Combobox has values selected. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n }\n )\n\nexport const Trigger = React.forwardRef<ElementRef<'input'>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n closeActionLabel,\n clearable = true,\n clearActionLabel,\n onChange,\n onFocus,\n css,\n // @ts-expect-error className required when extending the component with styled()\n className,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value = [],\n readOnly,\n triggerRef,\n inputRef,\n searchValue,\n setSearchValue,\n setOpenState,\n setSize,\n setPlaceholder,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n } = useFormFieldContext()\n\n useEffect(() => {\n setSize(size)\n }, [size, setSize])\n\n useEffect(() => {\n setPlaceholder(placeholder)\n }, [setPlaceholder, placeholder])\n\n const valid = formFieldValid ?? comboboxValid\n\n const scrollIntoView = (\n event: React.FocusEvent<HTMLInputElement>\n ): void => {\n const trigger = triggerRef?.current\n const baseInput = inputRef?.current?.parentElement\n\n if (baseInput != null && trigger != null) {\n event.preventDefault()\n baseInput.scrollTo({\n top: trigger.scrollHeight,\n })\n }\n\n if (onFocus !== undefined) {\n onFocus(event)\n }\n }\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onChange?.(e)\n }\n\n return (\n <RadixAnchor\n ref={mergeRefs([triggerRef, forwardRef])}\n // todo MDS-1112: move this logic to AriakitComboboxTrigger's showOnClick\n onClick={() => {\n if (\n !booleanify(disabled) &&\n !booleanify(ariaDisabled) &&\n !booleanify(readOnly)\n ) {\n setOpenState(true)\n }\n }}\n >\n <AriakitComboboxTrigger\n render={({ ref: ariakitTriggerRef, ...ariakitProps }) => (\n <StyledBaseInput\n aria-disabled={ariaDisabled}\n valid={valid}\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n onChange={onInputChange}\n css={css}\n // @ts-expect-error className required when extending the component with styled()\n className={className}\n >\n <BaseInput.Input\n {...mergeProps(ariakitProps, restProps)}\n ref={mergeRefs([\n inputRef,\n ariakitTriggerRef as React.RefObject<HTMLInputElement>,\n ])}\n value={searchValue}\n id={id ?? formElementId}\n aria-describedby={stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n )}\n aria-invalid={ariaInvalid ?? formFieldAriaInvalid}\n placeholder={\n children === null ||\n children === undefined ||\n value.length === 0\n ? placeholder\n : undefined\n }\n onFocus={scrollIntoView}\n />\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n closeActionLabel={closeActionLabel}\n clearActionLabel={clearActionLabel}\n clearable={clearable}\n size={size}\n />\n </StyledBaseInput>\n )}\n />\n </RadixAnchor>\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'\nimport {\n contentStyles,\n itemsContainerStyles,\n} from '@mirohq/design-system-base-select'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledItemsContainer = styled(Primitive.div, itemsContainerStyles)\n\nexport const StyledContent = styled(RadixPopover.Content, {\n ...contentStyles,\n width: 'var(--radix-popover-trigger-width)',\n overflowY: 'auto',\n boxSizing: 'border-box',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import React from 'react'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\n\nexport const useDocumentFragment = (): DocumentFragment | undefined => {\n const [fragment, setFragment] = React.useState<DocumentFragment>()\n\n // we need `useLayoutEffect` here because `DocumentFragment` doesn't exist on the server\n useLayoutEffect(() => {\n setFragment(new DocumentFragment())\n }, [])\n\n return fragment\n}\n","import React, { useCallback } from 'react'\nimport { createPortal } from 'react-dom'\n\nimport { useDocumentFragment } from './use-document-fragment'\n\n/**\n * Render content in DocumentFragment so items can send its text value to context,\n * otherwise we will have empty chips.\n * Content won't be visible in DOM.\n */\nexport const useInvisibleContent = (): ((\n children: React.ReactNode\n) => React.ReactElement | null) => {\n const fragment = useDocumentFragment()\n\n return useCallback(\n (children: React.ReactNode): React.ReactElement | null =>\n fragment !== undefined\n ? createPortal(<div>{children}</div>, fragment)\n : null,\n [fragment]\n )\n}\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\nimport { ScrollArea } from '@mirohq/design-system-scroll-area'\nimport { theme } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\nimport { ComboboxList as AriakitComboboxList } from '@ariakit/react'\n\nimport { StyledContent, StyledItemsContainer } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport type {\n Align,\n Overflow,\n PointerDownOutsideEvent,\n Side,\n Sticky,\n} from '../types'\nimport { useInvisibleContent } from '../hooks/use-invisible-content'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\nconst RADIX_CONTENT_AVAILABLE_HEIGHT =\n 'var(--radix-popover-content-available-height)'\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 /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onCloseAutoFocus?: (event: Event) => void\n\n /**\n * Event handler called when focus moves to the trigger after closing. It can\n * be prevented by calling event.preventDefault.\n */\n onEscapeKeyDown?: (event: KeyboardEvent) => void\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 * The preferred side of the anchor to render against when open. Will be\n * reversed when collisions occur and avoidCollisions is enabled.\n * @default 'bottom'\n */\n side?: Side\n\n /**\n * The distance in pixels from the anchor.\n * @default CONTENT_OFFSET\n */\n sideOffset?: number\n\n /**\n * The preferred alignment against the anchor. May change when collisions\n * occur.\n * @default 'center'\n */\n align?: Align\n\n /**\n * An offset in pixels from the \"start\" or \"end\" alignment options.\n * @default 0\n */\n alignOffset?: number\n\n /**\n * When true, overrides the side and align preferences to prevent collisions\n * with boundary edges.\n * @default true\n */\n avoidCollisions?: boolean\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 distance in pixels from the boundary edges where collision detection\n * should occur. Accepts a number (same for all sides), or a partial padding\n * object, for example: { top: 20, left: 20 }.\n * @default 0\n */\n collisionPadding?: number | Partial<Record<Side, number>>\n\n /**\n * The sticky behavior on the align axis. \"partial\" will keep the content in the\n * boundary as long as the trigger is at least partially in the boundary whilst\n * \"always\" will keep the content in the boundary regardless.\n * @default 'partial'\n */\n sticky?: Sticky\n\n /**\n * Whether to hide the content when the trigger becomes fully occluded.\n * @default true\n */\n hideWhenDetached?: boolean\n\n /**\n * The max height for the content.\n */\n maxHeight?: CSSProperties['maxHeight']\n\n /**\n * Setting overflow as \"visible\" means that the content can extend beyond\n * its collision boundary without any clipping or scrolling being\n * applied.\n * When set to \"auto,\" a scrollbar is added if the content exceeds its\n * boundaries. If no maxHeight is defined, it will be automatically adjusted\n * to fit the remaining space between the trigger and the boundary edge.\n * @default 'visible'\n */\n overflow?: Overflow\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(\n (\n {\n side = 'bottom',\n sideOffset = CONTENT_OFFSET,\n align = 'center',\n alignOffset = 0,\n collisionPadding = 0,\n avoidCollisions = true,\n sticky = 'partial',\n hideWhenDetached = true,\n overflow = 'visible',\n maxHeight,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const { triggerRef, contentRef, direction, openState } =\n useComboboxContext()\n\n const getInvisibleContent = useInvisibleContent()\n\n if (!openState) {\n return getInvisibleContent(children)\n }\n\n const content = <StyledItemsContainer>{children}</StyledItemsContainer>\n\n return (\n <StyledContent\n {...restProps}\n dir={direction}\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n avoidCollisions={avoidCollisions}\n collisionPadding={collisionPadding}\n sticky={sticky}\n hideWhenDetached={hideWhenDetached}\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 {/* we have to specify role here otherwise it would be overwritten by Radix.Content */}\n <AriakitComboboxList role='listbox'>\n {overflow === 'auto' ? (\n <ScrollArea type='always' dir={direction}>\n <ScrollArea.Viewport\n css={{\n maxHeight:\n maxHeight !== undefined\n ? `min(${RADIX_CONTENT_AVAILABLE_HEIGHT}, ${\n typeof maxHeight === 'number'\n ? `${maxHeight}px`\n : maxHeight\n })`\n : RADIX_CONTENT_AVAILABLE_HEIGHT,\n }}\n >\n {content}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea>\n ) : (\n content\n )}\n </AriakitComboboxList>\n </StyledContent>\n )\n }\n)\n","import { ComboboxItem } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { itemStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledItem = styled(ComboboxItem, itemStyles)\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React, { createContext, useContext } from 'react'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\ninterface GroupProviderSharedProps extends FormElementProps {\n groupId?: string\n}\n\ninterface GroupContextProps extends GroupProviderSharedProps {}\n\ninterface GroupProviderProps extends GroupProviderSharedProps {\n children: React.ReactNode\n}\n\nconst GroupContext = createContext<GroupContextProps>({} as any)\n\nexport const GroupProvider = ({\n children,\n ...restProps\n}: GroupProviderProps): JSX.Element => (\n <GroupContext.Provider\n value={{\n ...restProps,\n }}\n >\n {children}\n </GroupContext.Provider>\n)\n\nexport const useGroupContext = (): GroupContextProps => useContext(GroupContext)\n","import React, { useMemo } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { mergeProps } from '@react-aria/utils'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport { useLayoutEffect } from '@mirohq/design-system-use-layout-effect'\nimport { StyledItemCheck } from '@mirohq/design-system-base-select'\n\nimport { StyledItem } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { useGroupContext } from '../hooks/use-group-context'\nimport { searchQueryMatch } from '../utils'\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 {\n searchValue,\n autoFilter,\n setItemsMap,\n triggerRef,\n inputRef,\n value: comboboxValue = [],\n } = useComboboxContext()\n\n const { groupId } = useGroupContext()\n\n const displayedText = useMemo((): string => {\n if (textValue !== undefined) {\n return textValue\n }\n\n return typeof children === 'string' ? children : ''\n }, [textValue, children])\n\n useLayoutEffect(() => {\n setItemsMap(\n prevState => new Map(prevState.set(value, { displayedText, groupId }))\n )\n\n return () => {\n setItemsMap(prevState => {\n prevState.delete(value)\n return new Map(prevState)\n })\n }\n }, [setItemsMap, groupId, value, displayedText])\n\n if (\n autoFilter &&\n searchValue.length > 0 &&\n !searchQueryMatch(displayedText, searchValue)\n ) {\n return null\n }\n\n const scrollIntoView = (event: React.MouseEvent<HTMLDivElement>): void => {\n if (\n inputRef?.current?.parentElement != null &&\n triggerRef?.current != null\n ) {\n inputRef.current.parentElement.scrollTo({\n top: triggerRef.current.scrollHeight,\n })\n }\n\n if (restProps.onClick !== undefined) {\n restProps.onClick(event)\n }\n }\n\n // todo MDS-1142 find a better way to fix blinking.\n // We need to use custom state because Ariakit changes its state internally on click even for controlled Combobox\n // and it case `aria-selected` value and checkmark to blink.\n const isSelected = comboboxValue.includes(value)\n\n return (\n <StyledItem\n {...mergeProps(restProps, restAriaDisabledProps)}\n focusable\n hideOnClick={false}\n accessibleWhenDisabled={booleanify(ariaDisabled)}\n disabled={booleanify(ariaDisabled) || disabled}\n ref={forwardRef}\n value={value}\n onClick={scrollIntoView}\n aria-selected={isSelected}\n >\n <AriakitComboboxItemCheck\n checked={isSelected}\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\n size='small'\n data-testid={\n process.env.NODE_ENV === 'test'\n ? 'combobox-item-check'\n : undefined\n }\n />\n </AriakitComboboxItemCheck>\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\nimport { useComboboxContext } from '../hooks/use-combobox-context'\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 = ({\n forceMount: forceMountProp,\n ...restProps\n}: PortalProps): React.ReactNode => {\n const { openState } = useComboboxContext()\n\n // We always need to render content with items to be able to render Chips in Value,\n // but without forceMount Radix will not render Portal when Popover is closed\n const forceMount = !openState || forceMountProp\n\n return <RadixPortal forceMount={forceMount} {...restProps} />\n}\n","import { Group as AriakitGroup } from '@ariakit/react'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledGroup = styled(AriakitGroup, {})\n\nexport type StyledGroupProps = StrictComponentProps<typeof StyledGroup>\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { useId } from '@mirohq/design-system-use-id'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport type { StyledGroupProps } from './group.styled'\nimport { StyledGroup } from './group.styled'\nimport { useInvisibleContent } from '../hooks/use-invisible-content'\nimport { GroupProvider } from '../hooks/use-group-context'\n\nexport type GroupProps = StyledGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, searchValue, filteredItems } = useComboboxContext()\n\n const id = useId()\n const getInvisibleContent = useInvisibleContent()\n\n let hasVisibleContent = true\n\n if (autoFilter && searchValue.length > 0) {\n hasVisibleContent = filteredItems.some(item => item.groupId === id)\n }\n\n return (\n <GroupProvider groupId={id}>\n {hasVisibleContent ? (\n <StyledGroup {...rest} ref={forwardRef}>\n {children}\n </StyledGroup>\n ) : (\n getInvisibleContent(children)\n )}\n </GroupProvider>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { groupLabelStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledGroupLabel = styled(GroupLabel, groupLabelStyles)\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 React, { useCallback } from 'react'\nimport type { FC } from 'react'\nimport { Chip } from '@mirohq/design-system-chip'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ValueProps {\n /**\n * The label to make the remove button recognizable by the screen readers.\n */\n unselectAriaLabel: string\n}\n\nexport const Value: FC<ValueProps> = ({ unselectAriaLabel }) => {\n const {\n value = [],\n setValue,\n disabled,\n readOnly,\n 'aria-disabled': ariaDisabled,\n itemsMap,\n } = useComboboxContext()\n const canRemoveItem =\n !booleanify(ariaDisabled) && !booleanify(disabled) && !booleanify(readOnly)\n\n const onItemRemove = useCallback(\n (item: string): void => {\n setValue(prevValue => prevValue?.filter(value => value !== item))\n },\n [setValue]\n )\n\n const getItemText = useCallback(\n (itemValue: string) => {\n const itemData = itemsMap.get(itemValue)\n if (itemData === undefined || itemData.displayedText === '') {\n return null\n }\n\n return (\n <Chip\n key={itemValue}\n onRemove={e => {\n onItemRemove(itemValue)\n e.stopPropagation()\n }}\n removable={canRemoveItem}\n removeAriaLabel={`${unselectAriaLabel} ${itemData.displayedText}`}\n data-testid={\n process.env.NODE_ENV === 'test'\n ? `combobox-value-${itemValue}`\n : undefined\n }\n >\n {itemData.displayedText}\n </Chip>\n )\n },\n [canRemoveItem, itemsMap, onItemRemove, unselectAriaLabel]\n )\n\n return <>{value.map(getItemText)}</>\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { separatorStyles } from '@mirohq/design-system-base-select'\n\nexport const StyledSeparator = styled(Primitive.div, separatorStyles)\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\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 const { autoFilter, searchValue } = useComboboxContext()\n\n if (autoFilter && searchValue.length > 0) {\n return null\n }\n\n return <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 StyledNativeSelect = styled(Primitive.select, {\n // if we support autoComplete, we would have to use visually-hidden styles here\n display: 'none',\n})\n\nexport const StyledComboboxContent = styled(Primitive.div, {\n position: 'relative',\n width: '100%',\n})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledNoResult = styled(Primitive.div, {\n padding: '$100',\n})\n\nexport type StyledNoResultProps = StrictComponentProps<typeof StyledNoResult>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\n\nimport type { StyledNoResultProps } from './no-result.styled'\nimport { StyledNoResult } from './no-result.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface NoResultProps extends StyledNoResultProps {\n /**\n * The content.\n */\n children?: ReactNode\n}\n\nexport const NoResult = React.forwardRef<\n ElementRef<typeof StyledNoResult>,\n NoResultProps\n>((props, forwardRef) => {\n const { autoFilter, searchValue, filteredItems, itemsMap } =\n useComboboxContext()\n\n // when filtering is disabled or idle, just checking if there are any items provided\n const noActiveFiltering =\n !autoFilter || (autoFilter && searchValue.length === 0)\n\n const isVisible = noActiveFiltering\n ? itemsMap.size === 0\n : filteredItems.length === 0\n\n if (isVisible) {\n return <StyledNoResult {...props} ref={forwardRef} />\n }\n\n return null\n})\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport {\n BaseTooltipProvider,\n useBaseTooltipContext,\n} from '@mirohq/design-system-base-tooltip'\nimport { usePrevious } from '@mirohq/design-system-use-previous'\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, StyledNativeSelect } from './combobox.styled'\nimport type { StyledComboboxProps } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { Direction } from './types'\nimport { NoResult } from './partials/no-result'\n\nexport interface ComboboxProps extends FormElementProps, StyledComboboxProps {\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 controlled search value to filter items. Should be used in conjunction with\n * onSearchValueChange.\n */\n searchValue?: string\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 * The name of the combobox. Submitted with its owning form as part of a\n * name/value pair.\n */\n name?: string\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n { value: valueProp, onValueChange, name, children, ...restProps },\n forwardRef\n ) => {\n const {\n openState,\n setOpenState,\n value = [],\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n triggerRef,\n } = useComboboxContext()\n\n const {\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n formElementRef,\n } = useFormFieldContext<HTMLSelectElement>()\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 { ignoreNextTooltip } = useBaseTooltipContext()\n const prevOpen = usePrevious(openState)\n\n useEffect(() => {\n if (prevOpen === true && !openState) {\n ignoreNextTooltip()\n }\n }, [ignoreNextTooltip, openState, prevOpen])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n setValue(typeof newValue === 'string' ? [newValue] : newValue)\n }\n\n const onOpenChange = (value: boolean): void => {\n if (!booleanify(readOnly)) {\n setOpenState(value)\n }\n }\n\n const isFormControl = Boolean(triggerRef.current?.closest('form'))\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={onOpenChange}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={onOpenChange}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent\n ref={forwardRef}\n {...restProps}\n dir={direction}\n data-form-element='select'\n >\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n {isFormControl && (\n <StyledNativeSelect\n multiple\n autoComplete='off'\n name={name}\n tabIndex={-1}\n aria-hidden='true'\n ref={formElementRef}\n required={required}\n disabled={disabled}\n aria-disabled={ariaDisabled}\n value={value}\n // since we don't support autoComplete there is no way this select value will change,\n // although we still need to provide `onChange` since we use `value` and not `defaultValue`\n onChange={() => {}}\n >\n {value.length === 0 ? (\n <option value='' />\n ) : (\n // since we don't support autoComplete we can render here only selected values\n value.map(itemValue => (\n <option key={itemValue} value={itemValue}>\n {itemValue}\n </option>\n ))\n )}\n </StyledNativeSelect>\n )}\n </RadixPopover.Root>\n )\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 onClose,\n searchValue,\n onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\n searchValue={searchValue}\n onSearchValueChange={onSearchValueChange}\n defaultOpen={defaultOpen}\n open={open}\n onOpen={onOpen}\n onClose={onClose}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n autoFilter={autoFilter}\n >\n <BaseTooltipProvider>\n <Root {...restProps} value={value} ref={forwardRef} />\n </BaseTooltipProvider>\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 NoResult: typeof NoResult\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\nCombobox.NoResult = NoResult\n"],"names":["RadixTrigger","RadixAnchor","AriakitComboboxTrigger","AriakitComboboxList","AriakitComboboxItemCheck","RadixPortal","AriakitGroup","GroupLabel","value","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,eAAA,GAAkB,OAAO,SAAW,EAAA;AAAA,EAC/C,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,CAAA;AAAA,EACV,GAAK,EAAA,KAAA;AAAA,EAEL,gCAAkC,EAAA;AAAA;AAAA,IAEhC,YAAc,EAAA,MAAA;AAAA,GAChB;AAAA,EAEA,SAAW,EAAA;AAAA,IACT,QAAU,EAAA,IAAA;AAAA,IACV,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,GACZ;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,SAAW,EAAA,IAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,OAAS,EAAA,UAAA;AAAA,QACT,YAAc,EAAA,MAAA;AAAA,QACd,QAAU,EAAA,MAAA;AAAA,OACZ;AAAA,MACA,KAAO,EAAA;AAAA,QACL,SAAW,EAAA,KAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,OAAS,EAAA,UAAA;AAAA,QACT,YAAc,EAAA,MAAA;AAAA,OAChB;AAAA,MACA,SAAW,EAAA;AAAA,QACT,SAAW,EAAA,KAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,OAAS,EAAA,UAAA;AAAA,QACT,YAAc,EAAA,MAAA;AAAA,QACd,QAAU,EAAA,M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,IACb,GAAG,SAAA;AAAA,KAEL,UAEA,qBAAA,GAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,YAAA;AAAA,MACA,KAAA;AAAA,MACA,aAAA;AAAA,MACA,WAAA;AAAA,MACA,mBAAA;AAAA,MACA,WAAA;AAAA,MACA,IAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,eAAe,EAAA,YAAA;AAAA,MACf,SAAA;AAAA,MACA,UAAA;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,uBACC,QAAC,kBAAA,GAAA,CAAA,IAAA,EAAA,EAAM,GAAG,SAAW,EAAA,KAAA,EAAc,GAAK,EAAA,UAAA,EAAY,CACtD,EAAA,CAAA;AAAA,KAAA;AAAA,GACF;AAEJ,EAAA;AAcA,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,CAAA;AACjB,QAAA,CAAS,SAAY,GAAA,SAAA,CAAA;AACrB,QAAA,CAAS,QAAW,GAAA,QAAA;;;;;;;;"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import react__default, { ReactNode, FC, ComponentPropsWithRef } from 'react';
|
|
2
|
+
import react__default, { ReactNode, FC, ComponentPropsWithRef, ForwardRefExoticComponent } from 'react';
|
|
3
3
|
import { FormElementProps } from '@mirohq/design-system-base-form';
|
|
4
4
|
import { BaseInputStyledProps, BaseInputProps } from '@mirohq/design-system-base-input';
|
|
5
5
|
import { CSSProperties } from '@stitches/react';
|
|
@@ -40,7 +40,7 @@ interface TriggerSharedProps extends Omit<BaseInputStyledProps, 'size'> {
|
|
|
40
40
|
*/
|
|
41
41
|
clearable?: boolean;
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
type TriggerProps = TriggerSharedProps & ({
|
|
44
44
|
clearable: false;
|
|
45
45
|
clearActionLabel?: never;
|
|
46
46
|
} | {
|
|
@@ -52,16 +52,16 @@ declare type TriggerProps = TriggerSharedProps & ({
|
|
|
52
52
|
declare const Trigger: react__default.ForwardRefExoticComponent<TriggerProps & react__default.RefAttributes<HTMLInputElement>>;
|
|
53
53
|
|
|
54
54
|
declare const StyledContent: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<RadixPopover.PopoverContentProps & react.RefAttributes<HTMLDivElement>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<RadixPopover.PopoverContentProps & react.RefAttributes<HTMLDivElement>>, {}, {}>;
|
|
55
|
-
|
|
55
|
+
type StyledContentProps = StrictComponentProps<typeof StyledContent>;
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
type PointerDownOutsideEvent = CustomEvent<{
|
|
58
58
|
originalEvent: PointerEvent;
|
|
59
59
|
}>;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
type Side = 'top' | 'right' | 'bottom' | 'left';
|
|
61
|
+
type Align = 'start' | 'center' | 'end';
|
|
62
|
+
type Direction = 'ltr' | 'rtl';
|
|
63
|
+
type Overflow = 'auto' | 'visible';
|
|
64
|
+
type Sticky = 'partial' | 'always';
|
|
65
65
|
|
|
66
66
|
type types_PointerDownOutsideEvent = PointerDownOutsideEvent;
|
|
67
67
|
type types_Side = Side;
|
|
@@ -170,8 +170,8 @@ interface ContentProps extends StyledContentProps {
|
|
|
170
170
|
}
|
|
171
171
|
declare const Content: react__default.ForwardRefExoticComponent<Omit<ContentProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
|
|
172
172
|
|
|
173
|
-
declare const StyledItem: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.ComboboxItemProps
|
|
174
|
-
|
|
173
|
+
declare const StyledItem: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.ComboboxItemProps) => react.ReactElement<any, string | react.JSXElementConstructor<any>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<(props: _ariakit_react.ComboboxItemProps) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, {}, {}>;
|
|
174
|
+
type StyledItemProps = StrictComponentProps<typeof StyledItem>;
|
|
175
175
|
|
|
176
176
|
interface ItemProps extends StyledItemProps {
|
|
177
177
|
/**
|
|
@@ -202,16 +202,16 @@ interface PortalProps extends PopoverPortalProps {
|
|
|
202
202
|
*/
|
|
203
203
|
container?: HTMLElement | null;
|
|
204
204
|
}
|
|
205
|
-
declare const Portal: react__default.
|
|
205
|
+
declare const Portal: ({ forceMount: forceMountProp, ...restProps }: PortalProps) => react__default.ReactNode;
|
|
206
206
|
|
|
207
|
-
declare const StyledGroup: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.GroupProps
|
|
208
|
-
|
|
207
|
+
declare const StyledGroup: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.GroupProps) => react.ReactElement<any, string | react.JSXElementConstructor<any>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<(props: _ariakit_react.GroupProps) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, {}, {}>;
|
|
208
|
+
type StyledGroupProps = StrictComponentProps<typeof StyledGroup>;
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
type GroupProps = StyledGroupProps;
|
|
211
211
|
declare const Group: react__default.ForwardRefExoticComponent<Omit<StyledGroupProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
|
|
212
212
|
|
|
213
|
-
declare const StyledGroupLabel: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.GroupLabelProps
|
|
214
|
-
|
|
213
|
+
declare const StyledGroupLabel: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.GroupLabelProps) => react.ReactElement<any, string | react.JSXElementConstructor<any>>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<(props: _ariakit_react.GroupLabelProps) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, {}, {}>;
|
|
214
|
+
type StyledGroupLabelProps = StrictComponentProps<typeof StyledGroupLabel>;
|
|
215
215
|
|
|
216
216
|
interface GroupLabelProps extends StyledGroupLabelProps {
|
|
217
217
|
}
|
|
@@ -226,17 +226,17 @@ interface ValueProps {
|
|
|
226
226
|
declare const Value: FC<ValueProps>;
|
|
227
227
|
|
|
228
228
|
declare const StyledSeparator: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
229
|
-
|
|
229
|
+
type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>;
|
|
230
230
|
|
|
231
231
|
interface SeparatorProps extends StyledSeparatorProps {
|
|
232
232
|
}
|
|
233
233
|
declare const Separator: react__default.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
|
|
234
234
|
|
|
235
235
|
declare const StyledComboboxContent: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
236
|
-
|
|
236
|
+
type StyledComboboxProps = ComponentPropsWithRef<typeof StyledComboboxContent>;
|
|
237
237
|
|
|
238
238
|
declare const StyledNoResult: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
239
|
-
|
|
239
|
+
type StyledNoResultProps = StrictComponentProps<typeof StyledNoResult>;
|
|
240
240
|
|
|
241
241
|
interface NoResultProps extends StyledNoResultProps {
|
|
242
242
|
/**
|
|
@@ -311,7 +311,7 @@ interface ComboboxProps extends FormElementProps, StyledComboboxProps {
|
|
|
311
311
|
*/
|
|
312
312
|
name?: string;
|
|
313
313
|
}
|
|
314
|
-
declare const Combobox:
|
|
314
|
+
declare const Combobox: ForwardRefExoticComponent<ComboboxProps> & Partials;
|
|
315
315
|
interface Partials {
|
|
316
316
|
Portal: typeof Portal;
|
|
317
317
|
Trigger: typeof Trigger;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-combobox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-pdl-removing-ffs.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -31,21 +31,20 @@
|
|
|
31
31
|
"@radix-ui/react-popover": "^1.0.7",
|
|
32
32
|
"@radix-ui/react-use-controllable-state": "1.0.1",
|
|
33
33
|
"@react-aria/utils": "^3.13.0",
|
|
34
|
-
"@mirohq/design-system-base-form": "^0.
|
|
35
|
-
"@mirohq/design-system-base-select": "^0.
|
|
36
|
-
"@mirohq/design-system-base-input": "^0.
|
|
37
|
-
"@mirohq/design-system-base-tooltip": "^0.
|
|
38
|
-
"@mirohq/design-system-chip": "^0.
|
|
39
|
-
"@mirohq/design-system-
|
|
40
|
-
"@mirohq/design-system-primitive": "^
|
|
41
|
-
"@mirohq/design-system-
|
|
42
|
-
"@mirohq/design-system-
|
|
43
|
-
"@mirohq/design-system-
|
|
44
|
-
"@mirohq/design-system-use-id": "^0.
|
|
45
|
-
"@mirohq/design-system-use-layout-effect": "^0.
|
|
46
|
-
"@mirohq/design-system-use-previous": "^0.
|
|
47
|
-
"@mirohq/design-system-utils": "^0.
|
|
48
|
-
"@mirohq/design-system-use-aria-disabled": "^0.2.1"
|
|
34
|
+
"@mirohq/design-system-base-form": "^1.0.0-pdl-removing-ffs.0",
|
|
35
|
+
"@mirohq/design-system-base-select": "^1.0.0-pdl-removing-ffs.0",
|
|
36
|
+
"@mirohq/design-system-base-input": "^1.0.0-pdl-removing-ffs.0",
|
|
37
|
+
"@mirohq/design-system-base-tooltip": "^1.0.0-pdl-removing-ffs.0",
|
|
38
|
+
"@mirohq/design-system-chip": "^1.0.0-pdl-removing-ffs.0",
|
|
39
|
+
"@mirohq/design-system-icons": "^1.0.0-pdl-removing-ffs.0",
|
|
40
|
+
"@mirohq/design-system-primitive": "^2.0.0-pdl-removing-ffs.0",
|
|
41
|
+
"@mirohq/design-system-scroll-area": "^1.0.0-pdl-removing-ffs.0",
|
|
42
|
+
"@mirohq/design-system-stitches": "^3.0.0-pdl-removing-ffs.0",
|
|
43
|
+
"@mirohq/design-system-use-aria-disabled": "^1.0.0-pdl-removing-ffs.0",
|
|
44
|
+
"@mirohq/design-system-use-id": "^1.0.0-pdl-removing-ffs.0",
|
|
45
|
+
"@mirohq/design-system-use-layout-effect": "^1.0.0-pdl-removing-ffs.0",
|
|
46
|
+
"@mirohq/design-system-use-previous": "^1.0.0-pdl-removing-ffs.0",
|
|
47
|
+
"@mirohq/design-system-utils": "^1.0.0-pdl-removing-ffs.0"
|
|
49
48
|
},
|
|
50
49
|
"scripts": {
|
|
51
50
|
"build": "rollup -c ../../../rollup.config.js",
|