@npm_leadtech/legal-contracts-ui 0.157.0 → 0.158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,7 @@ export interface ItemProps {
17
17
  image: ReactNode;
18
18
  description?: string;
19
19
  url: ReactNode;
20
+ urlDataQaSuffix?: string;
20
21
  variant?: 'default' | 'card';
21
22
  className?: string;
22
23
  }
@@ -77,6 +77,7 @@ export interface ItemProps {
77
77
  image: ReactNode;
78
78
  description?: string;
79
79
  url: ReactNode;
80
+ urlDataQaSuffix?: string;
80
81
  variant?: 'default' | 'card';
81
82
  className?: string;
82
83
  }
@@ -8,6 +8,7 @@ export declare interface ItemProps {
8
8
  image: ReactNode;
9
9
  description?: string;
10
10
  url: ReactNode;
11
+ urlDataQaSuffix?: string;
11
12
  variant?: 'default' | 'card';
12
13
  className?: string;
13
14
  }
@@ -1,32 +1,49 @@
1
- import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
- import "react";
3
- import l from "clsx";
4
- import { ChevronRightIcon as n } from "./ChevronRightIcon.js";
5
- const h = ({ id: s, image: o, description: t, url: i, variant: e = "default", className: d = "" }) => {
6
- const m = e === "default";
7
- return /* @__PURE__ */ a(
1
+ import { jsxs as o, jsx as l } from "react/jsx-runtime";
2
+ import { isValidElement as p, cloneElement as f } from "react";
3
+ import s from "clsx";
4
+ import { ChevronRightIcon as h } from "./ChevronRightIcon.js";
5
+ const x = (e, r) => {
6
+ if (!p(e)) return e;
7
+ if (r) {
8
+ const t = e.props["data-qa"];
9
+ return f(e, {
10
+ "data-qa": t ? `${t}${r}` : void 0
11
+ });
12
+ }
13
+ return e;
14
+ }, N = ({
15
+ id: e,
16
+ image: r,
17
+ description: t,
18
+ url: n,
19
+ urlDataQaSuffix: i,
20
+ variant: a = "default",
21
+ className: d = ""
22
+ }) => {
23
+ const c = x(n, i), m = a === "default";
24
+ return /* @__PURE__ */ o(
8
25
  "div",
9
26
  {
10
- className: l(
27
+ className: s(
11
28
  'hover:bg-primary-50 relative flex cursor-pointer items-center gap-4 rounded-sm [&_a]:before:absolute [&_a]:before:inset-0 [&_a]:before:content-[""]',
12
29
  {
13
30
  default: "py-4 px-2 items-start",
14
31
  card: "border border-0.5 border-neutral-200 shadow-lg bg-white pl-6 pr-4 py-5"
15
- }[e],
32
+ }[a],
16
33
  d
17
34
  ),
18
35
  children: [
19
- o,
20
- /* @__PURE__ */ a("div", { className: "flex flex-1 flex-col gap-1", children: [
21
- /* @__PURE__ */ r("p", { className: l("text-medium break-all text-neutral-800", m ? "" : "font-bold"), children: i }),
22
- t && /* @__PURE__ */ r("p", { className: "text-extra-small break-all text-neutral-600", children: t })
36
+ r,
37
+ /* @__PURE__ */ o("div", { className: "flex flex-1 flex-col gap-1", children: [
38
+ /* @__PURE__ */ l("p", { className: s("text-medium break-all text-neutral-800", m ? "" : "font-bold"), children: c }),
39
+ t && /* @__PURE__ */ l("p", { className: "text-extra-small break-all text-neutral-600", children: t })
23
40
  ] }),
24
- e === "card" && /* @__PURE__ */ r(n, { width: 20, height: 20 })
41
+ a === "card" && /* @__PURE__ */ l(h, { width: 20, height: 20 })
25
42
  ]
26
43
  },
27
- s
44
+ e
28
45
  );
29
46
  };
30
47
  export {
31
- h as Item
48
+ N as Item
32
49
  };
@@ -6,6 +6,7 @@ export interface ItemProps {
6
6
  image: ReactNode;
7
7
  description?: string;
8
8
  url: ReactNode;
9
+ urlDataQaSuffix?: string;
9
10
  variant?: 'default' | 'card';
10
11
  className?: string;
11
12
  }
@@ -1,25 +1,23 @@
1
- import { jsxs as i, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
2
  import "react";
3
- import { SectionHeading as a } from "./SectionHeading.js";
4
- import { Item as d } from "./Item.js";
3
+ import { SectionHeading as d } from "./SectionHeading.js";
4
+ import { Item as i } from "./Item.js";
5
5
  import { ChevronDownIcon as n } from "./ChevronDownIcon.js";
6
- const b = ({ header: o, moreDocuments: l = [] }) => l.length === 0 ? null : /* @__PURE__ */ i("section", { className: "mx-auto px-6 py-10 text-neutral-800 lg:px-8 lg:py-12 xl:max-w-300 xl:px-0", children: [
7
- /* @__PURE__ */ i("div", { className: "hidden flex-col gap-6 md:flex", children: [
8
- /* @__PURE__ */ r(a, { ...o, align: "start", className: "pl-7" }),
9
- /* @__PURE__ */ r("div", { className: "grid grid-flow-col grid-rows-3", children: l.map((e, s) => /* @__PURE__ */ r("div", { className: `border-neutral-200 px-6 ${s < 6 ? "border-r" : ""} `, children: /* @__PURE__ */ r(d, { ...e }) }, `desktop-${e.id}`)) })
6
+ const f = ({ header: o, moreDocuments: a = [] }) => a.length === 0 ? null : /* @__PURE__ */ l("section", { className: "mx-auto px-6 py-10 text-neutral-800 lg:px-8 lg:py-12 xl:max-w-300 xl:px-0", children: [
7
+ /* @__PURE__ */ l("div", { className: "hidden flex-col gap-6 md:flex", children: [
8
+ /* @__PURE__ */ r(d, { ...o, align: "start", className: "pl-7" }),
9
+ /* @__PURE__ */ r("div", { className: "grid grid-flow-col grid-rows-3", children: a.map((e, s) => /* @__PURE__ */ r("div", { className: `border-neutral-200 px-6 ${s < 6 ? "border-r" : ""} `, children: /* @__PURE__ */ r(i, { ...e }) }, `desktop-${e.id}`)) })
10
10
  ] }),
11
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-10 md:hidden", children: /* @__PURE__ */ i("details", { className: "group", children: [
12
- /* @__PURE__ */ i("summary", { className: "flex cursor-pointer list-none items-center justify-between rounded-sm border border-neutral-200 p-4", children: [
11
+ /* @__PURE__ */ r("div", { className: "flex flex-col gap-10 md:hidden", children: /* @__PURE__ */ l("details", { className: "group", children: [
12
+ /* @__PURE__ */ l("summary", { className: "flex cursor-pointer list-none items-center justify-between rounded-sm border border-neutral-200 p-4", children: [
13
13
  /* @__PURE__ */ r("span", { children: o.title }),
14
14
  /* @__PURE__ */ r(n, { className: "h-5 w-5 transition-transform group-open:rotate-180" })
15
15
  ] }),
16
- /* @__PURE__ */ r("div", { className: "flex flex-col border-x border-b border-neutral-200", children: l.map((e) => /* @__PURE__ */ r(
17
- d,
16
+ /* @__PURE__ */ r("div", { className: "flex flex-col border-x border-b border-neutral-200", children: a.map((e) => /* @__PURE__ */ r(
17
+ i,
18
18
  {
19
- id: e.id,
20
- image: e.image,
21
- url: e.url,
22
- description: e.description,
19
+ ...e,
20
+ urlDataQaSuffix: "_mobile",
23
21
  className: "border-b border-neutral-200 p-6! last:border-b-0"
24
22
  },
25
23
  `mobile-${e.id}`
@@ -27,5 +25,5 @@ const b = ({ header: o, moreDocuments: l = [] }) => l.length === 0 ? null : /* @
27
25
  ] }) })
28
26
  ] });
29
27
  export {
30
- b as MoreTemplatesSection
28
+ f as MoreTemplatesSection
31
29
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.157.0",
3
+ "version": "0.158.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",