@npm_leadtech/legal-contracts-ui 0.63.0 → 0.63.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/ContactFormSection.js +8 -8
- package/dist/components/Input.d.ts +1 -0
- package/dist/components/Input.js +15 -14
- package/dist/components/Preform.js +54 -40
- package/dist/components/PreformMobile.d.ts +44 -0
- package/dist/components/PreformMobile.js +88 -0
- package/dist/components/Select.d.ts +2 -1
- package/dist/components/Select.js +33 -21
- package/dist/globals.css +1 -1
- package/package.json +5 -1
- package/dist/components/index.d.ts +0 -973
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { CommunicationIcon as n } from "./CommunicationIcon.js";
|
|
2
|
+
import { Textarea as t } from "./Textarea.js";
|
|
3
|
+
import { Checkbox as i } from "./Checkbox.js";
|
|
4
|
+
import { CommunicationIcon as l } from "./CommunicationIcon.js";
|
|
6
5
|
import { Input as a } from "./Input.js";
|
|
6
|
+
import { Select as n } from "./Select.js";
|
|
7
7
|
import { Item as o } from "./Item.js";
|
|
8
8
|
import { Button as s } from "./Button.js";
|
|
9
9
|
const c = [
|
|
@@ -31,7 +31,7 @@ const c = [
|
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
33
|
/* @__PURE__ */ e(
|
|
34
|
-
|
|
34
|
+
n,
|
|
35
35
|
{
|
|
36
36
|
label: "Subject",
|
|
37
37
|
id: "subject",
|
|
@@ -41,9 +41,9 @@ const c = [
|
|
|
41
41
|
required: !0
|
|
42
42
|
}
|
|
43
43
|
),
|
|
44
|
-
/* @__PURE__ */ e(
|
|
44
|
+
/* @__PURE__ */ e(t, { label: "Your Message", id: "message", name: "message", placeholder: "Write your message here", required: !0 }),
|
|
45
45
|
/* @__PURE__ */ e("p", { className: "text-small text-neutral-600", children: "* Required fields" }),
|
|
46
|
-
/* @__PURE__ */ e(
|
|
46
|
+
/* @__PURE__ */ e(i, { id: "privacy", name: "privacy", required: !0, children: /* @__PURE__ */ r("span", { children: [
|
|
47
47
|
"I have read and accept the",
|
|
48
48
|
" ",
|
|
49
49
|
/* @__PURE__ */ e(
|
|
@@ -61,7 +61,7 @@ const c = [
|
|
|
61
61
|
o,
|
|
62
62
|
{
|
|
63
63
|
id: "ID",
|
|
64
|
-
image: /* @__PURE__ */ e(
|
|
64
|
+
image: /* @__PURE__ */ e(l, { className: "size-5", "aria-hidden": "true" }),
|
|
65
65
|
description: "This information is required for the security verification process.",
|
|
66
66
|
className: "text-small flex items-start gap-3 rounded bg-neutral-50 p-4 text-neutral-600"
|
|
67
67
|
}
|
package/dist/components/Input.js
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { jsxs as e, jsx as
|
|
2
|
-
const
|
|
1
|
+
import { jsxs as e, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
const f = ({
|
|
3
3
|
label: n,
|
|
4
|
-
id:
|
|
4
|
+
id: t,
|
|
5
5
|
name: s,
|
|
6
6
|
type: i = "text",
|
|
7
7
|
placeholder: u,
|
|
8
8
|
required: r = !1,
|
|
9
9
|
tooltip: a,
|
|
10
10
|
onInputChange: c,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
containerClassName: d = "",
|
|
12
|
+
...o
|
|
13
|
+
}) => /* @__PURE__ */ e("div", { className: `flex flex-col gap-2 ${d}`, children: [
|
|
13
14
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
|
|
14
|
-
/* @__PURE__ */ e("label", { htmlFor:
|
|
15
|
+
/* @__PURE__ */ e("label", { htmlFor: t, className: "font-bold text-neutral-800", children: [
|
|
15
16
|
n,
|
|
16
17
|
" ",
|
|
17
|
-
r && /* @__PURE__ */
|
|
18
|
+
r && /* @__PURE__ */ l("span", { className: "text-red-500", children: "*" })
|
|
18
19
|
] }),
|
|
19
|
-
a && /* @__PURE__ */
|
|
20
|
+
a && /* @__PURE__ */ l(
|
|
20
21
|
"span",
|
|
21
22
|
{
|
|
22
23
|
className: "text-extra-small inline-flex h-5 w-5 items-center justify-center rounded-full border border-neutral-200 text-neutral-400",
|
|
@@ -26,22 +27,22 @@ const m = ({
|
|
|
26
27
|
}
|
|
27
28
|
)
|
|
28
29
|
] }),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
+
/* @__PURE__ */ l(
|
|
30
31
|
"input",
|
|
31
32
|
{
|
|
32
|
-
id:
|
|
33
|
+
id: t,
|
|
33
34
|
name: s,
|
|
34
35
|
type: i,
|
|
35
36
|
placeholder: u,
|
|
36
37
|
required: r,
|
|
37
38
|
className: "bg-neutral-25 text-small focus-visible:outline-primary-500 w-full rounded border border-neutral-400 p-3 text-neutral-800 placeholder:text-neutral-600 focus-visible:outline-2",
|
|
38
|
-
onChange: (
|
|
39
|
-
c?.(
|
|
39
|
+
onChange: (x) => {
|
|
40
|
+
c?.(x.target.value);
|
|
40
41
|
},
|
|
41
|
-
...
|
|
42
|
+
...o
|
|
42
43
|
}
|
|
43
44
|
)
|
|
44
45
|
] });
|
|
45
46
|
export {
|
|
46
|
-
|
|
47
|
+
f as Input
|
|
47
48
|
};
|
|
@@ -1,43 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as r, Fragment as n, jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import { PreformMobile as x } from "./PreformMobile.js";
|
|
3
5
|
import { PreformOption as p } from "./PreformOption.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/* @__PURE__ */ l(
|
|
10
|
-
/* @__PURE__ */
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
] })
|
|
6
|
+
import { TrustedBadge as a } from "./TrustedBadge.js";
|
|
7
|
+
import { Input as f } from "./Input.js";
|
|
8
|
+
import { LinkWrapper as i } from "./LinkWrapper.js";
|
|
9
|
+
const u = ({ trustedBadge: c, cta: o, inputFieldData: e, radioFieldData: m }) => /* @__PURE__ */ r(n, { children: [
|
|
10
|
+
/* @__PURE__ */ l("section", { className: "bg-neutral-25 hidden pt-10 text-neutral-800 sm:block sm:px-6 lg:px-8 xl:px-30", children: /* @__PURE__ */ r("div", { className: "relative mx-auto flex max-w-300 flex-col gap-6 rounded bg-white px-6 pt-8 pb-6 shadow-md sm:items-center sm:gap-8 lg:px-26 xl:px-10", children: [
|
|
11
|
+
/* @__PURE__ */ l(a, { ...c }),
|
|
12
|
+
m?.isVisible && /* @__PURE__ */ r(n, { children: [
|
|
13
|
+
/* @__PURE__ */ l("h2", { className: "text-medium sm:text-large font-bold", children: m.label }),
|
|
14
|
+
/* @__PURE__ */ r("div", { className: "flex w-full max-w-272 flex-wrap justify-center gap-2 sm:gap-4", children: [
|
|
15
|
+
m.options.map((s) => /* @__PURE__ */ l(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
className: "w-[calc(50%-4px)] sm:w-[calc(25%-12px)] lg:w-[calc(20%-13px)] xl:w-[calc(16.66%-14px)]",
|
|
19
|
+
children: /* @__PURE__ */ l(
|
|
20
|
+
p,
|
|
21
|
+
{
|
|
22
|
+
...s,
|
|
23
|
+
selected: s.value === m.radioSelected,
|
|
24
|
+
onClick: m.onClick
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
},
|
|
28
|
+
s.value
|
|
29
|
+
)),
|
|
30
|
+
e?.isVisible && /* @__PURE__ */ l("div", { className: "mt-4 flex basis-full justify-center md:mt-0", children: /* @__PURE__ */ l(
|
|
31
|
+
f,
|
|
32
|
+
{
|
|
33
|
+
id: e.id,
|
|
34
|
+
label: e.label,
|
|
35
|
+
name: e.name,
|
|
36
|
+
placeholder: e.placeholder,
|
|
37
|
+
value: e.value,
|
|
38
|
+
onInputChange: e.onChange
|
|
39
|
+
}
|
|
40
|
+
) }, e.name)
|
|
41
|
+
] })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ l(i, { variant: "primary-green", children: o })
|
|
44
|
+
] }) }),
|
|
45
|
+
/* @__PURE__ */ l(
|
|
46
|
+
x,
|
|
47
|
+
{
|
|
48
|
+
cta: o,
|
|
49
|
+
trustedBadge: c,
|
|
50
|
+
inputFieldData: e,
|
|
51
|
+
radioFieldData: m
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] });
|
|
41
55
|
export {
|
|
42
|
-
|
|
56
|
+
u as Preform
|
|
43
57
|
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
export type InputFieldData = {
|
|
5
|
+
isVisible: boolean;
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
name: string;
|
|
9
|
+
placeholder: string;
|
|
10
|
+
value: string;
|
|
11
|
+
onChange: (str: string) => void;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export declare const PreformMobile: FC<PreformMobileProps>;
|
|
15
|
+
|
|
16
|
+
export declare interface PreformMobileProps {
|
|
17
|
+
trustedBadge: TrustedBadgeProps;
|
|
18
|
+
radioFieldData?: RadioFieldData;
|
|
19
|
+
inputFieldData?: InputFieldData;
|
|
20
|
+
cta: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface PreformOptionProps {
|
|
24
|
+
label: string;
|
|
25
|
+
value: string;
|
|
26
|
+
alternativeUrl: string | null;
|
|
27
|
+
icon: ReactNode;
|
|
28
|
+
selected: boolean;
|
|
29
|
+
onClick?: (str: string) => void;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type RadioFieldData = {
|
|
33
|
+
isVisible: boolean;
|
|
34
|
+
label: string;
|
|
35
|
+
name: string;
|
|
36
|
+
options: PreformOptionProps[];
|
|
37
|
+
radioSelected: string;
|
|
38
|
+
onClick: (str: string) => void;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export interface TrustedBadgeProps {
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsxs as o, Fragment as d, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, useRef as v, useEffect as u } from "react";
|
|
3
|
+
import { TrustedBadge as g } from "./TrustedBadge.js";
|
|
4
|
+
import { Select as w } from "./Select.js";
|
|
5
|
+
import { Input as f } from "./Input.js";
|
|
6
|
+
import { LinkWrapper as N } from "./LinkWrapper.js";
|
|
7
|
+
const y = ({ radioFieldData: r, inputFieldData: e, cta: h, trustedBadge: a }) => {
|
|
8
|
+
const [m, b] = x(!1), c = v(null);
|
|
9
|
+
u(() => {
|
|
10
|
+
const s = c.current;
|
|
11
|
+
if (!s) return;
|
|
12
|
+
const n = new IntersectionObserver(
|
|
13
|
+
([i]) => {
|
|
14
|
+
b(!i.isIntersecting);
|
|
15
|
+
},
|
|
16
|
+
{ threshold: 0 }
|
|
17
|
+
);
|
|
18
|
+
return n.observe(s), () => {
|
|
19
|
+
n.disconnect();
|
|
20
|
+
};
|
|
21
|
+
}, []);
|
|
22
|
+
const t = (s) => /* @__PURE__ */ o(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
className: `flex flex-col bg-white px-6 pb-4 ${s ? "border-t border-neutral-100 pt-4 shadow-md" : ""}`,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ l(
|
|
28
|
+
"label",
|
|
29
|
+
{
|
|
30
|
+
htmlFor: `${r?.name ?? ""}-${s ? "sticky" : "mobile"}`,
|
|
31
|
+
className: "text-small mb-4 font-bold text-neutral-800",
|
|
32
|
+
children: r?.label
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ o("div", { className: `flex gap-4 ${s ? "flex-row items-center" : "flex-col"}`, children: [
|
|
36
|
+
r?.isVisible && /* @__PURE__ */ l(
|
|
37
|
+
w,
|
|
38
|
+
{
|
|
39
|
+
id: `${r.name}-${s ? "sticky" : "mobile"}`,
|
|
40
|
+
name: r.name,
|
|
41
|
+
value: r.radioSelected,
|
|
42
|
+
options: r.options,
|
|
43
|
+
containerClassName: "w-full",
|
|
44
|
+
onChange: (n) => {
|
|
45
|
+
r.onClick(n.target.value);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
e?.isVisible && !s && /* @__PURE__ */ l("div", { className: "flex justify-center", children: /* @__PURE__ */ l(
|
|
50
|
+
f,
|
|
51
|
+
{
|
|
52
|
+
containerClassName: "w-full text-small",
|
|
53
|
+
id: `${e.id}-mobile`,
|
|
54
|
+
label: e.label,
|
|
55
|
+
name: `${e.name}-mobile`,
|
|
56
|
+
placeholder: e.placeholder,
|
|
57
|
+
value: e.value,
|
|
58
|
+
onInputChange: e.onChange
|
|
59
|
+
}
|
|
60
|
+
) }, e.name),
|
|
61
|
+
/* @__PURE__ */ l(N, { variant: "primary-green", className: `text-small ${s ? "w-fit text-nowrap" : "w-full"}`, children: h })
|
|
62
|
+
] }),
|
|
63
|
+
e?.isVisible && s && /* @__PURE__ */ l("div", { className: "mt-4 flex w-full justify-center", children: /* @__PURE__ */ l(
|
|
64
|
+
f,
|
|
65
|
+
{
|
|
66
|
+
containerClassName: "w-full text-small",
|
|
67
|
+
id: `${e.id}-mobile-sticky`,
|
|
68
|
+
label: e.label,
|
|
69
|
+
name: `${e.name}-mobile-sticky`,
|
|
70
|
+
placeholder: e.placeholder,
|
|
71
|
+
value: e.value,
|
|
72
|
+
onInputChange: e.onChange
|
|
73
|
+
}
|
|
74
|
+
) }, e.name)
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
return /* @__PURE__ */ o(d, { children: [
|
|
79
|
+
/* @__PURE__ */ l("section", { className: "bg-neutral-25 pt-10 text-neutral-800 sm:hidden", children: /* @__PURE__ */ o("div", { ref: c, className: "relative flex flex-col rounded bg-white pt-8 shadow", children: [
|
|
80
|
+
/* @__PURE__ */ l("div", { className: "px-6", children: /* @__PURE__ */ l(g, { ...a }) }),
|
|
81
|
+
/* @__PURE__ */ l("div", { className: m ? "hidden" : "block", children: t(!1) })
|
|
82
|
+
] }) }),
|
|
83
|
+
m && /* @__PURE__ */ l("div", { className: "fixed bottom-0 left-0 z-50 w-full sm:hidden", children: t(!0) })
|
|
84
|
+
] });
|
|
85
|
+
};
|
|
86
|
+
export {
|
|
87
|
+
y as PreformMobile
|
|
88
|
+
};
|
|
@@ -3,7 +3,7 @@ import { FC } from 'react';
|
|
|
3
3
|
export declare const Select: FC<SelectProps>;
|
|
4
4
|
|
|
5
5
|
export declare interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
6
|
-
label
|
|
6
|
+
label?: string;
|
|
7
7
|
id: string;
|
|
8
8
|
name: string;
|
|
9
9
|
required?: boolean;
|
|
@@ -12,5 +12,6 @@ export declare interface SelectProps extends React.SelectHTMLAttributes<HTMLSele
|
|
|
12
12
|
label: string;
|
|
13
13
|
value: string;
|
|
14
14
|
}[];
|
|
15
|
+
containerClassName?: string;
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -1,26 +1,38 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDownIcon as d } from "./ChevronDownIcon.js";
|
|
3
|
+
const v = ({
|
|
4
|
+
label: t,
|
|
5
|
+
id: a,
|
|
6
|
+
name: s,
|
|
7
|
+
required: i = !1,
|
|
8
|
+
placeholder: n,
|
|
9
|
+
options: o,
|
|
10
|
+
containerClassName: c = "",
|
|
11
|
+
...u
|
|
12
|
+
}) => /* @__PURE__ */ l("div", { className: `flex flex-col gap-2 ${c}`, children: [
|
|
13
|
+
t && /* @__PURE__ */ l("label", { htmlFor: a, className: "text-medium font-bold text-neutral-800", children: [
|
|
14
|
+
t,
|
|
5
15
|
" ",
|
|
6
|
-
|
|
16
|
+
i && /* @__PURE__ */ e("span", { className: "text-red-500", children: "*" })
|
|
7
17
|
] }),
|
|
8
|
-
/* @__PURE__ */ l(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
/* @__PURE__ */ l("div", { className: "relative", children: [
|
|
19
|
+
/* @__PURE__ */ l(
|
|
20
|
+
"select",
|
|
21
|
+
{
|
|
22
|
+
id: a,
|
|
23
|
+
name: s,
|
|
24
|
+
required: !0,
|
|
25
|
+
className: "bg-neutral-25 text-small focus-visible:outline-primary-500 w-full appearance-none rounded border border-neutral-400 py-2 pr-10 pl-4 text-neutral-800 placeholder:text-neutral-400 focus-visible:outline-2",
|
|
26
|
+
...u,
|
|
27
|
+
children: [
|
|
28
|
+
n && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: n }),
|
|
29
|
+
o.map((r) => /* @__PURE__ */ e("option", { value: r.value, children: r.label }, r.value))
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
),
|
|
33
|
+
/* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2", children: /* @__PURE__ */ e(d, {}) })
|
|
34
|
+
] })
|
|
23
35
|
] });
|
|
24
36
|
export {
|
|
25
|
-
|
|
37
|
+
v as Select
|
|
26
38
|
};
|