@mirohq/design-system-combobox 0.1.0-combobox.5 → 0.1.0-combobox.6
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 +125 -61
- package/dist/main.js.map +1 -1
- package/dist/module.js +126 -62
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +94 -2453
- package/package.json +12 -10
package/dist/main.js
CHANGED
|
@@ -6,11 +6,13 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var react = require('@ariakit/react');
|
|
8
8
|
var designSystemBaseForm = require('@mirohq/design-system-base-form');
|
|
9
|
-
var RadixPopover = require('@radix-ui/react-popover');
|
|
10
9
|
var designSystemUtils = require('@mirohq/design-system-utils');
|
|
10
|
+
var RadixPopover = require('@radix-ui/react-popover');
|
|
11
11
|
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
12
12
|
var designSystemInput = require('@mirohq/design-system-input');
|
|
13
|
+
var reactUseControllableState = require('@radix-ui/react-use-controllable-state');
|
|
13
14
|
var designSystemIcons = require('@mirohq/design-system-icons');
|
|
15
|
+
var designSystemScrollArea = require('@mirohq/design-system-scroll-area');
|
|
14
16
|
var utils = require('@react-aria/utils');
|
|
15
17
|
var designSystemUseAriaDisabled = require('@mirohq/design-system-use-aria-disabled');
|
|
16
18
|
var designSystemStyles = require('@mirohq/design-system-styles');
|
|
@@ -78,10 +80,14 @@ const StyledInput = designSystemStitches.styled(designSystemInput.Input, {
|
|
|
78
80
|
const ComboboxContext = React.createContext({});
|
|
79
81
|
const ComboboxProvider = ({
|
|
80
82
|
children,
|
|
83
|
+
open: openProp,
|
|
81
84
|
defaultOpen,
|
|
85
|
+
onOpen,
|
|
86
|
+
onClose,
|
|
82
87
|
valid,
|
|
83
88
|
value: valueProp,
|
|
84
89
|
defaultValue: defaultValueProp,
|
|
90
|
+
onValueChange,
|
|
85
91
|
onSearchValueChange,
|
|
86
92
|
autoFilter = true,
|
|
87
93
|
...restProps
|
|
@@ -89,9 +95,23 @@ const ComboboxProvider = ({
|
|
|
89
95
|
const triggerRef = React.useRef(null);
|
|
90
96
|
const inputRef = React.useRef(null);
|
|
91
97
|
const contentRef = React.useRef(null);
|
|
92
|
-
const [openState, setOpenState] = React.useState(defaultOpen != null ? defaultOpen : false);
|
|
93
|
-
const [value, setValue] = React.useState(valueProp != null ? valueProp : []);
|
|
94
98
|
const [defaultValue, setDefaultValue] = React.useState(defaultValueProp);
|
|
99
|
+
const [openState = false, setOpenState] = reactUseControllableState.useControllableState({
|
|
100
|
+
prop: openProp,
|
|
101
|
+
defaultProp: defaultOpen,
|
|
102
|
+
onChange: (state) => {
|
|
103
|
+
if (state) {
|
|
104
|
+
onOpen == null ? void 0 : onOpen();
|
|
105
|
+
} else {
|
|
106
|
+
onClose == null ? void 0 : onClose();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
const [value, setValue] = reactUseControllableState.useControllableState({
|
|
111
|
+
prop: valueProp,
|
|
112
|
+
defaultProp: defaultValueProp,
|
|
113
|
+
onChange: onValueChange
|
|
114
|
+
});
|
|
95
115
|
const [filteredItems, setFilteredItems] = React.useState(/* @__PURE__ */ new Set());
|
|
96
116
|
const [searchValue, setSearchValue] = React.useState("");
|
|
97
117
|
const { valid: formFieldValid } = designSystemBaseForm.useFormFieldContext();
|
|
@@ -146,7 +166,7 @@ const TriggerActionButton = ({
|
|
|
146
166
|
clearActionLabel,
|
|
147
167
|
size
|
|
148
168
|
}) => {
|
|
149
|
-
const { setOpenState, value, setValue } = useComboboxContext();
|
|
169
|
+
const { setOpenState, value = [], setValue } = useComboboxContext();
|
|
150
170
|
const isEmpty = value.length === 0;
|
|
151
171
|
const ActionButtonIcon = isEmpty ? designSystemIcons.IconChevronDown : designSystemIcons.IconCross;
|
|
152
172
|
const label = isEmpty ? openActionLabel : clearActionLabel;
|
|
@@ -155,7 +175,7 @@ const TriggerActionButton = ({
|
|
|
155
175
|
if (!isEmpty) {
|
|
156
176
|
setValue([]);
|
|
157
177
|
} else {
|
|
158
|
-
setOpenState((prevOpen) => !prevOpen);
|
|
178
|
+
setOpenState((prevOpen = false) => !prevOpen);
|
|
159
179
|
}
|
|
160
180
|
event.stopPropagation();
|
|
161
181
|
},
|
|
@@ -181,7 +201,7 @@ const Trigger = React__default["default"].forwardRef(
|
|
|
181
201
|
"aria-disabled": ariaDisabled,
|
|
182
202
|
valid: comboboxValid,
|
|
183
203
|
disabled,
|
|
184
|
-
value,
|
|
204
|
+
value = [],
|
|
185
205
|
triggerRef,
|
|
186
206
|
inputRef,
|
|
187
207
|
onSearchValueChange,
|
|
@@ -276,7 +296,6 @@ const StyledContent = designSystemStitches.styled(RadixPopover__namespace.Conten
|
|
|
276
296
|
width: "var(--radix-popover-trigger-width)",
|
|
277
297
|
zIndex: "$select",
|
|
278
298
|
overflowY: "auto",
|
|
279
|
-
marginTop: "$200",
|
|
280
299
|
padding: "$150",
|
|
281
300
|
boxSizing: "border-box",
|
|
282
301
|
outline: "1px solid transparent"
|
|
@@ -356,7 +375,13 @@ const Item = React__default["default"].forwardRef(
|
|
|
356
375
|
// AriakitComboboxItemCheck adds its owm inline styles which we want to omit here
|
|
357
376
|
/* @__PURE__ */ jsxRuntime.jsx(StyledItemCheck, { ...props })
|
|
358
377
|
),
|
|
359
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
378
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
379
|
+
designSystemIcons.IconCheckMark,
|
|
380
|
+
{
|
|
381
|
+
size: "small",
|
|
382
|
+
"data-testid": process.env.NODE_ENV === "test" ? "combobox-item-check" : void 0
|
|
383
|
+
}
|
|
384
|
+
)
|
|
360
385
|
}
|
|
361
386
|
)
|
|
362
387
|
]
|
|
@@ -387,48 +412,65 @@ const getChildrenItemValues = (componentChildren) => {
|
|
|
387
412
|
return values;
|
|
388
413
|
};
|
|
389
414
|
|
|
415
|
+
const CONTENT_OFFSET = parseInt(designSystemStitches.theme.space[50]);
|
|
390
416
|
const isInsideRef = (element, ref) => {
|
|
391
417
|
var _a, _b;
|
|
392
418
|
return (_b = element != null && ((_a = ref.current) == null ? void 0 : _a.contains(element))) != null ? _b : false;
|
|
393
419
|
};
|
|
394
|
-
const Content = React__default["default"].forwardRef(
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
420
|
+
const Content = React__default["default"].forwardRef(
|
|
421
|
+
({ sideOffset = CONTENT_OFFSET, maxHeight, children, ...restProps }, forwardRef) => {
|
|
422
|
+
const {
|
|
423
|
+
triggerRef,
|
|
424
|
+
contentRef,
|
|
425
|
+
autoFilter,
|
|
426
|
+
filteredItems,
|
|
427
|
+
setFilteredItems,
|
|
428
|
+
searchValue,
|
|
429
|
+
noResultsText,
|
|
430
|
+
direction
|
|
431
|
+
} = useComboboxContext();
|
|
432
|
+
React.useEffect(() => {
|
|
433
|
+
const childrenItemValues = getChildrenItemValues(children);
|
|
434
|
+
setFilteredItems(
|
|
435
|
+
new Set(
|
|
436
|
+
autoFilter === false ? childrenItemValues : childrenItemValues.filter(
|
|
437
|
+
(child) => child.toLowerCase().includes(searchValue.toLowerCase())
|
|
438
|
+
)
|
|
410
439
|
)
|
|
411
|
-
)
|
|
440
|
+
);
|
|
441
|
+
}, [children, autoFilter, setFilteredItems, searchValue]);
|
|
442
|
+
const content = filteredItems.size === 0 ? noResultsText : children;
|
|
443
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
444
|
+
StyledContent,
|
|
445
|
+
{
|
|
446
|
+
...restProps,
|
|
447
|
+
sideOffset,
|
|
448
|
+
ref: designSystemUtils.mergeRefs([forwardRef, contentRef]),
|
|
449
|
+
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
450
|
+
onInteractOutside: (event) => {
|
|
451
|
+
const target = event.target;
|
|
452
|
+
const isTrigger = isInsideRef(target, triggerRef);
|
|
453
|
+
const isContent = isInsideRef(target, contentRef);
|
|
454
|
+
if (isTrigger || isContent) {
|
|
455
|
+
event.preventDefault();
|
|
456
|
+
}
|
|
457
|
+
},
|
|
458
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(designSystemScrollArea.ScrollArea, { type: "always", dir: direction, children: [
|
|
459
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
460
|
+
designSystemScrollArea.ScrollArea.Viewport,
|
|
461
|
+
{
|
|
462
|
+
availableHeight: "var(--radix-popover-content-available-height)",
|
|
463
|
+
verticalGap: "calc(var(--space-150) * 2)",
|
|
464
|
+
maxHeight,
|
|
465
|
+
children: content
|
|
466
|
+
}
|
|
467
|
+
),
|
|
468
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystemScrollArea.ScrollArea.Scrollbar, { orientation: "vertical", children: /* @__PURE__ */ jsxRuntime.jsx(designSystemScrollArea.ScrollArea.Thumb, {}) })
|
|
469
|
+
] })
|
|
470
|
+
}
|
|
412
471
|
);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
StyledContent,
|
|
416
|
-
{
|
|
417
|
-
...restProps,
|
|
418
|
-
ref: designSystemUtils.mergeRefs([forwardRef, contentRef]),
|
|
419
|
-
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
420
|
-
onInteractOutside: (event) => {
|
|
421
|
-
const target = event.target;
|
|
422
|
-
const isTrigger = isInsideRef(target, triggerRef);
|
|
423
|
-
const isContent = isInsideRef(target, contentRef);
|
|
424
|
-
if (isTrigger || isContent) {
|
|
425
|
-
event.preventDefault();
|
|
426
|
-
}
|
|
427
|
-
},
|
|
428
|
-
children: filteredItems.size === 0 ? noResultsText : children
|
|
429
|
-
}
|
|
430
|
-
);
|
|
431
|
-
});
|
|
472
|
+
}
|
|
473
|
+
);
|
|
432
474
|
|
|
433
475
|
const Portal = (props) => /* @__PURE__ */ jsxRuntime.jsx(RadixPopover.Portal, { ...props });
|
|
434
476
|
|
|
@@ -508,14 +550,14 @@ const StyledValue = designSystemStitches.styled(Chip, {
|
|
|
508
550
|
|
|
509
551
|
const Value = ({ removeChipAriaLabel }) => {
|
|
510
552
|
const {
|
|
511
|
-
value,
|
|
553
|
+
value = [],
|
|
512
554
|
setValue,
|
|
513
555
|
disabled,
|
|
514
556
|
"aria-disabled": ariaDisabled
|
|
515
557
|
} = useComboboxContext();
|
|
516
558
|
const isDisabled = ariaDisabled === true || disabled;
|
|
517
559
|
const onItemRemove = (item) => {
|
|
518
|
-
setValue((prevValue) => prevValue.filter((value2) => value2 !== item));
|
|
560
|
+
setValue((prevValue) => prevValue == null ? void 0 : prevValue.filter((value2) => value2 !== item));
|
|
519
561
|
};
|
|
520
562
|
if (value.length === 0) {
|
|
521
563
|
return null;
|
|
@@ -526,6 +568,7 @@ const Value = ({ removeChipAriaLabel }) => {
|
|
|
526
568
|
onRemove: () => onItemRemove(item),
|
|
527
569
|
disabled: isDisabled,
|
|
528
570
|
removeChipAriaLabel,
|
|
571
|
+
"data-testid": process.env.NODE_ENV === "test" ? "combobox-value-".concat(item) : void 0,
|
|
529
572
|
children: item
|
|
530
573
|
},
|
|
531
574
|
item
|
|
@@ -539,10 +582,17 @@ const StyledSeparator = designSystemStitches.styled(designSystemPrimitive.Primit
|
|
|
539
582
|
margin: "$100 0"
|
|
540
583
|
});
|
|
541
584
|
|
|
542
|
-
const Separator = React__default["default"].forwardRef((props, forwardRef) =>
|
|
585
|
+
const Separator = React__default["default"].forwardRef((props, forwardRef) => {
|
|
586
|
+
const { autoFilter, searchValue } = useComboboxContext();
|
|
587
|
+
if (autoFilter === true && searchValue.length > 0) {
|
|
588
|
+
return null;
|
|
589
|
+
}
|
|
590
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StyledSeparator, { ...props, ref: forwardRef, "aria-hidden": true });
|
|
591
|
+
});
|
|
543
592
|
|
|
544
593
|
const StyledComboboxContent = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
|
|
545
|
-
position: "relative"
|
|
594
|
+
position: "relative",
|
|
595
|
+
width: "100%"
|
|
546
596
|
});
|
|
547
597
|
|
|
548
598
|
const Root = React__default["default"].forwardRef(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {
|
|
@@ -575,8 +625,18 @@ const Root = React__default["default"].forwardRef(({ value: valueProp, onValueCh
|
|
|
575
625
|
setReadOnly
|
|
576
626
|
]);
|
|
577
627
|
const onSetSelectedValue = (newValue) => {
|
|
578
|
-
|
|
579
|
-
|
|
628
|
+
setValue(typeof newValue === "string" ? [newValue] : newValue);
|
|
629
|
+
};
|
|
630
|
+
const comboboxProps = {
|
|
631
|
+
...restProps,
|
|
632
|
+
onClick: (event) => {
|
|
633
|
+
if (!designSystemUtils.booleanify(disabled)) {
|
|
634
|
+
setOpenState(true);
|
|
635
|
+
}
|
|
636
|
+
if (restProps.onClick !== void 0) {
|
|
637
|
+
restProps.onClick(event);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
580
640
|
};
|
|
581
641
|
return /* @__PURE__ */ jsxRuntime.jsx(RadixPopover__namespace.Root, { open: openState, onOpenChange: setOpenState, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
582
642
|
react.ComboboxProvider,
|
|
@@ -586,7 +646,15 @@ const Root = React__default["default"].forwardRef(({ value: valueProp, onValueCh
|
|
|
586
646
|
defaultSelectedValue: defaultValue,
|
|
587
647
|
selectedValue: value,
|
|
588
648
|
setSelectedValue: onSetSelectedValue,
|
|
589
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
649
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
650
|
+
StyledComboboxContent,
|
|
651
|
+
{
|
|
652
|
+
...comboboxProps,
|
|
653
|
+
ref: forwardRef,
|
|
654
|
+
dir: direction,
|
|
655
|
+
children
|
|
656
|
+
}
|
|
657
|
+
)
|
|
590
658
|
}
|
|
591
659
|
) });
|
|
592
660
|
});
|
|
@@ -601,8 +669,9 @@ const Combobox = React__default["default"].forwardRef(
|
|
|
601
669
|
required,
|
|
602
670
|
value,
|
|
603
671
|
defaultValue,
|
|
604
|
-
onSearchValueChange,
|
|
605
672
|
onOpen,
|
|
673
|
+
onClose,
|
|
674
|
+
onSearchValueChange,
|
|
606
675
|
onValueChange,
|
|
607
676
|
direction = "ltr",
|
|
608
677
|
autoFilter = true,
|
|
@@ -613,9 +682,12 @@ const Combobox = React__default["default"].forwardRef(
|
|
|
613
682
|
{
|
|
614
683
|
defaultValue,
|
|
615
684
|
value,
|
|
685
|
+
onValueChange,
|
|
616
686
|
onSearchValueChange,
|
|
617
687
|
defaultOpen,
|
|
618
688
|
open,
|
|
689
|
+
onOpen,
|
|
690
|
+
onClose,
|
|
619
691
|
valid,
|
|
620
692
|
required,
|
|
621
693
|
disabled,
|
|
@@ -624,15 +696,7 @@ const Combobox = React__default["default"].forwardRef(
|
|
|
624
696
|
direction,
|
|
625
697
|
autoFilter,
|
|
626
698
|
noResultsText,
|
|
627
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
628
|
-
Root,
|
|
629
|
-
{
|
|
630
|
-
...restProps,
|
|
631
|
-
noResultsText,
|
|
632
|
-
value,
|
|
633
|
-
ref: forwardRef
|
|
634
|
-
}
|
|
635
|
-
)
|
|
699
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Root, { ...restProps, value, ref: forwardRef })
|
|
636
700
|
}
|
|
637
701
|
)
|
|
638
702
|
);
|
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.styled.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n 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 { 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 value?: string[]\n defaultValue?: string[]\n onSearchValueChange?: (value: string) => void\n direction?: Direction\n autoFilter?: boolean\n noResultsText?: ReactNode\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean>>\n openState: boolean\n value: string[]\n setValue: React.Dispatch<React.SetStateAction<string[]>>\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 defaultOpen,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onSearchValueChange,\n autoFilter = true,\n ...restProps\n}: PropsWithChildren<ComboboxProviderProps>): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const inputRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n const [openState, setOpenState] = useState(defaultOpen ?? false)\n const [value, setValue] = useState(valueProp ?? [])\n const [defaultValue, setDefaultValue] = useState(defaultValueProp)\n const [filteredItems, setFilteredItems] = useState(new Set<string>())\n const [searchValue, setSearchValue] = useState('')\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n onSearchValueChange,\n triggerRef,\n 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 => !prevOpen)\n }\n\n event.stopPropagation()\n },\n [isEmpty, setValue, setOpenState]\n )\n\n return (\n <StyledActionButton label={label} size={size} onClick={onActionButtonClick}>\n <ActionButtonIcon size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox } from '@ariakit/react'\nimport {\n booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<TriggerActionButtonProps, 'openActionLabel' | 'clearActionLabel'> & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n clearActionLabel,\n onChange,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value,\n triggerRef,\n inputRef,\n onSearchValueChange,\n searchValue,\n setSearchValue,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined || value.length !== 0 || focused\n\n const 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 <RadixPopover.Anchor ref={mergeRefs([triggerRef, forwardRef])}>\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 </RadixPopover.Anchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '1.5',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n marginTop: '$200',\n padding: '$150',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n paddingX: '$100',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '$200',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: 1.5,\n position: 'relative',\n userSelect: 'none',\n paddingX: '$100',\n paddingY: '10px',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { mergeProps } from '@react-aria/utils'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems, 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 accessibleWhenDisabled={ariaDisabled === true}\n disabled={ariaDisabled === true || disabled}\n ref={forwardRef}\n value={value}\n onClick={scrollIntoView}\n >\n {children}\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark size='small' />\n </AriakitComboboxItemCheck>\n </StyledItem>\n )\n }\n)\n","import React from 'react'\nimport type { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nconst isInsideRef = (\n element: Element | null,\n ref: React.RefObject<Element>\n): boolean => (element != null && ref.current?.contains(element)) ?? false\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Combobox's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(({ children, ...restProps }, forwardRef) => {\n const {\n triggerRef,\n contentRef,\n autoFilter,\n filteredItems,\n setFilteredItems,\n searchValue,\n noResultsText,\n } = useComboboxContext()\n\n useEffect(() => {\n const childrenItemValues = getChildrenItemValues(children)\n\n setFilteredItems(\n new Set(\n autoFilter === false\n ? childrenItemValues\n : childrenItemValues.filter(child =>\n child.toLowerCase().includes(searchValue.toLowerCase())\n )\n )\n )\n }, [children, autoFilter, setFilteredItems, searchValue])\n\n return (\n <StyledContent\n {...restProps}\n ref={mergeRefs([forwardRef, contentRef])}\n onOpenAutoFocus={event => event.preventDefault()}\n onInteractOutside={event => {\n const target = event.target as Element | null\n const isTrigger = isInsideRef(target, triggerRef)\n const isContent = isInsideRef(target, contentRef)\n\n if (isTrigger || isContent) {\n event.preventDefault()\n }\n }}\n >\n {filteredItems.size === 0 ? noResultsText : children}\n </StyledContent>\n )\n})\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React, { useMemo } from 'react'\nimport { Group as AriakitGroup } from '@ariakit/react'\nimport type { ElementRef } from 'react'\nimport type { GroupProps as AriakitGroupProps } from '@ariakit/react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nexport type GroupProps = AriakitGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof AriakitGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, filteredItems } = useComboboxContext()\n\n const childValues = useMemo(\n // don't perform calculation if auto filter is disabled\n () => (autoFilter !== false ? getChildrenItemValues(children) : []),\n [children, autoFilter]\n )\n const hasVisibleChildren = useMemo(\n () =>\n // don't perform calculation if auto filter is disabled\n autoFilter !== false\n ? childValues.some(value => filteredItems.has(value))\n : true,\n [childValues, filteredItems, autoFilter]\n )\n\n if (!hasVisibleChildren) {\n return null\n }\n\n return (\n <AriakitGroup {...rest} ref={forwardRef}>\n {children}\n </AriakitGroup>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {\n padding: '$100',\n color: '$text-neutrals-subtle',\n fontSize: '$150',\n textTransform: 'uppercase',\n fontWeight: 650,\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n background: '$gray-100',\n color: '$gray-900',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n ...focus.css({\n boxShadow: '$focus-small-outline',\n borderColor: '$blue-400 !important',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeChipAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeChipAriaLabel}>\n <IconCross size='small' weight='thin' color='gray-500' />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Value: FC<ValueProps> = ({ removeChipAriaLabel }) => {\n const {\n value,\n setValue,\n disabled,\n 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const 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 >\n {item}\n </StyledValue>\n ))}\n </>\n )\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(Primitive.div, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '$100 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSeparator } from './separator.styled'\nimport type { StyledSeparatorProps } from './separator.styled'\n\nexport interface SeparatorProps extends StyledSeparatorProps {}\n\nexport const Separator = React.forwardRef<\n ElementRef<typeof StyledSeparator>,\n SeparatorProps\n>((props, forwardRef) => (\n <StyledSeparator {...props} ref={forwardRef} aria-hidden />\n))\n","import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledComboboxContent = styled(Primitive.div, {\n position: 'relative',\n})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent, ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Group } from './partials/group'\nimport { GroupLabel } from './partials/group-label'\nimport { Value } from './partials/value'\nimport { Separator } from './partials/separator'\nimport { StyledComboboxContent } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n // setSelectedValue from Ariakit.ComboboxProvider expects to accept a union string | string[], type cast is required to specify that it's a multi value\n onValueChange?.(newValue as string[])\n setValue(newValue as string[])\n }\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={setOpenState}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={setOpenState}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent {...restProps} ref={forwardRef} dir={direction}>\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n})\n\nexport const Combobox = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n {\n 'aria-disabled': ariaDisabled,\n defaultOpen = false,\n open,\n valid,\n disabled,\n readOnly,\n required,\n value,\n defaultValue,\n onSearchValueChange,\n onOpen,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onSearchValueChange={onSearchValueChange}\n defaultOpen={defaultOpen}\n open={open}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n autoFilter={autoFilter}\n noResultsText={noResultsText}\n >\n <Root\n {...restProps}\n noResultsText={noResultsText}\n value={value}\n ref={forwardRef}\n />\n </ComboboxProvider>\n )\n) as ForwardRefExoticComponent<ComboboxProps> & Partials\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n Separator: typeof Separator\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\nCombobox.Separator = Separator\n"],"names":["styled","Input","createContext","useRef","useState","useFormFieldContext","jsx","useContext","IconChevronDown","IconCross","useCallback","React","stringAttrValue","booleanishAttrValue","jsxs","RadixPopover","mergeRefs","FloatingLabel","Combobox","Primitive","ComboboxItem","focus","useAriaDisabled","mergeProps","AriakitComboboxItemCheck","IconCheckMark","useEffect","RadixPortal","useMemo","AriakitGroup","GroupLabel","BaseButton","booleanify","value","Fragment","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGa,MAAA,WAAA,GAAcA,4BAAOC,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,EAAA;AAAA,QACT,SAAW,EAAA,KAAA;AAAA,QACX,MAAQ,EAAA,MAAA;AAAA,QACR,OAAS,EAAA,UAAA;AAAA,QACT,YAAc,EAAA,MAAA;AAAA,OAChB;AA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AAA,IACA,mBAAA;AAAA,IACA,MAAA;AAAA,IACA,aAAA;AAAA,IACA,SAAY,GAAA,KAAA;AAAA,IACZ,UAAa,GAAA,IAAA;AAAA,IACb,aAAA;AAAA,IACA,GAAG,SAAA;AAAA,KAEL,UAEA,qBAAAL,cAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,YAAA;AAAA,MACA,KAAA;AAAA,MACA,mBAAA;AAAA,MACA,WAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,eAAe,EAAA,YAAA;AAAA,MACf,SAAA;AAAA,MACA,UAAA;AAAA,MACA,aAAA;AAAA,MAEA,QAAA,kBAAAA,cAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACE,GAAG,SAAA;AAAA,UACJ,aAAA;AAAA,UACA,KAAA;AAAA,UACA,GAAK,EAAA,UAAA;AAAA,SAAA;AAAA,OACP;AAAA,KAAA;AAAA,GACF;AAEJ,EAAA;AAaA,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":"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.styled.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n 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 booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<TriggerActionButtonProps, 'openActionLabel' | 'clearActionLabel'> & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n clearActionLabel,\n onChange,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value = [],\n triggerRef,\n inputRef,\n onSearchValueChange,\n searchValue,\n setSearchValue,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined || value.length !== 0 || focused\n\n const 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 <RadixPopover.Anchor ref={mergeRefs([triggerRef, forwardRef])}>\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 </RadixPopover.Anchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '1.5',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n padding: '$150',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n paddingX: '$100',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '$200',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: 1.5,\n position: 'relative',\n userSelect: 'none',\n paddingX: '$100',\n paddingY: '10px',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { mergeProps } from '@react-aria/utils'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems, 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 accessibleWhenDisabled={ariaDisabled === true}\n disabled={ariaDisabled === true || disabled}\n ref={forwardRef}\n value={value}\n onClick={scrollIntoView}\n >\n {children}\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark\n size='small'\n data-testid={\n process.env.NODE_ENV === 'test'\n ? 'combobox-item-check'\n : undefined\n }\n />\n </AriakitComboboxItemCheck>\n </StyledItem>\n )\n }\n)\n","import React from 'react'\nimport type { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\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='calc(var(--space-150) * 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: '$100',\n color: '$text-neutrals-subtle',\n fontSize: '$150',\n textTransform: 'uppercase',\n fontWeight: 650,\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n background: '$gray-100',\n color: '$gray-900',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n ...focus.css({\n boxShadow: '$focus-small-outline',\n borderColor: '$blue-400 !important',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeChipAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeChipAriaLabel}>\n <IconCross size='small' weight='thin' color='gray-500' />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Value: FC<ValueProps> = ({ removeChipAriaLabel }) => {\n const {\n value = [],\n setValue,\n disabled,\n 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const 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 type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledComboboxContent = styled(Primitive.div, {\n position: 'relative',\n width: '100%',\n})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent, ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport { booleanify } from '@mirohq/design-system-utils'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Group } from './partials/group'\nimport { GroupLabel } from './partials/group-label'\nimport { Value } from './partials/value'\nimport { Separator } from './partials/separator'\nimport { StyledComboboxContent } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n\n /**\n * Event handler called when the combobox clicked.\n */\n onClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n Omit<ComboboxProps, 'noResultsText'>\n>(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n setValue(typeof newValue === 'string' ? [newValue] : newValue)\n }\n\n const comboboxProps = {\n ...restProps,\n onClick: (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n if (!booleanify(disabled)) {\n setOpenState(true)\n }\n\n if (restProps.onClick !== undefined) {\n restProps.onClick(event)\n }\n },\n }\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={setOpenState}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={setOpenState}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent\n {...comboboxProps}\n ref={forwardRef}\n dir={direction}\n >\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n})\n\nexport const Combobox = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n {\n 'aria-disabled': ariaDisabled,\n defaultOpen = false,\n open,\n valid,\n disabled,\n readOnly,\n required,\n value,\n defaultValue,\n onOpen,\n onClose,\n onSearchValueChange,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n 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} ref={forwardRef} />\n </ComboboxProvider>\n )\n) as ForwardRefExoticComponent<ComboboxProps> & Partials\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n 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","Input","createContext","useRef","useState","useControllableState","useFormFieldContext","jsx","useContext","IconChevronDown","IconCross","useCallback","React","stringAttrValue","booleanishAttrValue","jsxs","RadixPopover","mergeRefs","FloatingLabel","Combobox","Primitive","ComboboxItem","focus","useAriaDisabled","mergeProps","AriakitComboboxItemCheck","IconCheckMark","theme","useEffect","ScrollArea","RadixPortal","useMemo","AriakitGroup","GroupLabel","BaseButton","booleanify","value","Fragment","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGa,MAAA,WAAA,GAAcA,4BAAOC,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,EAA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