trepur_components 2.3.45 → 2.3.47
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,6 +1,6 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const b =
|
|
1
|
+
import { jsx as s, jsxs as C } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as p, forwardRef as n, useMemo as d, useContext as i, Children as v } from "react";
|
|
3
|
+
const b = p(null), f = p(null), x = n(({ children: e, ...r }, t) => {
|
|
4
4
|
const a = d(
|
|
5
5
|
() => ({
|
|
6
6
|
allLinks: e
|
|
@@ -9,20 +9,20 @@ const b = u(null), x = u(null), f = n(({ children: e, ...r }, t) => {
|
|
|
9
9
|
);
|
|
10
10
|
return /* @__PURE__ */ s(b.Provider, { value: a, children: /* @__PURE__ */ s("ul", { ref: t, className: "flex gap-2", ...r, children: e }) });
|
|
11
11
|
}), B = n(({ children: e, ...r }, t) => {
|
|
12
|
-
var c, m,
|
|
13
|
-
const { allLinks: a } = i(b) || {}, o =
|
|
12
|
+
var c, m, u;
|
|
13
|
+
const { allLinks: a } = i(b) || {}, o = v.toArray(a), l = ((c = e == null ? void 0 : e.props) == null ? void 0 : c.children) === ((u = (m = o[o.length - 1]) == null ? void 0 : m.props) == null ? void 0 : u.children.props.children), N = d(
|
|
14
14
|
() => ({
|
|
15
15
|
isLast: l
|
|
16
16
|
}),
|
|
17
17
|
[e]
|
|
18
18
|
);
|
|
19
|
-
return /* @__PURE__ */ s(
|
|
19
|
+
return /* @__PURE__ */ s(f.Provider, { value: N, children: /* @__PURE__ */ C("li", { ref: t, className: "flex items-center gap-2", ...r, children: [
|
|
20
20
|
e,
|
|
21
21
|
!l && /* @__PURE__ */ s("p", { children: "/" })
|
|
22
22
|
] }) });
|
|
23
|
-
}),
|
|
24
|
-
const { isLast: o } = i(
|
|
25
|
-
return o ? /* @__PURE__ */ s("p", { className: "
|
|
23
|
+
}), L = n(({ children: e, href: r, ...t }, a) => {
|
|
24
|
+
const { isLast: o } = i(f) || {};
|
|
25
|
+
return o ? /* @__PURE__ */ s("p", { className: "font-bold underline underline-offset-4", children: e }) : r ? /* @__PURE__ */ s("p", { children: /* @__PURE__ */ s(
|
|
26
26
|
"a",
|
|
27
27
|
{
|
|
28
28
|
ref: a,
|
|
@@ -31,14 +31,14 @@ const b = u(null), x = u(null), f = n(({ children: e, ...r }, t) => {
|
|
|
31
31
|
...t,
|
|
32
32
|
children: e
|
|
33
33
|
}
|
|
34
|
-
) }) : /* @__PURE__ */ s("p", {
|
|
34
|
+
) }) : /* @__PURE__ */ s("p", { children: e });
|
|
35
35
|
});
|
|
36
|
-
|
|
36
|
+
x.displayName = "Breadcrumbs";
|
|
37
37
|
B.displayName = "Breadcrumbs.Item";
|
|
38
|
-
|
|
39
|
-
const I = Object.assign(
|
|
38
|
+
L.displayName = "Breadcrumbs.Label";
|
|
39
|
+
const I = Object.assign(x, {
|
|
40
40
|
Item: B,
|
|
41
|
-
Label:
|
|
41
|
+
Label: L
|
|
42
42
|
});
|
|
43
43
|
export {
|
|
44
44
|
I as Breadcrumbs
|
|
@@ -5,6 +5,7 @@ export interface CollapsibleContextProps {
|
|
|
5
5
|
loading?: boolean;
|
|
6
6
|
expanded?: boolean;
|
|
7
7
|
setExpanded?: (expanded: boolean) => void;
|
|
8
|
+
expandFully?: boolean;
|
|
8
9
|
}
|
|
9
10
|
declare const Collapsible: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & CollapsibleContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
10
11
|
Header: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,85 +1,89 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { Image as
|
|
5
|
-
import { faChevronDown as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
()
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
import { jsx as t, jsxs as H } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as T, forwardRef as o, useState as I, useMemo as S, useContext as c } from "react";
|
|
3
|
+
import { Icon as j } from "../Icon/index.js";
|
|
4
|
+
import { Image as L } from "../Image/index.js";
|
|
5
|
+
import { faChevronDown as k, faChevronUp as q } from "@fortawesome/fontawesome-free-solid";
|
|
6
|
+
import n from "clsx";
|
|
7
|
+
const r = T(null), x = o(
|
|
8
|
+
({ id: e, className: l, children: a, loading: s, expandFully: i = !1, ...m }, g) => {
|
|
9
|
+
const [p, d] = I(!1), w = S(
|
|
10
|
+
() => ({
|
|
11
|
+
loading: s,
|
|
12
|
+
expanded: p,
|
|
13
|
+
setExpanded: d,
|
|
14
|
+
expandFully: i
|
|
15
|
+
}),
|
|
16
|
+
[s, p, d]
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ t(r.Provider, { value: w, children: /* @__PURE__ */ t(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
id: e,
|
|
22
|
+
className: n(
|
|
23
|
+
"w-full rounded-2xl bg-white hover:cursor-pointer",
|
|
24
|
+
l
|
|
25
|
+
),
|
|
26
|
+
ref: g,
|
|
27
|
+
...m,
|
|
28
|
+
children: a
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
31
|
+
}
|
|
32
|
+
), C = o(({ className: e, children: l, ...a }, s) => {
|
|
33
|
+
const { expanded: i, setExpanded: m } = c(r) || {};
|
|
34
|
+
return /* @__PURE__ */ H(
|
|
32
35
|
"div",
|
|
33
36
|
{
|
|
34
|
-
className:
|
|
35
|
-
onClick: () =>
|
|
37
|
+
className: n("flex h-24 pr-4 sm:pr-8", e),
|
|
38
|
+
onClick: () => m == null ? void 0 : m(!i),
|
|
36
39
|
ref: s,
|
|
37
40
|
...a,
|
|
38
41
|
children: [
|
|
39
42
|
l,
|
|
40
|
-
/* @__PURE__ */ t("div", { className: "my-auto flex-none", children: /* @__PURE__ */ t(
|
|
43
|
+
/* @__PURE__ */ t("div", { className: "my-auto flex-none", children: /* @__PURE__ */ t(j, { icon: i ? k : q }) })
|
|
41
44
|
]
|
|
42
45
|
}
|
|
43
46
|
);
|
|
44
47
|
}), b = o(({ children: e, className: l, ...a }, s) => /* @__PURE__ */ t(
|
|
45
48
|
"div",
|
|
46
49
|
{
|
|
47
|
-
className:
|
|
50
|
+
className: n("mx-4 my-auto grid w-full", l),
|
|
48
51
|
ref: s,
|
|
49
52
|
...a,
|
|
50
53
|
children: e
|
|
51
54
|
}
|
|
52
|
-
)), u = o(({ className: e, src: l, ...a }, s) => /* @__PURE__ */ t("div", { ref: s, className:
|
|
55
|
+
)), u = o(({ className: e, src: l, ...a }, s) => /* @__PURE__ */ t("div", { ref: s, className: n("aspect-square flex-none p-4", e), children: /* @__PURE__ */ t(L, { src: l, className: "h-full rounded-2xl", ...a }) })), f = o(({ className: e, ...l }, a) => /* @__PURE__ */ t(
|
|
53
56
|
"p",
|
|
54
57
|
{
|
|
55
|
-
className:
|
|
58
|
+
className: n("text-xxs text-light-grey truncate md:text-xs", e),
|
|
56
59
|
ref: a,
|
|
57
60
|
...l
|
|
58
61
|
}
|
|
59
|
-
)),
|
|
62
|
+
)), N = o(({ className: e, ...l }, a) => /* @__PURE__ */ t(
|
|
60
63
|
"p",
|
|
61
64
|
{
|
|
62
|
-
className:
|
|
65
|
+
className: n("md:text-md truncate text-sm", e),
|
|
63
66
|
ref: a,
|
|
64
67
|
...l
|
|
65
68
|
}
|
|
66
69
|
)), h = o(({ className: e, ...l }, a) => /* @__PURE__ */ t(
|
|
67
70
|
"p",
|
|
68
71
|
{
|
|
69
|
-
className:
|
|
72
|
+
className: n("truncate text-xs md:text-sm", e),
|
|
70
73
|
ref: a,
|
|
71
74
|
...l
|
|
72
75
|
}
|
|
73
|
-
)),
|
|
74
|
-
const { expanded:
|
|
76
|
+
)), y = o(({ children: e, className: l, ...a }, s) => {
|
|
77
|
+
const { expanded: i, expandFully: m } = c(r) || {};
|
|
75
78
|
return /* @__PURE__ */ t(
|
|
76
79
|
"div",
|
|
77
80
|
{
|
|
78
|
-
className:
|
|
81
|
+
className: n(
|
|
79
82
|
"w-auto overflow-scroll px-4 transition-max-height duration-300",
|
|
80
83
|
{
|
|
81
|
-
"max-h-32":
|
|
82
|
-
"max-h-
|
|
84
|
+
"max-h-32": i && !m,
|
|
85
|
+
"max-h-full": i && m,
|
|
86
|
+
"max-h-0": !i
|
|
83
87
|
},
|
|
84
88
|
l
|
|
85
89
|
),
|
|
@@ -88,25 +92,25 @@ const m = H(null), x = o(({ id: e, className: l, children: a, loading: s, ...n }
|
|
|
88
92
|
children: e
|
|
89
93
|
}
|
|
90
94
|
);
|
|
91
|
-
}),
|
|
95
|
+
}), v = o(({ className: e, ...l }, a) => /* @__PURE__ */ t("p", { className: n("text-xs md:text-sm", e), ref: a, ...l }));
|
|
92
96
|
x.displayName = "Collapsible";
|
|
93
97
|
C.displayName = "Collapsible.Header";
|
|
94
|
-
|
|
98
|
+
y.displayName = "Collapsible.Content";
|
|
95
99
|
u.displayName = "Collapsible.Image";
|
|
96
|
-
|
|
97
|
-
|
|
100
|
+
f.displayName = "Collapsible.Label";
|
|
101
|
+
N.displayName = "Collapsible.Title";
|
|
98
102
|
h.displayName = "Collapsible.Subtitle";
|
|
99
103
|
b.displayName = "Collapsible.HeaderContent";
|
|
100
|
-
|
|
104
|
+
v.displayName = "Collapsible.Text";
|
|
101
105
|
const U = Object.assign(x, {
|
|
102
106
|
Header: C,
|
|
103
107
|
HeaderContent: b,
|
|
104
108
|
Image: u,
|
|
105
|
-
Label:
|
|
106
|
-
Title:
|
|
109
|
+
Label: f,
|
|
110
|
+
Title: N,
|
|
107
111
|
Subtitle: h,
|
|
108
|
-
Content:
|
|
109
|
-
Text:
|
|
112
|
+
Content: y,
|
|
113
|
+
Text: v
|
|
110
114
|
});
|
|
111
115
|
export {
|
|
112
116
|
U as Collapsible
|
|
@@ -15,7 +15,7 @@ const d = o(({ className: a, children: e, onClick: t, ...r }, I) => /* @__PURE__
|
|
|
15
15
|
...r,
|
|
16
16
|
children: e
|
|
17
17
|
}
|
|
18
|
-
)), n = o(({ src: a, ...e }) => /* @__PURE__ */ m("div", { className: "h-64", children: /* @__PURE__ */ m(N, { className: "object-cover", src: a, ...e }) })),
|
|
18
|
+
)), n = o(({ src: a, ...e }) => /* @__PURE__ */ m("div", { className: "h-64", children: /* @__PURE__ */ m(N, { className: "object-cover", src: a, ...e }) })), l = o(({ children: a, className: e, ...t }, r) => /* @__PURE__ */ m("div", { className: s("p-4 pt-2", e), ref: r, ...t, children: a })), i = o(({ className: a, ...e }, t) => /* @__PURE__ */ m("p", { className: s("text-sm font-bold", a), ref: t, ...e })), p = o(({ className: a, ...e }, t) => /* @__PURE__ */ m("p", { className: s("text-sm font-normal", a), ref: t, ...e })), c = o(({ className: a, ...e }, t) => /* @__PURE__ */ m(
|
|
19
19
|
"p",
|
|
20
20
|
{
|
|
21
21
|
className: s("line-clamp-5 pt-2 text-md font-normal", a),
|
|
@@ -32,21 +32,21 @@ const d = o(({ className: a, children: e, onClick: t, ...r }, I) => /* @__PURE__
|
|
|
32
32
|
)), C = o(({ children: a, className: e, ...t }) => /* @__PURE__ */ m("p", { className: s("pt-4 text-end text-sm", e), ...t, children: a }));
|
|
33
33
|
d.displayName = "ImageCard";
|
|
34
34
|
n.displayName = "ImageCard.Image";
|
|
35
|
-
|
|
35
|
+
i.displayName = "ImageCard.Title";
|
|
36
36
|
p.displayName = "ImageCard.Subtitle";
|
|
37
|
-
|
|
37
|
+
l.displayName = "ImageCard.Content";
|
|
38
38
|
c.displayName = "ImageCard.Text";
|
|
39
39
|
g.displayName = "ImageCard.Button";
|
|
40
40
|
C.displayName = "ImageCard.Caption";
|
|
41
|
-
const
|
|
41
|
+
const h = Object.assign(d, {
|
|
42
42
|
Image: n,
|
|
43
|
-
Content:
|
|
44
|
-
Title:
|
|
43
|
+
Content: l,
|
|
44
|
+
Title: i,
|
|
45
45
|
Subtitle: p,
|
|
46
46
|
Text: c,
|
|
47
47
|
Button: g,
|
|
48
48
|
Caption: C
|
|
49
49
|
});
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
h as ImageCard
|
|
52
52
|
};
|