@dxos/react-ui-searchlist 0.8.3 → 0.8.4-main.1068cf700f
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 +741 -265
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/node-esm/index.mjs +741 -265
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/types/src/components/Combobox/Combobox.d.ts +84 -0
- package/dist/types/src/components/Combobox/Combobox.d.ts.map +1 -0
- package/dist/types/src/components/Combobox/Combobox.stories.d.ts +21 -0
- package/dist/types/src/components/Combobox/Combobox.stories.d.ts.map +1 -0
- package/dist/types/src/components/Combobox/index.d.ts +2 -0
- package/dist/types/src/components/Combobox/index.d.ts.map +1 -0
- package/dist/types/src/components/Listbox/Listbox.d.ts +31 -0
- package/dist/types/src/components/Listbox/Listbox.d.ts.map +1 -0
- package/dist/types/src/components/Listbox/Listbox.stories.d.ts +21 -0
- package/dist/types/src/components/Listbox/Listbox.stories.d.ts.map +1 -0
- package/dist/types/src/components/Listbox/index.d.ts +2 -0
- package/dist/types/src/components/Listbox/index.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/SearchList.d.ts +88 -0
- package/dist/types/src/components/SearchList/SearchList.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/SearchList.stories.d.ts +28 -0
- package/dist/types/src/components/SearchList/SearchList.stories.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/context.d.ts +33 -0
- package/dist/types/src/components/SearchList/context.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/hooks/index.d.ts +5 -0
- package/dist/types/src/components/SearchList/hooks/index.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/hooks/useGlobalFilter.d.ts +34 -0
- package/dist/types/src/components/SearchList/hooks/useGlobalFilter.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/hooks/useSearchListInput.d.ts +12 -0
- package/dist/types/src/components/SearchList/hooks/useSearchListInput.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/hooks/useSearchListItem.d.ts +10 -0
- package/dist/types/src/components/SearchList/hooks/useSearchListItem.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/hooks/useSearchListResults.d.ts +36 -0
- package/dist/types/src/components/SearchList/hooks/useSearchListResults.d.ts.map +1 -0
- package/dist/types/src/components/SearchList/index.d.ts +3 -0
- package/dist/types/src/components/SearchList/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +7 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -20
- package/src/components/Combobox/Combobox.stories.tsx +62 -0
- package/src/components/Combobox/Combobox.tsx +348 -0
- package/src/components/Combobox/index.ts +5 -0
- package/src/components/Listbox/Listbox.stories.tsx +53 -0
- package/src/components/Listbox/Listbox.tsx +214 -0
- package/src/components/Listbox/index.ts +5 -0
- package/src/components/SearchList/SearchList.stories.tsx +532 -0
- package/src/components/SearchList/SearchList.tsx +560 -0
- package/src/components/SearchList/context.ts +43 -0
- package/src/components/SearchList/hooks/index.ts +8 -0
- package/src/components/SearchList/hooks/useGlobalFilter.tsx +61 -0
- package/src/components/SearchList/hooks/useSearchListInput.ts +14 -0
- package/src/components/SearchList/hooks/useSearchListItem.ts +14 -0
- package/src/components/SearchList/hooks/useSearchListResults.ts +104 -0
- package/src/components/SearchList/index.ts +6 -0
- package/src/components/index.ts +2 -0
- package/src/index.ts +1 -2
- package/src/translations.ts +8 -4
- package/src/types/command-score.d.ts +16 -0
- package/dist/lib/node/index.cjs +0 -324
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/types/src/components/SearchList.d.ts +0 -44
- package/dist/types/src/components/SearchList.d.ts.map +0 -1
- package/dist/types/src/components/SearchList.stories.d.ts +0 -15
- package/dist/types/src/components/SearchList.stories.d.ts.map +0 -1
- package/dist/types/src/composites/PopoverCombobox.d.ts +0 -32
- package/dist/types/src/composites/PopoverCombobox.d.ts.map +0 -1
- package/dist/types/src/composites/PopoverCombobox.stories.d.ts +0 -28
- package/dist/types/src/composites/PopoverCombobox.stories.d.ts.map +0 -1
- package/dist/types/src/composites/index.d.ts +0 -2
- package/dist/types/src/composites/index.d.ts.map +0 -1
- package/src/components/SearchList.stories.tsx +0 -47
- package/src/components/SearchList.tsx +0 -250
- package/src/composites/PopoverCombobox.stories.tsx +0 -44
- package/src/composites/PopoverCombobox.tsx +0 -186
- package/src/composites/index.ts +0 -5
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import commandScore from 'command-score';
|
|
6
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
7
|
+
|
|
8
|
+
export type UseSearchListResultsOptions<T> = {
|
|
9
|
+
/** Items to filter. */
|
|
10
|
+
items: T[];
|
|
11
|
+
/** Custom filter function. Defaults to filtering by extracted string. */
|
|
12
|
+
filter?: (item: T, query: string) => boolean;
|
|
13
|
+
/** Enable fuzzy filtering using command-score algorithm. Defaults to true. */
|
|
14
|
+
fuzzy?: boolean;
|
|
15
|
+
/** Custom function to extract the searchable string from an item. Defaults to accessing 'label' property if it exists. */
|
|
16
|
+
extract?: (item: T) => string;
|
|
17
|
+
/** Minimum score threshold for fuzzy matches (0-1). Defaults to 0. */
|
|
18
|
+
minScore?: number;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Hook to manage search results with fuzzy filtering (enabled by default).
|
|
23
|
+
* Returns filtered results and a handleSearch function to pass to SearchList.Root.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* // Default fuzzy filtering using command-score (tries to extract from 'label' property)
|
|
27
|
+
* const { results, handleSearch } = useSearchListResults({ items });
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // Disable fuzzy for basic case-insensitive substring match
|
|
31
|
+
* const { results, handleSearch } = useSearchListResults({ items, fuzzy: false });
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* // Custom extraction for fuzzy filtering
|
|
35
|
+
* const { results, handleSearch } = useSearchListResults({
|
|
36
|
+
* items,
|
|
37
|
+
* extract: (item) => `${item.name} ${item.description}`,
|
|
38
|
+
* });
|
|
39
|
+
*/
|
|
40
|
+
export const useSearchListResults = <T = unknown>({
|
|
41
|
+
items,
|
|
42
|
+
filter,
|
|
43
|
+
fuzzy = true,
|
|
44
|
+
extract,
|
|
45
|
+
minScore = 0,
|
|
46
|
+
}: UseSearchListResultsOptions<T>) => {
|
|
47
|
+
const [query, setQuery] = useState<string>('');
|
|
48
|
+
const queryRef = useRef<string>('');
|
|
49
|
+
|
|
50
|
+
// Update results when items change.
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
queryRef.current = '';
|
|
53
|
+
setQuery('');
|
|
54
|
+
}, [items]);
|
|
55
|
+
|
|
56
|
+
const defaultExtract = useCallback((item: T) => {
|
|
57
|
+
// If item is a string, return it directly
|
|
58
|
+
if (typeof item === 'string') {
|
|
59
|
+
return item;
|
|
60
|
+
}
|
|
61
|
+
// Otherwise, try to access 'label' property
|
|
62
|
+
return (item as any)?.label ?? '';
|
|
63
|
+
}, []);
|
|
64
|
+
const extractFn = extract ?? defaultExtract;
|
|
65
|
+
|
|
66
|
+
const defaultFilter = useCallback(
|
|
67
|
+
(item: T, query: string) => {
|
|
68
|
+
const searchable = extractFn(item);
|
|
69
|
+
return searchable.toLowerCase().includes(query.toLowerCase());
|
|
70
|
+
},
|
|
71
|
+
[extractFn],
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
const filterFn = filter ?? defaultFilter;
|
|
75
|
+
|
|
76
|
+
const handleSearch = useCallback((searchQuery: string) => {
|
|
77
|
+
queryRef.current = searchQuery;
|
|
78
|
+
setQuery(searchQuery);
|
|
79
|
+
}, []);
|
|
80
|
+
|
|
81
|
+
const results = useMemo(() => {
|
|
82
|
+
const currentQuery = queryRef.current;
|
|
83
|
+
if (!currentQuery) {
|
|
84
|
+
return items;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (fuzzy) {
|
|
88
|
+
// Score and filter items using command-score.
|
|
89
|
+
const scored = items
|
|
90
|
+
.map((item) => ({
|
|
91
|
+
item,
|
|
92
|
+
score: commandScore(extractFn(item), currentQuery) as number,
|
|
93
|
+
}))
|
|
94
|
+
.filter(({ score }) => score > minScore)
|
|
95
|
+
.sort((a, b) => b.score - a.score);
|
|
96
|
+
|
|
97
|
+
return scored.map(({ item }) => item);
|
|
98
|
+
} else {
|
|
99
|
+
return items.filter((item) => filterFn(item, currentQuery));
|
|
100
|
+
}
|
|
101
|
+
}, [items, query, filterFn, fuzzy, extractFn, minScore]);
|
|
102
|
+
|
|
103
|
+
return { results, handleSearch };
|
|
104
|
+
};
|
package/src/components/index.ts
CHANGED
package/src/index.ts
CHANGED
package/src/translations.ts
CHANGED
|
@@ -2,12 +2,16 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export const translationKey = '@dxos/react-ui-searchlist';
|
|
8
|
+
|
|
9
|
+
export const translations = [
|
|
8
10
|
{
|
|
9
11
|
'en-US': {
|
|
10
|
-
[translationKey]: {
|
|
12
|
+
[translationKey]: {
|
|
13
|
+
'search.placeholder': 'Search...',
|
|
14
|
+
},
|
|
11
15
|
},
|
|
12
16
|
},
|
|
13
|
-
];
|
|
17
|
+
] as const satisfies Resource[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
declare module 'command-score' {
|
|
6
|
+
/**
|
|
7
|
+
* Scores how well a string matches a query using a fuzzy matching algorithm.
|
|
8
|
+
* Used by cmdk for its built-in filtering.
|
|
9
|
+
*
|
|
10
|
+
* @param string - The string to score against.
|
|
11
|
+
* @param query - The search query.
|
|
12
|
+
* @returns A score between 0 and 1, where higher values indicate better matches.
|
|
13
|
+
*/
|
|
14
|
+
function commandScore(string: string, query: string): number;
|
|
15
|
+
export default commandScore;
|
|
16
|
+
}
|
package/dist/lib/node/index.cjs
DELETED
|
@@ -1,324 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var node_exports = {};
|
|
30
|
-
__export(node_exports, {
|
|
31
|
-
Combobox: () => Combobox,
|
|
32
|
-
PopoverCombobox: () => PopoverCombobox,
|
|
33
|
-
SearchList: () => SearchList,
|
|
34
|
-
translations: () => translations_default
|
|
35
|
-
});
|
|
36
|
-
module.exports = __toCommonJS(node_exports);
|
|
37
|
-
var import_tracking = require("@preact-signals/safe-react/tracking");
|
|
38
|
-
var import_react = require("@phosphor-icons/react");
|
|
39
|
-
var import_react_context = require("@radix-ui/react-context");
|
|
40
|
-
var import_react_use_controllable_state = require("@radix-ui/react-use-controllable-state");
|
|
41
|
-
var import_cmdk = require("cmdk");
|
|
42
|
-
var import_react2 = __toESM(require("react"));
|
|
43
|
-
var import_react_ui = require("@dxos/react-ui");
|
|
44
|
-
var import_react_ui_theme = require("@dxos/react-ui-theme");
|
|
45
|
-
var import_tracking2 = require("@preact-signals/safe-react/tracking");
|
|
46
|
-
var import_react_use_controllable_state2 = require("@radix-ui/react-use-controllable-state");
|
|
47
|
-
var import_react3 = __toESM(require("react"));
|
|
48
|
-
var import_react_ui2 = require("@dxos/react-ui");
|
|
49
|
-
var COMBOBOX_NAME = "Combobox";
|
|
50
|
-
var COMBOBOX_TRIGGER_NAME = "ComboboxTrigger";
|
|
51
|
-
var SEARCHLIST_NAME = "SearchList";
|
|
52
|
-
var SEARCHLIST_ITEM_NAME = "SearchListItem";
|
|
53
|
-
var [ComboboxProvider, useComboboxContext] = (0, import_react_context.createContext)(COMBOBOX_NAME, {});
|
|
54
|
-
var SearchListRoot = /* @__PURE__ */ (0, import_react2.forwardRef)(({ children, classNames, ...props }, forwardedRef) => {
|
|
55
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
56
|
-
try {
|
|
57
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_cmdk.CommandRoot, {
|
|
58
|
-
...props,
|
|
59
|
-
className: (0, import_react_ui_theme.mx)("", classNames),
|
|
60
|
-
ref: forwardedRef
|
|
61
|
-
}, children);
|
|
62
|
-
} finally {
|
|
63
|
-
_effect.f();
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
SearchListRoot.displayName = SEARCHLIST_NAME;
|
|
67
|
-
var SearchListInput = /* @__PURE__ */ (0, import_react2.forwardRef)(({ children, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {
|
|
68
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
69
|
-
try {
|
|
70
|
-
const { hasIosKeyboard } = (0, import_react_ui.useThemeContext)();
|
|
71
|
-
const { tx } = (0, import_react_ui.useThemeContext)();
|
|
72
|
-
const density = (0, import_react_ui.useDensityContext)(propsDensity);
|
|
73
|
-
const elevation = (0, import_react_ui.useElevationContext)(propsElevation);
|
|
74
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_cmdk.CommandInput, {
|
|
75
|
-
...props,
|
|
76
|
-
className: tx("input.input", "input", {
|
|
77
|
-
variant,
|
|
78
|
-
disabled: props.disabled,
|
|
79
|
-
density,
|
|
80
|
-
elevation
|
|
81
|
-
}, "mbe-cardSpacingBlock", classNames),
|
|
82
|
-
...props.autoFocus && !hasIosKeyboard && {
|
|
83
|
-
autoFocus: true
|
|
84
|
-
},
|
|
85
|
-
ref: forwardedRef
|
|
86
|
-
});
|
|
87
|
-
} finally {
|
|
88
|
-
_effect.f();
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
var SearchListContent = /* @__PURE__ */ (0, import_react2.forwardRef)(({ children, classNames, ...props }, forwardedRef) => {
|
|
92
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
93
|
-
try {
|
|
94
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_cmdk.CommandList, {
|
|
95
|
-
...props,
|
|
96
|
-
className: (0, import_react_ui_theme.mx)(classNames),
|
|
97
|
-
ref: forwardedRef
|
|
98
|
-
}, children);
|
|
99
|
-
} finally {
|
|
100
|
-
_effect.f();
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
var SearchListEmpty = /* @__PURE__ */ (0, import_react2.forwardRef)(({ children, classNames, ...props }, forwardedRef) => {
|
|
104
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
105
|
-
try {
|
|
106
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_cmdk.CommandEmpty, {
|
|
107
|
-
...props,
|
|
108
|
-
className: (0, import_react_ui_theme.mx)(classNames),
|
|
109
|
-
ref: forwardedRef
|
|
110
|
-
}, children);
|
|
111
|
-
} finally {
|
|
112
|
-
_effect.f();
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
var SearchListItem = /* @__PURE__ */ (0, import_react2.forwardRef)(({ children, classNames, onSelect, ...props }, forwardedRef) => {
|
|
116
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
117
|
-
try {
|
|
118
|
-
const { onValueChange, onOpenChange } = useComboboxContext(SEARCHLIST_ITEM_NAME);
|
|
119
|
-
const handleSelect = (0, import_react2.useCallback)((nextValue) => {
|
|
120
|
-
onValueChange?.(nextValue);
|
|
121
|
-
onOpenChange?.(false);
|
|
122
|
-
onSelect?.(nextValue);
|
|
123
|
-
}, [
|
|
124
|
-
onValueChange,
|
|
125
|
-
onOpenChange,
|
|
126
|
-
onSelect
|
|
127
|
-
]);
|
|
128
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_cmdk.CommandItem, {
|
|
129
|
-
...props,
|
|
130
|
-
onSelect: handleSelect,
|
|
131
|
-
className: (0, import_react_ui_theme.mx)("p-1 rounded select-none cursor-pointer data-[selected]:bg-hoverOverlay", classNames),
|
|
132
|
-
ref: forwardedRef
|
|
133
|
-
}, children);
|
|
134
|
-
} finally {
|
|
135
|
-
_effect.f();
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
SearchListItem.displayName = SEARCHLIST_ITEM_NAME;
|
|
139
|
-
var ComboboxRoot = ({ modalId: propsModalId, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, value: propsValue, defaultValue, onValueChange: propsOnValueChange, placeholder, children }) => {
|
|
140
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
141
|
-
try {
|
|
142
|
-
const modalId = (0, import_react_ui.useId)(COMBOBOX_NAME, propsModalId);
|
|
143
|
-
const [open = false, onOpenChange] = (0, import_react_use_controllable_state.useControllableState)({
|
|
144
|
-
prop: propsOpen,
|
|
145
|
-
onChange: propsOnOpenChange,
|
|
146
|
-
defaultProp: defaultOpen
|
|
147
|
-
});
|
|
148
|
-
const [value = "", onValueChange] = (0, import_react_use_controllable_state.useControllableState)({
|
|
149
|
-
prop: propsValue,
|
|
150
|
-
onChange: propsOnValueChange,
|
|
151
|
-
defaultProp: defaultValue
|
|
152
|
-
});
|
|
153
|
-
return /* @__PURE__ */ import_react2.default.createElement(ComboboxProvider, {
|
|
154
|
-
isCombobox: true,
|
|
155
|
-
modalId,
|
|
156
|
-
open,
|
|
157
|
-
onOpenChange,
|
|
158
|
-
value,
|
|
159
|
-
onValueChange,
|
|
160
|
-
placeholder
|
|
161
|
-
}, children);
|
|
162
|
-
} finally {
|
|
163
|
-
_effect.f();
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
ComboboxRoot.displayName = COMBOBOX_NAME;
|
|
167
|
-
var ComboboxTrigger = /* @__PURE__ */ (0, import_react2.forwardRef)(({ children, onClick, ...props }, forwardedRef) => {
|
|
168
|
-
var _effect = (0, import_tracking.useSignals)();
|
|
169
|
-
try {
|
|
170
|
-
const { modalId, open, onOpenChange, placeholder, value } = useComboboxContext(COMBOBOX_TRIGGER_NAME);
|
|
171
|
-
const handleClick = (0, import_react2.useCallback)((event) => {
|
|
172
|
-
onClick?.(event);
|
|
173
|
-
onOpenChange?.(true);
|
|
174
|
-
}, [
|
|
175
|
-
onClick,
|
|
176
|
-
onOpenChange
|
|
177
|
-
]);
|
|
178
|
-
return /* @__PURE__ */ import_react2.default.createElement(import_react_ui.Button, {
|
|
179
|
-
...props,
|
|
180
|
-
role: "combobox",
|
|
181
|
-
"aria-expanded": open,
|
|
182
|
-
"aria-controls": modalId,
|
|
183
|
-
"aria-haspopup": "dialog",
|
|
184
|
-
onClick: handleClick,
|
|
185
|
-
ref: forwardedRef
|
|
186
|
-
}, children ?? /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement("span", {
|
|
187
|
-
className: (0, import_react_ui_theme.mx)("font-normal text-start flex-1 min-is-0 truncate mie-2", !value && import_react_ui_theme.staticPlaceholderText)
|
|
188
|
-
}, value || placeholder), /* @__PURE__ */ import_react2.default.createElement(import_react.CaretDown, {
|
|
189
|
-
weight: "bold",
|
|
190
|
-
className: (0, import_react_ui_theme.getSize)(3)
|
|
191
|
-
})));
|
|
192
|
-
} finally {
|
|
193
|
-
_effect.f();
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
ComboboxTrigger.displayName = COMBOBOX_TRIGGER_NAME;
|
|
197
|
-
var SearchList = {
|
|
198
|
-
Root: SearchListRoot,
|
|
199
|
-
Input: SearchListInput,
|
|
200
|
-
Content: SearchListContent,
|
|
201
|
-
Empty: SearchListEmpty,
|
|
202
|
-
Item: SearchListItem
|
|
203
|
-
};
|
|
204
|
-
var Combobox = {
|
|
205
|
-
Root: ComboboxRoot,
|
|
206
|
-
Trigger: ComboboxTrigger,
|
|
207
|
-
useComboboxContext
|
|
208
|
-
};
|
|
209
|
-
var PopoverComboboxRoot = ({ modal, children, open: propsOpen, onOpenChange: propsOnOpenChange, defaultOpen, ...props }) => {
|
|
210
|
-
var _effect = (0, import_tracking2.useSignals)();
|
|
211
|
-
try {
|
|
212
|
-
const [open, onOpenChange] = (0, import_react_use_controllable_state2.useControllableState)({
|
|
213
|
-
prop: propsOpen,
|
|
214
|
-
onChange: propsOnOpenChange,
|
|
215
|
-
defaultProp: defaultOpen
|
|
216
|
-
});
|
|
217
|
-
return /* @__PURE__ */ import_react3.default.createElement(Combobox.Root, {
|
|
218
|
-
open,
|
|
219
|
-
onOpenChange,
|
|
220
|
-
...props
|
|
221
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Root, {
|
|
222
|
-
open,
|
|
223
|
-
onOpenChange,
|
|
224
|
-
modal
|
|
225
|
-
}, children));
|
|
226
|
-
} finally {
|
|
227
|
-
_effect.f();
|
|
228
|
-
}
|
|
229
|
-
};
|
|
230
|
-
var POPOVER_COMBOBOX_CONTENT_NAME = "PopoverComboboxContent";
|
|
231
|
-
var PopoverComboboxContent = /* @__PURE__ */ (0, import_react3.forwardRef)(({ side = "bottom", collisionPadding = 48, sideOffset, align, alignOffset, avoidCollisions, collisionBoundary, arrowPadding, sticky, hideWhenDetached, onOpenAutoFocus, onCloseAutoFocus, onEscapeKeyDown, onPointerDownOutside, onFocusOutside, onInteractOutside, forceMount, children, classNames, ...props }, forwardedRef) => {
|
|
232
|
-
var _effect = (0, import_tracking2.useSignals)();
|
|
233
|
-
try {
|
|
234
|
-
const { modalId } = Combobox.useComboboxContext(POPOVER_COMBOBOX_CONTENT_NAME);
|
|
235
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Content, {
|
|
236
|
-
side,
|
|
237
|
-
sideOffset,
|
|
238
|
-
align,
|
|
239
|
-
alignOffset,
|
|
240
|
-
avoidCollisions,
|
|
241
|
-
collisionBoundary,
|
|
242
|
-
collisionPadding,
|
|
243
|
-
arrowPadding,
|
|
244
|
-
sticky,
|
|
245
|
-
hideWhenDetached,
|
|
246
|
-
onOpenAutoFocus,
|
|
247
|
-
onCloseAutoFocus,
|
|
248
|
-
onEscapeKeyDown,
|
|
249
|
-
onPointerDownOutside,
|
|
250
|
-
onFocusOutside,
|
|
251
|
-
onInteractOutside,
|
|
252
|
-
forceMount,
|
|
253
|
-
classNames,
|
|
254
|
-
id: modalId,
|
|
255
|
-
ref: forwardedRef
|
|
256
|
-
}, /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Viewport, null, /* @__PURE__ */ import_react3.default.createElement(SearchList.Root, {
|
|
257
|
-
...props,
|
|
258
|
-
classNames: "contents",
|
|
259
|
-
role: "none"
|
|
260
|
-
}, children)));
|
|
261
|
-
} finally {
|
|
262
|
-
_effect.f();
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
PopoverComboboxContent.displayName = POPOVER_COMBOBOX_CONTENT_NAME;
|
|
266
|
-
var PopoverComboboxTrigger = /* @__PURE__ */ (0, import_react3.forwardRef)((props, forwardedRef) => {
|
|
267
|
-
var _effect = (0, import_tracking2.useSignals)();
|
|
268
|
-
try {
|
|
269
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Trigger, {
|
|
270
|
-
asChild: true
|
|
271
|
-
}, /* @__PURE__ */ import_react3.default.createElement(Combobox.Trigger, {
|
|
272
|
-
...props,
|
|
273
|
-
ref: forwardedRef
|
|
274
|
-
}));
|
|
275
|
-
} finally {
|
|
276
|
-
_effect.f();
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
var PopoverComboboxVirtualTrigger = import_react_ui2.Popover.VirtualTrigger;
|
|
280
|
-
var PopoverComboboxInput = SearchList.Input;
|
|
281
|
-
var PopoverComboboxList = /* @__PURE__ */ (0, import_react3.forwardRef)(({ constrainInline, constrainBlock, ...props }, forwardedRef) => {
|
|
282
|
-
var _effect = (0, import_tracking2.useSignals)();
|
|
283
|
-
try {
|
|
284
|
-
return /* @__PURE__ */ import_react3.default.createElement(import_react_ui2.Popover.Viewport, {
|
|
285
|
-
constrainInline,
|
|
286
|
-
constrainBlock
|
|
287
|
-
}, /* @__PURE__ */ import_react3.default.createElement(SearchList.Content, {
|
|
288
|
-
...props,
|
|
289
|
-
ref: forwardedRef
|
|
290
|
-
}));
|
|
291
|
-
} finally {
|
|
292
|
-
_effect.f();
|
|
293
|
-
}
|
|
294
|
-
});
|
|
295
|
-
var PopoverComboboxItem = SearchList.Item;
|
|
296
|
-
var PopoverComboboxArrow = import_react_ui2.Popover.Arrow;
|
|
297
|
-
var PopoverComboboxEmpty = SearchList.Empty;
|
|
298
|
-
var PopoverCombobox = {
|
|
299
|
-
Root: PopoverComboboxRoot,
|
|
300
|
-
Content: PopoverComboboxContent,
|
|
301
|
-
Trigger: PopoverComboboxTrigger,
|
|
302
|
-
VirtualTrigger: PopoverComboboxVirtualTrigger,
|
|
303
|
-
Input: PopoverComboboxInput,
|
|
304
|
-
List: PopoverComboboxList,
|
|
305
|
-
Item: PopoverComboboxItem,
|
|
306
|
-
Arrow: PopoverComboboxArrow,
|
|
307
|
-
Empty: PopoverComboboxEmpty
|
|
308
|
-
};
|
|
309
|
-
var translationKey = "searchlist";
|
|
310
|
-
var translations_default = [
|
|
311
|
-
{
|
|
312
|
-
"en-US": {
|
|
313
|
-
[translationKey]: {}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
];
|
|
317
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
318
|
-
0 && (module.exports = {
|
|
319
|
-
Combobox,
|
|
320
|
-
PopoverCombobox,
|
|
321
|
-
SearchList,
|
|
322
|
-
translations
|
|
323
|
-
});
|
|
324
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/SearchList.tsx", "../../../src/composites/PopoverCombobox.tsx", "../../../src/translations.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { CaretDown } from '@phosphor-icons/react';\nimport { createContext } from '@radix-ui/react-context';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';\nimport React, { type ComponentPropsWithRef, forwardRef, type PropsWithChildren, useCallback } from 'react';\n\nimport {\n Button,\n type ButtonProps,\n type TextInputProps,\n type ThemedClassName,\n useDensityContext,\n useElevationContext,\n useId,\n useThemeContext,\n} from '@dxos/react-ui';\nimport { getSize, mx, staticPlaceholderText } from '@dxos/react-ui-theme';\n\ntype SearchListVariant = 'list' | 'menu' | 'listbox';\n\ntype SearchListRootProps = ThemedClassName<ComponentPropsWithRef<typeof CommandRoot>> & {\n variant?: SearchListVariant;\n};\n\ntype ComboboxContextValue = {\n isCombobox: true;\n modalId: string;\n open: boolean;\n onOpenChange: (nextOpen: boolean) => void;\n value: string;\n onValueChange: (nextValue: string) => void;\n placeholder?: string;\n};\n\nconst COMBOBOX_NAME = 'Combobox';\nconst COMBOBOX_TRIGGER_NAME = 'ComboboxTrigger';\nconst SEARCHLIST_NAME = 'SearchList';\nconst SEARCHLIST_ITEM_NAME = 'SearchListItem';\n\nconst [ComboboxProvider, useComboboxContext] = createContext<Partial<ComboboxContextValue>>(COMBOBOX_NAME, {});\n\ntype ComboboxRootProps = PropsWithChildren<\n Partial<ComboboxContextValue & { defaultOpen: boolean; defaultValue: string; placeholder: string }>\n>;\n\nconst SearchListRoot = forwardRef<HTMLDivElement, SearchListRootProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n return (\n <CommandRoot {...props} className={mx('', classNames)} ref={forwardedRef}>\n {children}\n </CommandRoot>\n );\n },\n);\n\nSearchListRoot.displayName = SEARCHLIST_NAME;\n\ntype CommandInputPrimitiveProps = ComponentPropsWithRef<typeof CommandInput>;\n\n// TODO: Harmonize with other inputs’ `onChange` prop.\ntype SearchListInputProps = Omit<TextInputProps, 'value' | 'defaultValue' | 'onChange'> &\n Pick<CommandInputPrimitiveProps, 'value' | 'onValueChange' | 'defaultValue'>;\n\nconst SearchListInput = forwardRef<HTMLInputElement, SearchListInputProps>(\n ({ children, classNames, density: propsDensity, elevation: propsElevation, variant, ...props }, forwardedRef) => {\n // CHORE(thure): Keep this in-sync with `TextInput`, or submit a PR for `cmdk` to support `asChild` so we don’t have to.\n const { hasIosKeyboard } = useThemeContext();\n const { tx } = useThemeContext();\n const density = useDensityContext(propsDensity);\n const elevation = useElevationContext(propsElevation);\n\n return (\n <CommandInput\n {...props}\n className={tx(\n 'input.input',\n 'input',\n {\n variant,\n disabled: props.disabled,\n density,\n elevation,\n },\n 'mbe-cardSpacingBlock',\n classNames,\n )}\n {...(props.autoFocus && !hasIosKeyboard && { autoFocus: true })}\n ref={forwardedRef}\n />\n );\n },\n);\n\ntype SearchListContentProps = ThemedClassName<ComponentPropsWithRef<typeof CommandList>>;\n\nconst SearchListContent = forwardRef<HTMLDivElement, SearchListContentProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n return (\n <CommandList {...props} className={mx(classNames)} ref={forwardedRef}>\n {children}\n </CommandList>\n );\n },\n);\n\ntype SearchListEmptyProps = ThemedClassName<ComponentPropsWithRef<typeof CommandEmpty>>;\n\nconst SearchListEmpty = forwardRef<HTMLDivElement, SearchListEmptyProps>(\n ({ children, classNames, ...props }, forwardedRef) => {\n return (\n <CommandEmpty {...props} className={mx(classNames)} ref={forwardedRef}>\n {children}\n </CommandEmpty>\n );\n },\n);\n\ntype SearchListItemProps = ThemedClassName<ComponentPropsWithRef<typeof CommandItem>>;\n\nconst SearchListItem = forwardRef<HTMLDivElement, SearchListItemProps>(\n ({ children, classNames, onSelect, ...props }, forwardedRef) => {\n const { onValueChange, onOpenChange } = useComboboxContext(SEARCHLIST_ITEM_NAME);\n const handleSelect = useCallback(\n (nextValue: string) => {\n onValueChange?.(nextValue);\n onOpenChange?.(false);\n onSelect?.(nextValue);\n },\n [onValueChange, onOpenChange, onSelect],\n );\n return (\n <CommandItem\n {...props}\n onSelect={handleSelect}\n className={mx('p-1 rounded select-none cursor-pointer data-[selected]:bg-hoverOverlay', classNames)}\n ref={forwardedRef}\n >\n {children}\n </CommandItem>\n );\n },\n);\n\nSearchListItem.displayName = SEARCHLIST_ITEM_NAME;\n\nconst ComboboxRoot = ({\n modalId: propsModalId,\n open: propsOpen,\n defaultOpen,\n onOpenChange: propsOnOpenChange,\n value: propsValue,\n defaultValue,\n onValueChange: propsOnValueChange,\n placeholder,\n children,\n}: ComboboxRootProps) => {\n const modalId = useId(COMBOBOX_NAME, propsModalId);\n const [open = false, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n const [value = '', onValueChange] = useControllableState({\n prop: propsValue,\n onChange: propsOnValueChange,\n defaultProp: defaultValue,\n });\n return (\n <ComboboxProvider\n isCombobox\n modalId={modalId}\n open={open}\n onOpenChange={onOpenChange}\n value={value}\n onValueChange={onValueChange}\n placeholder={placeholder}\n >\n {children}\n </ComboboxProvider>\n );\n};\n\nComboboxRoot.displayName = COMBOBOX_NAME;\n\ntype ComboboxTriggerProps = ButtonProps;\n\nconst ComboboxTrigger = forwardRef<HTMLButtonElement, ComboboxTriggerProps>(\n ({ children, onClick, ...props }, forwardedRef) => {\n const { modalId, open, onOpenChange, placeholder, value } = useComboboxContext(COMBOBOX_TRIGGER_NAME);\n const handleClick = useCallback(\n (event: Parameters<Exclude<ButtonProps['onClick'], undefined>>[0]) => {\n onClick?.(event);\n onOpenChange?.(true);\n },\n [onClick, onOpenChange],\n );\n return (\n <Button\n {...props}\n role='combobox'\n aria-expanded={open}\n aria-controls={modalId}\n aria-haspopup='dialog'\n onClick={handleClick}\n ref={forwardedRef}\n >\n {children ?? (\n <>\n <span\n className={mx('font-normal text-start flex-1 min-is-0 truncate mie-2', !value && staticPlaceholderText)}\n >\n {value || placeholder}\n </span>\n <CaretDown weight='bold' className={getSize(3)} />\n </>\n )}\n </Button>\n );\n },\n);\n\nComboboxTrigger.displayName = COMBOBOX_TRIGGER_NAME;\n\nexport const SearchList = {\n Root: SearchListRoot,\n Input: SearchListInput,\n Content: SearchListContent,\n Empty: SearchListEmpty,\n Item: SearchListItem,\n};\n\nexport const Combobox = {\n Root: ComboboxRoot,\n Trigger: ComboboxTrigger,\n useComboboxContext,\n};\n\nexport type {\n SearchListRootProps,\n SearchListInputProps,\n SearchListContentProps,\n SearchListEmptyProps,\n SearchListItemProps,\n ComboboxRootProps,\n ComboboxTriggerProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport React, { forwardRef } from 'react';\n\nimport {\n Popover,\n type PopoverArrowProps,\n type PopoverContentProps,\n type PopoverViewportProps,\n type PopoverVirtualTriggerProps,\n} from '@dxos/react-ui';\n\nimport {\n Combobox,\n type ComboboxRootProps,\n type ComboboxTriggerProps,\n SearchList,\n type SearchListContentProps,\n type SearchListEmptyProps,\n type SearchListInputProps,\n type SearchListItemProps,\n type SearchListRootProps,\n} from '../components';\n\ntype PopoverComboboxRootProps = ComboboxRootProps & { modal?: boolean };\n\nconst PopoverComboboxRoot = ({\n modal,\n children,\n open: propsOpen,\n onOpenChange: propsOnOpenChange,\n defaultOpen,\n ...props\n}: PopoverComboboxRootProps) => {\n const [open, onOpenChange] = useControllableState({\n prop: propsOpen,\n onChange: propsOnOpenChange,\n defaultProp: defaultOpen,\n });\n return (\n <Combobox.Root open={open} onOpenChange={onOpenChange} {...props}>\n <Popover.Root open={open} onOpenChange={onOpenChange} modal={modal}>\n {children}\n </Popover.Root>\n </Combobox.Root>\n );\n};\n\ntype PopoverComboboxContentProps = SearchListRootProps & PopoverContentProps;\n\nconst POPOVER_COMBOBOX_CONTENT_NAME = 'PopoverComboboxContent';\n\nconst PopoverComboboxContent = forwardRef<HTMLDivElement, PopoverComboboxContentProps>(\n (\n {\n side = 'bottom',\n collisionPadding = 48,\n sideOffset,\n align,\n alignOffset,\n avoidCollisions,\n collisionBoundary,\n arrowPadding,\n sticky,\n hideWhenDetached,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n forceMount,\n children,\n classNames,\n ...props\n },\n forwardedRef,\n ) => {\n const { modalId } = Combobox.useComboboxContext(POPOVER_COMBOBOX_CONTENT_NAME);\n return (\n <Popover.Content\n {...{\n side,\n sideOffset,\n align,\n alignOffset,\n avoidCollisions,\n collisionBoundary,\n collisionPadding,\n arrowPadding,\n sticky,\n hideWhenDetached,\n onOpenAutoFocus,\n onCloseAutoFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n forceMount,\n classNames,\n }}\n id={modalId}\n ref={forwardedRef}\n >\n <Popover.Viewport>\n {/* TODO(thure): This skips over `Command`’s root component, which renders a DOM node probably unnecessarily without supporting `asChild`. */}\n <SearchList.Root {...props} classNames='contents' role='none'>\n {children}\n </SearchList.Root>\n </Popover.Viewport>\n </Popover.Content>\n );\n },\n);\n\nPopoverComboboxContent.displayName = POPOVER_COMBOBOX_CONTENT_NAME;\n\ntype PopoverComboboxTriggerProps = ComboboxTriggerProps;\n\nconst PopoverComboboxTrigger = forwardRef<HTMLButtonElement, PopoverComboboxTriggerProps>((props, forwardedRef) => {\n return (\n <Popover.Trigger asChild>\n <Combobox.Trigger {...props} ref={forwardedRef} />\n </Popover.Trigger>\n );\n});\n\ntype PopoverComboboxVirtualTriggerProps = PopoverVirtualTriggerProps;\n\nconst PopoverComboboxVirtualTrigger = Popover.VirtualTrigger;\n\ntype PopoverComboboxInputProps = SearchListInputProps;\n\nconst PopoverComboboxInput = SearchList.Input;\n\ntype PopoverComboboxListProps = SearchListContentProps &\n Pick<PopoverViewportProps, 'constrainBlock' | 'constrainInline'>;\n\nconst PopoverComboboxList = forwardRef<HTMLDivElement, PopoverComboboxListProps>(\n ({ constrainInline, constrainBlock, ...props }, forwardedRef) => {\n return (\n <Popover.Viewport {...{ constrainInline, constrainBlock }}>\n <SearchList.Content {...props} ref={forwardedRef} />\n </Popover.Viewport>\n );\n },\n);\n\ntype PopoverComboboxItemProps = SearchListItemProps;\n\nconst PopoverComboboxItem = SearchList.Item;\n\ntype PopoverComboboxArrowProps = PopoverArrowProps;\n\nconst PopoverComboboxArrow = Popover.Arrow;\n\ntype PopoverComboboxEmptyProps = SearchListEmptyProps;\n\nconst PopoverComboboxEmpty = SearchList.Empty;\n\nexport const PopoverCombobox = {\n Root: PopoverComboboxRoot,\n Content: PopoverComboboxContent,\n Trigger: PopoverComboboxTrigger,\n VirtualTrigger: PopoverComboboxVirtualTrigger,\n Input: PopoverComboboxInput,\n List: PopoverComboboxList,\n Item: PopoverComboboxItem,\n Arrow: PopoverComboboxArrow,\n Empty: PopoverComboboxEmpty,\n};\n\nexport type {\n PopoverComboboxRootProps,\n PopoverComboboxContentProps,\n PopoverComboboxTriggerProps,\n PopoverComboboxVirtualTriggerProps,\n PopoverComboboxInputProps,\n PopoverComboboxListProps,\n PopoverComboboxItemProps,\n PopoverComboboxArrowProps,\n PopoverComboboxEmptyProps,\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nexport const translationKey = 'searchlist';\n\nexport default [\n {\n 'en-US': {\n [translationKey]: {},\n },\n },\n];\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,mBAA0B;AAC1B,2BAA8B;AAC9B,0CAAqC;AACrC,kBAAkF;AAClF,IAAAA,gBAAmG;AAEnG,sBASO;AACP,4BAAmD;;AChBnD,IAAAC,uCAAqC;AACrC,IAAAD,gBAAkC;AAElC,IAAAE,mBAMO;ADyBP,IAAMC,gBAAgB;AACtB,IAAMC,wBAAwB;AAC9B,IAAMC,kBAAkB;AACxB,IAAMC,uBAAuB;AAE7B,IAAM,CAACC,kBAAkBC,kBAAAA,QAAsBC,oCAA6CN,eAAe,CAAC,CAAA;AAM5G,IAAMO,iBAAiBC,8CACrB,CAAC,EAAEC,UAAUC,YAAY,GAAGC,MAAAA,GAASC,iBAAAA;;;AACnC,WACE,8BAAAC,QAAA,cAACC,yBAAAA;MAAa,GAAGH;MAAOI,eAAWC,0BAAG,IAAIN,UAAAA;MAAaO,KA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;IACE,SAAS;MACP,CAACA,cAAAA,GAAiB,CAAC;IACrB;EACF;;",
|
|
6
|
-
"names": ["import_react", "import_react_use_controllable_state", "import_react_ui", "COMBOBOX_NAME", "COMBOBOX_TRIGGER_NAME", "SEARCHLIST_NAME", "SEARCHLIST_ITEM_NAME", "ComboboxProvider", "useComboboxContext", "createContext", "SearchListRoot", "forwardRef", "children", "classNames", "props", "forwardedRef", "React", "CommandRoot", "className", "mx", "ref", "displayName", "SearchListInput", "density", "propsDensity", "elevation", "propsElevation", "variant", "hasIosKeyboard", "useThemeContext", "tx", "useDensityContext", "useElevationContext", "CommandInput", "disabled", "autoFocus", "SearchListContent", "CommandList", "SearchListEmpty", "CommandEmpty", "SearchListItem", "onSelect", "onValueChange", "onOpenChange", "handleSelect", "useCallback", "nextValue", "CommandItem", "ComboboxRoot", "modalId", "propsModalId", "open", "propsOpen", "defaultOpen", "propsOnOpenChange", "value", "propsValue", "defaultValue", "propsOnValueChange", "placeholder", "useId", "useControllableState", "prop", "onChange", "defaultProp", "isCombobox", "ComboboxTrigger", "onClick", "handleClick", "event", "Button", "role", "aria-expanded", "aria-controls", "aria-haspopup", "span", "staticPlaceholderText", "CaretDown", "weight", "getSize", "SearchList", "Root", "Input", "Content", "Empty", "Item", "Combobox", "Trigger", "PopoverComboboxRoot", "modal", "Popover", "POPOVER_COMBOBOX_CONTENT_NAME", "PopoverComboboxContent", "side", "collisionPadding", "sideOffset", "align", "alignOffset", "avoidCollisions", "collisionBoundary", "arrowPadding", "sticky", "hideWhenDetached", "onOpenAutoFocus", "onCloseAutoFocus", "onEscapeKeyDown", "onPointerDownOutside", "onFocusOutside", "onInteractOutside", "forceMount", "id", "Viewport", "PopoverComboboxTrigger", "asChild", "PopoverComboboxVirtualTrigger", "VirtualTrigger", "PopoverComboboxInput", "PopoverComboboxList", "constrainInline", "constrainBlock", "PopoverComboboxItem", "PopoverComboboxArrow", "Arrow", "PopoverComboboxEmpty", "PopoverCombobox", "List", "translationKey"]
|
|
7
|
-
}
|
package/dist/lib/node/meta.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"inputs":{"packages/ui/react-ui-searchlist/src/components/SearchList.tsx":{"bytes":22501,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"cmdk","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/ui/react-ui-searchlist/src/components/index.ts":{"bytes":488,"imports":[{"path":"packages/ui/react-ui-searchlist/src/components/SearchList.tsx","kind":"import-statement","original":"./SearchList"}],"format":"esm"},"packages/ui/react-ui-searchlist/src/composites/PopoverCombobox.tsx":{"bytes":14869,"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/ui/react-ui-searchlist/src/components/index.ts","kind":"import-statement","original":"../components"}],"format":"esm"},"packages/ui/react-ui-searchlist/src/composites/index.ts":{"bytes":501,"imports":[{"path":"packages/ui/react-ui-searchlist/src/composites/PopoverCombobox.tsx","kind":"import-statement","original":"./PopoverCombobox"}],"format":"esm"},"packages/ui/react-ui-searchlist/src/translations.ts":{"bytes":872,"imports":[],"format":"esm"},"packages/ui/react-ui-searchlist/src/index.ts":{"bytes":785,"imports":[{"path":"packages/ui/react-ui-searchlist/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/ui/react-ui-searchlist/src/composites/index.ts","kind":"import-statement","original":"./composites"},{"path":"packages/ui/react-ui-searchlist/src/translations.ts","kind":"import-statement","original":"./translations"}],"format":"esm"}},"outputs":{"packages/ui/react-ui-searchlist/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":20400},"packages/ui/react-ui-searchlist/dist/lib/node/index.cjs":{"imports":[{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"@radix-ui/react-context","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"cmdk","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"@preact-signals/safe-react/tracking","kind":"import-statement","external":true},{"path":"@radix-ui/react-use-controllable-state","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true}],"exports":["Combobox","PopoverCombobox","SearchList","translations"],"entryPoint":"packages/ui/react-ui-searchlist/src/index.ts","inputs":{"packages/ui/react-ui-searchlist/src/components/SearchList.tsx":{"bytesInOutput":5773},"packages/ui/react-ui-searchlist/src/components/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-searchlist/src/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-searchlist/src/composites/PopoverCombobox.tsx":{"bytesInOutput":3597},"packages/ui/react-ui-searchlist/src/composites/index.ts":{"bytesInOutput":0},"packages/ui/react-ui-searchlist/src/translations.ts":{"bytesInOutput":123}},"bytes":9816}}}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { CommandEmpty, CommandInput, CommandItem, CommandList, CommandRoot } from 'cmdk';
|
|
2
|
-
import React, { type ComponentPropsWithRef, type PropsWithChildren } from 'react';
|
|
3
|
-
import { type ButtonProps, type TextInputProps, type ThemedClassName } from '@dxos/react-ui';
|
|
4
|
-
type SearchListVariant = 'list' | 'menu' | 'listbox';
|
|
5
|
-
type SearchListRootProps = ThemedClassName<ComponentPropsWithRef<typeof CommandRoot>> & {
|
|
6
|
-
variant?: SearchListVariant;
|
|
7
|
-
};
|
|
8
|
-
type ComboboxContextValue = {
|
|
9
|
-
isCombobox: true;
|
|
10
|
-
modalId: string;
|
|
11
|
-
open: boolean;
|
|
12
|
-
onOpenChange: (nextOpen: boolean) => void;
|
|
13
|
-
value: string;
|
|
14
|
-
onValueChange: (nextValue: string) => void;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
};
|
|
17
|
-
type ComboboxRootProps = PropsWithChildren<Partial<ComboboxContextValue & {
|
|
18
|
-
defaultOpen: boolean;
|
|
19
|
-
defaultValue: string;
|
|
20
|
-
placeholder: string;
|
|
21
|
-
}>>;
|
|
22
|
-
type CommandInputPrimitiveProps = ComponentPropsWithRef<typeof CommandInput>;
|
|
23
|
-
type SearchListInputProps = Omit<TextInputProps, 'value' | 'defaultValue' | 'onChange'> & Pick<CommandInputPrimitiveProps, 'value' | 'onValueChange' | 'defaultValue'>;
|
|
24
|
-
type SearchListContentProps = ThemedClassName<ComponentPropsWithRef<typeof CommandList>>;
|
|
25
|
-
type SearchListEmptyProps = ThemedClassName<ComponentPropsWithRef<typeof CommandEmpty>>;
|
|
26
|
-
type SearchListItemProps = ThemedClassName<ComponentPropsWithRef<typeof CommandItem>>;
|
|
27
|
-
type ComboboxTriggerProps = ButtonProps;
|
|
28
|
-
export declare const SearchList: {
|
|
29
|
-
Root: React.ForwardRefExoticComponent<Omit<SearchListRootProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
30
|
-
Input: React.ForwardRefExoticComponent<Omit<SearchListInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
-
Content: React.ForwardRefExoticComponent<Omit<SearchListContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
32
|
-
Empty: React.ForwardRefExoticComponent<Omit<SearchListEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
33
|
-
Item: React.ForwardRefExoticComponent<Omit<SearchListItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
-
};
|
|
35
|
-
export declare const Combobox: {
|
|
36
|
-
Root: {
|
|
37
|
-
({ modalId: propsModalId, open: propsOpen, defaultOpen, onOpenChange: propsOnOpenChange, value: propsValue, defaultValue, onValueChange: propsOnValueChange, placeholder, children, }: ComboboxRootProps): React.JSX.Element;
|
|
38
|
-
displayName: string;
|
|
39
|
-
};
|
|
40
|
-
Trigger: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
41
|
-
useComboboxContext: (consumerName: string) => Partial<ComboboxContextValue>;
|
|
42
|
-
};
|
|
43
|
-
export type { SearchListRootProps, SearchListInputProps, SearchListContentProps, SearchListEmptyProps, SearchListItemProps, ComboboxRootProps, ComboboxTriggerProps, };
|
|
44
|
-
//# sourceMappingURL=SearchList.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchList.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchList.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACzF,OAAO,KAAK,EAAE,EAAE,KAAK,qBAAqB,EAAc,KAAK,iBAAiB,EAAe,MAAM,OAAO,CAAC;AAE3G,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,eAAe,EAKrB,MAAM,gBAAgB,CAAC;AAGxB,KAAK,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAErD,KAAK,mBAAmB,GAAG,eAAe,CAAC,qBAAqB,CAAC,OAAO,WAAW,CAAC,CAAC,GAAG;IACtF,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,UAAU,EAAE,IAAI,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IAC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<string, string>;
|
|
4
|
-
declare const _default: {
|
|
5
|
-
title: string;
|
|
6
|
-
component: React.FC<{
|
|
7
|
-
items: StoryItems;
|
|
8
|
-
}>;
|
|
9
|
-
decorators: import("@storybook/react").Decorator[];
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
12
|
-
export declare const Default: {
|
|
13
|
-
args: {};
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=SearchList.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SearchList.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/SearchList.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;;;eAUN,UAAU;;;;AAe7C,wBAIE;AAEF,eAAO,MAAM,OAAO;;CAEnB,CAAC"}
|