@npm_leadtech/legal-contracts-ui 0.48.12 → 0.49.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.
Files changed (40) hide show
  1. package/dist/components/AboutUsTemplate.d.ts +9 -1
  2. package/dist/components/AllDocumentsTemplate.d.ts +9 -1
  3. package/dist/components/AlternativeSubtypeDocument.d.ts +9 -1
  4. package/dist/components/BlogSection.d.ts +9 -1
  5. package/dist/components/Button.d.ts +12 -4
  6. package/dist/components/Button.js +14 -113
  7. package/dist/components/Button.utils.d.ts +16 -0
  8. package/dist/components/Button.utils.js +102 -0
  9. package/dist/components/CategoriesSection.d.ts +9 -1
  10. package/dist/components/CategoryProductTemplate.d.ts +9 -1
  11. package/dist/components/ContentItem.d.ts +9 -1
  12. package/dist/components/CtaSection.d.ts +9 -1
  13. package/dist/components/DefaultSubtypeDocument.d.ts +9 -1
  14. package/dist/components/DocsModules.d.ts +9 -1
  15. package/dist/components/FaqItem.js +26 -30
  16. package/dist/components/FaqTeaserSection.d.ts +9 -1
  17. package/dist/components/GuidelinesSection.d.ts +9 -1
  18. package/dist/components/Header.d.ts +5 -7
  19. package/dist/components/Header.js +41 -55
  20. package/dist/components/HeroSection.d.ts +9 -1
  21. package/dist/components/HomeTemplate.d.ts +9 -1
  22. package/dist/components/IntroSection.d.ts +9 -1
  23. package/dist/components/Markdown.js +29 -29
  24. package/dist/components/NotFoundTemplate.d.ts +9 -1
  25. package/dist/components/Preform.d.ts +9 -1
  26. package/dist/components/PreviewDownload.d.ts +3 -17
  27. package/dist/components/PreviewDownload.js +17 -18
  28. package/dist/components/PreviewSection.d.ts +9 -1
  29. package/dist/components/ProductTemplate.d.ts +12 -4
  30. package/dist/components/RatafiaSection.d.ts +9 -1
  31. package/dist/components/SearchBar.js +20 -21
  32. package/dist/components/TableOfContents.js +1 -1
  33. package/dist/components/TrustSection.d.ts +9 -1
  34. package/dist/components/TryNowSection.d.ts +9 -1
  35. package/dist/components/UiComponents.d.ts +32 -0
  36. package/dist/components/UiComponents.js +29 -0
  37. package/dist/components/WeHelpSection.d.ts +9 -1
  38. package/dist/components/index.d.ts +828 -0
  39. package/dist/globals.css +1 -1
  40. package/package.json +5 -1
@@ -22,7 +22,7 @@ export declare interface AboutUsTemplateProps {
22
22
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
23
23
  children: ReactNode;
24
24
  size?: ButtonSize;
25
- variant?: ButtonVariant;
25
+ variant?: ResponsiveButtonVariant;
26
26
  iconPosition?: IconPosition;
27
27
  }
28
28
 
@@ -101,6 +101,14 @@ export interface PartnersSectionProps {
101
101
  }>;
102
102
  }
103
103
 
