@devalok/shilp-sutra 0.15.0 → 0.16.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.
@@ -0,0 +1,386 @@
1
+ "use client";
2
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
3
+ import * as $ from "react";
4
+ import { IconRefresh as g, IconX as u, IconCheck as C, IconAlertCircle as j, IconLoader2 as z, IconPhoto as F, IconFile as I } from "@tabler/icons-react";
5
+ import { c as i } from "../_chunks/utils.js";
6
+ import { Progress as y } from "../ui/progress.js";
7
+ function P(e) {
8
+ return !e || e < 0 || !Number.isFinite(e) ? "0 B" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : e < 1024 * 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : `${(e / (1024 * 1024 * 1024)).toFixed(2)} GB`;
9
+ }
10
+ const U = /* @__PURE__ */ new Set([
11
+ "jpg",
12
+ "jpeg",
13
+ "png",
14
+ "gif",
15
+ "webp",
16
+ "svg",
17
+ "bmp",
18
+ "ico",
19
+ "avif"
20
+ ]);
21
+ function B(e) {
22
+ var n;
23
+ if (e.previewUrl) return !0;
24
+ const a = ((n = e.name.split(".").pop()) == null ? void 0 : n.toLowerCase()) ?? "";
25
+ return U.has(a);
26
+ }
27
+ function b(e) {
28
+ switch (e) {
29
+ case "complete":
30
+ return "success";
31
+ case "error":
32
+ return "error";
33
+ default:
34
+ return "default";
35
+ }
36
+ }
37
+ function v(e) {
38
+ switch (e.status) {
39
+ case "pending":
40
+ return 0;
41
+ case "uploading":
42
+ return e.progress ?? 0;
43
+ case "processing":
44
+ return;
45
+ case "complete":
46
+ return 100;
47
+ case "error":
48
+ return e.progress ?? 0;
49
+ }
50
+ }
51
+ function N({
52
+ file: e,
53
+ className: a
54
+ }) {
55
+ if (e.previewUrl)
56
+ return /* @__PURE__ */ t(
57
+ "div",
58
+ {
59
+ className: i(
60
+ "h-8 w-8 shrink-0 overflow-hidden rounded-ds-md",
61
+ a
62
+ ),
63
+ children: /* @__PURE__ */ t(
64
+ "img",
65
+ {
66
+ src: e.previewUrl,
67
+ alt: "",
68
+ className: "h-full w-full object-cover"
69
+ }
70
+ )
71
+ }
72
+ );
73
+ if (e.status === "complete")
74
+ return /* @__PURE__ */ t(
75
+ "div",
76
+ {
77
+ className: i(
78
+ "flex h-8 w-8 shrink-0 items-center justify-center rounded-ds-md bg-success-surface animate-scale-in",
79
+ a
80
+ ),
81
+ children: /* @__PURE__ */ t(C, { size: 16, className: "text-text-success animate-check-pop" })
82
+ }
83
+ );
84
+ if (e.status === "error")
85
+ return /* @__PURE__ */ t(
86
+ "div",
87
+ {
88
+ className: i(
89
+ "flex h-8 w-8 shrink-0 items-center justify-center rounded-ds-md bg-error-surface animate-scale-in",
90
+ a
91
+ ),
92
+ children: /* @__PURE__ */ t(j, { size: 16, className: "text-text-error animate-shake" })
93
+ }
94
+ );
95
+ if (e.status === "processing")
96
+ return /* @__PURE__ */ t(
97
+ "div",
98
+ {
99
+ className: i(
100
+ "flex h-8 w-8 shrink-0 items-center justify-center rounded-ds-md bg-layer-02 animate-fade-in",
101
+ a
102
+ ),
103
+ children: /* @__PURE__ */ t(
104
+ z,
105
+ {
106
+ size: 16,
107
+ className: "animate-spin text-text-secondary"
108
+ }
109
+ )
110
+ }
111
+ );
112
+ const n = B(e) ? F : I;
113
+ return /* @__PURE__ */ t(
114
+ "div",
115
+ {
116
+ className: i(
117
+ "flex h-8 w-8 shrink-0 items-center justify-center rounded-ds-md bg-layer-02 transition-opacity duration-fast-02",
118
+ e.status === "pending" && "opacity-50",
119
+ a
120
+ ),
121
+ children: /* @__PURE__ */ t(n, { size: 16, className: "text-text-secondary" })
122
+ }
123
+ );
124
+ }
125
+ function E({
126
+ file: e,
127
+ index: a,
128
+ showSize: n,
129
+ onRemove: o,
130
+ onRetry: d
131
+ }) {
132
+ const c = v(e), m = b(e.status);
133
+ return /* @__PURE__ */ s(
134
+ "div",
135
+ {
136
+ className: "animate-slide-up px-ds-04 py-ds-03 transition-colors duration-fast-02 hover:bg-layer-02/50",
137
+ style: {
138
+ animationDelay: `${a * 30}ms`,
139
+ animationFillMode: "both"
140
+ },
141
+ children: [
142
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
143
+ /* @__PURE__ */ t(N, { file: e }),
144
+ /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
145
+ /* @__PURE__ */ t(
146
+ "p",
147
+ {
148
+ className: i(
149
+ "truncate text-ds-sm font-medium text-text-primary",
150
+ e.status === "pending" && "text-text-disabled"
151
+ ),
152
+ children: e.name
153
+ }
154
+ ),
155
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-02", children: [
156
+ n && /* @__PURE__ */ t("span", { className: "text-ds-xs text-text-placeholder", children: P(e.size) }),
157
+ e.status === "processing" && /* @__PURE__ */ t("span", { className: "text-ds-xs text-text-secondary", children: "Processing..." }),
158
+ e.status === "error" && e.error && /* @__PURE__ */ t("span", { className: "text-ds-xs text-text-error", children: e.error })
159
+ ] })
160
+ ] }),
161
+ e.status === "uploading" && e.progress !== void 0 && /* @__PURE__ */ s("span", { className: "shrink-0 text-ds-xs tabular-nums text-text-secondary transition-opacity duration-fast-01", children: [
162
+ e.progress,
163
+ "%"
164
+ ] }),
165
+ /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-ds-01", children: [
166
+ e.status === "error" && d && /* @__PURE__ */ t(
167
+ "button",
168
+ {
169
+ type: "button",
170
+ onClick: () => d(e.id),
171
+ className: "flex h-6 w-6 items-center justify-center rounded-ds-md text-text-secondary transition-colors duration-fast-01 hover:bg-layer-03 hover:text-text-primary",
172
+ "aria-label": `Retry upload for ${e.name}`,
173
+ children: /* @__PURE__ */ t(g, { size: 14 })
174
+ }
175
+ ),
176
+ (e.status === "error" || e.status === "complete" || e.status === "pending") && o && /* @__PURE__ */ t(
177
+ "button",
178
+ {
179
+ type: "button",
180
+ onClick: () => o(e.id),
181
+ className: "flex h-6 w-6 items-center justify-center rounded-ds-md text-text-secondary transition-colors duration-fast-01 hover:bg-layer-03 hover:text-text-primary",
182
+ "aria-label": `Remove ${e.name}`,
183
+ children: /* @__PURE__ */ t(u, { size: 14 })
184
+ }
185
+ ),
186
+ e.status === "uploading" && o && /* @__PURE__ */ t(
187
+ "button",
188
+ {
189
+ type: "button",
190
+ onClick: () => o(e.id),
191
+ className: "flex h-6 w-6 items-center justify-center rounded-ds-md text-text-secondary transition-colors duration-fast-01 hover:bg-layer-03 hover:text-text-primary",
192
+ "aria-label": `Cancel upload for ${e.name}`,
193
+ children: /* @__PURE__ */ t(u, { size: 14 })
194
+ }
195
+ )
196
+ ] })
197
+ ] }),
198
+ /* @__PURE__ */ t("div", { className: "mt-ds-02 pl-11", children: /* @__PURE__ */ t(
199
+ y,
200
+ {
201
+ value: c,
202
+ color: m,
203
+ size: "sm",
204
+ "aria-label": `Upload progress for ${e.name}`
205
+ }
206
+ ) })
207
+ ]
208
+ }
209
+ );
210
+ }
211
+ function M({
212
+ file: e,
213
+ index: a,
214
+ onRemove: n,
215
+ onRetry: o
216
+ }) {
217
+ const d = v(e), c = b(e.status);
218
+ return /* @__PURE__ */ s(
219
+ "div",
220
+ {
221
+ className: "flex items-center gap-ds-03 px-ds-03 py-ds-02 animate-slide-up transition-colors duration-fast-02 hover:bg-layer-02/50",
222
+ style: {
223
+ animationDelay: `${a * 30}ms`,
224
+ animationFillMode: "both"
225
+ },
226
+ children: [
227
+ /* @__PURE__ */ t(N, { file: e, className: "h-6 w-6" }),
228
+ /* @__PURE__ */ t(
229
+ "p",
230
+ {
231
+ className: i(
232
+ "min-w-0 shrink truncate text-ds-xs font-medium text-text-primary",
233
+ e.status === "pending" && "text-text-disabled"
234
+ ),
235
+ children: e.name
236
+ }
237
+ ),
238
+ /* @__PURE__ */ t("div", { className: "w-20 shrink-0", children: /* @__PURE__ */ t(
239
+ y,
240
+ {
241
+ value: d,
242
+ color: c,
243
+ size: "sm",
244
+ "aria-label": `Upload progress for ${e.name}`
245
+ }
246
+ ) }),
247
+ e.status === "uploading" && e.progress !== void 0 && /* @__PURE__ */ s("span", { className: "shrink-0 text-ds-xs tabular-nums text-text-secondary", children: [
248
+ e.progress,
249
+ "%"
250
+ ] }),
251
+ e.status === "processing" && /* @__PURE__ */ t("span", { className: "shrink-0 text-ds-xs text-text-secondary", children: "Processing..." }),
252
+ e.status === "error" && /* @__PURE__ */ t("span", { className: "shrink-0 text-ds-xs text-text-error", children: "Error" }),
253
+ /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-ds-01", children: [
254
+ e.status === "error" && o && /* @__PURE__ */ t(
255
+ "button",
256
+ {
257
+ type: "button",
258
+ onClick: () => o(e.id),
259
+ className: "flex h-5 w-5 items-center justify-center rounded-ds-md text-text-secondary transition-colors duration-fast-01 hover:bg-layer-03 hover:text-text-primary",
260
+ "aria-label": `Retry upload for ${e.name}`,
261
+ children: /* @__PURE__ */ t(g, { size: 12 })
262
+ }
263
+ ),
264
+ (e.status === "error" || e.status === "complete" || e.status === "pending") && n && /* @__PURE__ */ t(
265
+ "button",
266
+ {
267
+ type: "button",
268
+ onClick: () => n(e.id),
269
+ className: "flex h-5 w-5 items-center justify-center rounded-ds-md text-text-secondary transition-colors duration-fast-01 hover:bg-layer-03 hover:text-text-primary",
270
+ "aria-label": `Remove ${e.name}`,
271
+ children: /* @__PURE__ */ t(u, { size: 12 })
272
+ }
273
+ ),
274
+ e.status === "uploading" && n && /* @__PURE__ */ t(
275
+ "button",
276
+ {
277
+ type: "button",
278
+ onClick: () => n(e.id),
279
+ className: "flex h-5 w-5 items-center justify-center rounded-ds-md text-text-secondary transition-colors duration-fast-01 hover:bg-layer-03 hover:text-text-primary",
280
+ "aria-label": `Cancel upload for ${e.name}`,
281
+ children: /* @__PURE__ */ t(u, { size: 12 })
282
+ }
283
+ )
284
+ ] })
285
+ ]
286
+ }
287
+ );
288
+ }
289
+ const S = $.forwardRef(
290
+ ({
291
+ files: e,
292
+ onRemove: a,
293
+ onRetry: n,
294
+ onDismissAll: o,
295
+ variant: d = "default",
296
+ showSize: c = !0,
297
+ className: m,
298
+ ...w
299
+ }, f) => {
300
+ if (e.length === 0) return null;
301
+ const k = e.filter(
302
+ (r) => r.status === "complete"
303
+ ).length, p = e.filter((r) => r.status === "error").length, x = e.every(
304
+ (r) => r.status === "complete" || r.status === "error"
305
+ ), l = e.every((r) => r.status === "complete");
306
+ return /* @__PURE__ */ s(
307
+ "div",
308
+ {
309
+ ref: f,
310
+ className: i(
311
+ "rounded-ds-xl border bg-layer-01 shadow-01 overflow-hidden animate-fade-in transition-colors duration-moderate-02",
312
+ l ? "border-success/40" : p > 0 && x ? "border-error/30" : "border-border-subtle",
313
+ m
314
+ ),
315
+ role: "region",
316
+ "aria-label": "File uploads",
317
+ ...w,
318
+ children: [
319
+ /* @__PURE__ */ s("div", { className: i(
320
+ "flex items-center justify-between border-b px-ds-04 py-ds-03 transition-colors duration-moderate-02",
321
+ l ? "border-success/20 bg-success-surface/30" : "border-border-subtle"
322
+ ), children: [
323
+ /* @__PURE__ */ s("span", { className: i(
324
+ "text-ds-sm transition-colors duration-fast-02",
325
+ l ? "font-medium text-text-success" : "text-text-secondary"
326
+ ), children: [
327
+ l ? `All ${e.length} files uploaded` : `${k} of ${e.length} uploaded`,
328
+ p > 0 && !l && /* @__PURE__ */ s("span", { className: "text-text-error", children: [
329
+ " · ",
330
+ p,
331
+ " failed"
332
+ ] })
333
+ ] }),
334
+ x && o && /* @__PURE__ */ t(
335
+ "button",
336
+ {
337
+ type: "button",
338
+ onClick: o,
339
+ className: "animate-fade-in text-ds-sm text-interactive hover:text-interactive-hover transition-colors duration-fast-02",
340
+ children: "Dismiss all"
341
+ }
342
+ )
343
+ ] }),
344
+ /* @__PURE__ */ t("div", { className: "max-h-[360px] overflow-y-auto divide-y divide-border-subtle", children: e.map(
345
+ (r, h) => d === "compact" ? /* @__PURE__ */ t(
346
+ M,
347
+ {
348
+ file: r,
349
+ index: h,
350
+ onRemove: a,
351
+ onRetry: n
352
+ },
353
+ r.id
354
+ ) : /* @__PURE__ */ t(
355
+ E,
356
+ {
357
+ file: r,
358
+ index: h,
359
+ showSize: c,
360
+ onRemove: a,
361
+ onRetry: n
362
+ },
363
+ r.id
364
+ )
365
+ ) }),
366
+ /* @__PURE__ */ t("div", { className: "sr-only", "aria-live": "polite", "aria-atomic": "false", children: e.map(
367
+ (r) => r.status === "complete" ? /* @__PURE__ */ s("span", { children: [
368
+ r.name,
369
+ " upload complete."
370
+ ] }, `sr-${r.id}`) : r.status === "error" ? /* @__PURE__ */ s("span", { children: [
371
+ r.name,
372
+ " upload failed",
373
+ r.error ? `: ${r.error}` : "",
374
+ "."
375
+ ] }, `sr-${r.id}`) : null
376
+ ) })
377
+ ]
378
+ }
379
+ );
380
+ }
381
+ );
382
+ S.displayName = "UploadProgress";
383
+ export {
384
+ S as UploadProgress,
385
+ P as formatFileSize
386
+ };
@@ -12,6 +12,8 @@ export interface BottomNavItem {
12
12
  icon: React.ReactNode;
13
13
  /** When true, the route matches only when the path is exactly equal */
14
14
  exact?: boolean;
15
+ /** Notification badge count. 0 or undefined = hidden, 1–99 = shown, >99 = "99+" */
16
+ badge?: number;
15
17
  }
