@olwiba/ui 0.0.30 → 0.0.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olwiba/ui",
3
- "version": "0.0.30",
3
+ "version": "0.0.33",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -1,8 +1,11 @@
1
1
  'use client';
2
2
 
3
3
  import * as React from 'react';
4
- import { GalleryVerticalEnd, Building2, ShieldCheck, Sparkles } from 'lucide-react';
5
- import { Badge, Button, Card, CardContent, CardDescription, CardHeader, CardTitle, Input, Label, cn } from '@olwiba/cn';
4
+ import { Building2, ShieldCheck, Sparkles } from 'lucide-react';
5
+ import { Badge, CardContent, CardDescription, CardHeader, CardTitle, Label, cn } from '@olwiba/cn';
6
+ import { Button } from '../primitives/Button';
7
+ import { Card } from '../primitives/Card';
8
+ import { Input } from '../primitives/Input';
6
9
  import type { AppShellRenderLink } from './AppShell';
7
10
 
8
11
  const defaultRenderLink: AppShellRenderLink = ({ href, children, className }) => (
@@ -11,10 +14,15 @@ const defaultRenderLink: AppShellRenderLink = ({ href, children, className }) =>
11
14
 
12
15
  // ─── Centered layout ──────────────────────────────────────────────────────────
13
16
 
14
- function CenteredAuth({ children }: { children: React.ReactNode }) {
17
+ function CenteredAuth({ children, brand, className }: { children: React.ReactNode; brand?: React.ReactNode; className?: string }) {
15
18
  return (
16
- <section className="flex h-full min-h-[720px] w-full flex-col items-center justify-center gap-6 rounded-2xl bg-muted p-6 md:p-10">
17
- <div className="flex w-full max-w-sm flex-col gap-6">
19
+ <section className={cn('flex min-h-screen flex-col justify-center bg-background py-12 px-4 sm:px-6 lg:px-8', className)}>
20
+ {brand && (
21
+ <div className="mx-auto w-full max-w-md text-center mb-8">
22
+ {brand}
23
+ </div>
24
+ )}
25
+ <div className="mx-auto w-full max-w-md">
18
26
  {children}
19
27
  </div>
20
28
  </section>
@@ -66,6 +74,7 @@ export interface AuthFormProps {
66
74
  /** (signup) Link back to the sign-in page */
67
75
  signInHref?: string;
68
76
  forgotPasswordHref?: string;
77
+ /** Brand node — in centered layout renders above the card; in split layout renders inside the card */
69
78
  brand?: React.ReactNode;
70
79
  /** Error message displayed below the form fields */
71
80
  error?: string;
@@ -90,7 +99,7 @@ function DefaultForm({
90
99
  const isSignUp = mode === 'signup';
91
100
 
92
101
  return (
93
- <Card className="w-full max-w-md">
102
+ <Card className="w-full">
94
103
  <CardHeader>
95
104
  {brand && <div className="mb-2">{brand}</div>}
96
105
  <CardTitle>{isSignUp ? 'Create an account' : 'Sign in'}</CardTitle>
@@ -109,7 +118,7 @@ function DefaultForm({
109
118
  </div>
110
119
  )}
111
120
  <div className="space-y-2">
112
- <Label htmlFor="auth-email">Email</Label>
121
+ <Label htmlFor="auth-email">Email address</Label>
113
122
  <Input id="auth-email" name="email" type="email" placeholder="name@company.com" autoComplete="email" />
114
123
  </div>
115
124
  <div className="space-y-2">
@@ -182,9 +191,8 @@ export function AuthSection({
182
191
  className,
183
192
  ...formProps
184
193
  }: AuthSectionProps) {
185
- const form = children ?? <DefaultForm {...formProps} />;
186
-
187
194
  if (layout === 'split') {
195
+ const form = children ?? <DefaultForm {...formProps} />;
188
196
  return (
189
197
  <div className={cn('h-full', className)}>
190
198
  <SplitAuth panel={panel}>{form}</SplitAuth>
@@ -192,9 +200,12 @@ export function AuthSection({
192
200
  );
193
201
  }
194
202
 
203
+ // Centered: brand renders above the card, not inside it
204
+ const { brand, ...restFormProps } = formProps;
205
+ const form = children ?? <DefaultForm {...restFormProps} />;
195
206
  return (
196
- <div className={cn('h-full', className)}>
197
- <CenteredAuth>{form}</CenteredAuth>
198
- </div>
207
+ <CenteredAuth brand={brand} className={className}>
208
+ {form}
209
+ </CenteredAuth>
199
210
  );
200
211
  }
package/src/index.ts CHANGED
@@ -100,6 +100,10 @@ export { DevBanner, type DevBannerProps } from './components/DevBanner';
100
100
  export { RegisterHotkeys, type Hotkey } from './components/RegisterHotkeys';
101
101
  export { RootErrorFallback } from './components/RootErrorFallback';
102
102
 
103
+ // ─── Blog ────────────────────────────────────────────────────────────────────
104
+ export { PostCard, type PostCardProps } from './blog/PostCard';
105
+ export { PostList, type PostListProps } from './blog/PostList';
106
+
103
107
  // ─── Hooks ────────────────────────────────────────────────────────────────────
104
108
  export { useMounted } from './hooks/use-mounted';
105
109
  export { useConfirm, type ConfirmOptions, type UseConfirmReturn } from './hooks/use-confirm';