@npm_leadtech/legal-contracts-ui 0.49.0 → 0.50.1

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.
@@ -6,5 +6,6 @@ export declare const Badge: FC<BadgeProps>;
6
6
  export declare interface BadgeProps {
7
7
  children?: ReactNode;
8
8
  color?: 'primary' | 'secondary';
9
+ className?: string;
9
10
  }
10
11
 
@@ -1,12 +1,12 @@
1
- import { jsx as a } from "react/jsx-runtime";
1
+ import { jsx as o } from "react/jsx-runtime";
2
2
  import "react";
3
- const o = ({ children: t, color: e = "secondary" }) => /* @__PURE__ */ a(
3
+ const n = ({ children: r, color: t = "secondary", className: e }) => /* @__PURE__ */ o(
4
4
  "div",
5
5
  {
6
- className: `absolute -top-4 left-1/2 flex -translate-x-1/2 transform items-center gap-2 rounded sm:-right-2 sm:left-auto sm:translate-0 bg-${e}-200 text-small px-2 py-2 whitespace-nowrap text-neutral-800 shadow-md`,
7
- children: t
6
+ className: `flex items-center gap-2 rounded bg-${t}-200 whitespace-nowrap text-neutral-800 shadow-md ${e || ""}`,
7
+ children: r
8
8
  }
9
9
  );
10
10
  export {
11
- o as Badge
11
+ n as Badge
12
12
  };
@@ -1,41 +1,44 @@
1
- "use client";
2
1
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
3
- import { useState as c } from "react";
4
- import { FaqItemWrapper as p } from "./FaqItemWrapper.js";
5
- import { Markdown as x } from "./Markdown.js";
6
- import { ChevronDownIcon as u } from "./ChevronDownIcon.js";
7
- const g = ({
2
+ import { useId as s } from "react";
3
+ import { FaqItemWrapper as c } from "./FaqItemWrapper.js";
4
+ import { Markdown as d } from "./Markdown.js";
5
+ import { ChevronDownIcon as o } from "./ChevronDownIcon.js";
6
+ const w = ({
8
7
  question: a,
9
- answer: o,
8
+ answer: i,
10
9
  showMoreText: n,
11
- collapsedButtonText: m,
12
- expandedButtonText: s
10
+ collapsedButtonText: l,
11
+ expandedButtonText: m
13
12
  }) => {
14
- const i = /* @__PURE__ */ e("span", { className: "font-bold", children: a }), [t, l] = c(!1);
15
- return /* @__PURE__ */ e("div", { className: "text-medium flex flex-col rounded bg-white p-4 text-neutral-800 shadow", children: /* @__PURE__ */ r(p, { question: i, children: [
16
- /* @__PURE__ */ e(x, { content: o, className: "text-medium" }),
13
+ const t = `toggle-${s().replace(/:/g, "")}`;
14
+ return /* @__PURE__ */ e("div", { className: "text-medium flex flex-col rounded bg-white p-4 text-neutral-800 shadow", children: /* @__PURE__ */ r(c, { question: /* @__PURE__ */ e("span", { className: "font-bold", children: a }), children: [
15
+ /* @__PURE__ */ e(d, { content: i, className: "text-medium" }),
17
16
  n && /* @__PURE__ */ r("div", { className: "mt-4 rounded-lg bg-neutral-50 p-6", children: [
18
- /* @__PURE__ */ e(
19
- "p",
17
+ /* @__PURE__ */ e("input", { type: "checkbox", id: t, className: "peer sr-only" }),
18
+ /* @__PURE__ */ e("p", { className: "mb-4 line-clamp-4 text-xs leading-relaxed wrap-break-word text-neutral-800 peer-checked:line-clamp-none", children: n }),
19
+ /* @__PURE__ */ r(
20
+ "label",
20
21
  {
21
- className: `mb-4 text-xs leading-relaxed wrap-break-word text-neutral-800 ${t ? "" : "line-clamp-4"}`,
22
- children: n
22
+ htmlFor: t,
23
+ className: "text-primary-700 flex cursor-pointer items-center gap-1 text-sm font-medium transition-colors peer-checked:hidden",
24
+ children: [
25
+ m,
26
+ /* @__PURE__ */ e(o, { fill: "var(--primary-700)", className: "h-4 w-4 transition-transform duration-200" })
27
+ ]
23
28
  }
24
29
  ),
25
30
  /* @__PURE__ */ r(
26
- "button",
31
+ "label",
27
32
  {
28
- className: "text-primary-700 flex cursor-pointer items-center gap-1 text-sm font-medium transition-colors",
29
- onClick: () => {
30
- l((d) => !d);
31
- },
33
+ htmlFor: t,
34
+ className: "text-primary-700 hidden cursor-pointer items-center gap-1 text-sm font-medium transition-colors peer-checked:flex",
32
35
  children: [
33
- t ? m : s,
36
+ l,
34
37
  /* @__PURE__ */ e(
35
- u,
38
+ o,
36
39
  {
37
40
  fill: "var(--primary-700)",
38
- className: `h-4 w-4 transition-transform duration-200 ${t ? "rotate-180" : ""} `
41
+ className: "h-4 w-4 rotate-180 transition-transform duration-200"
39
42
  }
40
43
  )
41
44
  ]
@@ -45,5 +48,5 @@ const g = ({
45
48
  ] }) });
46
49
  };
47
50
  export {
48
- g as FaqItem
51
+ w as FaqItem
49
52
  };
@@ -1,11 +1,11 @@
1
- import { jsxs as o, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as r, jsx as s } from "react/jsx-runtime";
2
2
  import "react";
3
3
  import { Badge as e } from "./Badge.js";
4
- import { TrustedIcon as m } from "./TrustedIcon.js";
5
- const a = ({ children: r }) => /* @__PURE__ */ o(e, { children: [
6
- /* @__PURE__ */ t(m, { className: "h-5 w-5" }),
7
- r
4
+ import { TrustedIcon as a } from "./TrustedIcon.js";
5
+ const n = ({ children: t }) => /* @__PURE__ */ r(e, { className: "text-small absolute -top-4 left-1/2 -translate-x-1/2 transform px-2 py-2 sm:-right-2 sm:left-auto sm:translate-0", children: [
6
+ /* @__PURE__ */ s(a, { className: "h-5 w-5" }),
7
+ t
8
8
  ] });
9
9
  export {
10
- a as TrustedBadge
10
+ n as TrustedBadge
11
11
  };