UNPKG

@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.75 kB
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] = "038b3641-dbb6-40bf-80c0-3f4fb807cabb", e._sentryDebugIdIdentifier = "sentry-dbid-038b3641-dbb6-40bf-80c0-3f4fb807cabb"); } catch (e) {} import { t as useId } from "./useId-eJSYfA6i.js"; import cx from "classnames"; import { jsx, jsxs } from "preact/jsx-runtime"; var StructuredList_module_default = { "structured-list": "adyen-kyc-structured-list", structuredList: "adyen-kyc-structured-list", "structured-list-section-field": "adyen-kyc-structured-list-section-field", structuredListSectionField: "adyen-kyc-structured-list-section-field", "structured-list-section-label": "adyen-kyc-structured-list-section-label", structuredListSectionLabel: "adyen-kyc-structured-list-section-label", "structured-list-section-data": "adyen-kyc-structured-list-section-data", structuredListSectionData: "adyen-kyc-structured-list-section-data", "structured-list-section-detail": "adyen-kyc-structured-list-section-detail", structuredListSectionDetail: "adyen-kyc-structured-list-section-detail" }; //#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, index) => /* @__PURE__ */ jsx(StructuredListItemEl, { item, detailsGroupClassNames }, index)) }); }; 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, index) => /* @__PURE__ */ jsx("dd", { "aria-labelledby": uniqueId, className: StructuredList_module_default.structuredListSectionDetail, children: detail }, index)) }) : /* @__PURE__ */ jsx("dd", { "aria-labelledby": uniqueId, className: detailsGroupClassNames, children: details })] }); }; //#endregion export { StructuredList as t };