@olwiba/ui 0.0.34 → 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 +61 -4
- package/dist/index.js +103 -8
- package/dist/index.js.map +1 -1
- package/package.json +8 -1
- package/src/app/AppShell.tsx +29 -5
- package/src/blog/MdxContent.tsx +71 -0
- package/src/components/AppScreen.tsx +33 -0
- package/src/components/PhoneFrame.tsx +65 -0
- package/src/index.ts +5 -0
- package/src/marketing/HeroSection.tsx +22 -7
package/dist/index.d.ts
CHANGED
|
@@ -105,6 +105,8 @@ interface AppShellProps {
|
|
|
105
105
|
pageTitle?: string;
|
|
106
106
|
/** Slot rendered at the start of the top header bar, after the sidebar trigger. */
|
|
107
107
|
headerStart?: ReactNode;
|
|
108
|
+
/** Slot rendered at the end of the top header bar. */
|
|
109
|
+
headerEnd?: ReactNode;
|
|
108
110
|
/** Override link rendering for SPA navigation. Defaults to a native <a>. */
|
|
109
111
|
renderLink?: AppShellRenderLink;
|
|
110
112
|
children?: ReactNode;
|
|
@@ -124,7 +126,7 @@ interface AppShellProps {
|
|
|
124
126
|
/** Which side the sidebar sits on. @default "left" */
|
|
125
127
|
side?: 'left' | 'right';
|
|
126
128
|
}
|
|
127
|
-
declare function AppShell({ brand, navItems, action, user, pageTitle, headerStart, renderLink, collapsible, sidebarPosition, side, children, }?: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
129
|
+
declare function AppShell({ brand, navItems, action, user, pageTitle, headerStart, headerEnd, renderLink, collapsible, sidebarPosition, side, children, }?: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
128
130
|
|
|
129
131
|
interface AuthFormProps {
|
|
130
132
|
/** Controls form title, fields, and footer text. @default 'signin' */
|
|
@@ -240,12 +242,14 @@ interface HeroSectionProps {
|
|
|
240
242
|
label: string;
|
|
241
243
|
href: string;
|
|
242
244
|
};
|
|
243
|
-
heroImage
|
|
245
|
+
heroImage?: React.ReactNode;
|
|
246
|
+
media?: 'image' | 'phone' | 'none';
|
|
247
|
+
phoneSize?: 'sm' | 'md' | 'lg';
|
|
244
248
|
avatarUrls?: string[];
|
|
245
249
|
socialProofText?: string;
|
|
246
250
|
renderLink?: AppShellRenderLink;
|
|
247
251
|
}
|
|
248
|
-
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;
|
|
249
253
|
|
|
250
254
|
interface FeaturesSectionProps {
|
|
251
255
|
title?: string;
|
|
@@ -598,6 +602,54 @@ interface ConfirmDialogProps extends Pick<UseConfirmReturn, 'isOpen' | 'options'
|
|
|
598
602
|
}
|
|
599
603
|
declare function ConfirmDialog({ isOpen, options, handleConfirm, handleCancel, destructive }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
|
|
600
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
|
+
|
|
601
653
|
interface GlassCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
602
654
|
blur?: 'sm' | 'md' | 'lg';
|
|
603
655
|
children: React.ReactNode;
|
|
@@ -735,6 +787,11 @@ interface PostListProps {
|
|
|
735
787
|
}
|
|
736
788
|
declare function PostList({ posts, renderLink, emptyMessage }: PostListProps): react_jsx_runtime.JSX.Element;
|
|
737
789
|
|
|
790
|
+
interface MdxContentProps {
|
|
791
|
+
code: string;
|
|
792
|
+
}
|
|
793
|
+
declare function MdxContent({ code }: MdxContentProps): react_jsx_runtime.JSX.Element;
|
|
794
|
+
|
|
738
795
|
declare function useMounted(): boolean;
|
|
739
796
|
|
|
740
797
|
interface UseControlledOpenReturn {
|
|
@@ -791,4 +848,4 @@ interface UsePaginationReturn {
|
|
|
791
848
|
}
|
|
792
849
|
declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
|
|
793
850
|
|
|
794
|
-
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) {
|
|
@@ -147,12 +148,13 @@ function ShellSidebar({
|
|
|
147
148
|
side,
|
|
148
149
|
sidebarPosition
|
|
149
150
|
}) {
|
|
151
|
+
const fallbackLogo = typeof brand.name === "string" ? brand.name.slice(0, 1).toUpperCase() : null;
|
|
150
152
|
return /* @__PURE__ */ jsxs(Sidebar, { side, collapsible, sidebarPosition, children: [
|
|
151
|
-
/* @__PURE__ */ jsx(SidebarHeader, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, className: "data-[slot=sidebar-menu-button]:!p-1.5", children: renderLink({
|
|
153
|
+
/* @__PURE__ */ jsx(SidebarHeader, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(SidebarMenuButton, { asChild: true, tooltip: typeof brand.name === "string" ? brand.name : void 0, className: "data-[slot=sidebar-menu-button]:!p-1.5", children: renderLink({
|
|
152
154
|
href: brand.href ?? "#",
|
|
153
155
|
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
154
|
-
brand.logo,
|
|
155
|
-
/* @__PURE__ */ jsx("span", { className: "text-base font-semibold", children: brand.name })
|
|
156
|
+
brand.logo ?? /* @__PURE__ */ jsx("span", { className: "flex size-4 shrink-0 items-center justify-center text-sm font-semibold", children: fallbackLogo }),
|
|
157
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-base font-semibold group-data-[collapsible=icon]:hidden", children: brand.name })
|
|
156
158
|
] })
|
|
157
159
|
}) }) }) }) }),
|
|
158
160
|
/* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsxs(SidebarGroupContent, { className: "flex flex-col gap-2", children: [
|
|
@@ -193,12 +195,17 @@ function ShellSidebar({
|
|
|
193
195
|
/* @__PURE__ */ jsx(SidebarFooter, { children: /* @__PURE__ */ jsx(NavUser, { user }) })
|
|
194
196
|
] });
|
|
195
197
|
}
|
|
196
|
-
function ShellHeader({
|
|
198
|
+
function ShellHeader({
|
|
199
|
+
pageTitle,
|
|
200
|
+
headerStart,
|
|
201
|
+
headerEnd
|
|
202
|
+
}) {
|
|
197
203
|
return /* @__PURE__ */ jsx("header", { className: "flex h-12 shrink-0 items-center gap-2 border-b transition-[width,height] ease-linear group-has-data-[collapsible=icon]/sidebar-wrapper:h-12", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-1 px-4 lg:gap-2 lg:px-6", children: [
|
|
198
204
|
/* @__PURE__ */ jsx(SidebarTrigger, { className: "-ml-1" }),
|
|
199
205
|
headerStart && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1", children: headerStart }),
|
|
200
206
|
/* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "mx-2 data-[orientation=vertical]:h-4" }),
|
|
201
|
-
/* @__PURE__ */ jsx("h1", { className: "text-base font-medium", children: pageTitle })
|
|
207
|
+
/* @__PURE__ */ jsx("h1", { className: "text-base font-medium", children: pageTitle }),
|
|
208
|
+
headerEnd && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center gap-1", children: headerEnd })
|
|
202
209
|
] }) });
|
|
203
210
|
}
|
|
204
211
|
var defaultBrand = {
|
|
@@ -217,6 +224,7 @@ function AppShell({
|
|
|
217
224
|
user = defaultUser,
|
|
218
225
|
pageTitle = "Dashboard",
|
|
219
226
|
headerStart,
|
|
227
|
+
headerEnd,
|
|
220
228
|
renderLink = defaultRenderLink,
|
|
221
229
|
collapsible = "icon",
|
|
222
230
|
sidebarPosition = "viewport",
|
|
@@ -244,7 +252,7 @@ function AppShell({
|
|
|
244
252
|
}
|
|
245
253
|
),
|
|
246
254
|
/* @__PURE__ */ jsxs(SidebarInset, { className: isContained ? void 0 : "overflow-y-auto", children: [
|
|
247
|
-
/* @__PURE__ */ jsx(ShellHeader, { pageTitle, headerStart }),
|
|
255
|
+
/* @__PURE__ */ jsx(ShellHeader, { pageTitle, headerStart, headerEnd }),
|
|
248
256
|
children
|
|
249
257
|
] })
|
|
250
258
|
]
|
|
@@ -609,6 +617,54 @@ function SectionTitle({ title, description, badge, className }) {
|
|
|
609
617
|
description && /* @__PURE__ */ jsx("p", { className: "mx-auto mt-4 max-w-2xl text-pretty text-muted-foreground", children: description })
|
|
610
618
|
] }) });
|
|
611
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
|
+
}
|
|
612
668
|
var defaultRenderLink4 = ({ href, children, className }) => /* @__PURE__ */ jsx("a", { href, className, children });
|
|
613
669
|
function HeroSection({
|
|
614
670
|
heading,
|
|
@@ -617,6 +673,8 @@ function HeroSection({
|
|
|
617
673
|
primaryCta,
|
|
618
674
|
secondaryCta,
|
|
619
675
|
heroImage,
|
|
676
|
+
media = "image",
|
|
677
|
+
phoneSize = "lg",
|
|
620
678
|
avatarUrls,
|
|
621
679
|
socialProofText,
|
|
622
680
|
renderLink = defaultRenderLink4
|
|
@@ -641,7 +699,7 @@ function HeroSection({
|
|
|
641
699
|
})
|
|
642
700
|
] })
|
|
643
701
|
] }) }),
|
|
644
|
-
/* @__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 }) })
|
|
645
703
|
] }),
|
|
646
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: [
|
|
647
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: [
|
|
@@ -1783,6 +1841,19 @@ function ConfirmDialog({ isOpen, options, handleConfirm, handleCancel, destructi
|
|
|
1783
1841
|
] })
|
|
1784
1842
|
] }) });
|
|
1785
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
|
+
});
|
|
1786
1857
|
var blurClass2 = {
|
|
1787
1858
|
sm: "backdrop-blur-sm",
|
|
1788
1859
|
md: "backdrop-blur-md",
|
|
@@ -2045,6 +2116,30 @@ function PostList({ posts, renderLink, emptyMessage = "No posts published yet."
|
|
|
2045
2116
|
}
|
|
2046
2117
|
return /* @__PURE__ */ jsx("div", { className: "grid gap-8 sm:grid-cols-2", children: posts.map((post) => /* @__PURE__ */ jsx(PostCard, { ...post, renderLink }, post.slug)) });
|
|
2047
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
|
+
}
|
|
2048
2143
|
function useMounted() {
|
|
2049
2144
|
const [mounted, setMounted] = useState(false);
|
|
2050
2145
|
useEffect(() => {
|
|
@@ -2179,6 +2274,6 @@ function usePagination(total, pageSize) {
|
|
|
2179
2274
|
return { page, pageSize, totalPages, offset, hasPrev: page > 1, hasNext: page < totalPages, goTo, next, prev };
|
|
2180
2275
|
}
|
|
2181
2276
|
|
|
2182
|
-
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 };
|
|
2183
2278
|
//# sourceMappingURL=index.js.map
|
|
2184
2279
|
//# sourceMappingURL=index.js.map
|