@devalok/shilp-sutra 0.13.0 → 0.15.0

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.
@@ -26,13 +26,13 @@ const X = z([
26
26
  variants: {
27
27
  size: {
28
28
  sm: "h-ds-sm text-ds-sm px-ds-03",
29
- md: "h-ds-md text-ds-base px-ds-04",
30
- lg: "h-ds-lg text-ds-lg px-ds-05"
29
+ md: "h-ds-md text-ds-md px-ds-04",
30
+ lg: "h-ds-lg text-ds-md px-ds-05"
31
31
  }
32
32
  },
33
33
  defaultVariants: { size: "md" }
34
34
  }), T = B.forwardRef(({ className: a, type: e, state: t, size: d, startIcon: s, endIcon: n, ...c }, f) => {
35
- const l = K(), u = t ?? (l.state === "helper" ? void 0 : l.state), b = c["aria-describedby"] ?? l.helperTextId, g = c["aria-required"] ?? l.required, y = r("input", { type: e, className: i(X({ size: d }), s && "pl-ds-07", n && "pr-ds-07", u === "error" && "border-border-error focus-visible:ring-error", u === "warning" && "border-border-warning focus-visible:ring-warning", u === "success" && "border-border-success focus-visible:ring-success", a), "aria-invalid": u === "error" || void 0, "aria-describedby": b, "aria-required": g || void 0, ref: f, ...c });
35
+ const l = K(), u = t ?? (l.state === "helper" ? void 0 : l.state), m = c["aria-describedby"] ?? l.helperTextId, g = c["aria-required"] ?? l.required, y = r("input", { type: e, className: i(X({ size: d }), s && "pl-ds-07", n && "pr-ds-07", u === "error" && "border-border-error focus-visible:ring-error", u === "warning" && "border-border-warning focus-visible:ring-warning", u === "success" && "border-border-success focus-visible:ring-success", a), "aria-invalid": u === "error" || void 0, "aria-describedby": m, "aria-required": g || void 0, ref: f, ...c });
36
36
  return !s && !n ? y : x("div", { className: "relative flex items-center w-full", children: [s && r("span", { className: "absolute left-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: s }), y, n && r("span", { className: "absolute right-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: n })] });
37
37
  });
38
38
  T.displayName = "Input";
