@devalok/shilp-sutra 0.9.1 → 0.10.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.
@@ -6820,29 +6820,29 @@ function kt(e) {
6820
6820
  var iC = Tl, cC = Nl, lC = Ol, uC = kl, dC = $l, fC = Ll, pC = Fl, vC = Kl;
6821
6821
  export {
6822
6822
  Gg as $,
6823
- Zg as A,
6824
- Xg as B,
6823
+ Jg as A,
6824
+ og as B,
6825
6825
  Ad as C,
6826
- jg as D,
6827
- Jg as E,
6826
+ rg as D,
6827
+ ig as E,
6828
6828
  fg as F,
6829
6829
  Rg as G,
6830
6830
  Zm as H,
6831
6831
  dg as I,
6832
- og as J,
6833
- rg as K,
6832
+ cg as J,
6833
+ ag as K,
6834
6834
  Eg as L,
6835
- ig as M,
6836
- cg as N,
6835
+ sg as M,
6836
+ eg as N,
6837
6837
  ng as O,
6838
6838
  gg as P,
6839
- ag as Q,
6839
+ tg as Q,
6840
6840
  ug as R,
6841
6841
  Ym as S,
6842
6842
  Jm as T,
6843
- sg as U,
6844
- eg as V,
6845
- tg as W,
6843
+ Eu as U,
6844
+ yu as V,
6845
+ Ru as W,
6846
6846
  zg as X,
6847
6847
  Yg as Y,
6848
6848
  kg as Z,
@@ -6942,24 +6942,24 @@ export {
6942
6942
  Qm as d,
6943
6943
  jm as e,
6944
6944
  lg as f,
6945
- Eu as g,
6946
- yu as h,
6947
- Ru as i,
6948
- pg as j,
6949
- mg as k,
6950
- hg as l,
6951
- Ng as m,
6952
- Ag as n,
6953
- bg as o,
6954
- yg as p,
6955
- Pg as q,
6956
- xg as r,
6957
- Tg as s,
6958
- _g as t,
6959
- Mg as u,
6960
- Cg as v,
6961
- Sg as w,
6962
- Ig as x,
6963
- wg as y,
6964
- qg as z
6945
+ pg as g,
6946
+ mg as h,
6947
+ hg as i,
6948
+ Ng as j,
6949
+ Ag as k,
6950
+ bg as l,
6951
+ yg as m,
6952
+ Pg as n,
6953
+ xg as o,
6954
+ Tg as p,
6955
+ _g as q,
6956
+ Mg as r,
6957
+ Cg as s,
6958
+ Sg as t,
6959
+ Ig as u,
6960
+ wg as v,
6961
+ qg as w,
6962
+ Zg as x,
6963
+ Xg as y,
6964
+ jg as z
6965
6965
  };
@@ -569,22 +569,22 @@ export {
569
569
  ue as c,
570
570
  pe as d,
571
571
  be as e,
572
- fe as f,
573
- ge as g,
574
- le as h,
575
- he as i,
576
- ve as j,
577
- se as k,
578
- R as l,
579
- me as m,
580
- oe as n,
581
- de as o,
582
- ye as p,
583
- we as q,
584
- Se as r,
585
- Ne as s,
586
- _e as t,
587
- Me as u,
572
+ me as f,
573
+ fe as g,
574
+ ge as h,
575
+ le as i,
576
+ he as j,
577
+ ve as k,
578
+ we as l,
579
+ Ne as m,
580
+ Me as n,
581
+ _e as o,
582
+ se as p,
583
+ R as q,
584
+ oe as r,
585
+ de as s,
586
+ ye as t,
587
+ Se as u,
588
588
  te as v,
589
589
  ie as w,
590
590
  X as x,
@@ -1,4 +1,3 @@
1
- "use client";
2
1
  import { g as s, h as t } from "./vendor-utils.js";
3
2
  const n = t({
4
3
  extend: {
@@ -10,16 +10,30 @@
10
10
  * reading from Remix hooks or Zustand stores.
11
11
  */
12
12
  import * as React from 'react';
13
+ export interface NavSubItem {
14
+ title: string;
15
+ href: string;
16
+ icon?: React.ReactNode;
17
+ exact?: boolean;
18
+ }
13
19
  export interface NavItem {
14
20
  title: string;
15
21
  href: string;
16
22
  icon: React.ReactNode;
17
23
  /** When true, the route matches only when the path is exactly equal */
18
24
  exact?: boolean;
25
+ /** Badge rendered on the right side of the nav item */
26
+ badge?: string | number;
27
+ /** Optional child items — renders as collapsible sub-list with chevron */
28
+ children?: NavSubItem[];
29
+ /** Whether the collapsible is open by default. Auto-opens when a child is active. */
30
+ defaultOpen?: boolean;
19
31
  }
20
32
  export interface NavGroup {
21
33
  label: string;
22
34
  items: NavItem[];
35
+ /** Action rendered next to the group label (e.g., a "+" button) */
36
+ action?: React.ReactNode;
23
37
  }
24
38
  export interface SidebarUser {
25
39
  name: string;
@@ -28,6 +42,17 @@ export interface SidebarUser {
28
42
  designation?: string;
29
43
  role?: string;
30
44
  }
45
+ export interface SidebarFooterConfig {
46
+ /** Legal/utility links rendered as a row separated by dividers */
47
+ links?: Array<{
48
+ label: string;
49
+ href: string;
50
+ }>;
51
+ /** Version or build info text rendered below links */
52
+ version?: string;
53
+ /** Custom content rendered above the links row */
54
+ slot?: React.ReactNode;
55
+ }
31
56
  export interface AppSidebarProps extends React.HTMLAttributes<HTMLDivElement> {
32
57
  /** Currently active pathname -- used to highlight the active nav item */
33
58
  currentPath?: string;
@@ -42,6 +67,14 @@ export interface AppSidebarProps extends React.HTMLAttributes<HTMLDivElement> {
42
67
  label: string;
43
68
  href: string;
44
69
  }>;
70
+ /** Structured footer config (takes precedence over footerLinks) */
71
+ footer?: SidebarFooterConfig;
72
+ /** Content rendered between user header and navigation */
73
+ headerSlot?: React.ReactNode;
74
+ /** Content rendered between navigation and footer */
75
+ preFooterSlot?: React.ReactNode;
76
+ /** Override rendering for specific nav items. Return null to use default rendering. */
77
+ renderItem?: (item: NavItem, defaultRender: () => React.ReactNode) => React.ReactNode | null;
45
78
  /** Additional className for the root sidebar element */
46
79
  className?: string;
47
80
  }
@@ -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;AAsB9B,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;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,OAAO,EAAE,CAAA;CACjB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uDAAuD;IACvD,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACzB,kEAAkE;IAClE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,yDAAyD;IACzD,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpD,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAsCD,QAAA,MAAM,UAAU,wFAgHf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
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,CAAC,SAAS,CAAA;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC9C,sDAAsD;IACtD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,kDAAkD;IAClD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,MAAM,WAAW,eACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC5C,yEAAyE;IACzE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,uDAAuD;IACvD,IAAI,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACzB,kEAAkE;IAClE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,yDAAyD;IACzD,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IACpD,mEAAmE;IACnE,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAC5B,0DAA0D;IAC1D,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,qDAAqD;IACrD,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC/B,uFAAuF;IACvF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC,SAAS,KAAK,KAAK,CAAC,SAAS,GAAG,IAAI,CAAA;IAC5F,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4JD,QAAA,MAAM,UAAU,wFA8Kf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
@@ -1,103 +1,226 @@
1
1
  "use client";
2
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
3
- import * as N from "react";
4
- import { useLink as m } from "./link-context.js";
5
- import { S as u, a as S, b as o, c as y, d as A, e as w, f as L, g as j, h as C, i as M, j as k } from "../_chunks/sidebar.js";
6
- import { A as G, a as F, b as I } from "../_chunks/avatar.js";
7
- import { c as p } from "../_chunks/utils.js";
8
- function R({ item: t, isActive: a }) {
9
- const i = m();
10
- return /* @__PURE__ */ e(M, { children: /* @__PURE__ */ e(
11
- k,
2
+ import { jsxs as l, jsx as e, Fragment as y } from "react/jsx-runtime";
3
+ import * as x from "react";
4
+ import { useLink as I } from "./link-context.js";
5
+ import { S as R, a as O, b, c as T, d as W, e as z, f as H, g as U, h as $, i as w, j as C, k, l as A, m as q, n as D, o as E } from "../_chunks/sidebar.js";
6
+ import { Collapsible as J, CollapsibleTrigger as K, CollapsibleContent as Q } from "../ui/collapsible.js";
7
+ import { A as V, a as X, b as Y } from "../_chunks/avatar.js";
8
+ import { c as u } from "../_chunks/utils.js";
9
+ function Z({ className: a }) {
10
+ return /* @__PURE__ */ e(
11
+ "svg",
12
12
  {
13
- asChild: !0,
14
- isActive: a,
15
- tooltip: t.title,
16
- className: p(
17
- "relative gap-ds-04 rounded-ds-lg px-ds-04 py-ds-03 transition-colors",
18
- a ? "bg-interactive-subtle text-interactive after:absolute after:right-0 after:top-0 after:h-full after:w-ds-01 after:rounded-l-ds-full after:bg-interactive after:content-['']" : "text-text-helper hover:bg-layer-02 hover:text-text-primary"
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ width: "16",
15
+ height: "16",
16
+ viewBox: "0 0 24 24",
17
+ fill: "none",
18
+ stroke: "currentColor",
19
+ strokeWidth: "2",
20
+ strokeLinecap: "round",
21
+ strokeLinejoin: "round",
22
+ className: a,
23
+ children: /* @__PURE__ */ e("path", { d: "m9 18 6-6-6-6" })
24
+ }
25
+ );
26
+ }
27
+ const M = "relative gap-ds-04 rounded-ds-lg px-ds-04 py-ds-03 transition-colors", j = "bg-interactive-subtle text-interactive after:absolute after:right-0 after:top-0 after:h-full after:w-ds-01 after:rounded-l-ds-full after:bg-interactive after:content-['']", L = "text-text-helper hover:bg-layer-02 hover:text-text-primary";
28
+ function _({
29
+ item: a,
30
+ isActive: s,
31
+ isPathActive: p
32
+ }) {
33
+ const o = I(), n = a.badge != null ? typeof a.badge == "number" && a.badge > 99 ? "99+" : String(a.badge) : null;
34
+ if (a.children && a.children.length > 0) {
35
+ const d = a.children.some(
36
+ (r) => p(r.href, r.exact)
37
+ ), m = d || s || (a.defaultOpen ?? !1);
38
+ return /* @__PURE__ */ e(J, { defaultOpen: m, className: "group/collapsible", children: /* @__PURE__ */ l(C, { children: [
39
+ /* @__PURE__ */ e(
40
+ k,
41
+ {
42
+ asChild: !0,
43
+ isActive: s || d,
44
+ tooltip: a.title,
45
+ className: u(
46
+ M,
47
+ s || d ? j : L
48
+ ),
49
+ children: /* @__PURE__ */ l(
50
+ o,
51
+ {
52
+ href: a.href,
53
+ "aria-label": a.title,
54
+ "aria-current": s ? "page" : void 0,
55
+ children: [
56
+ /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0", "aria-hidden": "true", children: a.icon }),
57
+ /* @__PURE__ */ e("span", { className: "text-ds-base", children: a.title })
58
+ ]
59
+ }
60
+ )
61
+ }
19
62
  ),
20
- children: /* @__PURE__ */ s(
21
- i,
63
+ n && /* @__PURE__ */ e(A, { children: n }),
64
+ /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(
65
+ "button",
22
66
  {
23
- href: t.href,
24
- "aria-label": t.title,
25
- "aria-current": a ? "page" : void 0,
26
- children: [
27
- /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0", "aria-hidden": "true", children: t.icon }),
28
- /* @__PURE__ */ e("span", { className: "text-ds-base", children: t.title })
29
- ]
67
+ className: "absolute right-ds-02 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-ds-md text-text-helper transition-transform hover:bg-layer-02 hover:text-text-primary group-data-[collapsible=icon]:hidden",
68
+ "aria-label": `Toggle ${a.title}`,
69
+ children: /* @__PURE__ */ e(Z, { className: "h-4 w-4 transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
30
70
  }
31
- )
32
- }
33
- ) });
71
+ ) }),
72
+ /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(q, { children: a.children.map((r) => {
73
+ const h = p(r.href, r.exact);
74
+ return /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(
75
+ E,
76
+ {
77
+ asChild: !0,
78
+ isActive: h,
79
+ children: /* @__PURE__ */ l(
80
+ o,
81
+ {
82
+ href: r.href,
83
+ "aria-current": h ? "page" : void 0,
84
+ children: [
85
+ r.icon && /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0", "aria-hidden": "true", children: r.icon }),
86
+ /* @__PURE__ */ e("span", { children: r.title })
87
+ ]
88
+ }
89
+ )
90
+ }
91
+ ) }, r.href);
92
+ }) }) })
93
+ ] }) });
94
+ }
95
+ return /* @__PURE__ */ l(C, { children: [
96
+ /* @__PURE__ */ e(
97
+ k,
98
+ {
99
+ asChild: !0,
100
+ isActive: s,
101
+ tooltip: a.title,
102
+ className: u(
103
+ M,
104
+ s ? j : L
105
+ ),
106
+ children: /* @__PURE__ */ l(
107
+ o,
108
+ {
109
+ href: a.href,
110
+ "aria-label": a.title,
111
+ "aria-current": s ? "page" : void 0,
112
+ children: [
113
+ /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0", "aria-hidden": "true", children: a.icon }),
114
+ /* @__PURE__ */ e("span", { className: "text-ds-base", children: a.title })
115
+ ]
116
+ }
117
+ )
118
+ }
119
+ ),
120
+ n && /* @__PURE__ */ e(A, { children: n })
121
+ ] });
34
122
  }
35
- const z = N.forwardRef(
123
+ const P = x.forwardRef(
36
124
  ({
37
- currentPath: t = "/",
38
- user: a,
39
- navGroups: i = [],
40
- logo: h,
41
- footerLinks: n = [],
42
- className: x,
43
- ...b
44
- }, f) => {
45
- var c;
46
- const g = m(), v = (r, l = !1) => l || r === "/" ? t === r : t.startsWith(r);
47
- return /* @__PURE__ */ s(
48
- u,
125
+ currentPath: a = "/",
126
+ user: s,
127
+ navGroups: p = [],
128
+ logo: o,
129
+ headerSlot: n,
130
+ preFooterSlot: d,
131
+ footerLinks: m = [],
132
+ footer: r,
133
+ renderItem: h,
134
+ className: B,
135
+ ...F
136
+ }, G) => {
137
+ var v;
138
+ const f = I(), g = (t, i = !1) => i || t === "/" ? a === t : a.startsWith(t);
139
+ return /* @__PURE__ */ l(
140
+ R,
49
141
  {
50
- ...b,
51
- ref: f,
142
+ ...F,
143
+ ref: G,
52
144
  "aria-label": "Main navigation",
53
- className: p(
145
+ className: u(
54
146
  "z-raised hidden h-full flex-col border-r border-border bg-layer-01 md:flex",
55
- x
147
+ B
56
148
  ),
57
149
  children: [
58
- /* @__PURE__ */ e(S, { className: "px-ds-06 py-ds-06", children: h ?? /* @__PURE__ */ e("span", { className: "text-ds-lg font-semibold text-text-primary", children: "Logo" }) }),
59
- a && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04 px-ds-06 pb-ds-05", children: [
60
- /* @__PURE__ */ s(G, { className: "h-ds-sm-plus w-ds-sm-plus", children: [
61
- a.image ? /* @__PURE__ */ e(F, { src: a.image, alt: a.name }) : null,
62
- /* @__PURE__ */ e(I, { className: "bg-layer-03 text-text-primary", children: (c = a.name) == null ? void 0 : c.charAt(0).toUpperCase() })
150
+ /* @__PURE__ */ e(O, { className: "px-ds-06 py-ds-06", children: o ?? /* @__PURE__ */ e("span", { className: "text-ds-lg font-semibold text-text-primary", children: "Logo" }) }),
151
+ s && /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-04 px-ds-06 pb-ds-05", children: [
152
+ /* @__PURE__ */ l(V, { className: "h-ds-sm-plus w-ds-sm-plus", children: [
153
+ s.image ? /* @__PURE__ */ e(X, { src: s.image, alt: s.name }) : null,
154
+ /* @__PURE__ */ e(Y, { className: "bg-layer-03 text-text-primary", children: (v = s.name) == null ? void 0 : v.charAt(0).toUpperCase() })
63
155
  ] }),
64
- /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-col", children: [
65
- /* @__PURE__ */ e("span", { className: "truncate text-ds-md text-text-primary", children: a.name }),
66
- /* @__PURE__ */ e("span", { className: "truncate text-ds-sm text-text-placeholder", children: a.designation || a.role })
156
+ /* @__PURE__ */ l("div", { className: "flex min-w-0 flex-col", children: [
157
+ /* @__PURE__ */ e("span", { className: "truncate text-ds-md text-text-primary", children: s.name }),
158
+ /* @__PURE__ */ e("span", { className: "truncate text-ds-sm text-text-placeholder", children: s.designation || s.role })
67
159
  ] })
68
160
  ] }),
69
- /* @__PURE__ */ e(o, {}),
70
- /* @__PURE__ */ e(y, { className: "no-scrollbar px-ds-04", children: i.map((r, l) => /* @__PURE__ */ s("div", { children: [
71
- l > 0 && /* @__PURE__ */ e(o, {}),
72
- /* @__PURE__ */ s(A, { children: [
73
- /* @__PURE__ */ e(w, { className: "px-ds-04 text-ds-sm text-text-placeholder", children: r.label }),
74
- /* @__PURE__ */ e(L, { children: /* @__PURE__ */ e(j, { children: r.items.map((d) => /* @__PURE__ */ e(
75
- R,
76
- {
77
- item: d,
78
- isActive: v(d.href, d.exact)
79
- },
80
- d.href
81
- )) }) })
161
+ /* @__PURE__ */ e(b, {}),
162
+ n && /* @__PURE__ */ l(y, { children: [
163
+ n,
164
+ /* @__PURE__ */ e(b, {})
165
+ ] }),
166
+ /* @__PURE__ */ e(T, { className: "no-scrollbar px-ds-04", children: p.map((t, i) => /* @__PURE__ */ l("div", { children: [
167
+ i > 0 && /* @__PURE__ */ e(b, {}),
168
+ /* @__PURE__ */ l(W, { children: [
169
+ /* @__PURE__ */ e(z, { className: "px-ds-04 text-ds-sm text-text-placeholder", children: t.label }),
170
+ t.action && /* @__PURE__ */ e(H, { asChild: !0, children: t.action }),
171
+ /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e($, { children: t.items.map((c) => {
172
+ const N = () => /* @__PURE__ */ e(
173
+ _,
174
+ {
175
+ item: c,
176
+ isActive: g(c.href, c.exact),
177
+ isPathActive: g
178
+ }
179
+ );
180
+ if (h) {
181
+ const S = h(c, N);
182
+ if (S !== null)
183
+ return /* @__PURE__ */ e(x.Fragment, { children: S }, c.href);
184
+ }
185
+ return /* @__PURE__ */ e(x.Fragment, { children: N() }, c.href);
186
+ }) }) })
82
187
  ] })
83
- ] }, r.label)) }),
84
- n.length > 0 && /* @__PURE__ */ e(C, { className: "px-ds-06 py-ds-05", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-start gap-ds-03", children: n.map((r, l) => /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
85
- l > 0 && /* @__PURE__ */ e("div", { className: "h-[16px] w-px bg-border" }),
188
+ ] }, t.label)) }),
189
+ d && /* @__PURE__ */ l(y, { children: [
190
+ /* @__PURE__ */ e(b, {}),
191
+ d
192
+ ] }),
193
+ r ? /* @__PURE__ */ l(w, { className: "px-ds-06 py-ds-05", children: [
194
+ r.slot && /* @__PURE__ */ e("div", { className: "pb-ds-04", children: r.slot }),
195
+ r.links && r.links.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-start gap-ds-03", children: r.links.map((t, i) => /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-03", children: [
196
+ i > 0 && /* @__PURE__ */ e("span", { className: "text-text-placeholder", children: "·" }),
197
+ /* @__PURE__ */ e(
198
+ f,
199
+ {
200
+ className: "text-ds-sm text-text-placeholder transition-colors hover:text-interactive",
201
+ href: t.href,
202
+ children: t.label
203
+ }
204
+ )
205
+ ] }, t.href)) }),
206
+ r.version && /* @__PURE__ */ e("p", { className: "text-center text-ds-sm text-text-placeholder", children: r.version })
207
+ ] }) : m.length > 0 ? /* @__PURE__ */ e(w, { className: "px-ds-06 py-ds-05", children: /* @__PURE__ */ e("div", { className: "flex items-center justify-start gap-ds-03", children: m.map((t, i) => /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-03", children: [
208
+ i > 0 && /* @__PURE__ */ e("div", { className: "h-[16px] w-px bg-border" }),
86
209
  /* @__PURE__ */ e(
87
- g,
210
+ f,
88
211
  {
89
212
  className: "text-ds-md text-text-placeholder transition-colors hover:text-interactive",
90
- href: r.href,
91
- children: r.label
213
+ href: t.href,
214
+ children: t.label
92
215
  }
93
216
  )
94
- ] }, r.href)) }) })
217
+ ] }, t.href)) }) }) : null
95
218
  ]
