@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.
Files changed (91) hide show
  1. package/dist/about-developer-profile.cjs +1 -1
  2. package/dist/about-developer-profile.js +1 -1
  3. package/dist/about-stats-sidebar.cjs +5 -3
  4. package/dist/about-stats-sidebar.js +5 -3
  5. package/dist/about-story-hero.cjs +119 -105
  6. package/dist/about-story-hero.js +101 -102
  7. package/dist/components.cjs +1 -1
  8. package/dist/components.js +1 -1
  9. package/dist/cta-accent-background.cjs +8 -69
  10. package/dist/cta-accent-background.d.cts +1 -1
  11. package/dist/cta-accent-background.d.ts +1 -1
  12. package/dist/cta-accent-background.js +8 -69
  13. package/dist/cta-app-download-newsletter.cjs +4 -81
  14. package/dist/cta-app-download-newsletter.js +4 -81
  15. package/dist/faq-badge-support.cjs +97 -84
  16. package/dist/faq-badge-support.d.cts +1 -1
  17. package/dist/faq-badge-support.d.ts +1 -1
  18. package/dist/faq-badge-support.js +97 -83
  19. package/dist/faq-sidebar-navigation.cjs +106 -72
  20. package/dist/faq-sidebar-navigation.d.cts +1 -1
  21. package/dist/faq-sidebar-navigation.d.ts +1 -1
  22. package/dist/faq-sidebar-navigation.js +104 -70
  23. package/dist/faq-simple-accordion.cjs +83 -50
  24. package/dist/faq-simple-accordion.d.cts +13 -1
  25. package/dist/faq-simple-accordion.d.ts +13 -1
  26. package/dist/faq-simple-accordion.js +82 -46
  27. package/dist/feature-accordion-image.cjs +115 -85
  28. package/dist/feature-accordion-image.js +113 -83
  29. package/dist/feature-animated-carousel.cjs +2 -2
  30. package/dist/feature-animated-carousel.js +2 -2
  31. package/dist/feature-image-cards-three-column.cjs +2 -2
  32. package/dist/feature-image-cards-three-column.js +2 -2
  33. package/dist/footer-accordion-social.cjs +1 -1
  34. package/dist/footer-accordion-social.js +1 -1
  35. package/dist/footer-animated-social.cjs +1 -1
  36. package/dist/footer-animated-social.js +1 -1
  37. package/dist/footer-brand-description.cjs +1 -1
  38. package/dist/footer-brand-description.js +1 -1
  39. package/dist/footer-brand-links-contact.cjs +1 -1
  40. package/dist/footer-brand-links-contact.js +1 -1
  41. package/dist/footer-comprehensive-links.cjs +1 -1
  42. package/dist/footer-comprehensive-links.js +1 -1
  43. package/dist/footer-contact-card.cjs +1 -1
  44. package/dist/footer-contact-card.js +1 -1
  45. package/dist/footer-cta-banner.cjs +1 -1
  46. package/dist/footer-cta-banner.js +1 -1
  47. package/dist/footer-cta-social.cjs +1 -1
  48. package/dist/footer-cta-social.js +1 -1
  49. package/dist/footer-info-cards-accordion.cjs +1 -1
  50. package/dist/footer-info-cards-accordion.js +1 -1
  51. package/dist/footer-nav-social.cjs +1 -1
  52. package/dist/footer-nav-social.js +1 -1
  53. package/dist/footer-newsletter-contact.cjs +1 -1
  54. package/dist/footer-newsletter-contact.js +1 -1
  55. package/dist/footer-newsletter-grid.cjs +1 -1
  56. package/dist/footer-newsletter-grid.js +1 -1
  57. package/dist/footer-newsletter-minimal.cjs +1 -1
  58. package/dist/footer-newsletter-minimal.js +1 -1
  59. package/dist/footer-social-apps.cjs +1 -1
  60. package/dist/footer-social-apps.js +1 -1
  61. package/dist/footer-social-newsletter.cjs +1 -1
  62. package/dist/footer-social-newsletter.js +1 -1
  63. package/dist/footer-split-image-accordion.cjs +1 -1
  64. package/dist/footer-split-image-accordion.js +1 -1
  65. package/dist/hero-coming-soon-countdown.cjs +1 -1
  66. package/dist/hero-coming-soon-countdown.js +1 -1
  67. package/dist/hero-product-showcase-floating.cjs +120 -90
  68. package/dist/hero-product-showcase-floating.d.cts +5 -1
  69. package/dist/hero-product-showcase-floating.d.ts +5 -1
  70. package/dist/hero-product-showcase-floating.js +120 -90
  71. package/dist/index.cjs +1 -1
  72. package/dist/index.js +1 -1
  73. package/dist/link-page-bento-layout.cjs +1 -1
  74. package/dist/link-page-bento-layout.js +1 -1
  75. package/dist/link-page-grid-cards.cjs +1 -1
  76. package/dist/link-page-grid-cards.js +1 -1
  77. package/dist/link-page-minimal-profile.cjs +1 -1
  78. package/dist/link-page-minimal-profile.js +1 -1
  79. package/dist/link-page-newsletter-social.cjs +1 -1
  80. package/dist/link-page-newsletter-social.js +1 -1
  81. package/dist/link-tree-block.cjs +1 -1
  82. package/dist/link-tree-block.js +1 -1
  83. package/dist/navbar-fullscreen-menu.cjs +1 -1
  84. package/dist/navbar-fullscreen-menu.js +1 -1
  85. package/dist/navbar-transparent-overlay.cjs +1 -1
  86. package/dist/navbar-transparent-overlay.js +1 -1
  87. package/dist/registry.cjs +396 -289
  88. package/dist/registry.js +396 -289
  89. package/dist/social-link-icon.cjs +1 -1
  90. package/dist/social-link-icon.js +1 -1
  91. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var React = require('react');
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');
@@ -26,39 +26,13 @@ function _interopNamespace(e) {
26
26
  return Object.freeze(n);
27
27
  }
