@star-insure/sdk 3.2.1 → 3.2.3
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/sdk.cjs.development.js +26 -3
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +26 -3
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types/misc/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/filter/PageHeader.tsx +9 -2
- package/src/components/filter/SearchBar.tsx +18 -1
- package/src/types/misc/index.ts +1 -1
|
@@ -2305,6 +2305,22 @@ function SearchBar(_ref) {
|
|
|
2305
2305
|
onActive(true);
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
|
+
|
|
2309
|
+
var listener = function listener(e) {
|
|
2310
|
+
if (e.key === '/') {
|
|
2311
|
+
e.preventDefault();
|
|
2312
|
+
onActive(true);
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
if (e.key === 'Escape') {
|
|
2316
|
+
onActive(false);
|
|
2317
|
+
}
|
|
2318
|
+
};
|
|
2319
|
+
|
|
2320
|
+
window.addEventListener('keydown', listener);
|
|
2321
|
+
return function () {
|
|
2322
|
+
window.removeEventListener('keydown', listener);
|
|
2323
|
+
};
|
|
2308
2324
|
}, []);
|
|
2309
2325
|
/**
|
|
2310
2326
|
* Minimise the search bar on click outside if there's no search query
|
|
@@ -2345,7 +2361,7 @@ function SearchBar(_ref) {
|
|
|
2345
2361
|
onClick: function onClick() {
|
|
2346
2362
|
return onActive(true);
|
|
2347
2363
|
},
|
|
2348
|
-
className: "flex items-center justify-center rounded-full hover:text-teal p-1
|
|
2364
|
+
className: "flex items-center justify-center rounded-full hover:text-teal p-1 hover:bg-gray-100"
|
|
2349
2365
|
}, React__default.createElement(hi2.HiMagnifyingGlass, {
|
|
2350
2366
|
className: "h-5 w-5 stroke-[1.25]"
|
|
2351
2367
|
})), active && React__default.createElement("form", {
|
|
@@ -2908,8 +2924,15 @@ function PageHeader(_ref) {
|
|
|
2908
2924
|
className: "bg-gray-100 h-[60px] w-[60px] rounded"
|
|
2909
2925
|
}), React__default.createElement("div", {
|
|
2910
2926
|
className: cn('w-full grid grid-cols-[auto_1fr_auto] h-[60px] rounded bg-gray-100 p-3 gap-4', innerClassName)
|
|
2911
|
-
}, React__default.createElement("
|
|
2912
|
-
|
|
2927
|
+
}, React__default.createElement("button", {
|
|
2928
|
+
type: "button",
|
|
2929
|
+
disabled: !search,
|
|
2930
|
+
onClick: function onClick() {
|
|
2931
|
+
return setSearchActive(true);
|
|
2932
|
+
},
|
|
2933
|
+
className: cn('mr-auto flex items-center gap-4 transition-colors pr-6 pl-1 disabled:opacity-100', {
|
|
2934
|
+
'hover:text-teal': search && !isSearchActive
|
|
2935
|
+
})
|
|
2913
2936
|
}, search && React__default.createElement(SearchBar, {
|
|
2914
2937
|
search: search,
|
|
2915
2938
|
active: isSearchActive,
|