laif-ds 0.2.31 → 0.2.33
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/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/components/ui/app-radio-group.js +115 -0
- package/dist/components/ui/radio-group.js +39 -24
- package/dist/components/ui/secure-pdf-viewer.js +64 -57
- package/dist/components/ui/textarea.js +16 -15
- package/dist/index.d.ts +53 -2
- package/dist/index.js +95 -93
- package/dist/laif-ds.css +1 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/react-hook-form/dist/index.esm.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +6 -4
- package/dist/_virtual/warning.js +0 -8
- package/dist/node_modules/dequal/dist/index.js +0 -56
- package/dist/node_modules/make-cancellable-promise/dist/index.js +0 -15
- package/dist/node_modules/make-event-props/dist/index.js +0 -114
- package/dist/node_modules/merge-refs/dist/index.js +0 -19
- package/dist/node_modules/react-pdf/dist/Document.js +0 -180
- package/dist/node_modules/react-pdf/dist/DocumentContext.js +0 -6
- package/dist/node_modules/react-pdf/dist/LinkService.js +0 -94
- package/dist/node_modules/react-pdf/dist/Message.js +0 -8
- package/dist/node_modules/react-pdf/dist/Page/AnnotationLayer.js +0 -97
- package/dist/node_modules/react-pdf/dist/Page/Canvas.js +0 -55
- package/dist/node_modules/react-pdf/dist/Page/TextLayer.js +0 -111
- package/dist/node_modules/react-pdf/dist/Page.js +0 -180
- package/dist/node_modules/react-pdf/dist/PageContext.js +0 -6
- package/dist/node_modules/react-pdf/dist/PasswordResponses.js +0 -8
- package/dist/node_modules/react-pdf/dist/StructTree.js +0 -44
- package/dist/node_modules/react-pdf/dist/StructTreeItem.js +0 -14
- package/dist/node_modules/react-pdf/dist/index.js +0 -9
- package/dist/node_modules/react-pdf/dist/shared/constants.js +0 -62
- package/dist/node_modules/react-pdf/dist/shared/hooks/useDocumentContext.js +0 -9
- package/dist/node_modules/react-pdf/dist/shared/hooks/usePageContext.js +0 -9
- package/dist/node_modules/react-pdf/dist/shared/hooks/useResolver.js +0 -20
- package/dist/node_modules/react-pdf/dist/shared/structTreeUtils.js +0 -55
- package/dist/node_modules/react-pdf/dist/shared/utils.js +0 -110
- package/dist/node_modules/react-pdf/node_modules/pdfjs-dist/build/pdf.js +0 -15282
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +0 -13
- package/dist/node_modules/warning/warning.js +0 -39
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
2
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as e } from "../node_modules/style-to-js/cjs/index.js";
|
|
4
|
+
var t = e();
|
|
5
|
+
const a = /* @__PURE__ */ r(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as default
|
|
8
8
|
};
|
package/dist/_virtual/index4.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getDefaultExportFromCjs as
|
|
3
|
-
import { __require as
|
|
4
|
-
var t =
|
|
5
|
-
const
|
|
2
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
+
import { __require as r } from "../node_modules/extend/index.js";
|
|
4
|
+
var t = r();
|
|
5
|
+
const x = /* @__PURE__ */ e(t);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
x as default
|
|
8
8
|
};
|
package/dist/_virtual/index5.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
|
|
3
|
-
import { __require as
|
|
4
|
-
var
|
|
5
|
-
const
|
|
3
|
+
import { __require as t } from "../node_modules/eventemitter3/index2.js";
|
|
4
|
+
var r = t();
|
|
5
|
+
const m = /* @__PURE__ */ e(r);
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
m as default
|
|
8
8
|
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as r, jsx as t, Fragment as G } from "react/jsx-runtime";
|
|
3
|
+
import { cn as s } from "../../lib/utils.js";
|
|
4
|
+
import { Icon as O } from "./icon.js";
|
|
5
|
+
import { Label as j } from "./label.js";
|
|
6
|
+
import { RadioGroup as C, RadioGroupItem as F } from "./radio-group.js";
|
|
7
|
+
const a = ({ content: e }) => typeof e == "string" ? /* @__PURE__ */ t("span", { children: e }) : e, I = ({ option: e }) => /* @__PURE__ */ r(G, { children: [
|
|
8
|
+
/* @__PURE__ */ r("div", { className: "text-d-foreground flex flex-row items-center gap-1.5 text-sm font-medium", children: [
|
|
9
|
+
e.icon && /* @__PURE__ */ t(O, { size: "xs", className: "min-h-4 min-w-4", name: e.icon }),
|
|
10
|
+
/* @__PURE__ */ t(a, { content: e.label })
|
|
11
|
+
] }),
|
|
12
|
+
e.description && /* @__PURE__ */ t("div", { className: "text-d-foreground text-xs font-light", children: /* @__PURE__ */ t(a, { content: e.description }) })
|
|
13
|
+
] }), P = ({
|
|
14
|
+
option: e,
|
|
15
|
+
optionId: c,
|
|
16
|
+
isDisabled: o,
|
|
17
|
+
isCard: n,
|
|
18
|
+
optionClassName: l
|
|
19
|
+
}) => /* @__PURE__ */ r(
|
|
20
|
+
j,
|
|
21
|
+
{
|
|
22
|
+
htmlFor: c,
|
|
23
|
+
className: s(
|
|
24
|
+
"flex items-center gap-2",
|
|
25
|
+
o ? "cursor-not-allowed opacity-50" : "cursor-pointer",
|
|
26
|
+
n && "bg-d-card border-d-border rounded-lg border p-2 shadow",
|
|
27
|
+
l
|
|
28
|
+
),
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ t(F, { value: e.value, id: c, disabled: o }),
|
|
31
|
+
/* @__PURE__ */ t(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: s(
|
|
35
|
+
"flex flex-1 flex-col items-start gap-1",
|
|
36
|
+
o ? "cursor-not-allowed" : "cursor-pointer"
|
|
37
|
+
),
|
|
38
|
+
children: /* @__PURE__ */ t(I, { option: e })
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
function k({
|
|
45
|
+
options: e,
|
|
46
|
+
value: c,
|
|
47
|
+
defaultValue: o,
|
|
48
|
+
onValueChange: n,
|
|
49
|
+
label: l,
|
|
50
|
+
description: i,
|
|
51
|
+
disabled: x = !1,
|
|
52
|
+
required: f = !1,
|
|
53
|
+
name: u,
|
|
54
|
+
orientation: p = "vertical",
|
|
55
|
+
loop: h = !0,
|
|
56
|
+
className: g = "",
|
|
57
|
+
wrpClassName: v = "",
|
|
58
|
+
optionClassName: N = "",
|
|
59
|
+
layout: w = "default",
|
|
60
|
+
error: m
|
|
61
|
+
}) {
|
|
62
|
+
const b = p === "horizontal", y = w === "card";
|
|
63
|
+
return /* @__PURE__ */ r("div", { className: s("flex w-full flex-col gap-2", v), children: [
|
|
64
|
+
(l || i) && /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
65
|
+
l && /* @__PURE__ */ r(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: s(
|
|
69
|
+
"flex items-center gap-1 text-sm font-medium",
|
|
70
|
+
m ? "text-d-destructive" : "text-d-foreground"
|
|
71
|
+
),
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ t(a, { content: l }),
|
|
74
|
+
f && /* @__PURE__ */ t("span", { children: "*" })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
i && /* @__PURE__ */ t("div", { className: "text-bodySecondary text-xs", children: /* @__PURE__ */ t(a, { content: i }) })
|
|
79
|
+
] }),
|
|
80
|
+
/* @__PURE__ */ t(
|
|
81
|
+
C,
|
|
82
|
+
{
|
|
83
|
+
value: c,
|
|
84
|
+
defaultValue: o,
|
|
85
|
+
onValueChange: n,
|
|
86
|
+
disabled: x,
|
|
87
|
+
required: f,
|
|
88
|
+
name: u,
|
|
89
|
+
orientation: p,
|
|
90
|
+
loop: h,
|
|
91
|
+
className: s(
|
|
92
|
+
"flex gap-2",
|
|
93
|
+
b ? "flex-row" : "flex-col",
|
|
94
|
+
g
|
|
95
|
+
),
|
|
96
|
+
children: e.map((d) => {
|
|
97
|
+
const R = `${u || "radio"}-${d.value}`, z = x || !!d.disabled;
|
|
98
|
+
return /* @__PURE__ */ t(P, { isCard: y, ...{
|
|
99
|
+
option: d,
|
|
100
|
+
optionId: R,
|
|
101
|
+
isDisabled: z,
|
|
102
|
+
optionClassName: N
|
|
103
|
+
} }, d.value);
|
|
104
|
+
})
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
m && /* @__PURE__ */ r("div", { className: "text-d-destructive text-xs font-medium", children: [
|
|
108
|
+
"*",
|
|
109
|
+
m
|
|
110
|
+
] })
|
|
111
|
+
] });
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
k as AppRadioGroup
|
|
115
|
+
};
|
|
@@ -1,46 +1,61 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Root as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
function
|
|
7
|
-
className:
|
|
8
|
-
...
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Root as a, Item as d, Indicator as s } from "../../node_modules/@radix-ui/react-radio-group/dist/index.js";
|
|
4
|
+
import { cn as t } from "../../lib/utils.js";
|
|
5
|
+
import n from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
|
|
6
|
+
function p({
|
|
7
|
+
className: o,
|
|
8
|
+
...r
|
|
9
9
|
}) {
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
|
|
10
|
+
return /* @__PURE__ */ e(
|
|
11
|
+
a,
|
|
12
12
|
{
|
|
13
13
|
"data-slot": "radio-group",
|
|
14
|
-
className:
|
|
15
|
-
...
|
|
14
|
+
className: t("grid gap-3", o),
|
|
15
|
+
...r
|
|
16
16
|
}
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
className:
|
|
21
|
-
|
|
19
|
+
function f({
|
|
20
|
+
className: o,
|
|
21
|
+
disabled: r,
|
|
22
|
+
...i
|
|
22
23
|
}) {
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
|
|
24
|
+
return /* @__PURE__ */ e(
|
|
25
|
+
d,
|
|
25
26
|
{
|
|
26
27
|
"data-slot": "radio-group-item",
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
disabled: r,
|
|
29
|
+
className: t(
|
|
30
|
+
"text-d-primary aspect-square size-4 shrink-0 cursor-pointer rounded-full shadow-xs transition-[color,box-shadow] outline-none",
|
|
31
|
+
"aria-invalid:ring-d-destructive/20 aria-invalid:border-d-destructive",
|
|
32
|
+
"focus-visible:border-d-ring focus-visible:ring-d-ring/50 focus-visible:ring-[3px]",
|
|
33
|
+
// Red border when not selected, default border when selected
|
|
34
|
+
"data-[state=unchecked]:border-d-foreground data-[state=checked]:border-d-primary border",
|
|
35
|
+
r && "text-d-muted border-d-muted-foreground cursor-not-allowed opacity-50",
|
|
36
|
+
o
|
|
30
37
|
),
|
|
31
|
-
...
|
|
32
|
-
children: /* @__PURE__ */
|
|
38
|
+
...i,
|
|
39
|
+
children: /* @__PURE__ */ e(
|
|
33
40
|
s,
|
|
34
41
|
{
|
|
35
42
|
"data-slot": "radio-group-indicator",
|
|
36
43
|
className: "relative flex items-center justify-center",
|
|
37
|
-
children: /* @__PURE__ */
|
|
44
|
+
children: /* @__PURE__ */ e(
|
|
45
|
+
n,
|
|
46
|
+
{
|
|
47
|
+
className: t(
|
|
48
|
+
"fill-d-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2",
|
|
49
|
+
r && "fill-d-muted-foreground"
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
)
|
|
38
53
|
}
|
|
39
54
|
)
|
|
40
55
|
}
|
|
41
56
|
);
|
|
42
57
|
}
|
|
43
58
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
p as RadioGroup,
|
|
60
|
+
f as RadioGroupItem
|
|
46
61
|
};
|
|
@@ -1,54 +1,61 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Button as
|
|
4
|
-
import { Icon as
|
|
5
|
-
import { useState as
|
|
6
|
-
import "
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
W.workerSrc = "https://unpkg.com/pdfjs-dist@5.3.93/build/pdf.worker.min.mjs";
|
|
13
|
-
function G({
|
|
14
|
-
url: a,
|
|
15
|
-
initialPage: w = 1,
|
|
16
|
-
className: N = ""
|
|
2
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { Button as v } from "./button.js";
|
|
4
|
+
import { Icon as s } from "./icon.js";
|
|
5
|
+
import { useState as l, useRef as W, useMemo as N, useEffect as d } from "react";
|
|
6
|
+
import "react-pdf/dist/Page/AnnotationLayer.css";
|
|
7
|
+
import "react-pdf/dist/Page/TextLayer.css";
|
|
8
|
+
function R({
|
|
9
|
+
url: m,
|
|
10
|
+
initialPage: g = 1,
|
|
11
|
+
className: u = ""
|
|
17
12
|
}) {
|
|
18
|
-
const [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
const [o, j] = l(null), [a, P] = l(), [t, f] = l(g), [p, h] = l(null), n = W(null), [b, x] = l(950), E = N(() => ({ url: m }), [m]), w = N(() => o ? {
|
|
14
|
+
cMapUrl: `https://unpkg.com/pdfjs-dist@${o.pdfjs.version}/cmaps/`,
|
|
15
|
+
cMapPacked: !0
|
|
16
|
+
} : null, [o]);
|
|
17
|
+
d(() => {
|
|
18
|
+
if (typeof window > "u") return;
|
|
19
|
+
let r = !0;
|
|
20
|
+
return import("react-pdf").then((i) => {
|
|
21
|
+
r && (i.pdfjs.GlobalWorkerOptions.workerSrc = `https://unpkg.com/pdfjs-dist@${i.pdfjs.version}/build/pdf.worker.min.mjs`, j(i));
|
|
22
|
+
}), () => {
|
|
23
|
+
r = !1;
|
|
24
|
+
};
|
|
25
|
+
}, []);
|
|
26
|
+
const L = ({ numPages: r }) => {
|
|
27
|
+
P(r), h(null), setTimeout(() => {
|
|
26
28
|
if (n.current) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
+
const i = n.current.clientWidth;
|
|
30
|
+
x(i - 32);
|
|
29
31
|
}
|
|
30
32
|
}, 50);
|
|
31
|
-
},
|
|
32
|
-
console.error("PDF Load Error:", r),
|
|
33
|
+
}, y = (r) => {
|
|
34
|
+
console.error("PDF Load Error:", r), h(r.message || "Errore nel caricamento del PDF");
|
|
33
35
|
};
|
|
34
|
-
|
|
36
|
+
if (d(() => {
|
|
35
37
|
n.current && (n.current.scrollTop = 0);
|
|
36
|
-
}, [t]),
|
|
38
|
+
}, [t]), d(() => {
|
|
37
39
|
const r = () => {
|
|
38
40
|
if (n.current) {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
+
const i = n.current.clientWidth;
|
|
42
|
+
x(i - 32);
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
45
|
return r(), window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
|
|
44
|
-
}, []),
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
}, []), p)
|
|
47
|
+
return /* @__PURE__ */ c("div", { className: "text-d-destructive flex min-h-[600px] flex-col items-center justify-center gap-3", children: [
|
|
48
|
+
/* @__PURE__ */ e(s, { name: "AlertCircle", className: "h-12 w-12" }),
|
|
49
|
+
/* @__PURE__ */ e("p", { className: "font-semibold", children: "Errore nel caricamento del PDF" }),
|
|
50
|
+
/* @__PURE__ */ e("p", { className: "text-d-muted-foreground text-sm", children: p })
|
|
51
|
+
] });
|
|
52
|
+
if (!o || !w)
|
|
53
|
+
return /* @__PURE__ */ e("div", { className: `flex min-h-[600px] w-full flex-col items-center ${u}`, children: /* @__PURE__ */ e("div", { className: "flex min-h-[600px] w-full items-center justify-center", children: /* @__PURE__ */ e(s, { name: "Loader2", className: "text-d-primary h-8 w-8 animate-spin" }) }) });
|
|
54
|
+
const { Document: C, Page: k } = o;
|
|
55
|
+
return /* @__PURE__ */ c(
|
|
49
56
|
"div",
|
|
50
57
|
{
|
|
51
|
-
className: `flex min-h-[600px] w-full flex-col items-center ${
|
|
58
|
+
className: `flex min-h-[600px] w-full flex-col items-center ${u}`,
|
|
52
59
|
children: [
|
|
53
60
|
/* @__PURE__ */ e(
|
|
54
61
|
"div",
|
|
@@ -56,53 +63,53 @@ function G({
|
|
|
56
63
|
ref: n,
|
|
57
64
|
className: "border-d-border max-h-[500px] w-full overflow-auto rounded border",
|
|
58
65
|
children: /* @__PURE__ */ e(
|
|
59
|
-
|
|
66
|
+
C,
|
|
60
67
|
{
|
|
61
|
-
file:
|
|
62
|
-
onLoadSuccess:
|
|
63
|
-
onLoadError:
|
|
64
|
-
options:
|
|
68
|
+
file: E,
|
|
69
|
+
onLoadSuccess: L,
|
|
70
|
+
onLoadError: y,
|
|
71
|
+
options: w,
|
|
65
72
|
loading: /* @__PURE__ */ e("div", { className: "flex min-h-[600px] items-center justify-center", children: /* @__PURE__ */ e(
|
|
66
|
-
|
|
73
|
+
s,
|
|
67
74
|
{
|
|
68
75
|
name: "Loader2",
|
|
69
76
|
className: "text-d-primary h-8 w-8 animate-spin"
|
|
70
77
|
}
|
|
71
78
|
) }),
|
|
72
|
-
error: /* @__PURE__ */
|
|
73
|
-
/* @__PURE__ */ e(
|
|
79
|
+
error: /* @__PURE__ */ c("div", { className: "text-d-destructive flex min-h-[600px] flex-col items-center justify-center gap-2", children: [
|
|
80
|
+
/* @__PURE__ */ e(s, { name: "AlertCircle", className: "h-12 w-12" }),
|
|
74
81
|
/* @__PURE__ */ e("p", { children: "Errore nel caricamento del PDF" })
|
|
75
82
|
] }),
|
|
76
83
|
className: "h-full min-h-[600px] w-full border-0",
|
|
77
|
-
children: /* @__PURE__ */ e(k, { pageNumber: t, width:
|
|
84
|
+
children: /* @__PURE__ */ e(k, { pageNumber: t, width: b })
|
|
78
85
|
}
|
|
79
86
|
)
|
|
80
87
|
}
|
|
81
88
|
),
|
|
82
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ c("div", { className: "my-8 flex h-full w-full items-center justify-center gap-4", children: [
|
|
83
90
|
/* @__PURE__ */ e(
|
|
84
|
-
|
|
91
|
+
v,
|
|
85
92
|
{
|
|
86
|
-
onClick: () =>
|
|
93
|
+
onClick: () => f(Math.max(1, t - 1)),
|
|
87
94
|
disabled: t <= 1,
|
|
88
95
|
variant: "outline",
|
|
89
96
|
size: "sm",
|
|
90
|
-
children: /* @__PURE__ */ e(
|
|
97
|
+
children: /* @__PURE__ */ e(s, { name: "ChevronLeft", className: "h-4 w-4" })
|
|
91
98
|
}
|
|
92
99
|
),
|
|
93
|
-
/* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ c("p", { className: "text-d-foreground text-sm", children: [
|
|
94
101
|
t,
|
|
95
102
|
" / ",
|
|
96
|
-
|
|
103
|
+
a
|
|
97
104
|
] }),
|
|
98
105
|
/* @__PURE__ */ e(
|
|
99
|
-
|
|
106
|
+
v,
|
|
100
107
|
{
|
|
101
|
-
onClick: () =>
|
|
102
|
-
disabled: t >= (
|
|
108
|
+
onClick: () => f(Math.min(a || 1, t + 1)),
|
|
109
|
+
disabled: t >= (a || 1),
|
|
103
110
|
variant: "outline",
|
|
104
111
|
size: "sm",
|
|
105
|
-
children: /* @__PURE__ */ e(
|
|
112
|
+
children: /* @__PURE__ */ e(s, { name: "ChevronRight", className: "h-4 w-4" })
|
|
106
113
|
}
|
|
107
114
|
)
|
|
108
115
|
] })
|
|
@@ -111,5 +118,5 @@ function G({
|
|
|
111
118
|
);
|
|
112
119
|
}
|
|
113
120
|
export {
|
|
114
|
-
|
|
121
|
+
R as SecurePdfViewer
|
|
115
122
|
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { Label as
|
|
4
|
-
import { cn as
|
|
5
|
-
function
|
|
6
|
-
|
|
2
|
+
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { Label as c } from "./label.js";
|
|
4
|
+
import { cn as i } from "../../lib/utils.js";
|
|
5
|
+
function b({
|
|
6
|
+
wrpClassName: d,
|
|
7
|
+
className: o,
|
|
7
8
|
label: e,
|
|
8
|
-
labelClassName:
|
|
9
|
-
id:
|
|
10
|
-
...
|
|
9
|
+
labelClassName: a,
|
|
10
|
+
id: n,
|
|
11
|
+
...s
|
|
11
12
|
}) {
|
|
12
|
-
const r =
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
e && /* @__PURE__ */ t(
|
|
13
|
+
const r = n || (e ? `textarea-${Math.random().toString(36).substring(2, 9)}` : void 0);
|
|
14
|
+
return /* @__PURE__ */ l("div", { className: i("space-y-1.5", d), children: [
|
|
15
|
+
e && /* @__PURE__ */ t(c, { htmlFor: r, className: a, children: e }),
|
|
15
16
|
/* @__PURE__ */ t(
|
|
16
17
|
"textarea",
|
|
17
18
|
{
|
|
18
19
|
id: r,
|
|
19
20
|
"data-slot": "textarea",
|
|
20
|
-
className:
|
|
21
|
+
className: i(
|
|
21
22
|
"border-d-input placeholder:text-d-muted-foreground focus-visible:border-d-ring focus-visible:ring-d-ring/50 aria-invalid:ring-d-destructive/20 aria-invalid:border-d-destructive !bg-d-input flex field-sizing-content min-h-16 w-full rounded-md border px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
22
|
-
|
|
23
|
+
o
|
|
23
24
|
),
|
|
24
|
-
...
|
|
25
|
+
...s
|
|
25
26
|
}
|
|
26
27
|
)
|
|
27
28
|
] });
|
|
28
29
|
}
|
|
29
30
|
export {
|
|
30
|
-
|
|
31
|
+
b as Textarea
|
|
31
32
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -143,14 +143,49 @@ declare interface AppEditorProps {
|
|
|
143
143
|
|
|
144
144
|
declare type AppEditorToolbar = "block-format" | "font-format" | "history";
|
|
145
145
|
|
|
146
|
+
/**
|
|
147
|
+
* @deprecated This component is deprecated. Please use AppSelect component instead.
|
|
148
|
+
*/
|
|
146
149
|
export declare function AppMultipleSelectDropdown({ options, value, onChange, onClear, placeholder, disabled, size, label, labelClassName, emptyMessage, className, searchPlaceholder, searchable, cancelLabel, maxSelectedItems, }: MultipleSelectDropdownProps): JSX.Element;
|
|
147
150
|
|
|
151
|
+
/**
|
|
152
|
+
* @deprecated This interface is deprecated. Please use AppSelect component instead.
|
|
153
|
+
*/
|
|
148
154
|
export declare interface AppMultipleSelectOption {
|
|
149
155
|
value: string;
|
|
150
156
|
label: string;
|
|
151
157
|
disabled?: boolean;
|
|
152
158
|
}
|
|
153
159
|
|
|
160
|
+
export declare function AppRadioGroup({ options, value, defaultValue, onValueChange, label, description, disabled, required, name, orientation, loop, className, wrpClassName, optionClassName, layout, error, }: AppRadioGroupProps): JSX.Element;
|
|
161
|
+
|
|
162
|
+
export declare interface AppRadioGroupOption {
|
|
163
|
+
value: string;
|
|
164
|
+
label: string | React_2.ReactNode;
|
|
165
|
+
description?: string | React_2.ReactNode;
|
|
166
|
+
disabled?: boolean;
|
|
167
|
+
icon?: IconName;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export declare interface AppRadioGroupProps {
|
|
171
|
+
options: AppRadioGroupOption[];
|
|
172
|
+
value?: string;
|
|
173
|
+
defaultValue?: string;
|
|
174
|
+
onValueChange?: (value: string) => void;
|
|
175
|
+
label?: string | React_2.ReactNode;
|
|
176
|
+
description?: string | React_2.ReactNode;
|
|
177
|
+
disabled?: boolean;
|
|
178
|
+
required?: boolean;
|
|
179
|
+
name?: string;
|
|
180
|
+
orientation?: "horizontal" | "vertical";
|
|
181
|
+
loop?: boolean;
|
|
182
|
+
className?: string;
|
|
183
|
+
wrpClassName?: string;
|
|
184
|
+
optionClassName?: string;
|
|
185
|
+
layout?: "default" | "card";
|
|
186
|
+
error?: string;
|
|
187
|
+
}
|
|
188
|
+
|
|
154
189
|
export declare function AppSelect(props: AppSelectProps): JSX.Element;
|
|
155
190
|
|
|
156
191
|
export declare interface AppSelectOption {
|
|
@@ -1412,6 +1447,9 @@ declare interface MessageListProps {
|
|
|
1412
1447
|
|
|
1413
1448
|
declare type MessagePart = TextPart | ReasoningPart | ToolInvocationPart | SourcePart;
|
|
1414
1449
|
|
|
1450
|
+
/**
|
|
1451
|
+
* @deprecated This component is deprecated. Please use AppSelect component instead.
|
|
1452
|
+
*/
|
|
1415
1453
|
declare interface MultipleSelectDropdownProps {
|
|
1416
1454
|
options: AppMultipleSelectOption[];
|
|
1417
1455
|
value: string[];
|
|
@@ -1430,8 +1468,14 @@ declare interface MultipleSelectDropdownProps {
|
|
|
1430
1468
|
cancelLabel?: string;
|
|
1431
1469
|
}
|
|
1432
1470
|
|
|
1471
|
+
/**
|
|
1472
|
+
* @deprecated This component is deprecated. Please use AppSelect component instead.
|
|
1473
|
+
*/
|
|
1433
1474
|
export declare const MultipleSelector: React_2.ForwardRefExoticComponent<MultipleSelectorProps & React_2.RefAttributes<MultipleSelectorRef>>;
|
|
1434
1475
|
|
|
1476
|
+
/**
|
|
1477
|
+
* @deprecated This component is deprecated. Please use AppSelect component instead.
|
|
1478
|
+
*/
|
|
1435
1479
|
declare interface MultipleSelectorProps {
|
|
1436
1480
|
value?: Option_2[];
|
|
1437
1481
|
defaultOptions?: Option_2[];
|
|
@@ -1487,6 +1531,9 @@ declare interface MultipleSelectorProps {
|
|
|
1487
1531
|
hideClearAllButton?: boolean;
|
|
1488
1532
|
}
|
|
1489
1533
|
|
|
1534
|
+
/**
|
|
1535
|
+
* @deprecated This interface is deprecated. Please use AppSelect component instead.
|
|
1536
|
+
*/
|
|
1490
1537
|
export declare interface MultipleSelectorRef {
|
|
1491
1538
|
selectedValue: Option_2[];
|
|
1492
1539
|
input: HTMLInputElement;
|
|
@@ -1564,6 +1611,9 @@ declare type OnBarChangeType<T extends Record<string, unknown> = any> = (barData
|
|
|
1564
1611
|
|
|
1565
1612
|
declare type OnBarDoubleClickType<T extends Record<string, unknown> = any> = (barData: GanttItemDataType<T>) => any;
|
|
1566
1613
|
|
|
1614
|
+
/**
|
|
1615
|
+
* @deprecated This interface is deprecated. Please use AppSelect component instead.
|
|
1616
|
+
*/
|
|
1567
1617
|
declare interface Option_2 {
|
|
1568
1618
|
value: string;
|
|
1569
1619
|
label: string;
|
|
@@ -1637,7 +1687,7 @@ declare interface PromptSuggestionsProps {
|
|
|
1637
1687
|
|
|
1638
1688
|
export declare function RadioGroup({ className, ...props }: React_2.ComponentProps<typeof RadioGroupPrimitive.Root>): JSX.Element;
|
|
1639
1689
|
|
|
1640
|
-
export declare function RadioGroupItem({ className, ...props }: React_2.ComponentProps<typeof RadioGroupPrimitive.Item>): JSX.Element;
|
|
1690
|
+
export declare function RadioGroupItem({ className, disabled, ...props }: React_2.ComponentProps<typeof RadioGroupPrimitive.Item>): JSX.Element;
|
|
1641
1691
|
|
|
1642
1692
|
declare type RawGanttDataType<T = Record<string, unknown>> = {
|
|
1643
1693
|
/**
|
|
@@ -1963,7 +2013,8 @@ export declare function TabsList({ className, ...props }: React_2.ComponentProps
|
|
|
1963
2013
|
|
|
1964
2014
|
export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Trigger>): JSX.Element;
|
|
1965
2015
|
|
|
1966
|
-
export declare function Textarea({ className, label, labelClassName, id, ...props }: React_2.ComponentProps<"textarea"> & {
|
|
2016
|
+
export declare function Textarea({ wrpClassName, className, label, labelClassName, id, ...props }: React_2.ComponentProps<"textarea"> & {
|
|
2017
|
+
wrpClassName?: string;
|
|
1967
2018
|
label?: React_2.ReactNode;
|
|
1968
2019
|
labelClassName?: string;
|
|
1969
2020
|
}): JSX.Element;
|