trepur_components 2.3.40 → 2.3.42
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.
|
@@ -4,9 +4,11 @@ import { StoryObj } from '@storybook/react';
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
6
|
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLUListElement> & import('.').BreadcrumbsContextProps & import('react').RefAttributes<HTMLUListElement>> & {
|
|
7
|
-
Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLIElement> &
|
|
7
|
+
Item: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLLIElement> & {
|
|
8
|
+
children?: any;
|
|
9
|
+
} & import('react').RefAttributes<HTMLLIElement>>;
|
|
8
10
|
Label: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLAnchorElement> & {
|
|
9
|
-
href
|
|
11
|
+
href?: string | undefined;
|
|
10
12
|
} & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
11
13
|
};
|
|
12
14
|
args: {
|
|
@@ -7,9 +7,11 @@ export interface BreadcrumbsItemContextProps {
|
|
|
7
7
|
isLast?: boolean;
|
|
8
8
|
}
|
|
9
9
|
declare const Breadcrumbs: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLUListElement> & BreadcrumbsContextProps & import('react').RefAttributes<HTMLUListElement>> & {
|
|
10
|
-
Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> &
|
|
10
|
+
Item: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLIElement> & {
|
|
11
|
+
children?: any;
|
|
12
|
+
} & import('react').RefAttributes<HTMLLIElement>>;
|
|
11
13
|
Label: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLAnchorElement> & {
|
|
12
|
-
href
|
|
14
|
+
href?: string | undefined;
|
|
13
15
|
} & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
14
16
|
};
|
|
15
17
|
export { Breadcrumbs };
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
const a =
|
|
1
|
+
import { jsx as s, jsxs as L } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as u, forwardRef as n, useMemo as d, useContext as i, Children as C } from "react";
|
|
3
|
+
const b = u(null), x = u(null), f = n(({ children: e, ...r }, t) => {
|
|
4
|
+
const a = d(
|
|
5
5
|
() => ({
|
|
6
6
|
allLinks: e
|
|
7
7
|
}),
|
|
8
8
|
[e]
|
|
9
9
|
);
|
|
10
|
-
return /* @__PURE__ */ s(
|
|
11
|
-
}),
|
|
12
|
-
|
|
10
|
+
return /* @__PURE__ */ s(b.Provider, { value: a, children: /* @__PURE__ */ s("ul", { ref: t, className: "flex gap-2", ...r, children: e }) });
|
|
11
|
+
}), B = n(({ children: e, ...r }, t) => {
|
|
12
|
+
var c, m, p;
|
|
13
|
+
const { allLinks: a } = i(b) || {}, o = C.toArray(a), l = ((c = e == null ? void 0 : e.props) == null ? void 0 : c.children) === ((p = (m = o[o.length - 1]) == null ? void 0 : m.props) == null ? void 0 : p.children.props.children), y = d(
|
|
13
14
|
() => ({
|
|
14
|
-
isLast:
|
|
15
|
+
isLast: l
|
|
15
16
|
}),
|
|
16
17
|
[e]
|
|
17
18
|
);
|
|
18
|
-
return /* @__PURE__ */ s(
|
|
19
|
+
return /* @__PURE__ */ s(x.Provider, { value: y, children: /* @__PURE__ */ L("li", { ref: t, className: "flex items-center gap-2", ...r, children: [
|
|
19
20
|
e,
|
|
20
|
-
!
|
|
21
|
+
!l && /* @__PURE__ */ s("p", { children: "/" })
|
|
21
22
|
] }) });
|
|
22
|
-
}),
|
|
23
|
-
const { isLast: o } =
|
|
24
|
-
return o ? /* @__PURE__ */ s("p", { className: "px-1 py-1 font-bold underline underline-offset-4", children: e }) : /* @__PURE__ */ s("p", { className: "px-1 py-1", children: /* @__PURE__ */ s(
|
|
23
|
+
}), N = n(({ children: e, href: r, ...t }, a) => {
|
|
24
|
+
const { isLast: o } = i(x) || {};
|
|
25
|
+
return o ? /* @__PURE__ */ s("p", { className: "px-1 py-1 font-bold underline underline-offset-4", children: e }) : r ? /* @__PURE__ */ s("p", { className: "px-1 py-1", children: /* @__PURE__ */ s(
|
|
25
26
|
"a",
|
|
26
27
|
{
|
|
27
28
|
ref: a,
|
|
@@ -30,15 +31,15 @@ const u = l(null), i = l(null), p = n(({ children: e, ...r }, t) => {
|
|
|
30
31
|
...t,
|
|
31
32
|
children: e
|
|
32
33
|
}
|
|
33
|
-
) });
|
|
34
|
+
) }) : /* @__PURE__ */ s("p", { className: "px-1 py-1", children: e });
|
|
34
35
|
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
Item:
|
|
40
|
-
Label:
|
|
36
|
+
f.displayName = "Breadcrumbs";
|
|
37
|
+
B.displayName = "Breadcrumbs.Item";
|
|
38
|
+
N.displayName = "Breadcrumbs.Label";
|
|
39
|
+
const I = Object.assign(f, {
|
|
40
|
+
Item: B,
|
|
41
|
+
Label: N
|
|
41
42
|
});
|
|
42
43
|
export {
|
|
43
|
-
|
|
44
|
+
I as Breadcrumbs
|
|
44
45
|
};
|
|
@@ -1,160 +1,151 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { Icon as
|
|
4
|
-
import { faChevronRight as
|
|
5
|
-
import
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as z, forwardRef as m, useState as g, useMemo as I, useContext as x } from "react";
|
|
3
|
+
import { Icon as w } from "../Icon/index.js";
|
|
4
|
+
import { faChevronRight as K, faChevronLeft as L, faCircle as T } from "@fortawesome/fontawesome-free-solid";
|
|
5
|
+
import u from "clsx";
|
|
6
6
|
import "../../node_modules/keen-slider/keen-slider.min.css.js";
|
|
7
7
|
import { useKeenSlider as $ } from "../../node_modules/keen-slider/react.js";
|
|
8
8
|
import { WheelControls as M } from "./utils.js";
|
|
9
|
-
const
|
|
9
|
+
const p = z(null), b = m(
|
|
10
10
|
({
|
|
11
|
-
breakpoints:
|
|
11
|
+
breakpoints: r,
|
|
12
12
|
children: t,
|
|
13
|
-
className:
|
|
13
|
+
className: o,
|
|
14
14
|
loop: e,
|
|
15
15
|
perView: n,
|
|
16
|
-
rubberband:
|
|
17
|
-
spacing:
|
|
18
|
-
...
|
|
19
|
-
},
|
|
20
|
-
const [
|
|
16
|
+
rubberband: c,
|
|
17
|
+
spacing: l,
|
|
18
|
+
...s
|
|
19
|
+
}, f) => {
|
|
20
|
+
const [d, i] = g(0), [C, D] = g(!1), [y, v] = $(
|
|
21
21
|
{
|
|
22
|
-
breakpoints:
|
|
22
|
+
breakpoints: r,
|
|
23
23
|
loop: e,
|
|
24
|
-
rubberband:
|
|
25
|
-
slideChanged(
|
|
26
|
-
|
|
24
|
+
rubberband: c,
|
|
25
|
+
slideChanged(h) {
|
|
26
|
+
i(h.track.details.rel);
|
|
27
27
|
},
|
|
28
28
|
created() {
|
|
29
|
-
|
|
29
|
+
D(!0);
|
|
30
30
|
},
|
|
31
31
|
slides: {
|
|
32
|
-
spacing:
|
|
32
|
+
spacing: l,
|
|
33
33
|
perView: n
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
[M]
|
|
37
|
-
),
|
|
37
|
+
), A = I(
|
|
38
38
|
() => ({
|
|
39
|
-
sliderRef:
|
|
40
|
-
instanceRef:
|
|
41
|
-
currentSlide:
|
|
42
|
-
setCurrentSlide:
|
|
39
|
+
sliderRef: y,
|
|
40
|
+
instanceRef: v,
|
|
41
|
+
currentSlide: d,
|
|
42
|
+
setCurrentSlide: i,
|
|
43
43
|
perView: n,
|
|
44
|
-
...
|
|
44
|
+
...s
|
|
45
45
|
}),
|
|
46
46
|
[
|
|
47
|
+
s,
|
|
48
|
+
y,
|
|
49
|
+
v.current,
|
|
50
|
+
d,
|
|
47
51
|
i,
|
|
48
|
-
C,
|
|
49
|
-
p.current,
|
|
50
|
-
f,
|
|
51
|
-
u,
|
|
52
52
|
n,
|
|
53
|
-
|
|
53
|
+
C
|
|
54
54
|
]
|
|
55
|
-
),
|
|
56
|
-
var
|
|
57
|
-
|
|
55
|
+
), P = (h) => {
|
|
56
|
+
var N;
|
|
57
|
+
h.key === "Tab" && ((N = v.current) == null || N.next());
|
|
58
58
|
};
|
|
59
|
-
return /* @__PURE__ */
|
|
59
|
+
return /* @__PURE__ */ a(p.Provider, { value: A, children: /* @__PURE__ */ a(
|
|
60
60
|
"div",
|
|
61
61
|
{
|
|
62
|
-
onKeyDown:
|
|
63
|
-
className:
|
|
64
|
-
ref:
|
|
65
|
-
...
|
|
62
|
+
onKeyDown: P,
|
|
63
|
+
className: u("navigation-wrapper w-full", o),
|
|
64
|
+
ref: f,
|
|
65
|
+
...s,
|
|
66
66
|
children: t
|
|
67
67
|
}
|
|
68
68
|
) });
|
|
69
69
|
}
|
|
70
|
-
),
|
|
70
|
+
), k = m(({ children: r, className: t, ...o }, e) => /* @__PURE__ */ a(
|
|
71
71
|
"div",
|
|
72
72
|
{
|
|
73
73
|
ref: e,
|
|
74
|
-
className:
|
|
74
|
+
className: u(
|
|
75
75
|
"navigation-wrapper flex w-full justify-between gap-4",
|
|
76
76
|
t
|
|
77
77
|
),
|
|
78
|
-
...
|
|
79
|
-
children:
|
|
78
|
+
...o,
|
|
79
|
+
children: r
|
|
80
80
|
}
|
|
81
|
-
)),
|
|
82
|
-
const { sliderRef: e } =
|
|
83
|
-
return /* @__PURE__ */
|
|
81
|
+
)), S = m(({ className: r, children: t, ...o }) => {
|
|
82
|
+
const { sliderRef: e } = x(p) || {};
|
|
83
|
+
return /* @__PURE__ */ a(
|
|
84
84
|
"div",
|
|
85
85
|
{
|
|
86
86
|
ref: e,
|
|
87
|
-
className:
|
|
88
|
-
...
|
|
87
|
+
className: u("keen-slider w-full pb-4", r),
|
|
88
|
+
...o,
|
|
89
89
|
children: t
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
|
-
}), R =
|
|
93
|
-
const { instanceRef: n } =
|
|
94
|
-
return /* @__PURE__ */
|
|
92
|
+
}), R = m(({ className: r, rightArrow: t = !1, ...o }, e) => {
|
|
93
|
+
const { instanceRef: n } = x(p) || {};
|
|
94
|
+
return /* @__PURE__ */ a(
|
|
95
95
|
"div",
|
|
96
96
|
{
|
|
97
97
|
ref: e,
|
|
98
|
-
className:
|
|
98
|
+
className: u(
|
|
99
99
|
"hidden md:block my-auto text-carousel-arrow-default hover:cursor-pointer hover:text-carousel-arrow-hover",
|
|
100
|
-
|
|
100
|
+
r
|
|
101
101
|
),
|
|
102
|
-
onClick: (
|
|
103
|
-
var
|
|
104
|
-
t ?
|
|
102
|
+
onClick: (c) => {
|
|
103
|
+
var l, s;
|
|
104
|
+
t ? c.stopPropagation() !== void 0 || ((l = n.current) == null || l.next()) : c.stopPropagation() !== void 0 || ((s = n.current) == null || s.prev());
|
|
105
105
|
},
|
|
106
|
-
...
|
|
107
|
-
children: /* @__PURE__ */
|
|
106
|
+
...o,
|
|
107
|
+
children: /* @__PURE__ */ a(w, { icon: t ? K : L, size: "3x" })
|
|
108
108
|
}
|
|
109
109
|
);
|
|
110
|
-
}),
|
|
111
|
-
var
|
|
112
|
-
const {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
return /* @__PURE__ */ l(
|
|
122
|
-
"button",
|
|
123
|
-
{
|
|
124
|
-
ref: s,
|
|
125
|
-
type: "button",
|
|
126
|
-
onClick: () => {
|
|
127
|
-
var k;
|
|
128
|
-
(k = e.current) == null || k.moveToIdx(a);
|
|
129
|
-
},
|
|
130
|
-
"aria-label": `carousel-button${t.id ? `-${t.id}` : ""}`,
|
|
131
|
-
children: /* @__PURE__ */ l(
|
|
132
|
-
j,
|
|
133
|
-
{
|
|
134
|
-
className: m(
|
|
135
|
-
"hover:text-carousel-dots-hover",
|
|
136
|
-
p ? "text-carousel-dots-active" : "text-carousel-dots-default"
|
|
137
|
-
),
|
|
138
|
-
icon: T,
|
|
139
|
-
size: "xl"
|
|
140
|
-
}
|
|
141
|
-
)
|
|
110
|
+
}), j = m(({ className: r, ...t }, o) => {
|
|
111
|
+
var l, s, f, d;
|
|
112
|
+
const { instanceRef: e, currentSlide: n } = x(p) || {}, c = (d = (f = (s = (l = e == null ? void 0 : e.current) == null ? void 0 : l.track) == null ? void 0 : s.details) == null ? void 0 : f.slides) == null ? void 0 : d.length;
|
|
113
|
+
return /* @__PURE__ */ a("div", { className: u("flex justify-center gap-0.5 pt-2", r), children: [...Array(c).keys()].map((i) => /* @__PURE__ */ a(
|
|
114
|
+
"button",
|
|
115
|
+
{
|
|
116
|
+
ref: o,
|
|
117
|
+
type: "button",
|
|
118
|
+
onClick: () => {
|
|
119
|
+
var C;
|
|
120
|
+
(C = e.current) == null || C.moveToIdx(i);
|
|
142
121
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
122
|
+
"aria-label": `carousel-button${t.id ? `-${t.id}` : ""}`,
|
|
123
|
+
children: /* @__PURE__ */ a(
|
|
124
|
+
w,
|
|
125
|
+
{
|
|
126
|
+
className: u(
|
|
127
|
+
"hover:text-carousel-dots-hover",
|
|
128
|
+
n === i ? "text-carousel-dots-active" : "text-carousel-dots-default"
|
|
129
|
+
),
|
|
130
|
+
icon: T,
|
|
131
|
+
size: "xl"
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
},
|
|
135
|
+
i
|
|
136
|
+
)) });
|
|
146
137
|
});
|
|
147
|
-
|
|
148
|
-
|
|
138
|
+
b.displayName = "Carousel";
|
|
139
|
+
k.displayName = "Carousel.Content";
|
|
149
140
|
R.displayName = "Carousel.Arrow";
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
Content:
|
|
141
|
+
j.displayName = "Carousel.Dots";
|
|
142
|
+
S.displayName = "Carousel.Slides";
|
|
143
|
+
const J = Object.assign(b, {
|
|
144
|
+
Content: k,
|
|
154
145
|
Arrow: R,
|
|
155
|
-
Dots:
|
|
156
|
-
Slides:
|
|
146
|
+
Dots: j,
|
|
147
|
+
Slides: S
|
|
157
148
|
});
|
|
158
149
|
export {
|
|
159
|
-
|
|
150
|
+
J as Carousel
|
|
160
151
|
};
|