@transferwise/components 0.0.0-experimental-64452da → 0.0.0-experimental-e3bf70c
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/build/index.esm.js +3 -3
- package/build/index.esm.js.map +1 -1
- package/build/index.js +3 -3
- package/build/index.js.map +1 -1
- package/build/types/typeahead/util/highlight.d.ts +1 -1
- package/build/types/typeahead/util/highlight.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/typeahead/typeaheadOption/TypeaheadOption.js +3 -3
- package/src/typeahead/util/highlight.js +1 -1
package/build/index.esm.js
CHANGED
|
@@ -12471,7 +12471,7 @@ TypeaheadInput.defaultProps = {
|
|
|
12471
12471
|
selected: []
|
|
12472
12472
|
};
|
|
12473
12473
|
|
|
12474
|
-
function
|
|
12474
|
+
function highlight(value, query) {
|
|
12475
12475
|
if (value && query) {
|
|
12476
12476
|
const highlightStart = value.toUpperCase().indexOf(query.trim().toUpperCase());
|
|
12477
12477
|
const highlightEnd = highlightStart + query.trim().length;
|
|
@@ -12511,13 +12511,13 @@ const Option = props => {
|
|
|
12511
12511
|
tabIndex: -1,
|
|
12512
12512
|
onClick: onClick,
|
|
12513
12513
|
children: [/*#__PURE__*/jsx("span", {
|
|
12514
|
-
children:
|
|
12514
|
+
children: highlight(label, query)
|
|
12515
12515
|
}), note && /*#__PURE__*/jsx("span", {
|
|
12516
12516
|
className: "np-text-body-default m-l-1",
|
|
12517
12517
|
children: note
|
|
12518
12518
|
}), secondary && /*#__PURE__*/jsx("span", {
|
|
12519
12519
|
className: "np-text-body-default text-ellipsis",
|
|
12520
|
-
children:
|
|
12520
|
+
children: highlight(secondary, query)
|
|
12521
12521
|
})]
|
|
12522
12522
|
})
|
|
12523
12523
|
});
|