@olwiba/ui 0.0.35 → 0.0.36

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/index.d.ts CHANGED
@@ -242,12 +242,14 @@ interface HeroSectionProps {
242
242
  label: string;
243
243
  href: string;
244
244
  };
245
- heroImage: React.ReactNode;
245
+ heroImage?: React.ReactNode;
246
+ media?: 'image' | 'phone' | 'none';
247
+ phoneSize?: 'sm' | 'md' | 'lg';
246
248
  avatarUrls?: string[];
247
249
  socialProofText?: string;
248
250
  renderLink?: AppShellRenderLink;
249
251
  }
250
- declare function HeroSection({ heading, badge, description, primaryCta, secondaryCta, heroImage, avatarUrls, socialProofText, renderLink, }: HeroSectionProps): react_jsx_runtime.JSX.Element;
252
+ declare function HeroSection({ heading, badge, description, primaryCta, secondaryCta, heroImage, media, phoneSize, avatarUrls, socialProofText, renderLink, }: HeroSectionProps): react_jsx_runtime.JSX.Element;
251
253
 
252
254
  interface FeaturesSectionProps {
253
255
  title?: string;
@@ -600,6 +602,54 @@ interface ConfirmDialogProps extends Pick<UseConfirmReturn, 'isOpen' | 'options'
600
602
  }
