laif-ds 0.2.89 → 0.2.91

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.
@@ -1,106 +1,210 @@
1
1
  "use client";
2
- import { jsxs as c, jsx as t, Fragment as I } from "react/jsx-runtime";
3
- import * as v from "react";
2
+ import { jsxs as n, jsx as t, Fragment as R } from "react/jsx-runtime";
3
+ import * as s from "react";
4
+ import { designTokens as J } from "../design-tokens.js";
5
+ import { DropdownMenu as Q, DropdownMenuTrigger as U, DropdownMenuContent as V, DropdownMenuItem as W } from "./dropdown-menu.js";
4
6
  import { Icon as h } from "./icon.js";
5
- import { Sidebar as y, SidebarHeader as z, SidebarContent as B, SidebarGroup as x, SidebarGroupLabel as A, SidebarGroupContent as N, SidebarMenu as C, SidebarMenuItem as w, SidebarMenuSub as M, SidebarMenuSubItem as E, SidebarRail as F, SidebarMenuButton as j, SidebarMenuSubButton as D } from "./sidebar.js";
6
- function K({
7
- navigation: u,
8
- navigationFooter: G,
9
- headerContent: f,
10
- footerContent: R,
11
- showRail: g = !0,
12
- linkComponent: d,
13
- linkProps: m = {},
14
- ...k
7
+ import { useSidebar as X, Sidebar as Y, SidebarHeader as Z, SidebarContent as _, SidebarRail as k, SidebarGroup as P, SidebarGroupLabel as L, SidebarGroupContent as ee, SidebarMenu as re, SidebarMenuItem as x, SidebarMenuButton as M, SidebarMenuSub as te, SidebarMenuSubItem as ie, SidebarMenuSubButton as T } from "./sidebar.js";
8
+ import { Tooltip as ne, TooltipTrigger as ce, TooltipContent as se } from "./tooltip.js";
9
+ import { cn as le } from "../../lib/utils.js";
10
+ const $ = (c, l) => `${c.title} ${l.url} ${l.title}`, D = (c) => `${c.url} ${c.title}`;
11
+ function me({
12
+ navigation: c,
13
+ navigationFooter: l,
14
+ headerContent: w,
15
+ footerContent: j,
16
+ showRail: z = !0,
17
+ collapsible: f,
18
+ linkComponent: a,
19
+ linkProps: p = {},
20
+ ...G
15
21
  }) {
16
- const [b, o] = v.useState({});
17
- v.useEffect(() => {
18
- o((e) => {
19
- const n = { ...e };
20
- return u.forEach((l) => {
21
- l.items.some(
22
- (r) => r.isActive || r.subItems && r.subItems.some((s) => s.isActive)
23
- ) && (n[l.title] = !0);
24
- }), n;
22
+ const { state: K, isMobile: I } = X(), B = s.useId(), m = f === "icon" && K === "collapsed" && !I, [O, y] = s.useState({}), g = s.useMemo(
23
+ () => [...c, ...l ?? []].flatMap(
24
+ (e) => e.items.filter(
25
+ (r) => r.subItems?.length && (r.isActive || r.subItems.some((i) => i.isActive))
26
+ ).map((r) => $(e, r))
27
+ ).join("|"),
28
+ [c, l]
29
+ );
30
+ s.useEffect(() => {
31
+ g && y((e) => {
32
+ const r = g.split("|").filter((i) => e[i] === void 0);
33
+ return r.length ? { ...e, ...Object.fromEntries(r.map((i) => [i, !0])) } : e;
25
34
  });
26
- }, [u]);
27
- const S = (e, n, l) => {
28
- const i = e.subItems && e.subItems.length > 0, r = /* @__PURE__ */ c(I, { children: [
29
- /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
30
- e.iconName && /* @__PURE__ */ t(h, { name: e.iconName, size: "sm" }),
31
- /* @__PURE__ */ t("span", { children: e.title })
32
- ] }),
33
- i && /* @__PURE__ */ t("div", { className: "text-d-muted-foreground", children: n ? /* @__PURE__ */ t(h, { name: "ChevronDown", className: "h-4 w-4" }) : /* @__PURE__ */ t(h, { name: "ChevronRight", className: "h-4 w-4" }) })
35
+ }, [g]);
36
+ const v = s.useRef(/* @__PURE__ */ new Map()), A = s.useRef(null), N = (e) => (r) => {
37
+ r ? v.current.set(e, r) : v.current.delete(e);
38
+ };
39
+ s.useLayoutEffect(() => {
40
+ const e = A.current;
41
+ !e || document.activeElement !== document.body || v.current.get(e)?.focus();
42
+ }, [m]);
43
+ const o = (e) => e.iconName ? /* @__PURE__ */ t(h, { name: e.iconName, size: "sm" }) : f !== "icon" ? null : /* @__PURE__ */ t(
44
+ "span",
45
+ {
46
+ "aria-hidden": "true",
47
+ className: "flex size-4 shrink-0 items-center justify-center text-xs font-semibold uppercase opacity-0 transition-opacity group-data-[collapsible=icon]:opacity-100",
48
+ children: e.title.charAt(0)
49
+ }
50
+ ), F = (e) => {
51
+ const r = /* @__PURE__ */ n(R, { children: [
52
+ e.iconName && /* @__PURE__ */ t(h, { name: e.iconName, size: "xs" }),
53
+ /* @__PURE__ */ t("span", { children: e.title })
34
54
  ] });
35
- return d ? /* @__PURE__ */ t(j, { isActive: e.isActive, children: /* @__PURE__ */ t(
36
- d,
55
+ return a ? /* @__PURE__ */ t(T, { isActive: e.isActive, asChild: !0, children: /* @__PURE__ */ t(
56
+ a,
37
57
  {
38
- href: i ? "#" : e.url,
39
- className: "flex w-full items-center justify-between gap-2",
40
- onClick: i ? l : void 0,
41
- ...m,
58
+ href: e.url,
59
+ className: "flex w-full items-center gap-2",
60
+ "aria-current": e.isActive ? "page" : void 0,
61
+ ...p,
42
62
  children: r
43
63
  }
44
- ) }) : /* @__PURE__ */ t(j, { isActive: e.isActive, children: /* @__PURE__ */ t(
64
+ ) }) : /* @__PURE__ */ t(T, { isActive: e.isActive, asChild: !0, children: /* @__PURE__ */ t(
45
65
  "a",
46
66
  {
47
- href: i ? "#" : e.url,
48
- className: "flex w-full items-center justify-between gap-2",
49
- onClick: i ? l : void 0,
67
+ href: e.url,
68
+ className: "flex w-full items-center gap-2",
69
+ "aria-current": e.isActive ? "page" : void 0,
50
70
  children: r
51
71
  }
52
72
  ) });
53
- }, p = (e) => {
54
- const n = /* @__PURE__ */ c(I, { children: [
73
+ }, H = (e) => {
74
+ const r = /* @__PURE__ */ n(R, { children: [
55
75
  e.iconName && /* @__PURE__ */ t(h, { name: e.iconName, size: "xs" }),
56
76
  /* @__PURE__ */ t("span", { children: e.title })
57
- ] });
58
- return d ? /* @__PURE__ */ t(D, { isActive: e.isActive, asChild: !0, children: /* @__PURE__ */ t(
59
- d,
77
+ ] }), i = le(
78
+ "flex w-full items-center gap-2",
79
+ e.isActive && J.dropdownItem.selected
80
+ );
81
+ return /* @__PURE__ */ t(W, { asChild: !0, children: a ? /* @__PURE__ */ t(
82
+ a,
60
83
  {
61
84
  href: e.url,
62
- className: "flex w-full items-center gap-2",
63
- ...m,
64
- children: n
85
+ className: i,
86
+ "aria-current": e.isActive ? "page" : void 0,
87
+ ...p,
88
+ children: r
65
89
  }
66
- ) }) : /* @__PURE__ */ t(D, { isActive: e.isActive, asChild: !0, children: /* @__PURE__ */ t("a", { href: e.url, className: "flex w-full items-center gap-2", children: n }) });
67
- };
68
- return /* @__PURE__ */ c(y, { ...k, children: [
69
- f && /* @__PURE__ */ t(z, { children: f }),
70
- /* @__PURE__ */ t(B, { children: u.map((e) => /* @__PURE__ */ c(x, { children: [
71
- e.title && /* @__PURE__ */ t(A, { children: e.title }),
72
- /* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(C, { children: e.items.map((n) => {
73
- const l = n.subItems && n.subItems.length > 0, i = b[n.title] || !1;
74
- return /* @__PURE__ */ c(w, { children: [
75
- S(n, i, (s) => {
76
- l && (s.preventDefault(), o((a) => ({
77
- ...a,
78
- [n.title]: !a[n.title]
79
- })));
80
- }),
81
- l && i && /* @__PURE__ */ t(M, { children: n.subItems.map((s) => /* @__PURE__ */ t(E, { children: p(s) }, s.title)) })
82
- ] }, n.title);
83
- }) }) })
84
- ] }, e.title)) }),
85
- G?.map((e) => /* @__PURE__ */ c(x, { children: [
86
- e.title && /* @__PURE__ */ t(A, { children: e.title }),
87
- /* @__PURE__ */ t(N, { children: /* @__PURE__ */ t(C, { children: e.items.map((n) => {
88
- const l = n.subItems && n.subItems.length > 0, i = b[n.title] || !1;
89
- return /* @__PURE__ */ c(w, { children: [
90
- S(n, i, (s) => {
91
- l && (s.preventDefault(), o((a) => ({
92
- ...a,
93
- [n.title]: !a[n.title]
94
- })));
95
- }),
96
- l && i && /* @__PURE__ */ t(M, { children: n.subItems.map((s) => /* @__PURE__ */ t(E, { children: p(s) }, s.title)) })
97
- ] }, n.title);
98
- }) }) })
99
- ] }, e.title)),
100
- R,
101
- g && /* @__PURE__ */ t(F, {})
90
+ ) : /* @__PURE__ */ t(
91
+ "a",
92
+ {
93
+ href: e.url,
94
+ className: i,
95
+ "aria-current": e.isActive ? "page" : void 0,
96
+ children: r
97
+ }
98
+ ) }, D(e));
99
+ }, q = (e, r) => {
100
+ const i = $(e, r), S = r.subItems ?? [], b = O[i] ?? !1, E = `${B}-${i.replace(/[^\w-]+/g, "-")}-submenu`, u = /* @__PURE__ */ t("span", { className: "truncate", children: r.title });
101
+ return S.length === 0 ? /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t(
102
+ M,
103
+ {
104
+ asChild: !0,
105
+ isActive: r.isActive,
106
+ tooltip: r.title,
107
+ children: a ? /* @__PURE__ */ n(
108
+ a,
109
+ {
110
+ href: r.url,
111
+ "aria-current": r.isActive ? "page" : void 0,
112
+ ...p,
113
+ children: [
114
+ o(r),
115
+ u
116
+ ]
117
+ }
118
+ ) : /* @__PURE__ */ n(
119
+ "a",
120
+ {
121
+ href: r.url,
122
+ "aria-current": r.isActive ? "page" : void 0,
123
+ children: [
124
+ o(r),
125
+ u
126
+ ]
127
+ }
128
+ )
129
+ }
130
+ ) }, i) : m ? /* @__PURE__ */ t(x, { children: /* @__PURE__ */ n(ne, { children: [
131
+ /* @__PURE__ */ n(Q, { modal: !1, children: [
132
+ /* @__PURE__ */ t(U, { asChild: !0, children: /* @__PURE__ */ t(ce, { asChild: !0, children: /* @__PURE__ */ n(
133
+ M,
134
+ {
135
+ ref: N(i),
136
+ type: "button",
137
+ isActive: r.isActive,
138
+ onFocus: () => {
139
+ A.current = i;
140
+ },
141
+ children: [
142
+ o(r),
143
+ u
144
+ ]
145
+ }
146
+ ) }) }),
147
+ /* @__PURE__ */ t(
148
+ V,
149
+ {
150
+ side: "right",
151
+ align: "start",
152
+ sideOffset: 8,
153
+ className: "min-w-48",
154
+ children: S.map(H)
155
+ }
156
+ )
157
+ ] }),
158
+ /* @__PURE__ */ t(
159
+ se,
160
+ {
161
+ side: "right",
162
+ align: "center",
163
+ hidden: !m,
164
+ children: r.title
165
+ }
166
+ )
167
+ ] }) }, i) : /* @__PURE__ */ n(x, { children: [
168
+ /* @__PURE__ */ n(
169
+ M,
170
+ {
171
+ ref: N(i),
172
+ type: "button",
173
+ isActive: r.isActive,
174
+ tooltip: r.title,
175
+ "aria-expanded": b,
176
+ "aria-controls": E,
177
+ onFocus: () => {
178
+ A.current = i;
179
+ },
180
+ onClick: () => y((d) => ({ ...d, [i]: !d[i] })),
181
+ children: [
182
+ o(r),
183
+ u,
184
+ /* @__PURE__ */ t(
185
+ h,
186
+ {
187
+ name: b ? "ChevronDown" : "ChevronRight",
188
+ className: "text-d-muted-foreground ml-auto size-4 shrink-0 group-data-[collapsible=icon]:hidden"
189
+ }
190
+ )
191
+ ]
192
+ }
193
+ ),
194
+ b && /* @__PURE__ */ t(te, { id: E, children: S.map((d) => /* @__PURE__ */ t(ie, { children: F(d) }, D(d))) })
195
+ ] }, i);
196
+ }, C = (e) => /* @__PURE__ */ n(P, { children: [
197
+ e.title && /* @__PURE__ */ t(L, { children: e.title }),
198
+ /* @__PURE__ */ t(ee, { children: /* @__PURE__ */ t(re, { children: e.items.map((r) => q(e, r)) }) })
199
+ ] }, e.title);
200
+ return /* @__PURE__ */ n(Y, { collapsible: f, ...G, children: [
201
+ w && /* @__PURE__ */ t(Z, { children: w }),
202
+ /* @__PURE__ */ t(_, { children: c.map((e) => C(e)) }),
203
+ l?.map((e) => C(e)),
204
+ j,
205
+ z && /* @__PURE__ */ t(k, {})
102
206
  ] });
103
207
  }
104
208
  export {
105
- K as AppSidebar
209
+ me as AppSidebar
106
210
  };
@@ -18,35 +18,35 @@ function I(e) {
18
18
  return d.safeAsk(p(e));
19
19
  }
20
20
  const q = () => {
21
- const [{ payload: e }, { asking: l, ok: n }] = O(), i = e?.url, a = e?.readOnly, s = e?.page, t = u(() => e?.filename ? e?.filename : (e?.url || "").split(/[?#]/)[0].split("/").pop() || "" || "document", [e?.filename, e?.url]), c = u(() => {
21
+ const [{ payload: e }, { asking: t, ok: i }] = O(), n = e?.url, a = e?.readOnly, s = e?.page, l = u(() => e?.filename ? e?.filename : (e?.url || "").split(/[?#]/)[0].split("/").pop() || "" || "document", [e?.filename, e?.url]), c = u(() => {
22
22
  if (!e?.url) return null;
23
23
  const o = new URL(e?.url), m = o.searchParams.get("response-content-type") || o.searchParams.get("content-type"), f = e?.mimeType || m || "";
24
24
  return P({
25
25
  mimeType: f,
26
- filename: t,
26
+ filename: l,
27
27
  url: e?.url
28
28
  });
29
- }, [e?.mimeType, t, e?.url]), w = u(
29
+ }, [e?.mimeType, l, e?.url]), w = u(
30
30
  () => /* @__PURE__ */ h("span", { className: "flex items-center gap-2", children: [
31
31
  /* @__PURE__ */ r(x, { name: "File", className: "h-4 w-4" }),
32
- e?.title || t
32
+ e?.title || l
33
33
  ] }),
34
- [e?.title, t]
34
+ [e?.title, l]
35
35
  );
36
36
  return /* @__PURE__ */ r(
37
37
  g,
38
38
  {
39
- open: l,
40
- onOpenChange: (o) => !o && n(),
39
+ open: t,
40
+ onOpenChange: (o) => !o && i(),
41
41
  title: w,
42
42
  size: e?.size ?? "xl",
43
- children: c && i ? /* @__PURE__ */ r(
43
+ children: c && n ? /* @__PURE__ */ r(
44
44
  F,
45
45
  {
46
46
  kind: c,
47
- src: i,
48
- officeUrl: i,
49
- alt: e?.alt ?? t,
47
+ src: n,
48
+ officeUrl: n,
49
+ alt: e?.alt ?? l,
50
50
  readOnly: a,
51
51
  page: s
52
52
  }
@@ -55,57 +55,57 @@ const q = () => {
55
55
  );
56
56
  }, F = ({
57
57
  kind: e,
58
- src: l,
59
- officeUrl: n,
60
- alt: i,
58
+ src: t,
59
+ officeUrl: i,
60
+ alt: n,
61
61
  readOnly: a = !1,
62
62
  page: s = 0
63
63
  }) => {
64
- if (!l && e !== "text" && e !== "office")
64
+ if (!t && e !== "text" && e !== "office")
65
65
  return /* @__PURE__ */ r("div", { className: "text-d-secondary-foreground", children: "Nessuna sorgente disponibile" });
66
66
  switch (e) {
67
67
  case "image":
68
- return l ? /* @__PURE__ */ r(y, { src: l, alt: i }) : null;
68
+ return t ? /* @__PURE__ */ r(y, { src: t, alt: n }) : null;
69
69
  case "pdf": {
70
- if (a && l)
70
+ if (a && t)
71
71
  return /* @__PURE__ */ r(
72
72
  N,
73
73
  {
74
- url: l,
74
+ url: t,
75
75
  initialPage: s || 1,
76
- className: "h-full w-full"
76
+ className: "h-full w-full [--pdf-viewer-max-height:100%]"
77
77
  }
78
78
  );
79
- let t = l;
80
- return s > 0 && (t += "#page=" + s), /* @__PURE__ */ r(
79
+ let l = t;
80
+ return s > 0 && (l += "#page=" + s), /* @__PURE__ */ r(
81
81
  "iframe",
82
82
  {
83
- src: t,
83
+ src: l,
84
84
  title: "PDF Preview",
85
85
  className: "h-full w-full rounded"
86
86
  }
87
87
  );
88
88
  }
89
89
  case "audio":
90
- return /* @__PURE__ */ r("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ r("audio", { controls: !0, className: "w-full max-w-2xl", children: /* @__PURE__ */ r("source", { src: l }) }) });
90
+ return /* @__PURE__ */ r("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ r("audio", { controls: !0, className: "w-full max-w-2xl", children: /* @__PURE__ */ r("source", { src: t }) }) });
91
91
  case "video":
92
- return /* @__PURE__ */ r("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ r("video", { controls: !0, className: "max-h-full w-full max-w-3xl rounded", children: /* @__PURE__ */ r("source", { src: l }) }) });
92
+ return /* @__PURE__ */ r("div", { className: "grid h-full place-items-center", children: /* @__PURE__ */ r("video", { controls: !0, className: "max-h-full w-full max-w-3xl rounded", children: /* @__PURE__ */ r("source", { src: t }) }) });
93
93
  case "text":
94
94
  return /* @__PURE__ */ r(
95
95
  "iframe",
96
96
  {
97
- src: l,
97
+ src: t,
98
98
  title: "Text Preview",
99
99
  className: "h-full w-full rounded"
100
100
  }
101
101
  );
102
102
  case "office": {
103
- if (n && b(n)) {
104
- const t = A(n);
103
+ if (i && b(i)) {
104
+ const l = A(i);
105
105
  return /* @__PURE__ */ r(
106
106
  "iframe",
107
107
  {
108
- src: t,
108
+ src: l,
109
109
  title: "Office Preview",
110
110
  className: "h-full w-full rounded"
111
111
  }
@@ -5,7 +5,8 @@ import "react-pdf/dist/Page/TextLayer.css";
5
5
  import { useState as l, useRef as W, useMemo as v, useEffect as d } from "react";
6
6
  import { Button as N } from "./button.js";
7
7
  import { Icon as s } from "./icon.js";
8
- function R({
8
+ import { cn as D } from "../../lib/utils.js";
9
+ function T({
9
10
  url: m,
10
11
  initialPage: g = 1,
11
12
  className: u = ""
@@ -30,7 +31,7 @@ function R({
30
31
  x(i - 32);
31
32
  }
32
33
  }, 50);
33
- }, y = (r) => {
34
+ }, k = (r) => {
34
35
  console.error("PDF Load Error:", r), h(r.message || "Errore nel caricamento del PDF");
35
36
  };
36
37
  if (d(() => {
@@ -63,72 +64,66 @@ function R({
63
64
  ) })
64
65
  }
65
66
  );
66
- const { Document: C, Page: k } = o;
67
- return /* @__PURE__ */ c(
68
- "div",
69
- {
70
- className: `flex min-h-[600px] w-full flex-col items-center ${u}`,
71
- children: [
72
- /* @__PURE__ */ e(
73
- "div",
67
+ const { Document: y, Page: C } = o;
68
+ return /* @__PURE__ */ c("div", { className: D("flex w-full flex-col items-center", u), children: [
69
+ /* @__PURE__ */ e(
70
+ "div",
71
+ {
72
+ ref: n,
73
+ className: "border-d-border max-h-[var(--pdf-viewer-max-height,500px)] min-h-0 w-full grow overflow-auto rounded border",
74
+ children: /* @__PURE__ */ e(
75
+ y,
74
76
  {
75
- ref: n,
76
- className: "border-d-border max-h-[500px] w-full overflow-auto rounded border",
77
- children: /* @__PURE__ */ e(
78
- C,
77
+ file: E,
78
+ onLoadSuccess: L,
79
+ onLoadError: k,
80
+ options: w,
81
+ loading: /* @__PURE__ */ e("div", { className: "flex min-h-[400px] items-center justify-center", children: /* @__PURE__ */ e(
82
+ s,
79
83
  {
80
- file: E,
81
- onLoadSuccess: L,
82
- onLoadError: y,
83
- options: w,
84
- loading: /* @__PURE__ */ e("div", { className: "flex min-h-[600px] items-center justify-center", children: /* @__PURE__ */ e(
85
- s,
86
- {
87
- name: "Loader2",
88
- className: "text-d-primary h-8 w-8 animate-spin"
89
- }
90
- ) }),
91
- error: /* @__PURE__ */ c("div", { className: "text-d-destructive flex min-h-[600px] flex-col items-center justify-center gap-2", children: [
92
- /* @__PURE__ */ e(s, { name: "AlertCircle", className: "h-12 w-12" }),
93
- /* @__PURE__ */ e("p", { children: "Errore nel caricamento del PDF" })
94
- ] }),
95
- className: "h-full min-h-[600px] w-full border-0",
96
- children: /* @__PURE__ */ e(k, { pageNumber: t, width: b })
84
+ name: "Loader2",
85
+ className: "text-d-primary h-8 w-8 animate-spin"
97
86
  }
98
- )
87
+ ) }),
88
+ error: /* @__PURE__ */ c("div", { className: "text-d-destructive flex min-h-[400px] flex-col items-center justify-center gap-2", children: [
89
+ /* @__PURE__ */ e(s, { name: "AlertCircle", className: "h-12 w-12" }),
90
+ /* @__PURE__ */ e("p", { children: "Errore nel caricamento del PDF" })
91
+ ] }),
92
+ className: "w-full border-0",
93
+ children: /* @__PURE__ */ e(C, { pageNumber: t, width: b })
99
94
  }
100
- ),
101
- /* @__PURE__ */ c("div", { className: "my-8 flex h-full w-full items-center justify-center gap-4", children: [
102
- /* @__PURE__ */ e(
103
- N,
104
- {
105
- onClick: () => f(Math.max(1, t - 1)),
106
- disabled: t <= 1,
107
- variant: "outline",
108
- size: "sm",
109
- children: /* @__PURE__ */ e(s, { name: "ChevronLeft", className: "h-4 w-4" })
110
- }
111
- ),
112
- /* @__PURE__ */ c("p", { className: "text-d-foreground text-sm", children: [
113
- t,
114
- " / ",
115
- a
116
- ] }),
117
- /* @__PURE__ */ e(
118
- N,
119
- {
120
- onClick: () => f(Math.min(a || 1, t + 1)),
121
- disabled: t >= (a || 1),
122
- variant: "outline",
123
- size: "sm",
124
- children: /* @__PURE__ */ e(s, { name: "ChevronRight", className: "h-4 w-4" })
125
- }
126
- )
127
- ] })
128
- ]
129
- }
130
- );
95
+ )
96
+ }
97
+ ),
98
+ /* @__PURE__ */ c("div", { className: "my-4 flex w-full shrink-0 items-center justify-center gap-4", children: [
99
+ /* @__PURE__ */ e(
100
+ N,
101
+ {
102
+ onClick: () => f(Math.max(1, t - 1)),
103
+ disabled: t <= 1,
104
+ variant: "outline",
105
+ size: "sm",
106
+ children: /* @__PURE__ */ e(s, { name: "ChevronLeft", className: "h-4 w-4" })
107
+ }
108
+ ),
109
+ /* @__PURE__ */ c("p", { className: "text-d-foreground text-sm", children: [
110
+ t,
111
+ " / ",
112
+ a
113
+ ] }),
114
+ /* @__PURE__ */ e(
115
+ N,
116
+ {
117
+ onClick: () => f(Math.min(a || 1, t + 1)),
118
+ disabled: t >= (a || 1),
119
+ variant: "outline",
120
+ size: "sm",
121
+ children: /* @__PURE__ */ e(s, { name: "ChevronRight", className: "h-4 w-4" })
122
+ }
123
+ )
124
+ ] })
125
+ ] });
131
126
  }
132
127
  export {
133
- R as SecurePdfViewer
128
+ T as SecurePdfViewer
134
129
  };