@transferwise/components 0.0.0-experimental-e3bf70c → 0.0.0-experimental-f329a06
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 +4 -4
- package/src/typeahead/typeaheadOption/TypeaheadOption.js +3 -3
- package/src/typeahead/util/highlight.js +1 -1
package/build/index.js
CHANGED
|
@@ -12505,7 +12505,7 @@ TypeaheadInput.defaultProps = {
|
|
|
12505
12505
|
selected: []
|
|
12506
12506
|
};
|
|
12507
12507
|
|
|
12508
|
-
function
|
|
12508
|
+
function hightlight(value, query) {
|
|
12509
12509
|
if (value && query) {
|
|
12510
12510
|
const highlightStart = value.toUpperCase().indexOf(query.trim().toUpperCase());
|
|
12511
12511
|
const highlightEnd = highlightStart + query.trim().length;
|
|
@@ -12545,13 +12545,13 @@ const Option = props => {
|
|
|
12545
12545
|
tabIndex: -1,
|
|
12546
12546
|
onClick: onClick,
|
|
12547
12547
|
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
12548
|
-
children:
|
|
12548
|
+
children: hightlight(label, query)
|
|
12549
12549
|
}), note && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
12550
12550
|
className: "np-text-body-default m-l-1",
|
|
12551
12551
|
children: note
|
|
12552
12552
|
}), secondary && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
12553
12553
|
className: "np-text-body-default text-ellipsis",
|
|
12554
|
-
children:
|
|
12554
|
+
children: hightlight(secondary, query)
|
|
12555
12555
|
})]
|
|
12556
12556
|
})
|
|
12557
12557
|
});
|