601
603
  declare function ConfirmDialog({ isOpen, options, handleConfirm, handleCancel, destructive }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
602
604
 
605
+ declare const sizes: {
606
+ readonly sm: {
607
+ readonly outer: "w-44";
608
+ readonly height: "h-80";
609
+ readonly notch: "w-16 h-4";
610
+ readonly border: "rounded-[2rem]";
611
+ readonly screen: "rounded-[1.75rem]";
612
+ };
613
+ readonly md: {
614
+ readonly outer: "w-56";
615
+ readonly height: "h-[26rem]";
616
+ readonly notch: "w-20 h-5";
617
+ readonly border: "rounded-[2.5rem]";
618
+ readonly screen: "rounded-[2.25rem]";
619
+ };
620
+ readonly lg: {
621
+ readonly outer: "w-72";
622
+ readonly height: "h-[34rem]";
623
+ readonly notch: "w-24 h-6";
624
+ readonly border: "rounded-[3rem]";
625
+ readonly screen: "rounded-[2.75rem]";
626
+ };
627
+ };
628
+ interface PhoneFrameProps {
629
+ children?: React.ReactNode;
630
+ size?: keyof typeof sizes;
631
+ className?: string;
632
+ float?: boolean;
633
+ }
634
+ declare function PhoneFrame({ children, size, className, float }: PhoneFrameProps): react_jsx_runtime.JSX.Element;
635
+
636
+ declare function AppScreenRoot({ children, className }: {
637
+ children?: React.ReactNode;
638
+ className?: string;
639
+ }): react_jsx_runtime.JSX.Element;
640
+ declare function AppScreenHeader({ children, className }: {
641
+ children?: React.ReactNode;
642
+ className?: string;
643
+ }): react_jsx_runtime.JSX.Element;
644
+ declare function AppScreenBody({ children, className }: {
645
+ children?: React.ReactNode;
646
+ className?: string;
647
+ }): react_jsx_runtime.JSX.Element;
648
+ declare const AppScreen: typeof AppScreenRoot & {
649
+ Header: typeof AppScreenHeader;
650
+ Body: typeof AppScreenBody;
651
+ };
652
+
603
653
  interface GlassCardProps extends React.HTMLAttributes<HTMLDivElement> {
604
654
  blur?: 'sm' | 'md' | 'lg';
605
655
  children: React.ReactNode;
@@ -737,6 +787,11 @@ interface PostListProps {
737
787
  }
738
788
  declare function PostList({ posts, renderLink, emptyMessage }: PostListProps): react_jsx_runtime.JSX.Element;
739
789
 
790
+ interface MdxContentProps {
791
+ code: string;
792
+ }
793
+ declare function MdxContent({ code }: MdxContentProps): react_jsx_runtime.JSX.Element;
794
+
740
795
  declare function useMounted(): boolean;
741
796
 
742
797
  interface UseControlledOpenReturn {
@@ -793,4 +848,4 @@ interface UsePaginationReturn {
793
848
  }
794
849
  declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
795
850
 
796
- export { type AppNavItem, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, ContactSection, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CtaSection, type CtaSectionProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, FeaturesSection, type FeaturesSectionProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, Navbar, type NavbarProps, NewsletterSection, OlwibaUIProvider, type OlwibaUIProviderProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, RegisterHotkeys, RootErrorFallback, SectionTitle, type SectionTitleProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, Suspensed, Switch, type SwitchProps, TeamSection, TestimonialCard, type TestimonialCardProps, TestimonialsSection, type TestimonialsSectionProps, Textarea, type TextareaProps, ThemeColorUpdater, ThemeSwitchMinimal, type UIMode, Underlay, type UnderlayProps, type UnderlayVariant, type UpgradeComparisonRow, UpgradePrompt, type UpgradePromptProps, type UseConfirmReturn, type UseControlledOpenReturn, type UsePaginationReturn, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
851
+ export { type AppNavItem, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, ContactSection, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CtaSection, type CtaSectionProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, FeaturesSection, type FeaturesSectionProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, MdxContent, type MdxContentProps, Navbar, type NavbarProps, NewsletterSection, OlwibaUIProvider, type OlwibaUIProviderProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PhoneFrame, type PhoneFrameProps, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, RegisterHotkeys, RootErrorFallback, SectionTitle, type SectionTitleProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, Suspensed, Switch, type SwitchProps, TeamSection, TestimonialCard, type TestimonialCardProps, TestimonialsSection, type TestimonialsSectionProps, Textarea, type TextareaProps, ThemeColorUpdater, ThemeSwitchMinimal, type UIMode, Underlay, type UnderlayProps, type UnderlayVariant, type UpgradeComparisonRow, UpgradePrompt, type UpgradePromptProps, type UseConfirmReturn, type UseControlledOpenReturn, type UsePaginationReturn, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
package/dist/index.js CHANGED
@@ -6,6 +6,7 @@ import { Button as Button$1, Card as Card$1, Input as Input$1, Textarea as Texta
6
6
  export { CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@olwiba/cn';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { Compass, ArrowLeft, X, ArrowRight, Sparkles, Check, Minus, Quote, Star, Twitter, Github, Linkedin, Mail, Phone, MapPin, MessageSquare, Send, Sun, Moon, Menu, Search, TrendingUp, TrendingDown, ChevronRight, ChevronLeft, AlertTriangle, Loader2, ShieldCheck, Building2, MoreVerticalIcon, CreditCardIcon, BellIcon, LogOutIcon } from 'lucide-react';
9
+ import { useMDXComponent } from '@content-collections/mdx/react';
9
10
 
10
11
  // src/lib/utils.ts
11
12
  function cn(...inputs) {
@@ -616,6 +617,54 @@ function SectionTitle({ title, description, badge, className }) {
616
617
  description && /* @__PURE__ */ jsx("p", { className: "mx-auto mt-4 max-w-2xl text-pretty text-muted-foreground", children: description })
617
618
  ] }) });
618
619
  }
620
+ var sizes = {
621
+ sm: { outer: "w-44", height: "h-80", notch: "w-16 h-4", border: "rounded-[2rem]", screen: "rounded-[1.75rem]" },
622
+ md: { outer: "w-56", height: "h-[26rem]", notch: "w-20 h-5", border: "rounded-[2.5rem]", screen: "rounded-[2.25rem]" },
623
+ lg: { outer: "w-72", height: "h-[34rem]", notch: "w-24 h-6", border: "rounded-[3rem]", screen: "rounded-[2.75rem]" }
624
+ };
625
+ function PhoneFrame({ children, size = "md", className, float = true }) {
626
+ const s = sizes[size];
627
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
628
+ float && /* @__PURE__ */ jsx("style", { children: `
629
+ @keyframes olwiba-phone-float {
630
+ 0%, 100% { transform: translateY(0px); }
631
+ 50% { transform: translateY(-10px); }
632
+ }
633
+ .olwiba-phone-float { animation: olwiba-phone-float 5s ease-in-out infinite; }
634
+ ` }),
635
+ /* @__PURE__ */ jsxs(
636
+ "div",
637
+ {
638
+ className: cn(
639
+ "relative mx-auto",
640
+ s.outer,
641
+ float && "olwiba-phone-float",
642
+ className
643
+ ),
644
+ children: [
645
+ /* @__PURE__ */ jsxs(
646
+ "div",
647
+ {
648
+ className: cn(
649
+ "relative flex w-full flex-col overflow-hidden border-[3px] border-foreground/15 bg-muted shadow-2xl",
650
+ s.border,
651
+ s.height
652
+ ),
653
+ children: [
654
+ /* @__PURE__ */ jsx("div", { className: "relative flex justify-center pt-3 pb-1 shrink-0", children: /* @__PURE__ */ jsx("div", { className: cn("rounded-full bg-foreground/10", s.notch) }) }),
655
+ /* @__PURE__ */ jsx("div", { className: cn("mx-1.5 mb-1.5 flex-1 overflow-hidden bg-background", s.screen), children })
656
+ ]
657
+ }
658
+ ),
659
+ /* @__PURE__ */ jsx("div", { className: "absolute right-[-5px] top-24 h-12 w-[3px] rounded-l-sm bg-foreground/15" }),
660
+ /* @__PURE__ */ jsx("div", { className: "absolute left-[-5px] top-20 h-8 w-[3px] rounded-r-sm bg-foreground/15" }),
661
+ /* @__PURE__ */ jsx("div", { className: "absolute left-[-5px] top-32 h-8 w-[3px] rounded-r-sm bg-foreground/15" }),
662
+ /* @__PURE__ */ jsx("div", { className: "absolute left-[-5px] top-44 h-8 w-[3px] rounded-r-sm bg-foreground/15" })
663
+ ]
664
+ }
665
+ )
666
+ ] });
667
+ }
619
668
  var defaultRenderLink4 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
