trepur_components 2.3.12 → 2.3.14
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/Button/index.js +3 -3
- package/lib/components/Nav/index.js +36 -36
- package/lib/components/NavItem/index.js +1 -1
- package/lib/components/SplitCard/SplitCard.stories.d.ts +2 -4
- package/lib/components/SplitCard/index.js +20 -20
- package/lib/styles/themes/penrithmrt.css +2 -1
- package/lib/tailwind/colors.ts +3 -0
- package/package.json +1 -1
|
@@ -15,7 +15,7 @@ const a = n(
|
|
|
15
15
|
{
|
|
16
16
|
disabled: t,
|
|
17
17
|
className: s(
|
|
18
|
-
"flex
|
|
18
|
+
"flex items-center gap-2 rounded-lg border px-8 py-3 text-center text-lg font-thin",
|
|
19
19
|
{
|
|
20
20
|
"duration-200": !t,
|
|
21
21
|
"border-button-primary-border bg-button-primary-bg text-button-primary-text hover:bg-button-primary-hover active:bg-button-primary-active": r === "primary" && !t,
|
|
@@ -34,10 +34,10 @@ const a = n(
|
|
|
34
34
|
a.displayName = "Button";
|
|
35
35
|
c.displayName = "Button.Icon";
|
|
36
36
|
u.displayName = "Button.Label";
|
|
37
|
-
const
|
|
37
|
+
const x = Object.assign(a, {
|
|
38
38
|
Icon: c,
|
|
39
39
|
Label: u
|
|
40
40
|
});
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
x as Button
|
|
43
43
|
};
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { createContext as y, forwardRef as
|
|
1
|
+
import { jsx as e, jsxs as d, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as y, forwardRef as o, useState as c, useMemo as b, useContext as m, useRef as C } from "react";
|
|
3
3
|
import { HamburgerIcon as H } from "../HamburgerIcon/index.js";
|
|
4
4
|
import { faChevronDown as k } from "@fortawesome/fontawesome-free-solid";
|
|
5
5
|
import p from "clsx";
|
|
6
6
|
import { Icon as w } from "../Icon/index.js";
|
|
7
|
-
const l = y(null), v =
|
|
8
|
-
const [
|
|
7
|
+
const l = y(null), v = o(({ children: a }, s) => {
|
|
8
|
+
const [r, t] = c(!1), n = b(
|
|
9
9
|
() => ({
|
|
10
|
-
expanded:
|
|
11
|
-
setExpanded:
|
|
10
|
+
expanded: r,
|
|
11
|
+
setExpanded: t
|
|
12
12
|
}),
|
|
13
|
-
[
|
|
13
|
+
[r, t]
|
|
14
14
|
);
|
|
15
|
-
return /* @__PURE__ */ e(l.Provider, { value:
|
|
16
|
-
}), N =
|
|
17
|
-
const { setExpanded:
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
15
|
+
return /* @__PURE__ */ e(l.Provider, { value: n, children: /* @__PURE__ */ e("div", { children: a }) });
|
|
16
|
+
}), N = o(({ children: a, logo: s }, r) => {
|
|
17
|
+
const { setExpanded: t, expanded: n } = m(l) || {};
|
|
18
|
+
return /* @__PURE__ */ d("div", { ref: r, className: p("relative h-24 w-full bg-nav-bg px-2 py-2"), children: [
|
|
19
|
+
/* @__PURE__ */ d("div", { className: "flex h-full md:hidden", children: [
|
|
20
20
|
/* @__PURE__ */ e("div", { className: "my-auto", children: /* @__PURE__ */ e(
|
|
21
21
|
H,
|
|
22
22
|
{
|
|
23
|
-
onClick: () =>
|
|
23
|
+
onClick: () => t == null ? void 0 : t(!n),
|
|
24
24
|
className: "aspect-square"
|
|
25
25
|
}
|
|
26
26
|
) }),
|
|
27
|
-
/* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: /* @__PURE__ */ e(i, { src:
|
|
27
|
+
/* @__PURE__ */ e("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: /* @__PURE__ */ e(i, { src: s }) })
|
|
28
28
|
] }),
|
|
29
29
|
a
|
|
30
30
|
] });
|
|
31
|
-
}),
|
|
32
|
-
({ children: a },
|
|
33
|
-
const { expanded:
|
|
34
|
-
return
|
|
31
|
+
}), g = o(
|
|
32
|
+
({ children: a }, s) => {
|
|
33
|
+
const { expanded: r } = m(l) || {};
|
|
34
|
+
return r ? /* @__PURE__ */ e("div", { className: "h-screen bg-nav-bg px-8 pb-12 pt-2 md:hidden", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 md:hidden", children: a }) }) : /* @__PURE__ */ e(h, {});
|
|
35
35
|
}
|
|
36
|
-
),
|
|
36
|
+
), f = o(({ children: a }, s) => /* @__PURE__ */ e(
|
|
37
37
|
"div",
|
|
38
38
|
{
|
|
39
|
-
ref:
|
|
39
|
+
ref: s,
|
|
40
40
|
className: "hidden justify-between md:flex md:gap-4 md:px-4 lg:gap-8 lg:px-20",
|
|
41
41
|
children: a
|
|
42
42
|
}
|
|
43
|
-
)), x =
|
|
44
|
-
({ children: a },
|
|
45
|
-
), u =
|
|
46
|
-
const [
|
|
47
|
-
return /* @__PURE__ */
|
|
43
|
+
)), x = o(
|
|
44
|
+
({ children: a }, s) => /* @__PURE__ */ e("div", { ref: s, className: "my-4 md:flex md:gap-4 lg:gap-8", children: a })
|
|
45
|
+
), u = o(({ label: a, children: s }) => {
|
|
46
|
+
const [r, t] = c(!1), n = C(null);
|
|
47
|
+
return /* @__PURE__ */ d(
|
|
48
48
|
"div",
|
|
49
49
|
{
|
|
50
|
-
ref:
|
|
51
|
-
onClick: () =>
|
|
52
|
-
onMouseLeave: () =>
|
|
53
|
-
className: "
|
|
50
|
+
ref: n,
|
|
51
|
+
onClick: () => t(!0),
|
|
52
|
+
onMouseLeave: () => t(!1),
|
|
53
|
+
className: "relative m-auto text-xl font-normal tracking-wider text-nav-text hover:cursor-pointer",
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-px ", children: [
|
|
56
56
|
/* @__PURE__ */ e("p", { children: a }),
|
|
57
57
|
/* @__PURE__ */ e(w, { icon: k })
|
|
58
58
|
] }),
|
|
59
|
-
|
|
59
|
+
r && /* @__PURE__ */ e("div", { className: "absolute -left-5 top-7 w-28 bg-nav-bg", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-y-2 bg-nav-bg px-4 py-4", children: s }) })
|
|
60
60
|
]
|
|
61
61
|
}
|
|
62
62
|
);
|
|
63
|
-
}), i =
|
|
63
|
+
}), i = o(({ className: a, src: s, ...r }, t) => /* @__PURE__ */ e("img", { className: p("h-20", a), ref: t, src: s, ...r }));
|
|
64
64
|
v.displayName = "Nav";
|
|
65
65
|
N.displayName = "Nav.Header";
|
|
66
|
-
|
|
66
|
+
f.displayName = "Nav.DesktopHeader";
|
|
67
67
|
i.displayName = "Nav.Logo";
|
|
68
68
|
x.displayName = "Nav.Section";
|
|
69
|
-
|
|
69
|
+
g.displayName = "Nav.Body";
|
|
70
70
|
u.displayName = "Nav.Folder";
|
|
71
71
|
const I = Object.assign(v, {
|
|
72
72
|
Header: N,
|
|
73
|
-
DesktopHeader:
|
|
73
|
+
DesktopHeader: f,
|
|
74
74
|
Section: x,
|
|
75
75
|
Logo: i,
|
|
76
|
-
Body:
|
|
76
|
+
Body: g,
|
|
77
77
|
Folder: u
|
|
78
78
|
});
|
|
79
79
|
export {
|
|
@@ -7,7 +7,7 @@ const n = o(({ children: t, className: e, href: a, ...m }, l) => /* @__PURE__ */
|
|
|
7
7
|
href: a,
|
|
8
8
|
ref: l,
|
|
9
9
|
className: f(
|
|
10
|
-
"
|
|
10
|
+
"m-auto h-8 py-0 text-nav-text after:block after:scale-x-0 after:border-b-4 after:border-nav-text after:transition-all after:duration-300 after:ease-in-out hover:cursor-pointer hover:after:scale-x-100",
|
|
11
11
|
e
|
|
12
12
|
),
|
|
13
13
|
...m,
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { SplitCard } from '.';
|
|
2
1
|
import { StoryObj } from '@storybook/react';
|
|
2
|
+
import { SplitCard } from './';
|
|
3
3
|
|
|
4
4
|
declare const meta: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('
|
|
6
|
+
component: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('./').SplitCardContextProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
7
7
|
LeftContent: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
8
8
|
RightContent: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
9
|
Title: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
10
10
|
Text: import('react').ForwardRefExoticComponent<import('react').HTMLAttributes<HTMLParagraphElement> & import('react').RefAttributes<HTMLParagraphElement>>;
|
|
11
11
|
};
|
|
12
12
|
args: {
|
|
13
|
-
className: string;
|
|
14
13
|
swapDesktop: true;
|
|
15
|
-
swapMobile: true;
|
|
16
14
|
children: import("react/jsx-runtime").JSX.Element[];
|
|
17
15
|
};
|
|
18
16
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as g, forwardRef as l, useMemo as
|
|
3
|
-
import
|
|
2
|
+
import { createContext as g, forwardRef as l, useMemo as N, useContext as p } from "react";
|
|
3
|
+
import h from "../../utils/matchMedia.js";
|
|
4
4
|
import { Screens as M } from "../../utils/screens.js";
|
|
5
5
|
import a from "clsx";
|
|
6
|
-
const
|
|
7
|
-
const S = `(min-width: ${M.md})`,
|
|
6
|
+
const m = g(null), x = l(({ id: i, className: e, children: r, swapDesktop: t, swapMobile: n, ...o }, d) => {
|
|
7
|
+
const S = `(min-width: ${M.md})`, c = h(S), u = N(
|
|
8
8
|
() => ({
|
|
9
9
|
swapDesktop: t,
|
|
10
10
|
swapMobile: n,
|
|
11
|
-
isMd:
|
|
11
|
+
isMd: c
|
|
12
12
|
}),
|
|
13
|
-
[t, n,
|
|
13
|
+
[t, n, c]
|
|
14
14
|
);
|
|
15
|
-
return /* @__PURE__ */ s(
|
|
15
|
+
return /* @__PURE__ */ s(m.Provider, { value: u, children: /* @__PURE__ */ s(
|
|
16
16
|
"div",
|
|
17
17
|
{
|
|
18
18
|
ref: d,
|
|
@@ -21,15 +21,15 @@ const c = g(null), C = l(({ id: i, className: e, children: r, swapDesktop: t, sw
|
|
|
21
21
|
children: r
|
|
22
22
|
}
|
|
23
23
|
) });
|
|
24
|
-
}),
|
|
25
|
-
const { swapDesktop: n, swapMobile: o, isMd: d } = p(
|
|
24
|
+
}), C = l(({ className: i, children: e, ...r }, t) => {
|
|
25
|
+
const { swapDesktop: n, swapMobile: o, isMd: d } = p(m) || {};
|
|
26
26
|
return /* @__PURE__ */ s(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
29
|
ref: t,
|
|
30
30
|
...r,
|
|
31
31
|
className: a(
|
|
32
|
-
"flex
|
|
32
|
+
"mx-auto flex items-center p-8 py-12 text-center md:p-12 lg:p-20",
|
|
33
33
|
{
|
|
34
34
|
"md:order-last": n,
|
|
35
35
|
"order-last": !d && o
|
|
@@ -39,15 +39,15 @@ const c = g(null), C = l(({ id: i, className: e, children: r, swapDesktop: t, sw
|
|
|
39
39
|
children: e
|
|
40
40
|
}
|
|
41
41
|
);
|
|
42
|
-
}),
|
|
43
|
-
const { swapDesktop: n, swapMobile: o, isMd: d } = p(
|
|
42
|
+
}), f = l(({ className: i, children: e, ...r }, t) => {
|
|
43
|
+
const { swapDesktop: n, swapMobile: o, isMd: d } = p(m) || {};
|
|
44
44
|
return /* @__PURE__ */ s(
|
|
45
45
|
"div",
|
|
46
46
|
{
|
|
47
47
|
ref: t,
|
|
48
48
|
...r,
|
|
49
49
|
className: a(
|
|
50
|
-
"flex h-full items-center text-center",
|
|
50
|
+
"flex h-full items-center p-8 text-center md:p-12 lg:p-20",
|
|
51
51
|
{
|
|
52
52
|
"md:order-first": n,
|
|
53
53
|
"order-first": !d && o
|
|
@@ -62,19 +62,19 @@ const c = g(null), C = l(({ id: i, className: e, children: r, swapDesktop: t, sw
|
|
|
62
62
|
{
|
|
63
63
|
ref: t,
|
|
64
64
|
className: a(
|
|
65
|
-
"items-center text-6xl font-semibold tracking-wider",
|
|
65
|
+
"items-center text-6xl font-semibold tracking-wider md:text-4xl lg:text-6xl",
|
|
66
66
|
i
|
|
67
67
|
),
|
|
68
68
|
...r,
|
|
69
69
|
children: e
|
|
70
70
|
}
|
|
71
71
|
)), w = l(({ className: i, children: e, ...r }, t) => /* @__PURE__ */ s("p", { ref: t, className: a("text-lg", i), ...r, children: e }));
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const k = Object.assign(
|
|
76
|
-
LeftContent:
|
|
77
|
-
RightContent:
|
|
72
|
+
x.displayName = "SplitCard";
|
|
73
|
+
C.displayName = "SplitCard.LeftContent";
|
|
74
|
+
f.displayName = "SplitCard.RightContent";
|
|
75
|
+
const k = Object.assign(x, {
|
|
76
|
+
LeftContent: C,
|
|
77
|
+
RightContent: f,
|
|
78
78
|
Title: v,
|
|
79
79
|
Text: w
|
|
80
80
|
});
|
package/lib/tailwind/colors.ts
CHANGED