@olwiba/ui 0.0.38 → 0.0.42

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.
@@ -0,0 +1,35 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface ActionEmailProps {
5
+ appName: string;
6
+ preview: string;
7
+ heading: string;
8
+ description: string;
9
+ actionLabel: string;
10
+ actionUrl: string;
11
+ brandColor?: string;
12
+ showLinkFallback?: boolean;
13
+ }
14
+ declare function ActionEmail({ appName, preview, heading, description, actionLabel, actionUrl, brandColor, showLinkFallback, }: ActionEmailProps): react_jsx_runtime.JSX.Element;
15
+
16
+ interface NoticeEmailProps {
17
+ appName: string;
18
+ preview: string;
19
+ heading: string;
20
+ body: string;
21
+ brandColor?: string;
22
+ }
23
+ declare function NoticeEmail({ appName, preview, heading, body, brandColor, }: NoticeEmailProps): react_jsx_runtime.JSX.Element;
24
+
25
+ interface EmailLayoutProps {
26
+ preview?: string;
27
+ appName: string;
28
+ brandColor?: string;
29
+ children: ReactNode;
30
+ footer?: ReactNode;
31
+ }
32
+ /** Branded email shell — UI block composed from CN primitives. */
33
+ declare function EmailLayout({ preview, appName, brandColor, children, footer, }: EmailLayoutProps): react_jsx_runtime.JSX.Element;
34
+
35
+ export { ActionEmail, type ActionEmailProps, EmailLayout, type EmailLayoutProps, NoticeEmail, type NoticeEmailProps };
@@ -0,0 +1,135 @@
1
+ import { EmailRoot, EmailHead, EmailPreview, EmailBody, emailTheme, EmailContainer, EmailSection, EmailText, EmailHeading, EmailButton, EmailLink } from '@olwiba/cn/email';
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
+
4
+ // src/email/ActionEmail.tsx
5
+ function EmailLayout({
6
+ preview,
7
+ appName,
8
+ brandColor = emailTheme.defaultBrandColor,
9
+ children,
10
+ footer
11
+ }) {
12
+ const year = (/* @__PURE__ */ new Date()).getFullYear();
13
+ return /* @__PURE__ */ jsxs(EmailRoot, { children: [
14
+ /* @__PURE__ */ jsx(EmailHead, {}),
15
+ preview ? /* @__PURE__ */ jsx(EmailPreview, { children: preview }) : null,
16
+ /* @__PURE__ */ jsx(
17
+ EmailBody,
18
+ {
19
+ style: {
20
+ backgroundColor: emailTheme.pageBackground,
21
+ fontFamily: emailTheme.fontFamily,
22
+ margin: 0,
23
+ padding: "24px 0"
24
+ },
25
+ children: /* @__PURE__ */ jsxs(
26
+ EmailContainer,
27
+ {
28
+ style: {
29
+ maxWidth: "560px",
30
+ margin: "0 auto",
31
+ backgroundColor: emailTheme.cardBackground,
32
+ borderRadius: "16px",
33
+ overflow: "hidden",
34
+ border: `1px solid ${emailTheme.cardBorder}`
35
+ },
36
+ children: [
37
+ /* @__PURE__ */ jsx(
38
+ EmailSection,
39
+ {
40
+ style: {
41
+ padding: "24px 32px",
42
+ borderBottom: `1px solid ${emailTheme.cardBorder}`
43
+ },
44
+ children: /* @__PURE__ */ jsx(
45
+ EmailText,
46
+ {
47
+ style: {
48
+ margin: 0,
49
+ fontSize: "18px",
50
+ fontWeight: 600,
51
+ color: brandColor
52
+ },
53
+ children: appName
54
+ }
55
+ )
56
+ }
57
+ ),
58
+ /* @__PURE__ */ jsx(EmailSection, { style: { padding: "32px" }, children }),
59
+ footer ?? /* @__PURE__ */ jsx(
60
+ EmailSection,
61
+ {
62
+ style: {
63
+ padding: "20px 32px",
64
+ borderTop: `1px solid ${emailTheme.cardBorder}`,
65
+ backgroundColor: emailTheme.mutedBackground
66
+ },
67
+ children: /* @__PURE__ */ jsxs(
68
+ EmailText,
69
+ {
70
+ variant: "caption",
71
+ style: {
72
+ margin: 0,
73
+ textAlign: "center"
74
+ },
75
+ children: [
76
+ "\xA9 ",
77
+ year,
78
+ " ",
79
+ appName,
80
+ ". All rights reserved."
81
+ ]
82
+ }
83
+ )
84
+ }
85
+ )
86
+ ]
87
+ }
88
+ )
89
+ }
90
+ )
91
+ ] });
92
+ }
93
+ function EmailLinkFallback({
94
+ actionUrl,
95
+ label = "Or copy and paste this link into your browser:",
96
+ brandColor
97
+ }) {
98
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
99
+ /* @__PURE__ */ jsx(EmailText, { variant: "caption", style: { margin: "24px 0 8px" }, children: label }),
100
+ /* @__PURE__ */ jsx(EmailText, { style: { margin: 0 }, children: /* @__PURE__ */ jsx(EmailLink, { href: actionUrl, brandColor, children: actionUrl }) })
101
+ ] });
102
+ }
103
+ function ActionEmail({
104
+ appName,
105
+ preview,
106
+ heading,
107
+ description,
108
+ actionLabel,
109
+ actionUrl,
110
+ brandColor = emailTheme.defaultBrandColor,
111
+ showLinkFallback = true
112
+ }) {
113
+ return /* @__PURE__ */ jsxs(EmailLayout, { preview, appName, brandColor, children: [
114
+ /* @__PURE__ */ jsx(EmailHeading, { children: heading }),
115
+ /* @__PURE__ */ jsx(EmailText, { variant: "muted", style: { margin: "0 0 24px" }, children: description }),
116
+ /* @__PURE__ */ jsx(EmailButton, { href: actionUrl, label: actionLabel, brandColor }),
117
+ showLinkFallback ? /* @__PURE__ */ jsx(EmailLinkFallback, { actionUrl, brandColor }) : null
118
+ ] });
119
+ }
120
+ function NoticeEmail({
121
+ appName,
122
+ preview,
123
+ heading,
124
+ body,
125
+ brandColor = emailTheme.defaultBrandColor
126
+ }) {
127
+ return /* @__PURE__ */ jsxs(EmailLayout, { preview, appName, brandColor, children: [
128
+ /* @__PURE__ */ jsx(EmailHeading, { children: heading }),
129
+ /* @__PURE__ */ jsx(EmailText, { variant: "muted", style: { margin: 0, whiteSpace: "pre-wrap" }, children: body })
130
+ ] });
131
+ }
132
+
133
+ export { ActionEmail, EmailLayout, NoticeEmail };
134
+ //# sourceMappingURL=index.js.map
135
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/email/EmailLayout.tsx","../../src/email/EmailLinkFallback.tsx","../../src/email/ActionEmail.tsx","../../src/email/NoticeEmail.tsx"],"names":["jsxs","jsx","EmailText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C,GAAAA,CAACG,YAAAA,EAAA,EAAc,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,oBACvBH,GAAAA,CAACC,SAAAA,EAAA,EAAU,OAAA,EAAQ,OAAA,EAAQ,KAAA,EAAO,EAAE,MAAA,EAAQ,CAAA,EAAG,UAAA,EAAY,UAAA,IACxD,QAAA,EAAA,IAAA,EACH;AAAA,GAAA,EACF,CAAA;AAEJ","file":"index.js","sourcesContent":["import type { ReactNode } from 'react';\nimport {\n EmailBody,\n EmailContainer,\n EmailHead,\n EmailPreview,\n EmailRoot,\n EmailSection,\n EmailText,\n emailTheme,\n} from '@olwiba/cn/email';\n\nexport interface EmailLayoutProps {\n preview?: string;\n appName: string;\n brandColor?: string;\n children: ReactNode;\n footer?: ReactNode;\n}\n\n/** Branded email shell — UI block composed from CN primitives. */\nexport function EmailLayout({\n preview,\n appName,\n brandColor = emailTheme.defaultBrandColor,\n children,\n footer,\n}: EmailLayoutProps) {\n const year = new Date().getFullYear();\n\n return (\n <EmailRoot>\n <EmailHead />\n {preview ? <EmailPreview>{preview}</EmailPreview> : null}\n <EmailBody\n style={{\n backgroundColor: emailTheme.pageBackground,\n fontFamily: emailTheme.fontFamily,\n margin: 0,\n padding: '24px 0',\n }}\n >\n <EmailContainer\n style={{\n maxWidth: '560px',\n margin: '0 auto',\n backgroundColor: emailTheme.cardBackground,\n borderRadius: '16px',\n overflow: 'hidden',\n border: `1px solid ${emailTheme.cardBorder}`,\n }}\n >\n <EmailSection\n style={{\n padding: '24px 32px',\n borderBottom: `1px solid ${emailTheme.cardBorder}`,\n }}\n >\n <EmailText\n style={{\n margin: 0,\n fontSize: '18px',\n fontWeight: 600,\n color: brandColor,\n }}\n >\n {appName}\n </EmailText>\n </EmailSection>\n\n <EmailSection style={{ padding: '32px' }}>{children}</EmailSection>\n\n {footer ?? (\n <EmailSection\n style={{\n padding: '20px 32px',\n borderTop: `1px solid ${emailTheme.cardBorder}`,\n backgroundColor: emailTheme.mutedBackground,\n }}\n >\n <EmailText\n variant=\"caption\"\n style={{\n margin: 0,\n textAlign: 'center',\n }}\n >\n © {year} {appName}. All rights reserved.\n </EmailText>\n </EmailSection>\n )}\n </EmailContainer>\n </EmailBody>\n </EmailRoot>\n );\n}\n","import { EmailLink, EmailText } from '@olwiba/cn/email';\n\nexport interface EmailLinkFallbackProps {\n actionUrl: string;\n label?: string;\n brandColor?: string;\n}\n\nexport function EmailLinkFallback({\n actionUrl,\n label = 'Or copy and paste this link into your browser:',\n brandColor,\n}: EmailLinkFallbackProps) {\n return (\n <>\n <EmailText variant=\"caption\" style={{ margin: '24px 0 8px' }}>\n {label}\n </EmailText>\n <EmailText style={{ margin: 0 }}>\n <EmailLink href={actionUrl} brandColor={brandColor}>\n {actionUrl}\n </EmailLink>\n </EmailText>\n </>\n );\n}\n","import {\n EmailButton,\n EmailHeading,\n EmailText,\n emailTheme,\n} from '@olwiba/cn/email';\nimport { EmailLayout } from './EmailLayout';\nimport { EmailLinkFallback } from './EmailLinkFallback';\n\nexport interface ActionEmailProps {\n appName: string;\n preview: string;\n heading: string;\n description: string;\n actionLabel: string;\n actionUrl: string;\n brandColor?: string;\n showLinkFallback?: boolean;\n}\n\nexport function ActionEmail({\n appName,\n preview,\n heading,\n description,\n actionLabel,\n actionUrl,\n brandColor = emailTheme.defaultBrandColor,\n showLinkFallback = true,\n}: ActionEmailProps) {\n return (\n <EmailLayout preview={preview} appName={appName} brandColor={brandColor}>\n <EmailHeading>{heading}</EmailHeading>\n <EmailText variant=\"muted\" style={{ margin: '0 0 24px' }}>\n {description}\n </EmailText>\n <EmailButton href={actionUrl} label={actionLabel} brandColor={brandColor} />\n {showLinkFallback ? (\n <EmailLinkFallback actionUrl={actionUrl} brandColor={brandColor} />\n ) : null}\n </EmailLayout>\n );\n}\n","import {\n EmailHeading,\n EmailText,\n emailTheme,\n} from '@olwiba/cn/email';\nimport { EmailLayout } from './EmailLayout';\n\nexport interface NoticeEmailProps {\n appName: string;\n preview: string;\n heading: string;\n body: string;\n brandColor?: string;\n}\n\nexport function NoticeEmail({\n appName,\n preview,\n heading,\n body,\n brandColor = emailTheme.defaultBrandColor,\n}: NoticeEmailProps) {\n return (\n <EmailLayout preview={preview} appName={appName} brandColor={brandColor}>\n <EmailHeading>{heading}</EmailHeading>\n <EmailText variant=\"muted\" style={{ margin: 0, whiteSpace: 'pre-wrap' }}>\n {body}\n </EmailText>\n </EmailLayout>\n );\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as React from 'react';
4
- import { ReactNode } from 'react';
4
+ import React__default, { ReactNode } from 'react';
5
5
  import { ButtonProps as ButtonProps$1, CardProps as CardProps$1, BadgeProps as BadgeProps$1, InputProps as InputProps$1, TextareaProps as TextareaProps$1, CheckboxProps as CheckboxProps$1, SwitchProps as SwitchProps$1 } from '@olwiba/cn';
6
6
  export { CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@olwiba/cn';
7
7
  import { LucideIcon } from 'lucide-react';
@@ -60,6 +60,68 @@ declare const Switch: React.ForwardRefExoticComponent<SwitchProps$1 & {
60
60
  mode?: "default" | "playful" | "smooth";
61
61
  } & React.RefAttributes<HTMLButtonElement>>;
62
62
 
63
+ declare const gapMap$1: {
64
+ none: string;
65
+ xs: string;
66
+ sm: string;
67
+ md: string;
68
+ lg: string;
69
+ xl: string;
70
+ };
71
+ interface GridProps extends React__default.HTMLAttributes<HTMLDivElement> {
72
+ columns?: 1 | 2 | 3 | 4 | 5 | 6 | 12;
73
+ gap?: keyof typeof gapMap$1;
74
+ }
75
+ declare function Grid({ columns, gap, className, children, ...props }: GridProps): react_jsx_runtime.JSX.Element;
76
+ interface GridItemProps extends React__default.HTMLAttributes<HTMLDivElement> {
77
+ span?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
78
+ rowSpan?: 1 | 2 | 3 | 4;
79
+ }
80
+ declare function GridItem({ span, rowSpan, className, children, ...props }: GridItemProps): react_jsx_runtime.JSX.Element;
81
+
82
+ declare const gapMap: {
83
+ none: string;
84
+ xs: string;
85
+ sm: string;
86
+ md: string;
87
+ lg: string;
88
+ xl: string;
89
+ };
90
+ declare const alignMap: {
91
+ start: string;
92
+ center: string;
93
+ end: string;
94
+ stretch: string;
95
+ };
96
+ declare const justifyMap: {
97
+ start: string;
98
+ center: string;
99
+ end: string;
100
+ between: string;
101
+ around: string;
102
+ };
103
+ interface StackProps extends React__default.HTMLAttributes<HTMLDivElement> {
104
+ direction?: 'col' | 'row';
105
+ gap?: keyof typeof gapMap;
106
+ align?: keyof typeof alignMap;
107
+ justify?: keyof typeof justifyMap;
108
+ wrap?: boolean;
109
+ }
110
+ declare function Stack({ direction, gap, align, justify, wrap, className, children, ...props }: StackProps): react_jsx_runtime.JSX.Element;
111
+
112
+ declare const paddingMap: {
113
+ none: string;
114
+ sm: string;
115
+ md: string;
116
+ lg: string;
117
+ };
118
+ interface SectionProps extends React__default.HTMLAttributes<HTMLElement> {
119
+ title?: string;
120
+ description?: string;
121
+ padding?: keyof typeof paddingMap;
122
+ }
123
+ declare function Section({ title, description, padding, className, children, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
124
+
63
125
  interface AppNavItem {
64
126
  icon: LucideIcon;
65
127
  label: string;
@@ -894,4 +956,4 @@ interface UsePaginationReturn {
894
956
  }
895
957
  declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
896
958
 
897
- 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, ChangelogCard, type ChangelogCardProps, ChangelogList, type ChangelogListProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, 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, type NewsletterSectionProps, 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 };
959
+ 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, ChangelogCard, type ChangelogCardProps, ChangelogList, type ChangelogListProps, Checkbox, type CheckboxProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, 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, Grid, GridItem, type GridItemProps, type GridProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, MdxContent, type MdxContentProps, Navbar, type NavbarProps, NewsletterSection, type NewsletterSectionProps, 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, Section, type SectionProps, SectionTitle, type SectionTitleProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, Stack, type StackProps, 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
@@ -73,6 +73,119 @@ var Switch = React25.forwardRef(({ mode: _mode, ...props }, ref) => {
73
73
  return /* @__PURE__ */ jsx(Switch$1, { ...props, ref });
74
74
  });
75
75
  Switch.displayName = "Switch";
76
+ var colsMap = {
77
+ 1: "grid-cols-1",
78
+ 2: "grid-cols-2",
79
+ 3: "grid-cols-3",
80
+ 4: "grid-cols-4",
81
+ 5: "grid-cols-5",
82
+ 6: "grid-cols-6",
83
+ 12: "grid-cols-12"
84
+ };
85
+ var gapMap = {
86
+ none: "gap-0",
87
+ xs: "gap-2",
88
+ sm: "gap-3",
89
+ md: "gap-4",
90
+ lg: "gap-6",
91
+ xl: "gap-8"
92
+ };
93
+ var spanMap = {
94
+ 1: "col-span-1",
95
+ 2: "col-span-2",
96
+ 3: "col-span-3",
97
+ 4: "col-span-4",
98
+ 5: "col-span-5",
99
+ 6: "col-span-6",
100
+ 7: "col-span-7",
101
+ 8: "col-span-8",
102
+ 9: "col-span-9",
103
+ 10: "col-span-10",
104
+ 11: "col-span-11",
105
+ 12: "col-span-12"
106
+ };
107
+ var rowSpanMap = {
108
+ 1: "row-span-1",
109
+ 2: "row-span-2",
110
+ 3: "row-span-3",
111
+ 4: "row-span-4"
112
+ };
113
+ function Grid({ columns = 3, gap = "md", className, children, ...props }) {
114
+ return /* @__PURE__ */ jsx("div", { className: cn("grid", colsMap[columns], gapMap[gap], className), ...props, children });
115
+ }
116
+ function GridItem({ span = 1, rowSpan, className, children, ...props }) {
117
+ return /* @__PURE__ */ jsx(
118
+ "div",
119
+ {
120
+ className: cn(spanMap[span], rowSpan != null && rowSpanMap[rowSpan], className),
121
+ ...props,
122
+ children
123
+ }
124
+ );
125
+ }
126
+ var gapMap2 = {
127
+ none: "gap-0",
128
+ xs: "gap-2",
129
+ sm: "gap-3",
130
+ md: "gap-4",
131
+ lg: "gap-6",
132
+ xl: "gap-8"
133
+ };
134
+ var alignMap = {
135
+ start: "items-start",
136
+ center: "items-center",
137
+ end: "items-end",
138
+ stretch: "items-stretch"
139
+ };
140
+ var justifyMap = {
141
+ start: "justify-start",
142
+ center: "justify-center",
143
+ end: "justify-end",
144
+ between: "justify-between",
145
+ around: "justify-around"
146
+ };
147
+ function Stack({
148
+ direction = "col",
149
+ gap = "md",
150
+ align = "stretch",
151
+ justify = "start",
152
+ wrap = false,
153
+ className,
154
+ children,
155
+ ...props
156
+ }) {
157
+ return /* @__PURE__ */ jsx(
158
+ "div",
159
+ {
160
+ className: cn(
161
+ "flex",
162
+ direction === "col" ? "flex-col" : "flex-row",
163
+ gapMap2[gap],
164
+ alignMap[align],
165
+ justifyMap[justify],
166
+ wrap && "flex-wrap",
167
+ className
168
+ ),
169
+ ...props,
170
+ children
171
+ }
172
+ );
173
+ }
174
+ var paddingMap = {
175
+ none: "",
176
+ sm: "py-4",
177
+ md: "py-8",
178
+ lg: "py-16"
179
+ };
180
+ function Section({ title, description, padding = "md", className, children, ...props }) {
181
+ return /* @__PURE__ */ jsxs("section", { className: cn("w-full", paddingMap[padding], className), ...props, children: [
182
+ (title || description) && /* @__PURE__ */ jsxs("div", { className: "mb-6", children: [
183
+ title && /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold text-foreground", children: title }),
184
+ description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: description })
185
+ ] }),
186
+ children
187
+ ] });
188
+ }
76
189
  function NavUser({ user }) {
77
190
  const { isMobile } = useSidebar();
78
191
  const uiMode = useUIMode();
@@ -153,7 +266,7 @@ function ShellSidebar({
153
266
  /* @__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({
154
267
  href: brand.href ?? "#",
155
268
  children: /* @__PURE__ */ jsxs(Fragment, { children: [
156
- brand.logo ?? /* @__PURE__ */ jsx("span", { className: "flex size-4 shrink-0 items-center justify-center text-sm font-semibold", children: fallbackLogo }),
269
+ brand.logo ? /* @__PURE__ */ jsx("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: brand.logo }) : /* @__PURE__ */ jsx("span", { className: "flex size-4 shrink-0 items-center justify-center text-sm font-semibold", children: fallbackLogo }),
157
270
  /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate text-base font-semibold group-data-[collapsible=icon]:hidden", children: brand.name })
158
271
  ] })
159
272
  }) }) }) }) }),
