@camstack/ui-library 0.1.34 → 0.1.36

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.cts CHANGED
@@ -184,6 +184,25 @@ interface FloatingPanelProps {
184
184
  }
185
185
  declare function FloatingPanel({ title, onClose, children, defaultWidth, defaultHeight, minWidth, minHeight, offsetIndex, className, }: FloatingPanelProps): react_jsx_runtime.JSX.Element;
186
186
 
187
+ interface MobileDrawerProps {
188
+ open: boolean;
189
+ onClose: () => void;
190
+ children: ReactNode;
191
+ className?: string;
192
+ /** Width of the drawer panel. Default: 'w-64' */
193
+ width?: string;
194
+ }
195
+ declare function MobileDrawer({ open, onClose, children, className, width }: MobileDrawerProps): react_jsx_runtime.JSX.Element;
196
+
197
+ interface BottomSheetProps {
198
+ open: boolean;
199
+ onClose: () => void;
200
+ title?: string;
201
+ children: ReactNode;
202
+ className?: string;
203
+ }
204
+ declare function BottomSheet({ open, onClose, title, children, className }: BottomSheetProps): react_jsx_runtime.JSX.Element;
205
+
187
206
  type Status = 'online' | 'offline' | 'degraded' | 'unknown';
188
207
  interface StatusBadgeProps {
189
208
  status: Status;
@@ -340,9 +359,10 @@ interface SidebarProps {
340
359
  logo?: ReactNode;
341
360
  sections: SidebarSection[];
342
361
  footer?: SidebarItemProps[];
362
+ onNavigate?: () => void;
343
363
  className?: string;
344
364
  }
345
- declare function Sidebar({ logo, sections, footer, className }: SidebarProps): react_jsx_runtime.JSX.Element;
365
+ declare function Sidebar({ logo, sections, footer, onNavigate, className }: SidebarProps): react_jsx_runtime.JSX.Element;
346
366
 
347
367
  interface AppShellProps {
348
368
  sidebar: SidebarProps;
@@ -353,10 +373,14 @@ interface AppShellProps {
353
373
  }[];
354
374
  actions?: ReactNode;
355
375
  };
376
+ /** Content shown in the center of the mobile top bar (e.g. logo) */
377
+ mobileLogo?: ReactNode;
378
+ /** Content shown on the right side of the mobile top bar (e.g. avatar menu) */
379
+ mobileActions?: ReactNode;
356
380
  children: ReactNode;
357
381
  className?: string;
358
382
  }
359
- declare function AppShell({ sidebar, header, children, className }: AppShellProps): react_jsx_runtime.JSX.Element;
383
+ declare function AppShell({ sidebar, header, mobileLogo, mobileActions, children, className }: AppShellProps): react_jsx_runtime.JSX.Element;
360
384
 
