@flytedan/flytebot-design-system 0.67.4 → 0.68.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/dist/index.d.cts CHANGED
@@ -1249,6 +1249,15 @@ type DataTableColumn = DataTableColumnLabel & {
1249
1249
  phone: DataTablePhoneRole;
1250
1250
  render?: (row: any) => React.ReactNode;
1251
1251
  };
1252
+ /** One row's own action: an icon button that acts on that row (a download, say) and never opens it. */
1253
+ interface DataTableRowAction {
1254
+ /** Phosphor icon name, as IconButton takes it. */
1255
+ icon: string;
1256
+ /** The button's accessible name and tooltip, e.g. "Download original file". */
1257
+ label: string;
1258
+ onClick: () => void;
1259
+ disabled?: boolean;
1260
+ }
1252
1261
  interface DataTableProps {
1253
1262
  columns: DataTableColumn[];
1254
1263
  rows: any[];
@@ -1258,6 +1267,11 @@ interface DataTableProps {
1258
1267
  /** Per-row title (native tooltip), e.g. "Click to add to / remove from filter". */
1259
1268
  rowTitle?: (row: any) => string;
1260
1269
  onRowClick?: (row: any) => void;
1270
+ /** A control of each row's own. In the table it is the last cell of the row (under a visually hidden
1271
+ * "Actions" header); in a phone card it is a button beside the card, not inside the card's own button.
1272
+ * It is reachable by Tab, named by its label, and never triggers `onRowClick`. Return null for a row with
1273
+ * no action. */
1274
+ rowAction?: (row: any) => DataTableRowAction | null;
1261
1275
  rowKey?: string;
1262
1276
  /** First load: nothing on screen yet, so skeleton rows are drawn. */
1263
1277
  loading?: boolean;
@@ -1272,7 +1286,7 @@ interface DataTableProps {
1272
1286
  onSort?: (key: string) => void;
1273
1287
  className?: string;
1274
1288
  }
1275
- declare function DataTable({ columns, rows, compact, selectedIds, rowTitle, onRowClick, rowKey, loading, refreshing, skeletonRows, sort, onSort, className, ...rest }: DataTableProps): React.JSX.Element;
1289
+ declare function DataTable({ columns, rows, compact, selectedIds, rowTitle, onRowClick, rowAction, rowKey, loading, refreshing, skeletonRows, sort, onSort, className, ...rest }: DataTableProps): React.JSX.Element;
1276
1290
 
1277
1291
  interface FilterFieldOption {
1278
1292
  value: string;
@@ -5410,4 +5424,4 @@ declare function CornerStackPortal({ slot, children }: {
5410
5424
  children?: React.ReactNode;
5411
5425
  }): React.ReactPortal | null;
5412
5426
 
5413
- export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, Calendar, type CalendarProps, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTableColumnLabel, type DataTablePhoneRole, type DataTableProps, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldFixed, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueryPaging, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isImage, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useFeatureStatus, useLayerZIndex, usePopoverPosition, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, writeQueryToUrl };
5427
+ export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, Calendar, type CalendarProps, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTableColumnLabel, type DataTablePhoneRole, type DataTableProps, type DataTableRowAction, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldFixed, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueryPaging, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isImage, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useFeatureStatus, useLayerZIndex, usePopoverPosition, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, writeQueryToUrl };
package/dist/index.d.ts CHANGED
@@ -1249,6 +1249,15 @@ type DataTableColumn = DataTableColumnLabel & {
1249
1249
  phone: DataTablePhoneRole;
1250
1250
  render?: (row: any) => React.ReactNode;
1251
1251
  };
1252
+ /** One row's own action: an icon button that acts on that row (a download, say) and never opens it. */
1253
+ interface DataTableRowAction {
1254
+ /** Phosphor icon name, as IconButton takes it. */
1255
+ icon: string;
1256
+ /** The button's accessible name and tooltip, e.g. "Download original file". */
1257
+ label: string;
1258
+ onClick: () => void;
1259
+ disabled?: boolean;
1260
+ }
1252
1261
  interface DataTableProps {
1253
1262
  columns: DataTableColumn[];
1254
1263
  rows: any[];
@@ -1258,6 +1267,11 @@ interface DataTableProps {
1258
1267
  /** Per-row title (native tooltip), e.g. "Click to add to / remove from filter". */
1259
1268
  rowTitle?: (row: any) => string;
1260
1269
  onRowClick?: (row: any) => void;
1270
+ /** A control of each row's own. In the table it is the last cell of the row (under a visually hidden
1271
+ * "Actions" header); in a phone card it is a button beside the card, not inside the card's own button.
1272
+ * It is reachable by Tab, named by its label, and never triggers `onRowClick`. Return null for a row with
1273
+ * no action. */
1274
+ rowAction?: (row: any) => DataTableRowAction | null;
1261
1275
  rowKey?: string;
1262
1276
  /** First load: nothing on screen yet, so skeleton rows are drawn. */
1263
1277
  loading?: boolean;
@@ -1272,7 +1286,7 @@ interface DataTableProps {
1272
1286
  onSort?: (key: string) => void;
1273
1287
  className?: string;
1274
1288
  }
1275
- declare function DataTable({ columns, rows, compact, selectedIds, rowTitle, onRowClick, rowKey, loading, refreshing, skeletonRows, sort, onSort, className, ...rest }: DataTableProps): React.JSX.Element;
1289
+ declare function DataTable({ columns, rows, compact, selectedIds, rowTitle, onRowClick, rowAction, rowKey, loading, refreshing, skeletonRows, sort, onSort, className, ...rest }: DataTableProps): React.JSX.Element;
1276
1290
 
1277
1291
  interface FilterFieldOption {
1278
1292
  value: string;
@@ -5410,4 +5424,4 @@ declare function CornerStackPortal({ slot, children }: {
5410
5424
  children?: React.ReactNode;
5411
5425
  }): React.ReactPortal | null;
5412
5426
 
5413
- export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, Calendar, type CalendarProps, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTableColumnLabel, type DataTablePhoneRole, type DataTableProps, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldFixed, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueryPaging, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isImage, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useFeatureStatus, useLayerZIndex, usePopoverPosition, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, writeQueryToUrl };
5427
+ export { AccountMenu, type AccountMenuLink, type AccountMenuProps, AgentChatPanel, type AgentChatPanelProps, AnchoredPopover, type AnchoredPopoverProps, AnimNum, type AnimNumProps, ApiSpecBrowser, type ApiSpecBrowserProps, type AppEntry, AppShell, type AppShellProps, AppSwitcher, type AppSwitcherProps, AppearanceMenu, type AppearanceMenuProps, type AppearancePrefs, AppearanceProvider, type AppearanceProviderProps, type AppearanceStore, type AppearanceStoreOptions, type Attachment, Avatar, type AvatarProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, Banner, type BannerProps, type BannerTone, BarList, type BarListProps, type BarListRow, BudgetReallocator, type BudgetReallocatorProps, Button, type ButtonProps, CHANNELS, CHANNEL_WEIGHTS, CHAT_UNAVAILABLE, COPIED_FEEDBACK_MS, CORNER_STACK_INSET_PROPERTY, Calendar, type CalendarProps, Card, CardGrid, type CardGridProps, type CardProps, CardRow, type CardRowProps, ChannelContribution, type ChannelContributionChannel, type ChannelContributionProps, ChannelMeta, type ChannelMetaRecord, ChannelTag, type ChannelTagProps, ChannelWeightOf, type ChatAdapter, ChatComposer, type ChatComposerProps, type ChatEngine, type ChatEngineOptions, ChatKit, type ChatMessage, type ChatRenderContext, ChatSessionBar, type ChatSessionBarProps, ChatTranscript, type ChatTranscriptProps, ChatTurn, type ChatTurnProps, Checkbox, type CheckboxProps, type Citation, Citations, type CitationsProps, Clamp, type ClampProps, ClockFace, type ClockFaceProps, CodeBlock, type CodeBlockProps, CodeEditor, type CodeEditorDiagnostic, type CodeEditorProps, Collapsible, type CollapsibleProps, ComingSoon, type ComingSoonProps, type ContextUsage, CornerStackPortal, type CornerStackSlot, type CreateVersionStoreOptions, CsiBadge, type CsiBadgeProps, CsiHero, type CsiHeroProps, CsiMeter, type CsiMeterProps, DEFAULT_PREFS, DEFAULT_STORAGE_KEY, DEFAULT_TOAST_DURATION_MS, DataTable, type DataTableColumn, type DataTableColumnLabel, type DataTablePhoneRole, type DataTableProps, type DataTableRowAction, DatePicker, type DatePickerProps, type DemoSessionControls, DemoSessionProvider, type DeviceSession, DiffBlock, type DiffBlockProps, DonutChart, type DonutChartProps, type DonutSegment, Drawer, type DrawerProps, Dropzone, DropzoneKit, type DropzoneProps, ENTITY_ROW_METRIC_WIDTH, type EditorTrigger, EmptyState, type EmptyStateProps, type EndpointSpec, EntityRow, type EntityRowAction, type EntityRowContent, type EntityRowMetric, EntityRowMetrics, type EntityRowMetricsProps, type EntityRowProps, FILE_VIEWER_CSV_ROW_LIMIT, FILE_VIEWER_TEXT_LIMIT, type Fact, FactList, type FactListProps, FeatureGate, type FeatureGateProps, type FeatureStatus, FileBrowser, type FileBrowserFile, type FileBrowserFolder, type FileBrowserPermissions, type FileBrowserProps, FileChip, type FileChipProps, FileGrid, type FileGridProps, FileKit, FilePickButton, type FilePickButtonProps, type FileRejection, FileStrip, type FileStripProps, FileTile, type FileTileProps, type FileUploadHandler, FileViewer, type FileViewerProps, FilterBar, type FilterBarProps, type FilterDateValue, type FilterField, type FilterFieldDate, type FilterFieldFixed, type FilterFieldMultiSelect, type FilterFieldOption, type FilterFieldRange, type FilterFieldSelect, type FilterFieldText, type FilterMultiSelectValue, type FilterOperator, type FilterRangeValue, type FilterResolveMatch, type FilterResolveResult, type FilterValidation, type FilterValue, Flag$1 as Flag, type FlagExplanation, type FlagProps, FlytedeskBrand, type FlytedeskBrandProps, FlytedeskMark, type FlytedeskMarkProps, FormatEta, FunnelChart, type FunnelChartProps, type FunnelStep, Gate, GatePending, type GatePendingProps, type GateProps, IMPORTANCE_LEVELS, IconButton, type IconButtonProps, type ImportanceLevel, type ImportanceLevelId, ImportanceTag, type ImportanceTagProps, type ImportanceTokens, Input, type InputProps, type Job, type JobAction, type JobCardStatus, type JobStatus, JobTray, type JobTrayProps, Json, KeyHint, type KeyHintProps, type KeysetEnvelope, type KeysetServerTable, LAYER_STEP, type ListEnvelope, LoadingRegion, type LoadingRegionProps, Markdown, MarkdownEditor, type MarkdownEditorHandle, type MarkdownEditorProps, MarkdownInline, type MarkdownProps, type MentionSource, Menu, MenuButton, type MenuButtonProps, type MenuItem, type MenuProps, MessageBody, type MessageBodyProps, type MessageGroup, Meter, type MeterProps, type MeterSegment, type MeterSegmentInput, MixGap, type MixGapProps, type MixGapRow, MockJobKit, type MockJobStatus, Modal, type ModalProps, ModeSwitch, type ModeSwitchProps, type Model, ModelControls, type ModelControlsProps, NumberInput, type NumberInputProps, OVERLAY_CEILING, POPOVER_BODY_MIN, type Packet, PacketCard, type PacketCardProps, type PacketSchema, type Pager, Pagination, type PaginationProps, PermissionDenied, type PermissionDeniedProps, type PermissionGroup, PermissionHint, type PermissionItem, type Phase, type PhaseStatus, PhasedProgress, type PhasedProgressProps, type Placement, type PollOptions, Popover, type PopoverProps, type PreferenceCriterion, PreferenceMeter, type PreferenceMeterProps, type ProfileFieldDef, type ProfileFieldType, type ProfileNotificationDef, ProfilePage, type ProfilePageProps, ProgressBar, type ProgressBarProps, QueryKit, type QueryPaging, type QueryUrlAdapter, type QueryUrlOptions, type QueuedTurn, QuotaRow, type QuotaRowProps, ROOT_STEP, Radio, type RadioProps, RangeSlider, type RangeSliderProps, RelativeTime, type RelativeTimeProps, type RoadmapItem, type RoadmapResult, RoadmapTimeline, type RoadmapTimelineProps, type Role, RunActions, type RunActionsProps, type RunConfig, RuntimeKit, type RuntimeSummary, SaturationDistribution, type SaturationDistributionCampus, type SaturationDistributionProps, ScoreMeter, type ScoreMeterProps, ScreenHead, type ScreenHeadProps, SearchField, type SearchFieldProps, SegmentedControl, type SegmentedControlProps, SegmentedMeter, type SegmentedMeterProps, Select, type SelectOption, type SelectProps, type SendMessageResult, type ServerTable, type ServerTableBase, type Session, type SessionContextValue, type Flag as SessionFlag, SessionKit, SessionProvider, type SessionProviderProps, type SessionRole, SessionScreen, type SessionScreenKind, type SessionScreenProps, type SessionStats, type SessionUser, SidebarNav, type SidebarNavItem, type SidebarNavProps, Skeleton, type SkeletonProps, SkeletonText, type SkeletonTextProps, type SlashCommand, Slider, type SliderProps, type SortDirection, type SortEntry, SortMenu, type SortMenuField, type SortMenuProps, type SpecModule, Spinner, type SpinnerProps, type StackedLayer, type StackedLayerOptions, StackedLayerProvider, StatGrid, type StatGridProps, StatTile, type StatTileProps, type Step, StepList, type StepListProps, type StreamHandlers, type Suggestion, SurroundSound, type SurroundSoundProps, Switch, type SwitchProps, type TabItem, type TableQuery, Tabs, type TabsProps, Tag, type TagProps, TestModeBar, type TestModeBarProps, type TextScale, Textarea, type TextareaProps, type ThemeMode, ThinkingBlock, type ThinkingBlockProps, type ThreadSummary, TimePicker, type TimePickerProps, Toast, type ToastApi, type ToastOptions, type ToastProps, ToastProvider, Tooltip, type TooltipApi, type TooltipBinding, type TooltipPlacement, type TooltipProps, Topbar, type TopbarProps, TranscriptKit, TransferList, type TransferListProps, type TransferListSide, type TransferListSideProps, TrendChart, type TrendChartProps, type TrendSeries, USChoropleth, type USChoroplethProps, type StateFigure as USChoroplethState, type ChoroplethValue as USChoroplethValue, US_STATE_CODES, type UsageLimit, UseFeatureStatus, type UseKeysetTableOptions, type UseResponsiveRailOptions, type UseResponsiveRailResult, UseRuntimeMode, type UseServerTableOptions, type UseTooltipOptions, type User, VIRTUAL_LIST_BUFFER_ROWS, VIRTUAL_LIST_ROW_GAP, type VersionRecord, type VersionStore, VirtualList, type VirtualListProps, type VirtualLoadedBand, type VirtualWindow, type VoiceHandler, __resetLayerStackForTests, acceptMatches, anyOfFilter, applyAppearance, applyPrefs, channelWeightOf, computeNeedMore, computeVirtualWindow, copyToClipboard, createLocalStorageAppearanceStore, createVersionStore, eqFilter, extensionOf, extractClipboardFiles, filterFiles, formatAbsolute, formatBytes, formatClock, formatDocumentTitle, formatDuration, formatEta, formatRelative, formatShare, groupMessages, hasModifier, historyUrlAdapter, iconForMime, importanceLevel, importanceTokens, installFlytedeskFavicon, isImage, isSystemMessage, isUsStateCode, isWithinLayerTree, jobBucket, languageLabel, loadPrefs, markdownToText, meterFormats, modifierLabel, parseDelimited, pastedTextName, pluralizeUnit, preferenceScore, preferenceSegments, rangeFilter, readQueryFromUrl, resolveTheme, revokeAttachment, savePrefs, toAttachment, tokenize, useAppearancePrefs, useAppearanceStore, useChatEngine, useCopyToClipboard, useCornerStackSlot, useDocumentTitle, useFeatureStatus, useLayerZIndex, usePopoverPosition, useResponsiveRail, useRuntimeMode, useServerTable, useSessionContext, useStackedLayer, useStagedFiles, useToast, useTooltip, validateFilterValue, visibleMessages, watchAppearance, writeQueryToUrl };
package/dist/index.js CHANGED
@@ -3047,6 +3047,24 @@ function CsiHero({ band = "weak", crp, label, className = "" }) {
3047
3047
  // src/components/data/DataTable.tsx
3048
3048
  import { Fragment as Fragment7, jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
3049
3049
  var STACK_MAX_WIDTH = 640;
3050
+ function RowActionButton({ action, size }) {
3051
+ return /* @__PURE__ */ jsx44(
3052
+ IconButton,
3053
+ {
3054
+ icon: action.icon,
3055
+ label: action.label,
3056
+ size,
3057
+ disabled: action.disabled,
3058
+ onClick: (e) => {
3059
+ e.stopPropagation();
3060
+ action.onClick();
3061
+ }
3062
+ }
3063
+ );
3064
+ }
3065
+ function RowActionCell({ action }) {
3066
+ return /* @__PURE__ */ jsx44("td", { className: "fd-table-action", children: action ? /* @__PURE__ */ jsx44(RowActionButton, { action, size: "sm" }) : null });
3067
+ }
3050
3068
  var cellOf = (c, row) => c.render ? c.render(row) : row[c.key];
3051
3069
  function rowInteraction(row, onRowClick) {
3052
3070
  if (!onRowClick) return {};
@@ -3074,6 +3092,7 @@ function DataTable({
3074
3092
  selectedIds,
3075
3093
  rowTitle,
3076
3094
  onRowClick,
3095
+ rowAction,
3077
3096
  rowKey = "id",
3078
3097
  loading = false,
3079
3098
  refreshing = false,
@@ -3110,27 +3129,37 @@ function DataTable({
3110
3129
  onSort,
3111
3130
  rowTitle,
3112
3131
  onRowClick,
3132
+ rowAction,
3113
3133
  isSelected
3114
3134
  }
3115
3135
  ) : /* @__PURE__ */ jsxs35("table", { className: ["fd-table", compact3 ? "fd-table-compact" : ""].filter(Boolean).join(" "), children: [
3116
- /* @__PURE__ */ jsx44("thead", { children: /* @__PURE__ */ jsx44("tr", { children: columns.map((c) => /* @__PURE__ */ jsx44(
3117
- "th",
3118
- {
3119
- scope: "col",
3120
- style: { width: c.width },
3121
- className: [c.numeric ? "is-num" : "", sort && sort.key === c.key ? "is-sorted" : ""].filter(Boolean).join(" "),
3122
- "aria-sort": sort && sort.key === c.key ? sort.dir === "asc" ? "ascending" : "descending" : void 0,
3123
- children: c.sortable && onSort ? /* @__PURE__ */ jsx44(SortButton, { column: c, sort, onSort }) : c.label
3124
- },
3125
- c.key
3126
- )) }) }),
3127
- /* @__PURE__ */ jsx44("tbody", { className: stale ? "fd-stale" : void 0, children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsx44("tr", { children: columns.map((c) => /* @__PURE__ */ jsx44("td", { className: c.numeric ? "is-num" : "", children: /* @__PURE__ */ jsx44("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)) }, i)) : rows.map((r) => /* @__PURE__ */ jsx44(
3136
+ /* @__PURE__ */ jsx44("thead", { children: /* @__PURE__ */ jsxs35("tr", { children: [
3137
+ columns.map((c) => /* @__PURE__ */ jsx44(
3138
+ "th",
3139
+ {
3140
+ scope: "col",
3141
+ style: { width: c.width },
3142
+ className: [c.numeric ? "is-num" : "", sort && sort.key === c.key ? "is-sorted" : ""].filter(Boolean).join(" "),
3143
+ "aria-sort": sort && sort.key === c.key ? sort.dir === "asc" ? "ascending" : "descending" : void 0,
3144
+ children: c.sortable && onSort ? /* @__PURE__ */ jsx44(SortButton, { column: c, sort, onSort }) : c.label
3145
+ },
3146
+ c.key
3147
+ )),
3148
+ rowAction ? /* @__PURE__ */ jsx44("th", { scope: "col", className: "fd-table-action-head", children: /* @__PURE__ */ jsx44("span", { className: "fd-sr-only", children: "Actions" }) }) : null
3149
+ ] }) }),
3150
+ /* @__PURE__ */ jsx44("tbody", { className: stale ? "fd-stale" : void 0, children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsxs35("tr", { children: [
3151
+ columns.map((c) => /* @__PURE__ */ jsx44("td", { className: c.numeric ? "is-num" : "", children: /* @__PURE__ */ jsx44("span", { className: "fd-skel fd-skel-text", style: { display: "inline-block", height: 13, width: c.numeric ? 52 : i % 3 === 0 ? "72%" : "88%" } }) }, c.key)),
3152
+ rowAction ? /* @__PURE__ */ jsx44("td", { className: "fd-table-action" }) : null
3153
+ ] }, i)) : rows.map((r) => /* @__PURE__ */ jsxs35(
3128
3154
  "tr",
3129
3155
  {
3130
3156
  "aria-selected": isSelected(r) ? "true" : void 0,
3131
3157
  title: rowTitle ? rowTitle(r) : void 0,
3132
3158
  ...rowInteraction(r, onRowClick),
3133
- children: columns.map((c) => /* @__PURE__ */ jsx44("td", { className: c.numeric ? "is-num" : "", children: cellOf(c, r) }, c.key))
3159
+ children: [
3160
+ columns.map((c) => /* @__PURE__ */ jsx44("td", { className: c.numeric ? "is-num" : "", children: cellOf(c, r) }, c.key)),
3161
+ rowAction ? /* @__PURE__ */ jsx44(RowActionCell, { action: rowAction(r) }) : null
3162
+ ]
3134
3163
  },
3135
3164
  r[rowKey]
3136
3165
  )) })
@@ -3143,7 +3172,7 @@ function DataTable({
3143
3172
  ] }) }) : null
3144
3173
  ] });
3145
3174
  }
3146
- function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort, onSort, rowTitle, onRowClick, isSelected }) {
3175
+ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort, onSort, rowTitle, onRowClick, rowAction, isSelected }) {
3147
3176
  const sortable = onSort ? columns.filter((c) => c.sortable) : [];
3148
3177
  const primary = columns.filter((c) => c.phone === "primary");
3149
3178
  const secondary = columns.filter((c) => c.phone === "secondary");
@@ -3162,31 +3191,34 @@ function StackedRows({ columns, rows, rowKey, loading, stale, skeletonRows, sort
3162
3191
  c.key
3163
3192
  );
3164
3193
  }) }) : null,
3165
- /* @__PURE__ */ jsx44("div", { className: stale ? "fd-dt-cards fd-stale" : "fd-dt-cards", children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsxs35("div", { className: "fd-dt-card", children: [
3194
+ /* @__PURE__ */ jsx44("div", { className: stale ? "fd-dt-cards fd-stale" : "fd-dt-cards", children: loading ? Array.from({ length: skeletonRows }).map((_, i) => /* @__PURE__ */ jsx44("div", { className: "fd-dt-item", children: /* @__PURE__ */ jsxs35("div", { className: "fd-dt-card", children: [
3166
3195
  /* @__PURE__ */ jsx44("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: 14, width: i % 3 === 0 ? "55%" : "70%" } }),
3167
3196
  secondary.length ? /* @__PURE__ */ jsx44("span", { className: "fd-skel fd-skel-text", style: { display: "block", height: 12, width: "40%" } }) : null
3168
- ] }, i)) : rows.map((r) => {
3197
+ ] }) }, i)) : rows.map((r) => {
3169
3198
  const selected = isSelected(r);
3199
+ const action = rowAction ? rowAction(r) : null;
3170
3200
  const semantics = onRowClick ? { role: "button", "aria-pressed": selected } : { "aria-current": selected ? "true" : void 0 };
3171
- return /* @__PURE__ */ jsxs35(
3172
- "div",
3173
- {
3174
- className: "fd-dt-card",
3175
- title: rowTitle ? rowTitle(r) : void 0,
3176
- "data-selected": selected ? "true" : void 0,
3177
- ...semantics,
3178
- ...rowInteraction(r, onRowClick),
3179
- children: [
3180
- /* @__PURE__ */ jsx44("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ jsx44("span", { className: c.numeric ? "is-num" : void 0, children: cellOf(c, r) }, c.key)) }),
3181
- secondary.length ? /* @__PURE__ */ jsx44("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ jsxs35("span", { className: c.numeric ? "is-num" : void 0, children: [
3182
- /* @__PURE__ */ jsx44("span", { className: "fd-dt-card-label", children: c.label }),
3183
- " ",
3184
- cellOf(c, r)
3185
- ] }, c.key)) }) : null
3186
- ]
3187
- },
3188
- r[rowKey]
3189
- );
3201
+ return /* @__PURE__ */ jsxs35("div", { className: "fd-dt-item", children: [
3202
+ /* @__PURE__ */ jsxs35(
3203
+ "div",
3204
+ {
3205
+ className: "fd-dt-card",
3206
+ title: rowTitle ? rowTitle(r) : void 0,
3207
+ "data-selected": selected ? "true" : void 0,
3208
+ ...semantics,
3209
+ ...rowInteraction(r, onRowClick),
3210
+ children: [
3211
+ /* @__PURE__ */ jsx44("div", { className: "fd-dt-card-title", children: primary.map((c) => /* @__PURE__ */ jsx44("span", { className: c.numeric ? "is-num" : void 0, children: cellOf(c, r) }, c.key)) }),
3212
+ secondary.length ? /* @__PURE__ */ jsx44("div", { className: "fd-dt-card-meta", children: secondary.map((c) => /* @__PURE__ */ jsxs35("span", { className: c.numeric ? "is-num" : void 0, children: [
3213
+ /* @__PURE__ */ jsx44("span", { className: "fd-dt-card-label", children: c.label }),
3214
+ " ",
3215
+ cellOf(c, r)
3216
+ ] }, c.key)) }) : null
3217
+ ]
3218
+ }
3219
+ ),
3220
+ action ? /* @__PURE__ */ jsx44("div", { className: "fd-dt-action", children: /* @__PURE__ */ jsx44(RowActionButton, { action, size: "md" }) }) : null
3221
+ ] }, r[rowKey]);
3190
3222
  }) })
3191
3223
  ] });
3192
3224
  }