@seontechnologies/seon-id-verification
Version:
An advanced SDK featuring web components for natural person identification through document scanning, facial recognition, hand gesture, and face turning detection, designed for secure and efficient user verification.
25 lines (24 loc) • 2.76 kB
JavaScript
import { j as t, S as f, l as e, T as u, a as _, B as g } from "./index-oGnhSncZ.mjs";
import { useState as w } from "react";
import { S as j, T as c } from "./TextWIcon-wzcHnhrW.mjs";
const b = ({ label: n, onChange: o, className: s, alt: l, id: r, value: i }) => {
const [a, x] = w(i), [h, m] = w(!1), p = (d) => {
x(d.target.checked), o(d);
}, k = () => {
m(!0);
};
return t.jsxs("div", { className: `tw-flex tw-gap-2 footnote ${s}`, children: [t.jsxs("div", { className: `tw-w-5 tw-h-5 tw-rounded-md ${a ? "tw-border-0" : "tw-border-[1px]"} tw-relative tw-overflow-hidden tw-border-separator dark:tw-border-separator-dark ${h ? "tw-outline-black tw-outline-1" : ""}`, children: [t.jsx(j, { style: { scale: "1.5" }, className: `tw-absolute tw-text-white tw-w-full tw-h-full tw-bg-accent dark:tw-bg-accent-dark tw-transition-all tw-duration-150 ${a ? "tw-opacity-100" : "tw-opacity-0"}` }), t.jsx("input", { className: "tw-absolute tw-w-full tw-h-full tw-opacity-0 tw-cursor-pointer", type: "checkbox", checked: a, onChange: p, onFocus: k, alt: l, name: r, id: r })] }), t.jsx("label", { className: "tw-text-primary-on-light-100", htmlFor: r, children: n })] });
}, v = ({ onNext: n, setData: o, data: s }) => {
const [l, r] = w((s == null ? void 0 : s.isTermsAccepted) || !1), i = (a) => {
r(a.target.checked), o({
...s,
isTermsAccepted: a.target.checked
});
};
return t.jsx(f, { children: t.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-12", children: [t.jsxs("div", { className: "tw-text-primary-on-light-100 dark:tw-text-primary-on-light-100-dark tw-flex tw-flex-col tw-gap-6", children: [t.jsxs("div", { className: "tw-w-full tw-text-left tw-flex tw-flex-col tw-gap-[6px]", children: [t.jsx("h1", { id: "w-title", children: e.start_screen_title }), t.jsx("p", { id: "w-description", className: "label tw-text-secondary-on-light-60 dark:tw-text-secondary-on-light-60-dark", children: e.start_screen_description })] }), t.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-3", children: [t.jsx(c, { text: e.start_screen_list_1 }), t.jsx(c, { text: e.start_screen_list_2 }), t.jsx(c, { text: e.start_screen_list_3 }), t.jsx(c, { text: e.start_screen_list_4 })] })] }), t.jsxs("div", { className: "tw-flex tw-flex-col tw-gap-4", children: [t.jsx(b, { id: "w-terms-checkbox", value: l, onChange: i, label: t.jsx(u, { text: e.start_screen_terms, replace: {
start_screen_terms_link: t.jsx("a", { className: "tw-text-accent dark:tw-text-accent-dark", href: _.config.dpaLink, target: "_blank", children: e.start_screen_terms_link })
} }) }), t.jsx(g, { id: "w-start-button", onClick: n, text: e.start_screen_start_button, className: "tw-w-full", disabled: !l })] })] }) });
};
export {
v as default
};