trepur_components 2.3.21 → 2.3.23
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/lib/components/Breadcrumbs/index.js +18 -23
- package/lib/components/Nav/index.js +86 -65
- package/lib/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,32 +1,27 @@
|
|
|
1
|
-
import { jsx as s, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
const a =
|
|
1
|
+
import { jsx as s, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as l, forwardRef as n, useMemo as m, useContext as d, Children as N } from "react";
|
|
3
|
+
const u = l(null), i = l(null), p = n(({ children: e, ...r }, t) => {
|
|
4
|
+
const a = m(
|
|
5
5
|
() => ({
|
|
6
6
|
allLinks: e
|
|
7
7
|
}),
|
|
8
8
|
[e]
|
|
9
9
|
);
|
|
10
|
-
return /* @__PURE__ */ s(
|
|
11
|
-
}),
|
|
12
|
-
const { allLinks: a } =
|
|
13
|
-
(o) => {
|
|
14
|
-
var l, u, p, d;
|
|
15
|
-
return ((p = (u = (l = o == null ? void 0 : o.props) == null ? void 0 : l.children) == null ? void 0 : u.props) == null ? void 0 : p.children) === ((d = e == null ? void 0 : e.props) == null ? void 0 : d.children);
|
|
16
|
-
}
|
|
17
|
-
) === n.length - 1, C = b(
|
|
10
|
+
return /* @__PURE__ */ s(u.Provider, { value: a, children: /* @__PURE__ */ s("ul", { ref: t, className: "flex gap-2", ...r, children: e }) });
|
|
11
|
+
}), b = n(({ children: e, ...r }, t) => {
|
|
12
|
+
const { allLinks: a } = d(u) || {}, c = 0 === N.toArray(a).length - 1, f = m(
|
|
18
13
|
() => ({
|
|
19
14
|
isLast: c
|
|
20
15
|
}),
|
|
21
16
|
[e]
|
|
22
17
|
);
|
|
23
|
-
return /* @__PURE__ */ s(
|
|
18
|
+
return /* @__PURE__ */ s(i.Provider, { value: f, children: /* @__PURE__ */ B("li", { ref: t, className: "flex items-center gap-2", ...r, children: [
|
|
24
19
|
e,
|
|
25
20
|
!c && /* @__PURE__ */ s("p", { children: "/" })
|
|
26
21
|
] }) });
|
|
27
|
-
}),
|
|
28
|
-
const { isLast:
|
|
29
|
-
return
|
|
22
|
+
}), x = n(({ children: e, href: r, ...t }, a) => {
|
|
23
|
+
const { isLast: o } = d(i) || {};
|
|
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(
|
|
30
25
|
"a",
|
|
31
26
|
{
|
|
32
27
|
ref: a,
|
|
@@ -37,13 +32,13 @@ const f = i(null), B = i(null), N = m(({ children: e, ...r }, t) => {
|
|
|
37
32
|
}
|
|
38
33
|
) });
|
|
39
34
|
});
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
Item:
|
|
45
|
-
Label:
|
|
35
|
+
p.displayName = "Breadcrumbs";
|
|
36
|
+
b.displayName = "Breadcrumbs.Item";
|
|
37
|
+
x.displayName = "Breadcrumbs.Label";
|
|
38
|
+
const v = Object.assign(p, {
|
|
39
|
+
Item: b,
|
|
40
|
+
Label: x
|
|
46
41
|
});
|
|
47
42
|
export {
|
|
48
|
-
|
|
43
|
+
v as Breadcrumbs
|
|
49
44
|
};
|
|
@@ -1,96 +1,117 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { HamburgerIcon as
|
|
4
|
-
import { faChevronDown as
|
|
5
|
-
import
|
|
6
|
-
import { Icon as
|
|
7
|
-
const
|
|
8
|
-
const [
|
|
1
|
+
import { jsx as e, jsxs as i, Fragment as H } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as C, forwardRef as r, useState as m, useMemo as k, useContext as p, useRef as w } from "react";
|
|
3
|
+
import { HamburgerIcon as M } from "../HamburgerIcon/index.js";
|
|
4
|
+
import { faChevronDown as j } from "@fortawesome/fontawesome-free-solid";
|
|
5
|
+
import d from "clsx";
|
|
6
|
+
import { Icon as D } from "../Icon/index.js";
|
|
7
|
+
const c = C(null), v = r(({ className: a, children: s }, t) => {
|
|
8
|
+
const [o, n] = m(!1), l = k(
|
|
9
9
|
() => ({
|
|
10
|
-
expanded:
|
|
11
|
-
setExpanded:
|
|
10
|
+
expanded: o,
|
|
11
|
+
setExpanded: n
|
|
12
12
|
}),
|
|
13
|
-
[
|
|
13
|
+
[o, n]
|
|
14
14
|
);
|
|
15
|
-
return /* @__PURE__ */ e(
|
|
16
|
-
}),
|
|
17
|
-
({
|
|
15
|
+
return /* @__PURE__ */ e(c.Provider, { value: l, children: /* @__PURE__ */ e("div", { className: a, ref: t, children: s }) });
|
|
16
|
+
}), N = r(
|
|
17
|
+
({ className: a, children: s }, t) => /* @__PURE__ */ e(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
|
-
ref:
|
|
21
|
-
className:
|
|
22
|
-
children:
|
|
20
|
+
ref: t,
|
|
21
|
+
className: d("relative h-24 w-full bg-nav-bg px-2 py-2", a),
|
|
22
|
+
children: s
|
|
23
23
|
}
|
|
24
24
|
)
|
|
25
|
-
),
|
|
26
|
-
const { setExpanded:
|
|
27
|
-
return /* @__PURE__ */
|
|
25
|
+
), g = r(({ className: a, children: s }, t) => {
|
|
26
|
+
const { setExpanded: o, expanded: n } = p(c) || {};
|
|
27
|
+
return /* @__PURE__ */ i("div", { ref: t, className: d("flex h-full md:hidden", a), children: [
|
|
28
28
|
/* @__PURE__ */ e("div", { className: "my-auto", children: /* @__PURE__ */ e(
|
|
29
|
-
|
|
29
|
+
M,
|
|
30
30
|
{
|
|
31
31
|
variant: "ghost",
|
|
32
|
-
onClick: () =>
|
|
32
|
+
onClick: () => o == null ? void 0 : o(!n),
|
|
33
33
|
className: "aspect-square"
|
|
34
34
|
}
|
|
35
35
|
) }),
|
|
36
|
-
/* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children:
|
|
36
|
+
/* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: s })
|
|
37
37
|
] });
|
|
38
|
-
}),
|
|
38
|
+
}), f = r(({ className: a, children: s }, t) => /* @__PURE__ */ e(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
|
-
ref:
|
|
42
|
-
className:
|
|
43
|
-
|
|
41
|
+
ref: t,
|
|
42
|
+
className: d(
|
|
43
|
+
"hidden justify-between md:flex md:gap-4 md:px-4 lg:gap-8 lg:px-20",
|
|
44
|
+
a
|
|
45
|
+
),
|
|
46
|
+
children: s
|
|
44
47
|
}
|
|
45
|
-
)),
|
|
46
|
-
({
|
|
47
|
-
const { expanded:
|
|
48
|
-
return
|
|
48
|
+
)), u = r(
|
|
49
|
+
({ className: a, children: s }, t) => {
|
|
50
|
+
const { expanded: o } = p(c) || {};
|
|
51
|
+
return o ? /* @__PURE__ */ e(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: t,
|
|
55
|
+
className: d(
|
|
56
|
+
"h-screen bg-nav-bg px-8 pb-12 pt-2 md:hidden",
|
|
57
|
+
a
|
|
58
|
+
),
|
|
59
|
+
children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 md:hidden", children: s })
|
|
60
|
+
}
|
|
61
|
+
) : /* @__PURE__ */ e(H, {});
|
|
49
62
|
}
|
|
50
|
-
),
|
|
51
|
-
({
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
63
|
+
), x = r(
|
|
64
|
+
({ className: a, children: s }, t) => /* @__PURE__ */ e(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
ref: t,
|
|
68
|
+
className: d("my-4 md:flex md:gap-4 lg:gap-8", a),
|
|
69
|
+
children: s
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
), h = r(({ className: a, label: s, children: t, active: o = !1 }) => {
|
|
73
|
+
const [n, l] = m(!1), y = w(null);
|
|
74
|
+
return /* @__PURE__ */ i(
|
|
55
75
|
"div",
|
|
56
76
|
{
|
|
57
|
-
ref:
|
|
58
|
-
onClick: () =>
|
|
59
|
-
onMouseLeave: () =>
|
|
60
|
-
className:
|
|
77
|
+
ref: y,
|
|
78
|
+
onClick: () => l(!0),
|
|
79
|
+
onMouseLeave: () => l(!1),
|
|
80
|
+
className: d(
|
|
61
81
|
"relative m-auto text-xl tracking-wider text-nav-text hover:cursor-pointer",
|
|
62
82
|
{
|
|
63
|
-
"font-bold":
|
|
64
|
-
"font-normal": !
|
|
65
|
-
}
|
|
83
|
+
"font-bold": o,
|
|
84
|
+
"font-normal": !o
|
|
85
|
+
},
|
|
86
|
+
a
|
|
66
87
|
),
|
|
67
88
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */ e("p", { children:
|
|
70
|
-
/* @__PURE__ */ e(
|
|
89
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-px ", children: [
|
|
90
|
+
/* @__PURE__ */ e("p", { children: s }),
|
|
91
|
+
/* @__PURE__ */ e(D, { icon: j })
|
|
71
92
|
] }),
|
|
72
|
-
|
|
93
|
+
n && /* @__PURE__ */ e("div", { className: "absolute -left-5 top-7 z-50 w-40 bg-nav-bg", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-y-2 bg-nav-bg px-4 py-4", children: t }) })
|
|
73
94
|
]
|
|
74
95
|
}
|
|
75
96
|
);
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const
|
|
86
|
-
Header:
|
|
87
|
-
DesktopHeader:
|
|
88
|
-
MobileHeader:
|
|
89
|
-
Section:
|
|
90
|
-
Logo:
|
|
91
|
-
Body:
|
|
92
|
-
Folder:
|
|
97
|
+
}), b = r(({ className: a, src: s, ...t }, o) => /* @__PURE__ */ e("img", { className: d("h-20", a), ref: o, src: s, ...t }));
|
|
98
|
+
v.displayName = "Nav";
|
|
99
|
+
N.displayName = "Nav.Header";
|
|
100
|
+
f.displayName = "Nav.DesktopHeader";
|
|
101
|
+
g.displayName = "Nav.MobileHeader";
|
|
102
|
+
b.displayName = "Nav.Logo";
|
|
103
|
+
x.displayName = "Nav.Section";
|
|
104
|
+
u.displayName = "Nav.Body";
|
|
105
|
+
h.displayName = "Nav.Folder";
|
|
106
|
+
const q = Object.assign(v, {
|
|
107
|
+
Header: N,
|
|
108
|
+
DesktopHeader: f,
|
|
109
|
+
MobileHeader: g,
|
|
110
|
+
Section: x,
|
|
111
|
+
Logo: b,
|
|
112
|
+
Body: u,
|
|
113
|
+
Folder: h
|
|
93
114
|
});
|
|
94
115
|
export {
|
|
95
|
-
|
|
116
|
+
q as Nav
|
|
96
117
|
};
|
package/lib/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.react-calendar{width:410px;background:#fff;border:none;border-radius:25px;border:1px solid #fff;box-shadow:0 12px 24px #0003;padding:8px;line-height:1.125em}.react-calendar--doubleView .react-calendar__viewContainer{display:flex;margin:-.5em}.react-calendar--doubleView .react-calendar__viewContainer>*{width:50%;margin:.5em}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{display:flex;height:50px;margin-bottom:1em}.react-calendar__month-view__weekdays__weekday{padding:.5em}.react-calendar__month-view__weekdays{text-align:center;text-transform:uppercase;font-size:.75em}.react-calendar--doubleView{width:800px}.react-calendar__month-view{padding-left:20px;padding-right:20px}.react-calendar__tile{height:50px;width:50px}.react-calendar__tile:disabled{background-color:#fff;color:#bebebe}.react-calendar__month-view__days__day--weekend,.react-calendar__month-view__days__day{color:#000}.react-calendar__month-view__days__day--neighboringMonth{visibility:hidden}.react-calendar__tile:enabled:hover,.react-calendar__tile:enabled:focus{border-radius:50%;border:1px solid;border-color:#000;background:#fff;color:#000}.react-calendar__tile--now{background:#fff;color:#000}.react-calendar__tile--now:enabled:hover,.react-calendar__tile--now:enabled:focus{border-radius:50%;border:1px solid;border-color:#000;background:#fff;color:#000}.react-calendar__tile--hasActive:enabled:hover,.react-calendar__tile--hasActive:enabled:focus{background:#f8f8fa}.react-calendar__tile--active{background:#000;border-radius:50%;color:#fff}.react-calendar__tile--rangeEnd.react-calendar__tile--active:enabled:hover,.react-calendar__tile--rangeEnd.react-calendar__tile--active:enabled:focus,.react-calendar__tile--rangeEnd:enabled{border-radius:0 50% 50% 0;border:1px solid;border-color:#000;background:#000;color:#fff}.react-calendar__tile--rangeStart.react-calendar__tile--active:enabled:hover,.react-calendar__tile--rangeStart.react-calendar__tile--active:enabled:focus,.react-calendar__tile--rangeStart:enabled{border-radius:50% 0 0 50%;border:1px solid;border-color:#000;background:#000;color:#fff}.react-calendar--selectRange .react-calendar__tile--hover{background-color:#dfdfe1}.react-calendar--selectRange .react-calendar__tile--rangeStart{background-color:#000;color:#fff}.react-calendar__tile--range{background:#dfdfe1;color:#000;border-radius:0}.react-calendar__tile--rangeStart{border-radius:50% 0 0 50%;background:#000;color:#fff}.react-calendar__tile--rangeEnd{border-radius:0 50% 50% 0;background:#000;color:#fff}.react-calendar__navigation__prev-button,.react-calendar__navigation__next-button{background:#fff}.react-calendar__navigation__prev2-button,.react-calendar__navigation__next2-button{display:none}.react-calendar__navigation__label__labelText{color:#000}.react-calendar__navigation{height:50px}.react-calendar__navigation button{color:#000;width:50px;background:none;font-size:16px}.react-calendar__navigation button:enabled:hover,.react-calendar__navigation button:enabled:focus{background-color:#bebebe;color:#000;border-radius:50%}.react-calendar__navigation button:disabled{background:#fff;color:#bebebe}abbr[title]{text-decoration:none}.react-calendar__navigation__label__divider{display:none}.react-calendar__navigation__label{padding-top:20px;display:flex;flex-grow:1;justify-content:space-between}.react-calendar__navigation__label__labelText--from{margin-left:80px}.react-calendar__navigation__label__labelText--to{margin-right:100px}button.react-calendar__tile.react-calendar__tile--active.react-calendar__tile--range.react-calendar__tile--rangeStart.react-calendar__tile--rangeEnd.react-calendar__tile--rangeBothEnds.react-calendar__tile--hover.react-calendar__tile--hoverStart.react-calendar__tile--hoverEnd.react-calendar__tile--hoverBothEnds.react-calendar__month-view__days__day.react-calendar__month-view__days__day--weekend{background-color:#000}
|
|
1
|
+
.keen-slider:not([data-keen-slider-disabled]){-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;align-content:flex-start;display:flex;overflow:hidden;position:relative;touch-action:pan-y;-webkit-user-select:none;user-select:none;-khtml-user-select:none;width:100%}.keen-slider:not([data-keen-slider-disabled]) .keen-slider__slide{min-height:100%;overflow:hidden;position:relative;width:100%}.keen-slider:not([data-keen-slider-disabled])[data-keen-slider-reverse]{flex-direction:row-reverse}.keen-slider:not([data-keen-slider-disabled])[data-keen-slider-v]{flex-wrap:wrap}.react-calendar{width:410px;background:#fff;border:none;border-radius:25px;border:1px solid #fff;box-shadow:0 12px 24px #0003;padding:8px;line-height:1.125em}.react-calendar--doubleView .react-calendar__viewContainer{display:flex;margin:-.5em}.react-calendar--doubleView .react-calendar__viewContainer>*{width:50%;margin:.5em}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{display:flex;height:50px;margin-bottom:1em}.react-calendar__month-view__weekdays__weekday{padding:.5em}.react-calendar__month-view__weekdays{text-align:center;text-transform:uppercase;font-size:.75em}.react-calendar--doubleView{width:800px}.react-calendar__month-view{padding-left:20px;padding-right:20px}.react-calendar__tile{height:50px;width:50px}.react-calendar__tile:disabled{background-color:#fff;color:#bebebe}.react-calendar__month-view__days__day--weekend,.react-calendar__month-view__days__day{color:#000}.react-calendar__month-view__days__day--neighboringMonth{visibility:hidden}.react-calendar__tile:enabled:hover,.react-calendar__tile:enabled:focus{border-radius:50%;border:1px solid;border-color:#000;background:#fff;color:#000}.react-calendar__tile--now{background:#fff;color:#000}.react-calendar__tile--now:enabled:hover,.react-calendar__tile--now:enabled:focus{border-radius:50%;border:1px solid;border-color:#000;background:#fff;color:#000}.react-calendar__tile--hasActive:enabled:hover,.react-calendar__tile--hasActive:enabled:focus{background:#f8f8fa}.react-calendar__tile--active{background:#000;border-radius:50%;color:#fff}.react-calendar__tile--rangeEnd.react-calendar__tile--active:enabled:hover,.react-calendar__tile--rangeEnd.react-calendar__tile--active:enabled:focus,.react-calendar__tile--rangeEnd:enabled{border-radius:0 50% 50% 0;border:1px solid;border-color:#000;background:#000;color:#fff}.react-calendar__tile--rangeStart.react-calendar__tile--active:enabled:hover,.react-calendar__tile--rangeStart.react-calendar__tile--active:enabled:focus,.react-calendar__tile--rangeStart:enabled{border-radius:50% 0 0 50%;border:1px solid;border-color:#000;background:#000;color:#fff}.react-calendar--selectRange .react-calendar__tile--hover{background-color:#dfdfe1}.react-calendar--selectRange .react-calendar__tile--rangeStart{background-color:#000;color:#fff}.react-calendar__tile--range{background:#dfdfe1;color:#000;border-radius:0}.react-calendar__tile--rangeStart{border-radius:50% 0 0 50%;background:#000;color:#fff}.react-calendar__tile--rangeEnd{border-radius:0 50% 50% 0;background:#000;color:#fff}.react-calendar__navigation__prev-button,.react-calendar__navigation__next-button{background:#fff}.react-calendar__navigation__prev2-button,.react-calendar__navigation__next2-button{display:none}.react-calendar__navigation__label__labelText{color:#000}.react-calendar__navigation{height:50px}.react-calendar__navigation button{color:#000;width:50px;background:none;font-size:16px}.react-calendar__navigation button:enabled:hover,.react-calendar__navigation button:enabled:focus{background-color:#bebebe;color:#000;border-radius:50%}.react-calendar__navigation button:disabled{background:#fff;color:#bebebe}abbr[title]{text-decoration:none}.react-calendar__navigation__label__divider{display:none}.react-calendar__navigation__label{padding-top:20px;display:flex;flex-grow:1;justify-content:space-between}.react-calendar__navigation__label__labelText--from{margin-left:80px}.react-calendar__navigation__label__labelText--to{margin-right:100px}button.react-calendar__tile.react-calendar__tile--active.react-calendar__tile--range.react-calendar__tile--rangeStart.react-calendar__tile--rangeEnd.react-calendar__tile--rangeBothEnds.react-calendar__tile--hover.react-calendar__tile--hoverStart.react-calendar__tile--hoverEnd.react-calendar__tile--hoverBothEnds.react-calendar__month-view__days__day.react-calendar__month-view__days__day--weekend{background-color:#000}
|