@dxos/react-ui-searchlist 0.8.4-main.69d29f4 → 0.8.4-main.6fa680abb7
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/README.md +1 -1
- package/dist/lib/browser/index.mjs +36 -37
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +36 -37
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Combobox/Combobox.d.ts +3 -2
- package/dist/types/src/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/types/src/components/SearchList/SearchList.d.ts +12 -9
- package/dist/types/src/components/SearchList/SearchList.d.ts.map +1 -1
- package/dist/types/src/components/SearchList/SearchList.stories.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/components/Combobox/Combobox.stories.tsx +1 -1
- package/src/components/Combobox/Combobox.tsx +9 -22
- package/src/components/Listbox/Listbox.stories.tsx +1 -1
- package/src/components/Listbox/Listbox.tsx +2 -2
- package/src/components/SearchList/SearchList.stories.tsx +33 -35
- package/src/components/SearchList/SearchList.tsx +39 -44
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { type PropsWithChildren } from 'react';
|
|
2
2
|
import { type ButtonProps, Popover, type PopoverArrowProps, type PopoverContentProps, type PopoverVirtualTriggerProps } from '@dxos/react-ui';
|
|
3
|
-
import { type
|
|
3
|
+
import { type SearchListEmptyProps, type SearchListInputProps, type SearchListItemProps, type SearchListRootProps, type SearchListViewportProps } from '../SearchList';
|
|
4
4
|
type ComboboxContextValue = {
|
|
5
5
|
modalId: string;
|
|
6
6
|
isCombobox: true;
|
|
@@ -22,7 +22,7 @@ type ComboboxContentProps = SearchListRootProps & PopoverContentProps & {
|
|
|
22
22
|
type ComboboxTriggerProps = ButtonProps;
|
|
23
23
|
type ComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;
|
|
24
24
|
type ComboboxInputProps = SearchListInputProps;
|
|
25
|
-
type ComboboxListProps =
|
|
25
|
+
type ComboboxListProps = SearchListViewportProps;
|
|
26
26
|
type ComboboxItemProps = SearchListItemProps & {
|
|
27
27
|
/** Whether to close the popover when this item is selected. Defaults to true. */
|
|
28
28
|
closeOnSelect?: boolean;
|
|
@@ -64,6 +64,7 @@ export declare const Combobox: {
|
|
|
64
64
|
value: string;
|
|
65
65
|
label: string;
|
|
66
66
|
icon?: string;
|
|
67
|
+
iconClassNames?: string;
|
|
67
68
|
checked?: boolean;
|
|
68
69
|
suffix?: string;
|
|
69
70
|
onSelect?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA2B,MAAM,OAAO,CAAC;AAE/E,OAAO,EAEL,KAAK,WAAW,EAEhB,OAAO,EACP,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAEL,KAAK,
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAA2B,MAAM,OAAO,CAAC;AAE/E,OAAO,EAEL,KAAK,WAAW,EAEhB,OAAO,EACP,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAChC,MAAM,gBAAgB,CAAC;AAIxB,OAAO,EAEL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC7B,MAAM,eAAe,CAAC;AAWvB,KAAK,oBAAoB,GAA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EACV,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { type ComponentPropsWithRef, type PropsWithChildren, type ReactNode } from 'react';
|
|
1
|
+
import React, { type ComponentPropsWithRef, type ComponentPropsWithoutRef, type PropsWithChildren, type ReactNode } from 'react';
|
|
2
2
|
import { type Density, type Elevation, type ThemedClassName } from '@dxos/react-ui';
|
|
3
3
|
type SearchListRootProps = PropsWithChildren<{
|
|
4
4
|
/** Controlled query value. */
|
|
@@ -10,14 +10,14 @@ type SearchListRootProps = PropsWithChildren<{
|
|
|
10
10
|
/** Callback when search query changes (debounced). */
|
|
11
11
|
onSearch?: (query: string) => void;
|
|
12
12
|
}>;
|
|
13
|
-
type
|
|
14
|
-
type SearchListContentProps = ThemedClassName<PropsWithChildren<{}>>;
|
|
13
|
+
type SearchListContentProps = ThemedClassName<ComponentPropsWithoutRef<'div'>>;
|
|
15
14
|
type InputVariant = 'default' | 'subdued';
|
|
16
15
|
type SearchListInputProps = ThemedClassName<Omit<ComponentPropsWithRef<'input'>, 'value'> & {
|
|
17
16
|
density?: Density;
|
|
18
17
|
elevation?: Elevation;
|
|
19
18
|
variant?: InputVariant;
|
|
20
19
|
}>;
|
|
20
|
+
type SearchListViewportProps = ThemedClassName<PropsWithChildren>;
|
|
21
21
|
type SearchListItemProps = ThemedClassName<{
|
|
22
22
|
/** Unique identifier for the item. */
|
|
23
23
|
value: string;
|
|
@@ -25,6 +25,8 @@ type SearchListItemProps = ThemedClassName<{
|
|
|
25
25
|
label: string;
|
|
26
26
|
/** Icon to display (string identifier for Icon component). */
|
|
27
27
|
icon?: string;
|
|
28
|
+
/** Additional class names for the icon element. */
|
|
29
|
+
iconClassNames?: string;
|
|
28
30
|
/** Whether to show a check icon. */
|
|
29
31
|
checked?: boolean;
|
|
30
32
|
/** Suffix text to display after the label. */
|
|
@@ -44,11 +46,10 @@ export declare const SearchList: {
|
|
|
44
46
|
({ children, value: valueProp, defaultValue, debounceMs, onSearch, }: SearchListRootProps): React.JSX.Element;
|
|
45
47
|
displayName: string;
|
|
46
48
|
};
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Content: React.ForwardRefExoticComponent<Omit<{
|
|
49
|
+
Content: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "className"> & {
|
|
50
|
+
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
51
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
Viewport: React.ForwardRefExoticComponent<Omit<{
|
|
52
53
|
children?: ReactNode | undefined;
|
|
53
54
|
}, "className"> & {
|
|
54
55
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
@@ -61,6 +62,8 @@ export declare const SearchList: {
|
|
|
61
62
|
label: string;
|
|
62
63
|
/** Icon to display (string identifier for Icon component). */
|
|
63
64
|
icon?: string;
|
|
65
|
+
/** Additional class names for the icon element. */
|
|
66
|
+
iconClassNames?: string;
|
|
64
67
|
/** Whether to show a check icon. */
|
|
65
68
|
checked?: boolean;
|
|
66
69
|
/** Suffix text to display after the label. */
|
|
@@ -83,5 +86,5 @@ export declare const SearchList: {
|
|
|
83
86
|
classNames?: import("@dxos/ui-types").ClassNameValue;
|
|
84
87
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
85
88
|
};
|
|
86
|
-
export type { SearchListRootProps,
|
|
89
|
+
export type { SearchListRootProps, SearchListContentProps, SearchListViewportProps, SearchListInputProps, SearchListItemProps, SearchListEmptyProps, SearchListGroupProps, };
|
|
87
90
|
//# sourceMappingURL=SearchList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchList.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchList/SearchList.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAEZ,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"SearchList.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchList/SearchList.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,EAEZ,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAE7B,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,KAAK,OAAO,EACZ,KAAK,SAAS,EAGd,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;AA0BxB,KAAK,mBAAmB,GAAG,iBAAiB,CAAC;IAC3C,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,sCAAsC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC,CAAC;AAsKH,KAAK,sBAAsB,GAAG,eAAe,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC;AAkB/E,KAAK,YAAY,GAAG,SAAS,GAAG,SAAS,CAAC;AAE1C,KAAK,oBAAoB,GAAG,eAAe,CACzC,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,GAAG;IAC9C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CACF,CAAC;AA0HF,KAAK,uBAAuB,GAAG,eAAe,CAAC,iBAAiB,CAAC,CAAC;AAkBlE,KAAK,mBAAmB,GAAG,eAAe,CAAC;IACzC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAuEH,KAAK,oBAAoB,GAAG,eAAe,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC;AAgBnE,KAAK,oBAAoB,GAAG,eAAe,CACzC,iBAAiB,CAAC;IAChB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC,CACH,CAAC;AA0BF,eAAO,MAAM,UAAU;;8EA3cpB,mBAAmB;;;;;;;;;;;;;QAqUpB,sCAAsC;eAC/B,MAAM;QACb,kCAAkC;eAC3B,MAAM;QACb,8DAA8D;eACvD,MAAM;QACb,mDAAmD;yBAClC,MAAM;QACvB,oCAAoC;kBAC1B,OAAO;QACjB,8CAA8C;iBACrC,MAAM;QACf,sCAAsC;mBAC3B,MAAM,IAAI;QACrB,oCAAoC;mBACzB,OAAO;;;;;mCA0E+B,oBAAoB;;;;QAgBnE,6BAA6B;kBACnB,SAAS;;;;CAoCtB,CAAC;AAEF,YAAY,EACV,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchList/SearchList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"SearchList.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/SearchList/SearchList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgdjE,QAAA,MAAM,IAAI;;eAEsB,GAAG;;;;;;;;;;;;CAME,CAAC;AAEtC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAKhC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAE/B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC"}
|