96
219
  }
97
220
  );
98
221
  }
99
222
  );
100
- z.displayName = "AppSidebar";
223
+ P.displayName = "AppSidebar";
101
224
  export {
102
- z as AppSidebar
225
+ P as AppSidebar
103
226
  };
@@ -5,7 +5,7 @@ import { useColorMode as I } from "../hooks/use-color-mode.js";
5
5
  import { A as j, a as K, b as F } from "../_chunks/avatar.js";
6
6
  import { DropdownMenu as U, DropdownMenuTrigger as B, DropdownMenuContent as E, DropdownMenuItem as a, DropdownMenuSeparator as w } from "../ui/dropdown-menu.js";
7
7
  import { a as c, b as n, c as i } from "../_chunks/tooltip.js";
8
- import { k as R } from "../_chunks/sidebar.js";
8
+ import { p as R } from "../_chunks/sidebar.js";
9
9
  import { IconSearch as z, IconSparkles as L, IconUser as O, IconSun as P, IconMoon as q, IconLogout as G } from "@tabler/icons-react";
10
10
  import { c as d } from "../_chunks/utils.js";
11
11
  const H = g.forwardRef(
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as s, jsxs as p } from "react/jsx-runtime";
3
3
  import * as o from "react";
4
- import { O as l, J as g, K as d, M as r, N as n, Q as c, U as f, V as x, W as b } from "../_chunks/primitives.js";
4
+ import { O as l, B as g, D as d, E as r, J as n, K as c, M as f, N as x, Q as b } from "../_chunks/primitives.js";
5
5
  import { c as i } from "../_chunks/utils.js";