620
669
  function HeroSection({
621
670
  heading,
@@ -624,6 +673,8 @@ function HeroSection({
624
673
  primaryCta,
625
674
  secondaryCta,
626
675
  heroImage,
676
+ media = "image",
677
+ phoneSize = "lg",
627
678
  avatarUrls,
628
679
  socialProofText,
629
680
  renderLink = defaultRenderLink4
@@ -648,7 +699,7 @@ function HeroSection({
648
699
  })
649
700
  ] })
650
701
  ] }) }),
651
- /* @__PURE__ */ jsx(FadeIn, { direction: "right", delay: 200, children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-2xl", children: heroImage }) })
702
+ media !== "none" && /* @__PURE__ */ jsx(FadeIn, { direction: "right", delay: 200, children: media === "phone" ? /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx(PhoneFrame, { size: phoneSize, children: heroImage }) }) : /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-2xl", children: heroImage }) })
652
703
  ] }),
653
704
  (avatarUrls?.length || socialProofText) && /* @__PURE__ */ jsx(FadeIn, { direction: "up", delay: 400, children: /* @__PURE__ */ jsxs("div", { className: "mx-auto mt-12 flex max-w-6xl items-center gap-4", children: [
654
705
  avatarUrls && avatarUrls.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex -space-x-3", children: avatarUrls.map((url, i) => /* @__PURE__ */ jsxs(Avatar, { className: "size-9 border-2 border-background", children: [
@@ -1790,6 +1841,19 @@ function ConfirmDialog({ isOpen, options, handleConfirm, handleCancel, destructi
1790
1841
  ] })
1791
1842
  ] }) });
1792
1843
  }
