@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.
- package/dist/_chunks/badge-group.js +306 -246
- package/dist/_chunks/chat.js +513 -0
- package/dist/_chunks/date-picker.js +748 -0
- package/dist/_chunks/document-preview.js +109 -90
- package/dist/_chunks/file-preview.js +492 -504
- package/dist/_chunks/framer.js +5564 -5613
- package/dist/_chunks/image-preview.js +127 -88
- package/dist/_chunks/keybinding.js +12 -14
- package/dist/_chunks/link-context.js +19 -16
- package/dist/_chunks/mention-suggestion.js +353 -350
- package/dist/_chunks/motion-provider.js +26 -20
- package/dist/_chunks/popover.js +127 -0
- package/dist/_chunks/primitives.js +7584 -6425
- package/dist/_chunks/rich-chat-input.js +2070 -0
- package/dist/_chunks/rolldown-runtime.js +21 -0
- package/dist/_chunks/shared.js +126 -0
- package/dist/_chunks/sonner.js +605 -734
- package/dist/_chunks/stat-row.js +418 -440
- package/dist/_chunks/tiptap.js +15850 -19964
- package/dist/_chunks/tree-view.js +231 -290
- package/dist/_chunks/use-calendar.js +161 -208
- package/dist/_chunks/vendor-client.js +314 -2199
- package/dist/_chunks/vendor-utils.js +1721 -2978
- package/dist/ai/ai-command-provider.js +23 -17
- package/dist/ai/block-renderer.js +68 -51
- package/dist/ai/blocks/index.js +2 -12
- package/dist/ai/command-bar.js +470 -519
- package/dist/ai/conversation.js +241 -227
- package/dist/ai/index.js +181 -167
- package/dist/ai/types.js +0 -1
- package/dist/composed/activity-feed.js +232 -202
- package/dist/composed/avatar-group.js +164 -222
- package/dist/composed/bulk-action-bar.js +174 -165
- package/dist/composed/command-palette.js +290 -308
- package/dist/composed/confirm-dialog.js +28 -48
- package/dist/composed/content-card.js +69 -108
- package/dist/composed/date-picker/index.js +3 -13
- package/dist/composed/deadline-indicator.js +68 -74
- package/dist/composed/emoji-picker.js +83 -110
- package/dist/composed/empty-state.js +64 -103
- package/dist/composed/error-boundary.js +129 -127
- package/dist/composed/file-preview.js +2 -12
- package/dist/composed/filter-bar.js +98 -130
- package/dist/composed/form-section.js +61 -45
- package/dist/composed/global-loading.js +34 -47
- package/dist/composed/index.js +34 -92
- package/dist/composed/inline-edit.js +92 -107
- package/dist/composed/lib/string-utils.js +8 -8
- package/dist/composed/loading-skeleton.js +103 -171
- package/dist/composed/markdown-viewer.js +187 -139
- package/dist/composed/master-detail.js +147 -156
- package/dist/composed/member-picker.js +46 -49
- package/dist/composed/multi-select-popover.js +181 -179
- package/dist/composed/page-header.js +54 -76
- package/dist/composed/page-skeletons.js +143 -127
- package/dist/composed/priority-indicator.js +105 -111
- package/dist/composed/responsive-overlay.js +36 -41
- package/dist/composed/rich-chat-input.js +2 -1860
- package/dist/composed/rich-text-editor.js +561 -424
- package/dist/composed/schedule-view.js +134 -185
- package/dist/composed/simple-tooltip.js +21 -21
- package/dist/composed/status-badge.js +133 -137
- package/dist/hooks/index.js +7 -12
- package/dist/hooks/use-color-mode.js +28 -25
- package/dist/hooks/use-mobile.js +13 -13
- package/dist/hooks/use-toast.js +2 -4
- package/dist/hooks/use-touch-device.js +9 -11
- package/dist/hooks/use-viewport-height.js +14 -14
- package/dist/motion/index.js +3 -11
- package/dist/motion/primitives-index.js +226 -186
- package/dist/shell/app-command-palette.js +203 -234
- package/dist/shell/bottom-navbar.js +150 -190
- package/dist/shell/command-registry.js +13 -14
- package/dist/shell/index.js +10 -20
- package/dist/shell/link-context.js +2 -5
- package/dist/shell/notification-center.js +238 -259
- package/dist/shell/notification-preferences.js +241 -184
- package/dist/shell/sidebar.js +251 -281
- package/dist/shell/top-bar.js +203 -237
- package/dist/tailwind/index.cjs +426 -451
- package/dist/tailwind/index.js +2 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +443 -468
- package/dist/ui/accordion.js +52 -60
- package/dist/ui/alert-dialog.js +111 -156
- package/dist/ui/alert.js +177 -99
- package/dist/ui/aspect-ratio.js +13 -16
- package/dist/ui/autocomplete.js +112 -148
- package/dist/ui/avatar.js +196 -169
- package/dist/ui/badge-group.js +2 -7
- package/dist/ui/badge-indicator.js +42 -51
- package/dist/ui/badge.js +2 -15
- package/dist/ui/banner.js +76 -68
- package/dist/ui/breadcrumb.js +65 -84
- package/dist/ui/button-group.js +109 -102
- package/dist/ui/button-processing.js +69 -73
- package/dist/ui/button.js +393 -279
- package/dist/ui/card.js +151 -157
- package/dist/ui/charts/index.js +1002 -1319
- package/dist/ui/chat/index.js +2 -11
- package/dist/ui/checkbox.js +77 -100
- package/dist/ui/code.js +18 -32
- package/dist/ui/collapsible.js +21 -29
- package/dist/ui/color-input.js +453 -372
- package/dist/ui/color-swatch.js +60 -90
- package/dist/ui/combobox.js +244 -293
- package/dist/ui/container.js +18 -24
- package/dist/ui/context-menu.js +154 -203
- package/dist/ui/data-table-body.js +116 -213
- package/dist/ui/data-table-bulk-actions.js +43 -59
- package/dist/ui/data-table-card.js +84 -71
- package/dist/ui/data-table-context.js +39 -42
- package/dist/ui/data-table-header.js +98 -139
- package/dist/ui/data-table-pagination.js +69 -82
- package/dist/ui/data-table-toolbar.js +104 -130
- package/dist/ui/data-table.js +278 -354
- package/dist/ui/devalok-grain.js +77 -66
- package/dist/ui/dialog.js +122 -151
- package/dist/ui/dropdown-menu.js +152 -203
- package/dist/ui/file-upload.js +242 -266
- package/dist/ui/form.js +60 -56
- package/dist/ui/hover-card.js +54 -54
- package/dist/ui/icon-button.js +21 -26
- package/dist/ui/icon-context.js +17 -17
- package/dist/ui/icon-group.js +22 -29
- package/dist/ui/icon.js +201 -121
- package/dist/ui/index.js +74 -350
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +44 -48
- package/dist/ui/input.js +92 -169
- package/dist/ui/label.js +17 -22
- package/dist/ui/lib/date-utils.js +14 -11
- package/dist/ui/lib/motion.js +77 -36
- package/dist/ui/lib/utils.js +39 -16
- package/dist/ui/link.js +13 -24
- package/dist/ui/menubar.js +132 -210
- package/dist/ui/navigation-menu.js +164 -194
- package/dist/ui/number-input.js +72 -95
- package/dist/ui/pagination.js +122 -159
- package/dist/ui/popover.js +2 -131
- package/dist/ui/progress-ring.js +133 -143
- package/dist/ui/progress.js +51 -95
- package/dist/ui/radio.js +41 -50
- package/dist/ui/search-input.js +51 -53
- package/dist/ui/segmented-control.js +93 -114
- package/dist/ui/select.js +131 -157
- package/dist/ui/separator.js +15 -25
- package/dist/ui/sheet.js +135 -163
- package/dist/ui/sidebar.js +357 -600
- package/dist/ui/skeleton.js +179 -231
- package/dist/ui/slider.js +24 -34
- package/dist/ui/spinner.js +226 -205
- package/dist/ui/split-button.js +227 -276
- package/dist/ui/stack.js +56 -70
- package/dist/ui/stat-card.js +259 -251
- package/dist/ui/status-dot.js +67 -63
- package/dist/ui/stepper.js +119 -168
- package/dist/ui/switch.js +51 -54
- package/dist/ui/table.js +57 -90
- package/dist/ui/tabs.js +139 -156
- package/dist/ui/text.js +52 -59
- package/dist/ui/textarea.js +40 -57
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.js +554 -536
- package/dist/ui/toaster.js +23 -33
- package/dist/ui/toggle-group.js +37 -41
- package/dist/ui/toggle.js +36 -40
- package/dist/ui/tooltip.js +80 -65
- package/dist/ui/tree-view/index.js +2 -6
- package/dist/ui/visually-hidden.js +12 -10
- package/llms-full.txt +1 -1
- package/llms.txt +12 -0
- package/package.json +3 -3
- package/dist/_chunks/date-time-picker.js +0 -851
- package/dist/_chunks/typing-indicator.js +0 -565
package/dist/shell/sidebar.js
CHANGED
|
@@ -1,285 +1,255 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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 };
|