@mirohq/design-system-combobox 1.5.39-reactdismissablelayer.0 → 1.6.0-filter-chip.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +77 -47
- package/dist/main.js.map +1 -1
- package/dist/module.js +77 -47
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +59 -36
- package/package.json +16 -13
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { ReactNode, FC, ComponentPropsWithRef, ComponentProps, ForwardRefExoticComponent } from 'react';
|
|
3
3
|
import { FormElementProps } from '@mirohq/design-system-base-form';
|
|
4
4
|
import * as _mirohq_design_system_base_input from '@mirohq/design-system-base-input';
|
|
5
5
|
import { BaseInputStyledProps, BaseInputProps } from '@mirohq/design-system-base-input';
|
|
@@ -11,6 +11,7 @@ import { PopoverPortalProps } from '@radix-ui/react-popover';
|
|
|
11
11
|
import * as _ariakit_react from '@ariakit/react';
|
|
12
12
|
import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';
|
|
13
13
|
import * as _mirohq_design_system_input from '@mirohq/design-system-input';
|
|
14
|
+
import { InputSearch } from '@mirohq/design-system-input';
|
|
14
15
|
import * as _mirohq_design_system_components_internal_base_input from '@mirohq/design-system-base-input';
|
|
15
16
|
|
|
16
17
|
type InputProps = Omit<BaseInputStyledProps, 'size'> & {
|
|
@@ -46,7 +47,7 @@ type InputProps = Omit<BaseInputStyledProps, 'size'> & {
|
|
|
46
47
|
*/
|
|
47
48
|
clearActionLabel: string;
|
|
48
49
|
});
|
|
49
|
-
declare const Input:
|
|
50
|
+
declare const Input: React__default.ForwardRefExoticComponent<InputProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
50
51
|
|
|
51
52
|
interface TriggerAsChildProps {
|
|
52
53
|
/**
|
|
@@ -56,7 +57,7 @@ interface TriggerAsChildProps {
|
|
|
56
57
|
/**
|
|
57
58
|
* The content that will be rendered inside the Combobox.Trigger in stead of the Combobox.Input, when asChild is true.
|
|
58
59
|
*/
|
|
59
|
-
children:
|
|
60
|
+
children: React__default.ReactNode;
|
|
60
61
|
}
|
|
61
62
|
type TriggerDefaultProps = InputProps & {
|
|
62
63
|
/**
|
|
@@ -65,7 +66,7 @@ type TriggerDefaultProps = InputProps & {
|
|
|
65
66
|
asChild?: false;
|
|
66
67
|
};
|
|
67
68
|
type TriggerProps = TriggerAsChildProps | TriggerDefaultProps;
|
|
68
|
-
declare const Trigger:
|
|
69
|
+
declare const Trigger: React__default.ForwardRefExoticComponent<TriggerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
69
70
|
|
|
70
71
|
/* Utilities */
|
|
71
72
|
/* ========================================================================== */
|
|
@@ -87,7 +88,7 @@ type TransformProps<Props, Media> = {
|
|
|
87
88
|
)
|
|
88
89
|
}
|
|
89
90
|
|
|
90
|
-
declare const StyledContent:
|
|
91
|
+
declare const StyledContent: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<RadixPopover.PopoverContentProps & React.RefAttributes<HTMLDivElement>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<RadixPopover.PopoverContentProps & React.RefAttributes<HTMLDivElement>>, {}, {}>;
|
|
91
92
|
type StyledContentProps = StrictComponentProps<typeof StyledContent>;
|
|
92
93
|
|
|
93
94
|
type PointerDownOutsideEvent = CustomEvent<{
|
|
@@ -202,9 +203,9 @@ interface ContentProps extends StyledContentProps {
|
|
|
202
203
|
*/
|
|
203
204
|
overflow?: Overflow;
|
|
204
205
|
}
|
|
205
|
-
declare const Content:
|
|
206
|
+
declare const Content: React__default.ForwardRefExoticComponent<Omit<ContentProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
206
207
|
|
|
207
|
-
declare const StyledItem:
|
|
208
|
+
declare const StyledItem: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.ComboboxItemProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<(props: _ariakit_react.ComboboxItemProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>, {}, {}>;
|
|
208
209
|
type StyledItemProps = StrictComponentProps<typeof StyledItem>;
|
|
209
210
|
|
|
210
211
|
interface ItemProps extends StyledItemProps {
|
|
@@ -228,7 +229,7 @@ interface ItemProps extends StyledItemProps {
|
|
|
228
229
|
*/
|
|
229
230
|
children?: ReactNode;
|
|
230
231
|
}
|
|
231
|
-
declare const Item:
|
|
232
|
+
declare const Item: React__default.ForwardRefExoticComponent<Omit<ItemProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
232
233
|
|
|
233
234
|
interface PortalProps extends PopoverPortalProps {
|
|
234
235
|
/**
|
|
@@ -236,20 +237,20 @@ interface PortalProps extends PopoverPortalProps {
|
|
|
236
237
|
*/
|
|
237
238
|
container?: HTMLElement | null;
|
|
238
239
|
}
|
|
239
|
-
declare const Portal: ({ forceMount: forceMountProp, ...restProps }: PortalProps) =>
|
|
240
|
+
declare const Portal: ({ forceMount: forceMountProp, ...restProps }: PortalProps) => React__default.ReactNode;
|
|
240
241
|
|
|
241
|
-
declare const StyledGroup:
|
|
242
|
+
declare const StyledGroup: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.GroupProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<(props: _ariakit_react.GroupProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>, {}, {}>;
|
|
242
243
|
type StyledGroupProps = StrictComponentProps<typeof StyledGroup>;
|
|
243
244
|
|
|
244
245
|
type GroupProps = StyledGroupProps;
|
|
245
|
-
declare const Group:
|
|
246
|
+
declare const Group: React__default.ForwardRefExoticComponent<Omit<StyledGroupProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
246
247
|
|
|
247
|
-
declare const StyledGroupLabel:
|
|
248
|
+
declare const StyledGroupLabel: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.GroupLabelProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<(props: _ariakit_react.GroupLabelProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>, {}, {}>;
|
|
248
249
|
type StyledGroupLabelProps = StrictComponentProps<typeof StyledGroupLabel>;
|
|
249
250
|
|
|
250
251
|
interface GroupLabelProps extends StyledGroupLabelProps {
|
|
251
252
|
}
|
|
252
|
-
declare const GroupLabel:
|
|
253
|
+
declare const GroupLabel: React__default.ForwardRefExoticComponent<Omit<GroupLabelProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
253
254
|
|
|
254
255
|
interface ValueProps {
|
|
255
256
|
/**
|
|
@@ -264,17 +265,17 @@ interface ValueProps {
|
|
|
264
265
|
}
|
|
265
266
|
declare const Value: FC<ValueProps>;
|
|
266
267
|
|
|
267
|
-
declare const StyledSeparator:
|
|
268
|
+
declare const StyledSeparator: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
268
269
|
type StyledSeparatorProps = StrictComponentProps<typeof StyledSeparator>;
|
|
269
270
|
|
|
270
271
|
interface SeparatorProps extends StyledSeparatorProps {
|
|
271
272
|
}
|
|
272
|
-
declare const Separator:
|
|
273
|
+
declare const Separator: React__default.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
273
274
|
|
|
274
|
-
declare const StyledComboboxContent:
|
|
275
|
+
declare const StyledComboboxContent: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
275
276
|
type StyledComboboxProps = ComponentPropsWithRef<typeof StyledComboboxContent>;
|
|
276
277
|
|
|
277
|
-
declare const StyledNoResult:
|
|
278
|
+
declare const StyledNoResult: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"div">>, {}, {}>;
|
|
278
279
|
type StyledNoResultProps = StrictComponentProps<typeof StyledNoResult>;
|
|
279
280
|
|
|
280
281
|
interface NoResultProps extends StyledNoResultProps {
|
|
@@ -283,13 +284,35 @@ interface NoResultProps extends StyledNoResultProps {
|
|
|
283
284
|
*/
|
|
284
285
|
children?: ReactNode;
|
|
285
286
|
}
|
|
286
|
-
declare const NoResult:
|
|
287
|
+
declare const NoResult: React__default.ForwardRefExoticComponent<Omit<NoResultProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
287
288
|
|
|
288
|
-
|
|
289
|
+
type SearchInputProps = React__default.ComponentProps<typeof InputSearch> & {
|
|
290
|
+
/**
|
|
291
|
+
* Lay selected chips out inside the field. Pass the selected
|
|
292
|
+
* `<Combobox.Value />` chips as children.
|
|
293
|
+
* @default false
|
|
294
|
+
*/
|
|
295
|
+
inlineChips?: boolean;
|
|
296
|
+
};
|
|
297
|
+
declare const SearchInput: React__default.ForwardRefExoticComponent<(Omit<_mirohq_design_system_components_internal_base_input.BaseInputSharedProps & {
|
|
289
298
|
clearable?: never;
|
|
290
|
-
} &
|
|
299
|
+
} & React__default.RefAttributes<HTMLInputElement> & {
|
|
300
|
+
/**
|
|
301
|
+
* Lay selected chips out inside the field. Pass the selected
|
|
302
|
+
* `<Combobox.Value />` chips as children.
|
|
303
|
+
* @default false
|
|
304
|
+
*/
|
|
305
|
+
inlineChips?: boolean;
|
|
306
|
+
}, "ref"> | Omit<_mirohq_design_system_components_internal_base_input.BaseInputSharedProps & _mirohq_design_system_input.ClearProps & React__default.RefAttributes<HTMLInputElement> & {
|
|
307
|
+
/**
|
|
308
|
+
* Lay selected chips out inside the field. Pass the selected
|
|
309
|
+
* `<Combobox.Value />` chips as children.
|
|
310
|
+
* @default false
|
|
311
|
+
*/
|
|
312
|
+
inlineChips?: boolean;
|
|
313
|
+
}, "ref">) & React__default.RefAttributes<HTMLInputElement>>;
|
|
291
314
|
|
|
292
|
-
declare const StyledCompositeItem:
|
|
315
|
+
declare const StyledCompositeItem: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<(props: _ariakit_react.CompositeItemProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>>, never> & TransformProps<{}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLButtonElement>> & _mirohq_design_system_stitches.StitchesInternals<(props: _ariakit_react.CompositeItemProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>, {}, {}>;
|
|
293
316
|
type StyledCompositeItemProps = ComponentProps<typeof StyledCompositeItem>;
|
|
294
317
|
|
|
295
318
|
interface CompositeItemProps extends Pick<StyledCompositeItemProps, 'disabled' | 'role' | 'children'> {
|
|
@@ -379,7 +402,7 @@ interface ComboboxProps extends FormElementProps, StyledComboboxProps {
|
|
|
379
402
|
/**
|
|
380
403
|
* The content of the combobox
|
|
381
404
|
*/
|
|
382
|
-
children?:
|
|
405
|
+
children?: React__default.ReactNode;
|
|
383
406
|
/**
|
|
384
407
|
* Enables/disabled automatic filtering.
|
|
385
408
|
* @default true
|
|
@@ -412,9 +435,9 @@ interface Partials {
|
|
|
412
435
|
SearchInput: typeof SearchInput;
|
|
413
436
|
}
|
|
414
437
|
|
|
415
|
-
declare const StyledBaseInput:
|
|
438
|
+
declare const StyledBaseInput: React.ForwardRefExoticComponent<Omit<Omit<_mirohq_design_system_stitches.StyledComponentProps<React.ForwardRefExoticComponent<_mirohq_design_system_base_input.BaseInputProps> & _mirohq_design_system_base_input.BaseInputPartials>, "size"> & TransformProps<{
|
|
416
439
|
size?: "medium" | "large" | "x-large" | undefined;
|
|
417
|
-
}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> &
|
|
440
|
+
}, {}> & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & React.RefAttributes<HTMLDivElement>> & _mirohq_design_system_stitches.StitchesInternals<React.ForwardRefExoticComponent<_mirohq_design_system_base_input.BaseInputProps> & _mirohq_design_system_base_input.BaseInputPartials, {
|
|
418
441
|
size?: "medium" | "large" | "x-large" | undefined;
|
|
419
442
|
}, {}>;
|
|
420
443
|
type StyledBaseInputProps = ComponentPropsWithRef<typeof StyledBaseInput>;
|
|
@@ -429,24 +452,24 @@ interface ComboboxProviderSharedProps extends FormElementProps {
|
|
|
429
452
|
autoFilter: boolean;
|
|
430
453
|
}
|
|
431
454
|
interface ComboboxContextProps extends ComboboxProviderSharedProps {
|
|
432
|
-
setOpenState:
|
|
455
|
+
setOpenState: React__default.Dispatch<React__default.SetStateAction<boolean | undefined>>;
|
|
433
456
|
openState: boolean;
|
|
434
|
-
externalOpenedRef:
|
|
435
|
-
setValue:
|
|
436
|
-
triggerRef:
|
|
437
|
-
inputRef:
|
|
438
|
-
contentRef:
|
|
457
|
+
externalOpenedRef: React__default.RefObject<boolean>;
|
|
458
|
+
setValue: React__default.Dispatch<React__default.SetStateAction<string[] | string | undefined>>;
|
|
459
|
+
triggerRef: React__default.RefObject<HTMLInputElement>;
|
|
460
|
+
inputRef: React__default.RefObject<HTMLInputElement>;
|
|
461
|
+
contentRef: React__default.RefObject<HTMLDivElement>;
|
|
439
462
|
searchValue: string;
|
|
440
|
-
setSearchValue:
|
|
463
|
+
setSearchValue: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
|
|
441
464
|
placeholder?: string;
|
|
442
|
-
setPlaceholder:
|
|
465
|
+
setPlaceholder: React__default.Dispatch<React__default.SetStateAction<string | undefined>>;
|
|
443
466
|
size: StyledBaseInputProps['size'];
|
|
444
|
-
setSize:
|
|
467
|
+
setSize: React__default.Dispatch<React__default.SetStateAction<StyledBaseInputProps['size']>>;
|
|
445
468
|
/**
|
|
446
469
|
* includes all visible and hidden items to render Chips and get filtered items
|
|
447
470
|
*/
|
|
448
471
|
itemsMap: Map<string, ItemData>;
|
|
449
|
-
setItemsMap:
|
|
472
|
+
setItemsMap: React__default.Dispatch<React__default.SetStateAction<Map<string, ItemData>>>;
|
|
450
473
|
/**
|
|
451
474
|
* @returns filtered items based on itemsMap
|
|
452
475
|
* @returns empty array when searchValue is empty or auto filtering is disabled
|
|
@@ -456,4 +479,4 @@ interface ComboboxContextProps extends ComboboxProviderSharedProps {
|
|
|
456
479
|
declare const useComboboxContext: () => ComboboxContextProps;
|
|
457
480
|
|
|
458
481
|
export { Combobox, types as ComboboxTypes, useComboboxContext };
|
|
459
|
-
export type { CompositeItemProps as ComboboxCompositeItemProps, ContentProps as ComboboxContentProps, GroupLabelProps as ComboboxGroupLabelProps, GroupProps as ComboboxGroupProps, InputProps as ComboboxInputProps, ItemProps as ComboboxItemProps, NoResultProps as ComboboxNoResultProps, PortalProps as ComboboxPortalProps, ComboboxProps, SeparatorProps as ComboboxSeparatorProps, TriggerProps as ComboboxTriggerProps, ValueProps as ComboboxValueProps };
|
|
482
|
+
export type { CompositeItemProps as ComboboxCompositeItemProps, ContentProps as ComboboxContentProps, GroupLabelProps as ComboboxGroupLabelProps, GroupProps as ComboboxGroupProps, InputProps as ComboboxInputProps, ItemProps as ComboboxItemProps, NoResultProps as ComboboxNoResultProps, PortalProps as ComboboxPortalProps, ComboboxProps, SearchInputProps as ComboboxSearchInputProps, SeparatorProps as ComboboxSeparatorProps, TriggerProps as ComboboxTriggerProps, ValueProps as ComboboxValueProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirohq/design-system-combobox",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-filter-chip.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Miro",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -28,24 +28,27 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@ariakit/react": "0.4.18",
|
|
31
|
-
"@radix-ui/react-popover": "^1.
|
|
32
|
-
"@radix-ui/react-use-controllable-state": "1.
|
|
31
|
+
"@radix-ui/react-popover": "^1.0.7",
|
|
32
|
+
"@radix-ui/react-use-controllable-state": "1.1.1",
|
|
33
33
|
"@react-aria/utils": "^3.31.0",
|
|
34
|
-
"@mirohq/design-system-base-input": "^1.4.
|
|
35
|
-
"@mirohq/design-system-base-select": "^1.3.
|
|
36
|
-
"@mirohq/design-system-base-form": "^2.0.0",
|
|
34
|
+
"@mirohq/design-system-base-input": "^1.4.3",
|
|
35
|
+
"@mirohq/design-system-base-select": "^1.3.32",
|
|
37
36
|
"@mirohq/design-system-base-tooltip": "^1.2.1",
|
|
38
|
-
"@mirohq/design-system-
|
|
39
|
-
"@mirohq/design-system-
|
|
40
|
-
"@mirohq/design-system-input": "^1.6.
|
|
41
|
-
"@mirohq/design-system-
|
|
37
|
+
"@mirohq/design-system-base-form": "^2.0.0",
|
|
38
|
+
"@mirohq/design-system-chip": "^1.3.0-filter-chip.0",
|
|
39
|
+
"@mirohq/design-system-input": "^1.6.9",
|
|
40
|
+
"@mirohq/design-system-icons": "^1.46.0",
|
|
41
|
+
"@mirohq/design-system-scroll-area": "^1.2.36",
|
|
42
42
|
"@mirohq/design-system-stitches": "^3.3.32",
|
|
43
43
|
"@mirohq/design-system-use-aria-disabled": "^1.1.4",
|
|
44
|
-
"@mirohq/design-system-use-id": "^1.1.1",
|
|
45
44
|
"@mirohq/design-system-use-layout-effect": "^1.1.1",
|
|
46
45
|
"@mirohq/design-system-utils": "^1.3.0",
|
|
47
|
-
"@mirohq/design-system-
|
|
48
|
-
"@mirohq/design-system-use-
|
|
46
|
+
"@mirohq/design-system-use-previous": "^1.1.1",
|
|
47
|
+
"@mirohq/design-system-use-id": "^1.1.1",
|
|
48
|
+
"@mirohq/design-system-primitive": "^2.2.1"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@mirohq/design-system-patterns": "^1.4.0-filter-chip.0"
|
|
49
52
|
},
|
|
50
53
|
"scripts": {
|
|
51
54
|
"build": "rollup -c ../../../rollup.config.js",
|