104
+ export type ResponsiveButtonVariant = ButtonVariant | {
105
+ initial?: ButtonVariant;
106
+ sm?: ButtonVariant;
107
+ md?: ButtonVariant;
108
+ lg?: ButtonVariant;
109
+ xl?: ButtonVariant;
110
+ };
111
+
104
112
  export interface SectionHeadingProps {
105
113
  title: string;
106
114
  description?: string;
@@ -36,7 +36,7 @@ export interface BreadcrumbProps {
36
36
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
37
37
  children: ReactNode;
38
38
  size?: ButtonSize;
39
- variant?: ButtonVariant;
39
+ variant?: ResponsiveButtonVariant;
40
40
  iconPosition?: IconPosition;
41
41
  }
42
42
 
@@ -125,5 +125,13 @@ export interface LinkedProductProps {
125
125
  children: ReactNode;
126
126
  }
127
127
 
128
+ export type ResponsiveButtonVariant = ButtonVariant | {
129
+ initial?: ButtonVariant;
130
+ sm?: ButtonVariant;
131
+ md?: ButtonVariant;
132
+ lg?: ButtonVariant;
133
+ xl?: ButtonVariant;
134
+ };
135
+
128
136
  export type SubtypeDocumentProps = DefaultSubtypeDocumentProps | AlternativeSubtypeDocumentProps;
129
137
 
@@ -19,7 +19,7 @@ export interface BaseSubtypeDocumentProps {
19
19
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
20
20
  children: ReactNode;
21
21
  size?: ButtonSize;
22
- variant?: ButtonVariant;
22
+ variant?: ResponsiveButtonVariant;
23
23
  iconPosition?: IconPosition;
24
24
  }
25
25
 
@@ -28,4 +28,12 @@ export type ButtonSize = 'small' | 'default' | 'large';
28
28
  export type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yellow' | 'primary-white' | 'secondary-green' | 'secondary-yellow' | 'secondary-red' | 'secondary-black' | 'tertiary-bold' | 'tertiary-thin' | 'tertiary-icon' | 'tertiary-link' | 'icon-black' | 'icon-grey' | 'icon-mobile';
29
29
 
30
30
  export type IconPosition = 'left' | 'right' | 'top';
31
+
32
+ export type ResponsiveButtonVariant = ButtonVariant | {
33
+ initial?: ButtonVariant;
34
+ sm?: ButtonVariant;
35
+ md?: ButtonVariant;
36
+ lg?: ButtonVariant;
37
+ xl?: ButtonVariant;
38
+ };
31
39
 
@@ -18,7 +18,7 @@ export declare interface BlogSectionProps {
18
18
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
19
19
  children: ReactNode;
20
20
  size?: ButtonSize;
21
- variant?: ButtonVariant;
21
+ variant?: ResponsiveButtonVariant;
22
22
  iconPosition?: IconPosition;
23
23
  }
24
24
 
@@ -28,6 +28,14 @@ export type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yel
28
28
 
29
29
  export type IconPosition = 'left' | 'right' | 'top';
30
30
 
31
+ export type ResponsiveButtonVariant = ButtonVariant | {
32
+ initial?: ButtonVariant;
33
+ sm?: ButtonVariant;
34
+ md?: ButtonVariant;
35
+ lg?: ButtonVariant;
36
+ xl?: ButtonVariant;
37
+ };
38
+
31
39
  export interface SectionHeadingProps {
32
40
  title: string;
33
41
  description?: string;
@@ -7,13 +7,21 @@ export declare const Button: ({ children, type, size, variant, iconPosition, cla
7
7
  export declare interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
8
8
  children: ReactNode;
9
9
  size?: ButtonSize;
10
- variant?: ButtonVariant;
10
+ variant?: ResponsiveButtonVariant;
11
11
  iconPosition?: IconPosition;
12
12
  }
13
13
 
14
- export declare type ButtonSize = 'small' | 'default' | 'large';
14
+ export type ButtonSize = 'small' | 'default' | 'large';
15
15
 
16
- export declare type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yellow' | 'primary-white' | 'secondary-green' | 'secondary-yellow' | 'secondary-red' | 'secondary-black' | 'tertiary-bold' | 'tertiary-thin' | 'tertiary-icon' | 'tertiary-link' | 'icon-black' | 'icon-grey' | 'icon-mobile';
16
+ export type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yellow' | 'primary-white' | 'secondary-green' | 'secondary-yellow' | 'secondary-red' | 'secondary-black' | 'tertiary-bold' | 'tertiary-thin' | 'tertiary-icon' | 'tertiary-link' | 'icon-black' | 'icon-grey' | 'icon-mobile';
17
17
 
18
- export declare type IconPosition = 'left' | 'right' | 'top';
18
+ export type IconPosition = 'left' | 'right' | 'top';
19
+
20
+ export type ResponsiveButtonVariant = ButtonVariant | {
21
+ initial?: ButtonVariant;
22
+ sm?: ButtonVariant;
23
+ md?: ButtonVariant;
24
+ lg?: ButtonVariant;
25
+ xl?: ButtonVariant;
26
+ };
19
27
 
@@ -1,118 +1,19 @@
1
- import { jsx as g } from "react/jsx-runtime";
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import { getButtonClasses as p } from "./Button.utils.js";
2
3
  import "react";
3
- const p = {
4
- "primary-green": {
5
- base: "bg-primary-700 text-white border border-transparent font-semibold",
6
- hover: "hover:bg-primary-500",
7
- disabled: "disabled:bg-neutral-200 disabled:text-neutral-400 disabled:cursor-not-allowed"
8
- },
9
- "primary-darkgreen": {
10
- base: "bg-primary-900 text-white border border-transparent font-semibold",
11
- hover: "hover:bg-primary-800",
12
- disabled: "disabled:bg-neutral-200 disabled:text-neutral-400 disabled:cursor-not-allowed"
13
- },
14
- "primary-yellow": {
15
- base: "bg-secondary-500 text-neutral-900 border border-transparent font-semibold",
16
- hover: "hover:bg-secondary-400",
17
- disabled: "disabled:bg-neutral-200 disabled:text-neutral-400 disabled:cursor-not-allowed"
18
- },
19
- "primary-white": {
20
- base: "bg-white text-neutral-900 font-semibold border border-transparent",
21
- hover: "hover:bg-neutral-50",
22
- disabled: "disabled:bg-neutral-200 disabled:text-neutral-400 disabled:cursor-not-allowed"
23
- },
24
- "secondary-green": {
25
- base: "bg-white text-primary-700 border-2 border-primary-700 font-semibold",
26
- hover: "hover:bg-primary-100 hover:text-primary-800",
27
- disabled: "disabled:bg-neutral-200 disabled:text-neutral-400 disabled:border-neutral-200 disabled:cursor-not-allowed"
28
- },
29
- "secondary-yellow": {
30
- base: "bg-transparent text-neutral-900 border-2 border-secondary-500 font-semibold",
31
- hover: "hover:bg-secondary-100 hover:border-secondary-600",
32
- disabled: "disabled:bg-neutral-200 disabled:text-neutral-400 disabled:border-neutral-200 disabled:cursor-not-allowed"
33
- },
34
- "secondary-red": {
35
- base: "bg-transparent text-error-500 border-2 border-error-500 font-semibold",
36
- hover: "hover:bg-error-25",
37
- disabled: "disabled:bg-neutral-200 disabled:text-neutral-400 disabled:border-neutral-200 disabled:cursor-not-allowed"
38
- },
39
- "secondary-black": {
40
- base: "bg-transparent text-neutral-800 border-2 border-neutral-600 font-semibold",
41
- hover: "hover:bg-neutral-200",
42
- disabled: "disabled:bg-neutral-200 disabled:text-neutral-400 disabled:border-neutral-200 disabled:cursor-not-allowed"
43
- },
44
- "tertiary-bold": {
45
- base: "bg-transparent text-primary-700 font-semibold border border-transparent font-semibold p-1.5!",
46
- hover: "hover:text-primary-500 hover:bg-primary-200",
47
- disabled: "disabled:text-neutral-400 disabled:cursor-not-allowed disabled:bg-white"
48
- },
49
- "tertiary-thin": {
50
- base: "bg-transparent text-neutral-800 font-normal border border-transparent p-1.5!",
51
- hover: " hover:bg-primary-100",
52
- disabled: "disabled:text-neutral-400 disabled:cursor-not-allowed disabled:bg-white"
53
- },
54
- "tertiary-icon": {
55
- base: "bg-transparent text-neutral-800 font-medium border border-transparent p-1.5!",
56
- hover: "hover:bg-primary-100",
57
- disabled: "disabled:text-neutral-400 disabled:cursor-not-allowed disabled:bg-white"
58
- },
59
- "tertiary-link": {
60
- base: "bg-transparent text-primary-700 underline underline-offset-2 border border-transparent",
61
- hover: "",
62
- disabled: "disabled:text-neutral-400 disabled:cursor-not-allowed disabled:bg-white"
63
- },
64
- "icon-black": {
65
- base: "bg-black text-white border border-transparent font-semibold",
66
- hover: "hover:bg-neutral-800",
67
- disabled: "disabled:bg-neutral-400 disabled:cursor-not-allowed"
68
- },
69
- "icon-grey": {
70
- base: "bg-transparent text-neutral-800 border-2 border-neutral-600 font-semibold",
71
- hover: "hover:bg-neutral-200",
72
- disabled: "disabled:text-neutral-400 disabled:border-neutral-400 disabled:bg-white disabled:cursor-not-allowed"
73
- },
74
- "icon-mobile": {
75
- base: "bg-transparent text-primary-700 border border-neutral-200 border-2 px-8 rounded-sm",
76
- hover: "hover:bg-neutral-50",
77
- disabled: "disabled:text-neutral-400 disabled:border-neutral-400 disabled:bg-white disabled:cursor-not-allowed"
78
- }
79
- }, m = {
80
- small: "px-3 py-1.5 text-small",
81
- default: "px-4 py-2.5 text-medium",
82
- large: "px-6 py-3 text-big"
83
- }, x = ({
84
- children: a,
85
- type: d = "button",
86
- size: o = "default",
87
- variant: l = "primary-green",
88
- iconPosition: t = "left",
89
- className: b,
90
- disabled: e = !1,
91
- ref: s,
92
- ...n
4
+ const x = ({
5
+ children: o,
6
+ type: r = "button",
7
+ size: s = "default",
8
+ variant: e = "primary-green",
9
+ iconPosition: a = "left",
10
+ className: n,
11
+ disabled: t = !1,
12
+ ref: m,
13
+ ...u
93
14
  }) => {
94
- const r = p[l], i = () => t === "top" ? "flex-col" : t === "right" ? "flex-row-reverse" : "flex-row", u = [
95
- "inline-flex items-center justify-center gap-2 rounded-sm font-medium transition-all duration-200",
96
- "focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500 focus-visible:ring-offset-2",
97
- e ? "" : "cursor-pointer",
98
- r.base,
99
- r.hover,
100
- r.disabled,
101
- m[o],
102
- i()
103
- ].join(" ");
104
- return /* @__PURE__ */ g(
105
- "button",
106
- {
107
- ref: s,
108
- type: d,
109
- disabled: e,
110
- "aria-disabled": e,
111
- className: `${u} ${b ?? ""}`,
112
- ...n,
113
- children: a
114
- }
115
- );
15
+ const f = p(s, e, a, t, n);
16
+ return /* @__PURE__ */ l("button", { ref: m, type: r, disabled: t, "aria-disabled": t, className: f, ...u, children: o });
116
17
  };
117
18
  export {
118
19
  x as Button
@@ -0,0 +1,16 @@
1
+ export declare type ButtonSize = 'small' | 'default' | 'large';
2
+
3
+ export declare type ButtonVariant = 'primary-green' | 'primary-darkgreen' | 'primary-yellow' | 'primary-white' | 'secondary-green' | 'secondary-yellow' | 'secondary-red' | 'secondary-black' | 'tertiary-bold' | 'tertiary-thin' | 'tertiary-icon' | 'tertiary-link' | 'icon-black' | 'icon-grey' | 'icon-mobile';
4
+
5
+ export declare const getButtonClasses: (size?: ButtonSize, variant?: ResponsiveButtonVariant, iconPosition?: IconPosition, disabled?: boolean, className?: string) => string;
6
+
7
+ export declare type IconPosition = 'left' | 'right' | 'top';
8
+
9
+ export declare type ResponsiveButtonVariant = ButtonVariant | {
10
+ initial?: ButtonVariant;
11
+ sm?: ButtonVariant;
12
+ md?: ButtonVariant;
13
+ lg?: ButtonVariant;
14
+ xl?: ButtonVariant;
15
+ };
16
+
@@ -0,0 +1,102 @@
1
+ const t = {
2
+ "primary-green": "btn-primary-green",
3
+ "primary-darkgreen": "btn-primary-darkgreen",
4
+ "primary-yellow": "btn-primary-yellow",
5
+ "primary-white": "btn-primary-white",
6
+ "secondary-green": "btn-secondary-green",
7
+ "secondary-yellow": "btn-secondary-yellow",
8
+ "secondary-red": "btn-secondary-red",
9
+ "secondary-black": "btn-secondary-black",
10
+ "tertiary-bold": "btn-tertiary-bold",
11
+ "tertiary-thin": "btn-tertiary-thin",
12
+ "tertiary-icon": "btn-tertiary-icon",
13
+ "tertiary-link": "btn-tertiary-link",
14
+ "icon-black": "btn-icon-black",
15
+ "icon-grey": "btn-icon-grey",
16
+ "icon-mobile": "btn-icon-mobile"
17
+ }, o = {
18
+ "primary-green": "sm:btn-primary-green",
19
+ "primary-darkgreen": "sm:btn-primary-darkgreen",
20
+ "primary-yellow": "sm:btn-primary-yellow",
21
+ "primary-white": "sm:btn-primary-white",
22
+ "secondary-green": "sm:btn-secondary-green",
23
+ "secondary-yellow": "sm:btn-secondary-yellow",
24
+ "secondary-red": "sm:btn-secondary-red",
25
+ "secondary-black": "sm:btn-secondary-black",
26
+ "tertiary-bold": "sm:btn-tertiary-bold",
27
+ "tertiary-thin": "sm:btn-tertiary-thin",
28
+ "tertiary-icon": "sm:btn-tertiary-icon",
29
+ "tertiary-link": "sm:btn-tertiary-link",
30
+ "icon-black": "sm:btn-icon-black",
31
+ "icon-grey": "sm:btn-icon-grey",
32
+ "icon-mobile": "sm:btn-icon-mobile"
33
+ }, b = {
34
+ "primary-green": "md:btn-primary-green",
35
+ "primary-darkgreen": "md:btn-primary-darkgreen",
36
+ "primary-yellow": "md:btn-primary-yellow",
37
+ "primary-white": "md:btn-primary-white",
38
+ "secondary-green": "md:btn-secondary-green",
39
+ "secondary-yellow": "md:btn-secondary-yellow",
40
+ "secondary-red": "md:btn-secondary-red",
41
+ "secondary-black": "md:btn-secondary-black",
42
+ "tertiary-bold": "md:btn-tertiary-bold",
43
+ "tertiary-thin": "md:btn-tertiary-thin",
44
+ "tertiary-icon": "md:btn-tertiary-icon",
45
+ "tertiary-link": "md:btn-tertiary-link",
46
+ "icon-black": "md:btn-icon-black",
47
+ "icon-grey": "md:btn-icon-grey",
48
+ "icon-mobile": "md:btn-icon-mobile"
49
+ }, c = {
50
+ "primary-green": "lg:btn-primary-green",
51
+ "primary-darkgreen": "lg:btn-primary-darkgreen",
52
+ "primary-yellow": "lg:btn-primary-yellow",
53
+ "primary-white": "lg:btn-primary-white",
54
+ "secondary-green": "lg:btn-secondary-green",
55
+ "secondary-yellow": "lg:btn-secondary-yellow",
56
+ "secondary-red": "lg:btn-secondary-red",
57
+ "secondary-black": "lg:btn-secondary-black",
58
+ "tertiary-bold": "lg:btn-tertiary-bold",
59
+ "tertiary-thin": "lg:btn-tertiary-thin",
60
+ "tertiary-icon": "lg:btn-tertiary-icon",
61
+ "tertiary-link": "lg:btn-tertiary-link",
62
+ "icon-black": "lg:btn-icon-black",
63
+ "icon-grey": "lg:btn-icon-grey",
64
+ "icon-mobile": "lg:btn-icon-mobile"
65
+ }, s = {
66
+ "primary-green": "xl:btn-primary-green",
67
+ "primary-darkgreen": "xl:btn-primary-darkgreen",
68
+ "primary-yellow": "xl:btn-primary-yellow",
69
+ "primary-white": "xl:btn-primary-white",
70
+ "secondary-green": "xl:btn-secondary-green",
71
+ "secondary-yellow": "xl:btn-secondary-yellow",
72
+ "secondary-red": "xl:btn-secondary-red",
73
+ "secondary-black": "xl:btn-secondary-black",
74
+ "tertiary-bold": "xl:btn-tertiary-bold",
75
+ "tertiary-thin": "xl:btn-tertiary-thin",
76
+ "tertiary-icon": "xl:btn-tertiary-icon",
77
+ "tertiary-link": "xl:btn-tertiary-link",
78
+ "icon-black": "xl:btn-icon-black",
79
+ "icon-grey": "xl:btn-icon-grey",
80
+ "icon-mobile": "xl:btn-icon-mobile"
81
+ }, d = {
82
+ small: "px-3 py-1.5 text-small",
83
+ default: "px-4 py-2.5 text-medium",
84
+ large: "px-6 py-3 text-big"
85
+ }, p = (i = "default", r = "primary-green", n = "left", y = !1, a) => {
86
+ const l = () => n === "top" ? "flex-col" : n === "right" ? "flex-row-reverse" : "flex-row";
87
+ return [
88
+ y ? "" : "cursor-pointer",
89
+ (() => {
90
+ if (typeof r == "string")
91
+ return t[r];
92
+ const e = [];
93
+ return r.initial && e.push(t[r.initial]), r.sm && e.push(o[r.sm]), r.md && e.push(b[r.md]), r.lg && e.push(c[r.lg]), r.xl && e.push(s[r.xl]), e.join(" ");
94
+ })(),
95
+ d[i],
96
+ l(),
97
+ a
98
+ ].join(" ");
99
+ };
100
+ export {
101
+ p as getButtonClasses
102
+ };
@@ -5,7 +5,7 @@ import { ReactNode } from 'react';
5
5
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
6
6
  children: ReactNode;
7
7
  size?: ButtonSize;
8
- variant?: ButtonVariant;
8
+ variant?: ResponsiveButtonVariant;
9
9
  iconPosition?: IconPosition;
10
10
  }
11
11
 
@@ -28,6 +28,14 @@ export declare interface CategoriesSectionProps {
28
28
 
29
29
  export type IconPosition = 'left' | 'right' | 'top';
30
30
 
31
+ export type ResponsiveButtonVariant = ButtonVariant | {
32
+ initial?: ButtonVariant;
33
+ sm?: ButtonVariant;
34
+ md?: ButtonVariant;
35
+ lg?: ButtonVariant;
36
+ xl?: ButtonVariant;
37
+ };
38
+
31
39
  export interface SectionHeadingProps {
32
40
  title: string;
33
41
  description?: string;
@@ -36,7 +36,7 @@ export interface BreadcrumbProps {
36
36
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
37
37
  children: ReactNode;
38
38
  size?: ButtonSize;
39
- variant?: ButtonVariant;
39
+ variant?: ResponsiveButtonVariant;
40
40
  iconPosition?: IconPosition;
41
41
  }
42
42
 
@@ -137,6 +137,14 @@ export interface LinkedProductProps {
137
137
  children: ReactNode;
138
138
  }
139
139
 
140
+ export type ResponsiveButtonVariant = ButtonVariant | {
141
+ initial?: ButtonVariant;
142
+ sm?: ButtonVariant;
143
+ md?: ButtonVariant;
144
+ lg?: ButtonVariant;
145
+ xl?: ButtonVariant;
146
+ };
147
+
140
148
  export interface SectionHeadingProps {
141
149
  title: string;
142
150
  description?: string;
@@ -17,7 +17,7 @@ export interface BaseSubtypeDocumentProps {
17
17
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
18
18
  children: ReactNode;
19
19
  size?: ButtonSize;
20
- variant?: ButtonVariant;
20
+ variant?: ResponsiveButtonVariant;
21
21
  iconPosition?: IconPosition;
22
22
  }
23
23
 
@@ -61,5 +61,13 @@ export interface LinkedProductProps {
61
61
  children: ReactNode;
62
62
  }
63
63
 
64
+ export type ResponsiveButtonVariant = ButtonVariant | {
65
+ initial?: ButtonVariant;
66
+ sm?: ButtonVariant;
67
+ md?: ButtonVariant;
68
+ lg?: ButtonVariant;
69
+ xl?: ButtonVariant;
70
+ };
71
+
64
72
  export type SubtypeDocumentProps = DefaultSubtypeDocumentProps | AlternativeSubtypeDocumentProps;
65
73
 
@@ -5,7 +5,7 @@ import { ReactNode } from 'react';
5
5
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
6
6
  children: ReactNode;
7
7
  size?: ButtonSize;
8
- variant?: ButtonVariant;
8
+ variant?: ResponsiveButtonVariant;
9
9
  iconPosition?: IconPosition;
10
10
  }
11
11
 
@@ -22,4 +22,12 @@ export declare interface CtaSectionProps {
22
22
  }
23
23
 
24
24
  export type IconPosition = 'left' | 'right' | 'top';
25
+
26
+ export type ResponsiveButtonVariant = ButtonVariant | {
27
+ initial?: ButtonVariant;
28
+ sm?: ButtonVariant;
29
+ md?: ButtonVariant;
30
+ lg?: ButtonVariant;
31
+ xl?: ButtonVariant;
32
+ };
25
33
 
@@ -17,7 +17,7 @@ export declare interface BaseSubtypeDocumentProps {
17
17
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
18
18
  children: ReactNode;
19
19
  size?: ButtonSize;
20
- variant?: ButtonVariant;
20
+ variant?: ResponsiveButtonVariant;
21
21
  iconPosition?: IconPosition;
22
22
  }
23
23
 
@@ -35,5 +35,13 @@ export declare interface DefaultSubtypeDocumentProps extends BaseSubtypeDocument
35
35
 
36
36
  export type IconPosition = 'left' | 'right' | 'top';
37
37
 
38
+ export type ResponsiveButtonVariant = ButtonVariant | {
39
+ initial?: ButtonVariant;
40
+ sm?: ButtonVariant;
41
+ md?: ButtonVariant;
42
+ lg?: ButtonVariant;
43
+ xl?: ButtonVariant;
44
+ };
45
+
38
46
  export declare type SubtypeDocumentProps = DefaultSubtypeDocumentProps | AlternativeSubtypeDocumentProps;
39
47
 
@@ -5,7 +5,7 @@ import { ReactNode } from 'react';
5
5
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
6
6
  children: ReactNode;
7
7
  size?: ButtonSize;
8
- variant?: ButtonVariant;
8
+ variant?: ResponsiveButtonVariant;
9
9
  iconPosition?: IconPosition;
10
10
  }
11
11
 
@@ -21,4 +21,12 @@ export declare interface DocsModuleProps {
21
21
  export declare const DocsModules: FC<DocsModuleProps>;
22
22
 
23
23
  export type IconPosition = 'left' | 'right' | 'top';
24
+
25
+ export type ResponsiveButtonVariant = ButtonVariant | {
26
+ initial?: ButtonVariant;
27
+ sm?: ButtonVariant;
28
+ md?: ButtonVariant;
29
+ lg?: ButtonVariant;
30
+ xl?: ButtonVariant;
31
+ };
24
32
 
@@ -1,45 +1,41 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as r } from "react/jsx-runtime";
3
- import { useId as m } from "react";
4
- import { FaqItemWrapper as c } from "./FaqItemWrapper.js";
5
- import { Markdown as d } from "./Markdown.js";
6
- import { ChevronDownIcon as n } from "./ChevronDownIcon.js";
7
- const N = ({
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
8
  question: a,
9
- answer: s,
10
- showMoreText: o,
11
- collapsedButtonText: i = "Show Less",
12
- expandedButtonText: l = "Show More"
9
+ answer: o,
10
+ showMoreText: n,
11
+ collapsedButtonText: m,
12
+ expandedButtonText: s
13
13
  }) => {
14
- const t = `toggle-${m().replace(/:/g, "")}`;
15
- 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: [
16
- /* @__PURE__ */ e(d, { content: s, className: "text-medium" }),
17
- o && /* @__PURE__ */ r("div", { className: "mt-4 rounded-lg bg-neutral-50 p-6", children: [
18
- /* @__PURE__ */ e("input", { type: "checkbox", id: t, className: "peer sr-only" }),
19
- /* @__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: o }),
20
- /* @__PURE__ */ r(
21
- "label",
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: [
18
+ /* @__PURE__ */ e(
19
+ "p",
22
20
  {
23
- htmlFor: t,
24
- className: "text-primary-700 flex cursor-pointer items-center gap-1 text-sm font-medium transition-colors peer-checked:hidden",
25
- children: [
26
- l,
27
- /* @__PURE__ */ e(n, { fill: "var(--primary-700)", className: "h-4 w-4 transition-transform duration-200" })
28
- ]
21
+ className: `mb-4 text-xs leading-relaxed wrap-break-word text-neutral-800 ${t ? "" : "line-clamp-4"}`,
22
+ children: n
29
23
  }
30
24
  ),
31
25
  /* @__PURE__ */ r(
32
- "label",
26
+ "button",
33
27
  {
34
- htmlFor: t,
35
- className: "text-primary-700 hidden cursor-pointer items-center gap-1 text-sm font-medium transition-colors peer-checked:flex",
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
+ },
36
32
  children: [
37
- i,
33
+ t ? m : s,
38
34
  /* @__PURE__ */ e(
39
- n,
35
+ u,
40
36
  {
41
37
  fill: "var(--primary-700)",
42
- className: "h-4 w-4 rotate-180 transition-transform duration-200"
38
+ className: `h-4 w-4 transition-transform duration-200 ${t ? "rotate-180" : ""} `
43
39
  }
44
40
  )
45
41
  ]
@@ -49,5 +45,5 @@ const N = ({
49
45
  ] }) });
50
46
  };
51
47
  export {
52
- N as FaqItem
48
+ g as FaqItem
53
49
  };
@@ -5,7 +5,7 @@ import { ReactNode } from 'react';
5
5
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
6
6
  children: ReactNode;
7
7
  size?: ButtonSize;
8
- variant?: ButtonVariant;
8
+ variant?: ResponsiveButtonVariant;
9
9
  iconPosition?: IconPosition;
10
10
  }
11
11
 
@@ -27,6 +27,14 @@ export declare interface FaqTeaserSectionProps {
27
27
 
28
28
  export type IconPosition = 'left' | 'right' | 'top';
29
29
 
30
+ export type ResponsiveButtonVariant = ButtonVariant | {
31
+ initial?: ButtonVariant;
32
+ sm?: ButtonVariant;
33
+ md?: ButtonVariant;
34
+ lg?: ButtonVariant;
35
+ xl?: ButtonVariant;
36
+ };
37
+
30
38
  export interface SectionHeadingProps {
31
39
  title: string;
32
40
  description?: string;
@@ -5,7 +5,7 @@ import { ReactNode } from 'react';
5
5
  export interface ButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'children'> {
6
6
  children: ReactNode;
7
7
  size?: ButtonSize;
8
- variant?: ButtonVariant;
8
+ variant?: ResponsiveButtonVariant;
9
9
  iconPosition?: IconPosition;
10
10
  }
11
11
 
@@ -32,6 +32,14 @@ export declare interface GuidelinesSectionProps {
32
32
 
33
33
  export type IconPosition = 'left' | 'right' | 'top';
34
34
 
35
+ export type ResponsiveButtonVariant = ButtonVariant | {
36
+ initial?: ButtonVariant;
37
+ sm?: ButtonVariant;
38
+ md?: ButtonVariant;
39
+ lg?: ButtonVariant;
40
+ xl?: ButtonVariant;
41
+ };
42
+
35
43
  export interface SectionHeadingProps {
36
44
  title: string;
37
45
  description?: string;