@deque/cauldron-react 6.27.0-canary.06fc1451 → 6.27.0-canary.0f500709
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/lib/index.js +11 -11
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -4602,16 +4602,6 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
4602
4602
|
: ComboboxNoResults;
|
|
4603
4603
|
}, [renderNoResults]);
|
|
4604
4604
|
var noMatchingOptions = !!inputValue && !matchingOptions.size && (React__default["default"].createElement(NoMatchingOptions, null));
|
|
4605
|
-
var comboboxListbox = (
|
|
4606
|
-
// eslint-disable-next-line
|
|
4607
|
-
// @ts-expect-error
|
|
4608
|
-
// multiselect & value props are passed to Listbox, but TS is unable to infer that
|
|
4609
|
-
// it's a correct mapping from Combobox's multiselect & value props
|
|
4610
|
-
React__default["default"].createElement(Listbox, { className: classNames__default["default"]('Combobox__listbox', {
|
|
4611
|
-
'Combobox__listbox--open': open
|
|
4612
|
-
}), role: noMatchingOptions ? 'presentation' : 'listbox', "aria-labelledby": noMatchingOptions ? undefined : "".concat(id, "-label"), id: "".concat(id, "-listbox"), value: multiselect ? selectedValues : selectedValues[0], onMouseDown: handleComboboxOptionMouseDown, onClick: handleComboboxOptionClick, onSelectionChange: handleSelectionChange, onActiveChange: handleActiveChange, ref: listboxRef, tabIndex: noMatchingOptions ? undefined : -1, "aria-activedescendant": undefined, multiselect: multiselect, disabled: disabled },
|
|
4613
|
-
comboboxOptions,
|
|
4614
|
-
noMatchingOptions));
|
|
4615
4605
|
var errorId = "".concat(id, "-error");
|
|
4616
4606
|
var descriptionId = "".concat(id, "-description");
|
|
4617
4607
|
var describedby = ariaDescribedby;
|
|
@@ -4622,6 +4612,16 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
4622
4612
|
describedby = addIdRef(describedby, errorId);
|
|
4623
4613
|
}
|
|
4624
4614
|
var inputProps = tslib.__assign(tslib.__assign({}, props), { 'aria-describedby': describedby });
|
|
4615
|
+
var comboboxListbox = (
|
|
4616
|
+
// eslint-disable-next-line
|
|
4617
|
+
// @ts-expect-error
|
|
4618
|
+
// multiselect & value props are passed to Listbox, but TS is unable to infer that
|
|
4619
|
+
// it's a correct mapping from Combobox's multiselect & value props
|
|
4620
|
+
React__default["default"].createElement(Listbox, { className: classNames__default["default"]('Combobox__listbox', {
|
|
4621
|
+
'Combobox__listbox--open': open
|
|
4622
|
+
}), role: noMatchingOptions ? 'presentation' : 'listbox', "aria-labelledby": noMatchingOptions ? undefined : "".concat(id, "-label"), "aria-describedby": describedby, id: "".concat(id, "-listbox"), value: multiselect ? selectedValues : selectedValues[0], onMouseDown: handleComboboxOptionMouseDown, onClick: handleComboboxOptionClick, onSelectionChange: handleSelectionChange, onActiveChange: handleActiveChange, ref: listboxRef, tabIndex: noMatchingOptions ? undefined : -1, "aria-activedescendant": undefined, multiselect: multiselect, disabled: disabled },
|
|
4623
|
+
comboboxOptions,
|
|
4624
|
+
noMatchingOptions));
|
|
4625
4625
|
return (React__default["default"].createElement("div", { id: id, className: classNames__default["default"]('Combobox', { 'Combobox--multiselect': multiselect }, className), ref: comboboxRef },
|
|
4626
4626
|
name &&
|
|
4627
4627
|
formValues.map(function (formValue, index) { return (React__default["default"].createElement("input", { type: "hidden", key: index, name: name, value: formValue })); }),
|
|
@@ -4654,7 +4654,7 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
4654
4654
|
};
|
|
4655
4655
|
return (React__default["default"].createElement(ComboboxPill, { ref: refCallback, key: value, value: value, removeOptionLabel: removeOptionLabels[index], disabled: disabled, onClick: handleClick, onKeyDown: handlePillKeyDown }));
|
|
4656
4656
|
}),
|
|
4657
|
-
React__default["default"].createElement("input", tslib.__assign({ type: "text", id: "".concat(id, "-input"), ref: inputRef, value: inputValue, role: "combobox", disabled: disabled, "aria-autocomplete": !isAutoComplete ? 'none' : 'list', "aria-controls": "".concat(id, "-listbox"), "aria-expanded": open, "aria-haspopup": "listbox", "aria-activedescendant": open && activeDescendant ? activeDescendant.element.id : undefined }, inputProps, { onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur })),
|
|
4657
|
+
React__default["default"].createElement("input", tslib.__assign({ type: "text", id: "".concat(id, "-input"), ref: inputRef, value: inputValue, role: "combobox", disabled: disabled, "aria-invalid": error ? true : undefined, "aria-autocomplete": !isAutoComplete ? 'none' : 'list', "aria-controls": "".concat(id, "-listbox"), "aria-expanded": open, "aria-haspopup": "listbox", "aria-activedescendant": open && activeDescendant ? activeDescendant.element.id : undefined }, inputProps, { onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur })),
|
|
4658
4658
|
React__default["default"].createElement("span", { className: "Combobox__arrow" })),
|
|
4659
4659
|
React__default["default"].createElement(ComboboxProvider, { autocomplete: autocomplete, inputValue: inputValue, formValues: formValues, selectedValues: selectedValues, removeOptionLabels: removeOptionLabels, setRemoveOptionLabels: setRemoveOptionLabels, matches: !isAutoComplete || defaultAutoCompleteMatches, matchingOptions: matchingOptions, setMatchingOptions: setMatchingOptions, setFormValues: setFormValues }, portal && typeof document !== 'undefined'
|
|
4660
4660
|
? reactDom.createPortal(comboboxListbox,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deque/cauldron-react",
|
|
3
|
-
"version": "6.27.0-canary.
|
|
3
|
+
"version": "6.27.0-canary.0f500709",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Fully accessible react components library for Deque Cauldron",
|
|
6
6
|
"homepage": "https://cauldron.dequelabs.com/",
|