UNPKG

@payfit/unity-components

Version:

44 lines (43 loc) 1.22 kB
import { Text as e } from "../../text/Text.js"; import { ValidationRuleItem as t } from "./ValidationRuleItem.js"; import { uyTv as n } from "@payfit/unity-themes"; import { jsx as r, jsxs as i } from "react/jsx-runtime"; import { FormattedMessage as a } from "react-intl"; //#region src/components/password-field/parts/PasswordFieldDetails.tsx var o = n({ slots: { root: ["uy:flex uy:flex-col uy:gap-75"], list: ["uy:list-none uy:p-0 uy:m-0 uy:contents"] } }); function s({ id: n, title: s, rules: c }) { if (c.length === 0) return null; let { root: l, list: u } = o(); return /* @__PURE__ */ i("div", { id: n, className: l(), children: [ /* @__PURE__ */ r(e, { variant: "h4", className: "uy:sr-only", children: s }), /* @__PURE__ */ r(e, { variant: "bodySmall", color: "content.neutral", children: /* @__PURE__ */ r(a, { id: "unity:component:password-field:rules-title", defaultMessage: "Your password must have:" }) }), /* @__PURE__ */ r("ul", { className: u(), children: c.map((e) => /* @__PURE__ */ r(t, { id: e.id, label: e.label, status: e.status }, e.id)) }) ] }); } //#endregion export { s as PasswordFieldDetails };