@devalok/shilp-sutra 0.33.2 → 0.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/dist/_chunks/badge-group.js +306 -246
  2. package/dist/_chunks/chat.js +513 -0
  3. package/dist/_chunks/date-picker.js +748 -0
  4. package/dist/_chunks/document-preview.js +109 -90
  5. package/dist/_chunks/file-preview.js +492 -504
  6. package/dist/_chunks/framer.js +5564 -5613
  7. package/dist/_chunks/image-preview.js +127 -88
  8. package/dist/_chunks/keybinding.js +12 -14
  9. package/dist/_chunks/link-context.js +19 -16
  10. package/dist/_chunks/mention-suggestion.js +353 -350
  11. package/dist/_chunks/motion-provider.js +26 -20
  12. package/dist/_chunks/popover.js +127 -0
  13. package/dist/_chunks/primitives.js +7584 -6425
  14. package/dist/_chunks/rich-chat-input.js +2070 -0
  15. package/dist/_chunks/rolldown-runtime.js +21 -0
  16. package/dist/_chunks/shared.js +126 -0
  17. package/dist/_chunks/sonner.js +605 -734
  18. package/dist/_chunks/stat-row.js +418 -440
  19. package/dist/_chunks/tiptap.js +15850 -19964
  20. package/dist/_chunks/tree-view.js +231 -290
  21. package/dist/_chunks/use-calendar.js +161 -208
  22. package/dist/_chunks/vendor-client.js +314 -2199
  23. package/dist/_chunks/vendor-utils.js +1721 -2978
  24. package/dist/ai/ai-command-provider.js +23 -17
  25. package/dist/ai/block-renderer.js +68 -51
  26. package/dist/ai/blocks/index.js +2 -12
  27. package/dist/ai/command-bar.js +470 -519
  28. package/dist/ai/conversation.js +241 -227
  29. package/dist/ai/index.js +181 -167
  30. package/dist/ai/types.js +0 -1
  31. package/dist/composed/activity-feed.js +232 -202
  32. package/dist/composed/avatar-group.js +164 -222
  33. package/dist/composed/bulk-action-bar.js +174 -165
  34. package/dist/composed/command-palette.js +290 -308
  35. package/dist/composed/confirm-dialog.js +28 -48
  36. package/dist/composed/content-card.js +69 -108
  37. package/dist/composed/date-picker/index.js +3 -13
  38. package/dist/composed/deadline-indicator.js +68 -74
  39. package/dist/composed/emoji-picker.js +83 -110
  40. package/dist/composed/empty-state.js +64 -103
  41. package/dist/composed/error-boundary.js +129 -127
  42. package/dist/composed/file-preview.js +2 -12
  43. package/dist/composed/filter-bar.js +98 -130
  44. package/dist/composed/form-section.js +61 -45
  45. package/dist/composed/global-loading.js +34 -47
  46. package/dist/composed/index.js +34 -92
  47. package/dist/composed/inline-edit.js +92 -107
  48. package/dist/composed/lib/string-utils.js +8 -8
  49. package/dist/composed/loading-skeleton.js +103 -171
  50. package/dist/composed/markdown-viewer.js +187 -139
  51. package/dist/composed/master-detail.js +147 -156
  52. package/dist/composed/member-picker.js +46 -49
  53. package/dist/composed/multi-select-popover.js +181 -179
  54. package/dist/composed/page-header.js +54 -76
  55. package/dist/composed/page-skeletons.js +143 -127
  56. package/dist/composed/priority-indicator.js +105 -111
  57. package/dist/composed/responsive-overlay.js +36 -41
  58. package/dist/composed/rich-chat-input.js +2 -1860
  59. package/dist/composed/rich-text-editor.js +561 -424
  60. package/dist/composed/schedule-view.js +134 -185
  61. package/dist/composed/simple-tooltip.js +21 -21
  62. package/dist/composed/status-badge.js +133 -137
  63. package/dist/hooks/index.js +7 -12
  64. package/dist/hooks/use-color-mode.js +28 -25
  65. package/dist/hooks/use-mobile.js +13 -13
  66. package/dist/hooks/use-toast.js +2 -4
  67. package/dist/hooks/use-touch-device.js +9 -11
  68. package/dist/hooks/use-viewport-height.js +14 -14
  69. package/dist/motion/index.js +3 -11
  70. package/dist/motion/primitives-index.js +226 -186
  71. package/dist/shell/app-command-palette.js +203 -234
  72. package/dist/shell/bottom-navbar.js +150 -190
  73. package/dist/shell/command-registry.js +13 -14
  74. package/dist/shell/index.js +10 -20
  75. package/dist/shell/link-context.js +2 -5
  76. package/dist/shell/notification-center.js +238 -259
  77. package/dist/shell/notification-preferences.js +241 -184
  78. package/dist/shell/sidebar.js +251 -281
  79. package/dist/shell/top-bar.js +203 -237
  80. package/dist/tailwind/index.cjs +426 -451
  81. package/dist/tailwind/index.js +2 -4
  82. package/dist/tailwind/preset.d.ts.map +1 -1
  83. package/dist/tailwind/preset.js +443 -468
  84. package/dist/ui/accordion.js +52 -60
  85. package/dist/ui/alert-dialog.js +111 -156
  86. package/dist/ui/alert.js +177 -99
  87. package/dist/ui/aspect-ratio.js +13 -16
  88. package/dist/ui/autocomplete.js +112 -148
  89. package/dist/ui/avatar.js +196 -169
  90. package/dist/ui/badge-group.js +2 -7
  91. package/dist/ui/badge-indicator.js +42 -51
  92. package/dist/ui/badge.js +2 -15
  93. package/dist/ui/banner.js +76 -68
  94. package/dist/ui/breadcrumb.js +65 -84
  95. package/dist/ui/button-group.js +109 -102
  96. package/dist/ui/button-processing.js +69 -73
  97. package/dist/ui/button.js +393 -279
  98. package/dist/ui/card.js +151 -157
  99. package/dist/ui/charts/index.js +1002 -1319
  100. package/dist/ui/chat/index.js +2 -11
  101. package/dist/ui/checkbox.js +77 -100
  102. package/dist/ui/code.js +18 -32
  103. package/dist/ui/collapsible.js +21 -29
  104. package/dist/ui/color-input.js +453 -372
  105. package/dist/ui/color-swatch.js +60 -90
  106. package/dist/ui/combobox.js +244 -293
  107. package/dist/ui/container.js +18 -24
  108. package/dist/ui/context-menu.js +154 -203
  109. package/dist/ui/data-table-body.js +116 -213
  110. package/dist/ui/data-table-bulk-actions.js +43 -59
  111. package/dist/ui/data-table-card.js +84 -71
  112. package/dist/ui/data-table-context.js +39 -42
  113. package/dist/ui/data-table-header.js +98 -139
  114. package/dist/ui/data-table-pagination.js +69 -82
  115. package/dist/ui/data-table-toolbar.js +104 -130
  116. package/dist/ui/data-table.js +278 -354
  117. package/dist/ui/devalok-grain.js +77 -66
  118. package/dist/ui/dialog.js +122 -151
  119. package/dist/ui/dropdown-menu.js +152 -203
  120. package/dist/ui/file-upload.js +242 -266
  121. package/dist/ui/form.js +60 -56
  122. package/dist/ui/hover-card.js +54 -54
  123. package/dist/ui/icon-button.js +21 -26
  124. package/dist/ui/icon-context.js +17 -17
  125. package/dist/ui/icon-group.js +22 -29
  126. package/dist/ui/icon.js +201 -121
  127. package/dist/ui/index.js +74 -350
  128. package/dist/ui/input-otp.d.ts.map +1 -1
  129. package/dist/ui/input-otp.js +44 -48
  130. package/dist/ui/input.js +92 -169
  131. package/dist/ui/label.js +17 -22
  132. package/dist/ui/lib/date-utils.js +14 -11
  133. package/dist/ui/lib/motion.js +77 -36
  134. package/dist/ui/lib/utils.js +39 -16
  135. package/dist/ui/link.js +13 -24
  136. package/dist/ui/menubar.js +132 -210
  137. package/dist/ui/navigation-menu.js +164 -194
  138. package/dist/ui/number-input.js +72 -95
  139. package/dist/ui/pagination.js +122 -159
  140. package/dist/ui/popover.js +2 -131
  141. package/dist/ui/progress-ring.js +133 -143
  142. package/dist/ui/progress.js +51 -95
  143. package/dist/ui/radio.js +41 -50
  144. package/dist/ui/search-input.js +51 -53
  145. package/dist/ui/segmented-control.js +93 -114
  146. package/dist/ui/select.js +131 -157
  147. package/dist/ui/separator.js +15 -25
  148. package/dist/ui/sheet.js +135 -163
  149. package/dist/ui/sidebar.js +357 -600
  150. package/dist/ui/skeleton.js +179 -231
  151. package/dist/ui/slider.js +24 -34
  152. package/dist/ui/spinner.js +226 -205
  153. package/dist/ui/split-button.js +227 -276
  154. package/dist/ui/stack.js +56 -70
  155. package/dist/ui/stat-card.js +259 -251
  156. package/dist/ui/status-dot.js +67 -63
  157. package/dist/ui/stepper.js +119 -168
  158. package/dist/ui/switch.js +51 -54
  159. package/dist/ui/table.js +57 -90
  160. package/dist/ui/tabs.js +139 -156
  161. package/dist/ui/text.js +52 -59
  162. package/dist/ui/textarea.js +40 -57
  163. package/dist/ui/toast-types.js +0 -1
  164. package/dist/ui/toast.js +554 -536
  165. package/dist/ui/toaster.js +23 -33
  166. package/dist/ui/toggle-group.js +37 -41
  167. package/dist/ui/toggle.js +36 -40
  168. package/dist/ui/tooltip.js +80 -65
  169. package/dist/ui/tree-view/index.js +2 -6
  170. package/dist/ui/visually-hidden.js +12 -10
  171. package/llms-full.txt +1 -1
  172. package/llms.txt +12 -0
  173. package/package.json +3 -3
  174. package/dist/_chunks/date-time-picker.js +0 -851
  175. package/dist/_chunks/typing-indicator.js +0 -565