@@ -55,16 +55,16 @@ const te = o(
55
55
  children: n,
56
56
  ...c
57
57
  }, f) => {
58
- const l = G(), [u, b] = _(!1), [g, y] = _(a), h = e ?? g, w = C(
58
+ const l = G(), [u, m] = _(!1), [g, y] = _(a), h = e ?? g, w = C(
59
59
  (p) => {
60
- const m = typeof p == "function" ? p(h) : p;
61
- t ? t(m) : y(m), document.cookie = `${Y}=${m}; path=/; max-age=${J}`;
60
+ const b = typeof p == "function" ? p(h) : p;
61
+ t ? t(b) : y(b), document.cookie = `${Y}=${b}; path=/; max-age=${J}`;
62
62
  },
63
63
  [t, h]
64
- ), S = C(() => l ? b((p) => !p) : w((p) => !p), [l, w, b]);
64
+ ), S = C(() => l ? m((p) => !p) : w((p) => !p), [l, w, m]);
65
65
  j(() => {
66
- const p = (m) => {
67
- m.key === ae && (m.metaKey || m.ctrlKey) && (m.preventDefault(), S());
66
+ const p = (b) => {
67
+ b.key === ae && (b.metaKey || b.ctrlKey) && (b.preventDefault(), S());
68
68
  };
69
69
  return window.addEventListener("keydown", p), () => window.removeEventListener("keydown", p);
70
70
  }, [S]);
@@ -75,7 +75,7 @@ const te = o(
75
75
  setOpen: w,
76
76
  isMobile: l,
77
77
  openMobile: u,
78
- setOpenMobile: b,
78
+ setOpenMobile: m,
79
79
  toggleSidebar: S
80
80
  }),
81
81
  [
@@ -84,7 +84,7 @@ const te = o(
84
84
  w,
85
85
  l,
86
86
  u,
87
- b,
87
+ m,
88
88
  S
89
89
  ]
90
90
  );
@@ -117,7 +117,7 @@ const re = o(
117
117
  children: s,
118
118
  ...n
119
119
  }, c) => {
120
- const { isMobile: f, state: l, openMobile: u, setOpenMobile: b } = N();
120
+ const { isMobile: f, state: l, openMobile: u, setOpenMobile: m } = N();
121
121
  return t === "none" ? /* @__PURE__ */ r(
122
122
  "div",
123
123
  {
@@ -129,7 +129,7 @@ const re = o(
129
129
  ...n,
130
130
  children: s
131
131
  }
132
- ) : f ? /* @__PURE__ */ r(V, { open: u, onOpenChange: b, ...n, children: /* @__PURE__ */ r(
132
+ ) : f ? /* @__PURE__ */ r(V, { open: u, onOpenChange: m, ...n, children: /* @__PURE__ */ r(
133
133
  F,
134
134
  {
135
135
  "data-sidebar": "sidebar",
@@ -317,7 +317,7 @@ const ue = o(
317
317
  )
318
318
  );
319
319
  ue.displayName = "SidebarContent";
320
- const be = o(
320
+ const me = o(
321
321
  ({ className: a, ...e }, t) => /* @__PURE__ */ r(
322
322
  "div",
323
323
  {
@@ -328,7 +328,7 @@ const be = o(
328
328
  }
329
329
  )
330
330
  );
331
- be.displayName = "SidebarGroup";
331
+ me.displayName = "SidebarGroup";
332
332
  const pe = o(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
333
333
  e ? v : "div",
334
334
  {
@@ -343,7 +343,7 @@ const pe = o(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
343
343
  }
344
344
  ));
345
345
  pe.displayName = "SidebarGroupLabel";
346
- const me = o(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
346
+ const be = o(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
347
347
  e ? v : "button",
348
348
  {
349
349
  ref: d,
@@ -357,7 +357,7 @@ const me = o(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
357
357
  ...t
358
358
  }
359
359
  ));
360
- me.displayName = "SidebarGroupAction";
360
+ be.displayName = "SidebarGroupAction";
361
361
  const fe = o(
362
362
  ({ className: a, ...e }, t) => /* @__PURE__ */ r(
363
363
  "div",
@@ -423,7 +423,7 @@ const xe = z(
423
423
  className: n,
424
424
  ...c
425
425
  }, f) => {
426
- const l = a ? v : "button", { isMobile: u, state: b } = N(), g = /* @__PURE__ */ r(
426
+ const l = a ? v : "button", { isMobile: u, state: m } = N(), g = /* @__PURE__ */ r(
427
427
  l,
428
428
  {
429
429
  ref: f,
@@ -443,7 +443,7 @@ const xe = z(
443
443
  {
444
444
  side: "right",
445
445
  align: "center",
446
- hidden: b !== "collapsed" || u,
446
+ hidden: m !== "collapsed" || u,
447
447
  ...s
448
448
  }
449
449
  )
@@ -567,9 +567,9 @@ export {
567
567
  ne as a,
568
568
  ce as b,
569
569
  ue as c,
570
- be as d,
570
+ me as d,
571
571
  pe as e,
572
- me as f,
572
+ be as f,
573
573
  fe as g,
574
574
  ge as h,
575
575
  le as i,
@@ -1 +1 @@
1
- {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../src/composed/command-palette.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiB9B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAMD,QAAA,MAAM,cAAc,4FAoSnB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
1
+ {"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../../src/composed/command-palette.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiB9B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,WAAW,EAAE,CAAA;CACrB;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAMD,QAAA,MAAM,cAAc,4FAoTnB,CAAA;AAID,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -1,99 +1,99 @@
1
1
  "use client";
2
- import { jsx as s, jsxs as a } from "react/jsx-runtime";
2
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
3
3
  import * as d from "react";
4
- import { Dialog as A, DialogPortal as M, DialogOverlay as R, DialogContentRaw as L, DialogTitle as S, DialogDescription as $ } from "../ui/dialog.js";
5
- import { IconSearch as K, IconCornerDownLeft as v, IconArrowUp as P, IconArrowDown as q } from "@tabler/icons-react";
6
- import { c as b } from "../_chunks/utils.js";
7
- import { VisuallyHidden as z } from "../ui/visually-hidden.js";
4
+ import { Dialog as $, DialogPortal as A, DialogOverlay as R, DialogContentRaw as L, DialogTitle as S, DialogDescription as K } from "../ui/dialog.js";
5
+ import { IconSearch as P, IconCornerDownLeft as k, IconArrowUp as q, IconArrowDown as z } from "@tabler/icons-react";
6
+ import { c as x } from "../_chunks/utils.js";
7
+ import { VisuallyHidden as F } from "../ui/visually-hidden.js";
8
8
  const O = d.forwardRef(
9
9
  function({
10
- groups: x = [],
11
- placeholder: k = "Search or jump to...",
12
- onSearch: f,
10
+ groups: u = [],
11
+ placeholder: D = "Search or jump to...",
12
+ onSearch: h,
13
13
  emptyMessage: C = "No results found."
14
- }, D) {
15
- const [u, c] = d.useState(!1), [p, y] = d.useState(""), [l, i] = d.useState(0), N = d.useRef(null), g = d.useRef(null), h = d.useId(), w = `command-palette-listbox-${h}`, n = d.useMemo(() => {
16
- if (!p.trim()) return x;
17
- const t = p.toLowerCase();
18
- return x.map((e) => ({
19
- ...e,
20
- items: e.items.filter(
21
- (r) => {
22
- var o;
23
- return r.label.toLowerCase().includes(t) || ((o = r.description) == null ? void 0 : o.toLowerCase().includes(t));
14
+ }, I) {
15
+ const [b, i] = d.useState(!1), [f, v] = d.useState(""), [o, c] = d.useState(0), N = d.useRef(null), g = d.useRef(null), y = d.useId(), w = `command-palette-listbox-${y}`, l = d.useMemo(() => {
16
+ if (!f.trim()) return u;
17
+ const e = f.toLowerCase();
18
+ return u.map((a) => ({
19
+ ...a,
20
+ items: a.items.filter(
21
+ (s) => {
22
+ var n;
23
+ return s.label.toLowerCase().includes(e) || ((n = s.description) == null ? void 0 : n.toLowerCase().includes(e));
24
24
  }
25
25
  )
26
- })).filter((e) => e.items.length > 0);
27
- }, [x, p]), m = d.useMemo(
28
- () => n.flatMap((t) => t.items),
29
- [n]
26
+ })).filter((a) => a.items.length > 0);
27
+ }, [u, f]), m = d.useMemo(
28
+ () => l.flatMap((e) => e.items),
29
+ [l]
30
30
  );
31
31
  d.useEffect(() => {
32
- function t(e) {
33
- (e.metaKey || e.ctrlKey) && e.key === "k" && (e.preventDefault(), c((r) => !r));
32
+ function e(a) {
33
+ (a.metaKey || a.ctrlKey) && a.key === "k" && (a.preventDefault(), i((s) => !s));
34
34
  }
35
- return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
35
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
36
36
  }, []), d.useEffect(() => {
37
- u && (y(""), i(0), requestAnimationFrame(() => {
38
- var t;
39
- (t = N.current) == null || t.focus();
37
+ b && (v(""), c(0), requestAnimationFrame(() => {
38
+ var e;
39
+ (e = N.current) == null || e.focus();
40
40
  }));
41
- }, [u]);
42
- const I = (t) => {
43
- switch (t.key) {
41
+ }, [b]);
42
+ const j = (e) => {
43
+ switch (e.key) {
44
44
  case "ArrowDown": {
45
- t.preventDefault(), i(
46
- (e) => e < m.length - 1 ? e + 1 : 0
45
+ e.preventDefault(), c(
46
+ (a) => a < m.length - 1 ? a + 1 : 0
47
47
  );
48
48
  break;
49
49
  }
50
50
  case "ArrowUp": {
51
- t.preventDefault(), i(
52
- (e) => e > 0 ? e - 1 : m.length - 1
51
+ e.preventDefault(), c(
52
+ (a) => a > 0 ? a - 1 : m.length - 1
53
53
  );
54
54
  break;
55
55
  }
56
56
  case "Enter": {
57
- t.preventDefault();
58
- const e = m[l];
59
- e && (e.onSelect(), c(!1));
57
+ e.preventDefault();
58
+ const a = m[o];
59
+ a && (a.onSelect(), i(!1));
60
60
  break;
61
61
  }
62
62
  case "Escape": {
63
- t.preventDefault(), c(!1);
63
+ e.preventDefault(), i(!1);
64
64
  break;
65
65
  }
66
66
  }
67
67
  };
68
68
  d.useEffect(() => {
69
- var e;
70
- const t = (e = g.current) == null ? void 0 : e.querySelector(
71
- `[data-command-index="${l}"]`
69
+ var a;
70
+ const e = (a = g.current) == null ? void 0 : a.querySelector(
71
+ `[data-command-index="${o}"]`
72
72
  );
73
- t == null || t.scrollIntoView({ block: "nearest" });
73
+ e == null || e.scrollIntoView({ block: "nearest" });
74
+ }, [o]);
75
+ const E = (e) => {
76
+ v(e), c(0), h == null || h(e);
77
+ }, M = d.useMemo(() => {
78
+ const e = /* @__PURE__ */ new Map();
79
+ let a = 0;
80
+ for (const s of l)
81
+ for (const n of s.items)
82
+ e.set(n.id, a++);
83
+ return e;
74
84
  }, [l]);
75
- const j = (t) => {
76
- y(t), i(0), f == null || f(t);
77
- }, E = d.useMemo(() => {
78
- const t = /* @__PURE__ */ new Map();
79
- let e = 0;
80
- for (const r of n)
81
- for (const o of r.items)
82
- t.set(o.id, e++);
83
- return t;
84
- }, [n]);
85
- return /* @__PURE__ */ s(A, { open: u, onOpenChange: c, children: /* @__PURE__ */ a(M, { children: [
86
- /* @__PURE__ */ s(
85
+ return /* @__PURE__ */ t($, { open: b, onOpenChange: i, children: /* @__PURE__ */ r(A, { children: [
86
+ /* @__PURE__ */ t(
87
87
  R,
88
88
  {
89
89
  className: "fixed inset-0 z-overlay bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
90
90
  }
91
91
  ),
92
- /* @__PURE__ */ a(
92
+ /* @__PURE__ */ r(
93
93
  L,
94
94
  {
95
- ref: D,
96
- className: b(
95
+ ref: I,
96
+ className: x(
97
97
  "fixed left-1/2 top-[20%] z-modal w-full max-w-[560px] -translate-x-1/2",
98
98
  "overflow-hidden rounded-ds-xl border border-border bg-layer-01 shadow-05",
99
99
  "duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out",
@@ -102,33 +102,33 @@ const O = d.forwardRef(
102
102
  "data-[state=closed]:slide-out-to-left-1/2 data-[state=open]:slide-in-from-left-1/2",
103
103
  "data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2"
104
104
  ),
105
- onKeyDown: I,
105
+ onKeyDown: j,
106
106
  children: [
107
- /* @__PURE__ */ a(z, { children: [
108
- /* @__PURE__ */ s(S, { children: "Command Palette" }),
109
- /* @__PURE__ */ s($, { children: "Search or jump to pages, projects, tasks, and actions" })
107
+ /* @__PURE__ */ r(F, { children: [
108
+ /* @__PURE__ */ t(S, { children: "Command Palette" }),
109
+ /* @__PURE__ */ t(K, { children: "Search or jump to pages, projects, tasks, and actions" })
110
110
  ] }),
111
- /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-04 border-b border-border px-ds-05 py-ds-04", children: [
112
- /* @__PURE__ */ s(
113
- K,
111
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-04 border-b border-border px-ds-05 py-ds-04", children: [
112
+ /* @__PURE__ */ t(
113
+ P,
114
114
  {
115
- className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder",
115
+ className: "h-ico-sm w-ico-sm shrink-0 animate-scale-in text-text-placeholder",
116
116
  stroke: 1.5
117
117
  }
118
118
  ),
119
- /* @__PURE__ */ s(
119
+ /* @__PURE__ */ t(
120
120
  "input",
121
121
  {
122
122
  ref: N,
123
- value: p,
124
- onChange: (t) => j(t.target.value),
125
- placeholder: k,
123
+ value: f,
124
+ onChange: (e) => E(e.target.value),
125
+ placeholder: D,
126
126
  role: "combobox",
127
127
  "aria-expanded": !0,
128
128
  "aria-controls": w,
129
- "aria-activedescendant": m[l] ? `command-item-${h}-${m[l].id}` : void 0,
129
+ "aria-activedescendant": m[o] ? `command-item-${y}-${m[o].id}` : void 0,
130
130
  "aria-autocomplete": "list",
131
- className: b(
131
+ className: x(
132
132
  "flex-1 bg-transparent text-ds-base text-text-primary outline-none",
133
133
  "placeholder:text-text-placeholder"
134
134
  ),
@@ -137,9 +137,9 @@ const O = d.forwardRef(
137
137
  spellCheck: !1
138
138
  }
139
139
  ),
140
- /* @__PURE__ */ s("kbd", { className: "hidden shrink-0 select-none rounded-ds-md border border-border bg-layer-02 px-ds-02b py-ds-01 text-ds-sm font-medium text-text-placeholder sm:inline-flex", children: "Esc" })
140
+ /* @__PURE__ */ t("kbd", { className: "hidden shrink-0 select-none rounded-ds-md border border-border bg-layer-02 px-ds-02b py-ds-01 text-ds-sm font-medium text-text-placeholder sm:inline-flex", children: "Esc" })
141
141
  ] }),
142
- /* @__PURE__ */ a(
142
+ /* @__PURE__ */ r(
143
143
  "div",
144
144
  {
145
145
  ref: g,
@@ -148,65 +148,85 @@ const O = d.forwardRef(
148
148
  "aria-label": "Command results",
149
149
  className: "max-h-[320px] overflow-y-auto px-ds-03 py-ds-03",
150
150
  children: [
151
- n.length === 0 && /* @__PURE__ */ s("div", { className: "flex items-center justify-center py-ds-07", children: /* @__PURE__ */ s("p", { className: "text-ds-md text-text-placeholder", children: C }) }),
152
- n.map((t) => /* @__PURE__ */ a("div", { className: "mb-ds-02", children: [
153
- /* @__PURE__ */ s("div", { className: "px-ds-03 pb-ds-02 pt-ds-03", children: /* @__PURE__ */ s("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: t.label }) }),
154
- t.items.map((e) => {
155
- const r = E.get(e.id) ?? 0, o = r === l;
156
- return /* @__PURE__ */ a(
151
+ l.length === 0 && /* @__PURE__ */ t("div", { className: "flex animate-fade-in items-center justify-center py-ds-07", children: /* @__PURE__ */ t("p", { className: "text-ds-md text-text-placeholder", children: C }) }),
152
+ l.map((e, a) => /* @__PURE__ */ r("div", { className: "mb-ds-02 animate-fade-in", style: { animationDelay: `${a * 60}ms` }, children: [
153
+ /* @__PURE__ */ t("div", { className: "px-ds-03 pb-ds-02 pt-ds-03", children: /* @__PURE__ */ t("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-text-placeholder", children: e.label }) }),
154
+ e.items.map((s) => {
155
+ const n = M.get(s.id) ?? 0, p = n === o;
156
+ return /* @__PURE__ */ r(
157
157
  "button",
158
158
  {
159
- id: `command-item-${h}-${e.id}`,
159
+ id: `command-item-${y}-${s.id}`,
160
160
  type: "button",
161
161
  role: "option",
162
- "aria-selected": o,
163
- "data-command-index": r,
162
+ "aria-selected": p,
163
+ "data-command-index": n,
164
164
  onClick: () => {
165
- e.onSelect(), c(!1);
165
+ s.onSelect(), i(!1);
166
166
  },
167
- onMouseEnter: () => i(r),
168
- className: b(
169
- "flex w-full items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 text-left transition-colors duration-fast-01 ease-productive-standard",
170
- o ? "bg-layer-03 text-text-primary" : "text-text-secondary hover:bg-layer-02"
167
+ onMouseEnter: () => c(n),
168
+ className: x(
169
+ "flex w-full items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 text-left transition-all duration-fast-02 ease-productive-standard",
170
+ p ? "bg-layer-03 text-text-primary" : "text-text-secondary hover:bg-layer-02"
171
171
  ),
172
+ style: {
173
+ animationName: "slide-up",
174
+ animationDuration: "var(--duration-moderate-02)",
175
+ animationTimingFunction: "var(--ease-expressive-entrance)",
176
+ animationFillMode: "both",
177
+ animationDelay: `${n * 30}ms`
178
+ },
172
179
  children: [
173
- e.icon && /* @__PURE__ */ s("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0 text-text-placeholder", "aria-hidden": "true", children: e.icon }),
174
- /* @__PURE__ */ a("div", { className: "flex flex-1 flex-col", children: [
175
- /* @__PURE__ */ s("span", { className: "text-ds-md", children: e.label }),
176
- e.description && /* @__PURE__ */ s("span", { className: "text-ds-sm text-text-placeholder", children: e.description })
180
+ s.icon && /* @__PURE__ */ t(
181
+ "span",
182
+ {
183
+ className: x(
184
+ "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0 transition-colors duration-fast-02",
185
+ p ? "text-interactive" : "text-text-placeholder"
186
+ ),
187
+ "aria-hidden": "true",
188
+ children: s.icon
189
+ }
190
+ ),
191
+ /* @__PURE__ */ r("div", { className: "flex flex-1 flex-col", children: [
192
+ /* @__PURE__ */ t("span", { className: "text-ds-md", children: s.label }),
193
+ s.description && /* @__PURE__ */ t("span", { className: "text-ds-sm text-text-placeholder", children: s.description })
177
194
  ] }),
178
- e.shortcut && /* @__PURE__ */ s("kbd", { className: "shrink-0 rounded border border-border bg-layer-02 px-ds-02b py-ds-01 text-ds-xs font-medium text-text-placeholder", children: e.shortcut }),
179
- o && /* @__PURE__ */ s(
180
- v,
195
+ s.shortcut && /* @__PURE__ */ t("kbd", { className: x(
196
+ "shrink-0 rounded border border-border px-ds-02b py-ds-01 text-ds-xs font-medium transition-colors duration-fast-02",
197
+ p ? "bg-interactive/10 text-interactive border-interactive/30" : "bg-layer-02 text-text-placeholder"
198
+ ), children: s.shortcut }),
199
+ p && /* @__PURE__ */ t(
200
+ k,
181
201
  {
182
- className: "h-ico-sm w-ico-sm shrink-0 text-text-placeholder",
202
+ className: "h-ico-sm w-ico-sm shrink-0 animate-fade-in text-text-placeholder",
183
203
  stroke: 1.5
184
204
  }
185
205
  )
186
206
  ]
187
207
  },
188
- e.id
208
+ s.id
189
209
  );
190
210
  })
191
- ] }, t.label))
211
+ ] }, e.label))
192
212
  ]
193
213
  }
194
214
  ),
195
- /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-05 border-t border-border px-ds-05 py-ds-03", children: [
196
- /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02b", children: [
197
- /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-01", children: [
198
- /* @__PURE__ */ s("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-border bg-layer-02", children: /* @__PURE__ */ s(P, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) }),
199
- /* @__PURE__ */ s("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-border bg-layer-02", children: /* @__PURE__ */ s(q, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) })
215
+ /* @__PURE__ */ r("div", { className: "flex animate-fade-in items-center gap-ds-05 border-t border-border px-ds-05 py-ds-03", children: [
216
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
217
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-01", children: [
218
+ /* @__PURE__ */ t("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-border bg-layer-02", children: /* @__PURE__ */ t(q, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) }),
219
+ /* @__PURE__ */ t("kbd", { className: "inline-flex h-ico-md w-ico-md items-center justify-center rounded border border-border bg-layer-02", children: /* @__PURE__ */ t(z, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) })
200
220
  ] }),
201
- /* @__PURE__ */ s("span", { className: "text-ds-xs text-text-placeholder", children: "Navigate" })
221
+ /* @__PURE__ */ t("span", { className: "text-ds-xs text-text-placeholder", children: "Navigate" })
202
222
  ] }),
203
- /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02b", children: [
204
- /* @__PURE__ */ s("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-border bg-layer-02 px-ds-02b", children: /* @__PURE__ */ s(v, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) }),
205
- /* @__PURE__ */ s("span", { className: "text-ds-xs text-text-placeholder", children: "Select" })
223
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
224
+ /* @__PURE__ */ t("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-border bg-layer-02 px-ds-02b", children: /* @__PURE__ */ t(k, { className: "h-ds-03 w-ds-03 text-text-placeholder", stroke: 2 }) }),
225
+ /* @__PURE__ */ t("span", { className: "text-ds-xs text-text-placeholder", children: "Select" })
206
226
  ] }),
207
- /* @__PURE__ */ a("div", { className: "flex items-center gap-ds-02b", children: [
208
- /* @__PURE__ */ s("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-border bg-layer-02 px-ds-02b text-ds-xs font-medium text-text-placeholder", children: "Esc" }),
209
- /* @__PURE__ */ s("span", { className: "text-ds-xs text-text-placeholder", children: "Close" })
227
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-ds-02b", children: [
228
+ /* @__PURE__ */ t("kbd", { className: "inline-flex h-[20px] items-center justify-center rounded-ds-md border border-border bg-layer-02 px-ds-02b text-ds-xs font-medium text-text-placeholder", children: "Esc" }),
229
+ /* @__PURE__ */ t("span", { className: "text-ds-xs text-text-placeholder", children: "Close" })
210
230
  ] })
211
231
  ] })
212
232
  ]
@@ -45,7 +45,7 @@ function W({
45
45
  (s.key === "Enter" || s.key === " ") && (s.preventDefault(), o());
46
46
  },
47
47
  className: f(
48
- "group relative flex w-full cursor-pointer items-start gap-ds-04 px-ds-05 py-ds-04 text-left transition-[color,transform] duration-fast-02 hover:translate-x-0.5",
48
+ "group relative flex w-full cursor-pointer items-start gap-ds-04 px-ds-05 py-ds-04 text-left transition-colors duration-fast-02",
49
49
  "hover:bg-layer-02",
50
50
  !e.isRead && "bg-interactive/[0.03]"
51
51
  ),
@@ -62,8 +62,11 @@ export interface SidebarFooterConfig {
62
62
  label: string;
63
63
  href: string;
64
64
  }>;
65
- /** Version or build info text rendered inline after links */
66
- version?: string;
65
+ /** Version or build info text (or link) rendered inline after links */
66
+ version?: string | {
67
+ label: string;
68
+ href: string;
69
+ };
67
70
  /** Custom content rendered above the links row */
68
71
  slot?: React.ReactNode;
69
72
  /** Promo/upsell banner rendered above the links row */
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/sidebar.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgC9B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,UAAU,EAAE,CAAA;IACvB,qFAAqF;IACrF,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,mEAAmE;IACnE,MAAM,CAAC,EAAE,KAAK,CA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