@opensite/ui 2.4.8 → 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-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 +396 -289
- package/dist/registry.js +396 -289
- package/dist/social-link-icon.cjs +1 -1
- package/dist/social-link-icon.js +1 -1
- package/package.json +2 -2
|
@@ -7,7 +7,6 @@ var tailwindMerge = require('tailwind-merge');
|
|
|
7
7
|
var reactSlot = require('@radix-ui/react-slot');
|
|
8
8
|
var classVarianceAuthority = require('class-variance-authority');
|
|
9
9
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
|
-
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
11
10
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
12
11
|
var icon = require('@page-speed/icon');
|
|
13
12
|
|
|
@@ -30,39 +29,12 @@ function _interopNamespace(e) {
|
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
|
-
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
34
32
|
var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
|
|
35
33
|
|
|
36
34
|
// components/blocks/faq/faq-badge-support.tsx
|
|
37
35
|
function cn(...inputs) {
|
|
38
36
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
39
37
|
}
|
|
40
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
41
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
42
|
-
if (isDark) {
|
|
43
|
-
switch (variant) {
|
|
44
|
-
case "default":
|
|
45
|
-
return "text-foreground";
|
|
46
|
-
case "muted":
|
|
47
|
-
return "text-foreground/80";
|
|
48
|
-
case "subtle":
|
|
49
|
-
return "text-foreground/60";
|
|
50
|
-
case "accent":
|
|
51
|
-
return "text-accent-foreground";
|
|
52
|
-
}
|
|
53
|
-
} else {
|
|
54
|
-
switch (variant) {
|
|
55
|
-
case "default":
|
|
56
|
-
return "text-foreground";
|
|
57
|
-
case "muted":
|
|
58
|
-
return "text-muted-foreground";
|
|
59
|
-
case "subtle":
|
|
60
|
-
return "text-muted-foreground/70";
|
|
61
|
-
case "accent":
|
|
62
|
-
return "text-primary";
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
38
|
var badgeVariants = classVarianceAuthority.cva(
|
|
67
39
|
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
68
40
|
{
|
|
@@ -95,26 +67,6 @@ function Badge({
|
|
|
95
67
|
}
|
|
96
68
|
);
|
|
97
69
|
}
|
|
98
|
-
function Separator({
|
|
99
|
-
className,
|
|
100
|
-
orientation = "horizontal",
|
|
101
|
-
decorative = true,
|
|
102
|
-
...props
|
|
103
|
-
}) {
|
|
104
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
105
|
-
SeparatorPrimitive__namespace.Root,
|
|
106
|
-
{
|
|
107
|
-
"data-slot": "separator",
|
|
108
|
-
decorative,
|
|
109
|
-
orientation,
|
|
110
|
-
className: cn(
|
|
111
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
112
|
-
className
|
|
113
|
-
),
|
|
114
|
-
...props
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
70
|
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
119
71
|
function DynamicIcon({ apiKey, ...props }) {
|
|
120
72
|
return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
@@ -972,6 +924,38 @@ var Section = React__namespace.default.forwardRef(
|
|
|
972
924
|
}
|
|
973
925
|
);
|
|
974
926
|
Section.displayName = "Section";
|
|
927
|
+
function TextInner({ as, className, children, ...props }, ref) {
|
|
928
|
+
const Component = as || "span";
|
|
929
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Component, { ref, className: cn(className), ...props, children });
|
|
930
|
+
}
|
|
931
|
+
var Text = React__namespace.forwardRef(TextInner);
|
|
932
|
+
Text.displayName = "Text";
|
|
933
|
+
function isContentTextItem(item) {
|
|
934
|
+
return item !== null && typeof item === "object" && !React__namespace.isValidElement(item) && "_type" in item && item._type === "text";
|
|
935
|
+
}
|
|
936
|
+
var ContentGroup = React__namespace.forwardRef(
|
|
937
|
+
({ items, className, children, ...props }, ref) => {
|
|
938
|
+
const hasContent = items && items.length > 0;
|
|
939
|
+
if (!hasContent) {
|
|
940
|
+
return null;
|
|
941
|
+
}
|
|
942
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn(className), ...props, children: [
|
|
943
|
+
items.map((item, idx) => {
|
|
944
|
+
if (isContentTextItem(item)) {
|
|
945
|
+
const { _type, ...textProps } = item;
|
|
946
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Text, { ...textProps }, idx);
|
|
947
|
+
}
|
|
948
|
+
const reactNode = item;
|
|
949
|
+
if (React__namespace.isValidElement(reactNode)) {
|
|
950
|
+
return React__namespace.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
951
|
+
}
|
|
952
|
+
return /* @__PURE__ */ jsxRuntime.jsx(React__namespace.Fragment, { children: reactNode }, idx);
|
|
953
|
+
}),
|
|
954
|
+
children
|
|
955
|
+
] });
|
|
956
|
+
}
|
|
957
|
+
);
|
|
958
|
+
ContentGroup.displayName = "ContentGroup";
|
|
975
959
|
function FaqBadgeSupport({
|
|
976
960
|
badge,
|
|
977
961
|
heading,
|
|
@@ -982,12 +966,12 @@ function FaqBadgeSupport({
|
|
|
982
966
|
supportAction,
|
|
983
967
|
supportSlot,
|
|
984
968
|
background,
|
|
985
|
-
|
|
969
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
970
|
+
spacing = "py-12 md:py-32",
|
|
986
971
|
pattern,
|
|
987
972
|
patternOpacity,
|
|
988
973
|
patternClassName,
|
|
989
974
|
className,
|
|
990
|
-
containerClassName,
|
|
991
975
|
headerClassName,
|
|
992
976
|
badgeClassName,
|
|
993
977
|
headingClassName,
|
|
@@ -1020,14 +1004,14 @@ function FaqBadgeSupport({
|
|
|
1020
1004
|
"transition-opacity duration-200 hover:no-underline hover:opacity-60",
|
|
1021
1005
|
accordionTriggerClassName
|
|
1022
1006
|
),
|
|
1023
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-
|
|
1007
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold py-1 lg:py-2 text-lg leading-tight", children: item.question })
|
|
1024
1008
|
}
|
|
1025
1009
|
),
|
|
1026
1010
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1027
1011
|
AccordionContent,
|
|
1028
1012
|
{
|
|
1029
1013
|
className: cn("sm:mb-1 lg:mb-2", accordionContentClassName),
|
|
1030
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
1014
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg", children: item.answer })
|
|
1031
1015
|
}
|
|
1032
1016
|
)
|
|
1033
1017
|
]
|
|
@@ -1051,11 +1035,16 @@ function FaqBadgeSupport({
|
|
|
1051
1035
|
"div",
|
|
1052
1036
|
{
|
|
1053
1037
|
className: cn(
|
|
1054
|
-
"mx-auto
|
|
1038
|
+
"mx-auto max-w-full md:max-w-3xl",
|
|
1039
|
+
"flex flex-col items-center md:flex-row md:justify-between",
|
|
1040
|
+
"bg-card text-card-foreground",
|
|
1041
|
+
"text-center md:text-left",
|
|
1042
|
+
"gap-4 p-6 md:p-12",
|
|
1043
|
+
"rounded-lg shadow-lg ring-2",
|
|
1055
1044
|
supportSectionClassName
|
|
1056
1045
|
),
|
|
1057
1046
|
children: [
|
|
1058
|
-
supportText && (typeof supportText === "string" ? /* @__PURE__ */ jsxRuntime.jsx("
|
|
1047
|
+
supportText && (typeof supportText === "string" ? /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold", children: supportText }) : supportText),
|
|
1059
1048
|
supportAction && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1060
1049
|
Pressable,
|
|
1061
1050
|
{
|
|
@@ -1075,7 +1064,49 @@ function FaqBadgeSupport({
|
|
|
1075
1064
|
]
|
|
1076
1065
|
}
|
|
1077
1066
|
);
|
|
1078
|
-
}, [
|
|
1067
|
+
}, [
|
|
1068
|
+
supportSlot,
|
|
1069
|
+
supportText,
|
|
1070
|
+
supportAction,
|
|
1071
|
+
supportSectionClassName,
|
|
1072
|
+
background
|
|
1073
|
+
]);
|
|
1074
|
+
const contentItems = React.useMemo(() => {
|
|
1075
|
+
const items2 = [];
|
|
1076
|
+
if (heading) {
|
|
1077
|
+
if (typeof heading === "string") {
|
|
1078
|
+
items2.push({
|
|
1079
|
+
_type: "text",
|
|
1080
|
+
as: "h2",
|
|
1081
|
+
className: cn(
|
|
1082
|
+
"max-w-full md:max-w-md",
|
|
1083
|
+
"text-3xl md:text-4xl lg:text-5xl",
|
|
1084
|
+
"font-semibold text-balance",
|
|
1085
|
+
headingClassName
|
|
1086
|
+
),
|
|
1087
|
+
children: heading
|
|
1088
|
+
});
|
|
1089
|
+
} else {
|
|
1090
|
+
items2.push(heading);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
if (description) {
|
|
1094
|
+
if (typeof description === "string") {
|
|
1095
|
+
items2.push({
|
|
1096
|
+
_type: "text",
|
|
1097
|
+
as: "p",
|
|
1098
|
+
className: cn(
|
|
1099
|
+
"text-base md:text-lg max-w-full md:max-w-md text-balance",
|
|
1100
|
+
descriptionClassName
|
|
1101
|
+
),
|
|
1102
|
+
children: description
|
|
1103
|
+
});
|
|
1104
|
+
} else {
|
|
1105
|
+
items2.push(description);
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
return items2;
|
|
1109
|
+
}, [heading, headingClassName, description, descriptionClassName]);
|
|
1079
1110
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1080
1111
|
Section,
|
|
1081
1112
|
{
|
|
@@ -1085,49 +1116,31 @@ function FaqBadgeSupport({
|
|
|
1085
1116
|
patternOpacity,
|
|
1086
1117
|
patternClassName,
|
|
1087
1118
|
className,
|
|
1088
|
-
|
|
1119
|
+
containerClassName,
|
|
1120
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-8 md:space-y-16", children: [
|
|
1089
1121
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1090
1122
|
"div",
|
|
1091
1123
|
{
|
|
1092
1124
|
className: cn(
|
|
1093
|
-
"mx-auto flex max-w-3xl flex-col text-left md:text-center",
|
|
1125
|
+
"mx-auto flex max-w-full md:max-w-3xl flex-col text-left md:text-center",
|
|
1094
1126
|
headerClassName
|
|
1095
1127
|
),
|
|
1096
1128
|
children: [
|
|
1097
|
-
badge && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
variant: "outline",
|
|
1101
|
-
className: cn("w-fit md:mx-auto", badgeClassName),
|
|
1102
|
-
children: badge
|
|
1103
|
-
}
|
|
1104
|
-
),
|
|
1105
|
-
heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1106
|
-
"h2",
|
|
1107
|
-
{
|
|
1108
|
-
className: cn(
|
|
1109
|
-
"mt-4 text-3xl font-semibold md:text-4xl",
|
|
1110
|
-
headingClassName
|
|
1111
|
-
),
|
|
1112
|
-
children: heading
|
|
1113
|
-
}
|
|
1114
|
-
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
|
|
1115
|
-
description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1116
|
-
"p",
|
|
1129
|
+
badge && /* @__PURE__ */ jsxRuntime.jsx(Badge, { className: cn("px-2", badgeClassName), children: badge }),
|
|
1130
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1131
|
+
ContentGroup,
|
|
1117
1132
|
{
|
|
1133
|
+
items: contentItems,
|
|
1118
1134
|
className: cn(
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
),
|
|
1123
|
-
children: description
|
|
1135
|
+
"flex flex-col gap-2 text-left md:text-center items-start",
|
|
1136
|
+
headerClassName
|
|
1137
|
+
)
|
|
1124
1138
|
}
|
|
1125
|
-
)
|
|
1139
|
+
)
|
|
1126
1140
|
]
|
|
1127
1141
|
}
|
|
1128
1142
|
),
|
|
1129
1143
|
itemsContent,
|
|
1130
|
-
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
1131
1144
|
supportSectionContent
|
|
1132
1145
|
] })
|
|
1133
1146
|
}
|
|
@@ -110,6 +110,6 @@ interface FaqBadgeSupportProps {
|
|
|
110
110
|
*/
|
|
111
111
|
supportSectionClassName?: string;
|
|
112
112
|
}
|
|
113
|
-
declare function FaqBadgeSupport({ badge, heading, description, items, itemsSlot, supportText, supportAction, supportSlot, background, spacing, pattern, patternOpacity, patternClassName, className,
|
|
113
|
+
declare function FaqBadgeSupport({ badge, heading, description, items, itemsSlot, supportText, supportAction, supportSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, headerClassName, badgeClassName, headingClassName, descriptionClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, supportSectionClassName, }: FaqBadgeSupportProps): react_jsx_runtime.JSX.Element;
|
|
114
114
|
|
|
115
115
|
export { FaqBadgeSupport, type FaqBadgeSupportProps, type FaqItem };
|
|
@@ -110,6 +110,6 @@ interface FaqBadgeSupportProps {
|
|
|
110
110
|
*/
|
|
111
111
|
supportSectionClassName?: string;
|
|
112
112
|
}
|
|
113
|
-
declare function FaqBadgeSupport({ badge, heading, description, items, itemsSlot, supportText, supportAction, supportSlot, background, spacing, pattern, patternOpacity, patternClassName, className,
|
|
113
|
+
declare function FaqBadgeSupport({ badge, heading, description, items, itemsSlot, supportText, supportAction, supportSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, headerClassName, badgeClassName, headingClassName, descriptionClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, supportSectionClassName, }: FaqBadgeSupportProps): react_jsx_runtime.JSX.Element;
|
|
114
114
|
|
|
115
115
|
export { FaqBadgeSupport, type FaqBadgeSupportProps, type FaqItem };
|
|
@@ -6,7 +6,6 @@ import { twMerge } from 'tailwind-merge';
|
|
|
6
6
|
import { Slot } from '@radix-ui/react-slot';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
10
9
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
11
10
|
import { Icon } from '@page-speed/icon';
|
|
12
11
|
|
|
@@ -14,32 +13,6 @@ import { Icon } from '@page-speed/icon';
|
|
|
14
13
|
function cn(...inputs) {
|
|
15
14
|
return twMerge(clsx(inputs));
|
|
16
15
|
}
|
|
17
|
-
function getTextColor(parentBg, variant = "default", options) {
|
|
18
|
-
const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
|
|
19
|
-
if (isDark) {
|
|
20
|
-
switch (variant) {
|
|
21
|
-
case "default":
|
|
22
|
-
return "text-foreground";
|
|
23
|
-
case "muted":
|
|
24
|
-
return "text-foreground/80";
|
|
25
|
-
case "subtle":
|
|
26
|
-
return "text-foreground/60";
|
|
27
|
-
case "accent":
|
|
28
|
-
return "text-accent-foreground";
|
|
29
|
-
}
|
|
30
|
-
} else {
|
|
31
|
-
switch (variant) {
|
|
32
|
-
case "default":
|
|
33
|
-
return "text-foreground";
|
|
34
|
-
case "muted":
|
|
35
|
-
return "text-muted-foreground";
|
|
36
|
-
case "subtle":
|
|
37
|
-
return "text-muted-foreground/70";
|
|
38
|
-
case "accent":
|
|
39
|
-
return "text-primary";
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
16
|
var badgeVariants = cva(
|
|
44
17
|
"inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
|
|
45
18
|
{
|
|
@@ -72,26 +45,6 @@ function Badge({
|
|
|
72
45
|
}
|
|
73
46
|
);
|
|
74
47
|
}
|
|
75
|
-
function Separator({
|
|
76
|
-
className,
|
|
77
|
-
orientation = "horizontal",
|
|
78
|
-
decorative = true,
|
|
79
|
-
...props
|
|
80
|
-
}) {
|
|
81
|
-
return /* @__PURE__ */ jsx(
|
|
82
|
-
SeparatorPrimitive.Root,
|
|
83
|
-
{
|
|
84
|
-
"data-slot": "separator",
|
|
85
|
-
decorative,
|
|
86
|
-
orientation,
|
|
87
|
-
className: cn(
|
|
88
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
89
|
-
className
|
|
90
|
-
),
|
|
91
|
-
...props
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
48
|
var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
|
|
96
49
|
function DynamicIcon({ apiKey, ...props }) {
|
|
97
50
|
return /* @__PURE__ */ jsx(Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
|
|
@@ -949,6 +902,38 @@ var Section = React__default.forwardRef(
|
|
|
949
902
|
}
|
|
950
903
|
);
|
|
951
904
|
Section.displayName = "Section";
|
|
905
|
+
function TextInner({ as, className, children, ...props }, ref) {
|
|
906
|
+
const Component = as || "span";
|
|
907
|
+
return /* @__PURE__ */ jsx(Component, { ref, className: cn(className), ...props, children });
|
|
908
|
+
}
|
|
909
|
+
var Text = React.forwardRef(TextInner);
|
|
910
|
+
Text.displayName = "Text";
|
|
911
|
+
function isContentTextItem(item) {
|
|
912
|
+
return item !== null && typeof item === "object" && !React.isValidElement(item) && "_type" in item && item._type === "text";
|
|
913
|
+
}
|
|
914
|
+
var ContentGroup = React.forwardRef(
|
|
915
|
+
({ items, className, children, ...props }, ref) => {
|
|
916
|
+
const hasContent = items && items.length > 0;
|
|
917
|
+
if (!hasContent) {
|
|
918
|
+
return null;
|
|
919
|
+
}
|
|
920
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cn(className), ...props, children: [
|
|
921
|
+
items.map((item, idx) => {
|
|
922
|
+
if (isContentTextItem(item)) {
|
|
923
|
+
const { _type, ...textProps } = item;
|
|
924
|
+
return /* @__PURE__ */ jsx(Text, { ...textProps }, idx);
|
|
925
|
+
}
|
|
926
|
+
const reactNode = item;
|
|
927
|
+
if (React.isValidElement(reactNode)) {
|
|
928
|
+
return React.cloneElement(reactNode, { key: reactNode.key ?? idx });
|
|
929
|
+
}
|
|
930
|
+
return /* @__PURE__ */ jsx(React.Fragment, { children: reactNode }, idx);
|
|
931
|
+
}),
|
|
932
|
+
children
|
|
933
|
+
] });
|
|
934
|
+
}
|
|
935
|
+
);
|
|
936
|
+
ContentGroup.displayName = "ContentGroup";
|
|
952
937
|
function FaqBadgeSupport({
|
|
953
938
|
badge,
|
|
954
939
|
heading,
|
|
@@ -959,12 +944,12 @@ function FaqBadgeSupport({
|
|
|
959
944
|
supportAction,
|
|
960
945
|
supportSlot,
|
|
961
946
|
background,
|
|
962
|
-
|
|
947
|
+
containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
|
|
948
|
+
spacing = "py-12 md:py-32",
|
|
963
949
|
pattern,
|
|
964
950
|
patternOpacity,
|
|
965
951
|
patternClassName,
|
|
966
952
|
className,
|
|
967
|
-
containerClassName,
|
|
968
953
|
headerClassName,
|
|
969
954
|
badgeClassName,
|
|
970
955
|
headingClassName,
|
|
@@ -997,14 +982,14 @@ function FaqBadgeSupport({
|
|
|
997
982
|
"transition-opacity duration-200 hover:no-underline hover:opacity-60",
|
|
998
983
|
accordionTriggerClassName
|
|
999
984
|
),
|
|
1000
|
-
children: /* @__PURE__ */ jsx("div", { className: "font-
|
|
985
|
+
children: /* @__PURE__ */ jsx("div", { className: "font-semibold py-1 lg:py-2 text-lg leading-tight", children: item.question })
|
|
1001
986
|
}
|
|
1002
987
|
),
|
|
1003
988
|
/* @__PURE__ */ jsx(
|
|
1004
989
|
AccordionContent,
|
|
1005
990
|
{
|
|
1006
991
|
className: cn("sm:mb-1 lg:mb-2", accordionContentClassName),
|
|
1007
|
-
children: /* @__PURE__ */ jsx("div", { className:
|
|
992
|
+
children: /* @__PURE__ */ jsx("div", { className: "text-lg", children: item.answer })
|
|
1008
993
|
}
|
|
1009
994
|
)
|
|
1010
995
|
]
|
|
@@ -1028,11 +1013,16 @@ function FaqBadgeSupport({
|
|
|
1028
1013
|
"div",
|
|
1029
1014
|
{
|
|
1030
1015
|
className: cn(
|
|
1031
|
-
"mx-auto
|
|
1016
|
+
"mx-auto max-w-full md:max-w-3xl",
|
|
1017
|
+
"flex flex-col items-center md:flex-row md:justify-between",
|
|
1018
|
+
"bg-card text-card-foreground",
|
|
1019
|
+
"text-center md:text-left",
|
|
1020
|
+
"gap-4 p-6 md:p-12",
|
|
1021
|
+
"rounded-lg shadow-lg ring-2",
|
|
1032
1022
|
supportSectionClassName
|
|
1033
1023
|
),
|
|
1034
1024
|
children: [
|
|
1035
|
-
supportText && (typeof supportText === "string" ? /* @__PURE__ */ jsx("
|
|
1025
|
+
supportText && (typeof supportText === "string" ? /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold", children: supportText }) : supportText),
|
|
1036
1026
|
supportAction && /* @__PURE__ */ jsxs(
|
|
1037
1027
|
Pressable,
|
|
1038
1028
|
{
|
|
@@ -1052,7 +1042,49 @@ function FaqBadgeSupport({
|
|
|
1052
1042
|
]
|
|
1053
1043
|
}
|
|
1054
1044
|
);
|
|
1055
|
-
}, [
|
|
1045
|
+
}, [
|
|
1046
|
+
supportSlot,
|
|
1047
|
+
supportText,
|
|
1048
|
+
supportAction,
|
|
1049
|
+
supportSectionClassName,
|
|
1050
|
+
background
|
|
1051
|
+
]);
|
|
1052
|
+
const contentItems = useMemo(() => {
|
|
1053
|
+
const items2 = [];
|
|
1054
|
+
if (heading) {
|
|
1055
|
+
if (typeof heading === "string") {
|
|
1056
|
+
items2.push({
|
|
1057
|
+
_type: "text",
|
|
1058
|
+
as: "h2",
|
|
1059
|
+
className: cn(
|
|
1060
|
+
"max-w-full md:max-w-md",
|
|
1061
|
+
"text-3xl md:text-4xl lg:text-5xl",
|
|
1062
|
+
"font-semibold text-balance",
|
|
1063
|
+
headingClassName
|
|
1064
|
+
),
|
|
1065
|
+
children: heading
|
|
1066
|
+
});
|
|
1067
|
+
} else {
|
|
1068
|
+
items2.push(heading);
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
if (description) {
|
|
1072
|
+
if (typeof description === "string") {
|
|
1073
|
+
items2.push({
|
|
1074
|
+
_type: "text",
|
|
1075
|
+
as: "p",
|
|
1076
|
+
className: cn(
|
|
1077
|
+
"text-base md:text-lg max-w-full md:max-w-md text-balance",
|
|
1078
|
+
descriptionClassName
|
|
1079
|
+
),
|
|
1080
|
+
children: description
|
|
1081
|
+
});
|
|
1082
|
+
} else {
|
|
1083
|
+
items2.push(description);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
return items2;
|
|
1087
|
+
}, [heading, headingClassName, description, descriptionClassName]);
|
|
1056
1088
|
return /* @__PURE__ */ jsx(
|
|
1057
1089
|
Section,
|
|
1058
1090
|
{
|
|
@@ -1062,49 +1094,31 @@ function FaqBadgeSupport({
|
|
|
1062
1094
|
patternOpacity,
|
|
1063
1095
|
patternClassName,
|
|
1064
1096
|
className,
|
|
1065
|
-
|
|
1097
|
+
containerClassName,
|
|
1098
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-8 md:space-y-16", children: [
|
|
1066
1099
|
/* @__PURE__ */ jsxs(
|
|
1067
1100
|
"div",
|
|
1068
1101
|
{
|
|
1069
1102
|
className: cn(
|
|
1070
|
-
"mx-auto flex max-w-3xl flex-col text-left md:text-center",
|
|
1103
|
+
"mx-auto flex max-w-full md:max-w-3xl flex-col text-left md:text-center",
|
|
1071
1104
|
headerClassName
|
|
1072
1105
|
),
|
|
1073
1106
|
children: [
|
|
1074
|
-
badge && /* @__PURE__ */ jsx(
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
variant: "outline",
|
|
1078
|
-
className: cn("w-fit md:mx-auto", badgeClassName),
|
|
1079
|
-
children: badge
|
|
1080
|
-
}
|
|
1081
|
-
),
|
|
1082
|
-
heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
|
|
1083
|
-
"h2",
|
|
1084
|
-
{
|
|
1085
|
-
className: cn(
|
|
1086
|
-
"mt-4 text-3xl font-semibold md:text-4xl",
|
|
1087
|
-
headingClassName
|
|
1088
|
-
),
|
|
1089
|
-
children: heading
|
|
1090
|
-
}
|
|
1091
|
-
) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
|
|
1092
|
-
description && (typeof description === "string" ? /* @__PURE__ */ jsx(
|
|
1093
|
-
"p",
|
|
1107
|
+
badge && /* @__PURE__ */ jsx(Badge, { className: cn("px-2", badgeClassName), children: badge }),
|
|
1108
|
+
/* @__PURE__ */ jsx(
|
|
1109
|
+
ContentGroup,
|
|
1094
1110
|
{
|
|
1111
|
+
items: contentItems,
|
|
1095
1112
|
className: cn(
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
),
|
|
1100
|
-
children: description
|
|
1113
|
+
"flex flex-col gap-2 text-left md:text-center items-start",
|
|
1114
|
+
headerClassName
|
|
1115
|
+
)
|
|
1101
1116
|
}
|
|
1102
|
-
)
|
|
1117
|
+
)
|
|
1103
1118
|
]
|
|
1104
1119
|
}
|
|
1105
1120
|
),
|
|
1106
1121
|
itemsContent,
|
|
1107
|
-
/* @__PURE__ */ jsx(Separator, {}),
|
|
1108
1122
|
supportSectionContent
|
|
1109
1123
|
] })
|
|
1110
1124
|
}
|