@npm_leadtech/legal-contracts-ui 0.47.1 → 0.47.3

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.
@@ -95,6 +95,8 @@ export interface FaqItemProps {
95
95
  question: string;
96
96
  answer: string;
97
97
  showMoreText?: string;
98
+ collapsedButtonText?: string;
99
+ expandedButtonText?: string;
98
100
  }
99
101
 
100
102
  export interface FaqSectionProps {
@@ -107,6 +107,8 @@ export interface FaqItemProps {
107
107
  question: string;
108
108
  answer: string;
109
109
  showMoreText?: string;
110
+ collapsedButtonText?: string;
111
+ expandedButtonText?: string;
110
112
  }
111
113
 
112
114
  export interface FaqSectionProps {
@@ -6,5 +6,7 @@ export declare interface FaqItemProps {
6
6
  question: string;
7
7
  answer: string;
8
8
  showMoreText?: string;
9
+ collapsedButtonText?: string;
10
+ expandedButtonText?: string;
9
11
  }
10
12
 
@@ -1,18 +1,25 @@
1
+ "use client";
1
2
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
- import { useState as l } from "react";
3
- import { FaqItemWrapper as d } from "./FaqItemWrapper.js";
4
- import { Markdown as c } from "./Markdown.js";
5
- import { ChevronDownIcon as p } from "./ChevronDownIcon.js";
6
- const N = ({ question: n, answer: a, showMoreText: o }) => {
7
- const s = /* @__PURE__ */ e("span", { className: "font-bold", children: n }), [t, m] = l(!1);
8
- return /* @__PURE__ */ e("div", { className: "text-medium flex flex-col rounded bg-white p-4 text-neutral-800 shadow", children: /* @__PURE__ */ r(d, { question: s, children: [
9
- /* @__PURE__ */ e(c, { content: a, className: "text-medium" }),
10
- o && /* @__PURE__ */ r("div", { className: "mt-4 rounded-lg bg-neutral-50 p-6", children: [
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 = ({
8
+ question: a,
9
+ answer: o,
10
+ showMoreText: n,
11
+ collapsedButtonText: m,
12
+ expandedButtonText: s
13
+ }) => {
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" }),
17
+ n && /* @__PURE__ */ r("div", { className: "mt-4 rounded-lg bg-neutral-50 p-6", children: [
11
18
  /* @__PURE__ */ e(
12
19
  "p",
13
20
  {
14
21
  className: `mb-4 text-xs leading-relaxed wrap-break-word text-neutral-800 ${t ? "" : "line-clamp-4"}`,
15
- children: o
22
+ children: n
16
23
  }
17
24
  ),
18
25
  /* @__PURE__ */ r(
@@ -20,12 +27,12 @@ const N = ({ question: n, answer: a, showMoreText: o }) => {
20
27
  {
21
28
  className: "text-primary-700 flex cursor-pointer items-center gap-1 text-sm font-medium transition-colors",
22
29
  onClick: () => {
23
- m((i) => !i);
30
+ l((d) => !d);
24
31
  },
25
32
  children: [
26
- t ? "Show Less" : "Show More",
33
+ t ? m : s,
27
34
  /* @__PURE__ */ e(
28
- p,
35
+ u,
29
36
  {
30
37
  fill: "var(--primary-700)",
31
38
  className: `h-4 w-4 transition-transform duration-200 ${t ? "rotate-180" : ""} `
@@ -38,5 +45,5 @@ const N = ({ question: n, answer: a, showMoreText: o }) => {
38
45
  ] }) });
39
46
  };
40
47
  export {
41
- N as FaqItem
48
+ g as FaqItem
42
49
  };
@@ -4,6 +4,8 @@ export interface FaqItemProps {
4
4
  question: string;
5
5
  answer: string;
6
6
  showMoreText?: string;
7
+ collapsedButtonText?: string;
8
+ expandedButtonText?: string;
7
9
  }
8
10
 
9
11
  export declare const FaqSection: FC<FaqSectionProps>;
@@ -11,6 +11,8 @@ export interface FaqItemProps {
11
11
  question: string;
12
12
  answer: string;
13
13
  showMoreText?: string;
14
+ collapsedButtonText?: string;
15
+ expandedButtonText?: string;
14
16
  }
15
17
 
16
18
  export interface FaqSectionProps {
@@ -66,6 +66,8 @@ export interface FaqItemProps {
66
66
  question: string;
67
67
  answer: string;
68
68
  showMoreText?: string;
69
+ collapsedButtonText?: string;
70
+ expandedButtonText?: string;
69
71
  }
70
72
 
71
73
  export interface FaqSectionProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-contracts-ui",
3
- "version": "0.47.1",
3
+ "version": "0.47.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",