@mirohq/design-system-combobox 0.1.0-combobox.7 → 0.1.0-combobox.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -13,10 +13,10 @@ var designSystemInput = require('@mirohq/design-system-input');
13
13
  var reactUseControllableState = require('@radix-ui/react-use-controllable-state');
14
14
  var designSystemIcons = require('@mirohq/design-system-icons');
15
15
  var designSystemScrollArea = require('@mirohq/design-system-scroll-area');
16
+ var designSystemPrimitive = require('@mirohq/design-system-primitive');
16
17
  var utils = require('@react-aria/utils');
17
18
  var designSystemUseAriaDisabled = require('@mirohq/design-system-use-aria-disabled');
18
19
  var designSystemStyles = require('@mirohq/design-system-styles');
19
- var designSystemPrimitive = require('@mirohq/design-system-primitive');
20
20
  var designSystemBaseButton = require('@mirohq/design-system-base-button');
21
21
 
22
22
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -167,25 +167,48 @@ const StyledActionButton = designSystemStitches.styled(designSystemInput.Input.A
167
167
 
168
168
  const TriggerActionButton = ({
169
169
  openActionLabel,
170
+ closeActionLabel,
170
171
  clearActionLabel,
171
172
  size
172
173
  }) => {
173
- const { setOpenState, value = [], setValue } = useComboboxContext();
174
+ const { openState, setOpenState, value = [], setValue } = useComboboxContext();
174
175
  const isEmpty = value.length === 0;
175
- const ActionButtonIcon = isEmpty ? designSystemIcons.IconChevronDown : designSystemIcons.IconCross;
176
- const label = isEmpty ? openActionLabel : clearActionLabel;
177
- const onActionButtonClick = React.useCallback(
176
+ const onToggleClick = React.useCallback(
178
177
  (event) => {
179
- if (!isEmpty) {
180
- setValue([]);
181
- } else {
182
- setOpenState((prevOpen = false) => !prevOpen);
178
+ if (openState) {
179
+ setOpenState(false);
183
180
  }
184
181
  event.stopPropagation();
185
182
  },
186
- [isEmpty, setValue, setOpenState]
183
+ [setOpenState, openState]
184
+ );
185
+ const onClearClick = React.useCallback(
186
+ (event) => {
187
+ setValue([]);
188
+ event.stopPropagation();
189
+ },
190
+ [setValue]
191
+ );
192
+ if (isEmpty) {
193
+ return /* @__PURE__ */ jsxRuntime.jsx(RadixPopover.Trigger, { asChild: true, "aria-haspopup": "listbox", children: /* @__PURE__ */ jsxRuntime.jsx(
194
+ StyledActionButton,
195
+ {
196
+ label: openState ? closeActionLabel : openActionLabel,
197
+ size,
198
+ onClick: onToggleClick,
199
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystemIcons.IconChevronDown, { size: "small", weight: "thin" })
200
+ }
201
+ ) });
202
+ }
203
+ return /* @__PURE__ */ jsxRuntime.jsx(
204
+ StyledActionButton,
205
+ {
206
+ label: clearActionLabel,
207
+ size,
208
+ onClick: onClearClick,
209
+ children: /* @__PURE__ */ jsxRuntime.jsx(designSystemIcons.IconCross, { size: "small", weight: "thin" })
210
+ }
187
211
  );
188
- return /* @__PURE__ */ jsxRuntime.jsx(StyledActionButton, { label, size, onClick: onActionButtonClick, children: /* @__PURE__ */ jsxRuntime.jsx(ActionButtonIcon, { size: "small", weight: "thin" }) });
189
212
  };
190
213
 
191
214
  const Trigger = React__default["default"].forwardRef(
@@ -197,6 +220,7 @@ const Trigger = React__default["default"].forwardRef(
197
220
  "aria-invalid": ariaInvalid,
198
221
  placeholder,
199
222
  openActionLabel,
223
+ closeActionLabel,
200
224
  clearActionLabel,
201
225
  onChange,
202
226
  css,
@@ -217,7 +241,6 @@ const Trigger = React__default["default"].forwardRef(
217
241
  } = useComboboxContext();
218
242
  const {
219
243
  formElementId,
220
- ariaDescribedBy: formFieldContextDescribedBy,
221
244
  ariaInvalid: formFieldAriaInvalid,
222
245
  valid: formFieldValid,
223
246
  label,
@@ -229,10 +252,8 @@ const Trigger = React__default["default"].forwardRef(
229
252
  ...restProps,
230
253
  "aria-disabled": ariaDisabled,
231
254
  "aria-invalid": ariaInvalid != null ? ariaInvalid : formFieldAriaInvalid,
232
- "aria-describedby": designSystemUtils.stringAttrValue(
233
- ariaDescribedBy,
234
- formFieldContextDescribedBy
235
- ),
255
+ // todo MDS-1011: use formFieldContextDescribedBy after removing form context from BaseInput
256
+ "aria-describedby": ariaDescribedBy,
236
257
  valid,
237
258
  disabled,
238
259
  readOnly,
@@ -291,6 +312,7 @@ const Trigger = React__default["default"].forwardRef(
291
312
  TriggerActionButton,
292
313
  {
293
314
  openActionLabel,
315
+ closeActionLabel,
294
316
  clearActionLabel,
295
317
  size
296
318
  }
@@ -306,6 +328,9 @@ const Trigger = React__default["default"].forwardRef(
306
328
  }
307
329
  );
308
330
 
331
+ const NoResultPlaceholder = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
332
+ padding: "$100"
333
+ });
309
334
  const StyledContent = designSystemStitches.styled(RadixPopover__namespace.Content, {
310
335
  backgroundColor: "$background-neutrals-container",
311
336
  borderRadius: "$50",
@@ -441,7 +466,13 @@ const isInsideRef = (element, ref) => {
441
466
  return (_b = element != null && ((_a = ref.current) == null ? void 0 : _a.contains(element))) != null ? _b : false;
442
467
  };
443
468
  const Content = React__default["default"].forwardRef(
444
- ({ sideOffset = CONTENT_OFFSET, maxHeight, children, ...restProps }, forwardRef) => {
469
+ ({
470
+ sideOffset = CONTENT_OFFSET,
471
+ maxHeight,
472
+ overflow,
473
+ children,
474
+ ...restProps
475
+ }, forwardRef) => {
445
476
  const {
446
477
  triggerRef,
447
478
  contentRef,
@@ -462,11 +493,13 @@ const Content = React__default["default"].forwardRef(
462
493
  )
463
494
  );
464
495
  }, [children, autoFilter, setFilteredItems, searchValue]);
465
- const content = filteredItems.size === 0 ? noResultsText : children;
496
+ const content = filteredItems.size === 0 ? /* @__PURE__ */ jsxRuntime.jsx(NoResultPlaceholder, { children: noResultsText }) : children;
466
497
  return /* @__PURE__ */ jsxRuntime.jsx(
467
498
  StyledContent,
468
499
  {
500
+ asChild: true,
469
501
  ...restProps,
502
+ dir: direction,
470
503
  sideOffset,
471
504
  ref: designSystemUtils.mergeRefs([forwardRef, contentRef]),
472
505
  onOpenAutoFocus: (event) => event.preventDefault(),
@@ -478,7 +511,7 @@ const Content = React__default["default"].forwardRef(
478
511
  event.preventDefault();
479
512
  }
480
513
  },
481
- children: /* @__PURE__ */ jsxRuntime.jsxs(designSystemScrollArea.ScrollArea, { type: "always", dir: direction, children: [
514
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.ComboboxList, { role: "listbox", children: overflow === "auto" ? /* @__PURE__ */ jsxRuntime.jsxs(designSystemScrollArea.ScrollArea, { type: "always", dir: direction, children: [
482
515
  /* @__PURE__ */ jsxRuntime.jsx(
483
516
  designSystemScrollArea.ScrollArea.Viewport,
484
517
  {
@@ -489,7 +522,7 @@ const Content = React__default["default"].forwardRef(
489
522
  }
490
523
  ),
491
524
  /* @__PURE__ */ jsxRuntime.jsx(designSystemScrollArea.ScrollArea.Scrollbar, { orientation: "vertical", children: /* @__PURE__ */ jsxRuntime.jsx(designSystemScrollArea.ScrollArea.Thumb, {}) })
492
- ] })
525
+ ] }) : content })
493
526
  }
494
527
  );
495
528
  }
@@ -497,6 +530,8 @@ const Content = React__default["default"].forwardRef(
497
530
 
498
531
  const Portal = (props) => /* @__PURE__ */ jsxRuntime.jsx(RadixPopover.Portal, { ...props });
499
532
 
533
+ const StyledGroup = designSystemStitches.styled(react.Group);
534
+
500
535
  const Group = React__default["default"].forwardRef(({ children, ...rest }, forwardRef) => {
501
536
  const { autoFilter, filteredItems } = useComboboxContext();
502
537
  const childValues = React.useMemo(
@@ -514,7 +549,7 @@ const Group = React__default["default"].forwardRef(({ children, ...rest }, forwa
514
549
  if (!hasVisibleChildren) {
515
550
  return null;
516
551
  }
517
- return /* @__PURE__ */ jsxRuntime.jsx(react.Group, { ...rest, ref: forwardRef, children });
552
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledGroup, { ...rest, ref: forwardRef, children });
518
553
  });
519
554
 
520
555
  const StyledGroupLabel = designSystemStitches.styled(react.GroupLabel, {
@@ -533,13 +568,13 @@ const StyledChip = designSystemStitches.styled(designSystemPrimitive.Primitive.d
533
568
  gap: "$50",
534
569
  whiteSpace: "nowrap",
535
570
  maxWidth: "$35",
536
- background: "$gray-100",
537
- color: "$gray-900"
571
+ backgroundColor: "$background-neutrals-subtle",
572
+ color: "$text-neutrals"
538
573
  });
539
574
  const StyledChipButton = designSystemStitches.styled(designSystemBaseButton.BaseButton, {
575
+ color: "$icon-neutrals-inactive",
540
576
  ...designSystemStyles.focus.css({
541
- boxShadow: "$focus-small-outline",
542
- borderColor: "$blue-400 !important"
577
+ boxShadow: "$focus-small-outline"
543
578
  })
544
579
  });
545
580
  const StyledChipContent = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
@@ -557,9 +592,9 @@ const StyledLeftSlot = designSystemStitches.styled(designSystemPrimitive.Primiti
557
592
  const LeftSlot = StyledLeftSlot;
558
593
 
559
594
  const Chip = React__default["default"].forwardRef(
560
- ({ children, disabled = false, onRemove, removeChipAriaLabel, ...restProps }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsxs(StyledChip, { ...restProps, ref: forwardRef, children: [
595
+ ({ children, disabled = false, onRemove, removeAriaLabel, ...restProps }, forwardRef) => /* @__PURE__ */ jsxRuntime.jsxs(StyledChip, { ...restProps, ref: forwardRef, children: [
561
596
  /* @__PURE__ */ jsxRuntime.jsx(StyledChipContent, { children }),
562
- !designSystemUtils.booleanify(disabled) && /* @__PURE__ */ jsxRuntime.jsx(StyledChipButton, { onClick: onRemove, "aria-label": removeChipAriaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(designSystemIcons.IconCross, { size: "small", weight: "thin", color: "gray-500" }) })
597
+ !designSystemUtils.booleanify(disabled) && /* @__PURE__ */ jsxRuntime.jsx(StyledChipButton, { onClick: onRemove, "aria-label": removeAriaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(designSystemIcons.IconCross, { size: "small", weight: "thin", "aria-hidden": true }) })
563
598
  ] })
564
599
  );
565
600
  Chip.LeftSlot = LeftSlot;
@@ -568,7 +603,7 @@ const StyledValue = designSystemStitches.styled(Chip, {
568
603
  marginTop: "$50"
569
604
  });
570
605
 
571
- const Value = ({ removeChipAriaLabel }) => {
606
+ const Value = ({ unselectAriaLabel }) => {
572
607
  const {
573
608
  value = [],
574
609
  setValue,
@@ -587,7 +622,7 @@ const Value = ({ removeChipAriaLabel }) => {
587
622
  {
588
623
  onRemove: () => onItemRemove(item),
589
624
  disabled: isDisabled,
590
- removeChipAriaLabel,
625
+ removeAriaLabel: "".concat(unselectAriaLabel, " ").concat(item),
591
626
  "data-testid": process.env.NODE_ENV === "test" ? "combobox-value-".concat(item) : void 0,
592
627
  children: item
593
628
  },
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sources":["../src/partials/trigger.styled.tsx","../src/hooks/use-combobox-context.tsx","../src/partials/trigger-action-button.styled.tsx","../src/partials/trigger-action-button.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/util.ts","../src/partials/content.tsx","../src/partials/portal.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/chip/chip.styled.tsx","../src/chip/left-icon.styled.tsx","../src/chip/left-slot.tsx","../src/chip/chip.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\nimport { Anchor as RadixAnchor } from '@radix-ui/react-popover'\n\nexport const StyledAnchor = styled(RadixAnchor, {\n position: 'relative',\n width: '100%',\n})\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n overflowY: 'scroll',\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 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 },\n\n defaultVariants: {\n size: 'large',\n },\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren, ReactNode } 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'\n\nexport interface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n value?: string[]\n defaultValue?: string[]\n onValueChange?: (value: string[]) => void\n onSearchValueChange?: (value: string) => void\n direction?: Direction\n autoFilter?: boolean\n noResultsText?: ReactNode\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState: boolean\n value?: string[]\n setValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n inputRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string>>\n filteredItems: Set<string>\n setFilteredItems: React.Dispatch<React.SetStateAction<Set<string>>>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n open: openProp,\n defaultOpen,\n onOpen,\n onClose,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange,\n onSearchValueChange,\n autoFilter = true,\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 const [defaultValue, setDefaultValue] = useState(defaultValueProp)\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 const [filteredItems, setFilteredItems] = useState(new Set<string>())\n const [searchValue, setSearchValue] = useState('')\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n onSearchValueChange,\n triggerRef,\n inputRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n filteredItems,\n setFilteredItems,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n large: {\n top: '5px',\n },\n 'x-large': {\n top: '9px',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n\nexport type StyledActionButtonProps = StrictComponentProps<\n typeof StyledActionButton\n>\n","import React, { useCallback } from 'react'\nimport { IconChevronDown, IconCross } from '@mirohq/design-system-icons'\n\nimport type { StyledActionButtonProps } from './trigger-action-button.styled'\nimport { StyledActionButton } from './trigger-action-button.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport type TriggerActionButtonProps = Omit<\n StyledActionButtonProps,\n 'label'\n> & {\n /**\n * The label text for Trigger's action button when Combobox is empty. Open/Close action will be performed.\n * Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox has values selected. Clear Combobox values action\n * will be performed. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n}\n\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n clearActionLabel,\n size,\n}) => {\n const { setOpenState, value = [], setValue } = useComboboxContext()\n\n const isEmpty = value.length === 0\n\n const ActionButtonIcon = isEmpty ? IconChevronDown : IconCross\n const label = isEmpty ? openActionLabel : clearActionLabel\n\n const onActionButtonClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (!isEmpty) {\n setValue([])\n } else {\n setOpenState((prevOpen = false) => !prevOpen)\n }\n\n event.stopPropagation()\n },\n [isEmpty, setValue, setOpenState]\n )\n\n return (\n <StyledActionButton label={label} size={size} onClick={onActionButtonClick}>\n <ActionButtonIcon size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox } from '@ariakit/react'\nimport {\n booleanify,\n booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\n\nimport { StyledAnchor, StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<TriggerActionButtonProps, 'openActionLabel' | 'clearActionLabel'> & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n clearActionLabel,\n onChange,\n css,\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 onSearchValueChange,\n searchValue,\n setSearchValue,\n setOpenState,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n readOnly,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined ||\n value.length !== 0 ||\n focused ||\n searchValue !== ''\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 (restProps.onFocus !== undefined) {\n restProps.onFocus(event)\n }\n }\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onSearchValueChange?.(e.target.value)\n onChange?.(e)\n }\n\n return (\n <StyledAnchor\n ref={mergeRefs([triggerRef, forwardRef])}\n css={css}\n onClick={() => {\n if (\n !booleanify(disabled) &&\n !booleanify(ariaDisabled) &&\n !booleanify(readOnly)\n ) {\n setOpenState(true)\n }\n }}\n >\n {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n <Combobox\n render={\n <StyledInput\n {...inputProps}\n value={searchValue}\n size={size}\n ref={inputRef}\n onChange={onInputChange}\n onFocus={scrollIntoView}\n >\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n clearActionLabel={clearActionLabel}\n size={size}\n />\n </StyledInput>\n }\n />\n </StyledAnchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '20px',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n padding: '$50',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'grid',\n gridTemplateColumns: '20px 1fr',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: '20px',\n position: 'relative',\n userSelect: 'none',\n padding: '6px $100 6px $150',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-neutrals-disabled',\n },\n },\n\n '&[aria-selected=\"true\"]:not(:disabled,[aria-disabled=true],[data-disabled])':\n {\n color: '$text-primary-selected',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { 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'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems, triggerRef, inputRef } =\n useComboboxContext()\n\n if (autoFilter !== false && !filteredItems.has(value)) {\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 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 >\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\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 { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\nimport { ScrollArea } from '@mirohq/design-system-scroll-area'\nimport { theme } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\nimport type { Overflow } from '../types'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\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 * The distance in pixels from the anchor. Only available when position is set\n * to popper.\n * @default CONTENT_OFFSET\n */\n sideOffset?: number\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 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 { sideOffset = CONTENT_OFFSET, maxHeight, children, ...restProps },\n forwardRef\n ) => {\n const {\n triggerRef,\n contentRef,\n autoFilter,\n filteredItems,\n setFilteredItems,\n searchValue,\n noResultsText,\n direction,\n } = useComboboxContext()\n\n useEffect(() => {\n const childrenItemValues = getChildrenItemValues(children)\n\n setFilteredItems(\n new Set(\n autoFilter === false\n ? childrenItemValues\n : childrenItemValues.filter(child =>\n child.toLowerCase().includes(searchValue.toLowerCase())\n )\n )\n )\n }, [children, autoFilter, setFilteredItems, searchValue])\n\n const content = filteredItems.size === 0 ? noResultsText : children\n\n return (\n <StyledContent\n {...restProps}\n sideOffset={sideOffset}\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 <ScrollArea type='always' dir={direction}>\n <ScrollArea.Viewport\n availableHeight='var(--radix-popover-content-available-height)'\n verticalGap='var(--space-50) * 2'\n maxHeight={maxHeight}\n >\n {content}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea>\n </StyledContent>\n )\n }\n)\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React, { useMemo } from 'react'\nimport { Group as AriakitGroup } from '@ariakit/react'\nimport type { ElementRef } from 'react'\nimport type { GroupProps as AriakitGroupProps } from '@ariakit/react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nexport type GroupProps = AriakitGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof AriakitGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, filteredItems } = useComboboxContext()\n\n const childValues = useMemo(\n // don't perform calculation if auto filter is disabled\n () => (autoFilter !== false ? getChildrenItemValues(children) : []),\n [children, autoFilter]\n )\n const hasVisibleChildren = useMemo(\n () =>\n // don't perform calculation if auto filter is disabled\n autoFilter !== false\n ? childValues.some(value => filteredItems.has(value))\n : true,\n [childValues, filteredItems, autoFilter]\n )\n\n if (!hasVisibleChildren) {\n return null\n }\n\n return (\n <AriakitGroup {...rest} ref={forwardRef}>\n {children}\n </AriakitGroup>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {\n padding: '6px $100',\n color: '$text-neutrals-subtle',\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n background: '$gray-100',\n color: '$gray-900',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n ...focus.css({\n boxShadow: '$focus-small-outline',\n borderColor: '$blue-400 !important',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeChipAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeChipAriaLabel}>\n <IconCross size='small' weight='thin' color='gray-500' />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Value: FC<ValueProps> = ({ removeChipAriaLabel }) => {\n const {\n value = [],\n setValue,\n disabled,\n 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const isDisabled = ariaDisabled === true || disabled\n\n const onItemRemove = (item: string): void => {\n setValue(prevValue => prevValue?.filter(value => value !== item))\n }\n\n if (value.length === 0) {\n return null\n }\n\n return (\n <>\n {value.map(item => (\n <StyledValue\n key={item}\n onRemove={() => onItemRemove(item)}\n disabled={isDisabled}\n removeChipAriaLabel={removeChipAriaLabel}\n data-testid={\n process.env.NODE_ENV === 'test'\n ? `combobox-value-${item}`\n : undefined\n }\n >\n {item}\n </StyledValue>\n ))}\n </>\n )\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(Primitive.div, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '$100 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { 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 === true && searchValue.length > 0) {\n return null\n }\n\n return <StyledSeparator {...props} ref={forwardRef} aria-hidden />\n})\n","import React, { useEffect } from 'react'\nimport type { ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport { booleanify } from '@mirohq/design-system-utils'\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 {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n}\n\nconst Root: React.FC<Omit<ComboboxProps, 'noResultsText'>> = ({\n value: valueProp,\n children,\n ...restProps\n}) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n 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 return (\n <RadixPopover.Root\n open={openState}\n onOpenChange={onOpenChange}\n {...restProps}\n >\n <AriakitComboboxProvider\n open={openState}\n setOpen={onOpenChange}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n {children}\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n}\n\nexport const Combobox: React.FC<ComboboxProps> & Partials = ({\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 onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n}) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\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 noResultsText={noResultsText}\n >\n <Root {...restProps} value={value} />\n </ComboboxProvider>\n)\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n Separator: typeof Separator\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\nCombobox.Separator = Separator\n"],"names":["styled","RadixAnchor","Input","createContext","useRef","useState","useControllableState","useFormFieldContext","jsx","useContext","IconChevronDown","IconCross","useCallback","React","stringAttrValue","booleanishAttrValue","jsxs","mergeRefs","booleanify","FloatingLabel","Combobox","RadixPopover","Primitive","ComboboxItem","focus","useAriaDisabled","mergeProps","AriakitComboboxItemCheck","IconCheckMark","theme","useEffect","ScrollArea","RadixPortal","useMemo","AriakitGroup","GroupLabel","BaseButton","value","Fragment","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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AA,CAAS,SAAY,GAAA,SAAA;;;;;;;;;"}
1
+ {"version":3,"file":"main.js","sources":["../src/partials/trigger.styled.tsx","../src/hooks/use-combobox-context.tsx","../src/partials/trigger-action-button.styled.tsx","../src/partials/trigger-action-button.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/util.ts","../src/partials/content.tsx","../src/partials/portal.tsx","../src/partials/group.styled.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/chip/chip.styled.tsx","../src/chip/left-icon.styled.tsx","../src/chip/left-slot.tsx","../src/chip/chip.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\nimport { Anchor as RadixAnchor } from '@radix-ui/react-popover'\n\nexport const StyledAnchor = styled(RadixAnchor, {\n position: 'relative',\n width: '100%',\n})\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n overflowY: 'scroll',\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 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 },\n\n defaultVariants: {\n size: 'large',\n },\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren, ReactNode } 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'\n\nexport interface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n value?: string[]\n defaultValue?: string[]\n onValueChange?: (value: string[]) => void\n onSearchValueChange?: (value: string) => void\n direction?: Direction\n autoFilter?: boolean\n noResultsText?: ReactNode\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState: boolean\n value?: string[]\n setValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n inputRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string>>\n filteredItems: Set<string>\n setFilteredItems: React.Dispatch<React.SetStateAction<Set<string>>>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n open: openProp,\n defaultOpen,\n onOpen,\n onClose,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange,\n onSearchValueChange,\n autoFilter = true,\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 const [defaultValue, setDefaultValue] = useState(defaultValueProp)\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 const [filteredItems, setFilteredItems] = useState(new Set<string>())\n const [searchValue, setSearchValue] = useState('')\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n onSearchValueChange,\n triggerRef,\n inputRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n filteredItems,\n setFilteredItems,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n large: {\n top: '5px',\n },\n 'x-large': {\n top: '9px',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n\nexport type StyledActionButtonProps = StrictComponentProps<\n typeof StyledActionButton\n>\n","import React, { useCallback } from 'react'\nimport { IconChevronDown, IconCross } from '@mirohq/design-system-icons'\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 /**\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 * 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\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n closeActionLabel,\n clearActionLabel,\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) {\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 from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox as AriakitComboboxTrigger } from '@ariakit/react'\nimport {\n booleanify,\n booleanishAttrValue,\n mergeRefs,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\n\nimport { StyledAnchor, StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<\n TriggerActionButtonProps,\n 'openActionLabel' | 'closeActionLabel' | 'clearActionLabel'\n > & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n closeActionLabel,\n clearActionLabel,\n onChange,\n css,\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 onSearchValueChange,\n searchValue,\n setSearchValue,\n setOpenState,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n // todo MDS-1011: use formFieldContextDescribedBy after removing form context from BaseInput\n 'aria-describedby': ariaDescribedBy,\n valid,\n disabled,\n readOnly,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined ||\n value.length !== 0 ||\n focused ||\n searchValue !== ''\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 (restProps.onFocus !== undefined) {\n restProps.onFocus(event)\n }\n }\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onSearchValueChange?.(e.target.value)\n onChange?.(e)\n }\n\n return (\n <StyledAnchor\n ref={mergeRefs([triggerRef, forwardRef])}\n css={css}\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 {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n <AriakitComboboxTrigger\n render={\n <StyledInput\n {...inputProps}\n value={searchValue}\n size={size}\n ref={inputRef}\n onChange={onInputChange}\n onFocus={scrollIntoView}\n >\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n closeActionLabel={closeActionLabel}\n clearActionLabel={clearActionLabel}\n size={size}\n />\n </StyledInput>\n }\n />\n </StyledAnchor>\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 { Primitive } from '@mirohq/design-system-primitive'\n\nexport const NoResultPlaceholder = styled(Primitive.div, {\n padding: '$100',\n})\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '20px',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n padding: '$50',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'grid',\n gridTemplateColumns: '20px 1fr',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: '20px',\n position: 'relative',\n userSelect: 'none',\n padding: '6px $100 6px $150',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-neutrals-disabled',\n },\n },\n\n '&[aria-selected=\"true\"]:not(:disabled,[aria-disabled=true],[data-disabled])':\n {\n color: '$text-primary-selected',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { 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'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems, triggerRef, inputRef } =\n useComboboxContext()\n\n if (autoFilter !== false && !filteredItems.has(value)) {\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 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 >\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\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 { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\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 { NoResultPlaceholder, StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\nimport type { Overflow } from '../types'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\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 * The distance in pixels from the anchor. Only available when position is set\n * to popper.\n * @default CONTENT_OFFSET\n */\n sideOffset?: number\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 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 sideOffset = CONTENT_OFFSET,\n maxHeight,\n overflow,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n triggerRef,\n contentRef,\n autoFilter,\n filteredItems,\n setFilteredItems,\n searchValue,\n noResultsText,\n direction,\n } = useComboboxContext()\n\n useEffect(() => {\n const childrenItemValues = getChildrenItemValues(children)\n\n setFilteredItems(\n new Set(\n autoFilter === false\n ? childrenItemValues\n : childrenItemValues.filter(child =>\n child.toLowerCase().includes(searchValue.toLowerCase())\n )\n )\n )\n }, [children, autoFilter, setFilteredItems, searchValue])\n\n const content =\n filteredItems.size === 0 ? (\n <NoResultPlaceholder>{noResultsText}</NoResultPlaceholder>\n ) : (\n children\n )\n\n return (\n <StyledContent\n asChild\n {...restProps}\n dir={direction}\n sideOffset={sideOffset}\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 availableHeight='var(--radix-popover-content-available-height)'\n verticalGap='var(--space-50) * 2'\n maxHeight={maxHeight}\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 React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import { Group 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, { useMemo } from 'react'\nimport type { ElementRef } from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\nimport type { StyledGroupProps } from './group.styled'\nimport { StyledGroup } from './group.styled'\n\nexport type GroupProps = StyledGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, filteredItems } = useComboboxContext()\n\n const childValues = useMemo(\n // don't perform calculation if auto filter is disabled\n () => (autoFilter !== false ? getChildrenItemValues(children) : []),\n [children, autoFilter]\n )\n const hasVisibleChildren = useMemo(\n () =>\n // don't perform calculation if auto filter is disabled\n autoFilter !== false\n ? childValues.some(value => filteredItems.has(value))\n : true,\n [childValues, filteredItems, autoFilter]\n )\n\n if (!hasVisibleChildren) {\n return null\n }\n\n return (\n <StyledGroup {...rest} ref={forwardRef}>\n {children}\n </StyledGroup>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {\n padding: '6px $100',\n color: '$text-neutrals-subtle',\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n backgroundColor: '$background-neutrals-subtle',\n color: '$text-neutrals',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n color: '$icon-neutrals-inactive',\n\n ...focus.css({\n boxShadow: '$focus-small-outline',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove button label to make the button recognizable by the screen readers.\n */\n removeAriaLabel: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeAriaLabel}>\n <IconCross size='small' weight='thin' aria-hidden />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * 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 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const isDisabled = ariaDisabled === true || disabled\n\n const onItemRemove = (item: string): void => {\n setValue(prevValue => prevValue?.filter(value => value !== item))\n }\n\n if (value.length === 0) {\n return null\n }\n\n return (\n <>\n {value.map(item => (\n <StyledValue\n key={item}\n onRemove={() => onItemRemove(item)}\n disabled={isDisabled}\n removeAriaLabel={`${unselectAriaLabel} ${item}`}\n data-testid={\n process.env.NODE_ENV === 'test'\n ? `combobox-value-${item}`\n : undefined\n }\n >\n {item}\n </StyledValue>\n ))}\n </>\n )\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(Primitive.div, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '$100 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { 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 === true && searchValue.length > 0) {\n return null\n }\n\n return <StyledSeparator {...props} ref={forwardRef} aria-hidden />\n})\n","import React, { useEffect } from 'react'\nimport type { ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport { booleanify } from '@mirohq/design-system-utils'\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 {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n}\n\nconst Root: React.FC<Omit<ComboboxProps, 'noResultsText'>> = ({\n value: valueProp,\n children,\n ...restProps\n}) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n 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 return (\n <RadixPopover.Root\n open={openState}\n onOpenChange={onOpenChange}\n {...restProps}\n >\n <AriakitComboboxProvider\n open={openState}\n setOpen={onOpenChange}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n {children}\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n}\n\nexport const Combobox: React.FC<ComboboxProps> & Partials = ({\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 onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n}) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\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 noResultsText={noResultsText}\n >\n <Root {...restProps} value={value} />\n </ComboboxProvider>\n)\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n Separator: typeof Separator\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\nCombobox.Separator = Separator\n"],"names":["styled","RadixAnchor","Input","createContext","useRef","useState","useControllableState","useFormFieldContext","jsx","useContext","useCallback","RadixTrigger","IconChevronDown","IconCross","React","booleanishAttrValue","jsxs","mergeRefs","booleanify","FloatingLabel","AriakitComboboxTrigger","Primitive","RadixPopover","ComboboxItem","focus","useAriaDisabled","mergeProps","AriakitComboboxItemCheck","IconCheckMark","theme","useEffect","AriakitComboboxList","ScrollArea","RadixPortal","AriakitGroup","useMemo","GroupLabel","BaseButton","value","Fragment","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIa,MAAA,YAAA,GAAeA,4BAAOC,mBAAa,EAAA;AAAA,EAC9C,QAAU,EAAA,UAAA;AAAA,EACV,KAAO,EAAA,MAAA;AACT,CAAC,CAAA,CAAA;AAEY,MAAA,WAAA,GAAcD,4BAAOE,uBAAO,EAAA;AAAA,EACvC,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,CAAA;AAAA,EACV,GAAK,EAAA,OAAA;AAAA,EACL,SAAW,EAAA,QAAA;AAAA,EAEX,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,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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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;;;;;;;;;"}
package/dist/module.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import React, { createContext, useContext, useRef, useState, useCallback, useEffect, useMemo } from 'react';
3
- import { Combobox as Combobox$1, ComboboxItem, ComboboxItemCheck, Group as Group$1, GroupLabel as GroupLabel$1, ComboboxProvider as ComboboxProvider$1 } from '@ariakit/react';
3
+ import { Combobox as Combobox$1, ComboboxItem, ComboboxItemCheck, ComboboxList, Group as Group$1, GroupLabel as GroupLabel$1, ComboboxProvider as ComboboxProvider$1 } from '@ariakit/react';
4
4
  import { useFormFieldContext, FloatingLabel } from '@mirohq/design-system-base-form';
5
5
  import * as RadixPopover from '@radix-ui/react-popover';
6
- import { Anchor, Portal as Portal$1 } from '@radix-ui/react-popover';
7
- import { stringAttrValue, booleanishAttrValue, mergeRefs, booleanify } from '@mirohq/design-system-utils';
6
+ import { Anchor, Trigger as Trigger$1, Portal as Portal$1 } from '@radix-ui/react-popover';
7
+ import { booleanishAttrValue, mergeRefs, booleanify } from '@mirohq/design-system-utils';
8
8
  import { styled, theme } from '@mirohq/design-system-stitches';
9
9
  import { Input } from '@mirohq/design-system-input';
10
10
  import { useControllableState } from '@radix-ui/react-use-controllable-state';
11
11
  import { IconChevronDown, IconCross, IconCheckMark } from '@mirohq/design-system-icons';
12
12
  import { ScrollArea } from '@mirohq/design-system-scroll-area';
13
+ import { Primitive } from '@mirohq/design-system-primitive';
13
14
  import { mergeProps } from '@react-aria/utils';
14
15
  import { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled';
15
16
  import { focus } from '@mirohq/design-system-styles';
16
- import { Primitive } from '@mirohq/design-system-primitive';
17
17
  import { BaseButton } from '@mirohq/design-system-base-button';
18
18
 
19
19
  const StyledAnchor = styled(Anchor, {
@@ -141,25 +141,48 @@ const StyledActionButton = styled(Input.ActionButton, {
141
141
 
142
142
  const TriggerActionButton = ({
143
143
  openActionLabel,
144
+ closeActionLabel,
144
145
  clearActionLabel,
145
146
  size
146
147
  }) => {
147
- const { setOpenState, value = [], setValue } = useComboboxContext();
148
+ const { openState, setOpenState, value = [], setValue } = useComboboxContext();
148
149
  const isEmpty = value.length === 0;
149
- const ActionButtonIcon = isEmpty ? IconChevronDown : IconCross;
150
- const label = isEmpty ? openActionLabel : clearActionLabel;
151
- const onActionButtonClick = useCallback(
150
+ const onToggleClick = useCallback(
152
151
  (event) => {
153
- if (!isEmpty) {
154
- setValue([]);
155
- } else {
156
- setOpenState((prevOpen = false) => !prevOpen);
152
+ if (openState) {
153
+ setOpenState(false);
157
154
  }
158
155
  event.stopPropagation();
159
156
  },
160
- [isEmpty, setValue, setOpenState]
157
+ [setOpenState, openState]
158
+ );
159
+ const onClearClick = useCallback(
160
+ (event) => {
161
+ setValue([]);
162
+ event.stopPropagation();
163
+ },
164
+ [setValue]
165
+ );
166
+ if (isEmpty) {
167
+ return /* @__PURE__ */ jsx(Trigger$1, { asChild: true, "aria-haspopup": "listbox", children: /* @__PURE__ */ jsx(
168
+ StyledActionButton,
169
+ {
170
+ label: openState ? closeActionLabel : openActionLabel,
171
+ size,
172
+ onClick: onToggleClick,
173
+ children: /* @__PURE__ */ jsx(IconChevronDown, { size: "small", weight: "thin" })
174
+ }
175
+ ) });
176
+ }
177
+ return /* @__PURE__ */ jsx(
178
+ StyledActionButton,
179
+ {
180
+ label: clearActionLabel,
181
+ size,
182
+ onClick: onClearClick,
183
+ children: /* @__PURE__ */ jsx(IconCross, { size: "small", weight: "thin" })
184
+ }
161
185
  );
162
- return /* @__PURE__ */ jsx(StyledActionButton, { label, size, onClick: onActionButtonClick, children: /* @__PURE__ */ jsx(ActionButtonIcon, { size: "small", weight: "thin" }) });
163
186
  };
164
187
 
165
188
  const Trigger = React.forwardRef(
@@ -171,6 +194,7 @@ const Trigger = React.forwardRef(
171
194
  "aria-invalid": ariaInvalid,
172
195
  placeholder,
173
196
  openActionLabel,
197
+ closeActionLabel,
174
198
  clearActionLabel,
175
199
  onChange,
176
200
  css,
@@ -191,7 +215,6 @@ const Trigger = React.forwardRef(
191
215
  } = useComboboxContext();
192
216
  const {
193
217
  formElementId,
194
- ariaDescribedBy: formFieldContextDescribedBy,
195
218
  ariaInvalid: formFieldAriaInvalid,
196
219
  valid: formFieldValid,
197
220
  label,
@@ -203,10 +226,8 @@ const Trigger = React.forwardRef(
203
226
  ...restProps,
204
227
  "aria-disabled": ariaDisabled,
205
228
  "aria-invalid": ariaInvalid != null ? ariaInvalid : formFieldAriaInvalid,
206
- "aria-describedby": stringAttrValue(
207
- ariaDescribedBy,
208
- formFieldContextDescribedBy
209
- ),
229
+ // todo MDS-1011: use formFieldContextDescribedBy after removing form context from BaseInput
230
+ "aria-describedby": ariaDescribedBy,
210
231
  valid,
211
232
  disabled,
212
233
  readOnly,
@@ -265,6 +286,7 @@ const Trigger = React.forwardRef(
265
286
  TriggerActionButton,
266
287
  {
267
288
  openActionLabel,
289
+ closeActionLabel,
268
290
  clearActionLabel,
269
291
  size
270
292
  }
@@ -280,6 +302,9 @@ const Trigger = React.forwardRef(
280
302
  }
281
303
  );
282
304
 
305
+ const NoResultPlaceholder = styled(Primitive.div, {
306
+ padding: "$100"
307
+ });
283
308
  const StyledContent = styled(RadixPopover.Content, {
284
309
  backgroundColor: "$background-neutrals-container",
285
310
  borderRadius: "$50",
@@ -415,7 +440,13 @@ const isInsideRef = (element, ref) => {
415
440
  return (_b = element != null && ((_a = ref.current) == null ? void 0 : _a.contains(element))) != null ? _b : false;
416
441
  };
417
442
  const Content = React.forwardRef(
418
- ({ sideOffset = CONTENT_OFFSET, maxHeight, children, ...restProps }, forwardRef) => {
443
+ ({
444
+ sideOffset = CONTENT_OFFSET,
445
+ maxHeight,
446
+ overflow,
447
+ children,
448
+ ...restProps
449
+ }, forwardRef) => {
419
450
  const {
420
451
  triggerRef,
421
452
  contentRef,
@@ -436,11 +467,13 @@ const Content = React.forwardRef(
436
467
  )
437
468
  );
438
469
  }, [children, autoFilter, setFilteredItems, searchValue]);
439
- const content = filteredItems.size === 0 ? noResultsText : children;
470
+ const content = filteredItems.size === 0 ? /* @__PURE__ */ jsx(NoResultPlaceholder, { children: noResultsText }) : children;
440
471
  return /* @__PURE__ */ jsx(
441
472
  StyledContent,
442
473
  {
474
+ asChild: true,
443
475
  ...restProps,
476
+ dir: direction,
444
477
  sideOffset,
445
478
  ref: mergeRefs([forwardRef, contentRef]),
446
479
  onOpenAutoFocus: (event) => event.preventDefault(),
@@ -452,7 +485,7 @@ const Content = React.forwardRef(
452
485
  event.preventDefault();
453
486
  }
454
487
  },
455
- children: /* @__PURE__ */ jsxs(ScrollArea, { type: "always", dir: direction, children: [
488
+ children: /* @__PURE__ */ jsx(ComboboxList, { role: "listbox", children: overflow === "auto" ? /* @__PURE__ */ jsxs(ScrollArea, { type: "always", dir: direction, children: [
456
489
  /* @__PURE__ */ jsx(
457
490
  ScrollArea.Viewport,
458
491
  {
@@ -463,7 +496,7 @@ const Content = React.forwardRef(
463
496
  }
464
497
  ),
465
498
  /* @__PURE__ */ jsx(ScrollArea.Scrollbar, { orientation: "vertical", children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {}) })
466
- ] })
499
+ ] }) : content })
467
500
  }
468
501
  );
469
502
  }
@@ -471,6 +504,8 @@ const Content = React.forwardRef(
471
504
 
472
505
  const Portal = (props) => /* @__PURE__ */ jsx(Portal$1, { ...props });
473
506
 
507
+ const StyledGroup = styled(Group$1);
508
+
474
509
  const Group = React.forwardRef(({ children, ...rest }, forwardRef) => {
475
510
  const { autoFilter, filteredItems } = useComboboxContext();
476
511
  const childValues = useMemo(
@@ -488,7 +523,7 @@ const Group = React.forwardRef(({ children, ...rest }, forwardRef) => {
488
523
  if (!hasVisibleChildren) {
489
524
  return null;
490
525
  }
491
- return /* @__PURE__ */ jsx(Group$1, { ...rest, ref: forwardRef, children });
526
+ return /* @__PURE__ */ jsx(StyledGroup, { ...rest, ref: forwardRef, children });
492
527
  });
493
528
 
494
529
  const StyledGroupLabel = styled(GroupLabel$1, {
@@ -507,13 +542,13 @@ const StyledChip = styled(Primitive.div, {
507
542
  gap: "$50",
508
543
  whiteSpace: "nowrap",
509
544
  maxWidth: "$35",
510
- background: "$gray-100",
511
- color: "$gray-900"
545
+ backgroundColor: "$background-neutrals-subtle",
546
+ color: "$text-neutrals"
512
547
  });
513
548
  const StyledChipButton = styled(BaseButton, {
549
+ color: "$icon-neutrals-inactive",
514
550
  ...focus.css({
515
- boxShadow: "$focus-small-outline",
516
- borderColor: "$blue-400 !important"
551
+ boxShadow: "$focus-small-outline"
517
552
  })
518
553
  });
519
554
  const StyledChipContent = styled(Primitive.div, {
@@ -531,9 +566,9 @@ const StyledLeftSlot = styled(Primitive.span, {
531
566
  const LeftSlot = StyledLeftSlot;
532
567
 
533
568
  const Chip = React.forwardRef(
534
- ({ children, disabled = false, onRemove, removeChipAriaLabel, ...restProps }, forwardRef) => /* @__PURE__ */ jsxs(StyledChip, { ...restProps, ref: forwardRef, children: [
569
+ ({ children, disabled = false, onRemove, removeAriaLabel, ...restProps }, forwardRef) => /* @__PURE__ */ jsxs(StyledChip, { ...restProps, ref: forwardRef, children: [
535
570
  /* @__PURE__ */ jsx(StyledChipContent, { children }),
536
- !booleanify(disabled) && /* @__PURE__ */ jsx(StyledChipButton, { onClick: onRemove, "aria-label": removeChipAriaLabel, children: /* @__PURE__ */ jsx(IconCross, { size: "small", weight: "thin", color: "gray-500" }) })
571
+ !booleanify(disabled) && /* @__PURE__ */ jsx(StyledChipButton, { onClick: onRemove, "aria-label": removeAriaLabel, children: /* @__PURE__ */ jsx(IconCross, { size: "small", weight: "thin", "aria-hidden": true }) })
537
572
  ] })
538
573
  );
539
574
  Chip.LeftSlot = LeftSlot;
@@ -542,7 +577,7 @@ const StyledValue = styled(Chip, {
542
577
  marginTop: "$50"
543
578
  });
544
579
 
545
- const Value = ({ removeChipAriaLabel }) => {
580
+ const Value = ({ unselectAriaLabel }) => {
546
581
  const {
547
582
  value = [],
548
583
  setValue,
@@ -561,7 +596,7 @@ const Value = ({ removeChipAriaLabel }) => {
561
596
  {
562
597
  onRemove: () => onItemRemove(item),
563
598
  disabled: isDisabled,
564
- removeChipAriaLabel,
599
+ removeAriaLabel: "".concat(unselectAriaLabel, " ").concat(item),
565
600
  "data-testid": process.env.NODE_ENV === "test" ? "combobox-value-".concat(item) : void 0,
566
601
  children: item
567
602
  },
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/hooks/use-combobox-context.tsx","../src/partials/trigger-action-button.styled.tsx","../src/partials/trigger-action-button.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/util.ts","../src/partials/content.tsx","../src/partials/portal.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/chip/chip.styled.tsx","../src/chip/left-icon.styled.tsx","../src/chip/left-slot.tsx","../src/chip/chip.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\nimport { Anchor as RadixAnchor } from '@radix-ui/react-popover'\n\nexport const StyledAnchor = styled(RadixAnchor, {\n position: 'relative',\n width: '100%',\n})\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n overflowY: 'scroll',\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 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 },\n\n defaultVariants: {\n size: 'large',\n },\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren, ReactNode } 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'\n\nexport interface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n value?: string[]\n defaultValue?: string[]\n onValueChange?: (value: string[]) => void\n onSearchValueChange?: (value: string) => void\n direction?: Direction\n autoFilter?: boolean\n noResultsText?: ReactNode\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState: boolean\n value?: string[]\n setValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n inputRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string>>\n filteredItems: Set<string>\n setFilteredItems: React.Dispatch<React.SetStateAction<Set<string>>>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n open: openProp,\n defaultOpen,\n onOpen,\n onClose,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange,\n onSearchValueChange,\n autoFilter = true,\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 const [defaultValue, setDefaultValue] = useState(defaultValueProp)\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 const [filteredItems, setFilteredItems] = useState(new Set<string>())\n const [searchValue, setSearchValue] = useState('')\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n onSearchValueChange,\n triggerRef,\n inputRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n filteredItems,\n setFilteredItems,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n large: {\n top: '5px',\n },\n 'x-large': {\n top: '9px',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n\nexport type StyledActionButtonProps = StrictComponentProps<\n typeof StyledActionButton\n>\n","import React, { useCallback } from 'react'\nimport { IconChevronDown, IconCross } from '@mirohq/design-system-icons'\n\nimport type { StyledActionButtonProps } from './trigger-action-button.styled'\nimport { StyledActionButton } from './trigger-action-button.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport type TriggerActionButtonProps = Omit<\n StyledActionButtonProps,\n 'label'\n> & {\n /**\n * The label text for Trigger's action button when Combobox is empty. Open/Close action will be performed.\n * Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox has values selected. Clear Combobox values action\n * will be performed. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n}\n\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n clearActionLabel,\n size,\n}) => {\n const { setOpenState, value = [], setValue } = useComboboxContext()\n\n const isEmpty = value.length === 0\n\n const ActionButtonIcon = isEmpty ? IconChevronDown : IconCross\n const label = isEmpty ? openActionLabel : clearActionLabel\n\n const onActionButtonClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (!isEmpty) {\n setValue([])\n } else {\n setOpenState((prevOpen = false) => !prevOpen)\n }\n\n event.stopPropagation()\n },\n [isEmpty, setValue, setOpenState]\n )\n\n return (\n <StyledActionButton label={label} size={size} onClick={onActionButtonClick}>\n <ActionButtonIcon size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox } from '@ariakit/react'\nimport {\n booleanify,\n booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\n\nimport { StyledAnchor, StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<TriggerActionButtonProps, 'openActionLabel' | 'clearActionLabel'> & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n clearActionLabel,\n onChange,\n css,\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 onSearchValueChange,\n searchValue,\n setSearchValue,\n setOpenState,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n readOnly,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined ||\n value.length !== 0 ||\n focused ||\n searchValue !== ''\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 (restProps.onFocus !== undefined) {\n restProps.onFocus(event)\n }\n }\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onSearchValueChange?.(e.target.value)\n onChange?.(e)\n }\n\n return (\n <StyledAnchor\n ref={mergeRefs([triggerRef, forwardRef])}\n css={css}\n onClick={() => {\n if (\n !booleanify(disabled) &&\n !booleanify(ariaDisabled) &&\n !booleanify(readOnly)\n ) {\n setOpenState(true)\n }\n }}\n >\n {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n <Combobox\n render={\n <StyledInput\n {...inputProps}\n value={searchValue}\n size={size}\n ref={inputRef}\n onChange={onInputChange}\n onFocus={scrollIntoView}\n >\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n clearActionLabel={clearActionLabel}\n size={size}\n />\n </StyledInput>\n }\n />\n </StyledAnchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '20px',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n padding: '$50',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'grid',\n gridTemplateColumns: '20px 1fr',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: '20px',\n position: 'relative',\n userSelect: 'none',\n padding: '6px $100 6px $150',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-neutrals-disabled',\n },\n },\n\n '&[aria-selected=\"true\"]:not(:disabled,[aria-disabled=true],[data-disabled])':\n {\n color: '$text-primary-selected',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { 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'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems, triggerRef, inputRef } =\n useComboboxContext()\n\n if (autoFilter !== false && !filteredItems.has(value)) {\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 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 >\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\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 { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\nimport { ScrollArea } from '@mirohq/design-system-scroll-area'\nimport { theme } from '@mirohq/design-system-stitches'\nimport type { CSSProperties } from '@stitches/react'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\nimport type { Overflow } from '../types'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\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 * The distance in pixels from the anchor. Only available when position is set\n * to popper.\n * @default CONTENT_OFFSET\n */\n sideOffset?: number\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 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 { sideOffset = CONTENT_OFFSET, maxHeight, children, ...restProps },\n forwardRef\n ) => {\n const {\n triggerRef,\n contentRef,\n autoFilter,\n filteredItems,\n setFilteredItems,\n searchValue,\n noResultsText,\n direction,\n } = useComboboxContext()\n\n useEffect(() => {\n const childrenItemValues = getChildrenItemValues(children)\n\n setFilteredItems(\n new Set(\n autoFilter === false\n ? childrenItemValues\n : childrenItemValues.filter(child =>\n child.toLowerCase().includes(searchValue.toLowerCase())\n )\n )\n )\n }, [children, autoFilter, setFilteredItems, searchValue])\n\n const content = filteredItems.size === 0 ? noResultsText : children\n\n return (\n <StyledContent\n {...restProps}\n sideOffset={sideOffset}\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 <ScrollArea type='always' dir={direction}>\n <ScrollArea.Viewport\n availableHeight='var(--radix-popover-content-available-height)'\n verticalGap='var(--space-50) * 2'\n maxHeight={maxHeight}\n >\n {content}\n </ScrollArea.Viewport>\n <ScrollArea.Scrollbar orientation='vertical'>\n <ScrollArea.Thumb />\n </ScrollArea.Scrollbar>\n </ScrollArea>\n </StyledContent>\n )\n }\n)\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React, { useMemo } from 'react'\nimport { Group as AriakitGroup } from '@ariakit/react'\nimport type { ElementRef } from 'react'\nimport type { GroupProps as AriakitGroupProps } from '@ariakit/react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nexport type GroupProps = AriakitGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof AriakitGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, filteredItems } = useComboboxContext()\n\n const childValues = useMemo(\n // don't perform calculation if auto filter is disabled\n () => (autoFilter !== false ? getChildrenItemValues(children) : []),\n [children, autoFilter]\n )\n const hasVisibleChildren = useMemo(\n () =>\n // don't perform calculation if auto filter is disabled\n autoFilter !== false\n ? childValues.some(value => filteredItems.has(value))\n : true,\n [childValues, filteredItems, autoFilter]\n )\n\n if (!hasVisibleChildren) {\n return null\n }\n\n return (\n <AriakitGroup {...rest} ref={forwardRef}>\n {children}\n </AriakitGroup>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {\n padding: '6px $100',\n color: '$text-neutrals-subtle',\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n background: '$gray-100',\n color: '$gray-900',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n ...focus.css({\n boxShadow: '$focus-small-outline',\n borderColor: '$blue-400 !important',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeChipAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeChipAriaLabel}>\n <IconCross size='small' weight='thin' color='gray-500' />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Value: FC<ValueProps> = ({ removeChipAriaLabel }) => {\n const {\n value = [],\n setValue,\n disabled,\n 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const isDisabled = ariaDisabled === true || disabled\n\n const onItemRemove = (item: string): void => {\n setValue(prevValue => prevValue?.filter(value => value !== item))\n }\n\n if (value.length === 0) {\n return null\n }\n\n return (\n <>\n {value.map(item => (\n <StyledValue\n key={item}\n onRemove={() => onItemRemove(item)}\n disabled={isDisabled}\n removeChipAriaLabel={removeChipAriaLabel}\n data-testid={\n process.env.NODE_ENV === 'test'\n ? `combobox-value-${item}`\n : undefined\n }\n >\n {item}\n </StyledValue>\n ))}\n </>\n )\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(Primitive.div, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '$100 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { 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 === true && searchValue.length > 0) {\n return null\n }\n\n return <StyledSeparator {...props} ref={forwardRef} aria-hidden />\n})\n","import React, { useEffect } from 'react'\nimport type { ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport { booleanify } from '@mirohq/design-system-utils'\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 {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n}\n\nconst Root: React.FC<Omit<ComboboxProps, 'noResultsText'>> = ({\n value: valueProp,\n children,\n ...restProps\n}) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n 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 return (\n <RadixPopover.Root\n open={openState}\n onOpenChange={onOpenChange}\n {...restProps}\n >\n <AriakitComboboxProvider\n open={openState}\n setOpen={onOpenChange}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n {children}\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n}\n\nexport const Combobox: React.FC<ComboboxProps> & Partials = ({\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 onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n}) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\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 noResultsText={noResultsText}\n >\n <Root {...restProps} value={value} />\n </ComboboxProvider>\n)\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n Separator: typeof Separator\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\nCombobox.Separator = Separator\n"],"names":["RadixAnchor","Combobox","AriakitComboboxItemCheck","RadixPortal","AriakitGroup","GroupLabel","value","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;;;AAIa,MAAA,YAAA,GAAe,OAAOA,MAAa,EAAA;AAAA,EAC9C,QAAU,EAAA,UAAA;AAAA,EACV,KAAO,EAAA,MAAA;AACT,CAAC,CAAA,CAAA;AAEY,MAAA,WAAA,GAAc,OAAO,K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AA,IAAA;AAAA,EACb,aAAA;AAAA,EACA,GAAG,SAAA;AACL,CACE,qBAAA,GAAA;AAAA,EAAC,gBAAA;AAAA,EAAA;AAAA,IACC,YAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAA;AAAA,IACA,mBAAA;AAAA,IACA,WAAA;AAAA,IACA,IAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,eAAe,EAAA,YAAA;AAAA,IACf,SAAA;AAAA,IACA,UAAA;AAAA,IACA,aAAA;AAAA,IAEA,QAAC,kBAAA,GAAA,CAAA,IAAA,EAAA,EAAM,GAAG,SAAA,EAAW,KAAc,EAAA,CAAA;AAAA,GAAA;AACrC,EAAA;AAcF,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;;;;;;;;"}
1
+ {"version":3,"file":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/hooks/use-combobox-context.tsx","../src/partials/trigger-action-button.styled.tsx","../src/partials/trigger-action-button.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/util.ts","../src/partials/content.tsx","../src/partials/portal.tsx","../src/partials/group.styled.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/chip/chip.styled.tsx","../src/chip/left-icon.styled.tsx","../src/chip/left-slot.tsx","../src/chip/chip.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\nimport { Anchor as RadixAnchor } from '@radix-ui/react-popover'\n\nexport const StyledAnchor = styled(RadixAnchor, {\n position: 'relative',\n width: '100%',\n})\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n overflowY: 'scroll',\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 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 },\n\n defaultVariants: {\n size: 'large',\n },\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren, ReactNode } 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'\n\nexport interface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n onOpen?: () => void\n onClose?: () => void\n value?: string[]\n defaultValue?: string[]\n onValueChange?: (value: string[]) => void\n onSearchValueChange?: (value: string) => void\n direction?: Direction\n autoFilter?: boolean\n noResultsText?: ReactNode\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean | undefined>>\n openState: boolean\n value?: string[]\n setValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n inputRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string>>\n filteredItems: Set<string>\n setFilteredItems: React.Dispatch<React.SetStateAction<Set<string>>>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n open: openProp,\n defaultOpen,\n onOpen,\n onClose,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onValueChange,\n onSearchValueChange,\n autoFilter = true,\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 const [defaultValue, setDefaultValue] = useState(defaultValueProp)\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 const [filteredItems, setFilteredItems] = useState(new Set<string>())\n const [searchValue, setSearchValue] = useState('')\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n onSearchValueChange,\n triggerRef,\n inputRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n filteredItems,\n setFilteredItems,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n large: {\n top: '5px',\n },\n 'x-large': {\n top: '9px',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n\nexport type StyledActionButtonProps = StrictComponentProps<\n typeof StyledActionButton\n>\n","import React, { useCallback } from 'react'\nimport { IconChevronDown, IconCross } from '@mirohq/design-system-icons'\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 /**\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 * 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\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n closeActionLabel,\n clearActionLabel,\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) {\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 from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox as AriakitComboboxTrigger } from '@ariakit/react'\nimport {\n booleanify,\n booleanishAttrValue,\n mergeRefs,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\n\nimport { StyledAnchor, StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<\n TriggerActionButtonProps,\n 'openActionLabel' | 'closeActionLabel' | 'clearActionLabel'\n > & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n closeActionLabel,\n clearActionLabel,\n onChange,\n css,\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 onSearchValueChange,\n searchValue,\n setSearchValue,\n setOpenState,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n // todo MDS-1011: use formFieldContextDescribedBy after removing form context from BaseInput\n 'aria-describedby': ariaDescribedBy,\n valid,\n disabled,\n readOnly,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined ||\n value.length !== 0 ||\n focused ||\n searchValue !== ''\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 (restProps.onFocus !== undefined) {\n restProps.onFocus(event)\n }\n }\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onSearchValueChange?.(e.target.value)\n onChange?.(e)\n }\n\n return (\n <StyledAnchor\n ref={mergeRefs([triggerRef, forwardRef])}\n css={css}\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 {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n <AriakitComboboxTrigger\n render={\n <StyledInput\n {...inputProps}\n value={searchValue}\n size={size}\n ref={inputRef}\n onChange={onInputChange}\n onFocus={scrollIntoView}\n >\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n closeActionLabel={closeActionLabel}\n clearActionLabel={clearActionLabel}\n size={size}\n />\n </StyledInput>\n }\n />\n </StyledAnchor>\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 { Primitive } from '@mirohq/design-system-primitive'\n\nexport const NoResultPlaceholder = styled(Primitive.div, {\n padding: '$100',\n})\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '20px',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n padding: '$50',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'grid',\n gridTemplateColumns: '20px 1fr',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: '20px',\n position: 'relative',\n userSelect: 'none',\n padding: '6px $100 6px $150',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-neutrals-disabled',\n },\n },\n\n '&[aria-selected=\"true\"]:not(:disabled,[aria-disabled=true],[data-disabled])':\n {\n color: '$text-primary-selected',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { 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'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems, triggerRef, inputRef } =\n useComboboxContext()\n\n if (autoFilter !== false && !filteredItems.has(value)) {\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 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 >\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\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 { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\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 { NoResultPlaceholder, StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\nimport type { Overflow } from '../types'\n\nexport const CONTENT_OFFSET = parseInt(theme.space[50])\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 * The distance in pixels from the anchor. Only available when position is set\n * to popper.\n * @default CONTENT_OFFSET\n */\n sideOffset?: number\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 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 sideOffset = CONTENT_OFFSET,\n maxHeight,\n overflow,\n children,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n triggerRef,\n contentRef,\n autoFilter,\n filteredItems,\n setFilteredItems,\n searchValue,\n noResultsText,\n direction,\n } = useComboboxContext()\n\n useEffect(() => {\n const childrenItemValues = getChildrenItemValues(children)\n\n setFilteredItems(\n new Set(\n autoFilter === false\n ? childrenItemValues\n : childrenItemValues.filter(child =>\n child.toLowerCase().includes(searchValue.toLowerCase())\n )\n )\n )\n }, [children, autoFilter, setFilteredItems, searchValue])\n\n const content =\n filteredItems.size === 0 ? (\n <NoResultPlaceholder>{noResultsText}</NoResultPlaceholder>\n ) : (\n children\n )\n\n return (\n <StyledContent\n asChild\n {...restProps}\n dir={direction}\n sideOffset={sideOffset}\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 availableHeight='var(--radix-popover-content-available-height)'\n verticalGap='var(--space-50) * 2'\n maxHeight={maxHeight}\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 React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import { Group 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, { useMemo } from 'react'\nimport type { ElementRef } from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\nimport type { StyledGroupProps } from './group.styled'\nimport { StyledGroup } from './group.styled'\n\nexport type GroupProps = StyledGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof StyledGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, filteredItems } = useComboboxContext()\n\n const childValues = useMemo(\n // don't perform calculation if auto filter is disabled\n () => (autoFilter !== false ? getChildrenItemValues(children) : []),\n [children, autoFilter]\n )\n const hasVisibleChildren = useMemo(\n () =>\n // don't perform calculation if auto filter is disabled\n autoFilter !== false\n ? childValues.some(value => filteredItems.has(value))\n : true,\n [childValues, filteredItems, autoFilter]\n )\n\n if (!hasVisibleChildren) {\n return null\n }\n\n return (\n <StyledGroup {...rest} ref={forwardRef}>\n {children}\n </StyledGroup>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {\n padding: '6px $100',\n color: '$text-neutrals-subtle',\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n backgroundColor: '$background-neutrals-subtle',\n color: '$text-neutrals',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n color: '$icon-neutrals-inactive',\n\n ...focus.css({\n boxShadow: '$focus-small-outline',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove button label to make the button recognizable by the screen readers.\n */\n removeAriaLabel: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeAriaLabel}>\n <IconCross size='small' weight='thin' aria-hidden />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * 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 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const isDisabled = ariaDisabled === true || disabled\n\n const onItemRemove = (item: string): void => {\n setValue(prevValue => prevValue?.filter(value => value !== item))\n }\n\n if (value.length === 0) {\n return null\n }\n\n return (\n <>\n {value.map(item => (\n <StyledValue\n key={item}\n onRemove={() => onItemRemove(item)}\n disabled={isDisabled}\n removeAriaLabel={`${unselectAriaLabel} ${item}`}\n data-testid={\n process.env.NODE_ENV === 'test'\n ? `combobox-value-${item}`\n : undefined\n }\n >\n {item}\n </StyledValue>\n ))}\n </>\n )\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(Primitive.div, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '$100 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { 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 === true && searchValue.length > 0) {\n return null\n }\n\n return <StyledSeparator {...props} ref={forwardRef} aria-hidden />\n})\n","import React, { useEffect } from 'react'\nimport type { ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport { booleanify } from '@mirohq/design-system-utils'\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 {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n}\n\nconst Root: React.FC<Omit<ComboboxProps, 'noResultsText'>> = ({\n value: valueProp,\n children,\n ...restProps\n}) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n 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 return (\n <RadixPopover.Root\n open={openState}\n onOpenChange={onOpenChange}\n {...restProps}\n >\n <AriakitComboboxProvider\n open={openState}\n setOpen={onOpenChange}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n {children}\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n}\n\nexport const Combobox: React.FC<ComboboxProps> & Partials = ({\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 onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n}) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\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 noResultsText={noResultsText}\n >\n <Root {...restProps} value={value} />\n </ComboboxProvider>\n)\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n Separator: typeof Separator\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\nCombobox.Separator = Separator\n"],"names":["RadixAnchor","RadixTrigger","AriakitComboboxTrigger","AriakitComboboxItemCheck","AriakitComboboxList","RadixPortal","AriakitGroup","GroupLabel","value","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;;;AAIa,MAAA,YAAA,GAAe,OAAOA,MAAa,EAAA;AAAA,EAC9C,QAAU,EAAA,UAAA;AAAA,EACV,KAAO,EAAA,MAAA;AACT,CAAC,CAAA,CAAA;AAEY,MAAA,W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A;AAAA,IACA,QAAA;AAAA,IACA,eAAe,EAAA,YAAA;AAAA,IACf,SAAA;AAAA,IACA,UAAA;AAAA,IACA,aAAA;AAAA,IAEA,QAAC,kBAAA,GAAA,CAAA,IAAA,EAAA,EAAM,GAAG,SAAA,EAAW,KAAc,EAAA,CAAA;AAAA,GAAA;AACrC,EAAA;AAcF,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;;;;;;;;"}
package/dist/types.d.ts CHANGED
@@ -12,7 +12,6 @@ import { CSSProperties } from '@stitches/react';
12
12
  import * as RadixPopover from '@radix-ui/react-popover';
13
13
  import { PopoverPortalProps } from '@radix-ui/react-popover';
14
14
  import * as _ariakit_react from '@ariakit/react';
15
- import { GroupProps as GroupProps$1 } from '@ariakit/react';
16
15
  import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
17
16
  import { FormElementProps } from '@mirohq/design-system-base-form';
18
17
 
@@ -63,18 +62,20 @@ declare type StyledActionButtonProps = StrictComponentProps<typeof StyledActionB
63
62
 
64
63
  declare type TriggerActionButtonProps = Omit<StyledActionButtonProps, 'label'> & {
65
64
  /**
66
- * The label text for Trigger's action button when Combobox is empty. Open/Close action will be performed.
67
- * Will be rendered in a Tooltip.
65
+ * The label text for Trigger's action button when Combobox is empty and closed. Will be rendered in a Tooltip.
68
66
  */
69
67
  openActionLabel: string;
70
68
  /**
71
- * The label text for Trigger's action button when Combobox has values selected. Clear Combobox values action
72
- * will be performed. Will be rendered in a Tooltip.
69
+ * The label text for Trigger's action button when Combobox is empty and open. Will be rendered in a Tooltip.
70
+ */
71
+ closeActionLabel: string;
72
+ /**
73
+ * The label text for Trigger's action button when Combobox has values selected. Will be rendered in a Tooltip.
73
74
  */
74
75
  clearActionLabel: string;
75
76
  };
76
77
 
77
- declare type TriggerProps = InputProps & Pick<TriggerActionButtonProps, 'openActionLabel' | 'clearActionLabel'> & {
78
+ declare type TriggerProps = InputProps & Pick<TriggerActionButtonProps, 'openActionLabel' | 'closeActionLabel' | 'clearActionLabel'> & {
78
79
  /**
79
80
  * The content.
80
81
  */
@@ -90,7 +91,7 @@ declare type TriggerProps = InputProps & Pick<TriggerActionButtonProps, 'openAct
90
91
  */
91
92
  placeholder?: string;
92
93
  };
93
- declare const Trigger: react__default.ForwardRefExoticComponent<(Omit<packages_components_input_src_types.InputSharedProps & packages_components_input_src_types.ClearProps & Pick<TriggerActionButtonProps, "openActionLabel" | "clearActionLabel"> & {
94
+ declare const Trigger: react__default.ForwardRefExoticComponent<(Omit<packages_components_input_src_types.InputSharedProps & packages_components_input_src_types.ClearProps & Pick<TriggerActionButtonProps, "openActionLabel" | "closeActionLabel" | "clearActionLabel"> & {
94
95
  /**
95
96
  * The content.
96
97
  */
@@ -107,7 +108,7 @@ declare const Trigger: react__default.ForwardRefExoticComponent<(Omit<packages_c
107
108
  placeholder?: string | undefined;
108
109
  }, "ref"> | Omit<packages_components_input_src_types.InputSharedProps & {
109
110
  clearable?: undefined;
110
- } & Pick<TriggerActionButtonProps, "openActionLabel" | "clearActionLabel"> & {
111
+ } & Pick<TriggerActionButtonProps, "openActionLabel" | "closeActionLabel" | "clearActionLabel"> & {
111
112
  /**
112
113
  * The content.
113
114
  */
@@ -207,8 +208,11 @@ interface PortalProps extends PopoverPortalProps {
207
208
  }
208
209
  declare const Portal: react__default.FC<PortalProps>;
209
210
 
210
- declare type GroupProps = GroupProps$1;
211
- declare const Group: react__default.ForwardRefExoticComponent<Omit<GroupProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
211
+ declare const StyledGroup: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.GroupProps<"div">) => 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<"div">) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, {}, {}>;
212
+ declare type StyledGroupProps = StrictComponentProps<typeof StyledGroup>;
213
+
214
+ declare type GroupProps = StyledGroupProps;
215
+ declare const Group: react__default.ForwardRefExoticComponent<Omit<StyledGroupProps, "ref"> & react__default.RefAttributes<HTMLDivElement>>;
212
216
 
213
217
  declare const StyledGroupLabel: react.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.GroupLabelProps<"div">) => 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<"div">) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, {}, {}>;
214
218
  declare type StyledGroupLabelProps = StrictComponentProps<typeof StyledGroupLabel>;
@@ -219,9 +223,9 @@ declare const GroupLabel: react__default.ForwardRefExoticComponent<Omit<GroupLab
219
223
 
220
224
  interface ValueProps {
221
225
  /**
222
- * Remove chip label used to make the button recognizable by the screen readers.
226
+ * The label to make the remove button recognizable by the screen readers.
223
227
  */
224
- removeChipAriaLabel?: string;
228
+ unselectAriaLabel: string;
225
229
  }
226
230
  declare const Value: FC<ValueProps>;
227
231
 
@@ -318,4 +322,4 @@ interface Partials {
318
322
  Separator: typeof Separator;
319
323
  }
320
324
 
321
- export { Combobox, ContentProps as ComboboxContentProps, GroupLabelProps as ComboboxGroupLabelProps, GroupProps as ComboboxGroupProps, ItemProps as ComboboxItemProps, ComboboxProps, TriggerProps as ComboboxTriggerProps, types as ComboboxTypes, ValueProps as ComboboxValueProps };
325
+ export { Combobox, ContentProps as ComboboxContentProps, GroupLabelProps as ComboboxGroupLabelProps, GroupProps as ComboboxGroupProps, ItemProps as ComboboxItemProps, PortalProps as ComboboxPortalProps, ComboboxProps, SeparatorProps as ComboboxSeparatorProps, TriggerProps as ComboboxTriggerProps, types as ComboboxTypes, ValueProps as ComboboxValueProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirohq/design-system-combobox",
3
- "version": "0.1.0-combobox.7",
3
+ "version": "0.1.0-combobox.8",
4
4
  "description": "",
5
5
  "author": "Miro",
6
6
  "source": "src/index.ts",
@@ -31,17 +31,17 @@
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-button": "^0.4.44",
35
- "@mirohq/design-system-base-form": "^0.2.10",
36
- "@mirohq/design-system-form": "^0.1.13",
37
- "@mirohq/design-system-icons": "^0.43.1-combobox.0",
38
- "@mirohq/design-system-input": "^0.1.26-combobox.3",
34
+ "@mirohq/design-system-base-button": "^0.4.46",
35
+ "@mirohq/design-system-base-form": "^0.2.12",
36
+ "@mirohq/design-system-form": "^0.1.15",
37
+ "@mirohq/design-system-input": "^0.1.28-combobox.3",
38
+ "@mirohq/design-system-icons": "^0.43.3-combobox.0",
39
39
  "@mirohq/design-system-primitive": "^1.1.2",
40
- "@mirohq/design-system-scroll-area": "^0.2.10-combobox.0",
41
- "@mirohq/design-system-stitches": "^2.6.8",
42
- "@mirohq/design-system-styles": "^1.2.8-combobox.0",
43
- "@mirohq/design-system-use-aria-disabled": "^0.1.4-combobox.0",
44
- "@mirohq/design-system-utils": "^0.15.3"
40
+ "@mirohq/design-system-scroll-area": "^0.2.12-combobox.0",
41
+ "@mirohq/design-system-stitches": "^2.6.10",
42
+ "@mirohq/design-system-styles": "^1.2.10-combobox.0",
43
+ "@mirohq/design-system-use-aria-disabled": "^0.1.5-combobox.0",
44
+ "@mirohq/design-system-utils": "^0.15.4"
45
45
  },
46
46
  "scripts": {
47
47
  "build": "rollup -c ../../../rollup.config.js",