361
385
  interface DataTableAction {
362
386
  label: string;
@@ -385,9 +409,11 @@ interface DataTableProps<T> {
385
409
  compact?: boolean;
386
410
  stickyHeader?: boolean;
387
411
  className?: string;
412
+ /** How to render on mobile. 'scroll' keeps table with horizontal scroll. 'cards' renders each row as a card. Default: 'scroll' */
413
+ mobileMode?: 'scroll' | 'cards';
388
414
  }
389
415
 
390
- declare function DataTable<T>({ data, columns: userColumns, sorting, onSortingChange, filtering, onFilteringChange, pagination, onPaginationChange, loading, emptyState, rowActions, onRowClick, selectable, compact, stickyHeader, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
416
+ declare function DataTable<T>({ data, columns: userColumns, sorting, onSortingChange, filtering, onFilteringChange, pagination, onPaginationChange, loading, emptyState, rowActions, onRowClick, selectable, compact, stickyHeader, className, mobileMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
391
417
 
392
418
  interface DeviceCardBadge {
393
419
  /** Badge label text */
@@ -713,4 +739,6 @@ interface DevShellContextValue {
713
739
  declare function useDevShell(): DevShellContextValue;
714
740
  declare function DevShell({ children, serverUrl, title, }: DevShellProps): react_jsx_runtime.JSX.Element;
715
741
 
716
- export { type AddonPageProps, AppShell, type AppShellProps, Badge, type BadgeProps, Button, type ButtonProps, CLASS_COLORS, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, ConfirmDialog, type ConfirmDialogProps, DEFAULT_CLASS_COLORS, DEFAULT_COLOR, DataTable, type DataTableAction, type DataTableProps, type Detection, DetectionCanvas, type DetectionCanvasProps, DetectionResultTree, type DetectionResultTreeProps, DevShell, type DevShellProps, DeviceCard, type DeviceCardAction, type DeviceCardBadge, type DeviceCardProps, DeviceGrid, type DeviceGridProps, Dialog, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, EmptyState, type EmptyStateProps, FilterBar, type FilterBarProps, type FilterDef, FloatingPanel, type FloatingPanelProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, ImageSelector, type ImageSelectorProps, type InferenceAgentOption, type InferenceBackendOption, InferenceConfigSelector, type InferenceConfigSelectorProps, type InferenceModelOption, Input, type InputProps, KeyValueList, type KeyValueListProps, Label, type LabelProps, LoginForm, type LoginFormProps, type MountAddonPageOptions, PageHeader, type PageHeaderProps, PipelineBuilder, type PipelineBuilderProps, type PipelineRuntimeOption, PipelineRuntimeSelector, PipelineStep, type PipelineStepDisplayConfig, type PipelineStepProps, Popover, PopoverContent, PopoverTrigger, ProviderBadge, type ProviderBadgeProps, type ProviderType, type ReferenceImage, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, SemanticBadge, type SemanticBadgeProps, type SemanticBadgeVariant, Separator, type SeparatorProps, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, type SidebarSection, Skeleton, type SkeletonProps, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusType, StepTimings, type StepTimingsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipTrigger, UseThemeModeReturn, VersionBadge, type VersionBadgeProps, cn, getClassColor, mountAddonPage, providerIcons, statusIcons, useDevShell };
742
+ declare function useIsMobile(): boolean;
743
+
744
+ export { type AddonPageProps, AppShell, type AppShellProps, Badge, type BadgeProps, BottomSheet, type BottomSheetProps, Button, type ButtonProps, CLASS_COLORS, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, ConfirmDialog, type ConfirmDialogProps, DEFAULT_CLASS_COLORS, DEFAULT_COLOR, DataTable, type DataTableAction, type DataTableProps, type Detection, DetectionCanvas, type DetectionCanvasProps, DetectionResultTree, type DetectionResultTreeProps, DevShell, type DevShellProps, DeviceCard, type DeviceCardAction, type DeviceCardBadge, type DeviceCardProps, DeviceGrid, type DeviceGridProps, Dialog, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, EmptyState, type EmptyStateProps, FilterBar, type FilterBarProps, type FilterDef, FloatingPanel, type FloatingPanelProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, ImageSelector, type ImageSelectorProps, type InferenceAgentOption, type InferenceBackendOption, InferenceConfigSelector, type InferenceConfigSelectorProps, type InferenceModelOption, Input, type InputProps, KeyValueList, type KeyValueListProps, Label, type LabelProps, LoginForm, type LoginFormProps, MobileDrawer, type MobileDrawerProps, type MountAddonPageOptions, PageHeader, type PageHeaderProps, PipelineBuilder, type PipelineBuilderProps, type PipelineRuntimeOption, PipelineRuntimeSelector, PipelineStep, type PipelineStepDisplayConfig, type PipelineStepProps, Popover, PopoverContent, PopoverTrigger, ProviderBadge, type ProviderBadgeProps, type ProviderType, type ReferenceImage, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, SemanticBadge, type SemanticBadgeProps, type SemanticBadgeVariant, Separator, type SeparatorProps, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, type SidebarSection, Skeleton, type SkeletonProps, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusType, StepTimings, type StepTimingsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipTrigger, UseThemeModeReturn, VersionBadge, type VersionBadgeProps, cn, getClassColor, mountAddonPage, providerIcons, statusIcons, useDevShell, useIsMobile };
package/dist/index.d.ts CHANGED
@@ -184,6 +184,25 @@ interface FloatingPanelProps {
184
184
  }
185
185
  declare function FloatingPanel({ title, onClose, children, defaultWidth, defaultHeight, minWidth, minHeight, offsetIndex, className, }: FloatingPanelProps): react_jsx_runtime.JSX.Element;
186
186
 
187
+ interface MobileDrawerProps {
188
+ open: boolean;
189
+ onClose: () => void;
190
+ children: ReactNode;
191
+ className?: string;
192
+ /** Width of the drawer panel. Default: 'w-64' */
193
+ width?: string;
194
+ }
195
+ declare function MobileDrawer({ open, onClose, children, className, width }: MobileDrawerProps): react_jsx_runtime.JSX.Element;
196
+
197
+ interface BottomSheetProps {
198
+ open: boolean;
199
+ onClose: () => void;
200
+ title?: string;
201
+ children: ReactNode;
202
+ className?: string;
203
+ }
204
+ declare function BottomSheet({ open, onClose, title, children, className }: BottomSheetProps): react_jsx_runtime.JSX.Element;
205
+
187
206
  type Status = 'online' | 'offline' | 'degraded' | 'unknown';
188
207
  interface StatusBadgeProps {
189
208
  status: Status;
@@ -340,9 +359,10 @@ interface SidebarProps {
340
359
  logo?: ReactNode;
341
360
  sections: SidebarSection[];
342
361
  footer?: SidebarItemProps[];
362
+ onNavigate?: () => void;
343
363
  className?: string;
344
364
  }
345
- declare function Sidebar({ logo, sections, footer, className }: SidebarProps): react_jsx_runtime.JSX.Element;
365
+ declare function Sidebar({ logo, sections, footer, onNavigate, className }: SidebarProps): react_jsx_runtime.JSX.Element;
346
366
 
347
367
  interface AppShellProps {
348
368
  sidebar: SidebarProps;
@@ -353,10 +373,14 @@ interface AppShellProps {
353
373
  }[];
354
374
  actions?: ReactNode;
355
375
  };
376
+ /** Content shown in the center of the mobile top bar (e.g. logo) */
377
+ mobileLogo?: ReactNode;
378
+ /** Content shown on the right side of the mobile top bar (e.g. avatar menu) */
379
+ mobileActions?: ReactNode;
356
380
  children: ReactNode;
357
381
  className?: string;
358
382
  }
359
- declare function AppShell({ sidebar, header, children, className }: AppShellProps): react_jsx_runtime.JSX.Element;
383
+ declare function AppShell({ sidebar, header, mobileLogo, mobileActions, children, className }: AppShellProps): react_jsx_runtime.JSX.Element;
360
384
 
361
385
  interface DataTableAction {
362
386
  label: string;
@@ -385,9 +409,11 @@ interface DataTableProps<T> {
385
409
  compact?: boolean;
386
410
  stickyHeader?: boolean;
387
411
  className?: string;
412
+ /** How to render on mobile. 'scroll' keeps table with horizontal scroll. 'cards' renders each row as a card. Default: 'scroll' */
413
+ mobileMode?: 'scroll' | 'cards';
388
414
  }
389
415
 
390
- declare function DataTable<T>({ data, columns: userColumns, sorting, onSortingChange, filtering, onFilteringChange, pagination, onPaginationChange, loading, emptyState, rowActions, onRowClick, selectable, compact, stickyHeader, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
416
+ declare function DataTable<T>({ data, columns: userColumns, sorting, onSortingChange, filtering, onFilteringChange, pagination, onPaginationChange, loading, emptyState, rowActions, onRowClick, selectable, compact, stickyHeader, className, mobileMode, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
391
417
 
392
418
  interface DeviceCardBadge {
393
419
  /** Badge label text */
@@ -713,4 +739,6 @@ interface DevShellContextValue {
713
739
  declare function useDevShell(): DevShellContextValue;
714
740
  declare function DevShell({ children, serverUrl, title, }: DevShellProps): react_jsx_runtime.JSX.Element;
715
741
 
716
- export { type AddonPageProps, AppShell, type AppShellProps, Badge, type BadgeProps, Button, type ButtonProps, CLASS_COLORS, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, ConfirmDialog, type ConfirmDialogProps, DEFAULT_CLASS_COLORS, DEFAULT_COLOR, DataTable, type DataTableAction, type DataTableProps, type Detection, DetectionCanvas, type DetectionCanvasProps, DetectionResultTree, type DetectionResultTreeProps, DevShell, type DevShellProps, DeviceCard, type DeviceCardAction, type DeviceCardBadge, type DeviceCardProps, DeviceGrid, type DeviceGridProps, Dialog, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, EmptyState, type EmptyStateProps, FilterBar, type FilterBarProps, type FilterDef, FloatingPanel, type FloatingPanelProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, ImageSelector, type ImageSelectorProps, type InferenceAgentOption, type InferenceBackendOption, InferenceConfigSelector, type InferenceConfigSelectorProps, type InferenceModelOption, Input, type InputProps, KeyValueList, type KeyValueListProps, Label, type LabelProps, LoginForm, type LoginFormProps, type MountAddonPageOptions, PageHeader, type PageHeaderProps, PipelineBuilder, type PipelineBuilderProps, type PipelineRuntimeOption, PipelineRuntimeSelector, PipelineStep, type PipelineStepDisplayConfig, type PipelineStepProps, Popover, PopoverContent, PopoverTrigger, ProviderBadge, type ProviderBadgeProps, type ProviderType, type ReferenceImage, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, SemanticBadge, type SemanticBadgeProps, type SemanticBadgeVariant, Separator, type SeparatorProps, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, type SidebarSection, Skeleton, type SkeletonProps, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusType, StepTimings, type StepTimingsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipTrigger, UseThemeModeReturn, VersionBadge, type VersionBadgeProps, cn, getClassColor, mountAddonPage, providerIcons, statusIcons, useDevShell };
742
+ declare function useIsMobile(): boolean;
743
+
744
+ export { type AddonPageProps, AppShell, type AppShellProps, Badge, type BadgeProps, BottomSheet, type BottomSheetProps, Button, type ButtonProps, CLASS_COLORS, Card, type CardProps, Checkbox, type CheckboxProps, CodeBlock, type CodeBlockProps, ConfirmDialog, type ConfirmDialogProps, DEFAULT_CLASS_COLORS, DEFAULT_COLOR, DataTable, type DataTableAction, type DataTableProps, type Detection, DetectionCanvas, type DetectionCanvasProps, DetectionResultTree, type DetectionResultTreeProps, DevShell, type DevShellProps, DeviceCard, type DeviceCardAction, type DeviceCardBadge, type DeviceCardProps, DeviceGrid, type DeviceGridProps, Dialog, DialogContent, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Dropdown, DropdownContent, DropdownItem, DropdownTrigger, EmptyState, type EmptyStateProps, FilterBar, type FilterBarProps, type FilterDef, FloatingPanel, type FloatingPanelProps, FormField, type FormFieldProps, IconButton, type IconButtonProps, ImageSelector, type ImageSelectorProps, type InferenceAgentOption, type InferenceBackendOption, InferenceConfigSelector, type InferenceConfigSelectorProps, type InferenceModelOption, Input, type InputProps, KeyValueList, type KeyValueListProps, Label, type LabelProps, LoginForm, type LoginFormProps, MobileDrawer, type MobileDrawerProps, type MountAddonPageOptions, PageHeader, type PageHeaderProps, PipelineBuilder, type PipelineBuilderProps, type PipelineRuntimeOption, PipelineRuntimeSelector, PipelineStep, type PipelineStepDisplayConfig, type PipelineStepProps, Popover, PopoverContent, PopoverTrigger, ProviderBadge, type ProviderBadgeProps, type ProviderType, type ReferenceImage, ScrollArea, type ScrollAreaProps, Select, type SelectOption, type SelectProps, SemanticBadge, type SemanticBadgeProps, type SemanticBadgeVariant, Separator, type SeparatorProps, Sidebar, SidebarItem, type SidebarItemProps, type SidebarProps, type SidebarSection, Skeleton, type SkeletonProps, StatCard, type StatCardProps, StatusBadge, type StatusBadgeProps, type StatusType, StepTimings, type StepTimingsProps, Switch, type SwitchProps, Tabs, TabsContent, TabsList, TabsTrigger, Tooltip, TooltipContent, TooltipTrigger, UseThemeModeReturn, VersionBadge, type VersionBadgeProps, cn, getClassColor, mountAddonPage, providerIcons, statusIcons, useDevShell, useIsMobile };