6
6
  const C = x, T = b, y = g, m = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
7
7
  l,
@@ -58,7 +58,7 @@ const N = o.forwardRef(
58
58
  )
59
59
  );
60
60
  N.displayName = "AlertDialogFooter";
61
- const A = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
61
+ const D = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
62
62
  r,
63
63
  {
64
64
  ref: a,
@@ -69,8 +69,8 @@ const A = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
69
69
  ...t
70
70
  }
71
71
  ));
72
- A.displayName = r.displayName;
73
- const D = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
72
+ D.displayName = r.displayName;
73
+ const A = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
74
74
  n,
75
75
  {
76
76
  ref: a,
@@ -78,7 +78,7 @@ const D = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
78
78
  ...t
79
79
  }
80
80
  ));
81
- D.displayName = n.displayName;
81
+ A.displayName = n.displayName;
82
82
  const w = o.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
83
83
  c,
84
84
  {
@@ -108,11 +108,11 @@ export {
108
108
  w as AlertDialogAction,
109
109
  R as AlertDialogCancel,
110
110
  u as AlertDialogContent,
111
- D as AlertDialogDescription,
111
+ A as AlertDialogDescription,
112
112
  N as AlertDialogFooter,
113
113
  v as AlertDialogHeader,
114
114
  m as AlertDialogOverlay,
115
115
  y as AlertDialogPortal,
116
- A as AlertDialogTitle,
116
+ D as AlertDialogTitle,
117
117
  T as AlertDialogTrigger
118
118
  };
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsx as s } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
- import { g as a, h as l, i as n } from "../_chunks/primitives.js";
4
+ import { U as a, V as l, W as n } from "../_chunks/primitives.js";
5
5
  import { c as r } from "../_chunks/utils.js";
