@osdk/react-components 0.7.0 → 0.7.1-main-5a733c0200b0e9f9f53b4d9d6fdde01260eb2d6c
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/CHANGELOG.md +6 -0
- package/build/browser/action-form/fields/DropdownField.js +107 -21
- package/build/browser/action-form/fields/DropdownField.js.map +1 -1
- package/build/browser/base-components/combobox/Combobox.js +23 -1
- package/build/browser/base-components/combobox/Combobox.js.map +1 -1
- package/build/browser/base-components/combobox/Combobox.module.css +288 -3
- package/build/browser/base-components/combobox/Combobox.module.css.js +11 -1
- package/build/browser/base-components/select/Select.js +5 -0
- package/build/browser/base-components/select/Select.js.map +1 -1
- package/build/browser/base-components/select/Select.module.css +43 -0
- package/build/browser/base-components/select/Select.module.css.js +1 -0
- package/build/browser/styles.css +331 -3
- package/build/browser/util/UserAgent.js +1 -1
- package/build/browser/util/UserAgent.js.map +1 -1
- package/build/cjs/{chunk-YQIMVHDC.cjs → chunk-2FPKTOPE.cjs} +25 -4
- package/build/cjs/chunk-2FPKTOPE.cjs.map +1 -0
- package/build/cjs/{chunk-O6IHIRD4.cjs → chunk-3AQNSLYI.cjs} +111 -33
- package/build/cjs/chunk-3AQNSLYI.cjs.map +1 -0
- package/build/cjs/{chunk-UTEOTVQW.cjs → chunk-EAHFG555.cjs} +3 -3
- package/build/cjs/chunk-EAHFG555.cjs.map +1 -0
- package/build/cjs/{chunk-6CUUF2F3.cjs → chunk-IDFVTGOU.cjs} +47 -47
- package/build/cjs/{chunk-6CUUF2F3.cjs.map → chunk-IDFVTGOU.cjs.map} +1 -1
- package/build/cjs/{chunk-QJJ2I7MB.cjs → chunk-VGDFPJOP.cjs} +4 -4
- package/build/cjs/{chunk-QJJ2I7MB.cjs.map → chunk-VGDFPJOP.cjs.map} +1 -1
- package/build/cjs/{chunk-OZC5RIWD.cjs → chunk-WMP4DGKX.cjs} +9 -9
- package/build/cjs/{chunk-OZC5RIWD.cjs.map → chunk-WMP4DGKX.cjs.map} +1 -1
- package/build/cjs/{chunk-ORRH6P3M.cjs → chunk-ZP3UMRM6.cjs} +29 -29
- package/build/cjs/{chunk-ORRH6P3M.cjs.map → chunk-ZP3UMRM6.cjs.map} +1 -1
- package/build/cjs/public/experimental/action-form.cjs +6 -6
- package/build/cjs/public/experimental/action-form.css +154 -1
- package/build/cjs/public/experimental/action-form.css.map +1 -1
- package/build/cjs/public/experimental/filter-list.cjs +7 -7
- package/build/cjs/public/experimental/filter-list.css +134 -1
- package/build/cjs/public/experimental/filter-list.css.map +1 -1
- package/build/cjs/public/experimental/object-table.cjs +10 -10
- package/build/cjs/public/experimental/object-table.css +154 -1
- package/build/cjs/public/experimental/object-table.css.map +1 -1
- package/build/cjs/public/experimental/pdf-viewer.cjs +24 -24
- package/build/cjs/public/experimental.cjs +41 -41
- package/build/cjs/public/experimental.css +154 -1
- package/build/cjs/public/experimental.css.map +1 -1
- package/build/esm/action-form/fields/DropdownField.js +107 -21
- package/build/esm/action-form/fields/DropdownField.js.map +1 -1
- package/build/esm/base-components/combobox/Combobox.js +23 -1
- package/build/esm/base-components/combobox/Combobox.js.map +1 -1
- package/build/esm/base-components/combobox/Combobox.module.css +288 -3
- package/build/esm/base-components/select/Select.js +5 -0
- package/build/esm/base-components/select/Select.js.map +1 -1
- package/build/esm/base-components/select/Select.module.css +43 -0
- package/build/esm/util/UserAgent.js +1 -1
- package/build/esm/util/UserAgent.js.map +1 -1
- package/build/types/action-form/fields/DropdownField.d.ts +1 -1
- package/build/types/action-form/fields/DropdownField.d.ts.map +1 -1
- package/build/types/base-components/combobox/Combobox.d.ts +11 -1
- package/build/types/base-components/combobox/Combobox.d.ts.map +1 -1
- package/build/types/base-components/select/Select.d.ts.map +1 -1
- package/package.json +3 -3
- package/build/cjs/chunk-O6IHIRD4.cjs.map +0 -1
- package/build/cjs/chunk-UTEOTVQW.cjs.map +0 -1
- package/build/cjs/chunk-YQIMVHDC.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @osdk/react-components
|
|
2
2
|
|
|
3
|
+
## 0.7.1-main-5a733c0200b0e9f9f53b4d9d6fdde01260eb2d6c
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5a733c0: Improve DropdownField with searchable input, multi-select checkboxes, clear button, and fix Select positioning
|
|
8
|
+
|
|
3
9
|
## 0.7.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -15,38 +15,51 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
import
|
|
18
|
+
import { CaretDown, Cross, Tick } from "@blueprintjs/icons";
|
|
19
|
+
import React, { useCallback, useState } from "react";
|
|
19
20
|
import { Combobox } from "../../base-components/combobox/Combobox.js";
|
|
21
|
+
import comboboxStyles from "../../base-components/combobox/Combobox.module.css.js";
|
|
20
22
|
import { Select } from "../../base-components/select/Select.js";
|
|
23
|
+
import selectStyles from "../../base-components/select/Select.module.css.js";
|
|
21
24
|
import { typedReactMemo } from "../../shared/typedMemo.js";
|
|
22
25
|
const EMPTY_ARRAY = [];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* SelectDropdown is only used for single-select (the multi-select path
|
|
29
|
+
* always routes to ComboboxDropdown). We keep the `Multiple` generic so
|
|
30
|
+
* the spread from DropdownField type-checks, but SelectDropdown never
|
|
31
|
+
* reads `isMultiple`.
|
|
32
|
+
*/
|
|
33
|
+
|
|
23
34
|
export function DropdownField({
|
|
24
35
|
isSearchable = false,
|
|
36
|
+
isMultiple,
|
|
25
37
|
itemToStringLabel,
|
|
26
38
|
itemToKey,
|
|
27
|
-
portalRef,
|
|
28
39
|
value,
|
|
29
40
|
...rest
|
|
30
41
|
}) {
|
|
31
42
|
// Ensure always controlled from first render: multi-select needs [],
|
|
32
43
|
// single-select needs null. Passing undefined switches Base UI from
|
|
33
44
|
// uncontrolled to controlled and triggers a warning.
|
|
34
|
-
const normalizedValue = value ?? (
|
|
45
|
+
const normalizedValue = value ?? (isMultiple ? EMPTY_ARRAY : null);
|
|
35
46
|
const resolvedItemToStringLabel = itemToStringLabel ?? defaultItemToStringLabel;
|
|
36
47
|
const getKey = useCallback(item => itemToKey?.(item) ?? resolvedItemToStringLabel(item), [itemToKey, resolvedItemToStringLabel]);
|
|
37
|
-
|
|
48
|
+
|
|
49
|
+
// Multi-select always uses Combobox for the chip-based UI because it looks better
|
|
50
|
+
if (isSearchable || isMultiple) {
|
|
38
51
|
return /*#__PURE__*/React.createElement(ComboboxDropdown, _extends({}, rest, {
|
|
52
|
+
isMultiple: isMultiple,
|
|
39
53
|
value: normalizedValue,
|
|
40
54
|
itemToStringLabel: resolvedItemToStringLabel,
|
|
41
55
|
getKey: getKey,
|
|
42
|
-
|
|
56
|
+
isSearchable: isSearchable
|
|
43
57
|
}));
|
|
44
58
|
}
|
|
45
59
|
return /*#__PURE__*/React.createElement(SelectDropdown, _extends({}, rest, {
|
|
46
60
|
value: normalizedValue,
|
|
47
61
|
itemToStringLabel: resolvedItemToStringLabel,
|
|
48
|
-
getKey: getKey
|
|
49
|
-
portalRef: portalRef
|
|
62
|
+
getKey: getKey
|
|
50
63
|
}));
|
|
51
64
|
}
|
|
52
65
|
const SelectDropdown = typedReactMemo(function ({
|
|
@@ -57,20 +70,38 @@ const SelectDropdown = typedReactMemo(function ({
|
|
|
57
70
|
itemToStringLabel,
|
|
58
71
|
getKey,
|
|
59
72
|
isItemEqual,
|
|
60
|
-
isMultiple,
|
|
61
73
|
placeholder,
|
|
62
74
|
portalRef
|
|
63
75
|
}) {
|
|
76
|
+
const [open, setOpen] = useState(false);
|
|
77
|
+
const handleClear = useCallback(() => {
|
|
78
|
+
// SelectDropdown is always single-select, so cleared value is null.
|
|
79
|
+
onChange?.(null);
|
|
80
|
+
setOpen(false);
|
|
81
|
+
}, [onChange]);
|
|
64
82
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select.Root, {
|
|
65
83
|
value: value,
|
|
66
84
|
onValueChange: onChange,
|
|
67
|
-
|
|
85
|
+
open: open,
|
|
86
|
+
onOpenChange: setOpen,
|
|
68
87
|
isItemEqualToValue: isItemEqual,
|
|
69
88
|
itemToStringLabel: itemToStringLabel
|
|
70
89
|
}, /*#__PURE__*/React.createElement(Select.Trigger, {
|
|
71
90
|
id: id,
|
|
72
91
|
placeholder: placeholder
|
|
73
|
-
}
|
|
92
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
93
|
+
className: selectStyles.osdkSelectValueContainer
|
|
94
|
+
}, /*#__PURE__*/React.createElement(Select.Value, null), placeholder != null && /*#__PURE__*/React.createElement("span", {
|
|
95
|
+
className: selectStyles.osdkSelectPlaceholder
|
|
96
|
+
}, placeholder)), value != null && /*#__PURE__*/React.createElement("span", {
|
|
97
|
+
role: "button",
|
|
98
|
+
"aria-label": "Clear",
|
|
99
|
+
className: selectStyles.osdkSelectClear,
|
|
100
|
+
onMouseDown: preventTriggerOpen,
|
|
101
|
+
onClick: handleClear
|
|
102
|
+
}, /*#__PURE__*/React.createElement(Cross, null)), /*#__PURE__*/React.createElement("span", {
|
|
103
|
+
className: selectStyles.osdkSelectIcon
|
|
104
|
+
}, /*#__PURE__*/React.createElement(CaretDown, null))), /*#__PURE__*/React.createElement(Select.Portal, {
|
|
74
105
|
ref: portalRef
|
|
75
106
|
}, /*#__PURE__*/React.createElement(Select.Positioner, null, /*#__PURE__*/React.createElement(Select.Popup, null, items.map(item => /*#__PURE__*/React.createElement(Select.Item, {
|
|
76
107
|
key: getKey(item),
|
|
@@ -86,33 +117,88 @@ const ComboboxDropdown = typedReactMemo(function ({
|
|
|
86
117
|
getKey,
|
|
87
118
|
isItemEqual,
|
|
88
119
|
isMultiple,
|
|
120
|
+
isSearchable,
|
|
89
121
|
placeholder,
|
|
90
122
|
portalRef
|
|
91
123
|
}) {
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
124
|
+
const [open, setOpen] = useState(false);
|
|
125
|
+
const hasValue = isMultiple ? Array.isArray(value) && value.length > 0 : value != null;
|
|
126
|
+
const handleClear = useCallback(() => {
|
|
127
|
+
// TypeScript can't narrow the conditional type `Multiple extends true ? V[] : V`
|
|
128
|
+
// at runtime, so we cast through the known parameter type at this single call site.
|
|
129
|
+
const cleared = isMultiple ? EMPTY_ARRAY : null;
|
|
130
|
+
onChange?.(cleared);
|
|
131
|
+
// Single-select: close after clearing. Multi-select: keep open for continued selection.
|
|
132
|
+
if (!isMultiple) {
|
|
133
|
+
setOpen(false);
|
|
134
|
+
}
|
|
135
|
+
}, [isMultiple, onChange]);
|
|
136
|
+
const handleRemoveItem = useCallback(itemToRemove => {
|
|
137
|
+
if (!isMultiple || !Array.isArray(value)) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const next = value.filter(v => isItemEqual != null ? !isItemEqual(v, itemToRemove) : v !== itemToRemove);
|
|
141
|
+
onChange?.(next);
|
|
142
|
+
}, [isMultiple, value, onChange, isItemEqual]);
|
|
98
143
|
const renderItem = useCallback(item => /*#__PURE__*/React.createElement(Combobox.Item, {
|
|
99
144
|
key: getKey(item),
|
|
100
145
|
value: item
|
|
101
146
|
}, itemToStringLabel(item)), [getKey, itemToStringLabel]);
|
|
147
|
+
const renderItemWithIndicator = useCallback(item => /*#__PURE__*/React.createElement(Combobox.Item, {
|
|
148
|
+
key: getKey(item),
|
|
149
|
+
value: item
|
|
150
|
+
}, /*#__PURE__*/React.createElement(Combobox.ItemIndicator, null, /*#__PURE__*/React.createElement(Tick, null)), itemToStringLabel(item)), [getKey, itemToStringLabel]);
|
|
102
151
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Combobox.Root, {
|
|
103
152
|
value: value,
|
|
104
153
|
onValueChange: onChange,
|
|
154
|
+
open: open,
|
|
155
|
+
onOpenChange: setOpen,
|
|
105
156
|
multiple: isMultiple,
|
|
106
157
|
itemToStringLabel: itemToStringLabel,
|
|
107
158
|
isItemEqualToValue: isItemEqual,
|
|
108
|
-
items: items
|
|
109
|
-
|
|
159
|
+
items: items,
|
|
160
|
+
autoHighlight: isSearchable
|
|
161
|
+
}, /*#__PURE__*/React.createElement(Combobox.Trigger, {
|
|
110
162
|
id: id,
|
|
111
|
-
|
|
112
|
-
}
|
|
163
|
+
className: isMultiple ? comboboxStyles.osdkComboboxTriggerMulti : undefined
|
|
164
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
className: comboboxStyles.osdkComboboxValueContainer
|
|
166
|
+
}, isMultiple && Array.isArray(value) && value.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: comboboxStyles.osdkComboboxTriggerChips
|
|
168
|
+
}, value.map(item => /*#__PURE__*/React.createElement("span", {
|
|
169
|
+
key: getKey(item),
|
|
170
|
+
className: comboboxStyles.osdkComboboxTriggerChip
|
|
171
|
+
}, itemToStringLabel(item), /*#__PURE__*/React.createElement("span", {
|
|
172
|
+
role: "button",
|
|
173
|
+
"aria-label": `Remove ${itemToStringLabel(item)}`,
|
|
174
|
+
className: comboboxStyles.osdkComboboxTriggerChipRemove,
|
|
175
|
+
onMouseDown: preventTriggerOpen,
|
|
176
|
+
onClick: () => handleRemoveItem(item)
|
|
177
|
+
}, /*#__PURE__*/React.createElement(Cross, {
|
|
178
|
+
size: 12
|
|
179
|
+
}))))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Combobox.Value, null), !hasValue && placeholder != null && /*#__PURE__*/React.createElement("span", {
|
|
180
|
+
className: comboboxStyles.osdkComboboxPlaceholder
|
|
181
|
+
}, placeholder))), hasValue && /*#__PURE__*/React.createElement("span", {
|
|
182
|
+
role: "button",
|
|
183
|
+
"aria-label": "Clear",
|
|
184
|
+
className: comboboxStyles.osdkComboboxClear,
|
|
185
|
+
onMouseDown: preventTriggerOpen,
|
|
186
|
+
onClick: handleClear
|
|
187
|
+
}, /*#__PURE__*/React.createElement(Cross, null)), /*#__PURE__*/React.createElement(Combobox.Icon, null, /*#__PURE__*/React.createElement(CaretDown, null))), /*#__PURE__*/React.createElement(Combobox.Portal, {
|
|
113
188
|
ref: portalRef
|
|
114
|
-
}, /*#__PURE__*/React.createElement(Combobox.Positioner, null, /*#__PURE__*/React.createElement(Combobox.Popup, null, /*#__PURE__*/React.createElement(
|
|
189
|
+
}, /*#__PURE__*/React.createElement(Combobox.Positioner, null, /*#__PURE__*/React.createElement(Combobox.Popup, null, isSearchable && /*#__PURE__*/React.createElement("div", {
|
|
190
|
+
className: comboboxStyles.osdkComboboxPopupSearchInput
|
|
191
|
+
}, /*#__PURE__*/React.createElement(Combobox.SearchInput, {
|
|
192
|
+
placeholder: "Search\u2026"
|
|
193
|
+
})), /*#__PURE__*/React.createElement(Combobox.Empty, null, "No results"), /*#__PURE__*/React.createElement(Combobox.List, null, isMultiple ? renderItemWithIndicator : renderItem))))));
|
|
115
194
|
});
|
|
195
|
+
|
|
196
|
+
// Prevent the clear/remove click from bubbling into the trigger
|
|
197
|
+
// and toggling the dropdown open/closed.
|
|
198
|
+
function preventTriggerOpen(e) {
|
|
199
|
+
e.stopPropagation();
|
|
200
|
+
e.preventDefault();
|
|
201
|
+
}
|
|
116
202
|
function defaultItemToStringLabel(item) {
|
|
117
203
|
if (item == null || typeof item !== "object") {
|
|
118
204
|
return String(item);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownField.js","names":["React","useCallback","Combobox","Select","typedReactMemo","EMPTY_ARRAY","DropdownField","isSearchable","itemToStringLabel","itemToKey","portalRef","value","rest","normalizedValue","isMultiple","resolvedItemToStringLabel","defaultItemToStringLabel","getKey","item","createElement","ComboboxDropdown","_extends","SelectDropdown","id","onChange","items","isItemEqual","placeholder","Root","onValueChange","multiple","isItemEqualToValue","Trigger","Portal","ref","Positioner","Popup","map","Item","key","renderChips","selectedValues","Fragment","Chip","ChipRemove","Input","length","renderItem","Chips","Value","Empty","List","String","label"],"sources":["DropdownField.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React, { useCallback } from \"react\";\nimport { Combobox } from \"../../base-components/combobox/Combobox.js\";\nimport { Select } from \"../../base-components/select/Select.js\";\nimport { typedReactMemo } from \"../../shared/typedMemo.js\";\nimport type { DropdownFieldProps } from \"../FormFieldApi.js\";\n\nconst EMPTY_ARRAY: [] = [];\n\ninterface InnerDropdownProps<V, Multiple extends boolean>\n extends Omit<DropdownFieldProps<V, Multiple>, \"isSearchable\">\n{\n itemToStringLabel: (item: V) => string;\n getKey: (item: V) => string;\n portalRef?: React.Ref<HTMLDivElement>;\n}\n\nexport function DropdownField<V, Multiple extends boolean = false>({\n isSearchable = false,\n itemToStringLabel,\n itemToKey,\n portalRef,\n value,\n ...rest\n}: DropdownFieldProps<V, Multiple>): React.ReactElement {\n // Ensure always controlled from first render: multi-select needs [],\n // single-select needs null. Passing undefined switches Base UI from\n // uncontrolled to controlled and triggers a warning.\n const normalizedValue = (value\n ?? (rest.isMultiple ? EMPTY_ARRAY : null)) as typeof value;\n\n const resolvedItemToStringLabel = itemToStringLabel\n ?? defaultItemToStringLabel;\n\n const getKey = useCallback(\n (item: V) => itemToKey?.(item) ?? resolvedItemToStringLabel(item),\n [itemToKey, resolvedItemToStringLabel],\n );\n\n if (isSearchable) {\n return (\n <ComboboxDropdown\n {...rest}\n value={normalizedValue}\n itemToStringLabel={resolvedItemToStringLabel}\n getKey={getKey}\n portalRef={portalRef}\n />\n );\n }\n\n return (\n <SelectDropdown\n {...rest}\n value={normalizedValue}\n itemToStringLabel={resolvedItemToStringLabel}\n getKey={getKey}\n portalRef={portalRef}\n />\n );\n}\n\nconst SelectDropdown = typedReactMemo(function SelectDropdownFn<\n V,\n Multiple extends boolean,\n>({\n id,\n value,\n onChange,\n items,\n itemToStringLabel,\n getKey,\n isItemEqual,\n isMultiple,\n placeholder,\n portalRef,\n}: InnerDropdownProps<V, Multiple>): React.ReactElement {\n return (\n <div>\n <Select.Root\n value={value}\n onValueChange={onChange}\n multiple={isMultiple}\n isItemEqualToValue={isItemEqual}\n itemToStringLabel={itemToStringLabel}\n >\n <Select.Trigger id={id} placeholder={placeholder} />\n <Select.Portal ref={portalRef}>\n <Select.Positioner>\n <Select.Popup>\n {items.map((item) => (\n <Select.Item key={getKey(item)} value={item}>\n {itemToStringLabel(item)}\n </Select.Item>\n ))}\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n </div>\n );\n});\n\nconst ComboboxDropdown = typedReactMemo(function ComboboxDropdownFn<\n V,\n Multiple extends boolean,\n>({\n id,\n value,\n onChange,\n items,\n itemToStringLabel,\n getKey,\n isItemEqual,\n isMultiple,\n placeholder,\n portalRef,\n}: InnerDropdownProps<V, Multiple>): React.ReactElement {\n const renderChips = useCallback(\n (selectedValues: V[]) => (\n <>\n {selectedValues.map((item) => (\n <Combobox.Chip\n key={getKey(item)}\n aria-label={itemToStringLabel(item)}\n >\n {itemToStringLabel(item)}\n <Combobox.ChipRemove />\n </Combobox.Chip>\n ))}\n <Combobox.Input\n placeholder={selectedValues.length > 0\n ? \"\"\n : (placeholder ?? \"Search…\")}\n />\n </>\n ),\n [getKey, itemToStringLabel, placeholder],\n );\n\n const renderItem = useCallback(\n (item: V) => (\n <Combobox.Item key={getKey(item)} value={item}>\n {itemToStringLabel(item)}\n </Combobox.Item>\n ),\n [getKey, itemToStringLabel],\n );\n\n return (\n <div>\n <Combobox.Root\n value={value}\n onValueChange={onChange}\n multiple={isMultiple}\n itemToStringLabel={itemToStringLabel}\n isItemEqualToValue={isItemEqual}\n items={items}\n >\n {isMultiple\n ? (\n <Combobox.Chips>\n <Combobox.Value>{renderChips}</Combobox.Value>\n </Combobox.Chips>\n )\n : <Combobox.Input id={id} placeholder={placeholder} />}\n <Combobox.Portal ref={portalRef}>\n <Combobox.Positioner>\n <Combobox.Popup>\n <Combobox.Empty>No results</Combobox.Empty>\n <Combobox.List>{renderItem}</Combobox.List>\n </Combobox.Popup>\n </Combobox.Positioner>\n </Combobox.Portal>\n </Combobox.Root>\n </div>\n );\n});\n\nfunction defaultItemToStringLabel<V>(item: V): string {\n if (item == null || typeof item !== \"object\") {\n return String(item);\n }\n if (\"label\" in item && item.label != null && typeof item.label === \"string\") {\n return item.label;\n }\n return String(item);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,QAAQ,QAAQ,4CAA4C;AACrE,SAASC,MAAM,QAAQ,wCAAwC;AAC/D,SAASC,cAAc,QAAQ,2BAA2B;AAG1D,MAAMC,WAAe,GAAG,EAAE;AAU1B,OAAO,SAASC,aAAaA,CAAsC;EACjEC,YAAY,GAAG,KAAK;EACpBC,iBAAiB;EACjBC,SAAS;EACTC,SAAS;EACTC,KAAK;EACL,GAAGC;AAC4B,CAAC,EAAsB;EACtD;EACA;EACA;EACA,MAAMC,eAAe,GAAIF,KAAK,KACxBC,IAAI,CAACE,UAAU,GAAGT,WAAW,GAAG,IAAI,CAAkB;EAE5D,MAAMU,yBAAyB,GAAGP,iBAAiB,IAC9CQ,wBAAwB;EAE7B,MAAMC,MAAM,GAAGhB,WAAW,CACvBiB,IAAO,IAAKT,SAAS,GAAGS,IAAI,CAAC,IAAIH,yBAAyB,CAACG,IAAI,CAAC,EACjE,CA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I,IAAI,OAAOnC,IAAI,CAACmC,KAAK,KAAK,QAAQ,EAAE;IAC3E,OAAOnC,IAAI,CAACmC,KAAK;EACnB;EACA,OAAOD,MAAM,CAAClC,IAAI,CAAC;AACrB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"DropdownField.js","names":["CaretDown","Cross","Tick","React","useCallback","useState","Combobox","comboboxStyles","Select","selectStyles","typedReactMemo","EMPTY_ARRAY","DropdownField","isSearchable","isMultiple","itemToStringLabel","itemToKey","value","rest","normalizedValue","resolvedItemToStringLabel","defaultItemToStringLabel","getKey","item","createElement","ComboboxDropdown","_extends","SelectDropdown","id","onChange","items","isItemEqual","placeholder","portalRef","open","setOpen","handleClear","Root","onValueChange","onOpenChange","isItemEqualToValue","Trigger","className","osdkSelectValueContainer","Value","osdkSelectPlaceholder","role","osdkSelectClear","onMouseDown","preventTriggerOpen","onClick","osdkSelectIcon","Portal","ref","Positioner","Popup","map","Item","key","hasValue","Array","isArray","length","cleared","handleRemoveItem","itemToRemove","next","filter","v","renderItem","renderItemWithIndicator","ItemIndicator","multiple","autoHighlight","osdkComboboxTriggerMulti","undefined","osdkComboboxValueContainer","osdkComboboxTriggerChips","osdkComboboxTriggerChip","osdkComboboxTriggerChipRemove","size","Fragment","osdkComboboxPlaceholder","osdkComboboxClear","Icon","osdkComboboxPopupSearchInput","SearchInput","Empty","List","e","stopPropagation","preventDefault","String","label"],"sources":["DropdownField.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { CaretDown, Cross, Tick } from \"@blueprintjs/icons\";\nimport React, { useCallback, useState } from \"react\";\nimport { Combobox } from \"../../base-components/combobox/Combobox.js\";\nimport comboboxStyles from \"../../base-components/combobox/Combobox.module.css\";\nimport { Select } from \"../../base-components/select/Select.js\";\nimport selectStyles from \"../../base-components/select/Select.module.css\";\nimport { typedReactMemo } from \"../../shared/typedMemo.js\";\nimport type { DropdownFieldProps } from \"../FormFieldApi.js\";\n\nconst EMPTY_ARRAY: [] = [];\n\n/**\n * SelectDropdown is only used for single-select (the multi-select path\n * always routes to ComboboxDropdown). We keep the `Multiple` generic so\n * the spread from DropdownField type-checks, but SelectDropdown never\n * reads `isMultiple`.\n */\ninterface InnerSelectProps<V, Multiple extends boolean>\n extends Omit<DropdownFieldProps<V, Multiple>, \"isSearchable\">\n{\n itemToStringLabel: (item: V) => string;\n getKey: (item: V) => string;\n}\n\ninterface InnerComboboxProps<V, Multiple extends boolean>\n extends DropdownFieldProps<V, Multiple>\n{\n itemToStringLabel: (item: V) => string;\n getKey: (item: V) => string;\n isSearchable: boolean;\n}\n\nexport function DropdownField<V, Multiple extends boolean = false>({\n isSearchable = false,\n isMultiple,\n itemToStringLabel,\n itemToKey,\n value,\n ...rest\n}: DropdownFieldProps<V, Multiple>): React.ReactElement {\n // Ensure always controlled from first render: multi-select needs [],\n // single-select needs null. Passing undefined switches Base UI from\n // uncontrolled to controlled and triggers a warning.\n const normalizedValue = (value\n ?? (isMultiple ? EMPTY_ARRAY : null)) as typeof value;\n\n const resolvedItemToStringLabel = itemToStringLabel\n ?? defaultItemToStringLabel;\n\n const getKey = useCallback(\n (item: V) => itemToKey?.(item) ?? resolvedItemToStringLabel(item),\n [itemToKey, resolvedItemToStringLabel],\n );\n\n // Multi-select always uses Combobox for the chip-based UI because it looks better\n if (isSearchable || isMultiple) {\n return (\n <ComboboxDropdown\n {...rest}\n isMultiple={isMultiple}\n value={normalizedValue}\n itemToStringLabel={resolvedItemToStringLabel}\n getKey={getKey}\n isSearchable={isSearchable}\n />\n );\n }\n\n return (\n <SelectDropdown\n {...rest}\n value={normalizedValue}\n itemToStringLabel={resolvedItemToStringLabel}\n getKey={getKey}\n />\n );\n}\n\nconst SelectDropdown = typedReactMemo(function SelectDropdownFn<\n V,\n Multiple extends boolean,\n>({\n id,\n value,\n onChange,\n items,\n itemToStringLabel,\n getKey,\n isItemEqual,\n placeholder,\n portalRef,\n}: InnerSelectProps<V, Multiple>): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n const hasValue = value != null;\n\n const handleClear = useCallback(() => {\n // SelectDropdown is always single-select, so cleared value is null.\n (onChange as ((v: V | null) => void) | undefined)?.(null);\n setOpen(false);\n }, [onChange]);\n\n return (\n <div>\n <Select.Root\n value={value}\n onValueChange={onChange}\n open={open}\n onOpenChange={setOpen}\n isItemEqualToValue={isItemEqual}\n itemToStringLabel={itemToStringLabel}\n >\n <Select.Trigger id={id} placeholder={placeholder}>\n <div className={selectStyles.osdkSelectValueContainer}>\n <Select.Value />\n {placeholder != null && (\n <span className={selectStyles.osdkSelectPlaceholder}>\n {placeholder}\n </span>\n )}\n </div>\n {hasValue && (\n <span\n role=\"button\"\n aria-label=\"Clear\"\n className={selectStyles.osdkSelectClear}\n onMouseDown={preventTriggerOpen}\n onClick={handleClear}\n >\n <Cross />\n </span>\n )}\n <span className={selectStyles.osdkSelectIcon}>\n <CaretDown />\n </span>\n </Select.Trigger>\n <Select.Portal ref={portalRef}>\n <Select.Positioner>\n <Select.Popup>\n {items.map((item) => (\n <Select.Item key={getKey(item)} value={item}>\n {itemToStringLabel(item)}\n </Select.Item>\n ))}\n </Select.Popup>\n </Select.Positioner>\n </Select.Portal>\n </Select.Root>\n </div>\n );\n});\n\nconst ComboboxDropdown = typedReactMemo(function ComboboxDropdownFn<\n V,\n Multiple extends boolean,\n>({\n id,\n value,\n onChange,\n items,\n itemToStringLabel,\n getKey,\n isItemEqual,\n isMultiple,\n isSearchable,\n placeholder,\n portalRef,\n}: InnerComboboxProps<V, Multiple>): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n const hasValue = isMultiple\n ? Array.isArray(value) && value.length > 0\n : value != null;\n\n const handleClear = useCallback(() => {\n // TypeScript can't narrow the conditional type `Multiple extends true ? V[] : V`\n // at runtime, so we cast through the known parameter type at this single call site.\n const cleared = isMultiple ? (EMPTY_ARRAY as V[]) : null;\n (onChange as ((v: V[] | V | null) => void) | undefined)?.(cleared);\n // Single-select: close after clearing. Multi-select: keep open for continued selection.\n if (!isMultiple) {\n setOpen(false);\n }\n }, [isMultiple, onChange]);\n\n const handleRemoveItem = useCallback(\n (itemToRemove: V) => {\n if (!isMultiple || !Array.isArray(value)) {\n return;\n }\n const next = value.filter((v) =>\n isItemEqual != null\n ? !isItemEqual(v, itemToRemove)\n : v !== itemToRemove\n );\n (onChange as ((v: V[] | V | null) => void) | undefined)?.(next);\n },\n [isMultiple, value, onChange, isItemEqual],\n );\n\n const renderItem = useCallback(\n (item: V) => (\n <Combobox.Item key={getKey(item)} value={item}>\n {itemToStringLabel(item)}\n </Combobox.Item>\n ),\n [getKey, itemToStringLabel],\n );\n\n const renderItemWithIndicator = useCallback(\n (item: V) => (\n <Combobox.Item key={getKey(item)} value={item}>\n <Combobox.ItemIndicator>\n <Tick />\n </Combobox.ItemIndicator>\n {itemToStringLabel(item)}\n </Combobox.Item>\n ),\n [getKey, itemToStringLabel],\n );\n\n return (\n <div>\n <Combobox.Root\n value={value}\n onValueChange={onChange}\n open={open}\n onOpenChange={setOpen}\n multiple={isMultiple}\n itemToStringLabel={itemToStringLabel}\n isItemEqualToValue={isItemEqual}\n items={items}\n autoHighlight={isSearchable}\n >\n <Combobox.Trigger\n id={id}\n className={isMultiple\n ? comboboxStyles.osdkComboboxTriggerMulti\n : undefined}\n >\n <div className={comboboxStyles.osdkComboboxValueContainer}>\n {isMultiple && Array.isArray(value) && value.length > 0\n ? (\n <div className={comboboxStyles.osdkComboboxTriggerChips}>\n {value.map((item: V) => (\n <span\n key={getKey(item)}\n className={comboboxStyles.osdkComboboxTriggerChip}\n >\n {itemToStringLabel(item)}\n <span\n role=\"button\"\n aria-label={`Remove ${itemToStringLabel(item)}`}\n className={comboboxStyles.osdkComboboxTriggerChipRemove}\n onMouseDown={preventTriggerOpen}\n onClick={() => handleRemoveItem(item)}\n >\n <Cross size={12} />\n </span>\n </span>\n ))}\n </div>\n )\n : (\n <>\n <Combobox.Value />\n {!hasValue && placeholder != null && (\n <span className={comboboxStyles.osdkComboboxPlaceholder}>\n {placeholder}\n </span>\n )}\n </>\n )}\n </div>\n {hasValue && (\n <span\n role=\"button\"\n aria-label=\"Clear\"\n className={comboboxStyles.osdkComboboxClear}\n onMouseDown={preventTriggerOpen}\n onClick={handleClear}\n >\n <Cross />\n </span>\n )}\n <Combobox.Icon>\n <CaretDown />\n </Combobox.Icon>\n </Combobox.Trigger>\n <Combobox.Portal ref={portalRef}>\n <Combobox.Positioner>\n <Combobox.Popup>\n {isSearchable && (\n <div className={comboboxStyles.osdkComboboxPopupSearchInput}>\n <Combobox.SearchInput placeholder=\"Search…\" />\n </div>\n )}\n <Combobox.Empty>No results</Combobox.Empty>\n <Combobox.List>\n {isMultiple ? renderItemWithIndicator : renderItem}\n </Combobox.List>\n </Combobox.Popup>\n </Combobox.Positioner>\n </Combobox.Portal>\n </Combobox.Root>\n </div>\n );\n});\n\n// Prevent the clear/remove click from bubbling into the trigger\n// and toggling the dropdown open/closed.\nfunction preventTriggerOpen(e: React.MouseEvent): void {\n e.stopPropagation();\n e.preventDefault();\n}\n\nfunction defaultItemToStringLabel<V>(item: V): string {\n if (item == null || typeof item !== \"object\") {\n return String(item);\n }\n if (\"label\" in item && item.label != null && typeof item.label === \"string\") {\n return item.label;\n }\n return String(item);\n}\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAS,EAAEC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AAC3D,OAAOC,KAAK,IAAIC,WAAW,EAAEC,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AAEV,CAAC,CAAC;;AAEF;AACA;AACA,SAASpB,kBAAkBA,CAACwC,CAAmB,EAAQ;EACrDA,CAAC,CAACC,eAAe,CAAC,CAAC;EACnBD,CAAC,CAACE,cAAc,CAAC,CAAC;AACpB;AAEA,SAAStE,wBAAwBA,CAAIE,IAAO,EAAU;EACpD,IAAIA,IAAI,IAAI,IAAI,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IAC5C,OAAOqE,MAAM,CAACrE,IAAI,CAAC;EACrB;EACA,IAAI,OAAO,IAAIA,IAAI,IAAIA,IAAI,CAACsE,KAAK,IAAI,IAAI,IAAI,OAAOtE,IAAI,CAACsE,KAAK,KAAK,QAAQ,EAAE;IAC3E,OAAOtE,IAAI,CAACsE,KAAK;EACnB;EACA,OAAOD,MAAM,CAACrE,IAAI,CAAC;AACrB","ignoreList":[]}
|
|
@@ -16,10 +16,30 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
import { Combobox as BaseUICombobox } from "@base-ui/react/combobox";
|
|
19
|
-
import { Cross, Search, Tick } from "@blueprintjs/icons";
|
|
19
|
+
import { CaretDown, Cross, Search, Tick } from "@blueprintjs/icons";
|
|
20
20
|
import classnames from "classnames";
|
|
21
21
|
import React from "react";
|
|
22
22
|
import styles from "./Combobox.module.css.js";
|
|
23
|
+
function ComboboxTrigger({
|
|
24
|
+
className,
|
|
25
|
+
children,
|
|
26
|
+
...rest
|
|
27
|
+
}) {
|
|
28
|
+
return /*#__PURE__*/React.createElement(BaseUICombobox.Trigger, _extends({
|
|
29
|
+
className: classnames(styles.osdkComboboxTrigger, className)
|
|
30
|
+
}, rest), children ?? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: styles.osdkComboboxValueContainer
|
|
32
|
+
}, /*#__PURE__*/React.createElement(BaseUICombobox.Value, null)), /*#__PURE__*/React.createElement(ComboboxIcon, null)));
|
|
33
|
+
}
|
|
34
|
+
function ComboboxIcon({
|
|
35
|
+
className,
|
|
36
|
+
children,
|
|
37
|
+
...rest
|
|
38
|
+
}) {
|
|
39
|
+
return /*#__PURE__*/React.createElement(BaseUICombobox.Icon, _extends({
|
|
40
|
+
className: classnames(styles.osdkComboboxIcon, className)
|
|
41
|
+
}, rest), children ?? /*#__PURE__*/React.createElement(CaretDown, null));
|
|
42
|
+
}
|
|
23
43
|
function ComboboxSearchInput({
|
|
24
44
|
className,
|
|
25
45
|
...rest
|
|
@@ -136,6 +156,8 @@ function ComboboxItemIndicator({
|
|
|
136
156
|
}
|
|
137
157
|
export const Combobox = {
|
|
138
158
|
Root: BaseUICombobox.Root,
|
|
159
|
+
Trigger: ComboboxTrigger,
|
|
160
|
+
Icon: ComboboxIcon,
|
|
139
161
|
SearchInput: ComboboxSearchInput,
|
|
140
162
|
Input: ComboboxInput,
|
|
141
163
|
Portal: BaseUICombobox.Portal,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.js","names":["Combobox","BaseUICombobox","Cross","Search","Tick","classnames","React","styles","ComboboxSearchInput","className","rest","createElement","osdkComboboxInputWrapper","osdkComboboxSearchIcon","Input","_extends","osdkComboboxInput","ComboboxInput","ComboboxPositioner","children","Positioner","osdkComboboxPositioner","sideOffset","ComboboxPopup","Popup","osdkComboboxPopup","ComboboxItem","Item","osdkComboboxItem","ComboboxChips","Chips","render","props","ComboboxChip","Chip","osdkComboboxChip","ComboboxChipRemove","ChipRemove","osdkComboboxChipRemove","ComboboxClear","Clear","osdkComboboxClear","ComboboxEmpty","Empty","osdkComboboxEmpty","ComboboxList","List","osdkComboboxList","ComboboxItemIndicator","ItemIndicator","osdkComboboxItemIndicator","keepMounted","size","Root","SearchInput","Portal","Value"],"sources":["Combobox.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Combobox as BaseUICombobox,\n type ComboboxChipProps,\n type ComboboxChipRemoveProps,\n type ComboboxClearProps,\n type ComboboxInputProps,\n type ComboboxItemIndicatorProps,\n type ComboboxItemProps,\n type ComboboxListProps,\n type ComboboxPopupProps,\n type ComboboxPositionerProps,\n} from \"@base-ui/react/combobox\";\nimport { Cross, Search, Tick } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Combobox.module.css\";\n\ninterface ComboboxInputComponentProps\n extends Omit<ComboboxInputProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxSearchInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <div className={classnames(styles.osdkComboboxInputWrapper, className)}>\n <Search className={styles.osdkComboboxSearchIcon} />\n <BaseUICombobox.Input className={styles.osdkComboboxInput} {...rest} />\n </div>\n );\n}\n\nfunction ComboboxInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Input\n className={classnames(styles.osdkComboboxInput, className)}\n {...rest}\n />\n );\n}\n\ninterface ComboboxPositionerComponentProps\n extends Omit<ComboboxPositionerProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPositioner({\n className,\n children,\n ...rest\n}: ComboboxPositionerComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Positioner\n className={classnames(styles.osdkComboboxPositioner, className)}\n sideOffset={4}\n {...rest}\n >\n {children}\n </BaseUICombobox.Positioner>\n );\n}\n\ninterface ComboboxPopupComponentProps\n extends Omit<ComboboxPopupProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPopup({\n className,\n children,\n ...rest\n}: ComboboxPopupComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Popup\n className={classnames(styles.osdkComboboxPopup, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Popup>\n );\n}\n\ninterface ComboboxItemComponentProps\n extends Omit<ComboboxItemProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...rest\n}: ComboboxItemComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Item\n className={classnames(styles.osdkComboboxItem, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Item>\n );\n}\n\nfunction ComboboxChips({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Chips\n render={(props) => (\n <div\n {...props}\n className={classnames(styles.osdkComboboxInputWrapper, className)}\n >\n {props.children}\n </div>\n )}\n >\n {children}\n </BaseUICombobox.Chips>\n );\n}\n\ninterface ComboboxChipComponentProps\n extends Omit<ComboboxChipProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChip({\n className,\n children,\n ...rest\n}: ComboboxChipComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Chip\n className={classnames(styles.osdkComboboxChip, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Chip>\n );\n}\n\ninterface ComboboxChipRemoveComponentProps\n extends Omit<ComboboxChipRemoveProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChipRemove({\n className,\n ...rest\n}: ComboboxChipRemoveComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.ChipRemove\n className={classnames(styles.osdkComboboxChipRemove, className)}\n aria-label=\"Remove\"\n {...rest}\n >\n <Cross />\n </BaseUICombobox.ChipRemove>\n );\n}\n\ninterface ComboboxClearComponentProps\n extends Omit<ComboboxClearProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxClear({\n className,\n ...rest\n}: ComboboxClearComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Clear\n className={classnames(styles.osdkComboboxClear, className)}\n aria-label=\"Clear all\"\n {...rest}\n >\n <Cross />\n </BaseUICombobox.Clear>\n );\n}\n\nfunction ComboboxEmpty({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Empty\n className={classnames(styles.osdkComboboxEmpty, className)}\n >\n {children}\n </BaseUICombobox.Empty>\n );\n}\n\ninterface ComboboxListComponentProps\n extends Omit<ComboboxListProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxList({\n className,\n children,\n ...rest\n}: ComboboxListComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.List\n className={classnames(styles.osdkComboboxList, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.List>\n );\n}\n\ninterface ComboboxItemIndicatorComponentProps\n extends Omit<ComboboxItemIndicatorProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxItemIndicator({\n className,\n children,\n ...rest\n}: ComboboxItemIndicatorComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.ItemIndicator\n className={classnames(styles.osdkComboboxItemIndicator, className)}\n keepMounted={true}\n {...rest}\n >\n {children ?? <Tick size={16} />}\n </BaseUICombobox.ItemIndicator>\n );\n}\n\nexport const Combobox: {\n Root: typeof BaseUICombobox.Root;\n SearchInput: typeof ComboboxSearchInput;\n Input: typeof ComboboxInput;\n Portal: typeof BaseUICombobox.Portal;\n Positioner: typeof ComboboxPositioner;\n Popup: typeof ComboboxPopup;\n List: typeof ComboboxList;\n Item: typeof ComboboxItem;\n ItemIndicator: typeof ComboboxItemIndicator;\n Chips: typeof ComboboxChips;\n Chip: typeof ComboboxChip;\n ChipRemove: typeof ComboboxChipRemove;\n Clear: typeof ComboboxClear;\n Empty: typeof ComboboxEmpty;\n Value: typeof BaseUICombobox.Value;\n} = {\n Root: BaseUICombobox.Root,\n SearchInput: ComboboxSearchInput,\n Input: ComboboxInput,\n Portal: BaseUICombobox.Portal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Item: ComboboxItem,\n ItemIndicator: ComboboxItemIndicator,\n Chips: ComboboxChips,\n Chip: ComboboxChip,\n ChipRemove: ComboboxChipRemove,\n Clear: ComboboxClear,\n Empty: ComboboxEmpty,\n Value: BaseUICombobox.Value,\n};\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,QAAQ,IAAIC,cAAc,QAUrB,yBAAyB;AAChC,SAASC,KAAK,EAAEC,MAAM,EAAEC,IAAI,QAAQ,oBAAoB;AACxD,OAAOC,UAAU,MAAM,YAAY;AACnC,OAAOC,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,uBAAuB;AAQ1C,SAASC,mBAAmBA,CAAC;EAC3BC,SAAS;EACT,GAAGC;AACwB,CAAC,EAAsB;EAClD,oBACEJ,KAAA,CAAAK,aAAA;IAAKF,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACK,wBAAwB,EAAEH,SAAS;EAAE,gBACrEH,KAAA,CAAAK,aAAA,CAACR,MAAM;IAACM,SAAS,EAAEF,MAAM,CAACM;EAAuB,CAAE,CAAC,eACpDP,KAAA,CAAAK,aAAA,CAACV,cAAc,CAACa,KAAK,EAAAC,QAAA;IAACN,SAAS,EAAEF,MAAM,CAACS;EAAkB,GAAKN,IAAI,CAAG,CACnE,CAAC;AAEV;AAEA,SAASO,aAAaA,CAAC;EACrBR,SAAS;EACT,GAAGC;AACwB,CAAC,EAAsB;EAClD,oBACEJ,KAAA,CAAAK,aAAA,CAACV,cAAc,CAACa,KAAK,EAAAC,QAAA;IACnBN,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAACS,iBAAiB,EAAEP,SAAS;EAAE,GACvDC,IAAI,CACT,CAAC;AAEN;AAQA,SAASQ,kBAAkBA,CAAC;EAC1BT,SAAS;EACTU,QAAQ;EACR,GAAGT;AAC6B,CAAC,EAAsB;EACvD,oBACE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AE,GACtDC,IAAI,GAEPS,QACkB,CAAC;AAE1B;AAQA,SAAS6B,qBAAqBA,CAAC;EAC7BvC,SAAS;EACTU,QAAQ;EACR,GAAGT;AACgC,CAAC,EAAsB;EAC1D,oBACEJ,KAAA,CAAAK,aAAA,CAACV,cAAc,CAACgD,aAAa,EAAAlC,QAAA;IAC3BN,SAAS,EAAEJ,UAAU,CAACE,MAAM,CAAC2C,yBAAyB,EAAEzC,SAAS,CAAE;IACnE0C,WAAW,EAAE;EAAK,GACdzC,IAAI,GAEPS,QAAQ,iBAAIb,KAAA,CAAAK,aAAA,CAACP,IAAI;IAACgD,IAAI,EAAE;EAAG,CAAE,CACF,CAAC;AAEnC;AAEA,OAAO,MAAMpD,QAgBZ,GAAG;EACFqD,IAAI,EAAEpD,cAAc,CAACoD,IAAI;EACzBC,WAAW,EAAE9C,mBAAmB;EAChCM,KAAK,EAAEG,aAAa;EACpBsC,MAAM,EAAEtD,cAAc,CAACsD,MAAM;EAC7BnC,UAAU,EAAEF,kBAAkB;EAC9BM,KAAK,EAAED,aAAa;EACpBuB,IAAI,EAAED,YAAY;EAClBlB,IAAI,EAAED,YAAY;EAClBuB,aAAa,EAAED,qBAAqB;EACpClB,KAAK,EAAED,aAAa;EACpBK,IAAI,EAAED,YAAY;EAClBI,UAAU,EAAED,kBAAkB;EAC9BI,KAAK,EAAED,aAAa;EACpBI,KAAK,EAAED,aAAa;EACpBc,KAAK,EAAEvD,cAAc,CAACuD;AACxB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Combobox.js","names":["Combobox","BaseUICombobox","CaretDown","Cross","Search","Tick","classnames","React","styles","ComboboxTrigger","className","children","rest","createElement","Trigger","_extends","osdkComboboxTrigger","Fragment","osdkComboboxValueContainer","Value","ComboboxIcon","Icon","osdkComboboxIcon","ComboboxSearchInput","osdkComboboxInputWrapper","osdkComboboxSearchIcon","Input","osdkComboboxInput","ComboboxInput","ComboboxPositioner","Positioner","osdkComboboxPositioner","sideOffset","ComboboxPopup","Popup","osdkComboboxPopup","ComboboxItem","Item","osdkComboboxItem","ComboboxChips","Chips","render","props","ComboboxChip","Chip","osdkComboboxChip","ComboboxChipRemove","ChipRemove","osdkComboboxChipRemove","ComboboxClear","Clear","osdkComboboxClear","ComboboxEmpty","Empty","osdkComboboxEmpty","ComboboxList","List","osdkComboboxList","ComboboxItemIndicator","ItemIndicator","osdkComboboxItemIndicator","keepMounted","size","Root","SearchInput","Portal"],"sources":["Combobox.tsx"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n Combobox as BaseUICombobox,\n type ComboboxChipProps,\n type ComboboxChipRemoveProps,\n type ComboboxClearProps,\n type ComboboxIconProps,\n type ComboboxInputProps,\n type ComboboxItemIndicatorProps,\n type ComboboxItemProps,\n type ComboboxListProps,\n type ComboboxPopupProps,\n type ComboboxPositionerProps,\n type ComboboxTriggerProps,\n} from \"@base-ui/react/combobox\";\nimport { CaretDown, Cross, Search, Tick } from \"@blueprintjs/icons\";\nimport classnames from \"classnames\";\nimport React from \"react\";\nimport styles from \"./Combobox.module.css\";\n\ninterface ComboboxTriggerComponentProps\n extends Omit<ComboboxTriggerProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxTrigger({\n className,\n children,\n ...rest\n}: ComboboxTriggerComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Trigger\n className={classnames(styles.osdkComboboxTrigger, className)}\n {...rest}\n >\n {children ?? (\n <>\n <div className={styles.osdkComboboxValueContainer}>\n <BaseUICombobox.Value />\n </div>\n <ComboboxIcon />\n </>\n )}\n </BaseUICombobox.Trigger>\n );\n}\n\ninterface ComboboxIconComponentProps\n extends Omit<ComboboxIconProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxIcon({\n className,\n children,\n ...rest\n}: ComboboxIconComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Icon\n className={classnames(styles.osdkComboboxIcon, className)}\n {...rest}\n >\n {children ?? <CaretDown />}\n </BaseUICombobox.Icon>\n );\n}\n\ninterface ComboboxInputComponentProps\n extends Omit<ComboboxInputProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxSearchInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <div className={classnames(styles.osdkComboboxInputWrapper, className)}>\n <Search className={styles.osdkComboboxSearchIcon} />\n <BaseUICombobox.Input className={styles.osdkComboboxInput} {...rest} />\n </div>\n );\n}\n\nfunction ComboboxInput({\n className,\n ...rest\n}: ComboboxInputComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Input\n className={classnames(styles.osdkComboboxInput, className)}\n {...rest}\n />\n );\n}\n\ninterface ComboboxPositionerComponentProps\n extends Omit<ComboboxPositionerProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPositioner({\n className,\n children,\n ...rest\n}: ComboboxPositionerComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Positioner\n className={classnames(styles.osdkComboboxPositioner, className)}\n sideOffset={4}\n {...rest}\n >\n {children}\n </BaseUICombobox.Positioner>\n );\n}\n\ninterface ComboboxPopupComponentProps\n extends Omit<ComboboxPopupProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxPopup({\n className,\n children,\n ...rest\n}: ComboboxPopupComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Popup\n className={classnames(styles.osdkComboboxPopup, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Popup>\n );\n}\n\ninterface ComboboxItemComponentProps\n extends Omit<ComboboxItemProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxItem({\n className,\n children,\n ...rest\n}: ComboboxItemComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Item\n className={classnames(styles.osdkComboboxItem, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Item>\n );\n}\n\nfunction ComboboxChips({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Chips\n render={(props) => (\n <div\n {...props}\n className={classnames(styles.osdkComboboxInputWrapper, className)}\n >\n {props.children}\n </div>\n )}\n >\n {children}\n </BaseUICombobox.Chips>\n );\n}\n\ninterface ComboboxChipComponentProps\n extends Omit<ComboboxChipProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChip({\n className,\n children,\n ...rest\n}: ComboboxChipComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Chip\n className={classnames(styles.osdkComboboxChip, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.Chip>\n );\n}\n\ninterface ComboboxChipRemoveComponentProps\n extends Omit<ComboboxChipRemoveProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxChipRemove({\n className,\n ...rest\n}: ComboboxChipRemoveComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.ChipRemove\n className={classnames(styles.osdkComboboxChipRemove, className)}\n aria-label=\"Remove\"\n {...rest}\n >\n <Cross />\n </BaseUICombobox.ChipRemove>\n );\n}\n\ninterface ComboboxClearComponentProps\n extends Omit<ComboboxClearProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxClear({\n className,\n ...rest\n}: ComboboxClearComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.Clear\n className={classnames(styles.osdkComboboxClear, className)}\n aria-label=\"Clear all\"\n {...rest}\n >\n <Cross />\n </BaseUICombobox.Clear>\n );\n}\n\nfunction ComboboxEmpty({\n children,\n className,\n}: {\n children: React.ReactNode;\n className?: string;\n}): React.ReactElement {\n return (\n <BaseUICombobox.Empty\n className={classnames(styles.osdkComboboxEmpty, className)}\n >\n {children}\n </BaseUICombobox.Empty>\n );\n}\n\ninterface ComboboxListComponentProps\n extends Omit<ComboboxListProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxList({\n className,\n children,\n ...rest\n}: ComboboxListComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.List\n className={classnames(styles.osdkComboboxList, className)}\n {...rest}\n >\n {children}\n </BaseUICombobox.List>\n );\n}\n\ninterface ComboboxItemIndicatorComponentProps\n extends Omit<ComboboxItemIndicatorProps, \"className\">\n{\n className?: string;\n}\n\nfunction ComboboxItemIndicator({\n className,\n children,\n ...rest\n}: ComboboxItemIndicatorComponentProps): React.ReactElement {\n return (\n <BaseUICombobox.ItemIndicator\n className={classnames(styles.osdkComboboxItemIndicator, className)}\n keepMounted={true}\n {...rest}\n >\n {children ?? <Tick size={16} />}\n </BaseUICombobox.ItemIndicator>\n );\n}\n\nexport const Combobox: {\n Root: typeof BaseUICombobox.Root;\n Trigger: typeof ComboboxTrigger;\n Icon: typeof ComboboxIcon;\n SearchInput: typeof ComboboxSearchInput;\n Input: typeof ComboboxInput;\n Portal: typeof BaseUICombobox.Portal;\n Positioner: typeof ComboboxPositioner;\n Popup: typeof ComboboxPopup;\n List: typeof ComboboxList;\n Item: typeof ComboboxItem;\n ItemIndicator: typeof ComboboxItemIndicator;\n Chips: typeof ComboboxChips;\n Chip: typeof ComboboxChip;\n ChipRemove: typeof ComboboxChipRemove;\n Clear: typeof ComboboxClear;\n Empty: typeof ComboboxEmpty;\n Value: typeof BaseUICombobox.Value;\n} = {\n Root: BaseUICombobox.Root,\n Trigger: ComboboxTrigger,\n Icon: ComboboxIcon,\n SearchInput: ComboboxSearchInput,\n Input: ComboboxInput,\n Portal: BaseUICombobox.Portal,\n Positioner: ComboboxPositioner,\n Popup: ComboboxPopup,\n List: ComboboxList,\n Item: ComboboxItem,\n ItemIndicator: ComboboxItemIndicator,\n Chips: ComboboxChips,\n Chip: ComboboxChip,\n ChipRemove: ComboboxChipRemove,\n Cl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