@npm_leadtech/legal-contracts-ui 0.165.4 → 0.165.6

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.
@@ -0,0 +1,11 @@
1
+ import { FC } from 'react';
2
+
3
+ export declare const ContinueEditingBanner: FC<ContinueEditingBannerProps>;
4
+
5
+ export declare interface ContinueEditingBannerProps {
6
+ editFormClicked?: () => void;
7
+ tagLine: string;
8
+ title: string;
9
+ buttonLabel: string;
10
+ }
11
+
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
3
+ import "react";
4
+ import { Button as n } from "./Button.js";
5
+ const m = ({
6
+ editFormClicked: a,
7
+ tagLine: r,
8
+ title: s,
9
+ buttonLabel: l
10
+ }) => /* @__PURE__ */ e("div", { className: "bg-primary-50 px-ds-sm py-0", children: /* @__PURE__ */ t("div", { className: 'gap-ds-sm p-ds-lg flex flex-col items-center rounded-sm bg-neutral-900 bg-[url("../../../src/assets/Black-01-LC.svg?url")] bg-[length:auto_90%] bg-left-bottom bg-no-repeat text-center', children: [
11
+ /* @__PURE__ */ t("div", { className: "gap-ds-2xs flex flex-col", children: [
12
+ /* @__PURE__ */ e("span", { className: "font-lora text-large text-primary-100 lg:text-super-large", children: s }),
13
+ /* @__PURE__ */ e("span", { className: "text-medium text-neutral-200", children: r })
14
+ ] }),
15
+ /* @__PURE__ */ e(n, { "data-qa": "continue-editing-banner-button", className: "lg:w-auto", onClick: a, children: l })
16
+ ] }) });
17
+ export {
18
+ m as ContinueEditingBanner
19
+ };
@@ -70,6 +70,7 @@ export declare interface HomeTemplateProps {
70
70
  trust: TrustSectionProps;
71
71
  faqTeaser: FaqTeaserSectionProps;
72
72
  articles: BlogSectionProps;
73
+ continueEditingBannerSlot?: ReactNode;
73
74
  }
74
75
 
