@npm_leadtech/legal-contracts-ui 0.101.1 → 0.101.2
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/dist/components/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox.js +7 -7
- package/dist/components/ContactFormSection.d.ts +1 -0
- package/dist/components/ContactFormSection.js +58 -123
- package/dist/components/ContactUsTemplate.d.ts +1 -0
- package/dist/components/Input.d.ts +1 -0
- package/dist/components/Input.js +34 -27
- package/dist/components/Select.d.ts +1 -0
- package/dist/components/Select.js +26 -19
- package/dist/components/Textarea.d.ts +1 -0
- package/dist/components/Textarea.js +29 -22
- package/dist/components/Toast.js +1 -1
- package/dist/components/index.d.ts +5 -0
- package/dist/globals.css +1 -1
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import c from "clsx";
|
|
3
|
-
const
|
|
3
|
+
const m = ({ id: r, name: o, required: t = !1, children: s, error: i = !1, ...l }) => /* @__PURE__ */ a("label", { className: "text-medium flex items-center gap-3 text-neutral-800", children: [
|
|
4
4
|
/* @__PURE__ */ e(
|
|
5
5
|
"input",
|
|
6
6
|
{
|
|
7
7
|
id: r,
|
|
8
8
|
type: "checkbox",
|
|
9
|
-
name:
|
|
10
|
-
required:
|
|
9
|
+
name: o,
|
|
10
|
+
required: t,
|
|
11
11
|
className: c(
|
|
12
|
-
"text-primary-700
|
|
13
|
-
|
|
12
|
+
"text-primary-700 h-5 w-5 rounded border focus-visible:outline-2",
|
|
13
|
+
i ? "border-error-500 focus-visible:outline-error-500" : "focus-visible:outline-primary-500 border-neutral-400"
|
|
14
14
|
),
|
|
15
|
-
...
|
|
15
|
+
...l
|
|
16
16
|
}
|
|
17
17
|
),
|
|
18
18
|
/* @__PURE__ */ e("span", { children: s })
|
|
19
19
|
] });
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
m as Checkbox
|
|
22
22
|
};
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Textarea as
|
|
3
|
-
import { Checkbox as
|
|
4
|
-
import { Input as
|
|
5
|
-
import { Select as
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Textarea as b } from "./Textarea.js";
|
|
3
|
+
import { Checkbox as g } from "./Checkbox.js";
|
|
4
|
+
import { Input as n } from "./Input.js";
|
|
5
|
+
import { Select as v } from "./Select.js";
|
|
6
6
|
import { Markdown as w } from "./Markdown.js";
|
|
7
7
|
import { InfoIcon as y } from "./InfoIcon.js";
|
|
8
|
-
import { Button as
|
|
9
|
-
const
|
|
10
|
-
title:
|
|
11
|
-
subjectOptions:
|
|
12
|
-
fullNameField:
|
|
13
|
-
emailField:
|
|
14
|
-
referenceNumberField:
|
|
15
|
-
subjectField:
|
|
16
|
-
messageField:
|
|
17
|
-
privacyField:
|
|
18
|
-
requiredFieldsText:
|
|
19
|
-
securityHint:
|
|
20
|
-
status:
|
|
21
|
-
successFeedback:
|
|
22
|
-
errorFeedback:
|
|
23
|
-
onSubmit:
|
|
24
|
-
button:
|
|
25
|
-
}) =>
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children:
|
|
8
|
+
import { Button as j } from "./Button.js";
|
|
9
|
+
const q = ({
|
|
10
|
+
title: l,
|
|
11
|
+
subjectOptions: m,
|
|
12
|
+
fullNameField: o,
|
|
13
|
+
emailField: c,
|
|
14
|
+
referenceNumberField: p,
|
|
15
|
+
subjectField: h,
|
|
16
|
+
messageField: u,
|
|
17
|
+
privacyField: s,
|
|
18
|
+
requiredFieldsText: x,
|
|
19
|
+
securityHint: f,
|
|
20
|
+
status: d = "default",
|
|
21
|
+
successFeedback: r,
|
|
22
|
+
errorFeedback: a,
|
|
23
|
+
onSubmit: N,
|
|
24
|
+
button: i
|
|
25
|
+
}) => d === "success" ? /* @__PURE__ */ t("section", { className: "rounded-sm bg-white p-8 shadow-sm", children: [
|
|
26
|
+
/* @__PURE__ */ t("div", { className: "space-y-4", children: [
|
|
27
|
+
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children: l }),
|
|
28
28
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200", "aria-hidden": "true" })
|
|
29
29
|
] }),
|
|
30
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ t(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
role: "status",
|
|
34
34
|
"aria-live": "polite",
|
|
35
35
|
className: "mt-6 rounded border border-green-300 bg-green-50 px-4 py-3 text-green-900",
|
|
36
36
|
children: [
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */ e("p", { children:
|
|
39
|
-
|
|
37
|
+
r?.title && /* @__PURE__ */ e("p", { className: "text-medium mb-1 font-bold", children: r.title }),
|
|
38
|
+
/* @__PURE__ */ e("p", { children: r?.message }),
|
|
39
|
+
r?.cta != null && /* @__PURE__ */ e("div", { className: "mt-2", children: r.cta })
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
)
|
|
43
|
-
] }) :
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children:
|
|
43
|
+
] }) : d === "error" ? /* @__PURE__ */ t("section", { className: "rounded-sm bg-white p-8 shadow-sm", children: [
|
|
44
|
+
/* @__PURE__ */ t("div", { className: "space-y-4", children: [
|
|
45
|
+
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children: l }),
|
|
46
46
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200", "aria-hidden": "true" })
|
|
47
47
|
] }),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ t(
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
role: "alert",
|
|
52
52
|
"aria-live": "assertive",
|
|
53
53
|
className: "mt-6 rounded border border-red-300 bg-red-50 px-4 py-3 text-red-800",
|
|
54
54
|
children: [
|
|
55
|
-
|
|
56
|
-
/* @__PURE__ */ e("p", { children:
|
|
57
|
-
|
|
55
|
+
a?.title && /* @__PURE__ */ e("p", { className: "text-medium mb-1 font-bold", children: a.title }),
|
|
56
|
+
/* @__PURE__ */ e("p", { children: a?.message }),
|
|
57
|
+
a?.cta != null && /* @__PURE__ */ e("div", { className: "mt-2", children: a.cta })
|
|
58
58
|
]
|
|
59
59
|
}
|
|
60
60
|
)
|
|
61
|
-
] }) :
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children:
|
|
61
|
+
] }) : d === "loading" ? /* @__PURE__ */ t("section", { className: "rounded-sm bg-white p-8 shadow-sm", children: [
|
|
62
|
+
/* @__PURE__ */ t("div", { className: "space-y-4", children: [
|
|
63
|
+
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children: l }),
|
|
64
64
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200", "aria-hidden": "true" })
|
|
65
65
|
] }),
|
|
66
66
|
/* @__PURE__ */ e(
|
|
@@ -72,108 +72,43 @@ const _ = ({
|
|
|
72
72
|
children: /* @__PURE__ */ e("div", { className: "border-primary-500 h-[25px] w-[25px] animate-spin rounded-full border-3 border-t-transparent" })
|
|
73
73
|
}
|
|
74
74
|
)
|
|
75
|
-
] }) : /* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children:
|
|
75
|
+
] }) : /* @__PURE__ */ t("section", { className: "rounded-sm bg-white p-8 shadow-sm", children: [
|
|
76
|
+
/* @__PURE__ */ t("div", { className: "space-y-4", children: [
|
|
77
|
+
/* @__PURE__ */ e("p", { className: "text-big font-bold text-neutral-600", children: l }),
|
|
78
78
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-neutral-200", "aria-hidden": "true" })
|
|
79
79
|
] }),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
90
|
-
/* @__PURE__ */ e(
|
|
91
|
-
p,
|
|
92
|
-
{
|
|
93
|
-
label: a.label,
|
|
94
|
-
id: a.id,
|
|
95
|
-
name: a.name,
|
|
96
|
-
type: "text",
|
|
97
|
-
placeholder: a.placeholder,
|
|
98
|
-
tooltip: a.tooltip,
|
|
99
|
-
required: a.required,
|
|
100
|
-
value: a.value,
|
|
101
|
-
onChange: a.onChange,
|
|
102
|
-
error: !!a.errorMessage
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
a.errorMessage && /* @__PURE__ */ e("p", { id: `${a.id}-error-message`, className: "text-small text-red-700", children: a.errorMessage })
|
|
106
|
-
] }),
|
|
107
|
-
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
-
M,
|
|
110
|
-
{
|
|
111
|
-
label: t.label,
|
|
112
|
-
id: t.id,
|
|
113
|
-
name: t.name,
|
|
114
|
-
placeholder: t.placeholder,
|
|
115
|
-
options: x,
|
|
116
|
-
required: t.required,
|
|
117
|
-
value: t.value,
|
|
118
|
-
onChange: t.onChange,
|
|
119
|
-
error: !!t.errorMessage
|
|
120
|
-
}
|
|
121
|
-
),
|
|
122
|
-
t.errorMessage && /* @__PURE__ */ e("p", { id: `${t.id}-error-message`, className: "text-small text-red-700", children: t.errorMessage })
|
|
123
|
-
] }),
|
|
124
|
-
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
125
|
-
/* @__PURE__ */ e(
|
|
126
|
-
N,
|
|
127
|
-
{
|
|
128
|
-
label: s.label,
|
|
129
|
-
id: s.id,
|
|
130
|
-
name: s.name,
|
|
131
|
-
placeholder: s.placeholder,
|
|
132
|
-
required: s.required,
|
|
133
|
-
value: s.value,
|
|
134
|
-
onChange: s.onChange,
|
|
135
|
-
error: !!s.errorMessage
|
|
136
|
-
}
|
|
137
|
-
),
|
|
138
|
-
s.errorMessage && /* @__PURE__ */ e("p", { id: `${s.id}-error-message`, className: "text-small text-red-700", children: s.errorMessage })
|
|
139
|
-
] }),
|
|
140
|
-
/* @__PURE__ */ e("p", { className: "text-medium text-neutral-600", children: g }),
|
|
141
|
-
/* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ e(
|
|
142
|
-
f,
|
|
143
|
-
{
|
|
144
|
-
id: l.id,
|
|
145
|
-
name: l.name,
|
|
146
|
-
required: l.required,
|
|
147
|
-
checked: l.checked,
|
|
148
|
-
onChange: l.onChange,
|
|
149
|
-
error: !!l.errorMessage,
|
|
150
|
-
children: /* @__PURE__ */ e(w, { className: "text-medium [&_p:last-child]:mb-0", content: l.label })
|
|
151
|
-
}
|
|
152
|
-
) }),
|
|
153
|
-
/* @__PURE__ */ r(
|
|
80
|
+
/* @__PURE__ */ t("form", { className: "mt-6 flex flex-col gap-6", noValidate: !0, onSubmit: N, children: [
|
|
81
|
+
/* @__PURE__ */ e(n, { ...o, type: "text" }),
|
|
82
|
+
/* @__PURE__ */ e(n, { ...c, type: "email" }),
|
|
83
|
+
/* @__PURE__ */ e(n, { ...p }),
|
|
84
|
+
/* @__PURE__ */ e(v, { ...h, options: m }),
|
|
85
|
+
/* @__PURE__ */ e(b, { ...u }),
|
|
86
|
+
/* @__PURE__ */ e("p", { className: "text-medium text-neutral-600", children: x }),
|
|
87
|
+
/* @__PURE__ */ e(g, { ...s, children: /* @__PURE__ */ e(w, { className: "text-medium [&_p:last-child]:mb-0", content: s.label }) }),
|
|
88
|
+
/* @__PURE__ */ t(
|
|
154
89
|
"div",
|
|
155
90
|
{
|
|
156
91
|
id: "security-hint",
|
|
157
92
|
className: "text-small flex items-start gap-2 rounded bg-neutral-50 p-4 text-neutral-600",
|
|
158
93
|
children: [
|
|
159
94
|
/* @__PURE__ */ e(y, { width: 24, height: 24, "aria-hidden": "true" }),
|
|
160
|
-
/* @__PURE__ */ e("p", { children:
|
|
95
|
+
/* @__PURE__ */ e("p", { children: f })
|
|
161
96
|
]
|
|
162
97
|
}
|
|
163
98
|
),
|
|
164
99
|
/* @__PURE__ */ e(
|
|
165
|
-
|
|
100
|
+
j,
|
|
166
101
|
{
|
|
167
|
-
...
|
|
102
|
+
...i,
|
|
168
103
|
variant: "primary-green",
|
|
169
104
|
className: "w-fit self-center",
|
|
170
|
-
type:
|
|
171
|
-
disabled:
|
|
172
|
-
children:
|
|
105
|
+
type: i.type ?? "submit",
|
|
106
|
+
disabled: i.disabled,
|
|
107
|
+
children: i.children
|
|
173
108
|
}
|
|
174
109
|
)
|
|
175
110
|
] })
|
|
176
111
|
] });
|
|
177
112
|
export {
|
|
178
|
-
|
|
113
|
+
q as ContactFormSection
|
|
179
114
|
};
|
package/dist/components/Input.js
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
import { jsxs as e, jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { InfoIcon as h } from "./InfoIcon.js";
|
|
3
|
+
import p from "clsx";
|
|
4
|
+
const v = ({
|
|
5
|
+
label: s,
|
|
6
|
+
id: l,
|
|
7
|
+
name: o,
|
|
8
|
+
type: i = "text",
|
|
9
|
+
placeholder: c,
|
|
9
10
|
required: t = !1,
|
|
10
11
|
tooltip: a,
|
|
11
|
-
onInputChange:
|
|
12
|
-
containerClassName:
|
|
13
|
-
error:
|
|
12
|
+
onInputChange: d,
|
|
13
|
+
containerClassName: m = "",
|
|
14
|
+
error: n = !1,
|
|
15
|
+
errorMessage: u,
|
|
14
16
|
...x
|
|
15
|
-
}) => /* @__PURE__ */ e("div", { className: `flex flex-col gap-2 ${
|
|
17
|
+
}) => /* @__PURE__ */ e("div", { className: `flex flex-col gap-2 ${m}`, children: [
|
|
16
18
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
|
|
17
|
-
/* @__PURE__ */ e("label", { htmlFor:
|
|
18
|
-
|
|
19
|
+
/* @__PURE__ */ e("label", { htmlFor: l, className: "font-bold text-neutral-800", children: [
|
|
20
|
+
s,
|
|
19
21
|
" ",
|
|
20
|
-
t && /* @__PURE__ */
|
|
22
|
+
t && /* @__PURE__ */ r("span", { className: "text-neutral-800", children: "*" })
|
|
21
23
|
] }),
|
|
22
|
-
a && /* @__PURE__ */
|
|
24
|
+
a && /* @__PURE__ */ r(
|
|
23
25
|
"span",
|
|
24
26
|
{
|
|
25
27
|
className: "text-extra-small inline-flex h-5 w-5 items-center justify-center rounded-full border border-neutral-200 text-neutral-400",
|
|
@@ -29,25 +31,30 @@ const h = ({
|
|
|
29
31
|
}
|
|
30
32
|
)
|
|
31
33
|
] }),
|
|
32
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ r(
|
|
33
35
|
"input",
|
|
34
36
|
{
|
|
35
|
-
id:
|
|
36
|
-
name:
|
|
37
|
-
type:
|
|
38
|
-
placeholder:
|
|
37
|
+
id: l,
|
|
38
|
+
name: o,
|
|
39
|
+
type: i,
|
|
40
|
+
placeholder: c,
|
|
39
41
|
required: t,
|
|
40
|
-
className:
|
|
42
|
+
className: p(
|
|
41
43
|
"text-small focus-visible:outline-primary-500 w-full rounded border p-3 text-neutral-800 placeholder:text-neutral-600 focus-visible:outline-2",
|
|
42
|
-
|
|
44
|
+
n ? "border-error-500 bg-error-25" : "bg-neutral-25 border-neutral-400"
|
|
43
45
|
),
|
|
44
|
-
onChange: (
|
|
45
|
-
|
|
46
|
+
onChange: (f) => {
|
|
47
|
+
d?.(f.target.value);
|
|
46
48
|
},
|
|
47
49
|
...x
|
|
48
50
|
}
|
|
49
|
-
)
|
|
51
|
+
),
|
|
52
|
+
n && /* @__PURE__ */ e("p", { id: `${l}-error-message`, className: "text-small text-error-500 flex items-center gap-1", children: [
|
|
53
|
+
/* @__PURE__ */ r(h, { width: 20, height: 20, fill: "var(--color-error-500)", "aria-hidden": "true" }),
|
|
54
|
+
" ",
|
|
55
|
+
u
|
|
56
|
+
] })
|
|
50
57
|
] });
|
|
51
58
|
export {
|
|
52
|
-
|
|
59
|
+
v as Input
|
|
53
60
|
};
|
|
@@ -1,43 +1,50 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronDownIcon as m } from "./ChevronDownIcon.js";
|
|
3
2
|
import p from "clsx";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { ChevronDownIcon as f } from "./ChevronDownIcon.js";
|
|
4
|
+
import { InfoIcon as h } from "./InfoIcon.js";
|
|
5
|
+
const N = ({
|
|
6
|
+
label: a,
|
|
7
|
+
id: l,
|
|
7
8
|
name: s,
|
|
8
|
-
required:
|
|
9
|
+
required: i = !1,
|
|
9
10
|
placeholder: n,
|
|
10
|
-
options:
|
|
11
|
-
containerClassName:
|
|
12
|
-
error:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
options: c,
|
|
12
|
+
containerClassName: m = "",
|
|
13
|
+
error: o = !1,
|
|
14
|
+
errorMessage: d,
|
|
15
|
+
...u
|
|
16
|
+
}) => /* @__PURE__ */ r("div", { className: `flex flex-col gap-2 ${m}`, children: [
|
|
17
|
+
a && /* @__PURE__ */ r("label", { htmlFor: l, className: "text-medium font-bold text-neutral-800", children: [
|
|
18
|
+
a,
|
|
17
19
|
" ",
|
|
18
|
-
|
|
20
|
+
i && /* @__PURE__ */ e("span", { className: "text-neutral-800", children: "*" })
|
|
19
21
|
] }),
|
|
20
22
|
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
21
23
|
/* @__PURE__ */ r(
|
|
22
24
|
"select",
|
|
23
25
|
{
|
|
24
|
-
id:
|
|
26
|
+
id: l,
|
|
25
27
|
name: s,
|
|
26
28
|
required: !0,
|
|
27
29
|
className: p(
|
|
28
30
|
"text-small focus-visible:outline-primary-500 w-full appearance-none rounded border py-2 pr-10 pl-4 text-neutral-800 placeholder:text-neutral-600 focus-visible:outline-2",
|
|
29
|
-
|
|
31
|
+
o ? "border-error-500 bg-error-25" : "bg-neutral-25 border-neutral-400"
|
|
30
32
|
),
|
|
31
|
-
...
|
|
33
|
+
...u,
|
|
32
34
|
children: [
|
|
33
35
|
n && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: n }),
|
|
34
|
-
|
|
36
|
+
c.map((t) => /* @__PURE__ */ e("option", { value: t.value, children: t.label }, t.value))
|
|
35
37
|
]
|
|
36
38
|
}
|
|
37
39
|
),
|
|
38
|
-
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ e(
|
|
40
|
+
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ e(f, {}) })
|
|
41
|
+
] }),
|
|
42
|
+
o && /* @__PURE__ */ r("p", { id: `${l}-error-message`, className: "text-small text-error-500 flex items-center gap-1", children: [
|
|
43
|
+
/* @__PURE__ */ e(h, { width: 20, height: 20, fill: "var(--color-error-500)", "aria-hidden": "true" }),
|
|
44
|
+
" ",
|
|
45
|
+
d
|
|
39
46
|
] })
|
|
40
47
|
] });
|
|
41
48
|
export {
|
|
42
|
-
|
|
49
|
+
N as Select
|
|
43
50
|
};
|
|
@@ -1,34 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsxs as r, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { InfoIcon as c } from "./InfoIcon.js";
|
|
3
|
+
import x from "clsx";
|
|
4
|
+
const h = ({
|
|
5
|
+
label: o,
|
|
5
6
|
id: e,
|
|
6
|
-
name:
|
|
7
|
-
required:
|
|
8
|
-
placeholder:
|
|
9
|
-
error:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
name: s,
|
|
8
|
+
required: t = !1,
|
|
9
|
+
placeholder: n,
|
|
10
|
+
error: a = !1,
|
|
11
|
+
errorMessage: i,
|
|
12
|
+
...m
|
|
13
|
+
}) => /* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
|
|
14
|
+
/* @__PURE__ */ r("label", { htmlFor: e, className: "text-medium font-bold text-neutral-800", children: [
|
|
15
|
+
o,
|
|
14
16
|
" ",
|
|
15
|
-
|
|
17
|
+
t && /* @__PURE__ */ l("span", { className: "text-neutral-800", children: "*" })
|
|
16
18
|
] }),
|
|
17
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ l(
|
|
18
20
|
"textarea",
|
|
19
21
|
{
|
|
20
22
|
id: e,
|
|
21
|
-
name:
|
|
22
|
-
required:
|
|
23
|
-
placeholder:
|
|
24
|
-
className:
|
|
23
|
+
name: s,
|
|
24
|
+
required: t,
|
|
25
|
+
placeholder: n,
|
|
26
|
+
className: x(
|
|
25
27
|
"text-small focus-visible:outline-primary-500 min-h-32 w-full resize-none rounded border p-3 text-neutral-800 placeholder:text-neutral-600 focus-visible:outline-2",
|
|
26
|
-
|
|
28
|
+
a ? "border-error-500 bg-error-25" : "bg-neutral-25 border-neutral-400"
|
|
27
29
|
),
|
|
28
|
-
...
|
|
30
|
+
...m
|
|
29
31
|
}
|
|
30
|
-
)
|
|
32
|
+
),
|
|
33
|
+
a && /* @__PURE__ */ r("p", { id: `${e}-error-message`, className: "text-small text-error-500 flex items-center gap-1", children: [
|
|
34
|
+
/* @__PURE__ */ l(c, { width: 20, height: 20, fill: "var(--color-error-500)", "aria-hidden": "true" }),
|
|
35
|
+
" ",
|
|
36
|
+
i
|
|
37
|
+
] })
|
|
31
38
|
] });
|
|
32
39
|
export {
|
|
33
|
-
|
|
40
|
+
h as Textarea
|
|
34
41
|
};
|
package/dist/components/Toast.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
3
3
|
import f from "clsx";
|
|
4
4
|
import { useState as h } from "react";
|
|
5
|
-
import { InfoIcon as l } from "./InfoIcon.js";
|
|
6
5
|
import { DoneCircleIcon as g } from "./DoneCircleIcon.js";
|
|
7
6
|
import { CloseIcon as p } from "./CloseIcon.js";
|
|
7
|
+
import { InfoIcon as l } from "./InfoIcon.js";
|
|
8
8
|
const u = {
|
|
9
9
|
success: {
|
|
10
10
|
icon: /* @__PURE__ */ e(g, { fill: "white", width: 24, height: 24 }),
|
|
@@ -127,6 +127,7 @@ export declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInp
|
|
|
127
127
|
required?: boolean;
|
|
128
128
|
children: ReactNode;
|
|
129
129
|
error?: boolean;
|
|
130
|
+
errorMessage?: string;
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
export declare const ChevronDownIcon: ({ fill, ...props }: React_2.SVGProps<SVGSVGElement>) => JSX.Element;
|
|
@@ -165,6 +166,7 @@ export declare interface ContactFormFieldProps {
|
|
|
165
166
|
placeholder?: string;
|
|
166
167
|
required?: boolean;
|
|
167
168
|
tooltip?: string;
|
|
169
|
+
error?: boolean;
|
|
168
170
|
errorMessage?: string;
|
|
169
171
|
}
|
|
170
172
|
|
|
@@ -609,6 +611,7 @@ export declare interface InputProps extends React.InputHTMLAttributes<HTMLInputE
|
|
|
609
611
|
onInputChange?: (str: string) => void;
|
|
610
612
|
containerClassName?: string;
|
|
611
613
|
error?: boolean;
|
|
614
|
+
errorMessage?: string;
|
|
612
615
|
}
|
|
613
616
|
|
|
614
617
|
export declare const InstagramIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
@@ -1086,6 +1089,7 @@ export declare interface SelectProps extends React.SelectHTMLAttributes<HTMLSele
|
|
|
1086
1089
|
}[];
|
|
1087
1090
|
containerClassName?: string;
|
|
1088
1091
|
error?: boolean;
|
|
1092
|
+
errorMessage?: string;
|
|
1089
1093
|
}
|
|
1090
1094
|
|
|
1091
1095
|
export declare const SinglePhoneIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
@@ -1139,6 +1143,7 @@ export declare interface TextareaProps extends React.TextareaHTMLAttributes<HTML
|
|
|
1139
1143
|
required?: boolean;
|
|
1140
1144
|
placeholder?: string;
|
|
1141
1145
|
error?: boolean;
|
|
1146
|
+
errorMessage?: string;
|
|
1142
1147
|
}
|
|
1143
1148
|
|
|
1144
1149
|
export declare const TikTokIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|