6
- const f = l, g = n, d = i.forwardRef(({ className: t, ...o }, e) => /* @__PURE__ */ s(
6
+ const f = l, C = n, d = i.forwardRef(({ className: t, ...o }, e) => /* @__PURE__ */ s(
7
7
  a,
8
8
  {
9
9
  ref: e,
@@ -18,5 +18,5 @@ d.displayName = a.displayName;
18
18
  export {
19
19
  f as Collapsible,
20
20
  d as CollapsibleContent,
21
- g as CollapsibleTrigger
21
+ C as CollapsibleTrigger
22
22
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as r, jsxs as d, Fragment as B } from "react/jsx-runtime";
3
3
  import * as a from "react";
4
- import { j as G, k as U, P as q, l as J } from "../_chunks/primitives.js";
4
+ import { g as G, h as U, P as q, i as J } from "../_chunks/primitives.js";
5
5
  import { IconChevronDown as Q, IconSearch as W, IconCheck as Y, IconX as Z } from "@tabler/icons-react";
6
6
  import { c as x } from "../_chunks/utils.js";
7
7
  const P = 2, V = 36, ee = a.forwardRef(
@@ -10,13 +10,13 @@ const P = 2, V = 36, ee = a.forwardRef(
10
10
  value: f,
11
11
  onValueChange: m,
12
12
  placeholder: S = "Select...",
13
- searchPlaceholder: j = "Search...",
14
- emptyMessage: A = "No results found",
13
+ searchPlaceholder: A = "Search...",
14
+ emptyMessage: L = "No results found",
15
15
  multiple: b = !1,
16
16
  disabled: p = !1,
17
- className: L,
18
- triggerClassName: T,
19
- maxVisible: $ = 6,
17
+ className: T,
18
+ triggerClassName: $,
19
+ maxVisible: j = 6,
20
20
  renderOption: E,
21
21
  ...H
22
22
  }, M) => {
@@ -168,7 +168,7 @@ const P = 2, V = 36, ee = a.forwardRef(
168
168
  }
169
169
  return /* @__PURE__ */ r("span", { className: "flex-1 truncate text-left text-text-placeholder", children: S });
170
170
  };
171
- return /* @__PURE__ */ r(G, { open: h, onOpenChange: z, children: /* @__PURE__ */ d("div", { className: x("relative", L), ...H, children: [
171
+ return /* @__PURE__ */ r(G, { open: h, onOpenChange: z, children: /* @__PURE__ */ d("div", { className: x("relative", T), ...H, children: [
172
172
  /* @__PURE__ */ r(U, { asChild: !0, disabled: p, children: /* @__PURE__ */ d(
173
173
  "button",
174
174
  {
@@ -185,7 +185,7 @@ const P = 2, V = 36, ee = a.forwardRef(
185
185
  "transition-colors duration-fast-01",
186
186
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-2 focus-visible:border-border-interactive",
187
187
  "disabled:cursor-not-allowed disabled:opacity-[0.38]",
188
- T
188
+ $
189
189
  ),
190
190
  children: [
191
191
  F(),
@@ -215,7 +215,7 @@ const P = 2, V = 36, ee = a.forwardRef(
215
215
  ref: k,
216
216
  type: "text",
217
217
  className: "flex-1 bg-transparent py-ds-03 text-ds-md outline-none placeholder:text-text-placeholder",
218
- placeholder: j,
218
+ placeholder: A,
219
219
  value: v,
220
220
  onChange: (e) => {
221
221
  y(e.target.value), c(-1);
@@ -228,7 +228,7 @@ const P = 2, V = 36, ee = a.forwardRef(
228
228
  }
229
229
  )
230
230
  ] }),
231
- o.length === 0 ? /* @__PURE__ */ r("div", { className: "px-ds-04 py-ds-05 text-center text-ds-md text-text-tertiary", children: A }) : /* @__PURE__ */ r(
231
+ o.length === 0 ? /* @__PURE__ */ r("div", { className: "px-ds-04 py-ds-05 text-center text-ds-md text-text-tertiary", children: L }) : /* @__PURE__ */ r(
232
232
  "ul",
233
233
  {
234
234
  ref: N,
@@ -236,7 +236,7 @@ const P = 2, V = 36, ee = a.forwardRef(
236
236
  role: "listbox",
237
237
  "aria-multiselectable": b || void 0,
238
238
  className: "overflow-auto p-ds-02",
239
- style: { maxHeight: `${$ * V}px` },
239
+ style: { maxHeight: `${j * V}px` },
240
240
  children: o.map((e, t) => {
241
241
  const s = O(e.value);
242
242
  return /* @__PURE__ */ d(
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as i, jsx as s } from "react/jsx-runtime";
3
3
  import * as n from "react";
4
- import { m as l, n as m, o as c, p, q as u, r as f, s as x, t as b, L as y, u as N, v as h, G as C, w as g, x as w, y as M } from "../_chunks/primitives.js";
4
+ import { j as l, k as m, l as c, m as p, n as u, o as f, p as x, q as b, L as y, r as N, s as h, G as C, t as g, u as w, v as M } from "../_chunks/primitives.js";
5
5
  import { IconChevronRight as R, IconCheck as I, IconCircle as v } from "@tabler/icons-react";
6
6
  import { c as d } from "../_chunks/utils.js";
7
7
  const F = h, H = M, J = C, K = c, O = w, Q = g, S = n.forwardRef(({ className: e, inset: t, children: a, ...o }, r) => /* @__PURE__ */ i(
@@ -33,7 +33,7 @@ const z = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(
33
33
  }
34
34
  ));
35
35
  z.displayName = m.displayName;
36
- const G = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(c, { children: /* @__PURE__ */ s(
36
+ const j = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(c, { children: /* @__PURE__ */ s(
37
37
  p,
38
38
  {
39
39
  ref: a,
@@ -44,8 +44,8 @@ const G = n.forwardRef(({ className: e, ...t }, a) => /* @__PURE__ */ s(c, { chi
44
44
  ...t
45
45
  }
46
46
  ) }));
47
- G.displayName = p.displayName;
48
- const j = n.forwardRef(({ className: e, inset: t, ...a }, o) => /* @__PURE__ */ s(
47
+ j.displayName = p.displayName;
48
+ const G = n.forwardRef(({ className: e, inset: t, ...a }, o) => /* @__PURE__ */ s(
49
49
  u,
50
50
  {
51
51
  ref: o,
@@ -57,8 +57,8 @@ const j = n.forwardRef(({ className: e, inset: t, ...a }, o) => /* @__PURE__ */
57
57
  ...a
58
58
  }
59
59
  ));
60
- j.displayName = u.displayName;
61
- const T = n.forwardRef(({ className: e, children: t, checked: a, ...o }, r) => /* @__PURE__ */ i(
60
+ G.displayName = u.displayName;
61
+ const k = n.forwardRef(({ className: e, children: t, checked: a, ...o }, r) => /* @__PURE__ */ i(
62
62
  f,
63
63
  {
64
64
  ref: r,
@@ -74,8 +74,8 @@ const T = n.forwardRef(({ className: e, children: t, checked: a, ...o }, r) => /
74
74
  ]
75
75
  }
76
76
  ));
77
- T.displayName = f.displayName;
78
- const k = n.forwardRef(({ className: e, children: t, ...a }, o) => /* @__PURE__ */ i(
77
+ k.displayName = f.displayName;
78
+ const T = n.forwardRef(({ className: e, children: t, ...a }, o) => /* @__PURE__ */ i(
79
79
  b,
80
80
  {
81
81
  ref: o,
@@ -90,7 +90,7 @@ const k = n.forwardRef(({ className: e, children: t, ...a }, o) => /* @__PURE__
90
90
  ]
91
91
  }
92
92
  ));
93
- k.displayName = b.displayName;
93
+ T.displayName = b.displayName;
94
94
  const L = n.forwardRef(({ className: e, inset: t, ...a }, o) => /* @__PURE__ */ s(
95
95
  y,
96
96
  {
@@ -129,14 +129,14 @@ const q = ({
129
129
  q.displayName = "ContextMenuShortcut";
130
130
  export {
131
131
  F as ContextMenu,
132
- T as ContextMenuCheckboxItem,
133
- G as ContextMenuContent,
132
+ k as ContextMenuCheckboxItem,
133
+ j as ContextMenuContent,
134
134
  J as ContextMenuGroup,
135
- j as ContextMenuItem,
135
+ G as ContextMenuItem,
136
136
  L as ContextMenuLabel,
137
137
  K as ContextMenuPortal,
138
138
  Q as ContextMenuRadioGroup,
139
- k as ContextMenuRadioItem,
139
+ T as ContextMenuRadioItem,
140
140
  P as ContextMenuSeparator,
141
141
  q as ContextMenuShortcut,
142
142
  O as ContextMenuSub,
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
- import { z as n, A as o, B as m, D as l } from "../_chunks/primitives.js";
4
+ import { w as n, x as o, y as m, z as l } from "../_chunks/primitives.js";
5
5
  import { c as f } from "../_chunks/utils.js";
6
- const u = m, C = l, p = i.forwardRef(({ className: a, align: e = "center", sideOffset: d = 4, ...r }, s) => /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
6
+ const u = m, w = l, p = i.forwardRef(({ className: a, align: e = "center", sideOffset: d = 4, ...r }, s) => /* @__PURE__ */ t(n, { children: /* @__PURE__ */ t(
7
7
  o,
8
8
  {
9
9
  ref: s,
@@ -20,5 +20,5 @@ p.displayName = o.displayName;
20
20
  export {
21
21
  u as HoverCard,
22
22
  p as HoverCardContent,
23
- C as HoverCardTrigger
23
+ w as HoverCardTrigger
24
24
  };
package/dist/ui/index.js CHANGED
@@ -2,11 +2,11 @@
2
2
  import { B as K, b as Q } from "../_chunks/button.js";
3
3
  import { IconButton as Y } from "./icon-button.js";
4
4
  import { B as $, S as ee, u as re } from "../_chunks/spinner.js";
5
- import { I as ae, l as oe, S as ne, c as se, h as ie, d as le, m as ce, f as de, e as be, a as ue, n as ge, o as xe, g as me, p as pe, q as fe, j as ve, i as ye, r as Ne, s as Se, t as Ce, u as Te, v as we, w as Me, b as he, k as Ie, x as De, y as Ae } from "../_chunks/sidebar.js";
5
+ import { I as ae, q as oe, S as ne, c as se, i as ie, d as le, f as ce, g as de, e as be, a as ue, r as ge, s as xe, h as me, t as pe, l as fe, k as ve, j as ye, u as Ne, m as Se, o as Ce, n as Te, v as we, w as Me, b as he, p as Ie, x as De, y as Ae } from "../_chunks/sidebar.js";
6
6
  import { ColorInput as Ve } from "./color-input.js";
7
7
  import { jsxs as c, jsx as t } from "react/jsx-runtime";
8
8
  import * as s from "react";
9
- import { E as m, bo as S, bn as p, bl as f, bm as v } from "../_chunks/primitives.js";
9
+ import { A as m, bo as S, bn as p, bl as f, bm as v } from "../_chunks/primitives.js";
10
10
  import { c as l } from "../_chunks/utils.js";
11
11
  import { VisuallyHidden as ke } from "./visually-hidden.js";
12
12
  import { Autocomplete as Ge } from "./autocomplete.js";
package/dist/ui/label.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsxs as m, jsx as i } from "react/jsx-runtime";
3
3
  import * as d from "react";
4
- import { E as e } from "../_chunks/primitives.js";
4
+ import { A as e } from "../_chunks/primitives.js";
5
5
  import { c as n } from "../_chunks/utils.js";
6
6
  const p = d.forwardRef(({ className: a, required: t, children: r, ...s }, o) => /* @__PURE__ */ m(
7
7
  e,
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
3
  import * as i from "react";
4
- import { P as n, l as t, j as m, k as p, aT as l } from "../_chunks/primitives.js";
4
+ import { P as n, i as t, g as m, h as p, aT as l } from "../_chunks/primitives.js";
5
5
  import { c } from "../_chunks/utils.js";
6
6
  const P = m, u = p, v = l, f = i.forwardRef(({ className: e, align: a = "center", sideOffset: r = 4, ...s }, d) => /* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(
7
7
  t,
@@ -6,7 +6,7 @@ import "@tabler/icons-react";
6
6
  import "../hooks/use-mobile.js";
7
7
  import "../_chunks/utils.js";
8
8
  import "../_chunks/button.js";
9
- import { S as m, c as M, h as g, d as G, m as I, f as c, e as l, a as B, n as f, o as k, g as v, p as A, q as C, j as h, i as j, r as q, s as w, t as x, u as y, v as F, w as H, b as L, k as P, y as R } from "../_chunks/sidebar.js";
9
+ import { S as m, c as M, i as g, d as l, f as G, g as I, e as c, a as B, r as f, s as k, h as v, t as A, l as C, k as h, j, u as w, m as x, o as y, n as F, v as H, w as L, b as P, p as R, y as T } from "../_chunks/sidebar.js";
10
10
  import "./sheet.js";
11
11
  import "./skeleton.js";
12
12
  import "../_chunks/tooltip.js";
@@ -15,10 +15,10 @@ export {
15
15
  m as Sidebar,
16
16
  M as SidebarContent,
17
17
  g as SidebarFooter,
18
- G as SidebarGroup,
19
- I as SidebarGroupAction,
20
- c as SidebarGroupContent,
21
- l as SidebarGroupLabel,
18
+ l as SidebarGroup,
19
+ G as SidebarGroupAction,
20
+ I as SidebarGroupContent,
21
+ c as SidebarGroupLabel,
22
22
  B as SidebarHeader,
23
23
  f as SidebarInput,
24
24
  k as SidebarInset,
@@ -27,13 +27,13 @@ export {
27
27
  C as SidebarMenuBadge,
28
28
  h as SidebarMenuButton,
29
29
  j as SidebarMenuItem,
30
- q as SidebarMenuSkeleton,
31
- w as SidebarMenuSub,
32
- x as SidebarMenuSubButton,
33
- y as SidebarMenuSubItem,
34
- F as SidebarProvider,
35
- H as SidebarRail,
36
- L as SidebarSeparator,
37
- P as SidebarTrigger,
38
- R as useSidebar
30
+ w as SidebarMenuSkeleton,
31
+ x as SidebarMenuSub,
32
+ y as SidebarMenuSubButton,
33
+ F as SidebarMenuSubItem,
34
+ H as SidebarProvider,
35
+ L as SidebarRail,
36
+ P as SidebarSeparator,
37
+ R as SidebarTrigger,
38
+ T as useSidebar
39
39
  };
package/llms-full.txt CHANGED
@@ -5,7 +5,7 @@
5
5
  > All variant values and props verified from source CVA definitions.
6
6
  >
7
7
  > Package: @devalok/shilp-sutra
8
- > Version: 0.6.1
8
+ > Version: 0.10.0
9
9
 
10
10
  ---
11
11
 
@@ -1677,6 +1677,96 @@ Note: getFormFieldA11y() was removed in favor of useFormField() hook.
1677
1677
  />
1678
1678
  - Gotchas: Must be wrapped in SidebarProvider (from ui/sidebar)
1679
1679
 
1680
+ ### AppSidebar v0.10.0 additions
1681
+
1682
+ New props on AppSidebarProps:
1683
+ footer: SidebarFooterConfig — structured footer (takes precedence over footerLinks)
1684
+ headerSlot: ReactNode — content between user info and navigation
1685
+ preFooterSlot: ReactNode — content between navigation and footer
1686
+ renderItem: (item: NavItem, defaultRender: () => ReactNode) => ReactNode | null — custom item rendering
1687
+
1688
+ New fields on NavItem:
1689
+ badge: string | number — badge rendered on the right side (numbers > 99 display as "99+")
1690
+ children: NavSubItem[] — renders as collapsible sub-list with chevron toggle
1691
+ defaultOpen: boolean — whether collapsible is open by default (auto-opens when a child is active)
1692
+
1693
+ New type NavSubItem: { title: string, href: string, icon?: ReactNode, exact?: boolean }
1694
+
1695
+ New fields on NavGroup:
1696
+ action: ReactNode — action button rendered next to the group label
1697
+
1698
+ New type SidebarFooterConfig:
1699
+ links: Array<{ label: string, href: string }> — legal/utility links as a row
1700
+ version: string — version or build info text
1701
+ slot: ReactNode — custom content above the links row
1702
+
1703
+ Deprecated props:
1704
+ footerLinks — use footer.links instead (footerLinks still works for backwards compat)
1705
+
1706
+ - S9: Collapsible nav items
1707
+ ```tsx
1708
+ // Collapsible nav items
1709
+ {
1710
+ title: "Projects",
1711
+ href: "/projects",
1712
+ icon: <IconLayoutKanban />,
1713
+ children: [
1714
+ { title: "Karm V2", href: "/projects/abc/board" },
1715
+ { title: "Website Redesign", href: "/projects/def/board" },
1716
+ ],
1717
+ }
1718
+ ```
1719
+
1720
+ - S10: Nav item badge
1721
+ ```tsx
1722
+ { title: "My Tasks", href: "/my-tasks", icon: <IconChecklist />, badge: 5 }
1723
+ { title: "Messages", href: "/messages", icon: <IconMessage />, badge: "New" }
1724
+ // Numbers > 99 display as "99+"
1725
+ ```
1726
+
1727
+ - S11: Nav group action
1728
+ ```tsx
1729
+ {
1730
+ label: "WORK",
1731
+ items: [...],
1732
+ action: <button onClick={...} aria-label="New project"><IconPlus size={14} /></button>,
1733
+ }
1734
+ ```
1735
+
1736
+ - S12: Structured footer
1737
+ ```tsx
1738
+ <AppSidebar
1739
+ footer={{
1740
+ links: [{ label: "Terms", href: "/terms" }, { label: "Privacy", href: "/privacy" }],
1741
+ version: "v2.4.1",
1742
+ slot: <a href="/changelog">What's new?</a>,
1743
+ }}
1744
+ />
1745
+ // footer takes precedence over footerLinks. footerLinks still works for backwards compat.
1746
+ ```
1747
+
1748
+ - S13: Header and pre-footer slots
1749
+ ```tsx
1750
+ <AppSidebar
1751
+ headerSlot={<DharaWidget userId={user.id} />}
1752
+ preFooterSlot={<UpgradeBanner />}
1753
+ navGroups={navGroups}
1754
+ />
1755
+ // Slots auto-add SidebarSeparator. No extra DOM when not provided.
1756
+ ```
1757
+
1758
+ - S14: Custom item rendering
1759
+ ```tsx
1760
+ <AppSidebar
1761
+ renderItem={(item, defaultRender) => {
1762
+ if (item.href === "/my-tasks") {
1763
+ return <CustomTasksItem item={item} />
1764
+ }
1765
+ return null // use default for all other items
1766
+ }}
1767
+ />
1768
+ ```
1769
+
1680
1770
  ## BottomNavbar
1681
1771
  - Import: @devalok/shilp-sutra/shell/bottom-navbar
1682
1772
  - Server-safe: No
package/llms.txt CHANGED
@@ -160,6 +160,17 @@ NOTIFICATION SELECTION GUIDE:
160
160
  ### Shell Components (app-level layout)
161
161
  - TopBar: pageTitle, user, onNavigate, onLogout, notificationSlot, mobileLogo, userMenuItems?(UserMenuItem[] — custom items between Profile and theme toggle, supports icon, href, onClick, separator, badge, disabled, color)
162
162
  - AppSidebar: navigation tree with NavItem[], NavGroup[]
163
+
164
+ ### AppSidebar (v0.10.0 additions)
165
+ - NavItem.children?: NavSubItem[] — collapsible sub-list with chevron toggle
166
+ - NavItem.defaultOpen?: boolean — control initial collapsed state
167
+ - NavItem.badge?: string | number — badge on nav item (99+ cap for numbers)
168
+ - NavGroup.action?: ReactNode — action button next to group label
169
+ - footer?: SidebarFooterConfig — structured footer with links, version, slot (replaces footerLinks)
170
+ - headerSlot?: ReactNode — content between user info and navigation
171
+ - preFooterSlot?: ReactNode — content between navigation and footer
172
+ - renderItem?: (item, defaultRender) => ReactNode | null — custom item rendering
173
+
163
174
  - BottomNavbar: mobile navigation, user is optional (not required to render)
164
175
  - NotificationCenter: notifications[], onMarkRead, onMarkAllRead, onNavigate, getNotificationRoute?(returns string|null, fallback null), footerSlot?, emptyState?, headerActions?, popoverClassName?, onDismiss?(id)
165
176
  - AppCommandPalette: user, isAdmin, onNavigate, onSearch, searchResults, isSearching, onSearchResultSelect
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devalok/shilp-sutra",
3
- "version": "0.9.1",
3
+ "version": "0.10.0",
4
4
  "description": "Devalok Design System — tokens, components, and patterns for Next.js",
5
5
  "license": "MIT",
6
6
  "type": "module",