@olwiba/ui 0.2.23 → 0.2.25

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
@@ -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;
@@ -256,6 +258,11 @@ type AppShellBreadcrumb = string | {
256
258
  label: string;
257
259
  href?: string;
258
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);
259
266
  interface AppShellProps {
260
267
  brand?: AppShellBrand;
261
268
  navItems?: AppNavItem[];
@@ -274,10 +281,16 @@ interface AppShellProps {
274
281
  * and preferred over `pageTitle` when supplied.
275
282
  */
276
283
  breadcrumbs?: AppShellBreadcrumb[];
277
- /** Slot rendered at the start of the top header bar, after the sidebar trigger. */
278
- headerStart?: ReactNode;
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;
279
290
  /** Slot rendered at the end of the top header bar. */
280
291
  headerEnd?: ReactNode;
292
+ /** Product chrome rendered above the user menu in the sidebar footer. */
293
+ sidebarFooterStart?: ReactNode;
281
294
  /**
282
295
  * App chrome rendered after the page outlet — normally an `AppFooter`. This
283
296
  * belongs to the shell, not to a page pattern: otherwise every route
@@ -300,6 +313,10 @@ interface AppShellProps {
300
313
  * - `"contained"` — fills its parent container; use in docs sandboxes, modals, or embedded previews.
301
314
  */
302
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;
303
320
  /** Which side the sidebar sits on. @default "left" */
304
321
  side?: 'left' | 'right';
305
322
  /**
@@ -312,7 +329,7 @@ interface AppShellProps {
312
329
  */
313
330
  contentClassName?: string;
314
331
  }
315
- declare function AppShell({ brand, navItems, action, user, pageTitle, breadcrumbs, footer, 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;
316
333
 
317
334
  interface AppPageHeroProps {
318
335
  eyebrow?: ReactNode;
@@ -354,8 +371,9 @@ interface AppFooterProps extends HTMLAttributes<HTMLElement> {
354
371
  * the page outlet rather than inside a page pattern. Public marketing pages use
355
372
  * the full `Footer` instead — this exists so long app pages do not end abruptly.
356
373
  *
357
- * The row owns geometry only. What the slots contain live status, version,
358
- * links, product copystays with the product.
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.
359
377
  */
360
378
  declare function AppFooter({ start, end, children, className, ...props }: AppFooterProps): react_jsx_runtime.JSX.Element;
361
379
 
@@ -527,10 +545,18 @@ declare function OnboardingWizard({ steps, onComplete, onStepChange, step: stepP
527
545
  interface EmptyStateProps extends React.HTMLAttributes<HTMLDivElement> {
528
546
  icon?: LucideIcon;
529
547
  title: string;
530
- description?: string;
548
+ description?: React.ReactNode;
549
+ eyebrow?: React.ReactNode;
531
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;
532
558
  }
533
- 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;
534
560
 
535
561
  interface ErrorPageLink {
536
562
  label: string;
@@ -1191,8 +1217,14 @@ interface FooterProps {
1191
1217
  icon: ReactNode;
1192
1218
  }>;
1193
1219
  legal?: string;
1220
+ /**
1221
+ * Live status pill. `label` is a ReactNode, not a string: a real status
1222
+ * pill often carries per-service detail in a tooltip, and typing it as
1223
+ * string forced consumers to smuggle that through `as unknown as string`.
1224
+ * A plain string still works and is the common case.
1225
+ */
1194
1226
  status?: {
1195
- label: string;
1227
+ label: ReactNode;
1196
1228
  operational?: boolean;
1197
1229
  };
1198
1230
  renderLink?: AppShellRenderLink;
@@ -1487,6 +1519,23 @@ interface DataTableProps<TData> {
1487
1519
  onSelectionChange?: (rows: TData[]) => void;
1488
1520
  /** Rows per page. Set to `0` to disable pagination entirely. @default 10 */
1489
1521
  pageSize?: number;
1522
+ /**
1523
+ * Hands pagination to the caller, for data the client does not hold all of.
1524
+ *
1525
+ * With this set, `data` is treated as the current page rather than the whole
1526
+ * set: the table stops slicing, and the footer reports and drives the
1527
+ * caller's page instead of its own. Without it nothing changes — a table
1528
+ * given every row keeps paginating locally, which is right for the common
1529
+ * case and avoids making every consumer implement paging to get a table.
1530
+ */
1531
+ pagination?: {
1532
+ pageIndex: number;
1533
+ /** Total pages. Omit when unknown — the footer then relies on `hasNext`. */
1534
+ pageCount?: number;
1535
+ hasNext?: boolean;
1536
+ hasPrevious?: boolean;
1537
+ onPageChange: (pageIndex: number) => void;
1538
+ };
1490
1539
  /** Slot rendered top-right of the toolbar — e.g. an "Add" button. */
1491
1540
  toolbar?: React.ReactNode;
1492
1541
  onRowClick?: (row: TData) => void;
@@ -1498,7 +1547,21 @@ interface DataTableProps<TData> {
1498
1547
  * toggle `searchKey`/`selectable`/`pageSize` rather than reaching for a
1499
1548
  * different table component per use case.
1500
1549
  */
1501
- declare function DataTable<TData>({ columns, data, searchKey, searchPlaceholder, selectable, onSelectionChange, pageSize, toolbar, onRowClick, emptyMessage, className, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
1550
+ declare function DataTable<TData>({ columns, data, searchKey, searchPlaceholder, selectable, onSelectionChange, pageSize, pagination, toolbar, onRowClick, emptyMessage, className, }: DataTableProps<TData>): react_jsx_runtime.JSX.Element;
1551
+
1552
+ interface LoadMoreProps extends React.HTMLAttributes<HTMLDivElement> {
1553
+ hasNextPage: boolean;
1554
+ isFetchingNextPage: boolean;
1555
+ fetchNextPage: () => void | Promise<unknown>;
1556
+ /** Watches the sentinel instead of showing a manual button. */
1557
+ auto?: boolean;
1558
+ /** Plural noun used by the manual button, for example `properties`. */
1559
+ label?: string;
1560
+ /** Starts loading before the sentinel reaches the viewport. */
1561
+ rootMargin?: string;
1562
+ }
1563
+ /** Cursor-pagination footer with either guarded infinite scroll or a manual fallback. */
1564
+ declare function LoadMore({ hasNextPage, isFetchingNextPage, fetchNextPage, auto, label, rootMargin, className, ...props }: LoadMoreProps): react_jsx_runtime.JSX.Element | null;
1502
1565
 
1503
1566
  type ViewMode = 'cards' | 'list';
1504
1567
  interface UseViewModeReturn {
@@ -1595,6 +1658,27 @@ interface ChartProps {
1595
1658
  grid?: boolean;
1596
1659
  /** Legend. @default true for multiple series or donut, false for one series */
1597
1660
  legend?: boolean;
1661
+ /**
1662
+ * Stack series instead of overlaying them. Area and bar only — a stacked
1663
+ * line is a shape people misread as absolute values.
1664
+ *
1665
+ * Off by default: stacking answers "what does the total split into", and
1666
+ * silently switching a two-series comparison to it would change what an
1667
+ * existing chart claims.
1668
+ */
1669
+ stacked?: boolean;
1670
+ /**
1671
+ * Formats x-axis ticks. Separate from `valueFormatter`, which formats the
1672
+ * measured value — an axis of ISO dates wants shortening without changing
1673
+ * what the tooltip reports.
1674
+ */
1675
+ xTickFormatter?: (value: string) => string;
1676
+ /**
1677
+ * Fixes the y-axis range. Without it recharts scales to the data, which for
1678
+ * a percentage series makes a 98-100%% band fill the plot and read as
1679
+ * volatility.
1680
+ */
1681
+ yDomain?: [number, number];
1598
1682
  /** Formats values in tooltips and the y-axis, e.g. `(v) => \`$${v}\``. */
1599
1683
  valueFormatter?: (value: number) => string;
1600
1684
  className?: string;
@@ -1606,7 +1690,7 @@ interface ChartProps {
1606
1690
  * comparison, donut for part-of-whole identity. More than 5 donut slices:
1607
1691
  * fold the tail into an "Other" slice in your data instead of adding hues.
1608
1692
  */
1609
- declare function Chart({ type, data, xKey, series, height, grid, legend, valueFormatter, className, }: ChartProps): react_jsx_runtime.JSX.Element;
1693
+ declare function Chart({ type, data, xKey, series, height, grid, legend, stacked, xTickFormatter, yDomain, valueFormatter, className, }: ChartProps): react_jsx_runtime.JSX.Element;
1610
1694
 
1611
1695
  interface FileUploadEntry {
1612
1696
  id: string;
@@ -1666,6 +1750,10 @@ interface NotificationToastProps {
1666
1750
  */
1667
1751
  declare function NotificationToast({ variant, title, description, avatar, action, secondaryAction, onDismiss, }: NotificationToastProps): react_jsx_runtime.JSX.Element;
1668
1752
  interface NotifyOptions extends Omit<NotificationToastProps, 'onDismiss'> {
1753
+ /**
1754
+ * Overrides the per-variant default below. Explicit always wins — a caller
1755
+ * that has thought about the timing knows more than this heuristic does.
1756
+ */
1669
1757
  duration?: number;
1670
1758
  }
1671
1759
  /** Fires a `NotificationToast` through sonner. Requires `<Toaster />` from `@olwiba/cn` mounted once in your app. */
@@ -2060,7 +2148,11 @@ interface PostListProps {
2060
2148
  posts: PostCardProps[];
2061
2149
  renderLink?: AppShellRenderLink;
2062
2150
  emptyMessage?: string;
2063
- /** Max columns at the widest breakpoint. */
2151
+ /**
2152
+ * Max columns at the widest breakpoint. When omitted, one- and two-post
2153
+ * collections are balanced automatically instead of leaving an empty third
2154
+ * column.
2155
+ */
2064
2156
  columns?: 2 | 3;
2065
2157
  className?: string;
2066
2158
  }
@@ -2148,4 +2240,4 @@ interface UsePaginationReturn {
2148
2240
  }
2149
2241
  declare function usePagination(total: number, pageSize: number): UsePaginationReturn;
2150
2242
 
2151
- 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 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 };
2243
+ 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 };