@gaulatti/bleecker 0.1.38 → 0.1.40
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/README.md +13 -0
- package/dist/components/card.js +1 -1
- package/dist/components/eyebrow.d.ts +8 -0
- package/dist/components/eyebrow.js +10 -0
- package/dist/components/field.d.ts +2 -1
- package/dist/components/field.js +2 -2
- package/dist/components/page-header.js +1 -1
- package/dist/components/section-header.js +2 -1
- package/dist/components/status-badge.js +3 -3
- package/dist/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/layout/app-shell.js +1 -1
- package/dist/layout/auth-shell.d.ts +14 -0
- package/dist/layout/auth-shell.js +11 -0
- package/dist/layout/detail-layout.d.ts +13 -0
- package/dist/layout/detail-layout.js +16 -0
- package/dist/layout/header.d.ts +2 -1
- package/dist/layout/header.js +2 -2
- package/dist/layout/page-frame.d.ts +14 -0
- package/dist/layout/page-frame.js +24 -0
- package/dist/login-screen.d.ts +10 -1
- package/dist/login-screen.js +10 -7
- package/dist/styles.css +1 -1
- package/dist/tokens/source.d.ts +4 -0
- package/dist/tokens/source.js +2 -0
- package/package.json +1 -1
- package/src/styles/global.css +5 -12
- package/src/styles/tokens.generated.css +3 -0
package/README.md
CHANGED
|
@@ -40,6 +40,19 @@ import { Button } from '@gaulatti/bleecker/components/button';
|
|
|
40
40
|
- Controls use consistent 32, 40, and 48 pixel heights.
|
|
41
41
|
- Motion is brief and functional, with reduced-motion behavior included globally.
|
|
42
42
|
|
|
43
|
+
## Luxury composition
|
|
44
|
+
|
|
45
|
+
Luxury in Bleecker comes from editing and proportion, not decoration. The most reliable compositions use one dominant focal plane, one quieter supporting rail, and enough negative space for the hierarchy to remain obvious.
|
|
46
|
+
|
|
47
|
+
- Start with `PageFrame` so product pages share the same gutters, readable widths, and vertical cadence.
|
|
48
|
+
- Use `DetailLayout` for asymmetric detail pages, editorial views, and sticky summary rails instead of assembling new grid proportions each time.
|
|
49
|
+
- Use `AuthShell` for focused sign-in, invitation, and onboarding moments with an optional narrative panel.
|
|
50
|
+
- Prefer hairline borders for default surfaces. Reserve `Card`'s `elevated` variant and stronger shadows for the single surface that truly sits above the page.
|
|
51
|
+
- Keep supporting copy in `font-secondary`, eyebrow copy brief, and data labels at a readable contrast. A restrained accent should guide attention rather than tint every section.
|
|
52
|
+
- Avoid grids of equally weighted cards when one number, action, or story is more important. Give that item more scale or span and quiet the rest.
|
|
53
|
+
|
|
54
|
+
Storybook's **Templates** section includes complete public, operational, commerce, hospitality, and private-client compositions. Treat them as starting points: keep their hierarchy and rhythm, then replace the domain copy and content.
|
|
55
|
+
|
|
43
56
|
## Theming
|
|
44
57
|
|
|
45
58
|
The default light and dark themes are defined with `--app-*` custom properties in the stylesheet. Override those properties after importing Bleecker styles to adapt the theme without changing component markup.
|
package/dist/components/card.js
CHANGED
|
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from '../utils/cn.js';
|
|
3
3
|
const paddingClasses = { none: 'p-0', sm: 'p-4', md: 'p-6', lg: 'p-8' };
|
|
4
4
|
export function Card({ className, padding = 'md', variant = 'surface', ...props }) {
|
|
5
|
-
return (_jsx("div", { className: cn('relative overflow-hidden rounded-[var(--radius-card)] transition-[background-color,border-color,box-shadow,transform] duration-[var(--motion-surface)] ease-premium', paddingClasses[padding], variant === 'surface' && 'border border-sand/30 bg-white shadow-
|
|
5
|
+
return (_jsx("div", { className: cn('relative overflow-hidden rounded-[var(--radius-card)] transition-[background-color,border-color,box-shadow,transform] duration-[var(--motion-surface)] ease-premium', paddingClasses[padding], variant === 'surface' && 'border border-sand/30 bg-white shadow-none dark:border-white/[0.09] dark:bg-deep-sea', variant === 'outlined' && 'border border-sand/40 bg-white shadow-none dark:border-white/15 dark:bg-deep-sea', variant === 'elevated' && 'border border-sand/25 bg-white shadow-[var(--shadow-raised)] dark:border-white/10 dark:bg-deep-sea', variant === 'subtle' && 'border border-sand/20 bg-light-sand/45 shadow-none dark:border-white/[0.07] dark:bg-white/[0.035]', variant === 'transparent' && 'border border-transparent bg-transparent shadow-none', className), ...props }));
|
|
6
6
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export type EyebrowTone = 'accent' | 'muted' | 'inverse';
|
|
3
|
+
export interface EyebrowProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
as?: 'div' | 'p' | 'span';
|
|
5
|
+
rule?: boolean;
|
|
6
|
+
tone?: EyebrowTone;
|
|
7
|
+
}
|
|
8
|
+
export declare function Eyebrow({ as: Component, children, className, rule, tone, ...props }: EyebrowProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils/cn.js';
|
|
3
|
+
const toneClasses = {
|
|
4
|
+
accent: 'text-accent-text',
|
|
5
|
+
muted: 'text-text-secondary',
|
|
6
|
+
inverse: 'text-white/75'
|
|
7
|
+
};
|
|
8
|
+
export function Eyebrow({ as: Component = 'p', children, className, rule = false, tone = 'accent', ...props }) {
|
|
9
|
+
return (_jsxs(Component, { className: cn('inline-flex items-center gap-3 text-[11px] font-semibold uppercase leading-4 tracking-[0.12em]', toneClasses[tone], className), ...props, children: [rule ? _jsx("span", { "aria-hidden": 'true', className: 'h-px w-7 shrink-0 bg-current opacity-60' }) : null, children] }));
|
|
10
|
+
}
|
|
@@ -5,6 +5,7 @@ type FieldControlProps = {
|
|
|
5
5
|
id?: string;
|
|
6
6
|
};
|
|
7
7
|
export interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
8
|
+
action?: React.ReactNode;
|
|
8
9
|
children: React.ReactElement<FieldControlProps>;
|
|
9
10
|
description?: React.ReactNode;
|
|
10
11
|
error?: React.ReactNode;
|
|
@@ -13,5 +14,5 @@ export interface FieldProps extends Omit<React.HTMLAttributes<HTMLDivElement>, '
|
|
|
13
14
|
required?: boolean;
|
|
14
15
|
}
|
|
15
16
|
/** A consistent, accessible label/control/help/error composition. */
|
|
16
|
-
export declare function Field({ children, className, description, error, label, optional, required, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function Field({ action, children, className, description, error, label, optional, required, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
export {};
|
package/dist/components/field.js
CHANGED
|
@@ -2,13 +2,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { cn } from '../utils/cn.js';
|
|
4
4
|
/** A consistent, accessible label/control/help/error composition. */
|
|
5
|
-
export function Field({ children, className, description, error, label, optional, required, ...props }) {
|
|
5
|
+
export function Field({ action, children, className, description, error, label, optional, required, ...props }) {
|
|
6
6
|
const generatedId = React.useId();
|
|
7
7
|
const controlId = children.props.id ?? `${generatedId}-control`;
|
|
8
8
|
const descriptionId = description ? `${generatedId}-description` : undefined;
|
|
9
9
|
const errorId = error ? `${generatedId}-error` : undefined;
|
|
10
10
|
const describedBy = [children.props['aria-describedby'], descriptionId, errorId].filter(Boolean).join(' ') || undefined;
|
|
11
|
-
return (_jsxs("div", { className: cn('space-y-2.5', className), ...props, children: [_jsxs("div", { className: 'flex items-baseline justify-between gap-4', children: [_jsxs("label", { htmlFor: controlId, className: 'text-[13px] font-medium tracking-ui text-text-primary dark:text-text-primary', children: [label, required ? _jsx("span", { className: 'ml-1 text-terracotta', "aria-hidden": 'true', children: "*" }) : null] }), optional ? _jsx("span", { className: 'font-secondary text-[11px] text-text-secondary', children: "Optional" }) : null] }), React.cloneElement(children, {
|
|
11
|
+
return (_jsxs("div", { className: cn('space-y-2.5', className), ...props, children: [_jsxs("div", { className: 'flex items-baseline justify-between gap-4', children: [_jsxs("label", { htmlFor: controlId, className: 'text-[13px] font-medium tracking-ui text-text-primary dark:text-text-primary', children: [label, required ? _jsx("span", { className: 'ml-1 text-terracotta', "aria-hidden": 'true', children: "*" }) : null] }), action ?? (optional ? _jsx("span", { className: 'font-secondary text-[11px] text-text-secondary', children: "Optional" }) : null)] }), React.cloneElement(children, {
|
|
12
12
|
id: controlId,
|
|
13
13
|
'aria-describedby': describedBy,
|
|
14
14
|
'aria-invalid': error ? true : children.props['aria-invalid']
|
|
@@ -4,5 +4,5 @@ import { cn } from '../utils/cn.js';
|
|
|
4
4
|
import { Button } from './button.js';
|
|
5
5
|
export function PageHeader({ title, description, breadcrumbs, actions, backHref, onBack, className }) {
|
|
6
6
|
const showBack = Boolean(backHref || onBack);
|
|
7
|
-
return (_jsxs("header", { className: cn('space-y-5', className), children: [breadcrumbs && _jsx("div", { className: 'text-sm text-text-secondary dark:text-text-secondary', children: breadcrumbs }), _jsxs("div", { className: 'flex flex-col gap-7 sm:flex-row sm:items-start sm:justify-between', children: [_jsxs("div", { className: 'flex items-start gap-4', children: [showBack && (_jsx(Button, { variant: 'ghost', size: 'sm', className: 'mt-0.5 h-8 w-8 p-0', onClick: onBack, as: backHref ? 'a' : 'button', href: backHref, children: _jsx(ChevronLeft, { size: 18 }) })), _jsxs("div", { children: [_jsx("h1", { className: 'text-[2rem] font-semibold leading-[1.15] tracking-refined text-text-primary dark:text-text-primary', children: title }), description && _jsx("p", { className: 'font-secondary mt-2.5 max-w-2xl text-sm leading-6 text-text-secondary dark:text-text-secondary', children: description })] })] }), actions && _jsx("div", { className: 'flex flex-wrap items-center gap-3', children: actions })] })] }));
|
|
7
|
+
return (_jsxs("header", { className: cn('space-y-5', className), children: [breadcrumbs && _jsx("div", { className: 'text-sm text-text-secondary dark:text-text-secondary', children: breadcrumbs }), _jsxs("div", { className: 'flex flex-col gap-7 sm:flex-row sm:items-start sm:justify-between', children: [_jsxs("div", { className: 'flex items-start gap-4', children: [showBack && (_jsx(Button, { variant: 'ghost', size: 'sm', className: 'mt-0.5 h-8 w-8 p-0', onClick: onBack, as: backHref ? 'a' : 'button', href: backHref, children: _jsx(ChevronLeft, { size: 18 }) })), _jsxs("div", { children: [_jsx("h1", { className: 'text-balance text-[2rem] font-semibold leading-[1.15] tracking-refined text-text-primary dark:text-text-primary', children: title }), description && _jsx("p", { className: 'font-secondary mt-2.5 max-w-2xl text-pretty text-sm leading-6 text-text-secondary dark:text-text-secondary', children: description })] })] }), actions && _jsx("div", { className: 'flex flex-wrap items-center gap-3', children: actions })] })] }));
|
|
8
8
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../utils/cn.js';
|
|
3
|
+
import { Eyebrow } from './eyebrow.js';
|
|
3
4
|
export function SectionHeader({ className, description, eyebrow, title, ...props }) {
|
|
4
|
-
return (_jsxs("div", { className: cn('space-y-3.5', className), ...props, children: [eyebrow ? _jsx(
|
|
5
|
+
return (_jsxs("div", { className: cn('space-y-3.5', className), ...props, children: [eyebrow ? _jsx(Eyebrow, { children: eyebrow }) : null, _jsxs("div", { className: 'space-y-3', children: [_jsx("h2", { className: 'text-balance text-[1.75rem] font-semibold leading-tight tracking-refined text-text-primary dark:text-text-primary', children: title }), description ? _jsx("p", { className: 'font-secondary max-w-2xl text-pretty text-base leading-7 text-text-secondary dark:text-text-secondary', children: description }) : null] })] }));
|
|
5
6
|
}
|
|
@@ -2,15 +2,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from '../utils/cn.js';
|
|
3
3
|
const variantClasses = {
|
|
4
4
|
live: {
|
|
5
|
-
badge: '
|
|
5
|
+
badge: 'border-emerald-600/20 bg-emerald-600/[0.08] text-emerald-700 dark:border-emerald-400/20 dark:bg-emerald-400/10 dark:text-emerald-300',
|
|
6
6
|
dot: 'bg-emerald-500'
|
|
7
7
|
},
|
|
8
8
|
offline: {
|
|
9
|
-
badge: '
|
|
9
|
+
badge: 'border-terracotta/20 bg-terracotta/10 text-[#874641] dark:border-terracotta/20 dark:bg-terracotta/10 dark:text-terracotta',
|
|
10
10
|
dot: 'bg-terracotta'
|
|
11
11
|
},
|
|
12
12
|
warning: {
|
|
13
|
-
badge: '
|
|
13
|
+
badge: 'border-desert/20 bg-desert/10 text-accent-text dark:border-desert/20 dark:bg-desert/10 dark:text-accent-text',
|
|
14
14
|
dot: 'bg-desert'
|
|
15
15
|
},
|
|
16
16
|
info: {
|
package/dist/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export * from './components/date-picker';
|
|
|
51
51
|
export * from './components/dialog-close-button';
|
|
52
52
|
export * from './components/drawer';
|
|
53
53
|
export * from './components/empty';
|
|
54
|
+
export * from './components/eyebrow';
|
|
54
55
|
export * from './components/hover-card';
|
|
55
56
|
export * from './components/input';
|
|
56
57
|
export * from './components/kbd';
|
|
@@ -99,8 +100,11 @@ export * from './components/tabs';
|
|
|
99
100
|
export * from './components/theme-toggle';
|
|
100
101
|
export * from './layout/app-shell';
|
|
101
102
|
export * from './layout/admin-shell';
|
|
103
|
+
export * from './layout/auth-shell';
|
|
104
|
+
export * from './layout/detail-layout';
|
|
102
105
|
export * from './layout/footer';
|
|
103
106
|
export * from './layout/header';
|
|
107
|
+
export * from './layout/page-frame';
|
|
104
108
|
export * from './layout/panel-layout';
|
|
105
109
|
export * from './login-screen';
|
|
106
110
|
export * from './theme/theme-provider';
|
package/dist/index.js
CHANGED
|
@@ -51,6 +51,7 @@ export * from './components/date-picker.js';
|
|
|
51
51
|
export * from './components/dialog-close-button.js';
|
|
52
52
|
export * from './components/drawer.js';
|
|
53
53
|
export * from './components/empty.js';
|
|
54
|
+
export * from './components/eyebrow.js';
|
|
54
55
|
export * from './components/hover-card.js';
|
|
55
56
|
export * from './components/input.js';
|
|
56
57
|
export * from './components/kbd.js';
|
|
@@ -99,8 +100,11 @@ export * from './components/tabs.js';
|
|
|
99
100
|
export * from './components/theme-toggle.js';
|
|
100
101
|
export * from './layout/app-shell.js';
|
|
101
102
|
export * from './layout/admin-shell.js';
|
|
103
|
+
export * from './layout/auth-shell.js';
|
|
104
|
+
export * from './layout/detail-layout.js';
|
|
102
105
|
export * from './layout/footer.js';
|
|
103
106
|
export * from './layout/header.js';
|
|
107
|
+
export * from './layout/page-frame.js';
|
|
104
108
|
export * from './layout/panel-layout.js';
|
|
105
109
|
export * from './login-screen.js';
|
|
106
110
|
export * from './theme/theme-provider.js';
|
package/dist/layout/app-shell.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from '../utils/cn.js';
|
|
3
3
|
export function AppShell({ children, className, contentClassName, footer, header, offsetHeader = true }) {
|
|
4
|
-
return (_jsxs("div", { className: cn('min-h-screen flex
|
|
4
|
+
return (_jsxs("div", { className: cn('flex min-h-screen flex-col bg-background text-foreground', className), children: [header, _jsx("main", { className: cn('flex min-h-0 flex-1 flex-col bg-background', header && offsetHeader && 'pt-[var(--bleecker-header-height)]', contentClassName), children: _jsx("div", { className: 'flex min-h-0 flex-1 flex-col', children: children }) }), footer] }));
|
|
5
5
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type AuthShellLayout = 'centered' | 'split';
|
|
3
|
+
export type AuthShellSide = 'start' | 'end';
|
|
4
|
+
export interface AuthShellProps extends React.HTMLAttributes<HTMLElement> {
|
|
5
|
+
aside?: React.ReactNode;
|
|
6
|
+
asideLabel?: string;
|
|
7
|
+
brand?: React.ReactNode;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
footer?: React.ReactNode;
|
|
10
|
+
layout?: AuthShellLayout;
|
|
11
|
+
side?: AuthShellSide;
|
|
12
|
+
}
|
|
13
|
+
/** A page-level shell for sign-in, recovery, invitation, and other access flows. */
|
|
14
|
+
export declare function AuthShell({ aside, asideLabel, brand, children, className, footer, layout, side, ...props }: AuthShellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils/cn.js';
|
|
3
|
+
const splitColumnClasses = {
|
|
4
|
+
start: 'lg:grid-cols-[minmax(24rem,5fr)_minmax(0,7fr)]',
|
|
5
|
+
end: 'lg:grid-cols-[minmax(0,7fr)_minmax(24rem,5fr)]'
|
|
6
|
+
};
|
|
7
|
+
/** A page-level shell for sign-in, recovery, invitation, and other access flows. */
|
|
8
|
+
export function AuthShell({ aside, asideLabel, brand, children, className, footer, layout = 'centered', side = 'end', ...props }) {
|
|
9
|
+
const hasAside = layout === 'split' && Boolean(aside);
|
|
10
|
+
return (_jsxs("main", { className: cn('min-h-screen bg-light-sand/35 text-text-primary dark:bg-background dark:text-text-primary', hasAside && 'grid bg-background', hasAside && splitColumnClasses[side], className), "data-layout": layout, "data-side": side, ...props, children: [_jsx("section", { className: 'flex min-h-screen bg-background px-5 py-6 sm:px-8 sm:py-8 lg:px-12 xl:px-16', "data-slot": 'access', children: _jsxs("div", { className: 'mx-auto flex w-full max-w-md flex-1 flex-col', children: [brand ? _jsx("div", { "data-slot": 'brand', children: brand }) : null, _jsx("div", { className: 'flex flex-1 items-center py-10 sm:py-14', "data-slot": 'content', children: _jsx("div", { className: 'w-full', children: children }) }), footer ? _jsx("footer", { className: 'font-secondary text-xs leading-5 text-text-secondary', "data-slot": 'footer', children: footer }) : null] }) }), hasAside ? (_jsxs("aside", { "aria-label": asideLabel, className: cn('relative hidden min-h-screen overflow-hidden bg-deep-sea text-white lg:flex', side === 'start' && 'lg:order-first'), "data-slot": 'aside', children: [_jsx("div", { className: 'relative z-10 flex w-full items-end p-12 xl:p-16', children: aside }), _jsx("div", { className: 'pointer-events-none absolute -right-24 -top-24 size-80 rounded-full border border-white/10', "aria-hidden": 'true' }), _jsx("div", { className: 'pointer-events-none absolute -right-10 -top-10 size-52 rounded-full border border-white/10', "aria-hidden": 'true' })] })) : null] }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type DetailLayoutRatio = 'balanced' | 'primary';
|
|
3
|
+
export type DetailLayoutSide = 'start' | 'end';
|
|
4
|
+
export interface DetailLayoutProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
ratio?: DetailLayoutRatio;
|
|
7
|
+
side?: DetailLayoutSide;
|
|
8
|
+
sideRail?: React.ReactNode;
|
|
9
|
+
sideRailLabel?: string;
|
|
10
|
+
sticky?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** A responsive detail composition with an optional, independently sticky side rail. */
|
|
13
|
+
export declare function DetailLayout({ children, className, ratio, side, sideRail, sideRailLabel, sticky, ...props }: DetailLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils/cn.js';
|
|
3
|
+
const columnClasses = {
|
|
4
|
+
start: {
|
|
5
|
+
balanced: 'lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]',
|
|
6
|
+
primary: 'lg:grid-cols-[minmax(17rem,1fr)_minmax(0,2fr)]'
|
|
7
|
+
},
|
|
8
|
+
end: {
|
|
9
|
+
balanced: 'lg:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]',
|
|
10
|
+
primary: 'lg:grid-cols-[minmax(0,2fr)_minmax(17rem,1fr)]'
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
/** A responsive detail composition with an optional, independently sticky side rail. */
|
|
14
|
+
export function DetailLayout({ children, className, ratio = 'primary', side = 'end', sideRail, sideRailLabel, sticky = true, ...props }) {
|
|
15
|
+
return (_jsxs("div", { className: cn('grid items-start gap-10 lg:gap-12 xl:gap-16', sideRail && columnClasses[side][ratio], className), "data-ratio": ratio, "data-side": side, ...props, children: [_jsx("div", { className: 'min-w-0', "data-slot": 'content', children: children }), sideRail ? (_jsx("aside", { "aria-label": sideRailLabel, className: cn('min-w-0 self-start', side === 'start' && 'lg:order-first', sticky && 'lg:sticky lg:top-8'), "data-slot": 'side-rail', children: sideRail })) : null] }));
|
|
16
|
+
}
|
package/dist/layout/header.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export interface HeaderProps {
|
|
|
8
8
|
fullWidth?: boolean;
|
|
9
9
|
mobileActions?: React.ReactNode;
|
|
10
10
|
navigation: NavItem[];
|
|
11
|
+
position?: 'fixed' | 'sticky' | 'static';
|
|
11
12
|
renderLink?: RenderLink;
|
|
12
13
|
}
|
|
13
|
-
export declare function Header({ actions, brand, className, fullWidth, mobileActions, navigation, renderLink }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Header({ actions, brand, className, fullWidth, mobileActions, navigation, position, renderLink }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/layout/header.js
CHANGED
|
@@ -6,7 +6,7 @@ import { BrandLockup } from '../components/brand-lockup.js';
|
|
|
6
6
|
import { IconButton } from '../components/icon-button.js';
|
|
7
7
|
import { NavMenu } from '../components/nav-menu.js';
|
|
8
8
|
import { cn } from '../utils/cn.js';
|
|
9
|
-
export function Header({ actions, brand, className, fullWidth = false, mobileActions, navigation, renderLink }) {
|
|
9
|
+
export function Header({ actions, brand, className, fullWidth = false, mobileActions, navigation, position = 'fixed', renderLink }) {
|
|
10
10
|
const [mobileMenuOpen, setMobileMenuOpen] = React.useState(false);
|
|
11
|
-
return (_jsxs("header", { className: cn('
|
|
11
|
+
return (_jsxs("header", { className: cn('z-50 w-full border-b border-sand/25 bg-white/95 font-header backdrop-blur-[8px] dark:border-white/[0.09] dark:bg-deep-sea/95', position === 'fixed' && 'fixed top-0', position === 'sticky' && 'sticky top-0', position === 'static' && 'relative', className), children: [_jsx("div", { className: cn(fullWidth ? 'w-full px-4' : 'container mx-auto px-4'), children: _jsxs("div", { className: 'flex h-[var(--bleecker-header-height)] items-center justify-between gap-8 lg:grid lg:grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)]', children: [_jsx("div", { className: 'min-w-0 justify-self-start', children: _jsx(BrandLockup, { ...brand, renderLink: renderLink }) }), _jsx("div", { className: 'hidden lg:flex lg:items-center lg:justify-self-center', children: _jsx(NavMenu, { items: navigation, renderLink: renderLink }) }), _jsx("div", { className: 'hidden lg:flex lg:items-center lg:justify-self-end lg:gap-3', children: actions }), _jsx(IconButton, { variant: 'ghost', className: 'lg:hidden', "aria-label": 'Toggle navigation menu', type: 'button', onClick: () => setMobileMenuOpen((value) => !value), children: mobileMenuOpen ? _jsx(X, { size: 20 }) : _jsx(Menu, { size: 20 }) })] }) }), _jsx("div", { className: cn('absolute left-0 top-[var(--bleecker-header-height)] w-full origin-top overflow-hidden border-t border-sand/20 bg-white shadow-[var(--shadow-overlay)] transition-[max-height,opacity] duration-200 dark:border-white/10 dark:bg-deep-sea lg:hidden', mobileMenuOpen ? 'max-h-96 opacity-100' : 'max-h-0 opacity-0'), children: _jsxs("div", { className: cn(fullWidth ? 'w-full' : 'container mx-auto', 'flex flex-col gap-5 px-4 py-6'), children: [mobileActions ? _jsx("div", { className: 'flex items-center gap-3', children: mobileActions }) : null, _jsx(NavMenu, { direction: 'vertical', items: navigation, onItemClick: () => setMobileMenuOpen(false), renderLink: renderLink })] }) })] }));
|
|
12
12
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type PageFrameElement = 'article' | 'div' | 'main' | 'section';
|
|
3
|
+
export type PageFrameGutter = 'none' | 'compact' | 'comfortable' | 'spacious';
|
|
4
|
+
export type PageFrameVerticalSpacing = 'none' | 'compact' | 'comfortable' | 'spacious';
|
|
5
|
+
export type PageFrameWidth = 'reading' | 'content' | 'wide' | 'full';
|
|
6
|
+
export interface PageFrameProps extends React.HTMLAttributes<HTMLElement> {
|
|
7
|
+
as?: PageFrameElement;
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
gutter?: PageFrameGutter;
|
|
10
|
+
verticalSpacing?: PageFrameVerticalSpacing;
|
|
11
|
+
width?: PageFrameWidth;
|
|
12
|
+
}
|
|
13
|
+
/** A centered page boundary with semantic measures and responsive breathing room. */
|
|
14
|
+
export declare function PageFrame({ as: Component, children, className, gutter, verticalSpacing, width, ...props }: PageFrameProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from '../utils/cn.js';
|
|
3
|
+
const widthClasses = {
|
|
4
|
+
reading: 'max-w-3xl',
|
|
5
|
+
content: 'max-w-6xl',
|
|
6
|
+
wide: 'max-w-[90rem]',
|
|
7
|
+
full: 'max-w-none'
|
|
8
|
+
};
|
|
9
|
+
const gutterClasses = {
|
|
10
|
+
none: '',
|
|
11
|
+
compact: 'px-4 sm:px-5',
|
|
12
|
+
comfortable: 'px-5 sm:px-8 lg:px-10',
|
|
13
|
+
spacious: 'px-6 sm:px-10 lg:px-16'
|
|
14
|
+
};
|
|
15
|
+
const verticalSpacingClasses = {
|
|
16
|
+
none: '',
|
|
17
|
+
compact: 'py-6 sm:py-8',
|
|
18
|
+
comfortable: 'py-10 sm:py-12 lg:py-16',
|
|
19
|
+
spacious: 'py-14 sm:py-16 lg:py-24'
|
|
20
|
+
};
|
|
21
|
+
/** A centered page boundary with semantic measures and responsive breathing room. */
|
|
22
|
+
export function PageFrame({ as: Component = 'div', children, className, gutter = 'comfortable', verticalSpacing = 'comfortable', width = 'content', ...props }) {
|
|
23
|
+
return (_jsx(Component, { className: cn('mx-auto w-full', widthClasses[width], gutterClasses[gutter], verticalSpacingClasses[verticalSpacing], className), ...props, children: children }));
|
|
24
|
+
}
|
package/dist/login-screen.d.ts
CHANGED
|
@@ -1 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LoginScreenProps {
|
|
3
|
+
brand?: React.ReactNode;
|
|
4
|
+
description?: string;
|
|
5
|
+
forgotPasswordHref?: string;
|
|
6
|
+
onSubmit?: React.FormEventHandler<HTMLFormElement>;
|
|
7
|
+
signUpHref?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function LoginScreen({ brand, description, forgotPasswordHref, onSubmit, signUpHref, title }: LoginScreenProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/login-screen.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Card } from './components/card.js';
|
|
3
2
|
import { Button } from './components/button.js';
|
|
3
|
+
import { Card } from './components/card.js';
|
|
4
|
+
import { Field } from './components/field.js';
|
|
4
5
|
import { Input } from './components/input.js';
|
|
5
|
-
import {
|
|
6
|
-
export
|
|
7
|
-
return (_jsx(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
import { AuthShell } from './layout/auth-shell.js';
|
|
7
|
+
export function LoginScreen({ brand, description = 'Sign in to your account to continue.', forgotPasswordHref = '#', onSubmit, signUpHref = '#', title = 'Welcome back' }) {
|
|
8
|
+
return (_jsx(AuthShell, { brand: brand, layout: 'centered', children: _jsxs(Card, { variant: 'elevated', className: 'w-full space-y-7 p-7 sm:p-8', children: [_jsxs("header", { className: 'space-y-2 text-center', children: [_jsx("h1", { className: 'text-balance text-3xl font-semibold tracking-refined text-text-primary', children: title }), _jsx("p", { className: 'font-secondary text-pretty text-sm leading-6 text-text-secondary', children: description })] }), _jsxs("form", { className: 'space-y-5', onSubmit: (event) => {
|
|
9
|
+
if (!onSubmit)
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
onSubmit?.(event);
|
|
12
|
+
}, children: [_jsx(Field, { label: 'Email address', required: true, children: _jsx(Input, { id: 'email', name: 'email', type: 'email', autoComplete: 'email', placeholder: 'name@example.com', required: true }) }), _jsx(Field, { label: 'Password', required: true, action: _jsx("a", { href: forgotPasswordHref, className: 'text-xs font-medium text-sea underline-offset-4 hover:underline dark:text-accent-blue', children: "Forgot password?" }), children: _jsx(Input, { id: 'password', name: 'password', type: 'password', autoComplete: 'current-password', required: true }) }), _jsx(Button, { fullWidth: true, size: 'lg', type: 'submit', children: "Sign in" })] }), _jsxs("p", { className: 'font-secondary text-center text-sm text-text-secondary', children: ["Don't have an account?", ' ', _jsx("a", { href: signUpHref, className: 'font-medium text-sea underline-offset-4 hover:underline dark:text-accent-blue', children: "Sign up" })] })] }) }));
|
|
13
|
+
}
|