@dxos/react-ui-searchlist 0.8.4-main.84f28bd → 0.8.4-main.b97322e
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/lib/browser/index.mjs +36 -9
- 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 -9
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/SearchList.d.ts.map +1 -1
- package/dist/types/src/composites/PopoverCombobox.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -9
- package/src/components/SearchList.tsx +3 -3
- package/src/composites/PopoverCombobox.tsx +26 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/react-ui-searchlist",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.b97322e",
|
|
4
4
|
"description": "A themed ⌘K-style combobox component, triggered by a button (or keyboard shortcut), where values are queried only within the invoked modal.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -30,23 +30,21 @@
|
|
|
30
30
|
"cmdk": "^0.2.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
34
33
|
"@types/react": "~18.2.0",
|
|
35
34
|
"@types/react-dom": "~18.2.0",
|
|
36
35
|
"react": "~18.2.0",
|
|
37
36
|
"react-dom": "~18.2.0",
|
|
38
37
|
"vite": "5.4.7",
|
|
39
|
-
"@dxos/random": "0.8.4-main.
|
|
40
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
38
|
+
"@dxos/random": "0.8.4-main.b97322e",
|
|
39
|
+
"@dxos/react-ui": "0.8.4-main.b97322e",
|
|
40
|
+
"@dxos/storybook-utils": "0.8.4-main.b97322e",
|
|
41
|
+
"@dxos/react-ui-theme": "0.8.4-main.b97322e"
|
|
43
42
|
},
|
|
44
43
|
"peerDependencies": {
|
|
45
|
-
"@phosphor-icons/react": "^2.1.5",
|
|
46
44
|
"react": "~18.2.0",
|
|
47
45
|
"react-dom": "~18.2.0",
|
|
48
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
49
|
-
"@dxos/react-ui-theme": "0.8.4-main.
|
|
46
|
+
"@dxos/react-ui": "0.8.4-main.b97322e",
|
|
47
|
+
"@dxos/react-ui-theme": "0.8.4-main.b97322e"
|
|
50
48
|
},
|
|
51
49
|
"publishConfig": {
|
|
52
50
|
"access": "public"
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { CaretDown } from '@phosphor-icons/react';
|
|
6
5
|
import { createContext } from '@radix-ui/react-context';
|
|
7
6
|
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
|
8
7
|
import { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';
|
|
@@ -11,6 +10,7 @@ import React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren,
|
|
|
11
10
|
import {
|
|
12
11
|
Button,
|
|
13
12
|
type ButtonProps,
|
|
13
|
+
Icon,
|
|
14
14
|
type TextInputProps,
|
|
15
15
|
type ThemedClassName,
|
|
16
16
|
useDensityContext,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
useId,
|
|
19
19
|
useThemeContext,
|
|
20
20
|
} from '@dxos/react-ui';
|
|
21
|
-
import {
|
|
21
|
+
import { mx, staticPlaceholderText } from '@dxos/react-ui-theme';
|
|
22
22
|
|
|
23
23
|
type SearchListVariant = 'list' | 'menu' | 'listbox';
|
|
24
24
|
|
|
@@ -215,7 +215,7 @@ const ComboboxTrigger = forwardRef<HTMLButtonElement, ComboboxTriggerProps>(
|
|
|
215
215
|
>
|
|
216
216
|
{value || placeholder}
|
|
217
217
|
</span>
|
|
218
|
-
<
|
|
218
|
+
<Icon icon='ph--caret-down--bold' size={3} />
|
|
219
219
|
</>
|
|
220
220
|
)}
|
|
221
221
|
</Button>
|
|
@@ -106,8 +106,7 @@ const PopoverComboboxContent = forwardRef<HTMLDivElement, PopoverComboboxContent
|
|
|
106
106
|
ref={forwardedRef}
|
|
107
107
|
>
|
|
108
108
|
<Popover.Viewport>
|
|
109
|
-
{
|
|
110
|
-
<SearchList.Root {...props} classNames='contents' role='none'>
|
|
109
|
+
<SearchList.Root {...props} classNames='contents density-fine' role='none'>
|
|
111
110
|
{children}
|
|
112
111
|
</SearchList.Root>
|
|
113
112
|
</Popover.Viewport>
|
|
@@ -134,7 +133,20 @@ const PopoverComboboxVirtualTrigger = Popover.VirtualTrigger;
|
|
|
134
133
|
|
|
135
134
|
type PopoverComboboxInputProps = SearchListInputProps;
|
|
136
135
|
|
|
137
|
-
const PopoverComboboxInput =
|
|
136
|
+
const PopoverComboboxInput = forwardRef<HTMLInputElement, PopoverComboboxInputProps>(
|
|
137
|
+
({ classNames, ...props }, forwardedRef) => {
|
|
138
|
+
return (
|
|
139
|
+
<SearchList.Input
|
|
140
|
+
{...props}
|
|
141
|
+
classNames={[
|
|
142
|
+
'mli-cardSpacingChrome mbs-cardSpacingChrome is-[calc(100%-2*var(--dx-cardSpacingChrome))]',
|
|
143
|
+
classNames,
|
|
144
|
+
]}
|
|
145
|
+
ref={forwardedRef}
|
|
146
|
+
/>
|
|
147
|
+
);
|
|
148
|
+
},
|
|
149
|
+
);
|
|
138
150
|
|
|
139
151
|
type PopoverComboboxListProps = SearchListContentProps &
|
|
140
152
|
Pick<PopoverViewportProps, 'constrainBlock' | 'constrainInline'>;
|
|
@@ -151,7 +163,17 @@ const PopoverComboboxList = forwardRef<HTMLDivElement, PopoverComboboxListProps>
|
|
|
151
163
|
|
|
152
164
|
type PopoverComboboxItemProps = SearchListItemProps;
|
|
153
165
|
|
|
154
|
-
const PopoverComboboxItem =
|
|
166
|
+
const PopoverComboboxItem = forwardRef<HTMLDivElement, PopoverComboboxItemProps>(
|
|
167
|
+
({ classNames, ...props }, forwardedRef) => {
|
|
168
|
+
return (
|
|
169
|
+
<SearchList.Item
|
|
170
|
+
{...props}
|
|
171
|
+
classNames={['mli-cardSpacingChrome pli-cardSpacingChrome', classNames]}
|
|
172
|
+
ref={forwardedRef}
|
|
173
|
+
/>
|
|
174
|
+
);
|
|
175
|
+
},
|
|
176
|
+
);
|
|
155
177
|
|
|
156
178
|
type PopoverComboboxArrowProps = PopoverArrowProps;
|
|
157
179
|
|