@olwiba/ui 0.2.22 → 0.2.24

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 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 React__default, { ReactNode } from 'react';
4
+ import React__default, { ReactNode, HTMLAttributes } 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, Enchanted, EnchantedProps } from '@olwiba/cn';
7
7
  import { LucideIcon } from 'lucide-react';
@@ -226,6 +226,8 @@ interface AppShellUser {
226
226
  email: string;
227
227
  name?: string;
228
228
  avatar?: string;
229
+ /** Product-owned artwork shown when no avatar image exists. Defaults to the Olwiba bird. */
230
+ avatarFallback?: ReactNode;
229
231
  /** Displayed as a sub-label (e.g. plan tier). */
230
232
  plan?: string;
231
233
  onSignOut?: () => void;
@@ -247,18 +249,54 @@ type AppShellRenderLink = (props: {
247
249
  children: ReactNode;
248
250
  className?: string;
249
251
  }) => ReactNode;
252
+ /**
253
+ * One step in the header location trail. A bare string is a plain label; give
254
+ * it an `href` to make it walkable. The final crumb is the current route and is
255
+ * never rendered as a link.
256
+ */
257
+ type AppShellBreadcrumb = string | {
258
+ label: string;
259
+ href?: string;
260
+ };
261
+ interface AppShellHeaderControls {
262
+ /** Expands the desktop sidebar or opens its native mobile presentation. */
263
+ expandSidebar: () => void;
264
+ }
265
+ type AppShellHeaderStart = ReactNode | ((controls: AppShellHeaderControls) => ReactNode);
250
266
  interface AppShellProps {
251
267
  brand?: AppShellBrand;
252
268
  navItems?: AppNavItem[];
253
269
  /** Primary CTA rendered above nav (e.g. "New project", "Quick create") */
254
270
  action?: AppShellAction;
255
271
  user?: AppShellUser;
256
- /** Text shown in the top header bar */
272
+ /**
273
+ * Location context shown in the top header bar. This is app chrome, not the
274
+ * page address — the page (or its page pattern) owns the `<h1>`. Repeating
275
+ * the page title here prints the same words twice on every route.
276
+ */
257
277
  pageTitle?: string;
258
- /** Slot rendered at the start of the top header bar, after the sidebar trigger. */
259
- headerStart?: ReactNode;
278
+ /**
279
+ * Where the current route sits in the app, e.g.
280
+ * `[{ label: "Admin", href: "/admin" }, "Users"]`. Rendered as a muted trail
281
+ * and preferred over `pageTitle` when supplied.
282
+ */
283
+ breadcrumbs?: AppShellBreadcrumb[];
284
+ /**
285
+ * Slot rendered at the start of the top header bar, after the sidebar trigger.
286
+ * Use the render form when a custom control needs to expand the shell's own
287
+ * sidebar without importing its private provider context.
288
+ */
289
+ headerStart?: AppShellHeaderStart;
260
290
  /** Slot rendered at the end of the top header bar. */
261
291
  headerEnd?: ReactNode;
292
+ /** Product chrome rendered above the user menu in the sidebar footer. */
293
+ sidebarFooterStart?: ReactNode;
294
+ /**
295
+ * App chrome rendered after the page outlet — normally an `AppFooter`. This
296
+ * belongs to the shell, not to a page pattern: otherwise every route
297
+ * re-declares it and height-filling pages fight it for the remaining space.
298
+ */
299
+ footer?: ReactNode;
262
300
  /** Override link rendering for SPA navigation. Defaults to a native <a>. */
263
301
  renderLink?: AppShellRenderLink;
264
302
  children?: ReactNode;
@@ -275,6 +313,10 @@ interface AppShellProps {
275
313
  * - `"contained"` — fills its parent container; use in docs sandboxes, modals, or embedded previews.
276
314
  */
277
315
  sidebarPosition?: 'viewport' | 'contained';
316
+ /** Remount key for an animated sidebar identity or navigation-mode change. */
317
+ sidebarContentKey?: string;
318
+ /** Classes applied to the sidebar header, content, and footer. */
319
+ sidebarContentClassName?: string;
278
320
  /** Which side the sidebar sits on. @default "left" */
279
321
  side?: 'left' | 'right';
280
322
  /**
@@ -287,7 +329,7 @@ interface AppShellProps {
287
329
  */
288
330
  contentClassName?: string;
289
331
  }
290
- declare function AppShell({ brand, navItems, action, user, pageTitle, headerStart, headerEnd, renderLink, collapsible, sidebarPosition, side, contentClassName, children, }?: AppShellProps): react_jsx_runtime.JSX.Element;
332
+ declare function AppShell({ brand, navItems, action, user, pageTitle, breadcrumbs, footer, headerStart, headerEnd, renderLink, collapsible, sidebarPosition, sidebarContentKey, sidebarContentClassName, sidebarFooterStart, side, contentClassName, children, }?: AppShellProps): react_jsx_runtime.JSX.Element;
291
333
 
292
334
  interface AppPageHeroProps {
293
335
  eyebrow?: ReactNode;
@@ -297,6 +339,15 @@ interface AppPageHeroProps {
297
339
  action?: ReactNode;
298
340
  children?: ReactNode;
299
341
  compact?: boolean;
342
+ /**
343
+ * How the address is drawn.
344
+ * - `"card"` (default) — a bordered surface that introduces the route.
345
+ * - `"plain"` — type only. Use when the page content is itself made of
346
+ * surfaces: a second card at the top competes with them instead of
347
+ * introducing them, and pushes the region that actually does something
348
+ * further down the page.
349
+ */
350
+ surface?: 'card' | 'plain';
300
351
  className?: string;
301
352
  }
302
353
  /**
@@ -305,7 +356,26 @@ interface AppPageHeroProps {
305
356
  * Use this when a route needs more visual weight than a simple `PageHeader`,
306
357
  * but still keep product-specific stats, actions, and copy in the consumer.
307
358
  */
308
- declare function AppPageHero({ eyebrow, title, description, icon: Icon, action, children, compact, className, }: AppPageHeroProps): react_jsx_runtime.JSX.Element;
359
+ declare function AppPageHero({ eyebrow, title, description, icon: Icon, action, children, compact, surface, className, }: AppPageHeroProps): react_jsx_runtime.JSX.Element;
360
+
361
+ interface AppFooterProps extends HTMLAttributes<HTMLElement> {
362
+ /** Leading content — a product line, build info, a rotating message. */
363
+ start?: ReactNode;
364
+ /** Trailing content — a status pill, version, or a short link row. */
365
+ end?: ReactNode;
366
+ }
367
+ /**
368
+ * Quiet utility row for signed-in chrome.
369
+ *
370
+ * Pass it to `AppShell`'s `footer` slot: it is app chrome, so it lives beside
371
+ * the page outlet rather than inside a page pattern. Public marketing pages use
372
+ * the full `Footer` instead — this exists so long app pages do not end abruptly.
373
+ *
374
+ * The row owns its solid chrome surface and geometry so page ambience cannot
375
+ * bleed through it. What the slots contain — live status, version, links,
376
+ * product copy — stays with the product.
377
+ */
378
+ declare function AppFooter({ start, end, children, className, ...props }: AppFooterProps): react_jsx_runtime.JSX.Element;
309
379
 
310
380
  interface AuthFormProps {
311
381
  /**
@@ -475,10 +545,18 @@ declare function OnboardingWizard({ steps, onComplete, onStepChange, step: stepP
475
545
  interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
476
546
  icon?: LucideIcon;
477
547
  title: string;
478
- description?: string;
548
+ description?: React.ReactNode;
549
+ eyebrow?: React.ReactNode;
479
550
  action?: React.ReactNode;
551
+ secondaryAction?: React.ReactNode;
552
+ /** Adds the application-card surface used for route-level empty states. */
553
+ variant?: 'plain' | 'card';
554
+ /** Reduces the card presentation's minimum height and padding. */
555
+ compact?: boolean;
556
+ /** Fills a flex-sized parent rather than using a fixed minimum height. */
557
+ fill?: boolean;
480
558
  }
481
- declare function EmptyState({ icon: Icon, title, description, action, className, ...props }: EmptyStateProps): react_jsx_runtime.JSX.Element;
559
+ declare function EmptyState({ icon: Icon, title, description, eyebrow, action, secondaryAction, variant, compact, fill, className, ...props }: EmptyStateProps): react_jsx_runtime.JSX.Element;
482
560
 
483
561
  interface ErrorPageLink {
484
562
  label: string;
@@ -1448,6 +1526,20 @@ interface DataTableProps<TData> {
1448
1526
  */
1449
1527
  declare function DataTable<TData>({ columns, data, searchKey, searchPlaceholder, selectable, onSelectionChange, pageSize, toolbar, onRowClick, emptyMessage, className, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
1450
1528
 
1529
+ interface LoadMoreProps extends React.HTMLAttributes<HTMLDivElement> {
1530
+ hasNextPage: boolean;
1531
+ isFetchingNextPage: boolean;
1532
+ fetchNextPage: () => void | Promise<unknown>;
1533
+ /** Watches the sentinel instead of showing a manual button. */
1534
+ auto?: boolean;
1535
+ /** Plural noun used by the manual button, for example `properties`. */
1536
+ label?: string;
1537
+ /** Starts loading before the sentinel reaches the viewport. */
1538
+ rootMargin?: string;
1539
+ }
1540
+ /** Cursor-pagination footer with either guarded infinite scroll or a manual fallback. */
1541
+ declare function LoadMore({ hasNextPage, isFetchingNextPage, fetchNextPage, auto, label, rootMargin, className, ...props }: LoadMoreProps): react_jsx_runtime.JSX.Element | null;
1542
+
1451
1543
  type ViewMode = 'cards' | 'list';
1452
1544
  interface UseViewModeReturn {
1453
1545
  view: ViewMode;
@@ -2008,7 +2100,11 @@ interface PostListProps {
2008
2100
  posts: PostCardProps[];
2009
2101
  renderLink?: AppShellRenderLink;
2010
2102
  emptyMessage?: string;
2011
- /** Max columns at the widest breakpoint. */
2103
+ /**
2104
+ * Max columns at the widest breakpoint. When omitted, one- and two-post
2105
+ * collections are balanced automatically instead of leaving an empty third
2106
+ * column.
2107
+ */
2012
2108
  columns?: 2 | 3;
2013
2109
  className?: string;
2014
2110
  }
@@ -2096,4 +2192,4 @@ interface UsePaginationReturn {
2096
2192
  }
2097
2193
  declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
2098
2194
 
2099
- export { ActivityFeed, type ActivityFeedItem, type ActivityFeedProps, AnimatedPill, type AnimatedPillProps, AnimatedSwap, type AnimatedSwapEffect, type AnimatedSwapProps, type AnimatedSwapSpec, AppContent, type AppContentProps, AppGrid, AppGridCell, type AppGridCellProps, type AppGridColumns, type AppGridProps, type AppNavItem, AppPageHero, type AppPageHeroProps, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, type BillingInvoice, BillingPanel, type BillingPanelProps, type BillingPaymentMethod, type BillingUsageMetric, BrandColorSwitchMinimal, Button, type ButtonProps, Card, type CardProps, Carousel, type CarouselProps, ChangelogCard, type ChangelogCardProps, type ChangelogHighlight, ChangelogList, type ChangelogListProps, type ChangelogReleaseType, Chart, type ChartProps, type ChartSeries, Checkbox, type CheckboxProps, CommandMenu, type CommandMenuGroup, type CommandMenuItem, type CommandMenuProps, type ComparisonColumn, ComparisonSection, type ComparisonSectionProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CountdownTimer, type CountdownTimerProps, CtaSection, type CtaSectionProps, DataTable, type DataTableProps, DataView, type DataViewProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, type FeatureMarqueeItem, type FeatureMarqueeRow, FeatureMarqueeSection, type FeatureMarqueeSectionProps, FeaturesSection, type FeaturesSectionProps, FileUpload, type FileUploadEntry, type FileUploadProps, FlowBracket, type FlowBracketProps, FlowConnector, type FlowConnectorProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, Grid, GridItem, type GridItemProps, type GridProps, type GroupedFeatureGroup, GroupedFeaturesSection, type GroupedFeaturesSectionProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LogoStrip, type LogoStripProps, type MarketingSectionSpacing, type MarketingSurface, MarketingSurfaceProvider, MediaCard, type MediaCardProps, ModeSwitchMinimal, Navbar, type NavbarProps, NewsletterSection, type NewsletterSectionProps, type NotificationItem, NotificationToast, type NotificationToastProps, NotificationsPopover, type NotificationsPopoverProps, type NotifyAction, type NotifyOptions, OlwibaUIProvider, type OlwibaUIProviderProps, type OnboardingStep, OnboardingWizard, type OnboardingWizardProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PhoneFrame, type PhoneFrameProps, type PostAuthor, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, PublicPageFrame, type PublicPageFrameProps, type QualificationColumn, QualificationSection, type QualificationSectionProps, RegisterHotkeys, RootErrorFallback, Section, type SectionProps, SectionTitle, type SectionTitleProps, SettingsSection, type SettingsSectionProps, Sortable, type SortableProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, Stack, type StackProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, type StepGroup, type StepItem, StepsSection, type StepsSectionProps, Suspensed, Switch, type SwitchProps, type TeamMember, type TeamMemberRecord, TeamMembersPanel, type TeamMembersPanelProps, TeamSection, type TeamSectionProps, type TechStackItem, TechStackSection, type TechStackSectionProps, TestimonialCard, type TestimonialCardProps, TestimonialsSection, type TestimonialsSectionProps, Textarea, type TextareaProps, ThemeColorUpdater, ThemeSwitchMinimal, type UIMode, Underlay, type UnderlayProps, type UnderlayVariant, UpdateBanner, type UpdateBannerProps, type UpgradeComparisonRow, UpgradePrompt, type UpgradePromptProps, type UseConfirmReturn, type UseControlledOpenReturn, type UsePaginationReturn, type UseViewModeReturn, VersionBanner, type ViewMode, ViewToggle, type ViewToggleProps, cn, marketingSectionSpacing, notify, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMarketingSurface, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useSectionSurface, useUIMode, useViewMode };
2195
+ export { ActivityFeed, type ActivityFeedItem, type ActivityFeedProps, AnimatedPill, type AnimatedPillProps, AnimatedSwap, type AnimatedSwapEffect, type AnimatedSwapProps, type AnimatedSwapSpec, AppContent, type AppContentProps, AppFooter, type AppFooterProps, AppGrid, AppGridCell, type AppGridCellProps, type AppGridColumns, type AppGridProps, type AppNavItem, AppPageHero, type AppPageHeroProps, AppScreen, AppShell, type AppShellAction, type AppShellBrand, type AppShellBreadcrumb, type AppShellHeaderControls, type AppShellHeaderStart, type AppShellProps, type AppShellRenderLink, type AppShellUser, type AuthFormProps, AuthSection, type AuthSectionProps, Badge, type BadgeProps, type BillingInvoice, BillingPanel, type BillingPanelProps, type BillingPaymentMethod, type BillingUsageMetric, BrandColorSwitchMinimal, Button, type ButtonProps, Card, type CardProps, Carousel, type CarouselProps, ChangelogCard, type ChangelogCardProps, type ChangelogHighlight, ChangelogList, type ChangelogListProps, type ChangelogReleaseType, Chart, type ChartProps, type ChartSeries, Checkbox, type CheckboxProps, CommandMenu, type CommandMenuGroup, type CommandMenuItem, type CommandMenuProps, type ComparisonColumn, ComparisonSection, type ComparisonSectionProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmOptions, type ContactInfoItem, ContactSection, type ContactSectionProps, ContextMenu, type ContextMenuDef, type ContextMenuProps, CountUp, type CountUpProps, CountdownTimer, type CountdownTimerProps, CtaSection, type CtaSectionProps, DataTable, type DataTableProps, DataView, type DataViewProps, DevBanner, type DevBannerProps, Dock, type DockItem, type DockProps, EmptyState, type EmptyStateProps, ErrorPage, type ErrorPageProps, FadeIn, type FadeInProps, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, type FeatureMarqueeItem, type FeatureMarqueeRow, FeatureMarqueeSection, type FeatureMarqueeSectionProps, FeaturesSection, type FeaturesSectionProps, FileUpload, type FileUploadEntry, type FileUploadProps, FlowBracket, type FlowBracketProps, FlowConnector, type FlowConnectorProps, Footer, type FooterProps, FullPageSpinner, GlassCard, type GlassCardProps, Grid, GridItem, type GridItemProps, type GridProps, type GroupedFeatureGroup, GroupedFeaturesSection, type GroupedFeaturesSectionProps, HeroSection, type HeroSectionProps, type Hotkey, ImageCard, type ImageCardProps, Input, type InputProps, LoadMore, type LoadMoreProps, LogoStrip, type LogoStripProps, type MarketingSectionSpacing, type MarketingSurface, MarketingSurfaceProvider, MediaCard, type MediaCardProps, ModeSwitchMinimal, Navbar, type NavbarProps, NewsletterSection, type NewsletterSectionProps, type NotificationItem, NotificationToast, type NotificationToastProps, NotificationsPopover, type NotificationsPopoverProps, type NotifyAction, type NotifyOptions, OlwibaUIProvider, type OlwibaUIProviderProps, type OnboardingStep, OnboardingWizard, type OnboardingWizardProps, Overlay, type OverlayProps, type OverlayVariant, PageHeader, type PageHeaderBackButton, type PageHeaderBreadcrumb, type PageHeaderProps, PageTransition, type PageTransitionProps, PhoneFrame, type PhoneFrameProps, type PostAuthor, PostCard, type PostCardProps, PostList, type PostListProps, PricingCard, type PricingCardProps, type PricingFeature, type PricingPlan, PricingSection, type PricingSectionProps, PublicPageFrame, type PublicPageFrameProps, type QualificationColumn, QualificationSection, type QualificationSectionProps, RegisterHotkeys, RootErrorFallback, Section, type SectionProps, SectionTitle, type SectionTitleProps, SettingsSection, type SettingsSectionProps, Sortable, type SortableProps, Spotlight, type SpotlightGroup, type SpotlightItem, type SpotlightProps, Stack, type StackProps, StaggerChildren, type StaggerChildrenProps, StatCard, type StatCardProps, StatsSection, type StatsSectionProps, type StepGroup, type StepItem, StepsSection, type StepsSectionProps, Suspensed, Switch, type SwitchProps, type TeamMember, type TeamMemberRecord, TeamMembersPanel, type TeamMembersPanelProps, TeamSection, type TeamSectionProps, type TechStackItem, TechStackSection, type TechStackSectionProps, TestimonialCard, type TestimonialCardProps, TestimonialsSection, type TestimonialsSectionProps, Textarea, type TextareaProps, ThemeColorUpdater, ThemeSwitchMinimal, type UIMode, Underlay, type UnderlayProps, type UnderlayVariant, UpdateBanner, type UpdateBannerProps, type UpgradeComparisonRow, UpgradePrompt, type UpgradePromptProps, type UseConfirmReturn, type UseControlledOpenReturn, type UsePaginationReturn, type UseViewModeReturn, VersionBanner, type ViewMode, ViewToggle, type ViewToggleProps, cn, marketingSectionSpacing, notify, useConfirm, useControlledOpen, useCopyToClipboard, useDebounce, useIntersectionObserver, useLocalStorage, useMarketingSurface, useMediaQuery, useMounted, useOlwibaUI, usePagination, useScrolledPast, useSectionSurface, useUIMode, useViewMode };