@olwiba/ui 0.0.45 → 0.1.0
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 +73 -5
- package/dist/index.js +73 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/app/AuthSection.tsx +4 -0
- package/src/layout/AppContent.tsx +34 -0
- package/src/layout/AppGrid.tsx +48 -0
- package/src/layout/PublicPageFrame.tsx +42 -0
- package/src/layout/index.ts +6 -0
package/dist/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ declare const Switch: React.ForwardRefExoticComponent<SwitchProps$1 & {
|
|
|
61
61
|
mode?: "default" | "playful" | "smooth";
|
|
62
62
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
63
63
|
|
|
64
|
-
declare const gapMap$
|
|
64
|
+
declare const gapMap$2: {
|
|
65
65
|
none: string;
|
|
66
66
|
xs: string;
|
|
67
67
|
sm: string;
|
|
@@ -71,7 +71,7 @@ declare const gapMap$1: {
|
|
|
71
71
|
};
|
|
72
72
|
interface GridProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
73
73
|
columns?: 1 | 2 | 3 | 4 | 5 | 6 | 12;
|
|
74
|
-
gap?: keyof typeof gapMap$
|
|
74
|
+
gap?: keyof typeof gapMap$2;
|
|
75
75
|
}
|
|
76
76
|
declare function Grid({ columns, gap, className, children, ...props }: GridProps): react_jsx_runtime.JSX.Element;
|
|
77
77
|
interface GridItemProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
@@ -80,7 +80,7 @@ interface GridItemProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
|
80
80
|
}
|
|
81
81
|
declare function GridItem({ span, rowSpan, className, children, ...props }: GridItemProps): react_jsx_runtime.JSX.Element;
|
|
82
82
|
|
|
83
|
-
declare const gapMap: {
|
|
83
|
+
declare const gapMap$1: {
|
|
84
84
|
none: string;
|
|
85
85
|
xs: string;
|
|
86
86
|
sm: string;
|
|
@@ -103,7 +103,7 @@ declare const justifyMap: {
|
|
|
103
103
|
};
|
|
104
104
|
interface StackProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
105
105
|
direction?: 'col' | 'row';
|
|
106
|
-
gap?: keyof typeof gapMap;
|
|
106
|
+
gap?: keyof typeof gapMap$1;
|
|
107
107
|
align?: keyof typeof alignMap;
|
|
108
108
|
justify?: keyof typeof justifyMap;
|
|
109
109
|
wrap?: boolean;
|
|
@@ -123,6 +123,72 @@ interface SectionProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
|
123
123
|
}
|
|
124
124
|
declare function Section({ title, description, padding, className, children, ...props }: SectionProps): react_jsx_runtime.JSX.Element;
|
|
125
125
|
|
|
126
|
+
declare const spacingMap$1: {
|
|
127
|
+
sm: string;
|
|
128
|
+
md: string;
|
|
129
|
+
lg: string;
|
|
130
|
+
};
|
|
131
|
+
declare const maxWidthMap$1: {
|
|
132
|
+
none: string;
|
|
133
|
+
'screen-lg': string;
|
|
134
|
+
'screen-xl': string;
|
|
135
|
+
'screen-2xl': string;
|
|
136
|
+
};
|
|
137
|
+
interface AppContentProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
138
|
+
spacing?: keyof typeof spacingMap$1;
|
|
139
|
+
maxWidth?: keyof typeof maxWidthMap$1;
|
|
140
|
+
}
|
|
141
|
+
declare function AppContent({ spacing, maxWidth, className, children, ...props }: AppContentProps): react_jsx_runtime.JSX.Element;
|
|
142
|
+
|
|
143
|
+
declare const columnsMap: {
|
|
144
|
+
1: string;
|
|
145
|
+
2: string;
|
|
146
|
+
3: string;
|
|
147
|
+
4: string;
|
|
148
|
+
};
|
|
149
|
+
declare const gapMap: {
|
|
150
|
+
sm: string;
|
|
151
|
+
md: string;
|
|
152
|
+
lg: string;
|
|
153
|
+
};
|
|
154
|
+
declare const spanMap: {
|
|
155
|
+
1: string;
|
|
156
|
+
2: string;
|
|
157
|
+
3: string;
|
|
158
|
+
4: string;
|
|
159
|
+
full: string;
|
|
160
|
+
};
|
|
161
|
+
interface AppGridProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
162
|
+
columns?: keyof typeof columnsMap;
|
|
163
|
+
gap?: keyof typeof gapMap;
|
|
164
|
+
}
|
|
165
|
+
declare function AppGrid({ columns, gap, className, children, ...props }: AppGridProps): react_jsx_runtime.JSX.Element;
|
|
166
|
+
interface AppGridCellProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
167
|
+
span?: keyof typeof spanMap;
|
|
168
|
+
}
|
|
169
|
+
declare function AppGridCell({ span, className, children, ...props }: AppGridCellProps): react_jsx_runtime.JSX.Element;
|
|
170
|
+
|
|
171
|
+
declare const surfaceMap: {
|
|
172
|
+
default: string;
|
|
173
|
+
muted: string;
|
|
174
|
+
};
|
|
175
|
+
declare const spacingMap: {
|
|
176
|
+
sm: string;
|
|
177
|
+
md: string;
|
|
178
|
+
lg: string;
|
|
179
|
+
};
|
|
180
|
+
declare const maxWidthMap: {
|
|
181
|
+
none: string;
|
|
182
|
+
'screen-xl': string;
|
|
183
|
+
'screen-2xl': string;
|
|
184
|
+
};
|
|
185
|
+
interface PublicPageFrameProps extends React__default.HTMLAttributes<HTMLDivElement> {
|
|
186
|
+
surface?: keyof typeof surfaceMap;
|
|
187
|
+
spacing?: keyof typeof spacingMap;
|
|
188
|
+
maxWidth?: keyof typeof maxWidthMap;
|
|
189
|
+
}
|
|
190
|
+
declare function PublicPageFrame({ surface, spacing, maxWidth, className, children, ...props }: PublicPageFrameProps): react_jsx_runtime.JSX.Element;
|
|
191
|
+
|
|
126
192
|
interface AppNavItem {
|
|
127
193
|
icon: LucideIcon;
|
|
128
194
|
label: string;
|
|
@@ -209,6 +275,8 @@ interface AuthFormProps {
|
|
|
209
275
|
loading?: boolean;
|
|
210
276
|
/** Render prop for links — use to inject framework-native link components (e.g. TanStack Router Link) */
|
|
211
277
|
renderLink?: AppShellRenderLink;
|
|
278
|
+
/** Optional content rendered below the form — use for social auth buttons or other additions */
|
|
279
|
+
footer?: React.ReactNode;
|
|
212
280
|
}
|
|
213
281
|
interface AuthSectionProps extends AuthFormProps {
|
|
214
282
|
/** Visual layout of the auth screen. @default 'centered' */
|
|
@@ -952,4 +1020,4 @@ interface UsePaginationReturn {
|
|
|
952
1020
|
}
|
|
953
1021
|
declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
|
|
954
1022
|
|
|
955
|
-
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, 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 };
|
|
1023
|
+
export { AppContent, type AppContentProps, AppGrid, AppGridCell, type AppGridCellProps, type AppGridProps, 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, 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, PublicPageFrame, type PublicPageFrameProps, 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
|
@@ -181,6 +181,74 @@ function Section({ title, description, padding = "md", className, children, ...p
|
|
|
181
181
|
children
|
|
182
182
|
] });
|
|
183
183
|
}
|
|
184
|
+
var spacingMap = {
|
|
185
|
+
sm: "space-y-4",
|
|
186
|
+
md: "space-y-6",
|
|
187
|
+
lg: "space-y-8"
|
|
188
|
+
};
|
|
189
|
+
var maxWidthMap = {
|
|
190
|
+
none: "",
|
|
191
|
+
"screen-lg": "mx-auto max-w-screen-lg",
|
|
192
|
+
"screen-xl": "mx-auto max-w-screen-xl",
|
|
193
|
+
"screen-2xl": "mx-auto max-w-screen-2xl"
|
|
194
|
+
};
|
|
195
|
+
function AppContent({
|
|
196
|
+
spacing = "md",
|
|
197
|
+
maxWidth = "none",
|
|
198
|
+
className,
|
|
199
|
+
children,
|
|
200
|
+
...props
|
|
201
|
+
}) {
|
|
202
|
+
return /* @__PURE__ */ jsx("div", { className: cn("p-6", maxWidthMap[maxWidth], spacingMap[spacing], className), ...props, children });
|
|
203
|
+
}
|
|
204
|
+
var columnsMap = {
|
|
205
|
+
1: "grid-cols-1",
|
|
206
|
+
2: "grid-cols-1 md:grid-cols-2",
|
|
207
|
+
3: "grid-cols-1 md:grid-cols-2 xl:grid-cols-3",
|
|
208
|
+
4: "grid-cols-1 md:grid-cols-2 xl:grid-cols-4"
|
|
209
|
+
};
|
|
210
|
+
var gapMap3 = {
|
|
211
|
+
sm: "gap-3",
|
|
212
|
+
md: "gap-4",
|
|
213
|
+
lg: "gap-6"
|
|
214
|
+
};
|
|
215
|
+
var spanMap2 = {
|
|
216
|
+
1: "md:col-span-1",
|
|
217
|
+
2: "md:col-span-2",
|
|
218
|
+
3: "xl:col-span-3",
|
|
219
|
+
4: "xl:col-span-4",
|
|
220
|
+
full: "col-span-full"
|
|
221
|
+
};
|
|
222
|
+
function AppGrid({ columns = 3, gap = "md", className, children, ...props }) {
|
|
223
|
+
return /* @__PURE__ */ jsx("div", { className: cn("grid", columnsMap[columns], gapMap3[gap], className), ...props, children });
|
|
224
|
+
}
|
|
225
|
+
function AppGridCell({ span = 1, className, children, ...props }) {
|
|
226
|
+
return /* @__PURE__ */ jsx("div", { className: cn(spanMap2[span], className), ...props, children });
|
|
227
|
+
}
|
|
228
|
+
var surfaceMap = {
|
|
229
|
+
default: "bg-background",
|
|
230
|
+
muted: "bg-muted/50"
|
|
231
|
+
};
|
|
232
|
+
var spacingMap2 = {
|
|
233
|
+
sm: "gap-4 p-4",
|
|
234
|
+
md: "gap-5 p-4 sm:gap-6 sm:p-6",
|
|
235
|
+
lg: "gap-6 p-4 sm:gap-8 sm:p-6"
|
|
236
|
+
};
|
|
237
|
+
var maxWidthMap2 = {
|
|
238
|
+
none: "",
|
|
239
|
+
"screen-xl": "mx-auto max-w-screen-xl",
|
|
240
|
+
"screen-2xl": "mx-auto max-w-screen-2xl"
|
|
241
|
+
};
|
|
242
|
+
function PublicPageFrame({
|
|
243
|
+
surface = "muted",
|
|
244
|
+
spacing = "md",
|
|
245
|
+
maxWidth = "none",
|
|
246
|
+
className,
|
|
247
|
+
children,
|
|
248
|
+
...props
|
|
249
|
+
}) {
|
|
250
|
+
return /* @__PURE__ */ jsx("div", { className: cn("min-h-screen", surfaceMap[surface], className), ...props, children: /* @__PURE__ */ jsx("div", { className: cn("flex flex-col", spacingMap2[spacing], maxWidthMap2[maxWidth]), children }) });
|
|
251
|
+
}
|
|
184
252
|
function NavUser({ user }) {
|
|
185
253
|
const { isMobile } = useSidebar();
|
|
186
254
|
const uiMode = useUIMode();
|
|
@@ -418,7 +486,8 @@ function DefaultForm({
|
|
|
418
486
|
brand,
|
|
419
487
|
error,
|
|
420
488
|
loading,
|
|
421
|
-
renderLink = defaultRenderLink2
|
|
489
|
+
renderLink = defaultRenderLink2,
|
|
490
|
+
footer
|
|
422
491
|
}) {
|
|
423
492
|
const isSignUp = mode === "signup";
|
|
424
493
|
return /* @__PURE__ */ jsxs(Card, { className: "w-full", children: [
|
|
@@ -471,7 +540,8 @@ function DefaultForm({
|
|
|
471
540
|
"New here?",
|
|
472
541
|
" ",
|
|
473
542
|
renderLink({ href: signUpHref, className: "text-foreground underline underline-offset-4", children: "Create an account" })
|
|
474
|
-
] }) })
|
|
543
|
+
] }) }),
|
|
544
|
+
footer && /* @__PURE__ */ jsx("div", { children: footer })
|
|
475
545
|
] })
|
|
476
546
|
] });
|
|
477
547
|
}
|
|
@@ -2482,6 +2552,6 @@ function usePagination(total, pageSize) {
|
|
|
2482
2552
|
return { page, pageSize, totalPages, offset, hasPrev: page > 1, hasNext: page < totalPages, goTo, next, prev };
|
|
2483
2553
|
}
|
|
2484
2554
|
|
|
2485
|
-
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, 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, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
|
|
2555
|
+
export { AppContent, AppGrid, AppGridCell, 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, Navbar, NewsletterSection, OlwibaUIProvider, Overlay, PageHeader, PageTransition, PhoneFrame, PostCard, PostList, PricingCard, PricingSection, PublicPageFrame, RegisterHotkeys, RootErrorFallback, Section, SectionTitle, Spotlight, Stack, StaggerChildren, StatCard, StatsSection, Suspensed, Switch, TeamSection, TestimonialCard, TestimonialsSection, Textarea, ThemeColorUpdater, ThemeSwitchMinimal, Underlay, UpgradePrompt, VersionBanner, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useUIMode };
|
|
2486
2556
|
//# sourceMappingURL=index.js.map
|
|
2487
2557
|
//# sourceMappingURL=index.js.map
|