@@ -1,285 +1,255 @@
1
1
  "use client";
2
- import { jsxs as s, jsx as e, Fragment as C } from "react/jsx-runtime";
3
- import * as m from "react";
4
- import { Sidebar as R, SidebarHeader as D, SidebarSeparator as f, SidebarContent as O, SidebarGroup as W, SidebarGroupLabel as T, SidebarGroupAction as z, SidebarGroupContent as H, SidebarMenu as U, SidebarFooter as S, SidebarMenuItem as k, SidebarMenuButton as y, SidebarMenuBadge as L, SidebarMenuSub as $, SidebarMenuSubItem as q, SidebarMenuSubButton as E } from "../ui/sidebar.js";
5
- import { Collapsible as J, CollapsibleTrigger as K, CollapsibleContent as Q } from "../ui/collapsible.js";
6
- import { Avatar as V, AvatarImage as X, AvatarFallback as Y } from "../ui/avatar.js";
7
- import { cn as b } from "../ui/lib/utils.js";
8
- import { u as j } from "../_chunks/link-context.js";
9
- function Z({ className: r }) {
10
- return /* @__PURE__ */ e(
11
- "svg",
12
- {
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: r,
23
- children: /* @__PURE__ */ e("path", { d: "m9 18 6-6-6-6" })
24
- }
25
- );
2
+ import { cn as e } from "../ui/lib/utils.js";
3
+ import { Avatar as t, AvatarFallback as n, AvatarImage as r } from "../ui/avatar.js";
4
+ import { Collapsible as i, CollapsibleContent as a, CollapsibleTrigger as o } from "../ui/collapsible.js";
5
+ import { n as s } from "../_chunks/link-context.js";
6
+ import { Sidebar as c, SidebarContent as l, SidebarFooter as u, SidebarGroup as d, SidebarGroupAction as f, SidebarGroupContent as p, SidebarGroupLabel as m, SidebarHeader as h, SidebarMenu as g, SidebarMenuBadge as _, SidebarMenuButton as v, SidebarMenuItem as y, SidebarMenuSub as b, SidebarMenuSubButton as x, SidebarMenuSubItem as S, SidebarSeparator as C } from "../ui/sidebar.js";
7
+ import "./link-context.js";
8
+ import * as w from "react";
9
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
10
+ //#region src/shell/sidebar.tsx
11
+ function O({ className: e }) {
12
+ return /* @__PURE__ */ E("svg", {
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: e,
23
+ children: /* @__PURE__ */ E("path", { d: "m9 18 6-6-6-6" })
24
+ });
26
25
  }
27
- function _({ className: r }) {
28
- return /* @__PURE__ */ s(
29
- "svg",
30
- {
31
- xmlns: "http://www.w3.org/2000/svg",
32
- width: "16",
33
- height: "16",
34
- viewBox: "0 0 24 24",
35
- fill: "none",
36
- stroke: "currentColor",
37
- strokeWidth: "2",
38
- strokeLinecap: "round",
39
- strokeLinejoin: "round",
40
- className: r,
41
- children: [
42
- /* @__PURE__ */ e("path", { d: "M18 6 6 18" }),
43
- /* @__PURE__ */ e("path", { d: "m6 6 12 12" })
44
- ]
45
- }
46
- );
26
+ function k({ className: e }) {
27
+ return /* @__PURE__ */ D("svg", {
28
+ xmlns: "http://www.w3.org/2000/svg",
29
+ width: "16",
30
+ height: "16",
31
+ viewBox: "0 0 24 24",
32
+ fill: "none",
33
+ stroke: "currentColor",
34
+ strokeWidth: "2",
35
+ strokeLinecap: "round",
36
+ strokeLinejoin: "round",
37
+ className: e,
38
+ children: [/* @__PURE__ */ E("path", { d: "M18 6 6 18" }), /* @__PURE__ */ E("path", { d: "m6 6 12 12" })]
39
+ });
47
40
  }
48
- const M = "relative gap-ds-04 rounded-ds-lg px-ds-04 py-ds-03 transition-colors duration-fast-02", A = "bg-accent-2 text-accent-11 after:absolute after:right-0 after:top-0 after:h-full after:w-ds-01 after:rounded-l-ds-full after:bg-accent-9 after:content-['']", I = "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg";
49
- function P({
50
- item: r,
51
- isActive: t,
52
- isPathActive: u
53
- }) {
54
- const h = j(), i = r.badge != null ? typeof r.badge == "number" && r.badge > 99 ? "99+" : String(r.badge) : null;
55
- if (r.children && r.children.length > 0) {
56
- const d = r.children.some(
57
- (l) => u(l.href, l.exact)
58
- ), g = d || t || (r.defaultOpen ?? !1);
59
- return /* @__PURE__ */ e(J, { defaultOpen: g, className: "group/collapsible", children: /* @__PURE__ */ s(k, { children: [
60
- /* @__PURE__ */ s("div", { className: "relative", children: [
61
- /* @__PURE__ */ e(
62
- y,
63
- {
64
- asChild: !0,
65
- isActive: t || d,
66
- tooltip: r.title,
67
- className: b(
68
- M,
69
- t || d ? A : I
70
- ),
71
- children: /* @__PURE__ */ s(
72
- h,
73
- {
74
- href: r.href,
75
- "aria-label": r.title,
76
- "aria-current": t ? "page" : void 0,
77
- children: [
78
- /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0", "aria-hidden": "true", children: r.icon }),
79
- /* @__PURE__ */ e("span", { className: "text-ds-base", children: r.title })
80
- ]
81
- }
82
- )
83
- }
84
- ),
85
- i && /* @__PURE__ */ e(L, { children: i }),
86
- /* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(
87
- "button",
88
- {
89
- 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-surface-fg-subtle transition-colors hover:bg-surface-raised-hover hover:text-surface-fg group-data-[collapsible=icon]:hidden",
90
- "aria-label": `Toggle ${r.title}`,
91
- children: /* @__PURE__ */ e(Z, { className: "h-4 w-4 transition-transform duration-fast-02 ease-productive-standard group-data-[state=open]/collapsible:rotate-90" })
92
- }
93
- ) })
94
- ] }),
95
- /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e($, { children: r.children.map((l) => {
96
- const a = u(l.href, l.exact);
97
- return /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
98
- E,
99
- {
100
- asChild: !0,
101
- isActive: a,
102
- children: /* @__PURE__ */ s(
103
- h,
104
- {
105
- href: l.href,
106
- "aria-current": a ? "page" : void 0,
107
- children: [
108
- l.icon && /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0", "aria-hidden": "true", children: l.icon }),
109
- /* @__PURE__ */ e("span", { children: l.title })
110
- ]
111
- }
112
- )
113
- }
114
- ) }, l.href);
115
- }) }) })
116
- ] }) });
117
- }
118
- return /* @__PURE__ */ s(k, { children: [
119
- /* @__PURE__ */ e(
120
- y,
121
- {
122
- asChild: !0,
123
- isActive: t,
124
- tooltip: r.title,
125
- className: b(
126
- M,
127
- t ? A : I
128
- ),
129
- children: /* @__PURE__ */ s(
130
- h,
131
- {
132
- href: r.href,
133
- "aria-label": r.title,
134
- "aria-current": t ? "page" : void 0,
135
- children: [
136
- /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0", "aria-hidden": "true", children: r.icon }),
137
- /* @__PURE__ */ e("span", { className: "text-ds-base", children: r.title })
138
- ]
139
- }
140
- )
141
- }
142
- ),
143
- i && /* @__PURE__ */ e(L, { children: i })
144
- ] });
41
+ var A = "relative gap-ds-04 rounded-ds-lg px-ds-04 py-ds-03 transition-colors duration-fast-02", j = "bg-accent-2 text-accent-11 after:absolute after:right-0 after:top-0 after:h-full after:w-ds-01 after:rounded-l-ds-full after:bg-accent-9 after:content-['']", M = "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg";
42
+ function N({ item: t, isActive: n, isPathActive: r }) {
43
+ let c = s(), l = t.badge == null ? null : typeof t.badge == "number" && t.badge > 99 ? "99+" : String(t.badge);
44
+ if (t.children && t.children.length > 0) {
45
+ let s = t.children.some((e) => r(e.href, e.exact));
46
+ return /* @__PURE__ */ E(i, {
47
+ defaultOpen: s || n || (t.defaultOpen ?? !1),
48
+ className: "group/collapsible",
49
+ children: /* @__PURE__ */ D(y, { children: [/* @__PURE__ */ D("div", {
50
+ className: "relative",
51
+ children: [
52
+ /* @__PURE__ */ E(v, {
53
+ asChild: !0,
54
+ isActive: n || s,
55
+ tooltip: t.title,
56
+ className: e(A, n || s ? j : M),
57
+ children: /* @__PURE__ */ D(c, {
58
+ href: t.href,
59
+ "aria-label": t.title,
60
+ "aria-current": n ? "page" : void 0,
61
+ children: [/* @__PURE__ */ E("span", {
62
+ className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0",
63
+ "aria-hidden": "true",
64
+ children: t.icon
65
+ }), /* @__PURE__ */ E("span", {
66
+ className: "text-ds-base",
67
+ children: t.title
68
+ })]
69
+ })
70
+ }),
71
+ l && /* @__PURE__ */ E(_, { children: l }),
72
+ /* @__PURE__ */ E(o, {
73
+ asChild: !0,
74
+ children: /* @__PURE__ */ E("button", {
75
+ 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-surface-fg-subtle transition-colors hover:bg-surface-raised-hover hover:text-surface-fg group-data-[collapsible=icon]:hidden",
76
+ "aria-label": `Toggle ${t.title}`,
77
+ children: /* @__PURE__ */ E(O, { className: "h-4 w-4 transition-transform duration-fast-02 ease-productive-standard group-data-[state=open]/collapsible:rotate-90" })
78
+ })
79
+ })
80
+ ]
81
+ }), /* @__PURE__ */ E(a, { children: /* @__PURE__ */ E(b, { children: t.children.map((e) => {
82
+ let t = r(e.href, e.exact);
83
+ return /* @__PURE__ */ E(S, { children: /* @__PURE__ */ E(x, {
84
+ asChild: !0,
85
+ isActive: t,
86
+ children: /* @__PURE__ */ D(c, {
87
+ href: e.href,
88
+ "aria-current": t ? "page" : void 0,
89
+ children: [e.icon && /* @__PURE__ */ E("span", {
90
+ className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm shrink-0",
91
+ "aria-hidden": "true",
92
+ children: e.icon
93
+ }), /* @__PURE__ */ E("span", { children: e.title })]
94
+ })
95
+ }) }, e.href);
96
+ }) }) })] })
97
+ });
98
+ }
99
+ return /* @__PURE__ */ D(y, { children: [/* @__PURE__ */ E(v, {
100
+ asChild: !0,
101
+ isActive: n,
102
+ tooltip: t.title,
103
+ className: e(A, n ? j : M),
104
+ children: /* @__PURE__ */ D(c, {
105
+ href: t.href,
106
+ "aria-label": t.title,
107
+ "aria-current": n ? "page" : void 0,
108
+ children: [/* @__PURE__ */ E("span", {
109
+ className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0",
110
+ "aria-hidden": "true",
111
+ children: t.icon
112
+ }), /* @__PURE__ */ E("span", {
113
+ className: "text-ds-base",
114
+ children: t.title
115
+ })]
116
+ })
117
+ }), l && /* @__PURE__ */ E(_, { children: l })] });
145
118
  }