1844
+ function AppScreenRoot({ children, className }) {
1845
+ return /* @__PURE__ */ jsx("div", { className: cn("flex h-full flex-col", className), children });
1846
+ }
1847
+ function AppScreenHeader({ children, className }) {
1848
+ return /* @__PURE__ */ jsx("div", { className: cn("flex items-center gap-2 border-b border-border px-4 py-3 shrink-0", className), children });
1849
+ }
1850
+ function AppScreenBody({ children, className }) {
1851
+ return /* @__PURE__ */ jsx("div", { className: cn("flex-1 overflow-auto px-4 py-3", className), children });
1852
+ }
1853
+ var AppScreen = Object.assign(AppScreenRoot, {
1854
+ Header: AppScreenHeader,
1855
+ Body: AppScreenBody
1856
+ });
1793
1857
  var blurClass2 = {
1794
1858
  sm: "backdrop-blur-sm",
1795
1859
  md: "backdrop-blur-md",
@@ -2052,6 +2116,30 @@ function PostList({ posts, renderLink, emptyMessage = "No posts published yet."
2052
2116
  }
2053
2117
  return /* @__PURE__ */ jsx("div", { className: "grid gap-8 sm:grid-cols-2", children: posts.map((post) => /* @__PURE__ */ jsx(PostCard, { ...post, renderLink }, post.slug)) });
2054
2118
  }
2119
+ var components = {
2120
+ h1: ({ className, ...props }) => /* @__PURE__ */ jsx("h1", { className: cn("mt-8 scroll-m-20 text-3xl font-bold tracking-tight text-foreground first:mt-0", className), ...props }),
2121
+ h2: ({ className, ...props }) => /* @__PURE__ */ jsx("h2", { className: cn("mt-10 scroll-m-20 text-2xl font-semibold tracking-tight text-foreground first:mt-0", className), ...props }),
2122
+ h3: ({ className, ...props }) => /* @__PURE__ */ jsx("h3", { className: cn("mt-8 scroll-m-20 text-xl font-semibold tracking-tight text-foreground", className), ...props }),
2123
+ h4: ({ className, ...props }) => /* @__PURE__ */ jsx("h4", { className: cn("mt-6 scroll-m-20 text-lg font-semibold tracking-tight text-foreground", className), ...props }),
2124
+ p: ({ className, ...props }) => /* @__PURE__ */ jsx("p", { className: cn("leading-7 text-muted-foreground [&:not(:first-child)]:mt-6", className), ...props }),
2125
+ ul: ({ className, ...props }) => /* @__PURE__ */ jsx("ul", { className: cn("my-6 ml-6 list-disc text-muted-foreground", className), ...props }),
2126
+ ol: ({ className, ...props }) => /* @__PURE__ */ jsx("ol", { className: cn("my-6 ml-6 list-decimal text-muted-foreground", className), ...props }),
2127
+ li: ({ className, ...props }) => /* @__PURE__ */ jsx("li", { className: cn("mt-2", className), ...props }),
2128
+ blockquote: ({ className, ...props }) => /* @__PURE__ */ jsx("blockquote", { className: cn("mt-6 rounded-r-lg border-l-4 border-primary bg-muted py-4 pl-6 pr-4 italic text-muted-foreground", className), ...props }),
2129
+ hr: (props) => /* @__PURE__ */ jsx("hr", { className: "my-8 border-border", ...props }),
2130
+ img: ({ className, alt, ...props }) => /* @__PURE__ */ jsx("img", { className: cn("rounded-lg border shadow-sm", className), alt, ...props }),
2131
+ pre: ({ className, ...props }) => /* @__PURE__ */ jsx("pre", { className: cn("mt-6 mb-4 overflow-x-auto rounded-lg bg-muted p-4 text-sm", className), ...props }),
2132
+ code: ({ className, ...props }) => /* @__PURE__ */ jsx("code", { className: cn("relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm text-foreground", className), ...props }),
2133
+ table: ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: "my-6 w-full overflow-y-auto rounded-lg border border-border", children: /* @__PURE__ */ jsx("table", { className: cn("w-full", className), ...props }) }),
2134
+ tr: ({ className, ...props }) => /* @__PURE__ */ jsx("tr", { className: cn("m-0 border-t border-border p-0 even:bg-muted", className), ...props }),
2135
+ th: ({ className, ...props }) => /* @__PURE__ */ jsx("th", { className: cn("border border-border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right", className), ...props }),
2136
+ td: ({ className, ...props }) => /* @__PURE__ */ jsx("td", { className: cn("border border-border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right", className), ...props }),
2137
+ a: ({ className, ...props }) => /* @__PURE__ */ jsx("a", { className: cn("font-medium text-primary underline underline-offset-4 hover:text-primary/80", className), ...props })
2138
+ };
2139
+ function MdxContent({ code }) {
2140
+ const MDXComponent = useMDXComponent(code);
2141
+ return /* @__PURE__ */ jsx(MDXComponent, { components });
2142
+ }
2055
2143
  function useMounted() {
2056
2144
  const [mounted, setMounted] = useState(false);
2057
2145
  useEffect(() => {
@@ -2186,6 +2274,6 @@ function usePagination(total, pageSize) {
2186
2274
  return { page, pageSize, totalPages, offset, hasPrev: page > 1, hasNext: page < totalPages, goTo, next, prev };
2187
2275
  }
2188
2276
 
2189
- export { AppShell, AuthSection, Badge, Button, Card, Checkbox, ConfirmDialog, ContactSection, ContextMenu, CountUp, CtaSection, DevBanner, Dock, EmptyState, ErrorPage, FadeIn, FaqSection, FeatureCard, FeaturesSection, Footer, FullPageSpinner, GlassCard, HeroSection, ImageCard, Input, LogoStrip, Navbar, NewsletterSection, OlwibaUIProvider, Overlay, PageHeader, PageTransition, PostCard, PostList, PricingCard, PricingSection, RegisterHotkeys, RootErrorFallback, SectionTitle, Spotlight, StaggerChildren, StatCard, StatsSection, Suspensed, Switch, TeamSection, TestimonialCard, TestimonialsSection, Textarea, ThemeColorUpdater, ThemeSwitchMinimal, Underlay, UpgradePrompt, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
2277
+ export { AppScreen, AppShell, AuthSection, Badge, Button, Card, Checkbox, ConfirmDialog, ContactSection, ContextMenu, CountUp, CtaSection, DevBanner, Dock, EmptyState, ErrorPage, FadeIn, FaqSection, FeatureCard, FeaturesSection, Footer, FullPageSpinner, GlassCard, HeroSection, ImageCard, Input, LogoStrip, MdxContent, Navbar, NewsletterSection, OlwibaUIProvider, Overlay, PageHeader, PageTransition, PhoneFrame, PostCard, PostList, PricingCard, PricingSection, RegisterHotkeys, RootErrorFallback, SectionTitle, Spotlight, StaggerChildren, StatCard, StatsSection, Suspensed, Switch, TeamSection, TestimonialCard, TestimonialsSection, Textarea, ThemeColorUpdater, ThemeSwitchMinimal, Underlay, UpgradePrompt, VersionBanner, cn, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
2190
2278
  //# sourceMappingURL=index.js.map
2191
2279
  //# sourceMappingURL=index.js.map