@@ -1243,6 +1356,17 @@ function NewsletterSection({
1243
1356
  " ",
1244
1357
  /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: successDescription })
1245
1358
  ] }) : /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "mt-8 flex flex-col gap-3 sm:flex-row", children: [
1359
+ /* @__PURE__ */ jsx(
1360
+ "input",
1361
+ {
1362
+ type: "text",
1363
+ name: "company",
1364
+ tabIndex: -1,
1365
+ autoComplete: "off",
1366
+ "aria-hidden": "true",
1367
+ className: "hidden"
1368
+ }
1369
+ ),
1246
1370
  /* @__PURE__ */ jsx(
1247
1371
  Input$1,
1248
1372
  {
@@ -1331,23 +1455,34 @@ function ContactSection({
1331
1455
  ] }),
1332
1456
  /* @__PURE__ */ jsx(Button$1, { variant: "outline", onClick: () => setSubmitted(false), children: sendAnotherLabel })
1333
1457
  ] }) : /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-5", children: [
1458
+ /* @__PURE__ */ jsx(
1459
+ "input",
1460
+ {
1461
+ type: "text",
1462
+ name: "company",
1463
+ tabIndex: -1,
1464
+ autoComplete: "off",
1465
+ "aria-hidden": "true",
1466
+ className: "hidden"
1467
+ }
1468
+ ),
1334
1469
  /* @__PURE__ */ jsxs("div", { className: "grid gap-4 sm:grid-cols-2", children: [
1335
1470
  /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
1336
1471
  /* @__PURE__ */ jsx(Label, { htmlFor: "contact-first", children: "First name" }),
1337
- /* @__PURE__ */ jsx(Input$1, { id: "contact-first", placeholder: "Olivia", required: true })
1472
+ /* @__PURE__ */ jsx(Input$1, { id: "contact-first", name: "firstName", placeholder: "Olivia", required: true })
1338
1473
  ] }),