146
- const ee = m.forwardRef(
147
- ({
148
- currentPath: r = "/",
149
- user: t,
150
- navGroups: u = [],
151
- logo: h,
152
- headerSlot: i,
153
- preFooterSlot: d,
154
- preFooterClassName: g,
155
- footerLinks: l = [],
156
- footer: a,
157
- renderItem: x,
158
- className: B,
159
- ...F
160
- }, G) => {
161
- const p = j(), v = (n, c = !1) => c || n === "/" ? r === n : r.startsWith(n);
162
- return /* @__PURE__ */ s(
163
- R,
164
- {
165
- ...F,
166
- ref: G,
167
- "aria-label": "Main navigation",
168
- className: b(
169
- "z-raised hidden h-full flex-col border-r border-surface-border-strong bg-surface-raised md:flex",
170
- B
171
- ),
172
- children: [
173
- /* @__PURE__ */ e(D, { className: "px-ds-06 py-ds-06", children: h ?? /* @__PURE__ */ e("span", { className: "text-ds-lg font-semibold text-surface-fg", children: "Logo" }) }),
174
- t && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04 px-ds-06 pb-ds-05", children: [
175
- /* @__PURE__ */ s(V, { className: "h-ds-sm-plus w-ds-sm-plus", children: [
176
- t.image ? /* @__PURE__ */ e(X, { src: t.image, alt: t.name }) : null,
177
- /* @__PURE__ */ e(Y, { className: "bg-surface-raised-hover text-surface-fg", children: t.name?.charAt(0).toUpperCase() })
178
- ] }),
179
- /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-col", children: [
180
- /* @__PURE__ */ e("span", { className: "truncate text-ds-md text-surface-fg", children: t.name }),
181
- /* @__PURE__ */ e("span", { className: "truncate text-ds-sm text-surface-fg-subtle", children: t.designation || t.role })
182
- ] })
183
- ] }),
184
- /* @__PURE__ */ e(f, {}),
185
- i && /* @__PURE__ */ s(C, { children: [
186
- i,
187
- /* @__PURE__ */ e(f, {})
188
- ] }),
189
- /* @__PURE__ */ e(O, { className: "no-scrollbar px-ds-04", children: u.map((n, c) => /* @__PURE__ */ s("div", { children: [
190
- c > 0 && /* @__PURE__ */ e(f, {}),
191
- /* @__PURE__ */ s(W, { children: [
192
- /* @__PURE__ */ e(T, { className: "px-ds-04 text-ds-sm text-surface-fg-subtle", children: n.label }),
193
- n.action && /* @__PURE__ */ e(z, { asChild: !0, children: n.action }),
194
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(U, { children: n.items.map((o) => {
195
- const N = () => /* @__PURE__ */ e(
196
- P,
197
- {
198
- item: o,
199
- isActive: v(o.href, o.exact),
200
- isPathActive: v
201
- }
202
- );
203
- if (x) {
204
- const w = x(o, N);
205
- if (w !== null)
206
- return /* @__PURE__ */ e(m.Fragment, { children: w }, o.href);
207
- }
208
- return /* @__PURE__ */ e(m.Fragment, { children: N() }, o.href);
209
- }) }) })
210
- ] })
211
- ] }, n.label)) }),
212
- d && /* @__PURE__ */ s(C, { children: [
213
- /* @__PURE__ */ e(f, {}),
214
- /* @__PURE__ */ e("div", { className: g, children: d })
215
- ] }),
216
- a ? /* @__PURE__ */ s(S, { className: "gap-ds-03 px-ds-06 py-ds-05", children: [
217
- a.slot && /* @__PURE__ */ e("div", { children: a.slot }),
218
- a.promo && /* @__PURE__ */ s("div", { className: "relative rounded-ds-lg border border-surface-border bg-surface-raised p-ds-04 shadow-raised", children: [
219
- a.promo.onDismiss && /* @__PURE__ */ e(
220
- "button",
221
- {
222
- onClick: a.promo.onDismiss,
223
- "aria-label": "Dismiss",
224
- className: "absolute right-ds-02 top-ds-02 flex h-5 w-5 items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-raised-hover hover:text-surface-fg",
225
- children: /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" })
226
- }
227
- ),
228
- /* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-03", children: [
229
- a.promo.icon && /* @__PURE__ */ e("span", { className: "text-accent-11 [&>svg]:h-ico-md [&>svg]:w-ico-md", "aria-hidden": "true", children: a.promo.icon }),
230
- /* @__PURE__ */ s("div", { className: "flex min-w-0 flex-col gap-ds-03", children: [
231
- /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg", children: a.promo.text }),
232
- a.promo.action && (a.promo.action.href ? /* @__PURE__ */ e(
233
- p,
234
- {
235
- href: a.promo.action.href,
236
- onClick: a.promo.action.onClick,
237
- className: "inline-flex self-start rounded-ds-md bg-accent-9 px-ds-04 py-ds-02 text-ds-sm font-medium text-accent-fg transition-colors hover:bg-accent-10",
238
- children: a.promo.action.label
239
- }
240
- ) : /* @__PURE__ */ e(
241
- "button",
242
- {
243
- onClick: a.promo.action.onClick,
244
- className: "inline-flex self-start rounded-ds-md bg-accent-9 px-ds-04 py-ds-02 text-ds-sm font-medium text-accent-fg transition-colors hover:bg-accent-10",
245
- children: a.promo.action.label
246
- }
247
- ))
248
- ] })
249
- ] })
250
- ] }),
251
- (a.links?.length || a.version) && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 text-ds-sm text-surface-fg-subtle", children: [
252
- a.links?.map((n, c) => /* @__PURE__ */ s(m.Fragment, { children: [
253
- c > 0 && /* @__PURE__ */ e("span", { children: "·" }),
254
- /* @__PURE__ */ e(
255
- p,
256
- {
257
- className: "transition-colors hover:text-accent-11",
258
- href: n.href,
259
- children: n.label
260
- }
261
- )
262
- ] }, n.href)),
263
- a.links?.length && a.version && /* @__PURE__ */ e("span", { children: "·" }),
264
- a.version && (typeof a.version == "string" ? /* @__PURE__ */ e("span", { children: a.version }) : /* @__PURE__ */ e(p, { className: "transition-colors hover:text-accent-11", href: a.version.href, children: a.version.label }))
265
- ] })
266
- ] }) : l.length > 0 ? /* @__PURE__ */ e(S, { className: "px-ds-06 py-ds-05", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03 text-ds-sm text-surface-fg-subtle", children: l.map((n, c) => /* @__PURE__ */ s(m.Fragment, { children: [
267
- c > 0 && /* @__PURE__ */ e("span", { children: "·" }),
268
- /* @__PURE__ */ e(
269
- p,
270
- {
271
- className: "transition-colors hover:text-accent-11",
272
- href: n.href,
273
- children: n.label
274
- }
275
- )
276
- ] }, n.href)) }) }) : null
277
- ]
278
- }
279
- );
280
- }
281
- );
282
- ee.displayName = "AppSidebar";
283
- export {
284
- ee as AppSidebar
285
- };
119
+ var P = w.forwardRef(({ currentPath: i = "/", user: a, navGroups: o = [], logo: _, headerSlot: v, preFooterSlot: y, preFooterClassName: b, footerLinks: x = [], footer: S, renderItem: O, className: A, ...j }, M) => {
120
+ let P = s(), F = (e, t = !1) => t || e === "/" ? i === e : i.startsWith(e);
121
+ return /* @__PURE__ */ D(c, {
122
+ ...j,
123
+ ref: M,
124
+ "aria-label": "Main navigation",
125
+ className: e("z-raised hidden h-full flex-col border-r border-surface-border-strong bg-surface-raised md:flex", A),
126
+ children: [
127
+ /* @__PURE__ */ E(h, {
128
+ className: "px-ds-06 py-ds-06",
129
+ children: _ ?? /* @__PURE__ */ E("span", {
130
+ className: "text-ds-lg font-semibold text-surface-fg",
131
+ children: "Logo"
132
+ })
133
+ }),
134
+ a && /* @__PURE__ */ D("div", {
135
+ className: "flex items-center gap-ds-04 px-ds-06 pb-ds-05",
136
+ children: [/* @__PURE__ */ D(t, {
137
+ className: "h-ds-sm-plus w-ds-sm-plus",
138
+ children: [a.image ? /* @__PURE__ */ E(r, {
139
+ src: a.image,
140
+ alt: a.name
141
+ }) : null, /* @__PURE__ */ E(n, {
142
+ className: "bg-surface-raised-hover text-surface-fg",
143
+ children: a.name?.charAt(0).toUpperCase()
144
+ })]
145
+ }), /* @__PURE__ */ D("div", {
146
+ className: "flex min-w-0 flex-col",
147
+ children: [/* @__PURE__ */ E("span", {
148
+ className: "truncate text-ds-md text-surface-fg",
149
+ children: a.name
150
+ }), /* @__PURE__ */ E("span", {
151
+ className: "truncate text-ds-sm text-surface-fg-subtle",
152
+ children: a.designation || a.role
153
+ })]
154
+ })]
155
+ }),
156
+ /* @__PURE__ */ E(C, {}),
157
+ v && /* @__PURE__ */ D(T, { children: [v, /* @__PURE__ */ E(C, {})] }),
158
+ /* @__PURE__ */ E(l, {
159
+ className: "no-scrollbar px-ds-04",
160
+ children: o.map((e, t) => /* @__PURE__ */ D("div", { children: [t > 0 && /* @__PURE__ */ E(C, {}), /* @__PURE__ */ D(d, { children: [
161
+ /* @__PURE__ */ E(m, {
162
+ className: "px-ds-04 text-ds-sm text-surface-fg-subtle",
163
+ children: e.label
164
+ }),
165
+ e.action && /* @__PURE__ */ E(f, {
166
+ asChild: !0,
167
+ children: e.action
168
+ }),
169
+ /* @__PURE__ */ E(p, { children: /* @__PURE__ */ E(g, { children: e.items.map((e) => {
170
+ let t = () => /* @__PURE__ */ E(N, {
171
+ item: e,
172
+ isActive: F(e.href, e.exact),
173
+ isPathActive: F
174
+ });
175
+ if (O) {
176
+ let n = O(e, t);
177
+ if (n !== null) return /* @__PURE__ */ E(w.Fragment, { children: n }, e.href);
178
+ }
179
+ return /* @__PURE__ */ E(w.Fragment, { children: t() }, e.href);
180
+ }) }) })
181
+ ] })] }, e.label))
182
+ }),
183
+ y && /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E(C, {}), /* @__PURE__ */ E("div", {
184
+ className: b,
185
+ children: y
186
+ })] }),
187
+ S ? /* @__PURE__ */ D(u, {
188
+ className: "gap-ds-03 px-ds-06 py-ds-05",
189
+ children: [
190
+ S.slot && /* @__PURE__ */ E("div", { children: S.slot }),
191
+ S.promo && /* @__PURE__ */ D("div", {
192
+ className: "relative rounded-ds-lg border border-surface-border bg-surface-raised p-ds-04 shadow-raised",
193
+ children: [S.promo.onDismiss && /* @__PURE__ */ E("button", {
194
+ onClick: S.promo.onDismiss,
195
+ "aria-label": "Dismiss",
196
+ className: "absolute right-ds-02 top-ds-02 flex h-5 w-5 items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-raised-hover hover:text-surface-fg",
197
+ children: /* @__PURE__ */ E(k, { className: "h-3.5 w-3.5" })
198
+ }), /* @__PURE__ */ D("div", {
199
+ className: "flex flex-col gap-ds-03",
200
+ children: [S.promo.icon && /* @__PURE__ */ E("span", {
201
+ className: "text-accent-11 [&>svg]:h-ico-md [&>svg]:w-ico-md",
202
+ "aria-hidden": "true",
203
+ children: S.promo.icon
204
+ }), /* @__PURE__ */ D("div", {
205
+ className: "flex min-w-0 flex-col gap-ds-03",
206
+ children: [/* @__PURE__ */ E("p", {
207
+ className: "text-ds-sm text-surface-fg",
208
+ children: S.promo.text
209
+ }), S.promo.action && (S.promo.action.href ? /* @__PURE__ */ E(P, {
210
+ href: S.promo.action.href,
211
+ onClick: S.promo.action.onClick,
212
+ className: "inline-flex self-start rounded-ds-md bg-accent-9 px-ds-04 py-ds-02 text-ds-sm font-medium text-accent-fg transition-colors hover:bg-accent-10",
213
+ children: S.promo.action.label
214
+ }) : /* @__PURE__ */ E("button", {
215
+ onClick: S.promo.action.onClick,
216
+ className: "inline-flex self-start rounded-ds-md bg-accent-9 px-ds-04 py-ds-02 text-ds-sm font-medium text-accent-fg transition-colors hover:bg-accent-10",
217
+ children: S.promo.action.label
218
+ }))]
219
+ })]
220
+ })]
221
+ }),
222
+ (S.links?.length || S.version) && /* @__PURE__ */ D("div", {
223
+ className: "flex items-center gap-ds-03 text-ds-sm text-surface-fg-subtle",
224
+ children: [
225
+ S.links?.map((e, t) => /* @__PURE__ */ D(w.Fragment, { children: [t > 0 && /* @__PURE__ */ E("span", { children: "·" }), /* @__PURE__ */ E(P, {
226
+ className: "transition-colors hover:text-accent-11",
227
+ href: e.href,
228
+ children: e.label
229
+ })] }, e.href)),
230
+ S.links?.length && S.version && /* @__PURE__ */ E("span", { children: "·" }),
231
+ S.version && (typeof S.version == "string" ? /* @__PURE__ */ E("span", { children: S.version }) : /* @__PURE__ */ E(P, {
232
+ className: "transition-colors hover:text-accent-11",
233
+ href: S.version.href,
234
+ children: S.version.label
235
+ }))
236
+ ]
237
+ })
238
+ ]
239
+ }) : x.length > 0 ? /* @__PURE__ */ E(u, {
240
+ className: "px-ds-06 py-ds-05",
241
+ children: /* @__PURE__ */ E("div", {
242
+ className: "flex items-center gap-ds-03 text-ds-sm text-surface-fg-subtle",
243
+ children: x.map((e, t) => /* @__PURE__ */ D(w.Fragment, { children: [t > 0 && /* @__PURE__ */ E("span", { children: "·" }), /* @__PURE__ */ E(P, {
244
+ className: "transition-colors hover:text-accent-11",
245
+ href: e.href,
246
+ children: e.label
247
+ })] }, e.href))
248
+ })
249
+ }) : null
250
+ ]
251
+ });
252
+ });
253
+ P.displayName = "AppSidebar";
254
+ //#endregion
255
+ export { P as AppSidebar };