@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.
- package/dist/_chunks/sidebar.js +21 -21
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +130 -110
- package/dist/shell/notification-center.js +1 -1
- package/dist/shell/sidebar.d.ts +5 -2
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js +16 -16
- package/dist/ui/autocomplete.js +15 -15
- package/dist/ui/color-input.js +1 -1
- package/dist/ui/combobox.js +20 -20
- package/dist/ui/context-menu.js +8 -8
- package/dist/ui/dropdown-menu.js +2 -2
- package/dist/ui/hover-card.js +9 -9
- package/dist/ui/index.js +1 -1
- package/dist/ui/input.js +9 -9
- package/dist/ui/menubar.js +28 -28
- package/dist/ui/number-input.js +9 -9
- package/dist/ui/search-input.js +1 -1
- package/dist/ui/select.js +2 -2
- package/dist/ui/tabs.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/llms-full.txt +6 -3
- package/llms.txt +9 -0
- package/package.json +1 -1
package/dist/_chunks/sidebar.js
CHANGED
|
@@ -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-
|
|
30
|
-
lg: "h-ds-lg text-ds-
|
|
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),
|
|
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,
|
|
58
|
+
const l = G(), [u, m] = _(!1), [g, y] = _(a), h = e ?? g, w = C(
|
|
59
59
|
(p) => {
|
|
60
|
-
const
|
|
61
|
-
t ? t(
|
|
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 ?
|
|
64
|
+
), S = C(() => l ? m((p) => !p) : w((p) => !p), [l, w, m]);
|
|
65
65
|
j(() => {
|
|
66
|
-
const p = (
|
|
67
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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
|
-
|
|
570
|
+
me as d,
|
|
571
571
|
pe as e,
|
|
572
|
-
|
|
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,
|
|
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
|
|
2
|
+
import { jsx as t, jsxs as r } from "react/jsx-runtime";
|
|
3
3
|
import * as d from "react";
|
|
4
|
-
import { Dialog as
|
|
5
|
-
import { IconSearch as
|
|
6
|
-
import { c as
|
|
7
|
-
import { VisuallyHidden as
|
|
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:
|
|
11
|
-
placeholder:
|
|
12
|
-
onSearch:
|
|
10
|
+
groups: u = [],
|
|
11
|
+
placeholder: D = "Search or jump to...",
|
|
12
|
+
onSearch: h,
|
|
13
13
|
emptyMessage: C = "No results found."
|
|
14
|
-
},
|
|
15
|
-
const [
|
|
16
|
-
if (!
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
...
|
|
20
|
-
items:
|
|
21
|
-
(
|
|
22
|
-
var
|
|
23
|
-
return
|
|
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((
|
|
27
|
-
}, [
|
|
28
|
-
() =>
|
|
29
|
-
[
|
|
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
|
|
33
|
-
(
|
|
32
|
+
function e(a) {
|
|
33
|
+
(a.metaKey || a.ctrlKey) && a.key === "k" && (a.preventDefault(), i((s) => !s));
|
|
34
34
|
}
|
|
35
|
-
return document.addEventListener("keydown",
|
|
35
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
36
36
|
}, []), d.useEffect(() => {
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
(
|
|
37
|
+
b && (v(""), c(0), requestAnimationFrame(() => {
|
|
38
|
+
var e;
|
|
39
|
+
(e = N.current) == null || e.focus();
|
|
40
40
|
}));
|
|
41
|
-
}, [
|
|
42
|
-
const
|
|
43
|
-
switch (
|
|
41
|
+
}, [b]);
|
|
42
|
+
const j = (e) => {
|
|
43
|
+
switch (e.key) {
|
|
44
44
|
case "ArrowDown": {
|
|
45
|
-
|
|
46
|
-
(
|
|
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
|
-
|
|
52
|
-
(
|
|
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
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
57
|
+
e.preventDefault();
|
|
58
|
+
const a = m[o];
|
|
59
|
+
a && (a.onSelect(), i(!1));
|
|
60
60
|
break;
|
|
61
61
|
}
|
|
62
62
|
case "Escape": {
|
|
63
|
-
|
|
63
|
+
e.preventDefault(), i(!1);
|
|
64
64
|
break;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
d.useEffect(() => {
|
|
69
|
-
var
|
|
70
|
-
const
|
|
71
|
-
`[data-command-index="${
|
|
69
|
+
var a;
|
|
70
|
+
const e = (a = g.current) == null ? void 0 : a.querySelector(
|
|
71
|
+
`[data-command-index="${o}"]`
|
|
72
72
|
);
|
|
73
|
-
|
|
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
|
-
|
|
76
|
-
|
|
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__ */
|
|
92
|
+
/* @__PURE__ */ r(
|
|
93
93
|
L,
|
|
94
94
|
{
|
|
95
|
-
ref:
|
|
96
|
-
className:
|
|
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:
|
|
105
|
+
onKeyDown: j,
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
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__ */
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
|
|
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__ */
|
|
119
|
+
/* @__PURE__ */ t(
|
|
120
120
|
"input",
|
|
121
121
|
{
|
|
122
122
|
ref: N,
|
|
123
|
-
value:
|
|
124
|
-
onChange: (
|
|
125
|
-
placeholder:
|
|
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[
|
|
129
|
+
"aria-activedescendant": m[o] ? `command-item-${y}-${m[o].id}` : void 0,
|
|
130
130
|
"aria-autocomplete": "list",
|
|
131
|
-
className:
|
|
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__ */
|
|
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__ */
|
|
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
|
-
|
|
152
|
-
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
|
|
155
|
-
const
|
|
156
|
-
return /* @__PURE__ */
|
|
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-${
|
|
159
|
+
id: `command-item-${y}-${s.id}`,
|
|
160
160
|
type: "button",
|
|
161
161
|
role: "option",
|
|
162
|
-
"aria-selected":
|
|
163
|
-
"data-command-index":
|
|
162
|
+
"aria-selected": p,
|
|
163
|
+
"data-command-index": n,
|
|
164
164
|
onClick: () => {
|
|
165
|
-
|
|
165
|
+
s.onSelect(), i(!1);
|
|
166
166
|
},
|
|
167
|
-
onMouseEnter: () =>
|
|
168
|
-
className:
|
|
169
|
-
"flex w-full items-center gap-ds-04 rounded-ds-lg px-ds-03 py-ds-03 text-left transition-
|
|
170
|
-
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
208
|
+
s.id
|
|
189
209
|
);
|
|
190
210
|
})
|
|
191
|
-
] },
|
|
211
|
+
] }, e.label))
|
|
192
212
|
]
|
|
193
213
|
}
|
|
194
214
|
),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
/* @__PURE__ */
|
|
197
|
-
/* @__PURE__ */
|
|
198
|
-
/* @__PURE__ */
|
|
199
|
-
/* @__PURE__ */
|
|
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__ */
|
|
221
|
+
/* @__PURE__ */ t("span", { className: "text-ds-xs text-text-placeholder", children: "Navigate" })
|
|
202
222
|
] }),
|
|
203
|
-
/* @__PURE__ */
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */
|
|
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__ */
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
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-
|
|
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
|
),
|
package/dist/shell/sidebar.d.ts
CHANGED
|
@@ -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,O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