@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.
- package/dist/components/AllDocumentsTemplate.d.ts +2 -0
- package/dist/components/CategoryProductTemplate.d.ts +2 -0
- package/dist/components/FaqItem.d.ts +2 -0
- package/dist/components/FaqItem.js +21 -14
- package/dist/components/FaqSection.d.ts +2 -0
- package/dist/components/FaqsTemplate.d.ts +2 -0
- package/dist/components/ProductTemplate.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,18 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { FaqItemWrapper as
|
|
4
|
-
import { Markdown as
|
|
5
|
-
import { ChevronDownIcon as
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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:
|
|
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
|
-
|
|
30
|
+
l((d) => !d);
|
|
24
31
|
},
|
|
25
32
|
children: [
|
|
26
|
-
t ?
|
|
33
|
+
t ? m : s,
|
|
27
34
|
/* @__PURE__ */ e(
|
|
28
|
-
|
|
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
|
-
|
|
48
|
+
g as FaqItem
|
|
42
49
|
};
|