@adyen/kyc-components
Version:
This guide assumes that you have already an account with Adyen. A legalEntity needs to be created, and you need to have a `legalEntityId` to instatiate a Component.
57 lines (56 loc) • 2.74 kB
JavaScript
try {
let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "9fd7d3b5-8df0-4a1b-a801-5b9df095d367", e._sentryDebugIdIdentifier = "sentry-dbid-9fd7d3b5-8df0-4a1b-a801-5b9df095d367");
} catch (e) {}
import { t as useId } from "./useId-BkDhUta2.js";
import cx from "classnames";
import { jsx, jsxs } from "preact/jsx-runtime";
var StructuredList_module_default = {
"structured-list": "_structured-list_w3dv7_1",
structuredList: "_structured-list_w3dv7_1",
"structured-list-section-field": "_structured-list-section-field_w3dv7_6",
structuredListSectionField: "_structured-list-section-field_w3dv7_6",
"structured-list-section-label": "_structured-list-section-label_w3dv7_22",
structuredListSectionLabel: "_structured-list-section-label_w3dv7_22",
"structured-list-section-data": "_structured-list-section-data_w3dv7_23",
structuredListSectionData: "_structured-list-section-data_w3dv7_23",
"structured-list-section-detail": "_structured-list-section-detail_w3dv7_46",
structuredListSectionDetail: "_structured-list-section-detail_w3dv7_46"
};
//#endregion
//#region src/components/ui/atoms/StructuredList/StructuredList.tsx
var StructuredList = ({ className, detailsGroupClassName, items }) => {
const structuredListClassNames = cx(StructuredList_module_default.structuredList, className);
const detailsGroupClassNames = cx(StructuredList_module_default.structuredListSectionData, detailsGroupClassName);
return /* @__PURE__ */ jsx("dl", {
className: structuredListClassNames,
children: items.map((item) => /* @__PURE__ */ jsx(StructuredListItemEl, {
item,
detailsGroupClassNames
}, `${item.term}${item.details}`))
});
};
var StructuredListItemEl = ({ item: { term, details }, detailsGroupClassNames }) => {
const uniqueId = useId("structured-list-item");
return /* @__PURE__ */ jsxs("div", {
className: StructuredList_module_default.structuredListSectionField,
children: [/* @__PURE__ */ jsx("dt", {
id: uniqueId,
className: StructuredList_module_default.structuredListSectionLabel,
children: term
}), Array.isArray(details) ? /* @__PURE__ */ jsx("div", {
className: detailsGroupClassNames,
children: details.map((detail) => /* @__PURE__ */ jsx("dd", {
"aria-labelledby": uniqueId,
className: StructuredList_module_default.structuredListSectionDetail,
children: detail
}))
}) : /* @__PURE__ */ jsx("dd", {
"aria-labelledby": uniqueId,
className: detailsGroupClassNames,
children: details
})]
});
};
//#endregion
export { StructuredList as t };