UNPKG

@payfit/unity-components

Version:

40 lines (39 loc) 1.69 kB
import { Text as e } from "../../../text/Text.js"; import { CheckboxIndicator as t } from "../../../checkbox/parts/CheckboxIndicator.js"; import { Content as n } from "../../internals/Content.js"; import { Description as r } from "../../internals/Description.js"; import { Illustration as i } from "../../internals/Illustration.js"; import { SelectedIndicator as a } from "../../internals/SelectedIndicator.js"; import { selectableCard as o } from "../../selectableCard.variant.js"; import { forwardRef as s } from "react"; import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime"; import { useId as d } from "react-aria/useId"; import { CheckboxButton as f, CheckboxField as p } from "react-aria-components/Checkbox"; //#region src/components/selectable-card/selectable-card-checkbox-group/parts/SelectableCardCheckbox.tsx var m = s(({ title: s, description: m, illustration: h, ...g }, _) => { let { base: v } = o(), y = d(); return /* @__PURE__ */ l(p, { className: "uy:contents", ...g, children: /* @__PURE__ */ l(f, { className: ({ isFocusVisible: e }) => v({ isFocusVisible: e }), ref: _, children: (o) => /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l(a, { children: /* @__PURE__ */ l(t, { className: "uy:group-hover:border-border-form-hover", ...o }) }), /* @__PURE__ */ u(n, { children: [ h && /* @__PURE__ */ l(i, { children: h }), /* @__PURE__ */ l(e, { variant: "bodyLargeStrong", asElement: "h3", id: `${y}-label`, children: s }), m && /* @__PURE__ */ l(r, { children: m }) ] })] }) }) }); }); m.displayName = "SelectableCardCheckbox"; //#endregion export { m as SelectableCardCheckbox };