28
28
 
29
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
29
+ var React4__namespace = /*#__PURE__*/_interopNamespace(React4);
30
30
  var AccordionPrimitive__namespace = /*#__PURE__*/_interopNamespace(AccordionPrimitive);
31
31
 
32
32
  // components/blocks/faq/faq-sidebar-navigation.tsx
33
33
  function cn(...inputs) {
34
34
  return tailwindMerge.twMerge(clsx.clsx(inputs));
35
35
  }
36
- function getTextColor(parentBg, variant = "default", options) {
37
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
38
- if (isDark) {
39
- switch (variant) {
40
- case "default":
41
- return "text-foreground";
42
- case "muted":
43
- return "text-foreground/80";
44
- case "subtle":
45
- return "text-foreground/60";
46
- case "accent":
47
- return "text-accent-foreground";
48
- }
49
- } else {
50
- switch (variant) {
51
- case "default":
52
- return "text-foreground";
53
- case "muted":
54
- return "text-muted-foreground";
55
- case "subtle":
56
- return "text-muted-foreground/70";
57
- case "accent":
58
- return "text-primary";
59
- }
60
- }
61
- }
62
36
  var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
63
37
  function DynamicIcon({ apiKey, ...props }) {
64
38
  return /* @__PURE__ */ jsxRuntime.jsx(icon.Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
@@ -132,7 +106,7 @@ var maxWidthStyles = {
132
106
  "4xl": "max-w-[1536px]",
133
107
  full: "max-w-full"
134
108
  };
135
- var Container = React__namespace.default.forwardRef(
109
+ var Container = React4__namespace.default.forwardRef(
136
110
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
137
111
  const Component = as;
138
112
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -437,7 +411,7 @@ var spacingStyles = {
437
411
  };
438
412
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
439
413
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
440
- var Section = React__namespace.default.forwardRef(
414
+ var Section = React4__namespace.default.forwardRef(
441
415
  ({
442
416
  id,
443
417
  title,
@@ -498,21 +472,53 @@ var Section = React__namespace.default.forwardRef(
498
472
  }
499
473
  );
500
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";
501
507
  function FaqSidebarNavigation({
502
508
  heading,
503
509
  description,
510
+ descriptionClassName,
504
511
  categories,
505
512
  categoriesSlot,
506
513
  background,
507
- spacing,
514
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
515
+ spacing = "xl",
508
516
  pattern,
509
517
  patternOpacity,
510
518
  patternClassName,
511
519
  className,
512
- containerClassName,
513
520
  headerClassName,
514
521
  headingClassName,
515
- descriptionClassName,
516
522
  contentWrapperClassName,
517
523
  navClassName,
518
524
  navButtonClassName,
@@ -524,15 +530,15 @@ function FaqSidebarNavigation({
524
530
  accordionTriggerClassName,
525
531
  accordionContentClassName
526
532
  }) {
527
- const [activeCategory, setActiveCategory] = React__namespace.useState(
533
+ const [activeCategory, setActiveCategory] = React4__namespace.useState(
528
534
  categories && categories.length > 1 ? "all" : categories?.[0]?.id || ""
529
535
  );
530
- const filteredCategories = React.useMemo(() => {
536
+ const filteredCategories = React4.useMemo(() => {
531
537
  if (!categories || categories.length === 0) return [];
532
538
  if (activeCategory === "all") return categories;
533
539
  return categories.filter((category) => category.id === activeCategory);
534
540
  }, [categories, activeCategory]);
535
- const categoriesContent = React.useMemo(() => {
541
+ const categoriesContent = React4.useMemo(() => {
536
542
  if (categoriesSlot) return categoriesSlot;
537
543
  if (filteredCategories.length === 0) return null;
538
544
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-10 lg:w-3/4", categoriesWrapperClassName), children: filteredCategories.map((category) => /* @__PURE__ */ jsxRuntime.jsxs(
@@ -571,7 +577,7 @@ function FaqSidebarNavigation({
571
577
  AccordionContent,
572
578
  {
573
579
  className: cn("sm:mb-1 lg:mb-2", accordionContentClassName),
574
- children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(getTextColor(background, "muted"), "lg:text-lg"), children: item.answer })
580
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("lg:text-lg"), children: item.answer })
575
581
  }
576
582
  )
577
583
  ]
@@ -582,7 +588,48 @@ function FaqSidebarNavigation({
582
588
  },
583
589
  category.id
584
590
  )) });
585
- }, [categoriesSlot, filteredCategories, categoriesWrapperClassName, categoryTitleClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, background]);
591
+ }, [
592
+ categoriesSlot,
593
+ filteredCategories,
594
+ categoriesWrapperClassName,
595
+ categoryTitleClassName,
596
+ accordionClassName,
597
+ accordionItemClassName,
598
+ accordionTriggerClassName,
599
+ accordionContentClassName,
600
+ background
601
+ ]);
602
+ const contentItems = React4.useMemo(() => {
603
+ const items = [];
604
+ if (heading) {
605
+ if (typeof heading === "string") {
606
+ items.push({
607
+ _type: "text",
608
+ as: "h2",
609
+ className: cn(
610
+ "font-semibold text-4xl md:text-5xl lg:text-6xl",
611
+ headingClassName
612
+ ),
613
+ children: heading
614
+ });
615
+ } else {
616
+ items.push(heading);
617
+ }
618
+ }
619
+ if (description) {
620
+ if (typeof description === "string") {
621
+ items.push({
622
+ _type: "text",
623
+ as: "p",
624
+ className: cn("text-lg opacity-70", descriptionClassName),
625
+ children: description
626
+ });
627
+ } else {
628
+ items.push(description);
629
+ }
630
+ }
631
+ return items;
632
+ }, [heading, headingClassName, description, descriptionClassName]);
586
633
  return /* @__PURE__ */ jsxRuntime.jsx(
587
634
  Section,
588
635
  {
@@ -591,38 +638,17 @@ function FaqSidebarNavigation({
591
638
  pattern,
592
639
  patternOpacity,
593
640
  patternClassName,
594
- className,
595
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: containerClassName, children: [
596
- /* @__PURE__ */ jsxRuntime.jsxs(
597
- "div",
641
+ className: cn(pattern && "overflow-visible", className),
642
+ containerClassName,
643
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
644
+ /* @__PURE__ */ jsxRuntime.jsx(
645
+ ContentGroup,
598
646
  {
647
+ items: contentItems,
599
648
  className: cn(
600
- "mx-auto flex max-w-3xl flex-col text-left md:text-center",
649
+ "flex flex-col text-left mb-12 md:mb-24 gap-0 text-balance items-start max-w-full md:max-w-md",
601
650
  headerClassName
602
- ),
603
- children: [
604
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
605
- "h2",
606
- {
607
- className: cn(
608
- "mb-3 text-3xl font-semibold md:mb-4 lg:mb-6 lg:text-4xl",
609
- headingClassName
610
- ),
611
- children: heading
612
- }
613
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: headingClassName, children: heading })),
614
- description && (typeof description === "string" ? /* @__PURE__ */ jsxRuntime.jsx(
615
- "p",
616
- {
617
- className: cn(
618
- getTextColor(background, "muted"),
619
- "lg:text-lg",
620
- descriptionClassName
621
- ),
622
- children: description
623
- }
624
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: descriptionClassName, children: description }))
625
- ]
651
+ )
626
652
  }
627
653
  ),
628
654
  /* @__PURE__ */ jsxRuntime.jsxs(
@@ -633,17 +659,21 @@ function FaqSidebarNavigation({
633
659
  contentWrapperClassName
634
660
  ),
635
661
  children: [
636
- /* @__PURE__ */ jsxRuntime.jsx("nav", { className: cn("lg:w-1/4", navClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-24 flex gap-2 overflow-x-auto pb-2 lg:flex-col lg:gap-2 lg:overflow-visible lg:pb-0", children: [
662
+ /* @__PURE__ */ jsxRuntime.jsx("nav", { className: cn("lg:w-1/4", navClassName), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-24 flex gap-1 overflow-x-auto lg:flex-col lg:gap-2 lg:overflow-visible p-2 ring-2 rounded-lg", children: [
637
663
  categories && categories.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
638
664
  "button",
639
665
  {
640
666
  onClick: () => setActiveCategory("all"),
641
667
  className: cn(
642
- "shrink-0 whitespace-nowrap rounded-lg px-4 py-2 text-left text-sm font-medium transition-colors lg:w-full",
668
+ "cursor-pointer",
669
+ "shrink-0 whitespace-nowrap rounded-md px-4 py-2 text-left text-sm font-medium transition-colors lg:w-full",
643
670
  activeCategory === "all" ? cn(
644
671
  "bg-primary text-primary-foreground",
645
672
  navButtonActiveClassName
646
- ) : cn("hover:bg-muted", navButtonClassName)
673
+ ) : cn(
674
+ "hover:bg-muted hover:text-muted-foreground",
675
+ navButtonClassName
676
+ )
647
677
  ),
648
678
  children: "All"
649
679
  }
@@ -653,11 +683,15 @@ function FaqSidebarNavigation({
653
683
  {
654
684
  onClick: () => setActiveCategory(category.id),
655
685
  className: cn(
656
- "shrink-0 whitespace-nowrap rounded-lg px-4 py-2 text-left text-sm font-medium transition-colors lg:w-full",
686
+ "cursor-pointer",
687
+ "shrink-0 whitespace-nowrap rounded-md px-4 py-2 text-left text-sm font-medium transition-colors lg:w-full",
657
688
  activeCategory === category.id ? cn(
658
689
  "bg-primary text-primary-foreground",
659
690
  navButtonActiveClassName
660
- ) : cn("hover:bg-muted", navButtonClassName)
691
+ ) : cn(
692
+ "hover:bg-muted hover:text-muted-foreground",
693
+ navButtonClassName
694
+ )
661
695
  ),
662
696
  children: category.title
663
697
  },
@@ -115,6 +115,6 @@ interface FaqSidebarNavigationProps {
115
115
  */
116
116
  accordionContentClassName?: string;
117
117
  }
118
- declare function FaqSidebarNavigation({ heading, description, categories, categoriesSlot, background, spacing, pattern, patternOpacity, patternClassName, className, containerClassName, headerClassName, headingClassName, descriptionClassName, contentWrapperClassName, navClassName, navButtonClassName, navButtonActiveClassName, categoriesWrapperClassName, categoryTitleClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, }: FaqSidebarNavigationProps): react_jsx_runtime.JSX.Element;
118
+ declare function FaqSidebarNavigation({ heading, description, descriptionClassName, categories, categoriesSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, headerClassName, headingClassName, contentWrapperClassName, navClassName, navButtonClassName, navButtonActiveClassName, categoriesWrapperClassName, categoryTitleClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, }: FaqSidebarNavigationProps): react_jsx_runtime.JSX.Element;
119
119
 
120
120
  export { type FaqCategory, type FaqItem, FaqSidebarNavigation, type FaqSidebarNavigationProps };
@@ -115,6 +115,6 @@ interface FaqSidebarNavigationProps {
115
115
  */
116
116
  accordionContentClassName?: string;
117
117
  }
118
- declare function FaqSidebarNavigation({ heading, description, categories, categoriesSlot, background, spacing, pattern, patternOpacity, patternClassName, className, containerClassName, headerClassName, headingClassName, descriptionClassName, contentWrapperClassName, navClassName, navButtonClassName, navButtonActiveClassName, categoriesWrapperClassName, categoryTitleClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, }: FaqSidebarNavigationProps): react_jsx_runtime.JSX.Element;
118
+ declare function FaqSidebarNavigation({ heading, description, descriptionClassName, categories, categoriesSlot, background, containerClassName, spacing, pattern, patternOpacity, patternClassName, className, headerClassName, headingClassName, contentWrapperClassName, navClassName, navButtonClassName, navButtonActiveClassName, categoriesWrapperClassName, categoryTitleClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, }: FaqSidebarNavigationProps): react_jsx_runtime.JSX.Element;
119
119
 
120
120
  export { type FaqCategory, type FaqItem, FaqSidebarNavigation, type FaqSidebarNavigationProps };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import * as React from 'react';
3
- import React__default, { useMemo } from 'react';
2
+ import * as React4 from 'react';
3
+ import React4__default, { useMemo } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import * as AccordionPrimitive from '@radix-ui/react-accordion';
@@ -11,32 +11,6 @@ import { jsx, jsxs } from 'react/jsx-runtime';
11
11
  function cn(...inputs) {
12
12
  return twMerge(clsx(inputs));
13
13
  }
14
- function getTextColor(parentBg, variant = "default", options) {
15
- const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
16
- if (isDark) {
17
- switch (variant) {
18
- case "default":
19
- return "text-foreground";
20
- case "muted":
21
- return "text-foreground/80";
22
- case "subtle":
23
- return "text-foreground/60";
24
- case "accent":
25
- return "text-accent-foreground";
26
- }
27
- } else {
28
- switch (variant) {
29
- case "default":
30
- return "text-foreground";
31
- case "muted":
32
- return "text-muted-foreground";
33
- case "subtle":
34
- return "text-muted-foreground/70";
35
- case "accent":
36
- return "text-primary";
37
- }
38
- }
39
- }
40
14
  var DEFAULT_ICON_API_KEY = "au382bi7fsh96w9h9xlrnat2jglx";
41
15
  function DynamicIcon({ apiKey, ...props }) {
42
16
  return /* @__PURE__ */ jsx(Icon, { ...props, apiKey: apiKey ?? DEFAULT_ICON_API_KEY });
@@ -110,7 +84,7 @@ var maxWidthStyles = {
110
84
  "4xl": "max-w-[1536px]",
111
85
  full: "max-w-full"
112
86
  };
113
- var Container = React__default.forwardRef(
87
+ var Container = React4__default.forwardRef(
114
88
  ({ children, maxWidth = "xl", className, as = "div", ...props }, ref) => {
115
89
  const Component = as;
116
90
  return /* @__PURE__ */ jsx(
@@ -415,7 +389,7 @@ var spacingStyles = {
415
389
  };
416
390
  var predefinedSpacings = ["none", "sm", "md", "lg", "xl"];
417
391
  var isPredefinedSpacing = (spacing) => predefinedSpacings.includes(spacing);
418
- var Section = React__default.forwardRef(
392
+ var Section = React4__default.forwardRef(
419
393
  ({
420
394
  id,
421
395
  title,
@@ -476,21 +450,53 @@ var Section = React__default.forwardRef(
476
450
  }
477
451
  );
478
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";
479
485
  function FaqSidebarNavigation({
480
486
  heading,
481
487
  description,
488
+ descriptionClassName,
482
489
  categories,
483
490
  categoriesSlot,
484
491
  background,
485
- spacing,
492
+ containerClassName = "px-6 sm:px-6 md:px-8 lg:px-8",
493
+ spacing = "xl",
486
494
  pattern,
487
495
  patternOpacity,
488
496
  patternClassName,
489
497
  className,
490
- containerClassName,
491
498
  headerClassName,
492
499
  headingClassName,
493
- descriptionClassName,
494
500
  contentWrapperClassName,
495
501
  navClassName,
496
502
  navButtonClassName,
@@ -502,7 +508,7 @@ function FaqSidebarNavigation({
502
508
  accordionTriggerClassName,
503
509
  accordionContentClassName
504
510
  }) {
505
- const [activeCategory, setActiveCategory] = React.useState(
511
+ const [activeCategory, setActiveCategory] = React4.useState(
506
512
  categories && categories.length > 1 ? "all" : categories?.[0]?.id || ""
507
513
  );
508
514
  const filteredCategories = useMemo(() => {
@@ -549,7 +555,7 @@ function FaqSidebarNavigation({
549
555
  AccordionContent,
550
556
  {
551
557
  className: cn("sm:mb-1 lg:mb-2", accordionContentClassName),
552
- children: /* @__PURE__ */ jsx("div", { className: cn(getTextColor(background, "muted"), "lg:text-lg"), children: item.answer })
558
+ children: /* @__PURE__ */ jsx("div", { className: cn("lg:text-lg"), children: item.answer })
553
559
  }
554
560
  )
555
561
  ]
@@ -560,7 +566,48 @@ function FaqSidebarNavigation({
560
566
  },
561
567
  category.id
562
568
  )) });
563
- }, [categoriesSlot, filteredCategories, categoriesWrapperClassName, categoryTitleClassName, accordionClassName, accordionItemClassName, accordionTriggerClassName, accordionContentClassName, background]);
569
+ }, [
570
+ categoriesSlot,
571
+ filteredCategories,
572
+ categoriesWrapperClassName,
573
+ categoryTitleClassName,
574
+ accordionClassName,
575
+ accordionItemClassName,
576
+ accordionTriggerClassName,
577
+ accordionContentClassName,
578
+ background
579
+ ]);
580
+ const contentItems = useMemo(() => {
581
+ const items = [];
582
+ if (heading) {
583
+ if (typeof heading === "string") {
584
+ items.push({
585
+ _type: "text",
586
+ as: "h2",
587
+ className: cn(
588
+ "font-semibold text-4xl md:text-5xl lg:text-6xl",
589
+ headingClassName
590
+ ),
591
+ children: heading
592
+ });
593
+ } else {
594
+ items.push(heading);
595
+ }
596
+ }
597
+ if (description) {
598
+ if (typeof description === "string") {
599
+ items.push({
600
+ _type: "text",
601
+ as: "p",
602
+ className: cn("text-lg opacity-70", descriptionClassName),
603
+ children: description
604
+ });
605
+ } else {
606
+ items.push(description);
607
+ }
608
+ }
609
+ return items;
610
+ }, [heading, headingClassName, description, descriptionClassName]);
564
611
  return /* @__PURE__ */ jsx(
565
612
  Section,
566
613
  {
@@ -569,38 +616,17 @@ function FaqSidebarNavigation({
569
616
  pattern,
570
617
  patternOpacity,
571
618
  patternClassName,
572
- className,
573
- children: /* @__PURE__ */ jsxs("div", { className: containerClassName, children: [
574
- /* @__PURE__ */ jsxs(
575
- "div",
619
+ className: cn(pattern && "overflow-visible", className),
620
+ containerClassName,
621
+ children: /* @__PURE__ */ jsxs("div", { className: "relative", children: [
622
+ /* @__PURE__ */ jsx(
623
+ ContentGroup,
576
624
  {
625
+ items: contentItems,
577
626
  className: cn(
578
- "mx-auto flex max-w-3xl flex-col text-left md:text-center",
627
+ "flex flex-col text-left mb-12 md:mb-24 gap-0 text-balance items-start max-w-full md:max-w-md",
579
628
  headerClassName
580
- ),
581
- children: [
582
- heading && (typeof heading === "string" ? /* @__PURE__ */ jsx(
583
- "h2",
584
- {
585
- className: cn(
586
- "mb-3 text-3xl font-semibold md:mb-4 lg:mb-6 lg:text-4xl",
587
- headingClassName
588
- ),
589
- children: heading
590
- }
591
- ) : /* @__PURE__ */ jsx("div", { className: headingClassName, children: heading })),
592
- description && (typeof description === "string" ? /* @__PURE__ */ jsx(
593
- "p",
594
- {
595
- className: cn(
596
- getTextColor(background, "muted"),
597
- "lg:text-lg",
598
- descriptionClassName
599
- ),
600
- children: description
601
- }
602
- ) : /* @__PURE__ */ jsx("div", { className: descriptionClassName, children: description }))
603
- ]
629
+ )
604
630
  }
605
631
  ),
606
632
  /* @__PURE__ */ jsxs(
@@ -611,17 +637,21 @@ function FaqSidebarNavigation({
611
637
  contentWrapperClassName
612
638
  ),
613
639
  children: [
614
- /* @__PURE__ */ jsx("nav", { className: cn("lg:w-1/4", navClassName), children: /* @__PURE__ */ jsxs("div", { className: "sticky top-24 flex gap-2 overflow-x-auto pb-2 lg:flex-col lg:gap-2 lg:overflow-visible lg:pb-0", children: [
640
+ /* @__PURE__ */ jsx("nav", { className: cn("lg:w-1/4", navClassName), children: /* @__PURE__ */ jsxs("div", { className: "sticky top-24 flex gap-1 overflow-x-auto lg:flex-col lg:gap-2 lg:overflow-visible p-2 ring-2 rounded-lg", children: [
615
641
  categories && categories.length > 1 && /* @__PURE__ */ jsx(
616
642
  "button",
617
643
  {
618
644
  onClick: () => setActiveCategory("all"),
619
645
  className: cn(
620
- "shrink-0 whitespace-nowrap rounded-lg px-4 py-2 text-left text-sm font-medium transition-colors lg:w-full",
646
+ "cursor-pointer",
647
+ "shrink-0 whitespace-nowrap rounded-md px-4 py-2 text-left text-sm font-medium transition-colors lg:w-full",
621
648
  activeCategory === "all" ? cn(
622
649
  "bg-primary text-primary-foreground",
623
650
  navButtonActiveClassName
624
- ) : cn("hover:bg-muted", navButtonClassName)
651
+ ) : cn(
652
+ "hover:bg-muted hover:text-muted-foreground",
653
+ navButtonClassName
654
+ )
625
655
  ),
626
656
  children: "All"
627
657
  }
@@ -631,11 +661,15 @@ function FaqSidebarNavigation({
631
661
  {
632
662
  onClick: () => setActiveCategory(category.id),
633
663
  className: cn(
634
- "shrink-0 whitespace-nowrap rounded-lg px-4 py-2 text-left text-sm font-medium transition-colors lg:w-full",
664
+ "cursor-pointer",
665
+ "shrink-0 whitespace-nowrap rounded-md px-4 py-2 text-left text-sm font-medium transition-colors lg:w-full",
635
666
  activeCategory === category.id ? cn(
636
667
  "bg-primary text-primary-foreground",
637
668
  navButtonActiveClassName
638
- ) : cn("hover:bg-muted", navButtonClassName)
669
+ ) : cn(
670
+ "hover:bg-muted hover:text-muted-foreground",
671
+ navButtonClassName
672
+ )
639
673
  ),
640
674
  children: category.title
641
675
  },