1339
1474
  /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
1340
1475
  /* @__PURE__ */ jsx(Label, { htmlFor: "contact-last", children: "Last name" }),
1341
- /* @__PURE__ */ jsx(Input$1, { id: "contact-last", placeholder: "Reed", required: true })
1476
+ /* @__PURE__ */ jsx(Input$1, { id: "contact-last", name: "lastName", placeholder: "Reed", required: true })
1342
1477
  ] })
1343
1478
  ] }),
1344
1479
  /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
1345
1480
  /* @__PURE__ */ jsx(Label, { htmlFor: "contact-email", children: "Email" }),
1346
- /* @__PURE__ */ jsx(Input$1, { id: "contact-email", type: "email", placeholder: "olivia@company.com", required: true })
1481
+ /* @__PURE__ */ jsx(Input$1, { id: "contact-email", name: "email", type: "email", placeholder: "olivia@company.com", required: true })
1347
1482
  ] }),
1348
1483
  /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
1349
1484
  /* @__PURE__ */ jsx(Label, { htmlFor: "contact-subject", children: "Subject" }),
1350
- /* @__PURE__ */ jsx(Input$1, { id: "contact-subject", placeholder: "How can we help?", required: true })
1485
+ /* @__PURE__ */ jsx(Input$1, { id: "contact-subject", name: "subject", placeholder: "How can we help?", required: true })
1351
1486
  ] }),
