@opensite/ui 2.4.7 → 2.4.9
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/about-developer-profile.cjs +1 -1
- package/dist/about-developer-profile.js +1 -1
- package/dist/about-stats-sidebar.cjs +5 -3
- package/dist/about-stats-sidebar.js +5 -3
- package/dist/about-story-hero.cjs +119 -105
- package/dist/about-story-hero.js +101 -102
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/cta-accent-background.cjs +8 -69
- package/dist/cta-accent-background.d.cts +1 -1
- package/dist/cta-accent-background.d.ts +1 -1
- package/dist/cta-accent-background.js +8 -69
- package/dist/cta-app-download-newsletter.cjs +4 -81
- package/dist/cta-app-download-newsletter.js +4 -81
- package/dist/faq-badge-support.cjs +97 -84
- package/dist/faq-badge-support.d.cts +1 -1
- package/dist/faq-badge-support.d.ts +1 -1
- package/dist/faq-badge-support.js +97 -83
- package/dist/faq-sidebar-navigation.cjs +106 -72
- package/dist/faq-sidebar-navigation.d.cts +1 -1
- package/dist/faq-sidebar-navigation.d.ts +1 -1
- package/dist/faq-sidebar-navigation.js +104 -70
- package/dist/faq-simple-accordion.cjs +83 -50
- package/dist/faq-simple-accordion.d.cts +13 -1
- package/dist/faq-simple-accordion.d.ts +13 -1
- package/dist/faq-simple-accordion.js +82 -46
- package/dist/feature-accordion-image.cjs +115 -85
- package/dist/feature-accordion-image.js +113 -83
- package/dist/feature-animated-carousel.cjs +2 -2
- package/dist/feature-animated-carousel.js +2 -2
- package/dist/feature-image-cards-three-column.cjs +2 -2
- package/dist/feature-image-cards-three-column.js +2 -2
- package/dist/footer-accordion-social.cjs +1 -1
- package/dist/footer-accordion-social.js +1 -1
- package/dist/footer-animated-social.cjs +1 -1
- package/dist/footer-animated-social.js +1 -1
- package/dist/footer-brand-description.cjs +1 -1
- package/dist/footer-brand-description.js +1 -1
- package/dist/footer-brand-links-contact.cjs +1 -1
- package/dist/footer-brand-links-contact.js +1 -1
- package/dist/footer-comprehensive-links.cjs +1 -1
- package/dist/footer-comprehensive-links.js +1 -1
- package/dist/footer-contact-card.cjs +1 -1
- package/dist/footer-contact-card.js +1 -1
- package/dist/footer-cta-banner.cjs +1 -1
- package/dist/footer-cta-banner.js +1 -1
- package/dist/footer-cta-social.cjs +1 -1
- package/dist/footer-cta-social.js +1 -1
- package/dist/footer-info-cards-accordion.cjs +1 -1
- package/dist/footer-info-cards-accordion.js +1 -1
- package/dist/footer-nav-social.cjs +1 -1
- package/dist/footer-nav-social.js +1 -1
- package/dist/footer-newsletter-contact.cjs +1 -1
- package/dist/footer-newsletter-contact.js +1 -1
- package/dist/footer-newsletter-grid.cjs +1 -1
- package/dist/footer-newsletter-grid.js +1 -1
- package/dist/footer-newsletter-minimal.cjs +1 -1
- package/dist/footer-newsletter-minimal.js +1 -1
- package/dist/footer-social-apps.cjs +1 -1
- package/dist/footer-social-apps.js +1 -1
- package/dist/footer-social-newsletter.cjs +1 -1
- package/dist/footer-social-newsletter.js +1 -1
- package/dist/footer-split-image-accordion.cjs +1 -1
- package/dist/footer-split-image-accordion.js +1 -1
- package/dist/hero-coming-soon-countdown.cjs +1 -1
- package/dist/hero-coming-soon-countdown.js +1 -1
- package/dist/hero-event-registration.cjs +1 -1
- package/dist/hero-event-registration.js +1 -1
- package/dist/hero-product-showcase-floating.cjs +120 -90
- package/dist/hero-product-showcase-floating.d.cts +5 -1
- package/dist/hero-product-showcase-floating.d.ts +5 -1
- package/dist/hero-product-showcase-floating.js +120 -90
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/link-page-bento-layout.cjs +1 -1
- package/dist/link-page-bento-layout.js +1 -1
- package/dist/link-page-grid-cards.cjs +1 -1
- package/dist/link-page-grid-cards.js +1 -1
- package/dist/link-page-minimal-profile.cjs +1 -1
- package/dist/link-page-minimal-profile.js +1 -1
- package/dist/link-page-newsletter-social.cjs +1 -1
- package/dist/link-page-newsletter-social.js +1 -1
- package/dist/link-tree-block.cjs +1 -1
- package/dist/link-tree-block.js +1 -1
- package/dist/navbar-fullscreen-menu.cjs +1 -1
- package/dist/navbar-fullscreen-menu.js +1 -1
- package/dist/navbar-transparent-overlay.cjs +1 -1
- package/dist/navbar-transparent-overlay.js +1 -1
- package/dist/registry.cjs +397 -290
- package/dist/registry.js +397 -290
- package/dist/social-link-icon.cjs +1 -1
- package/dist/social-link-icon.js +1 -1
- package/package.json +2 -2
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var React4 = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
8
8
|
var icon = require('@page-speed/icon');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
10
|
|
|
11
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
|
|
13
11
|
function _interopNamespace(e) {
|
|
14
12
|
if (e && e.__esModule) return e;
|
|
15
13
|
var n = Object.create(null);
|
|
@@ -28,39 +26,13 @@ function _interopNamespace(e) {
|
|
|
28
26
|
return Object.freeze(n);
|
|
29
27
|
}
|
|
30
28
|
|
|
31
|
-
var
|
|
29
|
+
var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
|
|
32
30
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
33
31
|
|
|
34
32
|
// components/blocks/faq/faq-simple-accordion.tsx
|
|
35
33
|
function cn(...inputs) {
|
|
36
34
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
37
35
|
}
|
|
38
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
39
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
40
|
-
if (isDark) {
|
|
41
|
-
switch (variant) {
|
|
42
|
-
case "default":
|
|
43
|
-
return "text-foreground";
|
|
44
|
-
case "muted":
|
|
45
|
-
return "text-foreground/80";
|
|
46
|
-
case "subtle":
|
|
47
|
-
return "text-foreground/60";
|
|
48
|
-
case "accent":
|
|
49
|
-
return "text-accent-foreground";
|
|
50
|
-
}
|
|
51
|
-
} else {
|
|
52
|
-
switch (variant) {
|
|
53
|
-
case "default":
|
|
54
|
-
return "text-foreground";
|
|
55
|
-
case "muted":
|
|
56
|
-
return "text-muted-foreground";
|
|
57
|
-
case "subtle":
|
|
58
|
-
return "text-muted-foreground/70";
|
|
59
|
-
case "accent":
|
|
60
|
-
return "text-primary";
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
36
|
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
65
37
|
function DynamicIcon({ apiKey, ...props }) {
|
|
66
38
|
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
@@ -134,7 +106,7 @@ var maxWidthStyles = {
|
|
|
134
106
|
"4xl": "max-w-[1536px]",
|
|
135
107
|
full: "max-w-full"
|
|
136
108
|
};
|
|
137
|
-
var Container =
|
|
109
|
+
var Container = React4__namespace.default.forwardRef(
|
|
138
110
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
139
111
|
const Component = as;
|
|
140
112
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -439,7 +411,7 @@ var spacingStyles = {
|
|
|
439
411
|
};
|
|
440
412
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
441
413
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
442
|
-
var Section =
|
|
414
|
+
var Section = React4__namespace.default.forwardRef(
|
|
443
415
|
({
|
|
444
416
|
id,
|
|
445
417
|
title,
|
|
@@ -500,24 +472,59 @@ var Section = React__default.default.forwardRef(
|
|
|
500
472
|
}
|
|
501
473
|
);
|
|
502
474
|
Section.displayName = "Section";
|
|
475
|
+
function TextInner({ as, className, children, ...props }, ref) {
|
|
476
|
+
const Component = as || "span";
|
|
477
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: cn(className), ...props, children });
|
|
478
|
+
}
|
|
479
|
+
var Text = React4__namespace.forwardRef(TextInner);
|
|
480
|
+
Text.displayName = "Text";
|
|
481
|
+
function isContentTextItem(item) {
|
|
482
|
+
return item !== null && typeof item === "object" && !React4__namespace.isValidElement(item) && "_type" in item && item._type === "text";
|
|
483
|
+
}
|
|
484
|
+
var ContentGroup = React4__namespace.forwardRef(
|
|
485
|
+
({ items, className, children, ...props }, ref) => {
|
|
486
|
+
const hasContent = items && items.length > 0;
|
|
487
|
+
if (!hasContent) {
|
|
488
|
+
return null;
|
|
489
|
+
}
|
|
490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn(className), ...props, children: [
|
|
491
|
+
items.map((item, idx) => {
|
|
492
|
+
if (isContentTextItem(item)) {
|
|
493
|
+
const { _type, ...textProps } = item;
|
|
494
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...textProps }, idx);
|
|
495
|
+
}
|
|
496
|
+
const reactNode = item;
|
|
497
|
+
if (React4__namespace.isValidElement(reactNode)) {
|
|
498
|
+
return React4__namespace.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
499
|
+
}
|
|
500
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React4__namespace.Fragment, { children: reactNode }, idx);
|
|
501
|
+
}),
|
|
502
|
+
children
|
|
503
|
+
] });
|
|
504
|
+
}
|
|
505
|
+
);
|
|
506
|
+
ContentGroup.displayName = "ContentGroup";
|
|
503
507
|
function FaqSimpleAccordion({
|
|
504
508
|
heading,
|
|
505
509
|
items,
|
|
506
510
|
itemsSlot,
|
|
507
511
|
background,
|
|
508
|
-
|
|
512
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
513
|
+
spacing = "lg",
|
|
509
514
|
pattern,
|
|
510
515
|
patternOpacity,
|
|
511
516
|
patternClassName,
|
|
512
517
|
className,
|
|
513
|
-
|
|
518
|
+
description,
|
|
519
|
+
descriptionClassName,
|
|
514
520
|
headingClassName,
|
|
521
|
+
headerClassName,
|
|
515
522
|
accordionClassName,
|
|
516
523
|
accordionItemClassName,
|
|
517
524
|
accordionTriggerClassName,
|
|
518
525
|
accordionContentClassName
|
|
519
526
|
}) {
|
|
520
|
-
const itemsContent =
|
|
527
|
+
const itemsContent = React4.useMemo(() => {
|
|
521
528
|
if (itemsSlot) return itemsSlot;
|
|
522
529
|
if (!items || items.length === 0) return null;
|
|
523
530
|
return /* @__PURE__ */ jsxRuntime.jsx(Accordion, { type: "single", collapsible: true, className: accordionClassName, children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -536,13 +543,7 @@ function FaqSimpleAccordion({
|
|
|
536
543
|
children: item.question
|
|
537
544
|
}
|
|
538
545
|
),
|
|
539
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
540
|
-
AccordionContent,
|
|
541
|
-
{
|
|
542
|
-
className: cn(getTextColor(background, "muted"), accordionContentClassName),
|
|
543
|
-
children: item.answer
|
|
544
|
-
}
|
|
545
|
-
)
|
|
546
|
+
/* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: cn(accordionContentClassName), children: item.answer })
|
|
546
547
|
]
|
|
547
548
|
},
|
|
548
549
|
item.id || index
|
|
@@ -556,6 +557,37 @@ function FaqSimpleAccordion({
|
|
|
556
557
|
accordionContentClassName,
|
|
557
558
|
background
|
|
558
559
|
]);
|
|
560
|
+
const contentItems = React4.useMemo(() => {
|
|
561
|
+
const items2 = [];
|
|
562
|
+
if (heading) {
|
|
563
|
+
if (typeof heading === "string") {
|
|
564
|
+
items2.push({
|
|
565
|
+
_type: "text",
|
|
566
|
+
as: "h2",
|
|
567
|
+
className: cn(
|
|
568
|
+
"font-semibold text-4xl md:text-5xl lg:text-6xl",
|
|
569
|
+
headingClassName
|
|
570
|
+
),
|
|
571
|
+
children: heading
|
|
572
|
+
});
|
|
573
|
+
} else {
|
|
574
|
+
items2.push(heading);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (description) {
|
|
578
|
+
if (typeof description === "string") {
|
|
579
|
+
items2.push({
|
|
580
|
+
_type: "text",
|
|
581
|
+
as: "p",
|
|
582
|
+
className: cn("text-lg opacity-70", descriptionClassName),
|
|
583
|
+
children: description
|
|
584
|
+
});
|
|
585
|
+
} else {
|
|
586
|
+
items2.push(description);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
return items2;
|
|
590
|
+
}, [heading, headingClassName, description, descriptionClassName]);
|
|
559
591
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
560
592
|
Section,
|
|
561
593
|
{
|
|
@@ -565,17 +597,18 @@ function FaqSimpleAccordion({
|
|
|
565
597
|
patternOpacity,
|
|
566
598
|
patternClassName,
|
|
567
599
|
className,
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
600
|
+
containerClassName,
|
|
601
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto max-w-full md:max-w-3xl space-y-4 md:space-y-8", children: [
|
|
602
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
603
|
+
ContentGroup,
|
|
571
604
|
{
|
|
605
|
+
items: contentItems,
|
|
572
606
|
className: cn(
|
|
573
|
-
"
|
|
574
|
-
|
|
575
|
-
)
|
|
576
|
-
children: heading
|
|
607
|
+
"flex flex-col gap-2 text-left items-start",
|
|
608
|
+
headerClassName
|
|
609
|
+
)
|
|
577
610
|
}
|
|
578
|
-
)
|
|
611
|
+
),
|
|
579
612
|
itemsContent
|
|
580
613
|
] })
|
|
581
614
|
}
|
|
@@ -74,7 +74,19 @@ interface FaqSimpleAccordionProps {
|
|
|
74
74
|
* Additional CSS classes for accordion content
|
|
75
75
|
*/
|
|
76
76
|
accordionContentClassName?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Description text below heading
|
|
79
|
+
*/
|
|
80
|
+
description?: React.ReactNode;
|
|
81
|
+
/**
|
|
82
|
+
* Additional CSS classes for the description
|
|
83
|
+
*/
|
|
84
|
+
descriptionClassName?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Additional CSS classes for the header wrapper
|
|
87
|
+
*/
|
|
88
|
+
headerClassName?: string;
|
|
77
89
|
}
|
|
78
|
-
declare function FaqSimpleAccordion({ heading, items, itemsSlot, background, spacing, pattern, patternOpacity, patternClassName, className,
|
|
90
|
+
declare function FaqSimpleAccordion({ heading, items, itemsSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, description, descriptionClassName, headingClassName, headerClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, }: FaqSimpleAccordionProps): react_jsx_runtime.JSX.Element;
|
|
79
91
|
|
|
80
92
|
export { type FaqItem, FaqSimpleAccordion, type FaqSimpleAccordionProps };
|
|
@@ -74,7 +74,19 @@ interface FaqSimpleAccordionProps {
|
|
|
74
74
|
* Additional CSS classes for accordion content
|
|
75
75
|
*/
|
|
76
76
|
accordionContentClassName?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Description text below heading
|
|
79
|
+
*/
|
|
80
|
+
description?: React.ReactNode;
|
|
81
|
+
/**
|
|
82
|
+
* Additional CSS classes for the description
|
|
83
|
+
*/
|
|
84
|
+
descriptionClassName?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Additional CSS classes for the header wrapper
|
|
87
|
+
*/
|
|
88
|
+
headerClassName?: string;
|
|
77
89
|
}
|
|
78
|
-
declare function FaqSimpleAccordion({ heading, items, itemsSlot, background, spacing, pattern, patternOpacity, patternClassName, className,
|
|
90
|
+
declare function FaqSimpleAccordion({ heading, items, itemsSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, description, descriptionClassName, headingClassName, headerClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, }: FaqSimpleAccordionProps): react_jsx_runtime.JSX.Element;
|
|
79
91
|
|
|
80
92
|
export { type FaqItem, FaqSimpleAccordion, type FaqSimpleAccordionProps };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
2
|
+
import * as React4 from 'react';
|
|
3
|
+
import React4__default, { useMemo } from 'react';
|
|
3
4
|
import { clsx } from 'clsx';
|
|
4
5
|
import { twMerge } from 'tailwind-merge';
|
|
5
6
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
@@ -10,32 +11,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
10
11
|
function cn(...inputs) {
|
|
11
12
|
return twMerge(clsx(inputs));
|
|
12
13
|
}
|
|
13
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
14
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
15
|
-
if (isDark) {
|
|
16
|
-
switch (variant) {
|
|
17
|
-
case "default":
|
|
18
|
-
return "text-foreground";
|
|
19
|
-
case "muted":
|
|
20
|
-
return "text-foreground/80";
|
|
21
|
-
case "subtle":
|
|
22
|
-
return "text-foreground/60";
|
|
23
|
-
case "accent":
|
|
24
|
-
return "text-accent-foreground";
|
|
25
|
-
}
|
|
26
|
-
} else {
|
|
27
|
-
switch (variant) {
|
|
28
|
-
case "default":
|
|
29
|
-
return "text-foreground";
|
|
30
|
-
case "muted":
|
|
31
|
-
return "text-muted-foreground";
|
|
32
|
-
case "subtle":
|
|
33
|
-
return "text-muted-foreground/70";
|
|
34
|
-
case "accent":
|
|
35
|
-
return "text-primary";
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
14
|
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
40
15
|
function DynamicIcon({ apiKey, ...props }) {
|
|
41
16
|
return /* @__PURE__ */ jsx(Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
@@ -109,7 +84,7 @@ var maxWidthStyles = {
|
|
|
109
84
|
"4xl": "max-w-[1536px]",
|
|
110
85
|
full: "max-w-full"
|
|
111
86
|
};
|
|
112
|
-
var Container =
|
|
87
|
+
var Container = React4__default.forwardRef(
|
|
113
88
|
({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
|
|
114
89
|
const Component = as;
|
|
115
90
|
return /* @__PURE__ */ jsx(
|
|
@@ -414,7 +389,7 @@ var spacingStyles = {
|
|
|
414
389
|
};
|
|
415
390
|
var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
|
|
416
391
|
var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
|
|
417
|
-
var Section =
|
|
392
|
+
var Section = React4__default.forwardRef(
|
|
418
393
|
({
|
|
419
394
|
id,
|
|
420
395
|
title,
|
|
@@ -475,18 +450,53 @@ var Section = React.forwardRef(
|
|
|
475
450
|
}
|
|
476
451
|
);
|
|
477
452
|
Section.displayName = "Section";
|
|
453
|
+
function TextInner({ as, className, children, ...props }, ref) {
|
|
454
|
+
const Component = as || "span";
|
|
455
|
+
return /* @__PURE__ */ jsx(Component, { ref, className: cn(className), ...props, children });
|
|
456
|
+
}
|
|
457
|
+
var Text = React4.forwardRef(TextInner);
|
|
458
|
+
Text.displayName = "Text";
|
|
459
|
+
function isContentTextItem(item) {
|
|
460
|
+
return item !== null && typeof item === "object" && !React4.isValidElement(item) && "_type" in item && item._type === "text";
|
|
461
|
+
}
|
|
462
|
+
var ContentGroup = React4.forwardRef(
|
|
463
|
+
({ items, className, children, ...props }, ref) => {
|
|
464
|
+
const hasContent = items && items.length > 0;
|
|
465
|
+
if (!hasContent) {
|
|
466
|
+
return null;
|
|
467
|
+
}
|
|
468
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn(className), ...props, children: [
|
|
469
|
+
items.map((item, idx) => {
|
|
470
|
+
if (isContentTextItem(item)) {
|
|
471
|
+
const { _type, ...textProps } = item;
|
|
472
|
+
return /* @__PURE__ */ jsx(Text, { ...textProps }, idx);
|
|
473
|
+
}
|
|
474
|
+
const reactNode = item;
|
|
475
|
+
if (React4.isValidElement(reactNode)) {
|
|
476
|
+
return React4.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
477
|
+
}
|
|
478
|
+
return /* @__PURE__ */ jsx(React4.Fragment, { children: reactNode }, idx);
|
|
479
|
+
}),
|
|
480
|
+
children
|
|
481
|
+
] });
|
|
482
|
+
}
|
|
483
|
+
);
|
|
484
|
+
ContentGroup.displayName = "ContentGroup";
|
|
478
485
|
function FaqSimpleAccordion({
|
|
479
486
|
heading,
|
|
480
487
|
items,
|
|
481
488
|
itemsSlot,
|
|
482
489
|
background,
|
|
483
|
-
|
|
490
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
491
|
+
spacing = "lg",
|
|
484
492
|
pattern,
|
|
485
493
|
patternOpacity,
|
|
486
494
|
patternClassName,
|
|
487
495
|
className,
|
|
488
|
-
|
|
496
|
+
description,
|
|
497
|
+
descriptionClassName,
|
|
489
498
|
headingClassName,
|
|
499
|
+
headerClassName,
|
|
490
500
|
accordionClassName,
|
|
491
501
|
accordionItemClassName,
|
|
492
502
|
accordionTriggerClassName,
|
|
@@ -511,13 +521,7 @@ function FaqSimpleAccordion({
|
|
|
511
521
|
children: item.question
|
|
512
522
|
}
|
|
513
523
|
),
|
|
514
|
-
/* @__PURE__ */ jsx(
|
|
515
|
-
AccordionContent,
|
|
516
|
-
{
|
|
517
|
-
className: cn(getTextColor(background, "muted"), accordionContentClassName),
|
|
518
|
-
children: item.answer
|
|
519
|
-
}
|
|
520
|
-
)
|
|
524
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: cn(accordionContentClassName), children: item.answer })
|
|
521
525
|
]
|
|
522
526
|
},
|
|
523
527
|
item.id || index
|
|
@@ -531,6 +535,37 @@ function FaqSimpleAccordion({
|
|
|
531
535
|
accordionContentClassName,
|
|
532
536
|
background
|
|
533
537
|
]);
|
|
538
|
+
const contentItems = useMemo(() => {
|
|
539
|
+
const items2 = [];
|
|
540
|
+
if (heading) {
|
|
541
|
+
if (typeof heading === "string") {
|
|
542
|
+
items2.push({
|
|
543
|
+
_type: "text",
|
|
544
|
+
as: "h2",
|
|
545
|
+
className: cn(
|
|
546
|
+
"font-semibold text-4xl md:text-5xl lg:text-6xl",
|
|
547
|
+
headingClassName
|
|
548
|
+
),
|
|
549
|
+
children: heading
|
|
550
|
+
});
|
|
551
|
+
} else {
|
|
552
|
+
items2.push(heading);
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
if (description) {
|
|
556
|
+
if (typeof description === "string") {
|
|
557
|
+
items2.push({
|
|
558
|
+
_type: "text",
|
|
559
|
+
as: "p",
|
|
560
|
+
className: cn("text-lg opacity-70", descriptionClassName),
|
|
561
|
+
children: description
|
|
562
|
+
});
|
|
563
|
+
} else {
|
|
564
|
+
items2.push(description);
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return items2;
|
|
568
|
+
}, [heading, headingClassName, description, descriptionClassName]);
|
|
534
569
|
return /* @__PURE__ */ jsx(
|
|
535
570
|
Section,
|
|
536
571
|
{
|
|
@@ -540,17 +575,18 @@ function FaqSimpleAccordion({
|
|
|
540
575
|
patternOpacity,
|
|
541
576
|
patternClassName,
|
|
542
577
|
className,
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
578
|
+
containerClassName,
|
|
579
|
+
children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-full md:max-w-3xl space-y-4 md:space-y-8", children: [
|
|
580
|
+
/* @__PURE__ */ jsx(
|
|
581
|
+
ContentGroup,
|
|
546
582
|
{
|
|
583
|
+
items: contentItems,
|
|
547
584
|
className: cn(
|
|
548
|
-
"
|
|
549
|
-
|
|
550
|
-
)
|
|
551
|
-
children: heading
|
|
585
|
+
"flex flex-col gap-2 text-left items-start",
|
|
586
|
+
headerClassName
|
|
587
|
+
)
|
|
552
588
|
}
|
|
553
|
-
)
|
|
589
|
+
),
|
|
554
590
|
itemsContent
|
|
555
591
|
] })
|
|
556
592
|
}
|