75
76
  export interface ItemProps {
@@ -1,32 +1,34 @@
1
- import { jsxs as c, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
2
  import "react";
3
- import { HeroSection as n } from "./HeroSection.js";
4
- import { MoreTemplatesSection as f } from "./MoreTemplatesSection.js";
5
- import { ProcessSection as l } from "./ProcessSection.js";
6
- import { CategoriesSection as S } from "./CategoriesSection.js";
7
- import { TrustSection as x } from "./TrustSection.js";
8
- import { FaqTeaserSection as T } from "./FaqTeaserSection.js";
9
- import { BlogSection as b } from "./BlogSection.js";
10
- import { RatafiaSection as g } from "./RatafiaSection.js";
11
- const M = ({
3
+ import { HeroSection as l } from "./HeroSection.js";
4
+ import { MoreTemplatesSection as n } from "./MoreTemplatesSection.js";
5
+ import { ProcessSection as S } from "./ProcessSection.js";
6
+ import { CategoriesSection as x } from "./CategoriesSection.js";
7
+ import { TrustSection as T } from "./TrustSection.js";
8
+ import { FaqTeaserSection as b } from "./FaqTeaserSection.js";
9
+ import { BlogSection as j } from "./BlogSection.js";
10
+ import { RatafiaSection as u } from "./RatafiaSection.js";
11
+ const d = ({
12
12
  hero: t,
13
- moreTemplates: m,
14
- process: e,
13
+ moreTemplates: e,
14
+ process: i,
15
15
  categories: r,
16
- ratafia: i,
17
- trust: p,
18
- faqTeaser: s,
19
- articles: a
20
- }) => /* @__PURE__ */ c("main", { className: "flex-1", children: [
21
- /* @__PURE__ */ o(n, { ...t }),
22
- /* @__PURE__ */ o(f, { ...m }),
23
- /* @__PURE__ */ o(l, { ...e }),
24
- r && /* @__PURE__ */ o(S, { ...r }),
25
- /* @__PURE__ */ o(g, { ...i }),
26
- /* @__PURE__ */ o(x, { ...p }),
16
+ ratafia: p,
17
+ trust: s,
18
+ faqTeaser: a,
19
+ articles: c,
20
+ continueEditingBannerSlot: m
21
+ }) => /* @__PURE__ */ f("main", { className: "flex-1", children: [
22
+ m != null && m,
23
+ /* @__PURE__ */ o(l, { ...t }),
24
+ /* @__PURE__ */ o(n, { ...e }),
25
+ /* @__PURE__ */ o(S, { ...i }),
26
+ r && /* @__PURE__ */ o(x, { ...r }),
27
+ /* @__PURE__ */ o(u, { ...p }),
27
28
  /* @__PURE__ */ o(T, { ...s }),
28
- /* @__PURE__ */ o(b, { className: "pt-10 pb-12 lg:pb-14", ...a })
29
+ /* @__PURE__ */ o(b, { ...a }),
30
+ /* @__PURE__ */ o(j, { className: "pt-10 pb-12 lg:pb-14", ...c })
29
31
  ] });
30
32
  export {
31
- M as HomeTemplate
33
+ d as HomeTemplate
32
34
  };
@@ -30,7 +30,6 @@ export declare interface PreformProps {
30
30
  radioFieldData?: RadioFieldData;
31
31
  inputFieldData?: InputFieldData;
32
32
  tooltips: TooltipsProps[];
33
- hasMobileRadioField?: boolean;
34
33
  }
35
34
 
36
35
  export declare type RadioFieldData = {
@@ -1,35 +1,35 @@
1
1
  "use client";
2
- import { jsxs as c, Fragment as p, jsx as e } from "react/jsx-runtime";
2
+ import { jsxs as c, Fragment as x, jsx as e } from "react/jsx-runtime";
3
3
  import "react";
4
- import { Tooltips as a } from "./Tooltips.js";
5
- import { PreformMobile as f } from "./PreformMobile.js";
4
+ import { Tooltips as n } from "./Tooltips.js";
5
+ import { PreformMobile as a } from "./PreformMobile.js";
6
+ import { PreformOption as f } from "./PreformOption.js";
6
7
  import { TrustedBadge as i } from "./TrustedBadge.js";
7
- import { PreformOption as h } from "./PreformOption.js";
8
- import { Input as g } from "./Input.js";
8
+ import { Input as h } from "./Input.js";
9
9
  import { LinkWrapper as t } from "./LinkWrapper.js";
10
- const C = ({
11
- trustedBadge: s,
12
- cta: o,
13
- inputFieldData: l,
14
- radioFieldData: r,
15
- tooltips: n,
16
- hasMobileRadioField: x
17
- }) => /* @__PURE__ */ c(p, { children: [
10
+ const k = ({ trustedBadge: s, cta: o, inputFieldData: l, radioFieldData: m, tooltips: p }) => /* @__PURE__ */ c(x, { children: [
18
11
  /* @__PURE__ */ e("section", { className: "bg-neutral-25 hidden pt-10 text-neutral-800 sm:block sm:px-6 lg:px-8 xl:px-30", children: /* @__PURE__ */ c("div", { className: "relative mx-auto flex max-w-300 flex-col gap-6 rounded bg-white px-6 pt-8 pb-6 shadow-md sm:items-center sm:gap-8 lg:px-26 xl:px-10", children: [
19
12
  /* @__PURE__ */ e(i, { ...s }),
20
- r?.isVisible && /* @__PURE__ */ c(p, { children: [
21
- /* @__PURE__ */ e("p", { className: "text-large font-bold", children: r.label }),
13
+ m?.isVisible && /* @__PURE__ */ c(x, { children: [
14
+ /* @__PURE__ */ e("p", { className: "text-medium sm:text-large font-bold", children: m.label }),
22
15
  /* @__PURE__ */ c("div", { className: "flex w-full max-w-272 flex-wrap justify-center gap-2 sm:gap-4", children: [
23
- r.options.map((m) => /* @__PURE__ */ e("div", { className: "w-[calc(25%-12px)] lg:w-[calc(20%-13px)] xl:w-[calc(16.66%-14px)]", children: /* @__PURE__ */ e(
24
- h,
16
+ m.options.map((r) => /* @__PURE__ */ e(
17
+ "div",
25
18
  {
26
- ...m,
27
- selected: m.value === r.radioSelected,
28
- onClick: r.onClick
29
- }
30
- ) }, m.value)),
19
+ className: "w-[calc(50%-4px)] sm:w-[calc(25%-12px)] lg:w-[calc(20%-13px)] xl:w-[calc(16.66%-14px)]",
20
+ children: /* @__PURE__ */ e(
21
+ f,
22
+ {
23
+ ...r,
24
+ selected: r.value === m.radioSelected,
25
+ onClick: m.onClick
26
+ }
27
+ )
28
+ },
29
+ r.value
30
+ )),
31
31
  l?.isVisible && /* @__PURE__ */ e("div", { className: "mt-4 flex basis-full justify-center md:mt-0", children: /* @__PURE__ */ e(
32
- g,
32
+ h,
33
33
  {
34
34
  id: l.id,
35
35
  label: l.label,
@@ -43,19 +43,18 @@ const C = ({
43
43
  ] })
44
44
  ] }),
45
45
  /* @__PURE__ */ e(t, { variant: "primary-green", children: o }),
46
- n.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: n.map((m) => /* @__PURE__ */ e(a, { ...m }, m.title)) })
46
+ p.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-8", children: p.map((r) => /* @__PURE__ */ e(n, { ...r }, r.title)) })
47
47
  ] }) }),
48
48
  /* @__PURE__ */ e(
49
- f,
49
+ a,
50
50
  {
51
51
  cta: o,
52
52
  trustedBadge: s,
53
53
  inputFieldData: l,
54
- radioFieldData: r,
55
- hasMobileRadioField: x
54
+ radioFieldData: m
56
55
  }
57
56
  )
58
57
  ] });
59
58
  export {
60
- C as Preform
59
+ k as Preform
61
60
  };
@@ -19,7 +19,6 @@ export declare interface PreformMobileProps {
19
19
  radioFieldData?: RadioFieldData;
20
20
  inputFieldData?: InputFieldData;
21
21
  cta: ReactNode;
22
- hasMobileRadioField?: boolean;
23
22
  }
24
23
 
25
24
  export interface PreformOptionProps {
@@ -1,71 +1,53 @@
1
- import { jsxs as c, Fragment as v, jsx as l } from "react/jsx-runtime";
2
- import { useState as w, useRef as p, useEffect as g } from "react";
3
- import { TrustedBadge as N } from "./TrustedBadge.js";
4
- import { Input as a } from "./Input.js";
5
- import { PreformOption as C } from "./PreformOption.js";
6
- import { Select as $ } from "./Select.js";
7
- import { LinkWrapper as I } from "./LinkWrapper.js";
8
- const R = ({
9
- radioFieldData: r,
10
- inputFieldData: e,
11
- cta: d,
12
- trustedBadge: i,
13
- hasMobileRadioField: t
14
- }) => {
15
- const [f, u] = w(!1), h = p(null);
16
- g(() => {
17
- const n = h.current;
18
- if (!n) return;
19
- const s = new IntersectionObserver(
20
- ([m]) => {
21
- u(!m.isIntersecting);
1
+ import { jsxs as o, Fragment as d, jsx as l } from "react/jsx-runtime";
2
+ import { useState as x, useRef as v, useEffect as u } from "react";
3
+ import { TrustedBadge as g } from "./TrustedBadge.js";
4
+ import { Select as w } from "./Select.js";
5
+ import { Input as f } from "./Input.js";
6
+ import { LinkWrapper as N } from "./LinkWrapper.js";
7
+ const y = ({ radioFieldData: r, inputFieldData: e, cta: h, trustedBadge: a }) => {
8
+ const [m, b] = x(!1), c = v(null);
9
+ u(() => {
10
+ const s = c.current;
11
+ if (!s) return;
12
+ const n = new IntersectionObserver(
13
+ ([i]) => {
14
+ b(!i.isIntersecting);
22
15
  },
23
16
  { threshold: 0 }
24
17
  );
25
- return s.observe(n), () => {
26
- s.disconnect();
18
+ return n.observe(s), () => {
19
+ n.disconnect();
27
20
  };
28
21
  }, []);
29
- const x = (n) => {
30
- if (!r?.isVisible) return null;
31
- const s = t && !n, m = `${r.name}-${n ? "sticky" : "mobile"}`;
32
- return s ? /* @__PURE__ */ l("div", { className: "flex w-full flex-wrap justify-center gap-2", children: r.options.map((o) => /* @__PURE__ */ l("div", { className: "w-[calc(50%-4px)]", children: /* @__PURE__ */ l(
33
- C,
34
- {
35
- ...o,
36
- selected: o.value === r.radioSelected,
37
- onClick: r.onClick
38
- }
39
- ) }, o.value)) }) : /* @__PURE__ */ l(
40
- $,
41
- {
42
- id: m,
43
- name: r.name,
44
- value: r.radioSelected,
45
- options: r.options,
46
- containerClassName: "w-full",
47
- onChange: (o) => {
48
- r.onClick(o.target.value);
49
- }
50
- }
51
- );
52
- }, b = (n) => /* @__PURE__ */ c(
22
+ const t = (s) => /* @__PURE__ */ o(
53
23
  "div",
54
24
  {
55
- className: `flex flex-col bg-white px-6 pb-4 ${n ? "border-t border-neutral-100 pt-4 shadow-md" : ""}`,
25
+ className: `flex flex-col bg-white px-6 pb-4 ${s ? "border-t border-neutral-100 pt-4 shadow-md" : ""}`,
56
26
  children: [
57
- t && !n ? /* @__PURE__ */ l("p", { className: "text-small mb-4 font-bold text-neutral-800", children: r?.label }) : /* @__PURE__ */ l(
27
+ /* @__PURE__ */ l(
58
28
  "label",
59
29
  {
60
- htmlFor: `${r?.name ?? ""}-${n ? "sticky" : "mobile"}`,
30
+ htmlFor: `${r?.name ?? ""}-${s ? "sticky" : "mobile"}`,
61
31
  className: "text-small mb-4 font-bold text-neutral-800",
62
32
  children: r?.label
63
33
  }
64
34
  ),
65
- /* @__PURE__ */ c("div", { className: `flex gap-4 ${n ? "flex-row items-center" : "flex-col"}`, children: [
66
- x(n),
67
- e?.isVisible && !n && /* @__PURE__ */ l("div", { className: "flex justify-center", children: /* @__PURE__ */ l(
68
- a,
35
+ /* @__PURE__ */ o("div", { className: `flex gap-4 ${s ? "flex-row items-center" : "flex-col"}`, children: [
36
+ r?.isVisible && /* @__PURE__ */ l(
37
+ w,
38
+ {
39
+ id: `${r.name}-${s ? "sticky" : "mobile"}`,
40
+ name: r.name,
41
+ value: r.radioSelected,
42
+ options: r.options,
43
+ containerClassName: "w-full",
44
+ onChange: (n) => {
45
+ r.onClick(n.target.value);
46
+ }
47
+ }
48
+ ),
49
+ e?.isVisible && !s && /* @__PURE__ */ l("div", { className: "flex justify-center", children: /* @__PURE__ */ l(
50
+ f,
69
51
  {
70
52
  containerClassName: "w-full text-small",
71
53
  id: `${e.id}-mobile`,
@@ -76,10 +58,10 @@ const R = ({
76
58
  onInputChange: e.onChange
77
59
  }
78
60
  ) }, e.name),
79
- /* @__PURE__ */ l(I, { variant: "primary-green", className: `text-small ${n ? "w-fit text-nowrap" : "w-full"}`, children: d })
61
+ /* @__PURE__ */ l(N, { variant: "primary-green", className: `text-small ${s ? "w-fit text-nowrap" : "w-full"}`, children: h })
80
62
  ] }),
81
- e?.isVisible && n && /* @__PURE__ */ l("div", { className: "mt-4 flex w-full justify-center", children: /* @__PURE__ */ l(
82
- a,
63
+ e?.isVisible && s && /* @__PURE__ */ l("div", { className: "mt-4 flex w-full justify-center", children: /* @__PURE__ */ l(
64
+ f,
83
65
  {
84
66
  containerClassName: "w-full text-small",
85
67
  id: `${e.id}-mobile-sticky`,
@@ -93,14 +75,14 @@ const R = ({
93
75
  ]
94
76
  }
95
77
  );
96
- return /* @__PURE__ */ c(v, { children: [
97
- /* @__PURE__ */ l("section", { className: "bg-neutral-25 pt-10 text-neutral-800 sm:hidden", children: /* @__PURE__ */ c("div", { ref: h, className: "relative flex flex-col rounded bg-white pt-8 shadow", children: [
98
- /* @__PURE__ */ l("div", { className: "px-6", children: /* @__PURE__ */ l(N, { ...i }) }),
99
- /* @__PURE__ */ l("div", { className: f ? "hidden" : "block", children: b(!1) })
78
+ return /* @__PURE__ */ o(d, { children: [
79
+ /* @__PURE__ */ l("section", { className: "bg-neutral-25 pt-10 text-neutral-800 sm:hidden", children: /* @__PURE__ */ o("div", { ref: c, className: "relative flex flex-col rounded bg-white pt-8 shadow", children: [
80
+ /* @__PURE__ */ l("div", { className: "px-6", children: /* @__PURE__ */ l(g, { ...a }) }),
81
+ /* @__PURE__ */ l("div", { className: m ? "hidden" : "block", children: t(!1) })
100
82
  ] }) }),
101
- f && /* @__PURE__ */ l("div", { className: "fixed bottom-0 left-0 z-50 w-full sm:hidden", children: b(!0) })
83
+ m && /* @__PURE__ */ l("div", { className: "fixed bottom-0 left-0 z-50 w-full sm:hidden", children: t(!0) })
102
84
  ] });
103
85
  };
104
86
  export {
105
- R as PreformMobile
87
+ y as PreformMobile
106
88
  };
@@ -129,7 +129,6 @@ export interface PreformProps {
129
129
  radioFieldData?: RadioFieldData;
130
130
  inputFieldData?: InputFieldData;
131
131
  tooltips: TooltipsProps[];
132
- hasMobileRadioField?: boolean;
133
132
  }
134
133
 
135
134
  export interface PreviewDownloadProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.165.4",
3
+ "version": "0.165.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -294,6 +294,10 @@
294
294
  "import": "./dist/components/ContentItem.js",
295
295
  "types": "./dist/components/ContentItem.d.ts"
296
296
  },
297
+ "./components/ContinueEditingBanner": {
298
+ "import": "./dist/components/ContinueEditingBanner.js",
299
+ "types": "./dist/components/ContinueEditingBanner.d.ts"
300
+ },
297
301
  "./components/CookiesBar": {
298
302
  "import": "./dist/components/CookiesBar.js",
299
303
  "types": "./dist/components/CookiesBar.d.ts"