1352
1487
  /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
1353
1488
  /* @__PURE__ */ jsx(Label, { htmlFor: "contact-message", children: "Message" }),
@@ -1355,6 +1490,7 @@ function ContactSection({
1355
1490
  Textarea$1,
1356
1491
  {
1357
1492
  id: "contact-message",
1493
+ name: "message",
1358
1494
  placeholder: "Tell us what you're working on...",
1359
1495
  className: "min-h-28 resize-none",
1360
1496
  required: true
@@ -1404,7 +1540,7 @@ function Navbar({
1404
1540
  renderLink({
1405
1541
  href: brandHref,
1406
1542
  children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2 font-semibold", children: [
1407
- brand.logo && /* @__PURE__ */ jsx("span", { className: "flex h-7 w-7 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: brand.logo }),
1543
+ brand.logo && /* @__PURE__ */ jsx("span", { className: "flex h-9 w-9 items-center justify-center rounded-xl bg-primary text-primary-foreground", children: brand.logo }),
1408
1544
  /* @__PURE__ */ jsx("span", { children: brand.name })
1409
1545
  ] })
1410
1546
  }),
@@ -1476,18 +1612,18 @@ function Footer({
1476
1612
  }) {
1477
1613
  const brandHref = brand.href ?? "/";
1478
1614
  const copyrightText = legal ?? `\xA9 ${(/* @__PURE__ */ new Date()).getFullYear()} ${brand.name}. All rights reserved.`;
1479
- return /* @__PURE__ */ jsx("footer", { className: "bg-gray-900", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-7xl overflow-hidden px-6 py-20 sm:py-24 lg:px-8", children: [
1615
+ return /* @__PURE__ */ jsx("footer", { className: "overflow-hidden rounded-2xl border bg-foreground text-background", children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-7xl px-6 py-20 sm:py-24 lg:px-8", children: [
1480
1616
  /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: renderLink({
1481
1617
  href: brandHref,
1482
1618
  className: "flex items-center gap-2",
1483
1619
  children: /* @__PURE__ */ jsxs(Fragment, { children: [
1484
- brand.logo && /* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 items-center justify-center rounded-lg bg-white/10 text-white", children: brand.logo }),
1485
- /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-white", children: brand.name })
1620
+ brand.logo && /* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 items-center justify-center rounded-lg bg-background/10 text-background", children: brand.logo }),
1621
+ /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-background", children: brand.name })
1486
1622
  ] })
1487
1623
  }) }),
1488
1624
  navLinks && navLinks.length > 0 && /* @__PURE__ */ jsx("nav", { className: "mt-10 flex flex-wrap justify-center gap-x-12 gap-y-3", "aria-label": "Footer", children: navLinks.map(({ label, href }) => /* @__PURE__ */ jsx("div", { children: renderLink({
1489
1625
  href,
1490
- className: "text-sm/6 text-gray-400 hover:text-white transition-colors",
1626
+ className: "text-sm/6 text-background/70 transition-colors hover:text-background",
1491
1627
  children: label
1492
1628
  }) }, label)) }),
1493
1629
  socialLinks && socialLinks.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-10 flex justify-center gap-x-10", children: socialLinks.map(({ label, href, icon }) => /* @__PURE__ */ jsx(
@@ -1495,12 +1631,12 @@ function Footer({
1495
1631
  {
1496
1632
  href,
1497
1633
  "aria-label": label,
1498
- className: "text-gray-400 hover:text-gray-300 transition-colors",
1634
+ className: "text-background/70 transition-colors hover:text-background",
1499
1635
  children: icon
1500
1636
  },
1501
1637
  label
1502
1638
  )) }),
1503
- /* @__PURE__ */ jsx("p", { className: "mt-10 text-center text-sm/6 text-gray-500", children: copyrightText })
1639
+ /* @__PURE__ */ jsx("p", { className: "mt-10 text-center text-sm/6 text-background/50", children: copyrightText })
1504
1640
  ] }) });
1505
1641
  }
1506
1642
  var speedDuration = {
@@ -2375,6 +2511,6 @@ function usePagination(total, pageSize) {
2375
2511
  return { page, pageSize, totalPages, offset, hasPrev: page > 1, hasNext: page < totalPages, goTo, next, prev };
2376
2512
  }
2377
2513
 
2378
- export { AppScreen, AppShell, AuthSection, Badge, Button, Card, ChangelogCard, ChangelogList, 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 };
2514
+ export { AppScreen, AppShell, AuthSection, Badge, Button, Card, ChangelogCard, ChangelogList, Checkbox, ConfirmDialog, ContactSection, ContextMenu, CountUp, CtaSection, DevBanner, Dock, EmptyState, ErrorPage, FadeIn, FaqSection, FeatureCard, FeaturesSection, Footer, FullPageSpinner, GlassCard, Grid, GridItem, HeroSection, ImageCard, Input, LogoStrip, MdxContent, Navbar, NewsletterSection, OlwibaUIProvider, Overlay, PageHeader, PageTransition, PhoneFrame, PostCard, PostList, PricingCard, PricingSection, RegisterHotkeys, RootErrorFallback, Section, SectionTitle, Spotlight, Stack, 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 };
2379
2515
  //# sourceMappingURL=index.js.map
2380
2516
  //# sourceMappingURL=index.js.map