@mirohq/design-system-combobox 0.1.0-combobox.4 → 0.1.0-combobox.5
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 +81 -42
- package/dist/main.js.map +1 -1
- package/dist/module.js +81 -42
- package/dist/module.js.map +1 -1
- package/package.json +5 -4
package/dist/main.js
CHANGED
|
@@ -11,6 +11,7 @@ var designSystemUtils = require('@mirohq/design-system-utils');
|
|
|
11
11
|
var designSystemStitches = require('@mirohq/design-system-stitches');
|
|
12
12
|
var designSystemInput = require('@mirohq/design-system-input');
|
|
13
13
|
var designSystemIcons = require('@mirohq/design-system-icons');
|
|
14
|
+
var utils = require('@react-aria/utils');
|
|
14
15
|
var designSystemUseAriaDisabled = require('@mirohq/design-system-use-aria-disabled');
|
|
15
16
|
var designSystemStyles = require('@mirohq/design-system-styles');
|
|
16
17
|
var designSystemPrimitive = require('@mirohq/design-system-primitive');
|
|
@@ -43,24 +44,29 @@ const StyledInput = designSystemStitches.styled(designSystemInput.Input, {
|
|
|
43
44
|
flexWrap: "wrap",
|
|
44
45
|
flexGrow: 1,
|
|
45
46
|
gap: "0 $50",
|
|
46
|
-
"
|
|
47
|
-
|
|
47
|
+
overflowY: "scroll",
|
|
48
|
+
"&[data-valid], &[data-invalid]": {
|
|
49
|
+
// we don't need a bigger padding here as Input component will render its own icon
|
|
50
|
+
paddingRight: "$100"
|
|
48
51
|
},
|
|
49
52
|
"& input": {
|
|
50
|
-
minWidth: "
|
|
53
|
+
minWidth: "$8",
|
|
51
54
|
flexBasis: 0,
|
|
52
|
-
flexGrow: 1
|
|
53
|
-
marginRight: "$300"
|
|
55
|
+
flexGrow: 1
|
|
54
56
|
},
|
|
55
57
|
variants: {
|
|
56
58
|
size: {
|
|
57
59
|
large: {
|
|
58
60
|
minHeight: "$10",
|
|
59
|
-
|
|
61
|
+
height: "auto",
|
|
62
|
+
padding: "5px $100",
|
|
63
|
+
paddingRight: "$500"
|
|
60
64
|
},
|
|
61
65
|
"x-large": {
|
|
62
66
|
minHeight: "$12",
|
|
63
|
-
|
|
67
|
+
height: "auto",
|
|
68
|
+
padding: "5px $100",
|
|
69
|
+
paddingRight: "$500"
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
},
|
|
@@ -81,6 +87,7 @@ const ComboboxProvider = ({
|
|
|
81
87
|
...restProps
|
|
82
88
|
}) => {
|
|
83
89
|
const triggerRef = React.useRef(null);
|
|
90
|
+
const inputRef = React.useRef(null);
|
|
84
91
|
const contentRef = React.useRef(null);
|
|
85
92
|
const [openState, setOpenState] = React.useState(defaultOpen != null ? defaultOpen : false);
|
|
86
93
|
const [value, setValue] = React.useState(valueProp != null ? valueProp : []);
|
|
@@ -102,6 +109,7 @@ const ComboboxProvider = ({
|
|
|
102
109
|
defaultValue,
|
|
103
110
|
onSearchValueChange,
|
|
104
111
|
triggerRef,
|
|
112
|
+
inputRef,
|
|
105
113
|
contentRef,
|
|
106
114
|
autoFilter,
|
|
107
115
|
searchValue,
|
|
@@ -139,7 +147,7 @@ const TriggerActionButton = ({
|
|
|
139
147
|
size
|
|
140
148
|
}) => {
|
|
141
149
|
const { setOpenState, value, setValue } = useComboboxContext();
|
|
142
|
-
const isEmpty = value
|
|
150
|
+
const isEmpty = value.length === 0;
|
|
143
151
|
const ActionButtonIcon = isEmpty ? designSystemIcons.IconChevronDown : designSystemIcons.IconCross;
|
|
144
152
|
const label = isEmpty ? openActionLabel : clearActionLabel;
|
|
145
153
|
const onActionButtonClick = React.useCallback(
|
|
@@ -175,6 +183,7 @@ const Trigger = React__default["default"].forwardRef(
|
|
|
175
183
|
disabled,
|
|
176
184
|
value,
|
|
177
185
|
triggerRef,
|
|
186
|
+
inputRef,
|
|
178
187
|
onSearchValueChange,
|
|
179
188
|
searchValue,
|
|
180
189
|
setSearchValue
|
|
@@ -201,41 +210,59 @@ const Trigger = React__default["default"].forwardRef(
|
|
|
201
210
|
disabled,
|
|
202
211
|
invalid: designSystemUtils.booleanishAttrValue(valid),
|
|
203
212
|
id: id != null ? id : formElementId,
|
|
204
|
-
placeholder:
|
|
213
|
+
placeholder: value.length === 0 ? placeholder : void 0
|
|
205
214
|
};
|
|
206
215
|
const shouldUseFloatingLabel = label !== null && isFloatingLabel;
|
|
207
|
-
const isFloating = placeholder !== void 0 ||
|
|
216
|
+
const isFloating = placeholder !== void 0 || value.length !== 0 || focused;
|
|
217
|
+
const scrollIntoView = (event) => {
|
|
218
|
+
var _a;
|
|
219
|
+
const trigger = triggerRef == null ? void 0 : triggerRef.current;
|
|
220
|
+
const baseInput = (_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.parentElement;
|
|
221
|
+
if (baseInput != null && trigger != null) {
|
|
222
|
+
event.preventDefault();
|
|
223
|
+
baseInput.scrollTo({
|
|
224
|
+
top: trigger.scrollHeight
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
if (restProps.onFocus !== void 0) {
|
|
228
|
+
restProps.onFocus(event);
|
|
229
|
+
}
|
|
230
|
+
};
|
|
208
231
|
const onInputChange = (e) => {
|
|
209
232
|
setSearchValue(e.target.value);
|
|
210
233
|
onSearchValueChange == null ? void 0 : onSearchValueChange(e.target.value);
|
|
211
234
|
onChange == null ? void 0 : onChange(e);
|
|
212
235
|
};
|
|
213
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
236
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(RadixPopover__namespace.Anchor, { ref: designSystemUtils.mergeRefs([triggerRef, forwardRef]), children: [
|
|
237
|
+
shouldUseFloatingLabel && /* @__PURE__ */ jsxRuntime.jsx(designSystemBaseForm.FloatingLabel, { floating: isFloating, size, children: label }),
|
|
238
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
239
|
+
react.Combobox,
|
|
240
|
+
{
|
|
241
|
+
render: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
242
|
+
StyledInput,
|
|
243
|
+
{
|
|
244
|
+
...inputProps,
|
|
245
|
+
value: searchValue,
|
|
246
|
+
size,
|
|
247
|
+
ref: inputRef,
|
|
248
|
+
onChange: onInputChange,
|
|
249
|
+
onFocus: scrollIntoView,
|
|
250
|
+
children: [
|
|
251
|
+
children,
|
|
252
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
253
|
+
TriggerActionButton,
|
|
254
|
+
{
|
|
255
|
+
openActionLabel,
|
|
256
|
+
clearActionLabel,
|
|
257
|
+
size
|
|
258
|
+
}
|
|
259
|
+
)
|
|
260
|
+
]
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
}
|
|
264
|
+
)
|
|
265
|
+
] });
|
|
239
266
|
}
|
|
240
267
|
);
|
|
241
268
|
|
|
@@ -295,20 +322,31 @@ const StyledItem = designSystemStitches.styled(react.ComboboxItem, {
|
|
|
295
322
|
const Item = React__default["default"].forwardRef(
|
|
296
323
|
({ disabled = false, value, textValue, children, ...restProps }, forwardRef) => {
|
|
297
324
|
const { "aria-disabled": ariaDisabled, ...restAriaDisabledProps } = designSystemUseAriaDisabled.useAriaDisabled(restProps, { allowArrows: true });
|
|
298
|
-
const { autoFilter, filteredItems } = useComboboxContext();
|
|
325
|
+
const { autoFilter, filteredItems, triggerRef, inputRef } = useComboboxContext();
|
|
299
326
|
if (autoFilter !== false && !filteredItems.has(value)) {
|
|
300
327
|
return null;
|
|
301
328
|
}
|
|
329
|
+
const scrollIntoView = (event) => {
|
|
330
|
+
var _a;
|
|
331
|
+
if (((_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.parentElement) != null && (triggerRef == null ? void 0 : triggerRef.current) != null) {
|
|
332
|
+
inputRef.current.parentElement.scrollTo({
|
|
333
|
+
top: triggerRef.current.scrollHeight
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
if (restProps.onClick !== void 0) {
|
|
337
|
+
restProps.onClick(event);
|
|
338
|
+
}
|
|
339
|
+
};
|
|
302
340
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
303
341
|
StyledItem,
|
|
304
342
|
{
|
|
305
|
-
...restProps,
|
|
306
|
-
...restAriaDisabledProps,
|
|
343
|
+
...utils.mergeProps(restProps, restAriaDisabledProps),
|
|
307
344
|
focusable: true,
|
|
308
345
|
accessibleWhenDisabled: ariaDisabled === true,
|
|
309
346
|
disabled: ariaDisabled === true || disabled,
|
|
310
347
|
ref: forwardRef,
|
|
311
348
|
value,
|
|
349
|
+
onClick: scrollIntoView,
|
|
312
350
|
children: [
|
|
313
351
|
children,
|
|
314
352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -475,12 +513,11 @@ const Value = ({ removeChipAriaLabel }) => {
|
|
|
475
513
|
disabled,
|
|
476
514
|
"aria-disabled": ariaDisabled
|
|
477
515
|
} = useComboboxContext();
|
|
478
|
-
const isEmpty = value === void 0 || value.length === 0;
|
|
479
516
|
const isDisabled = ariaDisabled === true || disabled;
|
|
480
517
|
const onItemRemove = (item) => {
|
|
481
518
|
setValue((prevValue) => prevValue.filter((value2) => value2 !== item));
|
|
482
519
|
};
|
|
483
|
-
if (
|
|
520
|
+
if (value.length === 0) {
|
|
484
521
|
return null;
|
|
485
522
|
}
|
|
486
523
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: value.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -504,7 +541,9 @@ const StyledSeparator = designSystemStitches.styled(designSystemPrimitive.Primit
|
|
|
504
541
|
|
|
505
542
|
const Separator = React__default["default"].forwardRef((props, forwardRef) => /* @__PURE__ */ jsxRuntime.jsx(StyledSeparator, { ...props, ref: forwardRef, "aria-hidden": true }));
|
|
506
543
|
|
|
507
|
-
const StyledComboboxContent = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
|
|
544
|
+
const StyledComboboxContent = designSystemStitches.styled(designSystemPrimitive.Primitive.div, {
|
|
545
|
+
position: "relative"
|
|
546
|
+
});
|
|
508
547
|
|
|
509
548
|
const Root = React__default["default"].forwardRef(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {
|
|
510
549
|
const {
|
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\n '&&&': {\n height: 'max-content',\n },\n\n '& input': {\n minWidth: '30px',\n flexBasis: 0,\n flexGrow: 1,\n marginRight: '$300',\n },\n\n variants: {\n size: {\n large: {\n minHeight: '$10',\n padding: '5px $100',\n },\n 'x-large': {\n minHeight: '$12',\n padding: '9px $150',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren, ReactNode } from 'react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\n\ninterface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n value?: string[]\n defaultValue?: string[]\n onSearchValueChange?: (value: string) => void\n direction?: Direction\n autoFilter?: boolean\n noResultsText?: ReactNode\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean>>\n openState: boolean\n setValue: React.Dispatch<React.SetStateAction<string[]>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string>>\n filteredItems: Set<string>\n setFilteredItems: React.Dispatch<React.SetStateAction<Set<string>>>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n defaultOpen,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onSearchValueChange,\n autoFilter = true,\n ...restProps\n}: PropsWithChildren<ComboboxProviderProps>): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n const [openState, setOpenState] = useState(defaultOpen ?? false)\n const [value, setValue] = useState(valueProp ?? [])\n const [defaultValue, setDefaultValue] = useState(defaultValueProp)\n const [filteredItems, setFilteredItems] = useState(new Set<string>())\n const [searchValue, setSearchValue] = useState('')\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n onSearchValueChange,\n triggerRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n filteredItems,\n setFilteredItems,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n large: {\n top: '5px',\n },\n 'x-large': {\n top: '9px',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n\nexport type StyledActionButtonProps = StrictComponentProps<\n typeof StyledActionButton\n>\n","import React, { useCallback } from 'react'\nimport { IconChevronDown, IconCross } from '@mirohq/design-system-icons'\n\nimport type { StyledActionButtonProps } from './trigger-action-button.styled'\nimport { StyledActionButton } from './trigger-action-button.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport type TriggerActionButtonProps = Omit<\n StyledActionButtonProps,\n 'label'\n> & {\n /**\n * The label text for Trigger's action button when Combobox is empty. Open/Close action will be performed.\n * Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox has values selected. Clear Combobox values action\n * will be performed. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n}\n\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n clearActionLabel,\n size,\n}) => {\n const { setOpenState, value, setValue } = useComboboxContext()\n\n const isEmpty = value === undefined || value.length === 0\n\n const ActionButtonIcon = isEmpty ? IconChevronDown : IconCross\n const label = isEmpty ? openActionLabel : clearActionLabel\n\n const onActionButtonClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (!isEmpty) {\n setValue([])\n } else {\n setOpenState(prevOpen => !prevOpen)\n }\n\n event.stopPropagation()\n },\n [isEmpty, setValue, setOpenState]\n )\n\n return (\n <StyledActionButton label={label} size={size} onClick={onActionButtonClick}>\n <ActionButtonIcon size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox } from '@ariakit/react'\nimport {\n booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<TriggerActionButtonProps, 'openActionLabel' | 'clearActionLabel'> & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n clearActionLabel,\n onChange,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value,\n triggerRef,\n onSearchValueChange,\n searchValue,\n setSearchValue,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value?.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined || value?.length !== 0 || focused\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onSearchValueChange?.(e.target.value)\n onChange?.(e)\n }\n\n return (\n <RadixPopover.Anchor ref={mergeRefs([triggerRef, forwardRef])}>\n <Combobox\n render={\n <StyledInput\n value={searchValue}\n onChange={onInputChange}\n {...inputProps}\n size={size}\n >\n {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n clearActionLabel={clearActionLabel}\n size={size}\n />\n </StyledInput>\n }\n />\n </RadixPopover.Anchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '1.5',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n marginTop: '$200',\n padding: '$150',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n paddingX: '$100',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '$200',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: 1.5,\n position: 'relative',\n userSelect: 'none',\n paddingX: '$100',\n paddingY: '10px',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems } = useComboboxContext()\n\n if (autoFilter !== false && !filteredItems.has(value)) {\n return null\n }\n\n return (\n <StyledItem\n {...restProps}\n {...restAriaDisabledProps}\n focusable\n accessibleWhenDisabled={ariaDisabled === true}\n disabled={ariaDisabled === true || disabled}\n ref={forwardRef}\n value={value}\n >\n {children}\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark size='small' />\n </AriakitComboboxItemCheck>\n </StyledItem>\n )\n }\n)\n","import React from 'react'\nimport type { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nconst isInsideRef = (\n element: Element | null,\n ref: React.RefObject<Element>\n): boolean => (element != null && ref.current?.contains(element)) ?? false\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Combobox's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(({ children, ...restProps }, forwardRef) => {\n const {\n triggerRef,\n contentRef,\n autoFilter,\n filteredItems,\n setFilteredItems,\n searchValue,\n noResultsText,\n } = useComboboxContext()\n\n useEffect(() => {\n const childrenItemValues = getChildrenItemValues(children)\n\n setFilteredItems(\n new Set(\n autoFilter === false\n ? childrenItemValues\n : childrenItemValues.filter(child =>\n child.toLowerCase().includes(searchValue.toLowerCase())\n )\n )\n )\n }, [children, autoFilter, setFilteredItems, searchValue])\n\n return (\n <StyledContent\n {...restProps}\n ref={mergeRefs([forwardRef, contentRef])}\n onOpenAutoFocus={event => event.preventDefault()}\n onInteractOutside={event => {\n const target = event.target as Element | null\n const isTrigger = isInsideRef(target, triggerRef)\n const isContent = isInsideRef(target, contentRef)\n\n if (isTrigger || isContent) {\n event.preventDefault()\n }\n }}\n >\n {filteredItems.size === 0 ? noResultsText : children}\n </StyledContent>\n )\n})\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React, { useMemo } from 'react'\nimport { Group as AriakitGroup } from '@ariakit/react'\nimport type { ElementRef } from 'react'\nimport type { GroupProps as AriakitGroupProps } from '@ariakit/react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nexport type GroupProps = AriakitGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof AriakitGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, filteredItems } = useComboboxContext()\n\n const childValues = useMemo(\n // don't perform calculation if auto filter is disabled\n () => (autoFilter !== false ? getChildrenItemValues(children) : []),\n [children, autoFilter]\n )\n const hasVisibleChildren = useMemo(\n () =>\n // don't perform calculation if auto filter is disabled\n autoFilter !== false\n ? childValues.some(value => filteredItems.has(value))\n : true,\n [childValues, filteredItems, autoFilter]\n )\n\n if (!hasVisibleChildren) {\n return null\n }\n\n return (\n <AriakitGroup {...rest} ref={forwardRef}>\n {children}\n </AriakitGroup>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {\n padding: '$100',\n color: '$text-neutrals-subtle',\n fontSize: '$150',\n textTransform: 'uppercase',\n fontWeight: 650,\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n background: '$gray-100',\n color: '$gray-900',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n ...focus.css({\n boxShadow: '$focus-small-outline',\n borderColor: '$blue-400 !important',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeChipAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeChipAriaLabel}>\n <IconCross size='small' weight='thin' color='gray-500' />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Value: FC<ValueProps> = ({ removeChipAriaLabel }) => {\n const {\n value,\n setValue,\n disabled,\n 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const isEmpty = value === undefined || value.length === 0\n const isDisabled = ariaDisabled === true || disabled\n\n const onItemRemove = (item: string): void => {\n setValue(prevValue => prevValue.filter(value => value !== item))\n }\n\n if (isEmpty) {\n return null\n }\n\n return (\n <>\n {value.map(item => (\n <StyledValue\n key={item}\n onRemove={() => onItemRemove(item)}\n disabled={isDisabled}\n removeChipAriaLabel={removeChipAriaLabel}\n >\n {item}\n </StyledValue>\n ))}\n </>\n )\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(Primitive.div, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '$100 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSeparator } from './separator.styled'\nimport type { StyledSeparatorProps } from './separator.styled'\n\nexport interface SeparatorProps extends StyledSeparatorProps {}\n\nexport const Separator = React.forwardRef<\n ElementRef<typeof StyledSeparator>,\n SeparatorProps\n>((props, forwardRef) => (\n <StyledSeparator {...props} ref={forwardRef} aria-hidden />\n))\n","import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledComboboxContent = styled(Primitive.div, {})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent, ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Group } from './partials/group'\nimport { GroupLabel } from './partials/group-label'\nimport { Value } from './partials/value'\nimport { Separator } from './partials/separator'\nimport { StyledComboboxContent } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n // setSelectedValue from Ariakit.ComboboxProvider expects to accept a union string | string[], type cast is required to specify that it's a multi value\n onValueChange?.(newValue as string[])\n setValue(newValue as string[])\n }\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={setOpenState}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={setOpenState}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent {...restProps} ref={forwardRef} dir={direction}>\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n})\n\nexport const Combobox = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n {\n 'aria-disabled': ariaDisabled,\n defaultOpen = false,\n open,\n valid,\n disabled,\n readOnly,\n required,\n value,\n defaultValue,\n onSearchValueChange,\n onOpen,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onSearchValueChange={onSearchValueChange}\n defaultOpen={defaultOpen}\n open={open}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n autoFilter={autoFilter}\n noResultsText={noResultsText}\n >\n <Root\n {...restProps}\n noResultsText={noResultsText}\n value={value}\n ref={forwardRef}\n />\n </ComboboxProvider>\n )\n) as ForwardRefExoticComponent<ComboboxProps> & Partials\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n Separator: typeof Separator\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\nCombobox.Separator = Separator\n"],"names":["styled","Input","createContext","useRef","useState","useFormFieldContext","jsx","useContext","IconChevronDown","IconCross","useCallback","React","stringAttrValue","booleanishAttrValue","RadixPopover","mergeRefs","Combobox","jsxs","FloatingLabel","Primitive","ComboboxItem","focus","useAriaDisabled","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,EAEL,KAAO,EAAA;AAAA,IACL,MAAQ,EAAA,aAAA;AAAA,GACV;AAAA,EAEA,SAAW,EAAA;AAAA,IACT,QAAU,EAAA,MAAA;AAAA,IACV,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,IACV,WAAa,EAAA,MAAA;AAAA,GACf;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA;AAAA,QACL,SAAW,EAAA,KAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,OACX;AAAA,MACA,SAAW,EAAA;AAAA,QACT,SAAW,EAAA,KAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,OACX;AAAA,KACF;AAAA,GACF;AAAA,EAEA,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,OAAA;AAAA,GACR;AACF,CAAC,CAAA;;ACFD,MAAM,eAAA,GAAkBC,mBAAoC,CAAA,EAAS,CAAA,CAAA;AAE9D,MAAM,mBAAmB,CAA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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 { 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;AAAA,KACF;AAAA,GACF;AAAA,EAEA,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,OAAA;AAAA,GACR;AACF,CAAC,CAAA;;ACLD,MAAM,eAAA,GAAkBC,mBAAoC,CAAA,EAAS,CAAA,CAAA;AAE9D,MAAM,mBAAmB,CAAC;AAAA,EAC/B,QAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;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AAA;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;;;;;;;;;"}
|
package/dist/module.js
CHANGED
|
@@ -8,6 +8,7 @@ import { stringAttrValue, booleanishAttrValue, mergeRefs, booleanify } from '@mi
|
|
|
8
8
|
import { styled } from '@mirohq/design-system-stitches';
|
|
9
9
|
import { Input } from '@mirohq/design-system-input';
|
|
10
10
|
import { IconChevronDown, IconCross, IconCheckMark } from '@mirohq/design-system-icons';
|
|
11
|
+
import { mergeProps } from '@react-aria/utils';
|
|
11
12
|
import { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled';
|
|
12
13
|
import { focus } from '@mirohq/design-system-styles';
|
|
13
14
|
import { Primitive } from '@mirohq/design-system-primitive';
|
|
@@ -17,24 +18,29 @@ const StyledInput = styled(Input, {
|
|
|
17
18
|
flexWrap: "wrap",
|
|
18
19
|
flexGrow: 1,
|
|
19
20
|
gap: "0 $50",
|
|
20
|
-
"
|
|
21
|
-
|
|
21
|
+
overflowY: "scroll",
|
|
22
|
+
"&[data-valid], &[data-invalid]": {
|
|
23
|
+
// we don't need a bigger padding here as Input component will render its own icon
|
|
24
|
+
paddingRight: "$100"
|
|
22
25
|
},
|
|
23
26
|
"& input": {
|
|
24
|
-
minWidth: "
|
|
27
|
+
minWidth: "$8",
|
|
25
28
|
flexBasis: 0,
|
|
26
|
-
flexGrow: 1
|
|
27
|
-
marginRight: "$300"
|
|
29
|
+
flexGrow: 1
|
|
28
30
|
},
|
|
29
31
|
variants: {
|
|
30
32
|
size: {
|
|
31
33
|
large: {
|
|
32
34
|
minHeight: "$10",
|
|
33
|
-
|
|
35
|
+
height: "auto",
|
|
36
|
+
padding: "5px $100",
|
|
37
|
+
paddingRight: "$500"
|
|
34
38
|
},
|
|
35
39
|
"x-large": {
|
|
36
40
|
minHeight: "$12",
|
|
37
|
-
|
|
41
|
+
height: "auto",
|
|
42
|
+
padding: "5px $100",
|
|
43
|
+
paddingRight: "$500"
|
|
38
44
|
}
|
|
39
45
|
}
|
|
40
46
|
},
|
|
@@ -55,6 +61,7 @@ const ComboboxProvider = ({
|
|
|
55
61
|
...restProps
|
|
56
62
|
}) => {
|
|
57
63
|
const triggerRef = useRef(null);
|
|
64
|
+
const inputRef = useRef(null);
|
|
58
65
|
const contentRef = useRef(null);
|
|
59
66
|
const [openState, setOpenState] = useState(defaultOpen != null ? defaultOpen : false);
|
|
60
67
|
const [value, setValue] = useState(valueProp != null ? valueProp : []);
|
|
@@ -76,6 +83,7 @@ const ComboboxProvider = ({
|
|
|
76
83
|
defaultValue,
|
|
77
84
|
onSearchValueChange,
|
|
78
85
|
triggerRef,
|
|
86
|
+
inputRef,
|
|
79
87
|
contentRef,
|
|
80
88
|
autoFilter,
|
|
81
89
|
searchValue,
|
|
@@ -113,7 +121,7 @@ const TriggerActionButton = ({
|
|
|
113
121
|
size
|
|
114
122
|
}) => {
|
|
115
123
|
const { setOpenState, value, setValue } = useComboboxContext();
|
|
116
|
-
const isEmpty = value
|
|
124
|
+
const isEmpty = value.length === 0;
|
|
117
125
|
const ActionButtonIcon = isEmpty ? IconChevronDown : IconCross;
|
|
118
126
|
const label = isEmpty ? openActionLabel : clearActionLabel;
|
|
119
127
|
const onActionButtonClick = useCallback(
|
|
@@ -149,6 +157,7 @@ const Trigger = React.forwardRef(
|
|
|
149
157
|
disabled,
|
|
150
158
|
value,
|
|
151
159
|
triggerRef,
|
|
160
|
+
inputRef,
|
|
152
161
|
onSearchValueChange,
|
|
153
162
|
searchValue,
|
|
154
163
|
setSearchValue
|
|
@@ -175,41 +184,59 @@ const Trigger = React.forwardRef(
|
|
|
175
184
|
disabled,
|
|
176
185
|
invalid: booleanishAttrValue(valid),
|
|
177
186
|
id: id != null ? id : formElementId,
|
|
178
|
-
placeholder:
|
|
187
|
+
placeholder: value.length === 0 ? placeholder : void 0
|
|
179
188
|
};
|
|
180
189
|
const shouldUseFloatingLabel = label !== null && isFloatingLabel;
|
|
181
|
-
const isFloating = placeholder !== void 0 ||
|
|
190
|
+
const isFloating = placeholder !== void 0 || value.length !== 0 || focused;
|
|
191
|
+
const scrollIntoView = (event) => {
|
|
192
|
+
var _a;
|
|
193
|
+
const trigger = triggerRef == null ? void 0 : triggerRef.current;
|
|
194
|
+
const baseInput = (_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.parentElement;
|
|
195
|
+
if (baseInput != null && trigger != null) {
|
|
196
|
+
event.preventDefault();
|
|
197
|
+
baseInput.scrollTo({
|
|
198
|
+
top: trigger.scrollHeight
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
if (restProps.onFocus !== void 0) {
|
|
202
|
+
restProps.onFocus(event);
|
|
203
|
+
}
|
|
204
|
+
};
|
|
182
205
|
const onInputChange = (e) => {
|
|
183
206
|
setSearchValue(e.target.value);
|
|
184
207
|
onSearchValueChange == null ? void 0 : onSearchValueChange(e.target.value);
|
|
185
208
|
onChange == null ? void 0 : onChange(e);
|
|
186
209
|
};
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
210
|
+
return /* @__PURE__ */ jsxs(RadixPopover.Anchor, { ref: mergeRefs([triggerRef, forwardRef]), children: [
|
|
211
|
+
shouldUseFloatingLabel && /* @__PURE__ */ jsx(FloatingLabel, { floating: isFloating, size, children: label }),
|
|
212
|
+
/* @__PURE__ */ jsx(
|
|
213
|
+
Combobox$1,
|
|
214
|
+
{
|
|
215
|
+
render: /* @__PURE__ */ jsxs(
|
|
216
|
+
StyledInput,
|
|
217
|
+
{
|
|
218
|
+
...inputProps,
|
|
219
|
+
value: searchValue,
|
|
220
|
+
size,
|
|
221
|
+
ref: inputRef,
|
|
222
|
+
onChange: onInputChange,
|
|
223
|
+
onFocus: scrollIntoView,
|
|
224
|
+
children: [
|
|
225
|
+
children,
|
|
226
|
+
/* @__PURE__ */ jsx(
|
|
227
|
+
TriggerActionButton,
|
|
228
|
+
{
|
|
229
|
+
openActionLabel,
|
|
230
|
+
clearActionLabel,
|
|
231
|
+
size
|
|
232
|
+
}
|
|
233
|
+
)
|
|
234
|
+
]
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
}
|
|
238
|
+
)
|
|
239
|
+
] });
|
|
213
240
|
}
|
|
214
241
|
);
|
|
215
242
|
|
|
@@ -269,20 +296,31 @@ const StyledItem = styled(ComboboxItem, {
|
|
|
269
296
|
const Item = React.forwardRef(
|
|
270
297
|
({ disabled = false, value, textValue, children, ...restProps }, forwardRef) => {
|
|
271
298
|
const { "aria-disabled": ariaDisabled, ...restAriaDisabledProps } = useAriaDisabled(restProps, { allowArrows: true });
|
|
272
|
-
const { autoFilter, filteredItems } = useComboboxContext();
|
|
299
|
+
const { autoFilter, filteredItems, triggerRef, inputRef } = useComboboxContext();
|
|
273
300
|
if (autoFilter !== false && !filteredItems.has(value)) {
|
|
274
301
|
return null;
|
|
275
302
|
}
|
|
303
|
+
const scrollIntoView = (event) => {
|
|
304
|
+
var _a;
|
|
305
|
+
if (((_a = inputRef == null ? void 0 : inputRef.current) == null ? void 0 : _a.parentElement) != null && (triggerRef == null ? void 0 : triggerRef.current) != null) {
|
|
306
|
+
inputRef.current.parentElement.scrollTo({
|
|
307
|
+
top: triggerRef.current.scrollHeight
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
if (restProps.onClick !== void 0) {
|
|
311
|
+
restProps.onClick(event);
|
|
312
|
+
}
|
|
313
|
+
};
|
|
276
314
|
return /* @__PURE__ */ jsxs(
|
|
277
315
|
StyledItem,
|
|
278
316
|
{
|
|
279
|
-
...restProps,
|
|
280
|
-
...restAriaDisabledProps,
|
|
317
|
+
...mergeProps(restProps, restAriaDisabledProps),
|
|
281
318
|
focusable: true,
|
|
282
319
|
accessibleWhenDisabled: ariaDisabled === true,
|
|
283
320
|
disabled: ariaDisabled === true || disabled,
|
|
284
321
|
ref: forwardRef,
|
|
285
322
|
value,
|
|
323
|
+
onClick: scrollIntoView,
|
|
286
324
|
children: [
|
|
287
325
|
children,
|
|
288
326
|
/* @__PURE__ */ jsx(
|
|
@@ -449,12 +487,11 @@ const Value = ({ removeChipAriaLabel }) => {
|
|
|
449
487
|
disabled,
|
|
450
488
|
"aria-disabled": ariaDisabled
|
|
451
489
|
} = useComboboxContext();
|
|
452
|
-
const isEmpty = value === void 0 || value.length === 0;
|
|
453
490
|
const isDisabled = ariaDisabled === true || disabled;
|
|
454
491
|
const onItemRemove = (item) => {
|
|
455
492
|
setValue((prevValue) => prevValue.filter((value2) => value2 !== item));
|
|
456
493
|
};
|
|
457
|
-
if (
|
|
494
|
+
if (value.length === 0) {
|
|
458
495
|
return null;
|
|
459
496
|
}
|
|
460
497
|
return /* @__PURE__ */ jsx(Fragment, { children: value.map((item) => /* @__PURE__ */ jsx(
|
|
@@ -478,7 +515,9 @@ const StyledSeparator = styled(Primitive.div, {
|
|
|
478
515
|
|
|
479
516
|
const Separator = React.forwardRef((props, forwardRef) => /* @__PURE__ */ jsx(StyledSeparator, { ...props, ref: forwardRef, "aria-hidden": true }));
|
|
480
517
|
|
|
481
|
-
const StyledComboboxContent = styled(Primitive.div, {
|
|
518
|
+
const StyledComboboxContent = styled(Primitive.div, {
|
|
519
|
+
position: "relative"
|
|
520
|
+
});
|
|
482
521
|
|
|
483
522
|
const Root = React.forwardRef(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {
|
|
484
523
|
const {
|
package/dist/module.js.map
CHANGED
|
@@ -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.styled.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n\n '&&&': {\n height: 'max-content',\n },\n\n '& input': {\n minWidth: '30px',\n flexBasis: 0,\n flexGrow: 1,\n marginRight: '$300',\n },\n\n variants: {\n size: {\n large: {\n minHeight: '$10',\n padding: '5px $100',\n },\n 'x-large': {\n minHeight: '$12',\n padding: '9px $150',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n","import React, { createContext, useContext, useRef, useState } from 'react'\nimport type { PropsWithChildren, ReactNode } from 'react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport type { FormElementProps } from '@mirohq/design-system-base-form'\n\nimport type { Direction } from '../types'\n\ninterface ComboboxProps extends FormElementProps {\n open?: boolean\n defaultOpen?: boolean\n value?: string[]\n defaultValue?: string[]\n onSearchValueChange?: (value: string) => void\n direction?: Direction\n autoFilter?: boolean\n noResultsText?: ReactNode\n}\n\ninterface ComboboxContextProps extends ComboboxProps {\n setOpenState: React.Dispatch<React.SetStateAction<boolean>>\n openState: boolean\n setValue: React.Dispatch<React.SetStateAction<string[]>>\n setDefaultValue: React.Dispatch<React.SetStateAction<string[] | undefined>>\n triggerRef: React.RefObject<HTMLInputElement>\n contentRef: React.RefObject<HTMLDivElement>\n searchValue: string\n setSearchValue: React.Dispatch<React.SetStateAction<string>>\n filteredItems: Set<string>\n setFilteredItems: React.Dispatch<React.SetStateAction<Set<string>>>\n}\n\nexport type ComboboxProviderProps = ComboboxProps\n\nconst ComboboxContext = createContext<ComboboxContextProps>({} as any)\n\nexport const ComboboxProvider = ({\n children,\n defaultOpen,\n valid,\n value: valueProp,\n defaultValue: defaultValueProp,\n onSearchValueChange,\n autoFilter = true,\n ...restProps\n}: PropsWithChildren<ComboboxProviderProps>): JSX.Element => {\n const triggerRef = useRef<HTMLInputElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n const [openState, setOpenState] = useState(defaultOpen ?? false)\n const [value, setValue] = useState(valueProp ?? [])\n const [defaultValue, setDefaultValue] = useState(defaultValueProp)\n const [filteredItems, setFilteredItems] = useState(new Set<string>())\n const [searchValue, setSearchValue] = useState('')\n\n const { valid: formFieldValid } = useFormFieldContext()\n\n return (\n <ComboboxContext.Provider\n value={{\n ...restProps,\n valid: valid ?? formFieldValid,\n openState,\n setOpenState,\n value,\n setValue,\n setDefaultValue,\n defaultValue,\n onSearchValueChange,\n triggerRef,\n contentRef,\n autoFilter,\n searchValue,\n setSearchValue,\n filteredItems,\n setFilteredItems,\n }}\n >\n {children}\n </ComboboxContext.Provider>\n )\n}\n\nexport const useComboboxContext = (): ComboboxContextProps =>\n useContext(ComboboxContext)\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledActionButton = styled(Input.ActionButton, {\n position: 'absolute',\n right: '$100',\n\n variants: {\n size: {\n large: {\n top: '5px',\n },\n 'x-large': {\n top: '9px',\n },\n },\n },\n\n defaultVariants: {\n size: 'large',\n },\n})\n\nexport type StyledActionButtonProps = StrictComponentProps<\n typeof StyledActionButton\n>\n","import React, { useCallback } from 'react'\nimport { IconChevronDown, IconCross } from '@mirohq/design-system-icons'\n\nimport type { StyledActionButtonProps } from './trigger-action-button.styled'\nimport { StyledActionButton } from './trigger-action-button.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport type TriggerActionButtonProps = Omit<\n StyledActionButtonProps,\n 'label'\n> & {\n /**\n * The label text for Trigger's action button when Combobox is empty. Open/Close action will be performed.\n * Will be rendered in a Tooltip.\n */\n openActionLabel: string\n\n /**\n * The label text for Trigger's action button when Combobox has values selected. Clear Combobox values action\n * will be performed. Will be rendered in a Tooltip.\n */\n clearActionLabel: string\n}\n\nexport const TriggerActionButton: React.FC<TriggerActionButtonProps> = ({\n openActionLabel,\n clearActionLabel,\n size,\n}) => {\n const { setOpenState, value, setValue } = useComboboxContext()\n\n const isEmpty = value === undefined || value.length === 0\n\n const ActionButtonIcon = isEmpty ? IconChevronDown : IconCross\n const label = isEmpty ? openActionLabel : clearActionLabel\n\n const onActionButtonClick = useCallback(\n (event: React.MouseEvent<HTMLButtonElement>) => {\n if (!isEmpty) {\n setValue([])\n } else {\n setOpenState(prevOpen => !prevOpen)\n }\n\n event.stopPropagation()\n },\n [isEmpty, setValue, setOpenState]\n )\n\n return (\n <StyledActionButton label={label} size={size} onClick={onActionButtonClick}>\n <ActionButtonIcon size='small' weight='thin' />\n </StyledActionButton>\n )\n}\n","import React from 'react'\nimport type { ElementRef } from 'react'\nimport { Combobox } from '@ariakit/react'\nimport {\n booleanishAttrValue,\n mergeRefs,\n stringAttrValue,\n} from '@mirohq/design-system-utils'\nimport {\n FloatingLabel,\n useFormFieldContext,\n} from '@mirohq/design-system-base-form'\nimport type { Input, InputProps } from '@mirohq/design-system-input'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { StyledInput } from './trigger.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { TriggerActionButton } from './trigger-action-button'\nimport type { TriggerActionButtonProps } from './trigger-action-button'\n\nexport type TriggerProps = InputProps &\n Pick<TriggerActionButtonProps, 'openActionLabel' | 'clearActionLabel'> & {\n /**\n * The content.\n */\n children?: React.ReactNode\n\n /**\n * The size of the trigger.\n * @default 'large'\n */\n size?: InputProps['size']\n\n /**\n * The content that will be rendered inside the Combobox.Trigger when no value or\n * defaultValue is set.\n */\n placeholder?: string\n }\n\nexport const Trigger = React.forwardRef<ElementRef<typeof Input>, TriggerProps>(\n (\n {\n id,\n children,\n size = 'large',\n 'aria-describedby': ariaDescribedBy,\n 'aria-invalid': ariaInvalid,\n placeholder,\n openActionLabel,\n clearActionLabel,\n onChange,\n ...restProps\n },\n forwardRef\n ) => {\n const {\n 'aria-disabled': ariaDisabled,\n valid: comboboxValid,\n disabled,\n value,\n triggerRef,\n onSearchValueChange,\n searchValue,\n setSearchValue,\n } = useComboboxContext()\n\n const {\n formElementId,\n ariaDescribedBy: formFieldContextDescribedBy,\n ariaInvalid: formFieldAriaInvalid,\n valid: formFieldValid,\n label,\n isFloatingLabel,\n focused,\n } = useFormFieldContext()\n\n const valid = formFieldValid ?? comboboxValid\n\n const inputProps = {\n ...restProps,\n 'aria-disabled': ariaDisabled,\n 'aria-invalid': ariaInvalid ?? formFieldAriaInvalid,\n 'aria-describedby': stringAttrValue(\n ariaDescribedBy,\n formFieldContextDescribedBy\n ),\n valid,\n disabled,\n invalid: booleanishAttrValue(valid),\n id: id ?? formElementId,\n placeholder: value?.length === 0 ? placeholder : undefined,\n }\n\n const shouldUseFloatingLabel = label !== null && isFloatingLabel\n const isFloating =\n placeholder !== undefined || value?.length !== 0 || focused\n\n const onInputChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n setSearchValue(e.target.value)\n onSearchValueChange?.(e.target.value)\n onChange?.(e)\n }\n\n return (\n <RadixPopover.Anchor ref={mergeRefs([triggerRef, forwardRef])}>\n <Combobox\n render={\n <StyledInput\n value={searchValue}\n onChange={onInputChange}\n {...inputProps}\n size={size}\n >\n {shouldUseFloatingLabel && (\n <FloatingLabel floating={isFloating} size={size}>\n {label}\n </FloatingLabel>\n )}\n {children}\n <TriggerActionButton\n openActionLabel={openActionLabel}\n clearActionLabel={clearActionLabel}\n size={size}\n />\n </StyledInput>\n }\n />\n </RadixPopover.Anchor>\n )\n }\n)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nexport const StyledContent = styled(RadixPopover.Content, {\n backgroundColor: '$background-neutrals-container',\n borderRadius: '$50',\n boxShadow: '$50',\n fontSize: '$175',\n fontWeight: 'normal',\n lineHeight: '1.5',\n width: 'var(--radix-popover-trigger-width)',\n zIndex: '$select',\n overflowY: 'auto',\n marginTop: '$200',\n padding: '$150',\n boxSizing: 'border-box',\n outline: '1px solid transparent',\n})\n\nexport type StyledContentProps = StrictComponentProps<typeof StyledContent>\n","import { ComboboxItem } from '@ariakit/react'\nimport { focus } from '@mirohq/design-system-styles'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledItemCheck = styled(Primitive.span, {\n color: '$icon-primary',\n paddingX: '$100',\n})\n\nexport const StyledItem = styled(ComboboxItem, {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: '$200',\n borderRadius: '$50',\n boxSizing: 'border-box',\n color: '$text-neutrals',\n cursor: 'pointer',\n fontSize: '$175',\n lineHeight: 1.5,\n position: 'relative',\n userSelect: 'none',\n paddingX: '$100',\n paddingY: '10px',\n\n ...focus.css({\n boxShadow: '$focus-small',\n }),\n\n '&:not([aria-disabled=\"true\"])': {\n _hover: {\n background: '$background-primary-subtle-hover',\n color: '$text-primary-hover',\n\n [`${StyledItemCheck}`]: {\n color: '$icon-primary-hover',\n },\n },\n },\n\n '&:disabled, &[aria-disabled=true], &[data-disabled]': {\n cursor: 'default',\n color: '$text-neutrals-disabled',\n },\n})\n\nexport type StyledItemProps = StrictComponentProps<typeof StyledItem>\n","import React from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { ComboboxItemCheck as AriakitComboboxItemCheck } from '@ariakit/react'\nimport { useAriaDisabled } from '@mirohq/design-system-use-aria-disabled'\nimport { IconCheckMark } from '@mirohq/design-system-icons'\n\nimport { StyledItem, StyledItemCheck } from './item.styled'\nimport type { StyledItemProps } from './item.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\n\nexport interface ItemProps extends StyledItemProps {\n /**\n * The value given as data when submitted with a name.\n */\n value: string\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Optional text used for typeahead purposes. By default the typeahead\n * behavior will use the Combobox's item text. Use this when the content is\n * complex, or you have non-textual content inside.\n */\n textValue?: string\n\n /**\n * Item's content.\n */\n children?: ReactNode\n}\n\nexport const Item = React.forwardRef<ElementRef<typeof StyledItem>, ItemProps>(\n (\n { disabled = false, value, textValue, children, ...restProps },\n forwardRef\n ) => {\n const { 'aria-disabled': ariaDisabled, ...restAriaDisabledProps } =\n useAriaDisabled(restProps, { allowArrows: true })\n const { autoFilter, filteredItems } = useComboboxContext()\n\n if (autoFilter !== false && !filteredItems.has(value)) {\n return null\n }\n\n return (\n <StyledItem\n {...restProps}\n {...restAriaDisabledProps}\n focusable\n accessibleWhenDisabled={ariaDisabled === true}\n disabled={ariaDisabled === true || disabled}\n ref={forwardRef}\n value={value}\n >\n {children}\n <AriakitComboboxItemCheck\n render={({ style, ...props }) => (\n // AriakitComboboxItemCheck adds its owm inline styles which we want to omit here\n <StyledItemCheck {...props} />\n )}\n >\n <IconCheckMark size='small' />\n </AriakitComboboxItemCheck>\n </StyledItem>\n )\n }\n)\n","import React from 'react'\nimport type { ReactNode } from 'react'\n\nimport { Item } from './partials/item'\nimport type { ItemProps } from './partials/item'\n\nconst itemType = React.createElement(Item).type\n\nexport const getChildrenItemValues = (\n componentChildren: ReactNode\n): string[] => {\n const values: string[] = []\n\n const recurse = (children: ReactNode): void => {\n React.Children.forEach(children, child => {\n if (!React.isValidElement(child)) {\n return\n }\n\n if (child.type === itemType) {\n const props = child.props as ItemProps\n\n values.push(props.value)\n\n return\n }\n\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n if (child.props.children) {\n recurse(child.props.children)\n }\n })\n }\n\n recurse(componentChildren)\n\n return values\n}\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ReactNode } from 'react'\nimport { mergeRefs } from '@mirohq/design-system-utils'\n\nimport { StyledContent } from './content.styled'\nimport type { StyledContentProps } from './content.styled'\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nconst isInsideRef = (\n element: Element | null,\n ref: React.RefObject<Element>\n): boolean => (element != null && ref.current?.contains(element)) ?? false\n\nexport interface ContentProps extends StyledContentProps {\n /**\n * Combobox's content.\n */\n children?: ReactNode\n}\n\nexport const Content = React.forwardRef<\n ElementRef<typeof StyledContent>,\n ContentProps\n>(({ children, ...restProps }, forwardRef) => {\n const {\n triggerRef,\n contentRef,\n autoFilter,\n filteredItems,\n setFilteredItems,\n searchValue,\n noResultsText,\n } = useComboboxContext()\n\n useEffect(() => {\n const childrenItemValues = getChildrenItemValues(children)\n\n setFilteredItems(\n new Set(\n autoFilter === false\n ? childrenItemValues\n : childrenItemValues.filter(child =>\n child.toLowerCase().includes(searchValue.toLowerCase())\n )\n )\n )\n }, [children, autoFilter, setFilteredItems, searchValue])\n\n return (\n <StyledContent\n {...restProps}\n ref={mergeRefs([forwardRef, contentRef])}\n onOpenAutoFocus={event => event.preventDefault()}\n onInteractOutside={event => {\n const target = event.target as Element | null\n const isTrigger = isInsideRef(target, triggerRef)\n const isContent = isInsideRef(target, contentRef)\n\n if (isTrigger || isContent) {\n event.preventDefault()\n }\n }}\n >\n {filteredItems.size === 0 ? noResultsText : children}\n </StyledContent>\n )\n})\n","import React from 'react'\nimport type { PopoverPortalProps } from '@radix-ui/react-popover'\nimport { Portal as RadixPortal } from '@radix-ui/react-popover'\n\nexport interface PortalProps extends PopoverPortalProps {\n /**\n * Specify a container element to portal the content into.\n */\n container?: HTMLElement | null\n}\n\nexport const Portal: React.FC<PortalProps> = props => <RadixPortal {...props} />\n","import React, { useMemo } from 'react'\nimport { Group as AriakitGroup } from '@ariakit/react'\nimport type { ElementRef } from 'react'\nimport type { GroupProps as AriakitGroupProps } from '@ariakit/react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { getChildrenItemValues } from '../util'\n\nexport type GroupProps = AriakitGroupProps\n\nexport const Group = React.forwardRef<\n ElementRef<typeof AriakitGroup>,\n GroupProps\n>(({ children, ...rest }, forwardRef) => {\n const { autoFilter, filteredItems } = useComboboxContext()\n\n const childValues = useMemo(\n // don't perform calculation if auto filter is disabled\n () => (autoFilter !== false ? getChildrenItemValues(children) : []),\n [children, autoFilter]\n )\n const hasVisibleChildren = useMemo(\n () =>\n // don't perform calculation if auto filter is disabled\n autoFilter !== false\n ? childValues.some(value => filteredItems.has(value))\n : true,\n [childValues, filteredItems, autoFilter]\n )\n\n if (!hasVisibleChildren) {\n return null\n }\n\n return (\n <AriakitGroup {...rest} ref={forwardRef}>\n {children}\n </AriakitGroup>\n )\n})\n","import { GroupLabel } from '@ariakit/react'\nimport { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledGroupLabel = styled(GroupLabel, {\n padding: '$100',\n color: '$text-neutrals-subtle',\n fontSize: '$150',\n textTransform: 'uppercase',\n fontWeight: 650,\n})\n\nexport type StyledGroupLabelProps = StrictComponentProps<\n typeof StyledGroupLabel\n>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledGroupLabel } from './group-label.styled'\nimport type { StyledGroupLabelProps } from './group-label.styled'\n\nexport interface GroupLabelProps extends StyledGroupLabelProps {}\n\nexport const GroupLabel = React.forwardRef<\n ElementRef<typeof StyledGroupLabel>,\n GroupLabelProps\n>((props, forwardRef) => <StyledGroupLabel {...props} ref={forwardRef} />)\n","import { styled } from '@mirohq/design-system-stitches'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { BaseButton } from '@mirohq/design-system-base-button'\nimport { focus } from '@mirohq/design-system-styles'\n\nexport const StyledChip = styled(Primitive.div, {\n fontSize: '$150',\n padding: '$50 $100',\n borderRadius: '$round',\n display: 'flex',\n alignItems: 'center',\n gap: '$50',\n whiteSpace: 'nowrap',\n maxWidth: '$35',\n background: '$gray-100',\n color: '$gray-900',\n})\n\nexport const StyledChipButton = styled(BaseButton, {\n ...focus.css({\n boxShadow: '$focus-small-outline',\n borderColor: '$blue-400 !important',\n }),\n})\n\nexport const StyledChipContent = styled(Primitive.div, {\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n lineHeight: 1.3,\n})\n\nexport type StyledChipProps = StrictComponentProps<typeof StyledChip>\n","import type { StrictComponentProps } from '@mirohq/design-system-stitches'\nimport { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\n\nexport const StyledLeftSlot = styled(Primitive.span, {\n order: -1,\n marginRight: '$50',\n})\n\nexport type StyledLeftSlotProps = StrictComponentProps<typeof StyledLeftSlot>\n","import type { StyledLeftSlotProps } from './left-icon.styled'\nimport { StyledLeftSlot } from './left-icon.styled'\n\nexport interface LeftSlotProps extends StyledLeftSlotProps {}\n\nexport const LeftSlot = StyledLeftSlot\n","import React from 'react'\nimport type { ElementRef, ForwardRefExoticComponent } from 'react'\nimport { IconCross } from '@mirohq/design-system-icons'\nimport { booleanify } from '@mirohq/design-system-utils'\n\nimport { StyledChip, StyledChipContent, StyledChipButton } from './chip.styled'\nimport type { StyledChipProps } from './chip.styled'\nimport { LeftSlot } from './left-slot'\n\nexport type ChipProps = StyledChipProps & {\n /**\n * Event handler called when the chip's remove button is clicked.\n */\n onRemove?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void\n\n /**\n * When true, prevents the user from interacting with the item.\n * @default false\n */\n disabled?: boolean\n\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Chip = React.forwardRef<ElementRef<typeof StyledChip>, ChipProps>(\n (\n { children, disabled = false, onRemove, removeChipAriaLabel, ...restProps },\n forwardRef\n ) => (\n <StyledChip {...restProps} ref={forwardRef}>\n <StyledChipContent>{children}</StyledChipContent>\n {!booleanify(disabled) && (\n <StyledChipButton onClick={onRemove} aria-label={removeChipAriaLabel}>\n <IconCross size='small' weight='thin' color='gray-500' />\n </StyledChipButton>\n )}\n </StyledChip>\n )\n) as ForwardRefExoticComponent<ChipProps> & Partials\n\nexport interface Partials {\n LeftSlot: typeof LeftSlot\n}\n\nChip.LeftSlot = LeftSlot\n","import { styled } from '@mirohq/design-system-stitches'\n\nimport { Chip } from '../chip'\n\nexport const StyledValue = styled(Chip, {\n marginTop: '$50',\n})\n","import type { FC } from 'react'\nimport React from 'react'\n\nimport { useComboboxContext } from '../hooks/use-combobox-context'\nimport { StyledValue } from './value.styled'\n\nexport interface ValueProps {\n /**\n * Remove chip label used to make the button recognizable by the screen readers.\n */\n removeChipAriaLabel?: string\n}\n\nexport const Value: FC<ValueProps> = ({ removeChipAriaLabel }) => {\n const {\n value,\n setValue,\n disabled,\n 'aria-disabled': ariaDisabled,\n } = useComboboxContext()\n const isEmpty = value === undefined || value.length === 0\n const isDisabled = ariaDisabled === true || disabled\n\n const onItemRemove = (item: string): void => {\n setValue(prevValue => prevValue.filter(value => value !== item))\n }\n\n if (isEmpty) {\n return null\n }\n\n return (\n <>\n {value.map(item => (\n <StyledValue\n key={item}\n onRemove={() => onItemRemove(item)}\n disabled={isDisabled}\n removeChipAriaLabel={removeChipAriaLabel}\n >\n {item}\n </StyledValue>\n ))}\n </>\n )\n}\n","import { styled } from '@mirohq/design-system-stitches'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport type { StrictComponentProps } from '@mirohq/design-system-stitches'\n\nexport const StyledSeparator = styled(Primitive.div, {\n backgroundColor: '$border-neutrals-subtle',\n height: '1px',\n width: '100%',\n margin: '$100 0',\n})\n\nexport type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>\n","import React from 'react'\nimport type { ElementRef } from 'react'\n\nimport { StyledSeparator } from './separator.styled'\nimport type { StyledSeparatorProps } from './separator.styled'\n\nexport interface SeparatorProps extends StyledSeparatorProps {}\n\nexport const Separator = React.forwardRef<\n ElementRef<typeof StyledSeparator>,\n SeparatorProps\n>((props, forwardRef) => (\n <StyledSeparator {...props} ref={forwardRef} aria-hidden />\n))\n","import type { ComponentPropsWithRef } from 'react'\nimport { Primitive } from '@mirohq/design-system-primitive'\nimport { styled } from '@mirohq/design-system-stitches'\n\nexport const StyledComboboxContent = styled(Primitive.div, {})\n\nexport type StyledComboboxProps = ComponentPropsWithRef<\n typeof StyledComboboxContent\n>\n","import React, { useEffect } from 'react'\nimport type { ElementRef, ForwardRefExoticComponent, ReactNode } from 'react'\nimport { ComboboxProvider as AriakitComboboxProvider } from '@ariakit/react'\nimport { useFormFieldContext } from '@mirohq/design-system-base-form'\nimport * as RadixPopover from '@radix-ui/react-popover'\n\nimport { Trigger } from './partials/trigger'\nimport { Content } from './partials/content'\nimport { Item } from './partials/item'\nimport { Portal } from './partials/portal'\nimport { Group } from './partials/group'\nimport { GroupLabel } from './partials/group-label'\nimport { Value } from './partials/value'\nimport { Separator } from './partials/separator'\nimport { StyledComboboxContent } from './combobox.styled'\nimport {\n ComboboxProvider,\n useComboboxContext,\n} from './hooks/use-combobox-context'\nimport type { ComboboxProviderProps } from './hooks/use-combobox-context'\nimport type { Direction } from './types'\n\nexport interface ComboboxProps extends ComboboxProviderProps {\n /**\n * The value of the combobox when initially rendered. Use when you do not need\n * to control the state of the combobox.\n */\n defaultValue?: string[]\n\n /**\n * The controlled value of the combobox. Should be used in conjunction with\n * onValueChange.\n */\n value?: string[]\n\n /**\n * Event handler called when the value changes.\n */\n onValueChange?: (value: string[]) => void\n\n /**\n * Event handler called when the trigger input value changes.\n */\n onSearchValueChange?: (value: string) => void\n\n /**\n * The open state of the combobox when it is initially rendered. Use when you do\n * not need to control its open state.\n * @default false\n */\n defaultOpen?: boolean\n\n /**\n * The controlled open state of the combobox. Must be used in conjunction with\n * onOpen and onClose.\n */\n open?: boolean\n\n /**\n * Event handler called when the combobox opens.\n */\n onOpen?: () => void\n\n /**\n * Event handler called when the combobox closes.\n */\n onClose?: () => void\n\n /**\n * The reading direction of the combobox when applicable. If omitted, inherits\n * globally from DirectionProvider or assumes LTR (left-to-right) reading\n * mode.\n * @default 'ltr'\n */\n direction?: Direction\n\n /**\n * The content of the combobox\n */\n children?: React.ReactNode\n\n /**\n * Enables/disabled automatic filtering.\n * @default true\n */\n autoFilter?: boolean\n\n /**\n * Text that is displayed when there are no items to display.\n */\n noResultsText: ReactNode\n}\n\nconst Root = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(({ value: valueProp, onValueChange, children, ...restProps }, forwardRef) => {\n const {\n openState,\n setOpenState,\n defaultValue,\n value,\n setValue,\n required,\n readOnly,\n 'aria-disabled': ariaDisabled,\n disabled,\n direction,\n } = useComboboxContext()\n\n const { setRequired, setDisabled, setAriaDisabled, setReadOnly } =\n useFormFieldContext()\n\n useEffect(() => {\n setRequired?.(required)\n setDisabled?.(disabled)\n setAriaDisabled?.(ariaDisabled)\n setReadOnly?.(readOnly)\n }, [\n readOnly,\n disabled,\n ariaDisabled,\n required,\n setRequired,\n setDisabled,\n setAriaDisabled,\n setReadOnly,\n ])\n\n const onSetSelectedValue = (newValue: string | string[]): void => {\n // setSelectedValue from Ariakit.ComboboxProvider expects to accept a union string | string[], type cast is required to specify that it's a multi value\n onValueChange?.(newValue as string[])\n setValue(newValue as string[])\n }\n\n return (\n <RadixPopover.Root open={openState} onOpenChange={setOpenState}>\n <AriakitComboboxProvider\n open={openState}\n setOpen={setOpenState}\n defaultSelectedValue={defaultValue}\n selectedValue={value}\n setSelectedValue={onSetSelectedValue}\n >\n <StyledComboboxContent {...restProps} ref={forwardRef} dir={direction}>\n {children}\n </StyledComboboxContent>\n </AriakitComboboxProvider>\n </RadixPopover.Root>\n )\n})\n\nexport const Combobox = React.forwardRef<\n ElementRef<typeof StyledComboboxContent>,\n ComboboxProps\n>(\n (\n {\n 'aria-disabled': ariaDisabled,\n defaultOpen = false,\n open,\n valid,\n disabled,\n readOnly,\n required,\n value,\n defaultValue,\n onSearchValueChange,\n onOpen,\n onValueChange,\n direction = 'ltr',\n autoFilter = true,\n noResultsText,\n ...restProps\n },\n forwardRef\n ) => (\n <ComboboxProvider\n defaultValue={defaultValue}\n value={value}\n onSearchValueChange={onSearchValueChange}\n defaultOpen={defaultOpen}\n open={open}\n valid={valid}\n required={required}\n disabled={disabled}\n readOnly={readOnly}\n aria-disabled={ariaDisabled}\n direction={direction}\n autoFilter={autoFilter}\n noResultsText={noResultsText}\n >\n <Root\n {...restProps}\n noResultsText={noResultsText}\n value={value}\n ref={forwardRef}\n />\n </ComboboxProvider>\n )\n) as ForwardRefExoticComponent<ComboboxProps> & Partials\n\nexport interface Partials {\n Portal: typeof Portal\n Trigger: typeof Trigger\n Content: typeof Content\n Item: typeof Item\n Group: typeof Group\n GroupLabel: typeof GroupLabel\n Value: typeof Value\n Separator: typeof Separator\n}\n\nCombobox.Portal = Portal\nCombobox.Trigger = Trigger\nCombobox.Content = Content\nCombobox.Item = Item\nCombobox.Group = Group\nCombobox.GroupLabel = GroupLabel\nCombobox.Value = Value\nCombobox.Separator = Separator\n"],"names":["Combobox","AriakitComboboxItemCheck","RadixPortal","AriakitGroup","GroupLabel","value","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;AAGa,MAAA,WAAA,GAAc,OAAO,KAAO,EAAA;AAAA,EACvC,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,CAAA;AAAA,EACV,GAAK,EAAA,OAAA;AAAA,EAEL,KAAO,EAAA;AAAA,IACL,MAAQ,EAAA,aAAA;AAAA,GACV;AAAA,EAEA,SAAW,EAAA;AAAA,IACT,QAAU,EAAA,MAAA;AAAA,IACV,SAAW,EAAA,CAAA;AAAA,IACX,QAAU,EAAA,CAAA;AAAA,IACV,WAAa,EAAA,MAAA;AAAA,GACf;AAAA,EAEA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA;AAAA,MACJ,KAAO,EAAA;AAAA,QACL,SAAW,EAAA,KAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,OACX;AAAA,MACA,SAAW,EAAA;AAAA,QACT,SAAW,EAAA,KAAA;AAAA,QACX,OAAS,EAAA,UAAA;AAAA,OACX;AAAA,KACF;AAAA,GACF;AAAA,EAEA,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA,OAAA;AAAA,GACR;AACF,CAAC,CAAA;;ACFD,MAAM,eAAA,GAAkB,aAAoC,CAAA,EAAS,CAAA,CAAA;AAE9D,MAAM,mBAAmB,CAAC;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AEA,QAAA,kBAAA,GAAA;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":"module.js","sources":["../src/partials/trigger.styled.tsx","../src/hooks/use-combobox-context.tsx","../src/partials/trigger-action-button.styled.tsx","../src/partials/trigger-action-button.tsx","../src/partials/trigger.tsx","../src/partials/content.styled.tsx","../src/partials/item.styled.tsx","../src/partials/item.tsx","../src/util.ts","../src/partials/content.tsx","../src/partials/portal.tsx","../src/partials/group.tsx","../src/partials/group-label.styled.tsx","../src/partials/group-label.tsx","../src/chip/chip.styled.tsx","../src/chip/left-icon.styled.tsx","../src/chip/left-slot.tsx","../src/chip/chip.tsx","../src/partials/value.styled.tsx","../src/partials/value.tsx","../src/partials/separator.styled.tsx","../src/partials/separator.tsx","../src/combobox.styled.tsx","../src/combobox.tsx"],"sourcesContent":["import { styled } from '@mirohq/design-system-stitches'\nimport { Input } from '@mirohq/design-system-input'\n\nexport const StyledInput = styled(Input, {\n flexWrap: 'wrap',\n flexGrow: 1,\n gap: '0 $50',\n 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":["Combobox","AriakitComboboxItemCheck","RadixPortal","AriakitGroup","GroupLabel","value","AriakitComboboxProvider"],"mappings":";;;;;;;;;;;;;;;;AAGa,MAAA,WAAA,GAAc,OAAO,KAAO,EAAA;AAAA,EACvC,QAAU,EAAA,MAAA;AAAA,EACV,QAAU,EAAA,CAAA;AAAA,EACV,GAAK,EAAA,OAAA;AAAA,EACL,SAAW,EAAA,QAAA;AAA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UAAA,CAAA;AACtB,QAAA,CAAS,KAAQ,GAAA,KAAA,CAAA;AACjB,QAAA,CAAS,SAAY,GAAA,SAAA;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-combobox",
|
|
3
|
-
"version": "0.1.0-combobox.
|
|
3
|
+
"version": "0.1.0-combobox.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -29,15 +29,16 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ariakit/react": "0.4.5",
|
|
31
31
|
"@radix-ui/react-popover": "^1.0.7",
|
|
32
|
+
"@react-aria/utils": "^3.13.0",
|
|
32
33
|
"@mirohq/design-system-base-button": "^0.4.40",
|
|
33
34
|
"@mirohq/design-system-base-form": "^0.2.5",
|
|
34
35
|
"@mirohq/design-system-form": "^0.1.8",
|
|
35
|
-
"@mirohq/design-system-input": "^0.1.18-combobox.1",
|
|
36
|
-
"@mirohq/design-system-primitive": "^1.1.2",
|
|
37
36
|
"@mirohq/design-system-icons": "^0.40.1-combobox.0",
|
|
38
|
-
"@mirohq/design-system-
|
|
37
|
+
"@mirohq/design-system-input": "^0.1.18-combobox.2",
|
|
38
|
+
"@mirohq/design-system-primitive": "^1.1.2",
|
|
39
39
|
"@mirohq/design-system-stitches": "^2.6.4",
|
|
40
40
|
"@mirohq/design-system-use-aria-disabled": "^0.1.1-combobox.0",
|
|
41
|
+
"@mirohq/design-system-styles": "^1.2.4-combobox.0",
|
|
41
42
|
"@mirohq/design-system-utils": "^0.15.0"
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|