@burdenoff/fe-libs 2026.710.6 → 2026.710.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ProductPickerSheet.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductPickerSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3C,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAyF1D,CAAC"}
1
+ {"version":3,"file":"ProductPickerSheet.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductPickerSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAO3C,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC9C;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAsI1D,CAAC"}
@@ -1,75 +1,111 @@
1
1
  import { Sheet as e, SheetContent as t, SheetHeader as n, SheetTitle as r } from "../ui/sheet.js";
2
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
2
+ import { filterProducts as i } from "./ProductSwitcher.js";
3
+ import { useMemo as a, useState as o } from "react";
4
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
3
5
  //#region src/chrome/ProductPickerSheet.tsx
4
- var o = ({ open: o, onOpenChange: s, products: c, currentProductId: l, onProductChange: u }) => {
5
- let d = (e) => {
6
- u && u(e), s(!1);
6
+ var l = 6, u = ({ open: u, onOpenChange: d, products: f, currentProductId: p, onProductChange: m }) => {
7
+ let [h, g] = o(""), _ = f.length > l, v = a(() => i(f, h), [f, h]), y = (e) => {
8
+ m && m(e), d(!1);
7
9
  };
8
- return /* @__PURE__ */ i(e, {
9
- open: o,
10
- onOpenChange: s,
11
- children: /* @__PURE__ */ a(t, {
10
+ return /* @__PURE__ */ s(e, {
11
+ open: u,
12
+ onOpenChange: (e) => {
13
+ e || g(""), d(e);
14
+ },
15
+ children: /* @__PURE__ */ c(t, {
12
16
  side: "bottom",
13
17
  className: "h-[60vh] flex flex-col p-0",
14
- children: [/* @__PURE__ */ i(n, {
15
- className: "px-4 pt-4 pb-2 border-b border-border-subtle",
16
- children: /* @__PURE__ */ i(r, {
17
- className: "text-text-primary",
18
- children: "Switch Product"
19
- })
20
- }), /* @__PURE__ */ i("div", {
21
- className: "flex-1 overflow-y-auto py-2",
22
- children: c.map((e) => /* @__PURE__ */ a("button", {
23
- onClick: () => d(e),
24
- className: `w-full flex items-center gap-4 px-4 py-3.5 text-body-sm transition-colors ${e.id === l ? "bg-[var(--color-accent-soft)]" : "hover:bg-bg-sunken"}`,
25
- children: [
26
- e.icon ? /* @__PURE__ */ i("div", {
27
- className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center flex-shrink-0",
28
- children: e.icon
29
- }) : /* @__PURE__ */ i("div", {
30
- className: "size-10 rounded-lg bg-action-primary-bg flex items-center justify-center flex-shrink-0",
31
- children: /* @__PURE__ */ i("span", {
32
- className: "text-action-primary-text font-bold text-sm",
33
- children: e.name.substring(0, 2).toUpperCase()
34
- })
35
- }),
36
- /* @__PURE__ */ a("div", {
37
- className: "flex-1 text-left min-w-0",
38
- children: [/* @__PURE__ */ i("p", {
39
- className: "font-medium text-text-primary",
40
- children: e.name
41
- }), e.description && /* @__PURE__ */ i("p", {
42
- className: "text-xs text-text-secondary truncate",
43
- children: e.description
44
- })]
45
- }),
46
- e.id === l && /* @__PURE__ */ i("svg", {
47
- className: "size-5 text-action-primary-bg flex-shrink-0",
48
- fill: "currentColor",
49
- viewBox: "0 0 20 20",
50
- children: /* @__PURE__ */ i("path", {
51
- fillRule: "evenodd",
52
- d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
53
- clipRule: "evenodd"
54
- })
55
- }),
56
- e.url && e.id !== l && /* @__PURE__ */ i("svg", {
57
- className: "size-4 text-text-muted flex-shrink-0",
58
- fill: "none",
59
- stroke: "currentColor",
60
- viewBox: "0 0 24 24",
61
- children: /* @__PURE__ */ i("path", {
62
- strokeLinecap: "round",
63
- strokeLinejoin: "round",
64
- strokeWidth: 2,
65
- d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
66
- })
18
+ children: [
19
+ /* @__PURE__ */ s(n, {
20
+ className: "px-4 pt-4 pb-2 border-b border-border-subtle",
21
+ children: /* @__PURE__ */ s(r, {
22
+ className: "text-text-primary",
23
+ children: "Switch Product"
24
+ })
25
+ }),
26
+ _ && /* @__PURE__ */ c("div", {
27
+ className: "relative px-4 py-2 border-b border-border-subtle",
28
+ children: [/* @__PURE__ */ s("svg", {
29
+ className: "pointer-events-none absolute left-7 top-1/2 -translate-y-1/2 size-4 text-text-muted",
30
+ fill: "none",
31
+ stroke: "currentColor",
32
+ viewBox: "0 0 24 24",
33
+ children: /* @__PURE__ */ s("path", {
34
+ strokeLinecap: "round",
35
+ strokeLinejoin: "round",
36
+ strokeWidth: 2,
37
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
67
38
  })
68
- ]
69
- }, e.id))
70
- })]
39
+ }), /* @__PURE__ */ s("input", {
40
+ type: "text",
41
+ value: h,
42
+ onChange: (e) => g(e.target.value),
43
+ placeholder: "Search products…",
44
+ "aria-label": "Search products",
45
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface py-2.5 pl-9 pr-3 text-sm text-text-primary placeholder:text-text-muted focus:border-transparent focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-border)]"
46
+ })]
47
+ }),
48
+ /* @__PURE__ */ c("div", {
49
+ className: "flex-1 overflow-y-auto py-2",
50
+ children: [v.length === 0 && /* @__PURE__ */ c("p", {
51
+ className: "px-4 py-6 text-center text-body-sm text-text-muted",
52
+ children: [
53
+ "No products match “",
54
+ h,
55
+ "”"
56
+ ]
57
+ }), v.map((e) => /* @__PURE__ */ c("button", {
58
+ onClick: () => y(e),
59
+ className: `w-full flex items-center gap-4 px-4 py-3.5 text-body-sm transition-colors ${e.id === p ? "bg-[var(--color-accent-soft)]" : "hover:bg-bg-sunken"}`,
60
+ children: [
61
+ e.icon ? /* @__PURE__ */ s("div", {
62
+ className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center flex-shrink-0",
63
+ children: e.icon
64
+ }) : /* @__PURE__ */ s("div", {
65
+ className: "size-10 rounded-lg bg-action-primary-bg flex items-center justify-center flex-shrink-0",
66
+ children: /* @__PURE__ */ s("span", {
67
+ className: "text-action-primary-text font-bold text-sm",
68
+ children: e.name.substring(0, 2).toUpperCase()
69
+ })
70
+ }),
71
+ /* @__PURE__ */ c("div", {
72
+ className: "flex-1 text-left min-w-0",
73
+ children: [/* @__PURE__ */ s("p", {
74
+ className: "font-medium text-text-primary",
75
+ children: e.name
76
+ }), e.description && /* @__PURE__ */ s("p", {
77
+ className: "text-xs text-text-secondary truncate",
78
+ children: e.description
79
+ })]
80
+ }),
81
+ e.id === p && /* @__PURE__ */ s("svg", {
82
+ className: "size-5 text-action-primary-bg flex-shrink-0",
83
+ fill: "currentColor",
84
+ viewBox: "0 0 20 20",
85
+ children: /* @__PURE__ */ s("path", {
86
+ fillRule: "evenodd",
87
+ d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
88
+ clipRule: "evenodd"
89
+ })
90
+ }),
91
+ e.url && e.id !== p && /* @__PURE__ */ s("svg", {
92
+ className: "size-4 text-text-muted flex-shrink-0",
93
+ fill: "none",
94
+ stroke: "currentColor",
95
+ viewBox: "0 0 24 24",
96
+ children: /* @__PURE__ */ s("path", {
97
+ strokeLinecap: "round",
98
+ strokeLinejoin: "round",
99
+ strokeWidth: 2,
100
+ d: "M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"
101
+ })
102
+ })
103
+ ]
104
+ }, e.id))]
105
+ })
106
+ ]
71
107
  })
72
108
  });
73
109
  };
74
110
  //#endregion
75
- export { o as ProductPickerSheet };
111
+ export { u as ProductPickerSheet };
@@ -8,6 +8,17 @@ export interface Product {
8
8
  /** When true, render as disabled with a "Coming soon" badge. */
9
9
  comingSoon?: boolean;
10
10
  }
11
+ /**
12
+ * Filter a product list by a free-text query, matching against name, id, and
13
+ * (when present) description — case-insensitive, whitespace-trimmed. An empty
14
+ * query returns the list unchanged. Shared by the desktop `ProductSwitcher` and
15
+ * the mobile `ProductPickerSheet` so both filter identically.
16
+ */
17
+ export declare function filterProducts<T extends {
18
+ id: string;
19
+ name: string;
20
+ description?: string;
21
+ }>(products: T[], query: string): T[];
11
22
  /**
12
23
  * Resolve the product to render as "current" in the switcher trigger.
13
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"ProductSwitcher.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSwitcher.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,OAAO,EAAE,EACnB,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,GAAG,SAAS,CAKrB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAwIpD,CAAC"}
1
+ {"version":3,"file":"ProductSwitcher.d.ts","sourceRoot":"","sources":["../../src/chrome/ProductSwitcher.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAShC,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5D,QAAQ,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,EAAE,CASnC;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,OAAO,EAAE,EACnB,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,GAAG,SAAS,CAOrB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,4CAA4C;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAiPpD,CAAC"}
@@ -1,48 +1,62 @@
1
- import { useEffect as e, useRef as t, useState as n } from "react";
2
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
1
+ import { useEffect as e, useMemo as t, useRef as n, useState as r } from "react";
2
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
3
3
  //#region src/chrome/ProductSwitcher.tsx
4
- function a(e, t) {
4
+ var o = 6;
5
+ function s(e, t) {
6
+ let n = t.trim().toLowerCase();
7
+ return n ? e.filter((e) => e.name.toLowerCase().includes(n) || e.id.toLowerCase().includes(n) || (e.description ? e.description.toLowerCase().includes(n) : !1)) : e;
8
+ }
9
+ function c(e, t) {
5
10
  return e.find((e) => e.id === t) ?? (t ? {
6
11
  id: t,
7
12
  name: t,
8
13
  url: "#"
9
14
  } : e[0]);
10
15
  }
11
- var o = ({ products: o, currentProductId: s, onProductChange: c, compact: l = !1 }) => {
12
- let [u, d] = n(!1), f = t(null), p = a(o, s);
16
+ var l = ({ products: l, currentProductId: u, onProductChange: d, compact: f = !1 }) => {
17
+ let [p, m] = r(!1), [h, g] = r(""), _ = n(null), v = n(null), y = c(l, u), b = l.length > o, x = t(() => s(l, h), [l, h]);
13
18
  e(() => {
14
19
  let e = (e) => {
15
- f.current && !f.current.contains(e.target) && d(!1);
20
+ _.current && !_.current.contains(e.target) && m(!1);
16
21
  };
17
- if (u) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
18
- }, [u]);
19
- let m = (e) => {
20
- e.comingSoon || (c ? c(e) : window.location.href = e.url, d(!1));
22
+ if (p) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
23
+ }, [p]), e(() => {
24
+ if (!p) {
25
+ g("");
26
+ return;
27
+ }
28
+ if (b) {
29
+ let e = setTimeout(() => v.current?.focus(), 60);
30
+ return () => clearTimeout(e);
31
+ }
32
+ }, [p, b]);
33
+ let S = (e) => {
34
+ e.comingSoon || (d ? d(e) : window.location.href = e.url, m(!1));
21
35
  };
22
- return /* @__PURE__ */ i("div", {
36
+ return /* @__PURE__ */ a("div", {
23
37
  className: "relative",
24
- ref: f,
25
- children: [/* @__PURE__ */ i("button", {
26
- onClick: () => d(!u),
27
- className: `flex items-center gap-2 px-3 py-2 rounded-button hover:bg-bg-sunken transition-colors ${u ? "bg-bg-sunken" : ""}`,
38
+ ref: _,
39
+ children: [/* @__PURE__ */ a("button", {
40
+ onClick: () => m(!p),
41
+ className: `flex items-center gap-2 px-3 py-2 rounded-button hover:bg-bg-sunken transition-colors ${p ? "bg-bg-sunken" : ""}`,
28
42
  "aria-label": "Switch product",
29
- "aria-expanded": u,
43
+ "aria-expanded": p,
30
44
  children: [
31
- /* @__PURE__ */ r("div", {
45
+ /* @__PURE__ */ i("div", {
32
46
  className: "size-6 rounded-md flex items-center justify-center flex-shrink-0 text-text-inverse font-semibold text-xs",
33
- style: { backgroundColor: p?.color || "var(--color-action-primary-bg)" },
34
- children: p?.icon || p?.name.charAt(0)
47
+ style: { backgroundColor: y?.color || "var(--color-action-primary-bg)" },
48
+ children: y?.icon || y?.name.charAt(0)
35
49
  }),
36
- !l && /* @__PURE__ */ r("span", {
50
+ !f && /* @__PURE__ */ i("span", {
37
51
  className: "text-body-sm font-medium text-text-primary",
38
- children: p?.name
52
+ children: y?.name
39
53
  }),
40
- !l && /* @__PURE__ */ r("svg", {
41
- className: `w-4 h-4 text-text-secondary transition-transform ${u ? "rotate-180" : ""}`,
54
+ !f && /* @__PURE__ */ i("svg", {
55
+ className: `w-4 h-4 text-text-secondary transition-transform ${p ? "rotate-180" : ""}`,
42
56
  fill: "none",
43
57
  stroke: "currentColor",
44
58
  viewBox: "0 0 24 24",
45
- children: /* @__PURE__ */ r("path", {
59
+ children: /* @__PURE__ */ i("path", {
46
60
  strokeLinecap: "round",
47
61
  strokeLinejoin: "round",
48
62
  strokeWidth: 2,
@@ -50,50 +64,107 @@ var o = ({ products: o, currentProductId: s, onProductChange: c, compact: l = !1
50
64
  })
51
65
  })
52
66
  ]
53
- }), u && /* @__PURE__ */ i("div", {
67
+ }), p && /* @__PURE__ */ a("div", {
54
68
  className: "absolute right-0 mt-2 w-[calc(100vw-1.5rem)] sm:w-64 max-w-64 bg-bg-elevated border border-border-subtle rounded-card shadow-[var(--shadow-elevation-4)] z-50 py-2 overflow-hidden animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200",
55
- children: [/* @__PURE__ */ r("div", {
56
- className: "px-4 py-2 border-b border-border-subtle",
57
- children: /* @__PURE__ */ r("p", {
58
- className: "text-[11px] font-medium text-text-muted uppercase tracking-wider",
59
- children: "Switch Product"
60
- })
61
- }), /* @__PURE__ */ r("div", {
62
- className: "py-1 max-h-96 overflow-y-auto",
63
- children: o.map((e) => /* @__PURE__ */ i("button", {
64
- onClick: () => m(e),
65
- disabled: e.comingSoon,
66
- "aria-disabled": e.comingSoon,
67
- title: e.comingSoon ? "Coming soon" : void 0,
68
- className: `w-full flex items-center gap-3 px-4 py-2.5 text-body-sm transition-colors ${e.comingSoon ? "text-text-muted cursor-not-allowed opacity-60" : e.id === s ? "bg-[var(--color-accent-soft)] text-text-primary font-medium" : "text-text-primary hover:bg-bg-sunken"}`,
69
+ children: [
70
+ /* @__PURE__ */ i("div", {
71
+ className: "px-4 py-2 border-b border-border-subtle",
72
+ children: /* @__PURE__ */ i("p", {
73
+ className: "text-[11px] font-medium text-text-muted uppercase tracking-wider",
74
+ children: "Switch Product"
75
+ })
76
+ }),
77
+ b && /* @__PURE__ */ a("div", {
78
+ className: "relative px-3 py-2 border-b border-border-subtle",
69
79
  children: [
70
- /* @__PURE__ */ r("div", {
71
- className: "size-8 rounded-md flex items-center justify-center flex-shrink-0 text-text-inverse font-semibold text-sm",
72
- style: { backgroundColor: e.color || "var(--color-action-primary-bg)" },
73
- children: e.icon || e.name.charAt(0)
80
+ /* @__PURE__ */ i("svg", {
81
+ className: "pointer-events-none absolute left-6 top-1/2 -translate-y-1/2 size-4 text-text-muted",
82
+ fill: "none",
83
+ stroke: "currentColor",
84
+ viewBox: "0 0 24 24",
85
+ children: /* @__PURE__ */ i("path", {
86
+ strokeLinecap: "round",
87
+ strokeLinejoin: "round",
88
+ strokeWidth: 2,
89
+ d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
90
+ })
74
91
  }),
75
- /* @__PURE__ */ r("span", {
76
- className: "flex-1 truncate text-left",
77
- children: e.name
92
+ /* @__PURE__ */ i("input", {
93
+ ref: v,
94
+ type: "text",
95
+ value: h,
96
+ onChange: (e) => g(e.target.value),
97
+ onKeyDown: (e) => {
98
+ e.key === "Escape" && (h ? (e.stopPropagation(), g("")) : m(!1));
99
+ },
100
+ placeholder: "Search products…",
101
+ "aria-label": "Search products",
102
+ className: "w-full rounded-md border border-border-subtle bg-bg-surface py-2 pl-9 pr-8 text-sm text-text-primary placeholder:text-text-muted transition-all duration-200 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-border)]"
78
103
  }),
79
- e.comingSoon ? /* @__PURE__ */ r("span", {
80
- className: "shrink-0 whitespace-nowrap rounded-full border border-border-subtle bg-bg-sunken px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-text-secondary",
81
- children: "Coming soon"
82
- }) : e.id === s && /* @__PURE__ */ r("svg", {
83
- className: "size-5 text-action-primary-bg",
84
- fill: "currentColor",
85
- viewBox: "0 0 20 20",
86
- children: /* @__PURE__ */ r("path", {
87
- fillRule: "evenodd",
88
- d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
89
- clipRule: "evenodd"
104
+ h && /* @__PURE__ */ i("button", {
105
+ type: "button",
106
+ onClick: () => g(""),
107
+ "aria-label": "Clear search",
108
+ className: "absolute right-5 top-1/2 -translate-y-1/2 rounded-button p-1 text-text-muted transition-colors hover:bg-bg-sunken hover:text-text-primary",
109
+ children: /* @__PURE__ */ i("svg", {
110
+ className: "size-4",
111
+ fill: "none",
112
+ stroke: "currentColor",
113
+ viewBox: "0 0 24 24",
114
+ children: /* @__PURE__ */ i("path", {
115
+ strokeLinecap: "round",
116
+ strokeLinejoin: "round",
117
+ strokeWidth: 2,
118
+ d: "M6 18L18 6M6 6l12 12"
119
+ })
90
120
  })
91
121
  })
92
122
  ]
93
- }, e.id))
94
- })]
123
+ }),
124
+ /* @__PURE__ */ a("div", {
125
+ className: "py-1 max-h-96 overflow-y-auto",
126
+ children: [x.length === 0 && /* @__PURE__ */ a("p", {
127
+ className: "px-4 py-6 text-center text-body-sm text-text-muted",
128
+ children: [
129
+ "No products match “",
130
+ h,
131
+ "”"
132
+ ]
133
+ }), x.map((e) => /* @__PURE__ */ a("button", {
134
+ onClick: () => S(e),
135
+ disabled: e.comingSoon,
136
+ "aria-disabled": e.comingSoon,
137
+ title: e.comingSoon ? "Coming soon" : void 0,
138
+ className: `w-full flex items-center gap-3 px-4 py-2.5 text-body-sm transition-colors ${e.comingSoon ? "text-text-muted cursor-not-allowed opacity-60" : e.id === u ? "bg-[var(--color-accent-soft)] text-text-primary font-medium" : "text-text-primary hover:bg-bg-sunken"}`,
139
+ children: [
140
+ /* @__PURE__ */ i("div", {
141
+ className: "size-8 rounded-md flex items-center justify-center flex-shrink-0 text-text-inverse font-semibold text-sm",
142
+ style: { backgroundColor: e.color || "var(--color-action-primary-bg)" },
143
+ children: e.icon || e.name.charAt(0)
144
+ }),
145
+ /* @__PURE__ */ i("span", {
146
+ className: "flex-1 truncate text-left",
147
+ children: e.name
148
+ }),
149
+ e.comingSoon ? /* @__PURE__ */ i("span", {
150
+ className: "shrink-0 whitespace-nowrap rounded-full border border-border-subtle bg-bg-sunken px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-text-secondary",
151
+ children: "Coming soon"
152
+ }) : e.id === u && /* @__PURE__ */ i("svg", {
153
+ className: "size-5 text-action-primary-bg",
154
+ fill: "currentColor",
155
+ viewBox: "0 0 20 20",
156
+ children: /* @__PURE__ */ i("path", {
157
+ fillRule: "evenodd",
158
+ d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
159
+ clipRule: "evenodd"
160
+ })
161
+ })
162
+ ]
163
+ }, e.id))]
164
+ })
165
+ ]
95
166
  })]
96
167
  });
97
168
  };
98
169
  //#endregion
99
- export { o as ProductSwitcher };
170
+ export { l as ProductSwitcher, s as filterProducts };
@@ -1 +1 @@
1
- {"version":3,"file":"NotificationList.d.ts","sourceRoot":"","sources":["../../../src/chrome/notificationCenter/NotificationList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvE,UAAU,qBAAqB;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA+EtD,CAAC"}
1
+ {"version":3,"file":"NotificationList.d.ts","sourceRoot":"","sources":["../../../src/chrome/notificationCenter/NotificationList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAEvE,UAAU,qBAAqB;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,SAAS,EAAE,SAAS,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAsFtD,CAAC"}
@@ -32,7 +32,7 @@ var i = ({ loading: i, error: a, notifications: o, filterTab: s, typeFilter: c,
32
32
  }),
33
33
  /* @__PURE__ */ n("button", {
34
34
  type: "button",
35
- onClick: u,
35
+ onClick: () => u(),
36
36
  className: "text-xs text-action-primary-bg hover:underline font-medium",
37
37
  children: "Try again"
38
38
  })
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorFallback.d.ts","sourceRoot":"","sources":["../../../src/shared/components/ErrorFallback.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,aAAa,2CAmDzE"}
1
+ {"version":3,"file":"ErrorFallback.d.ts","sourceRoot":"","sources":["../../../src/shared/components/ErrorFallback.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,EAAE,aAAa,2CA0DzE"}
@@ -31,7 +31,7 @@ function i({ error: i, resetErrorBoundary: a }) {
31
31
  children: "Reload page"
32
32
  }) : /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("button", {
33
33
  type: "button",
34
- onClick: a,
34
+ onClick: () => a(),
35
35
  className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-md hover:bg-action-primary-bg-hover font-medium",
36
36
  children: "Try again"
37
37
  }), /* @__PURE__ */ n("button", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/fe-libs",
3
- "version": "2026.710.6",
3
+ "version": "2026.710.7",
4
4
  "description": "Burdenoff frontend primitives and domain libraries",
5
5
  "type": "module",
6
6
  "imports": {