16
18
  export interface BottomNavbarUser {
17
19
  name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"bottom-navbar.d.ts","sourceRoot":"","sources":["../../src/shell/bottom-navbar.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAU9B,MAAM,WAAW,aAAa;IAC5B,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,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,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+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAwED,QAAA,MAAM,YAAY,uFAyIjB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -1,94 +1,112 @@
1
1
  "use client";
2
- import { jsxs as a, Fragment as v, jsx as t } from "react/jsx-runtime";
2
+ import { jsxs as r, Fragment as v, jsx as t } from "react/jsx-runtime";
3
3
  import * as g from "react";
4
4
  import { useState as N } from "react";
5
- import { useLink as p } from "./link-context.js";
5
+ import { useLink as f } from "./link-context.js";
6
6
  import { IconX as y, IconDots as w } from "@tabler/icons-react";
7
- import { c as r } from "../_chunks/utils.js";
8
- function k({
9
- item: s,
10
- isActive: n,
11
- onClick: d
7
+ import { c as s } from "../_chunks/utils.js";
8
+ function k({ count: a }) {
9
+ if (!a || a <= 0) return null;
10
+ const i = a > 99 ? "99+" : String(a), n = a >= 10;
11
+ return /* @__PURE__ */ t(
12
+ "span",
13
+ {
14
+ "aria-label": `${a} notifications`,
15
+ className: s(
16
+ "absolute -right-1.5 -top-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-error text-[10px] font-semibold leading-none text-on-error animate-in zoom-in-75",
17
+ n ? "px-0.5" : ""
18
+ ),
19
+ children: i
20
+ }
21
+ );
22
+ }
23
+ function M({
24
+ item: a,
25
+ isActive: i,
26
+ onClick: n
12
27
  }) {
13
- const i = p();
28
+ const l = f();
14
29
  return /* @__PURE__ */ t(
15
- i,
30
+ l,
16
31
  {
17
- href: s.href,
18
- onClick: d,
19
- "aria-label": s.title,
20
- "aria-current": n ? "page" : void 0,
21
- className: r(
32
+ href: a.href,
33
+ onClick: n,
34
+ "aria-label": a.title,
35
+ "aria-current": i ? "page" : void 0,
36
+ className: s(
22
37
  "flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm active:animate-subtle-bounce",
23
- n ? "font-semibold text-interactive" : "text-text-helper"
38
+ i ? "font-semibold text-interactive" : "text-text-helper"
24
39
  ),
25
- children: /* @__PURE__ */ a("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
40
+ children: /* @__PURE__ */ r("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
26
41
  /* @__PURE__ */ t(
27
42
  "div",
28
43
  {
29
- className: r(
44
+ className: s(
30
45
  "absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-interactive p-0 transition-[opacity,transform] duration-moderate-01",
31
- n ? "opacity-100 animate-tab-indicator" : "opacity-0 scale-x-0"
46
+ i ? "opacity-100 animate-tab-indicator" : "opacity-0 scale-x-0"
32
47
  ),
33
48
  "aria-hidden": "true"
34
49
  }
35
50
  ),
36
- /* @__PURE__ */ t("div", { className: "p-ds-03", children: /* @__PURE__ */ t("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md", "aria-hidden": "true", children: s.icon }) }),
37
- /* @__PURE__ */ t("span", { className: "text-center", children: s.title })
51
+ /* @__PURE__ */ r("div", { className: "relative p-ds-03", children: [
52
+ /* @__PURE__ */ t("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md", "aria-hidden": "true", children: a.icon }),
53
+ a.badge != null && /* @__PURE__ */ t(k, { count: a.badge })
54
+ ] }),
55
+ /* @__PURE__ */ t("span", { className: "text-center", children: a.title })
38
56
  ] })
39
57
  }
40
58
  );
41
59
  }
42
- const M = g.forwardRef(
60
+ const j = g.forwardRef(
43
61
  ({
44
- currentPath: s = "/",
45
- user: n,
46
- primaryItems: d = [],
47
- moreItems: i = [],
48
- className: f,
62
+ currentPath: a = "/",
63
+ user: i,
64
+ primaryItems: n = [],
65
+ moreItems: l = [],
66
+ className: p,
49
67
  ...x
50
- }, h) => {
51
- const b = p(), [o, l] = N(!1), c = (e, u = !1) => u || e === "/" ? s === e : s.startsWith(e), m = i.some(
68
+ }, b) => {
69
+ const h = f(), [o, d] = N(!1), c = (e, u = !1) => u || e === "/" ? a === e : a.startsWith(e), m = l.some(
52
70
  (e) => c(e.href, e.exact)
53
71
  );
54
- return /* @__PURE__ */ a(v, { children: [
55
- o && /* @__PURE__ */ a(
72
+ return /* @__PURE__ */ r(v, { children: [
73
+ o && /* @__PURE__ */ r(
56
74
  "div",
57
75
  {
58
76
  role: "button",
59
77
  tabIndex: 0,
60
78
  className: "fixed inset-0 z-overlay md:hidden",
61
- onClick: () => l(!1),
79
+ onClick: () => d(!1),
62
80
  onKeyDown: (e) => {
63
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), l(!1));
81
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), d(!1));
64
82
  },
65
83
  children: [
66
84
  /* @__PURE__ */ t("div", { className: "absolute inset-0 bg-overlay" }),
67
- /* @__PURE__ */ a(
85
+ /* @__PURE__ */ r(
68
86
  "div",
69
87
  {
70
88
  className: "absolute bottom-[72px] left-0 right-0 rounded-t-ds-2xl border-t border-border bg-layer-01 p-ds-05 pb-ds-03",
71
89
  onClick: (e) => e.stopPropagation(),
72
90
  onKeyDown: (e) => e.stopPropagation(),
73
91
  children: [
74
- /* @__PURE__ */ a("div", { className: "mb-ds-04 flex items-center justify-between", children: [
92
+ /* @__PURE__ */ r("div", { className: "mb-ds-04 flex items-center justify-between", children: [
75
93
  /* @__PURE__ */ t("span", { className: "text-ds-md font-semibold text-text-primary", children: "More" }),
76
94
  /* @__PURE__ */ t(
77
95
  "button",
78
96
  {
79
- onClick: () => l(!1),
97
+ onClick: () => d(!1),
80
98
  "aria-label": "Close more menu",
81
99
  className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-full hover:bg-layer-02",
82
100
  children: /* @__PURE__ */ t(y, { className: "h-ico-sm w-ico-sm text-text-secondary", "aria-hidden": "true" })
83
101
  }
84
102
  )
85
103
  ] }),
86
- /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-ds-03", children: i.map((e) => /* @__PURE__ */ a(
87
- b,
104
+ /* @__PURE__ */ t("div", { className: "grid grid-cols-4 gap-ds-03", children: l.map((e) => /* @__PURE__ */ r(
105
+ h,
88
106
  {
89
107
  href: e.href,
90
- onClick: () => l(!1),
91
- className: r(
108
+ onClick: () => d(!1),
109
+ className: s(
92
110
  "flex flex-col items-center gap-ds-02b rounded-ds-xl p-ds-04 text-ds-sm transition-colors",
93
111
  c(e.href, e.exact) ? "bg-layer-02 text-interactive" : "text-text-helper hover:bg-layer-02"
94
112
  ),
@@ -105,41 +123,41 @@ const M = g.forwardRef(
105
123
  ]
106
124
  }
107
125
  ),
108
- /* @__PURE__ */ a(
126
+ /* @__PURE__ */ r(
109
127
  "nav",
110
128
  {
111
129
  ...x,
112
- ref: h,
130
+ ref: b,
113
131
  "aria-label": "Mobile navigation",
114
- className: r(
132
+ className: s(
115
133
  "fixed bottom-0 left-0 right-0 z-sticky flex w-full flex-row items-start justify-between border-t border-border bg-layer-01 px-ds-05 pb-ds-05b pt-0 md:hidden",
116
- f
134
+ p
117
135
  ),
118
136
  children: [
119
- d.map((e) => /* @__PURE__ */ t(
120
- k,
137
+ n.map((e) => /* @__PURE__ */ t(
138
+ M,
121
139
  {
122
140
  item: e,
123
141
  isActive: c(e.href, e.exact)
124
142
  },
125
143
  e.href
126
144
  )),
127
- i.length > 0 && /* @__PURE__ */ t(
145
+ l.length > 0 && /* @__PURE__ */ t(
128
146
  "button",
129
147
  {
130
148
  type: "button",
131
- onClick: () => l(!o),
149
+ onClick: () => d(!o),
132
150
  "aria-label": "More navigation options",
133
151
  "aria-expanded": o,
134
- className: r(
152
+ className: s(
135
153
  "flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm active:animate-subtle-bounce",
136
154
  o || m ? "font-semibold text-interactive" : "text-text-helper"
137
155
  ),
138
- children: /* @__PURE__ */ a("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
156
+ children: /* @__PURE__ */ r("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
139
157
  /* @__PURE__ */ t(
140
158
  "div",
141
159
  {
142
- className: r(
160
+ className: s(
143
161
  "absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-interactive p-0 transition-[opacity,transform] duration-moderate-01",
144
162
  o || m ? "opacity-100 animate-tab-indicator" : "opacity-0 scale-x-0"
145
163
  ),
@@ -157,7 +175,7 @@ const M = g.forwardRef(
157
175
  ] });
158
176
  }
159
177
  );
160
- M.displayName = "BottomNavbar";
178
+ j.displayName = "BottomNavbar";
161
179
  export {
162
- M as BottomNavbar
180
+ j as BottomNavbar
163
181
  };
@@ -92,6 +92,8 @@ export interface AppSidebarProps extends React.HTMLAttributes<HTMLDivElement> {
92
92
  headerSlot?: React.ReactNode;
93
93
  /** Content rendered between navigation and footer */
94
94
  preFooterSlot?: React.ReactNode;
95
+ /** className applied to the wrapper div around preFooterSlot */
96
+ preFooterClassName?: string;
95
97
  /** Override rendering for specific nav items. Return null to use default rendering. */
96
98
  renderItem?: (item: NavItem, defaultRender: () => React.ReactNode) => React.ReactNode | null;
97
99
  /** Additional className for the root sidebar element */
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/sidebar.tsx"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgC9B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,UAAU,EAAE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