@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olwiba/ui",
3
- "version": "0.0.45",
3
+ "version": "0.1.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -82,6 +82,8 @@ export interface AuthFormProps {
82
82
  loading?: boolean;
83
83
  /** Render prop for links — use to inject framework-native link components (e.g. TanStack Router Link) */
84
84
  renderLink?: AppShellRenderLink;
85
+ /** Optional content rendered below the form — use for social auth buttons or other additions */
86
+ footer?: React.ReactNode;
85
87
  }
86
88
 
87
89
  function DefaultForm({
@@ -95,6 +97,7 @@ function DefaultForm({
95
97
  error,
96
98
  loading,
97
99
  renderLink = defaultRenderLink,
100
+ footer,
98
101
  }: AuthFormProps) {
99
102
  const isSignUp = mode === 'signup';
100
103
 
@@ -167,6 +170,7 @@ function DefaultForm({
167
170
  )
168
171
  )}
169
172
  </p>
173
+ {footer && <div>{footer}</div>}
170
174
  </CardContent>
171
175
  </Card>
172
176
  );
@@ -0,0 +1,34 @@
1
+ import React from 'react'
2
+ import { cn } from '../lib/utils'
3
+
4
+ const spacingMap = {
5
+ sm: 'space-y-4',
6
+ md: 'space-y-6',
7
+ lg: 'space-y-8',
8
+ }
9
+
10
+ const maxWidthMap = {
11
+ none: '',
12
+ 'screen-lg': 'mx-auto max-w-screen-lg',
13
+ 'screen-xl': 'mx-auto max-w-screen-xl',
14
+ 'screen-2xl': 'mx-auto max-w-screen-2xl',
15
+ }
16
+
17
+ export interface AppContentProps extends React.HTMLAttributes<HTMLDivElement> {
18
+ spacing?: keyof typeof spacingMap
19
+ maxWidth?: keyof typeof maxWidthMap
20
+ }
21
+
22
+ export function AppContent({
23
+ spacing = 'md',
24
+ maxWidth = 'none',
25
+ className,
26
+ children,
27
+ ...props
28
+ }: AppContentProps) {
29
+ return (
30
+ <div className={cn('p-6', maxWidthMap[maxWidth], spacingMap[spacing], className)} {...props}>
31
+ {children}
32
+ </div>
33
+ )
34
+ }
@@ -0,0 +1,48 @@
1
+ import React from 'react'
2
+ import { cn } from '../lib/utils'
3
+
4
+ const columnsMap = {
5
+ 1: 'grid-cols-1',
6
+ 2: 'grid-cols-1 md:grid-cols-2',
7
+ 3: 'grid-cols-1 md:grid-cols-2 xl:grid-cols-3',
8
+ 4: 'grid-cols-1 md:grid-cols-2 xl:grid-cols-4',
9
+ }
10
+
11
+ const gapMap = {
12
+ sm: 'gap-3',
13
+ md: 'gap-4',
14
+ lg: 'gap-6',
15
+ }
16
+
17
+ const spanMap = {
18
+ 1: 'md:col-span-1',
19
+ 2: 'md:col-span-2',
20
+ 3: 'xl:col-span-3',
21
+ 4: 'xl:col-span-4',
22
+ full: 'col-span-full',
23
+ }
24
+
25
+ export interface AppGridProps extends React.HTMLAttributes<HTMLDivElement> {
26
+ columns?: keyof typeof columnsMap
27
+ gap?: keyof typeof gapMap
28
+ }
29
+
30
+ export function AppGrid({ columns = 3, gap = 'md', className, children, ...props }: AppGridProps) {
31
+ return (
32
+ <div className={cn('grid', columnsMap[columns], gapMap[gap], className)} {...props}>
33
+ {children}
34
+ </div>
35
+ )
36
+ }
37
+
38
+ export interface AppGridCellProps extends React.HTMLAttributes<HTMLDivElement> {
39
+ span?: keyof typeof spanMap
40
+ }
41
+
42
+ export function AppGridCell({ span = 1, className, children, ...props }: AppGridCellProps) {
43
+ return (
44
+ <div className={cn(spanMap[span], className)} {...props}>
45
+ {children}
46
+ </div>
47
+ )
48
+ }
@@ -0,0 +1,42 @@
1
+ import React from 'react'
2
+ import { cn } from '../lib/utils'
3
+
4
+ const surfaceMap = {
5
+ default: 'bg-background',
6
+ muted: 'bg-muted/50',
7
+ }
8
+
9
+ const spacingMap = {
10
+ sm: 'gap-4 p-4',
11
+ md: 'gap-5 p-4 sm:gap-6 sm:p-6',
12
+ lg: 'gap-6 p-4 sm:gap-8 sm:p-6',
13
+ }
14
+
15
+ const maxWidthMap = {
16
+ none: '',
17
+ 'screen-xl': 'mx-auto max-w-screen-xl',
18
+ 'screen-2xl': 'mx-auto max-w-screen-2xl',
19
+ }
20
+
21
+ export interface PublicPageFrameProps extends React.HTMLAttributes<HTMLDivElement> {
22
+ surface?: keyof typeof surfaceMap
23
+ spacing?: keyof typeof spacingMap
24
+ maxWidth?: keyof typeof maxWidthMap
25
+ }
26
+
27
+ export function PublicPageFrame({
28
+ surface = 'muted',
29
+ spacing = 'md',
30
+ maxWidth = 'none',
31
+ className,
32
+ children,
33
+ ...props
34
+ }: PublicPageFrameProps) {
35
+ return (
36
+ <div className={cn('min-h-screen', surfaceMap[surface], className)} {...props}>
37
+ <div className={cn('flex flex-col', spacingMap[spacing], maxWidthMap[maxWidth])}>
38
+ {children}
39
+ </div>
40
+ </div>
41
+ )
42
+ }
@@ -4,3 +4,9 @@ export { Stack } from './Stack'
4
4
  export type { StackProps } from './Stack'
5
5
  export { Section } from './Section'
6
6
  export type { SectionProps } from './Section'
7
+ export { AppContent } from './AppContent'
8
+ export type { AppContentProps } from './AppContent'
9
+ export { AppGrid, AppGridCell } from './AppGrid'
10
+ export type { AppGridProps, AppGridCellProps } from './AppGrid'
11
+ export { PublicPageFrame } from './PublicPageFrame'
12
+ export type { PublicPageFrameProps } from './PublicPageFrame'