trepur_components 2.3.20 → 2.3.22
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/Button/Button.stories.d.ts +1 -0
- package/lib/components/Button/index.d.ts +1 -1
- package/lib/components/Button/index.js +17 -16
- package/lib/components/Input/Input.stories.d.ts +0 -1
- package/lib/components/Input/index.js +36 -36
- package/lib/components/Nav/index.js +78 -58
- package/lib/components/TextArea/index.js +25 -32
- package/lib/styles/themes/penrithmrt.css +6 -0
- package/lib/tailwind/colors.ts +7 -0
- 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
|
};
|
|
@@ -21,5 +21,6 @@ export declare const Default: Story;
|
|
|
21
21
|
export declare const Secondary: Story;
|
|
22
22
|
export declare const Bordered: Story;
|
|
23
23
|
export declare const Ghost: Story;
|
|
24
|
+
export declare const Basic: Story;
|
|
24
25
|
export declare const Loading: Story;
|
|
25
26
|
export declare const Link: Story;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface ButtonProps {
|
|
4
|
-
variant?: 'primary' | 'secondary' | 'ghost' | 'bordered';
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'ghost' | 'bordered' | 'basic';
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
loading?: boolean;
|
|
7
7
|
type?: 'button' | 'link';
|
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
3
|
import { Icon as m } from "../Icon/index.js";
|
|
4
4
|
import s from "clsx";
|
|
5
|
-
const g =
|
|
5
|
+
const g = n(({ children: o, ...e }) => /* @__PURE__ */ r("button", { type: "button", ...e, children: o })), h = n(({ children: o, ...e }) => /* @__PURE__ */ r("div", { className: "inline-block", children: /* @__PURE__ */ r("a", { type: "button", className: "inline-grid", ...e, children: o }) })), a = n(
|
|
6
6
|
({
|
|
7
7
|
className: o,
|
|
8
8
|
children: e,
|
|
9
9
|
loading: t = !1,
|
|
10
|
-
variant:
|
|
11
|
-
type:
|
|
12
|
-
disabled:
|
|
13
|
-
href:
|
|
14
|
-
target:
|
|
15
|
-
...
|
|
10
|
+
variant: b = "primary",
|
|
11
|
+
type: i = "button",
|
|
12
|
+
disabled: y,
|
|
13
|
+
href: d,
|
|
14
|
+
target: p,
|
|
15
|
+
...l
|
|
16
16
|
}) => /* @__PURE__ */ r(
|
|
17
|
-
|
|
17
|
+
i === "button" ? g : h,
|
|
18
18
|
{
|
|
19
|
-
href:
|
|
20
|
-
target:
|
|
19
|
+
href: d,
|
|
20
|
+
target: p,
|
|
21
21
|
disabled: t,
|
|
22
22
|
className: s(
|
|
23
23
|
"font-regular flex items-center gap-2 rounded-lg border px-8 py-3 text-center text-lg",
|
|
24
24
|
{
|
|
25
25
|
"duration-200": !t,
|
|
26
|
-
"border-button-primary-border bg-button-primary-bg text-button-primary-text hover:bg-button-primary-hover active:bg-button-primary-active":
|
|
27
|
-
"border-button-secondary-border bg-button-secondary-bg text-button-secondary-text hover:bg-button-secondary-hover active:bg-button-secondary-active":
|
|
28
|
-
"border-button-ghost-border bg-button-ghost-bg text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active":
|
|
29
|
-
"border-button-bordered-border text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active":
|
|
26
|
+
"border-button-primary-border bg-button-primary-bg text-button-primary-text hover:bg-button-primary-hover active:bg-button-primary-active": b === "primary" && !t,
|
|
27
|
+
"border-button-secondary-border bg-button-secondary-bg text-button-secondary-text hover:bg-button-secondary-hover active:bg-button-secondary-active": b === "secondary" && !t,
|
|
28
|
+
"border-button-ghost-border bg-button-ghost-bg text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active": b === "ghost" && !t,
|
|
29
|
+
"border-button-bordered-border text-button-ghost-text hover:bg-button-ghost-hover active:bg-button-ghost-active": b === "bordered" && !t,
|
|
30
|
+
"border-button-basic-border bg-button-basic-bg text-button-basic-text hover:bg-button-basic-hover active:bg-button-basic-active": b === "basic" && !t,
|
|
30
31
|
"w-40 animate-pulse border-loading bg-loading": t
|
|
31
32
|
},
|
|
32
33
|
o
|
|
@@ -34,7 +35,7 @@ const g = b(({ children: o, ...e }) => /* @__PURE__ */ r("button", { type: "butt
|
|
|
34
35
|
children: !t && e
|
|
35
36
|
}
|
|
36
37
|
)
|
|
37
|
-
), c =
|
|
38
|
+
), c = n(({ className: o, ...e }, t) => /* @__PURE__ */ r("p", { className: s("text-md", o), ref: t, ...e })), u = n(({ icon: o }, e) => /* @__PURE__ */ r(m, { size: "md", ref: e, icon: o }));
|
|
38
39
|
a.displayName = "Button";
|
|
39
40
|
u.displayName = "Button.Icon";
|
|
40
41
|
c.displayName = "Button.Label";
|
|
@@ -1,83 +1,83 @@
|
|
|
1
1
|
import { jsx as o, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as I, forwardRef as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
const
|
|
2
|
+
import { createContext as I, forwardRef as s, useMemo as b, useRef as N, useContext as i } from "react";
|
|
3
|
+
import h from "clsx";
|
|
4
|
+
const d = I(null), u = s(({ children: n, errors: t, placeholder: e, ...r }, l) => {
|
|
5
|
+
const a = b(
|
|
6
6
|
() => ({
|
|
7
7
|
errors: t,
|
|
8
8
|
placeholder: e,
|
|
9
|
-
...
|
|
9
|
+
...r
|
|
10
10
|
}),
|
|
11
|
-
[t,
|
|
11
|
+
[t, r]
|
|
12
12
|
);
|
|
13
|
-
return /* @__PURE__ */ o(
|
|
14
|
-
}),
|
|
15
|
-
({ children:
|
|
16
|
-
const
|
|
13
|
+
return /* @__PURE__ */ o(d.Provider, { value: a, children: /* @__PURE__ */ o("div", { ref: l, children: n }) });
|
|
14
|
+
}), m = s(
|
|
15
|
+
({ children: n, ...t }, e) => {
|
|
16
|
+
const r = N(null);
|
|
17
17
|
return /* @__PURE__ */ o(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
|
-
className: "mt-4 w-full
|
|
20
|
+
className: "mt-4 w-full",
|
|
21
21
|
onClick: () => {
|
|
22
22
|
var l;
|
|
23
|
-
return (l =
|
|
23
|
+
return (l = r.current) == null ? void 0 : l.focus();
|
|
24
24
|
},
|
|
25
25
|
ref: e,
|
|
26
26
|
...t,
|
|
27
|
-
children:
|
|
27
|
+
children: n
|
|
28
28
|
}
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
|
-
),
|
|
31
|
+
), p = s(({ children: n, required: t = !1 }, e) => /* @__PURE__ */ f(
|
|
32
32
|
"div",
|
|
33
33
|
{
|
|
34
34
|
ref: e,
|
|
35
|
-
className: "
|
|
35
|
+
className: "text-md flex items-center rounded-2xl px-1 font-semibold",
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */ o("p", { children:
|
|
38
|
-
t && /* @__PURE__ */ o("p", { className: "font-semiBold text-lg
|
|
37
|
+
/* @__PURE__ */ o("p", { children: n }),
|
|
38
|
+
t && /* @__PURE__ */ o("p", { className: "font-semiBold text-lg", children: " *" })
|
|
39
39
|
]
|
|
40
40
|
}
|
|
41
|
-
)),
|
|
42
|
-
({ ...
|
|
43
|
-
const { errors: t, placeholder: e } = i(
|
|
41
|
+
)), c = s(
|
|
42
|
+
({ ...n }) => {
|
|
43
|
+
const { errors: t, placeholder: e } = i(d) || {};
|
|
44
44
|
return /* @__PURE__ */ o(
|
|
45
45
|
"input",
|
|
46
46
|
{
|
|
47
47
|
placeholder: e,
|
|
48
|
-
className:
|
|
49
|
-
"text-ink text-md w-full
|
|
48
|
+
className: h(
|
|
49
|
+
"text-ink text-md w-full rounded-md border border-gray-300 bg-white py-2 pl-4",
|
|
50
50
|
{
|
|
51
51
|
"border-error border-2": t != null
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
...
|
|
54
|
+
...n
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
-
), x =
|
|
59
|
-
const { errors:
|
|
58
|
+
), x = s(({ children: n, ...t }, e) => {
|
|
59
|
+
const { errors: r } = i(d) || {};
|
|
60
60
|
return /* @__PURE__ */ o(
|
|
61
61
|
"div",
|
|
62
62
|
{
|
|
63
63
|
ref: e,
|
|
64
|
-
className: "
|
|
64
|
+
className: "text-md gap-y-2 pl-1 pt-2 font-semibold text-error-default",
|
|
65
65
|
...t,
|
|
66
|
-
children:
|
|
66
|
+
children: r == null ? void 0 : r.map((l, a) => /* @__PURE__ */ o("p", { children: l }, `error-msg-${a + 1}`))
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
u.displayName = "Input";
|
|
71
|
+
m.displayName = "Input.Item";
|
|
72
|
+
p.displayName = "Input.Label";
|
|
73
|
+
c.displayName = "Input.Box";
|
|
74
74
|
x.displayName = "Input.Validation";
|
|
75
|
-
const
|
|
76
|
-
Item:
|
|
77
|
-
Label:
|
|
78
|
-
Box:
|
|
75
|
+
const C = Object.assign(u, {
|
|
76
|
+
Item: m,
|
|
77
|
+
Label: p,
|
|
78
|
+
Box: c,
|
|
79
79
|
Validation: x
|
|
80
80
|
});
|
|
81
81
|
export {
|
|
82
|
-
|
|
82
|
+
C as Input
|
|
83
83
|
};
|
|
@@ -1,95 +1,115 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createContext as H, forwardRef as r, useState as
|
|
1
|
+
import { jsx as a, jsxs as i, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as H, forwardRef as r, useState as m, useMemo as C, useContext as p, useRef as k } from "react";
|
|
3
3
|
import { HamburgerIcon as w } from "../HamburgerIcon/index.js";
|
|
4
4
|
import { faChevronDown as M } from "@fortawesome/fontawesome-free-solid";
|
|
5
|
-
import
|
|
5
|
+
import n from "clsx";
|
|
6
6
|
import { Icon as j } from "../Icon/index.js";
|
|
7
|
-
const
|
|
8
|
-
const [
|
|
7
|
+
const c = H(null), v = r(({ className: s, children: t }, e) => {
|
|
8
|
+
const [o, d] = m(!1), l = C(
|
|
9
9
|
() => ({
|
|
10
|
-
expanded:
|
|
11
|
-
setExpanded:
|
|
10
|
+
expanded: o,
|
|
11
|
+
setExpanded: d
|
|
12
12
|
}),
|
|
13
|
-
[
|
|
13
|
+
[o, d]
|
|
14
14
|
);
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
}),
|
|
17
|
-
({ children:
|
|
15
|
+
return /* @__PURE__ */ a(c.Provider, { value: l, children: /* @__PURE__ */ a("div", { className: s, ref: e, children: t }) });
|
|
16
|
+
}), N = r(
|
|
17
|
+
({ className: s, children: t }, e) => /* @__PURE__ */ a(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
|
-
ref:
|
|
21
|
-
className:
|
|
22
|
-
children:
|
|
20
|
+
ref: e,
|
|
21
|
+
className: n("relative h-24 w-full bg-nav-bg px-2 py-2", s),
|
|
22
|
+
children: t
|
|
23
23
|
}
|
|
24
24
|
)
|
|
25
|
-
),
|
|
26
|
-
const { setExpanded:
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
25
|
+
), g = r(({ className: s, children: t }, e) => {
|
|
26
|
+
const { setExpanded: o, expanded: d } = p(c) || {};
|
|
27
|
+
return /* @__PURE__ */ i("div", { ref: e, className: n("flex h-full md:hidden", s), children: [
|
|
28
|
+
/* @__PURE__ */ a("div", { className: "my-auto", children: /* @__PURE__ */ a(
|
|
29
29
|
w,
|
|
30
30
|
{
|
|
31
31
|
variant: "ghost",
|
|
32
|
-
onClick: () =>
|
|
32
|
+
onClick: () => o == null ? void 0 : o(!d),
|
|
33
33
|
className: "aspect-square"
|
|
34
34
|
}
|
|
35
35
|
) }),
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ a("div", { className: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 transform", children: t })
|
|
37
37
|
] });
|
|
38
|
-
}),
|
|
38
|
+
}), f = r(({ className: s, children: t }, e) => /* @__PURE__ */ a(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
|
-
ref:
|
|
42
|
-
className:
|
|
43
|
-
|
|
41
|
+
ref: e,
|
|
42
|
+
className: n(
|
|
43
|
+
"hidden justify-between md:flex md:gap-4 md:px-4 lg:gap-8 lg:px-20",
|
|
44
|
+
s
|
|
45
|
+
),
|
|
46
|
+
children: t
|
|
44
47
|
}
|
|
45
|
-
)),
|
|
46
|
-
({ children:
|
|
47
|
-
const { expanded:
|
|
48
|
-
return
|
|
48
|
+
)), u = r(
|
|
49
|
+
({ className: s, children: t }, e) => {
|
|
50
|
+
const { expanded: o } = p(c) || {};
|
|
51
|
+
return o ? /* @__PURE__ */ a(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: e,
|
|
55
|
+
className: n(
|
|
56
|
+
"h-screen bg-nav-bg px-8 pb-12 pt-2 md:hidden",
|
|
57
|
+
s
|
|
58
|
+
),
|
|
59
|
+
children: /* @__PURE__ */ a("div", { className: "grid grid-cols-1 gap-4 md:hidden", children: t })
|
|
60
|
+
}
|
|
61
|
+
) : /* @__PURE__ */ a(y, {});
|
|
49
62
|
}
|
|
50
|
-
),
|
|
51
|
-
({ children:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
63
|
+
), x = r(
|
|
64
|
+
({ className: s, children: t }, e) => /* @__PURE__ */ a(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
ref: e,
|
|
68
|
+
className: n("my-4 md:flex md:gap-4 lg:gap-8", s),
|
|
69
|
+
children: t
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
), h = r(({ label: s, children: t, active: e = !1 }) => {
|
|
73
|
+
const [o, d] = m(!1), l = k(null);
|
|
74
|
+
return /* @__PURE__ */ i(
|
|
55
75
|
"div",
|
|
56
76
|
{
|
|
57
|
-
ref:
|
|
77
|
+
ref: l,
|
|
58
78
|
onClick: () => d(!0),
|
|
59
79
|
onMouseLeave: () => d(!1),
|
|
60
|
-
className:
|
|
80
|
+
className: n(
|
|
61
81
|
"relative m-auto text-xl tracking-wider text-nav-text hover:cursor-pointer",
|
|
62
82
|
{
|
|
63
|
-
"font-bold":
|
|
64
|
-
"font-normal": !
|
|
83
|
+
"font-bold": e,
|
|
84
|
+
"font-normal": !e
|
|
65
85
|
}
|
|
66
86
|
),
|
|
67
87
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-px ", children: [
|
|
89
|
+
/* @__PURE__ */ a("p", { children: s }),
|
|
90
|
+
/* @__PURE__ */ a(j, { icon: M })
|
|
71
91
|
] }),
|
|
72
|
-
o && /* @__PURE__ */
|
|
92
|
+
o && /* @__PURE__ */ a("div", { className: "absolute -left-5 top-7 z-50 w-40 bg-nav-bg", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-1 gap-y-2 bg-nav-bg px-4 py-4", children: t }) })
|
|
73
93
|
]
|
|
74
94
|
}
|
|
75
95
|
);
|
|
76
|
-
}),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
const R = Object.assign(
|
|
86
|
-
Header:
|
|
87
|
-
DesktopHeader:
|
|
88
|
-
MobileHeader:
|
|
89
|
-
Section:
|
|
90
|
-
Logo:
|
|
91
|
-
Body:
|
|
92
|
-
Folder:
|
|
96
|
+
}), b = r(({ className: s, src: t, ...e }, o) => /* @__PURE__ */ a("img", { className: n("h-20", s), ref: o, src: t, ...e }));
|
|
97
|
+
v.displayName = "Nav";
|
|
98
|
+
N.displayName = "Nav.Header";
|
|
99
|
+
f.displayName = "Nav.DesktopHeader";
|
|
100
|
+
g.displayName = "Nav.MobileHeader";
|
|
101
|
+
b.displayName = "Nav.Logo";
|
|
102
|
+
x.displayName = "Nav.Section";
|
|
103
|
+
u.displayName = "Nav.Body";
|
|
104
|
+
h.displayName = "Nav.Folder";
|
|
105
|
+
const R = Object.assign(v, {
|
|
106
|
+
Header: N,
|
|
107
|
+
DesktopHeader: f,
|
|
108
|
+
MobileHeader: g,
|
|
109
|
+
Section: x,
|
|
110
|
+
Logo: b,
|
|
111
|
+
Body: u,
|
|
112
|
+
Folder: h
|
|
93
113
|
});
|
|
94
114
|
export {
|
|
95
115
|
R as Nav
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as f } from "react/jsx-runtime";
|
|
2
|
-
import { createContext as
|
|
3
|
-
const
|
|
4
|
-
const s =
|
|
2
|
+
import { createContext as A, forwardRef as o, useMemo as T, useRef as N, useContext as x } from "react";
|
|
3
|
+
const d = A(null), i = o(({ children: l, errors: e, placeholder: t, ...r }, n) => {
|
|
4
|
+
const s = T(
|
|
5
5
|
() => ({
|
|
6
6
|
errors: e,
|
|
7
7
|
placeholder: t,
|
|
@@ -9,68 +9,61 @@ const i = b(null), x = n(({ children: o, errors: e, placeholder: t, ...r }, l) =
|
|
|
9
9
|
}),
|
|
10
10
|
[e, r]
|
|
11
11
|
);
|
|
12
|
-
return /* @__PURE__ */ a(
|
|
13
|
-
}), c =
|
|
14
|
-
({ children:
|
|
15
|
-
const r =
|
|
12
|
+
return /* @__PURE__ */ a(d.Provider, { value: s, children: /* @__PURE__ */ a("div", { ref: n, children: l }) });
|
|
13
|
+
}), c = o(
|
|
14
|
+
({ children: l, ...e }, t) => {
|
|
15
|
+
const r = N(null);
|
|
16
16
|
return /* @__PURE__ */ a(
|
|
17
17
|
"div",
|
|
18
18
|
{
|
|
19
|
-
className: "mt-4 w-full
|
|
19
|
+
className: "mt-4 w-full",
|
|
20
20
|
onClick: () => {
|
|
21
|
-
var
|
|
22
|
-
return (
|
|
21
|
+
var n;
|
|
22
|
+
return (n = r.current) == null ? void 0 : n.focus();
|
|
23
23
|
},
|
|
24
24
|
ref: t,
|
|
25
25
|
...e,
|
|
26
|
-
children:
|
|
26
|
+
children: l
|
|
27
27
|
}
|
|
28
28
|
);
|
|
29
29
|
}
|
|
30
|
-
), m =
|
|
31
|
-
"
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
/* @__PURE__ */ a("p", { children: o }),
|
|
37
|
-
e && /* @__PURE__ */ a("p", { className: "font-semiBold text-lg text-error-default", children: " *" })
|
|
38
|
-
]
|
|
39
|
-
}
|
|
40
|
-
)), u = n(
|
|
41
|
-
({ ...o }) => {
|
|
42
|
-
const { errors: e, placeholder: t } = d(i) || {};
|
|
30
|
+
), m = o(({ children: l, required: e = !1 }, t) => /* @__PURE__ */ f("div", { ref: t, className: "font-regular text-md flex rounded-2xl px-1", children: [
|
|
31
|
+
/* @__PURE__ */ a("p", { children: l }),
|
|
32
|
+
e && /* @__PURE__ */ a("p", { className: "font-semiBold text-lg", children: " *" })
|
|
33
|
+
] })), u = o(
|
|
34
|
+
({ ...l }) => {
|
|
35
|
+
const { errors: e, placeholder: t } = x(d) || {};
|
|
43
36
|
return /* @__PURE__ */ a(
|
|
44
37
|
"textarea",
|
|
45
38
|
{
|
|
46
|
-
className: "text-ink text-md w-full
|
|
39
|
+
className: "text-ink text-md w-full rounded-md border border-gray-300 py-2 pl-4",
|
|
47
40
|
placeholder: t
|
|
48
41
|
}
|
|
49
42
|
);
|
|
50
43
|
}
|
|
51
|
-
), p =
|
|
52
|
-
const { errors: r } = d
|
|
44
|
+
), p = o(({ children: l, ...e }, t) => {
|
|
45
|
+
const { errors: r } = x(d) || {};
|
|
53
46
|
return /* @__PURE__ */ a(
|
|
54
47
|
"div",
|
|
55
48
|
{
|
|
56
49
|
ref: t,
|
|
57
|
-
className: "
|
|
50
|
+
className: "text-md gap-y-2 font-semibold text-error-default",
|
|
58
51
|
...e,
|
|
59
|
-
children: r == null ? void 0 : r.map((
|
|
52
|
+
children: r == null ? void 0 : r.map((n, s) => /* @__PURE__ */ a("p", { children: n }, `error-msg-${s + 1}`))
|
|
60
53
|
}
|
|
61
54
|
);
|
|
62
55
|
});
|
|
63
|
-
|
|
56
|
+
i.displayName = "TextArea";
|
|
64
57
|
c.displayName = "TextArea.Item";
|
|
65
58
|
m.displayName = "TextArea.Label";
|
|
66
59
|
u.displayName = "TextArea.Box";
|
|
67
60
|
p.displayName = "TextArea.Validation";
|
|
68
|
-
const
|
|
61
|
+
const h = Object.assign(i, {
|
|
69
62
|
Item: c,
|
|
70
63
|
Label: m,
|
|
71
64
|
Box: u,
|
|
72
65
|
Validation: p
|
|
73
66
|
});
|
|
74
67
|
export {
|
|
75
|
-
|
|
68
|
+
h as TextArea
|
|
76
69
|
};
|
|
@@ -71,6 +71,12 @@ body.theme-penrithmrt {
|
|
|
71
71
|
--color-button-bordered-text: #000000;
|
|
72
72
|
--color-button-bordered-hover: #5f5f5f;
|
|
73
73
|
|
|
74
|
+
--color-button-basic-active: #acacac;
|
|
75
|
+
--color-button-basic-border: #ffffff;
|
|
76
|
+
--color-button-basic-bg: #ffffff;
|
|
77
|
+
--color-button-basic-text: #3C2F71;
|
|
78
|
+
--color-button-basic-hover: #cecece;
|
|
79
|
+
|
|
74
80
|
/* Footer */
|
|
75
81
|
--color-footer-bg: #1b54c6;
|
|
76
82
|
--color-footer-text: #ffffff;
|
package/lib/tailwind/colors.ts
CHANGED
|
@@ -61,6 +61,13 @@ export default {
|
|
|
61
61
|
text: 'var(--color-button-bordered-text)',
|
|
62
62
|
hover: 'var(--color-button-bordered-hover)',
|
|
63
63
|
},
|
|
64
|
+
basic: {
|
|
65
|
+
active: 'var(--color-button-basic-active)',
|
|
66
|
+
border: 'var(--color-button-basic-border)',
|
|
67
|
+
bg: 'var(--color-button-basic-bg)',
|
|
68
|
+
text: 'var(--color-button-basic-text)',
|
|
69
|
+
hover: 'var(--color-button-basic-hover)',
|
|
70
|
+
},
|
|
64
71
|
},
|
|
65
72
|
tubestop: {
|
|
66
73
|
station: {
|