@estiva-app/ui 0.60.0 → 0.60.1
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/TopBar.d.ts +5 -0
- package/dist/TopBar.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/registry.json +1 -1
- package/src/TopBar.mdx +2 -0
- package/src/TopBar.test.tsx +24 -0
- package/src/TopBar.tsx +6 -1
package/dist/TopBar.d.ts
CHANGED
|
@@ -26,6 +26,11 @@ import { type ReactNode } from 'react';
|
|
|
26
26
|
* app searches with — and Ctrl+K (Cmd+K on a Mac) presses it from anywhere.
|
|
27
27
|
* Before, every app drew its own field and listened for the keys itself.
|
|
28
28
|
* A `search` of the caller's own still takes the centre.
|
|
29
|
+
*
|
|
30
|
+
* **A click leaves focus where it was**, as Peek's field did: what searching
|
|
31
|
+
* opens often acts on what you were in — Peek's launcher reads the composer
|
|
32
|
+
* you were typing in and its selection — and taking focus would leave it
|
|
33
|
+
* nothing. Tab still reaches the field, and Enter or Space presses it.
|
|
29
34
|
*/
|
|
30
35
|
export interface TopBarProps {
|
|
31
36
|
variant?: 'solid' | 'floating' | 'inset';
|
package/dist/TopBar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../src/TopBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAOzD
|
|
1
|
+
{"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../src/TopBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAOzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,CAAA;IACxC,oHAAoH;IACpH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,wEAAwE;IACxE,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,kHAAkH;IAClH,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,gIAAgI;IAChI,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,kEAAkE;IAClE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,gEAAgE;IAChE,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,MAAM,CAAC,EAAE,OAAiB,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAA6B,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,WAAW,+BAgDvI"}
|
package/dist/index.js
CHANGED
|
@@ -286,7 +286,7 @@ function TopBar({ variant = "solid", menu, logo, search, onSearch, searchPlaceho
|
|
|
286
286
|
window.addEventListener("keydown", onKey);
|
|
287
287
|
return () => window.removeEventListener("keydown", onKey);
|
|
288
288
|
}, [searches]);
|
|
289
|
-
const centre = search ?? (onSearch && /* @__PURE__ */ jsxs2(BaseButton, { type: "button", onClick: onSearch, className: cn("flex w-[290px] cursor-pointer items-center gap-2 px-3 py-2", FIELD_SHELL_CLASSES), children: [
|
|
289
|
+
const centre = search ?? (onSearch && /* @__PURE__ */ jsxs2(BaseButton, { type: "button", onMouseDown: (event) => event.preventDefault(), onClick: onSearch, className: cn("flex w-[290px] cursor-pointer items-center gap-2 px-3 py-2", FIELD_SHELL_CLASSES), children: [
|
|
290
290
|
/* @__PURE__ */ jsx7("span", { className: "min-w-0 flex-1 truncate text-left text-input-value text-text-muted", children: searchPlaceholder }),
|
|
291
291
|
/* @__PURE__ */ jsx7(Kbd, { children: shortcutLabel("Mod-K") })
|
|
292
292
|
] }));
|