@handled-ai/design-system 0.17.1 → 0.18.1
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/charts/empty-chart-state.d.ts +11 -0
- package/dist/charts/empty-chart-state.js +70 -0
- package/dist/charts/empty-chart-state.js.map +1 -0
- package/dist/charts/index.d.ts +1 -0
- package/dist/charts/index.js +1 -0
- package/dist/charts/index.js.map +1 -1
- package/dist/charts/pipeline-overview.d.ts +2 -1
- package/dist/charts/pipeline-overview.js +29 -1
- package/dist/charts/pipeline-overview.js.map +1 -1
- package/dist/components/actor-byline.d.ts +3 -0
- package/dist/components/actor-byline.js +5 -0
- package/dist/components/actor-byline.js.map +1 -0
- package/dist/components/days-open-cell.d.ts +16 -0
- package/dist/components/days-open-cell.js +73 -0
- package/dist/components/days-open-cell.js.map +1 -0
- package/dist/components/detail-drawer.d.ts +16 -0
- package/dist/components/detail-drawer.js +45 -0
- package/dist/components/detail-drawer.js.map +1 -0
- package/dist/components/feedback-primitives.d.ts +66 -0
- package/dist/components/feedback-primitives.js +295 -0
- package/dist/components/feedback-primitives.js.map +1 -0
- package/dist/components/insights-filter-bar.d.ts +2 -1
- package/dist/components/insights-filter-bar.js +13 -5
- package/dist/components/insights-filter-bar.js.map +1 -1
- package/dist/components/linked-entity-cell.d.ts +14 -0
- package/dist/components/linked-entity-cell.js +96 -0
- package/dist/components/linked-entity-cell.js.map +1 -0
- package/dist/components/metric-card.d.ts +14 -1
- package/dist/components/metric-card.js +86 -0
- package/dist/components/metric-card.js.map +1 -1
- package/dist/components/performance-metrics-table.d.ts +2 -1
- package/dist/components/performance-metrics-table.js +78 -46
- package/dist/components/performance-metrics-table.js.map +1 -1
- package/dist/components/pill.d.ts +26 -0
- package/dist/components/pill.js +77 -0
- package/dist/components/pill.js.map +1 -0
- package/dist/components/quick-segment.d.ts +13 -0
- package/dist/components/quick-segment.js +96 -0
- package/dist/components/quick-segment.js.map +1 -0
- package/dist/components/score-why-chips.d.ts +8 -17
- package/dist/components/score-why-chips.js +266 -180
- package/dist/components/score-why-chips.js.map +1 -1
- package/dist/components/signal-priority-popover.d.ts +17 -0
- package/dist/components/signal-priority-popover.js +247 -0
- package/dist/components/signal-priority-popover.js.map +1 -0
- package/dist/components/user-display.d.ts +22 -0
- package/dist/components/user-display.js +138 -0
- package/dist/components/user-display.js.map +1 -0
- package/dist/components/user-pill.d.ts +3 -0
- package/dist/components/user-pill.js +5 -0
- package/dist/components/user-pill.js.map +1 -0
- package/dist/index.d.ts +13 -4
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/user-display.d.ts +31 -0
- package/dist/lib/user-display.js +57 -0
- package/dist/lib/user-display.js.map +1 -0
- package/dist/prototype/index.d.ts +2 -1
- package/dist/prototype/prototype-accounts-view.d.ts +2 -1
- package/dist/prototype/prototype-admin-view.d.ts +2 -1
- package/dist/prototype/prototype-config.d.ts +15 -332
- package/dist/prototype/prototype-inbox-view.d.ts +2 -1
- package/dist/prototype/prototype-inbox-view.js +11 -12
- package/dist/prototype/prototype-inbox-view.js.map +1 -1
- package/dist/prototype/prototype-insights-view.d.ts +2 -1
- package/dist/prototype/prototype-shell.d.ts +2 -1
- package/dist/signal-priority-popover-DQ_VuHac.d.ts +390 -0
- package/package.json +1 -1
- package/src/charts/__tests__/insights-charts.test.tsx +62 -0
- package/src/charts/empty-chart-state.tsx +44 -0
- package/src/charts/index.ts +1 -0
- package/src/charts/pipeline-overview.tsx +38 -1
- package/src/components/__tests__/contextual-quick-action-launcher.test.tsx +99 -188
- package/src/components/__tests__/feedback-primitives.test.tsx +509 -0
- package/src/components/__tests__/insights-primitives.test.tsx +117 -0
- package/src/components/__tests__/performance-metrics-table.test.tsx +54 -0
- package/src/components/__tests__/score-why-chips.test.tsx +540 -0
- package/src/components/__tests__/signal-priority-popover.test.tsx +312 -0
- package/src/components/__tests__/user-display.test.tsx +75 -0
- package/src/components/actor-byline.tsx +1 -0
- package/src/components/days-open-cell.tsx +50 -0
- package/src/components/detail-drawer.tsx +60 -0
- package/src/components/feedback-primitives.tsx +424 -0
- package/src/components/insights-filter-bar.tsx +13 -4
- package/src/components/linked-entity-cell.tsx +74 -0
- package/src/components/metric-card.tsx +82 -0
- package/src/components/performance-metrics-table.tsx +99 -63
- package/src/components/pill.tsx +67 -0
- package/src/components/quick-segment.tsx +68 -0
- package/src/components/score-why-chips.tsx +413 -203
- package/src/components/signal-priority-popover.tsx +359 -0
- package/src/components/user-display.tsx +96 -0
- package/src/components/user-pill.tsx +1 -0
- package/src/index.ts +11 -0
- package/src/lib/__tests__/user-display.test.ts +85 -0
- package/src/lib/user-display.ts +88 -0
- package/src/prototype/__tests__/detail-view-score-why.test.tsx +33 -29
- package/src/prototype/__tests__/detail-view-title-slots.test.tsx +65 -0
- package/src/prototype/prototype-config.ts +28 -4
- package/src/prototype/prototype-inbox-view.tsx +8 -10
- package/src/prototype/__tests__/detail-view-title-subtext.test.tsx +0 -72
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { cn } from './lib/utils.js';
|
|
2
2
|
export { BRAND_GRAPHICS, BRAND_ICONS } from './lib/icons.js';
|
|
3
|
+
export { ProfileLike, displayName, getInitials, shortName } from './lib/user-display.js';
|
|
3
4
|
export { useIsMobile } from './hooks/use-mobile.js';
|
|
4
5
|
export { ActivityDetail, ActivityDetailData, ActivityDetailProps, ActivityParticipant, ActivityThreadMessage } from './components/activity-detail.js';
|
|
5
6
|
export { ActivityLog, ActivityLogItem, ActivityLogProps, ActivityRow } from './components/activity-log.js';
|
|
@@ -22,16 +23,21 @@ export { DataTableFilter, DataTableFilterCategory, DataTableFilterProps, FilterO
|
|
|
22
23
|
export { DataTableQuickViewValue, DataTableQuickViews } from './components/data-table-quick-views.js';
|
|
23
24
|
export { DataTableToolbar } from './components/data-table-toolbar.js';
|
|
24
25
|
export { Citation, DetailViewHeader, DetailViewSummary, DetailViewThread, SourceDef, SourceList, ThreadMessage } from './components/detail-view.js';
|
|
26
|
+
export { DetailDrawer, DetailDrawerProps } from './components/detail-drawer.js';
|
|
25
27
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './components/dialog.js';
|
|
26
28
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './components/dropdown-menu.js';
|
|
27
29
|
export { EmptyState, EmptyStateProps } from './components/empty-state.js';
|
|
28
30
|
export { ActivityItem, ConnectedApps, EntityActivityItem, EntityDetails, EntityMetadataField, EntityMetadataGrid, EntityPanel, EntityPanelBrandIcons, EntityPanelHeader, EntityPanelTabs, EntitySection, PanelMode, PotentialContacts, RecentActivity, SystemActivity, useEntityPanel } from './components/entity-panel.js';
|
|
31
|
+
export { FeedbackActions, FeedbackActionsProps, FeedbackChipGroup, FeedbackChipGroupProps, FeedbackChipTree, FeedbackFooter, FeedbackFooterProps, FeedbackInput, FeedbackInputProps, FeedbackSubmitData } from './components/feedback-primitives.js';
|
|
32
|
+
export { A as AccountFilterTab, a as AccountsViewConfig, b as AdminTab, c as AdminViewConfig, B as BriefStyleVariant, E as EntityPanelConfig, d as EntityPanelSection, I as InboxDetailSections, e as InboxSortOption, f as InboxViewConfig, g as InsightsCustomTab, h as InsightsViewConfig, P as PriorityFactor, i as PrototypeBrandConfig, j as PrototypeConfig, Q as QueueItem, S as SignalPriorityPopover, k as SignalPriorityPopoverProps, l as SignalScoreData, m as SignalScoreExplanationBucket, n as SignalScoreExplanationSignal, o as SignalScoreUrgencyLabel, W as WorkQueueViewConfig } from './signal-priority-popover-DQ_VuHac.js';
|
|
29
33
|
export { FilterChip, FilterChipProps } from './components/filter-chip.js';
|
|
30
34
|
export { InboxGroupHeader, InboxRow, InboxRowProps } from './components/inbox-row.js';
|
|
31
35
|
export { AssigneeFilter, InboxFilterCategory, InboxToolbar, InboxToolbarProps } from './components/inbox-toolbar.js';
|
|
32
36
|
export { InlineBanner, InlineBannerProps } from './components/inline-banner.js';
|
|
33
37
|
export { Input } from './components/input.js';
|
|
34
38
|
export { FilterDefinition, InsightsFilterBar, InsightsFilterBarProps } from './components/insights-filter-bar.js';
|
|
39
|
+
export { DaysOpenCell, DaysOpenCellProps, getDaysOpenIntent } from './components/days-open-cell.js';
|
|
40
|
+
export { LinkedEntityCell, LinkedEntityCellProps } from './components/linked-entity-cell.js';
|
|
35
41
|
export { GroupedListGroup, GroupedListView, GroupedListViewProps, ItemList } from './components/item-list.js';
|
|
36
42
|
export { ItemListDisplay, ItemListDisplayState, ItemListGrouping, ItemListViewMode } from './components/item-list-display.js';
|
|
37
43
|
export { ItemListFilter, ItemListFilterCategory } from './components/item-list-filter.js';
|
|
@@ -39,11 +45,13 @@ export { ItemListQuickView, ItemListToolbar } from './components/item-list-toolb
|
|
|
39
45
|
export { KbdHint } from './components/kbd-hint.js';
|
|
40
46
|
export { Label } from './components/label.js';
|
|
41
47
|
export { Message, MessageAvatar, MessageAvatarProps, MessageContent, MessageContentProps, MessageProps } from './components/message.js';
|
|
42
|
-
export { MetricCard, MetricCardProps, MetricDataPoint } from './components/metric-card.js';
|
|
48
|
+
export { KpiStrip, KpiStripItem, KpiStripProps, MetricCard, MetricCardProps, MetricDataPoint } from './components/metric-card.js';
|
|
43
49
|
export { PerformanceMetricsTable, PerformanceMetricsTableRow, PerformanceMetricsTableSortOption } from './components/performance-metrics-table.js';
|
|
50
|
+
export { Pill, PillProps, PillStatus, StatusPill, StatusPillProps, pillVariants } from './components/pill.js';
|
|
44
51
|
export { PreviewList, PreviewListItem, PreviewListItemProps } from './components/preview-list.js';
|
|
45
52
|
export { Progress } from './components/progress.js';
|
|
46
53
|
export { QuickActionChatArea, QuickActionSubmitPayload } from './components/quick-action-chat-area.js';
|
|
54
|
+
export { QuickSegment, QuickSegmentProps } from './components/quick-segment.js';
|
|
47
55
|
export { QuickActionModal, QuickActionPriority, QuickActionTaskDraft, QuickActionTemplate } from './components/quick-action-modal.js';
|
|
48
56
|
export { ActiveVariant, QuickActionSidebarNav, SidebarNavItem, SidebarNavSection, SidebarUserProfile, UserMenuItem } from './components/quick-action-sidebar-nav.js';
|
|
49
57
|
export { RecommendedAction, RecommendedActionsSection } from './components/recommended-actions-section.js';
|
|
@@ -52,7 +60,7 @@ export { RichTextAction, RichTextToolbar, RichTextToolbarProps } from './compone
|
|
|
52
60
|
export { ScoreAnalysisModal, ScoreAnalysisModalProps, ScoreAnalysisPanel } from './components/score-analysis-modal.js';
|
|
53
61
|
export { ScoreBreakdown, ScoreBreakdownProps, ScoreFactor } from './components/score-breakdown.js';
|
|
54
62
|
export { ScoreFeedback, useScoreFeedback } from './components/score-feedback.js';
|
|
55
|
-
export {
|
|
63
|
+
export { DEFAULT_TONE_CLASS, SIGNAL_TONE_CLASSES, ScoreWhyChips, ScoreWhyChipsProps, getSignalScoreUrgencyLabel, scoreRangeForUrgency } from './components/score-why-chips.js';
|
|
56
64
|
export { ScoreRing, ScoreRingProps, getScoreColor } from './components/score-ring.js';
|
|
57
65
|
export { ScrollArea, ScrollBar } from './components/scroll-area.js';
|
|
58
66
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from './components/select.js';
|
|
@@ -75,6 +83,7 @@ export { Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants } from './co
|
|
|
75
83
|
export { Textarea } from './components/textarea.js';
|
|
76
84
|
export { TimelineActivity, TimelineActivityProps, TimelineEvent } from './components/timeline-activity.js';
|
|
77
85
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/tooltip.js';
|
|
86
|
+
export { ActorByline, ActorBylineProps, UserPill, UserPillProps } from './components/user-display.js';
|
|
78
87
|
export { VariableAutocomplete, VariableAutocompleteProps, VariableDef, VariableGroup } from './components/variable-autocomplete.js';
|
|
79
88
|
export { ViewMode, ViewModeToggle, ViewModeToggleProps } from './components/view-mode-toggle.js';
|
|
80
89
|
export { VirtualizedDataTable, VirtualizedDataTableProps } from './components/virtualized-data-table.js';
|
|
@@ -88,7 +97,7 @@ export { VolumeAnalysisChart, VolumeAnalysisChartProps, VolumeDataKey } from './
|
|
|
88
97
|
export { MetricCardData, TopLineMetrics, TopLineMetricsProps } from './charts/top-line-metrics.js';
|
|
89
98
|
export { PipelineFilterBreakdown, PipelineOverview, PipelineOverviewProps, PipelineStage, PipelineStageMetrics, PipelineStageTiming } from './charts/pipeline-overview.js';
|
|
90
99
|
export { SankeyChart, SankeyData, SankeyDropOff, SankeyHoverCardData, SankeyLink, SankeyNode, SankeyStageMetrics } from './charts/sankey-chart.js';
|
|
91
|
-
export {
|
|
100
|
+
export { EmptyChartState, EmptyChartStateProps } from './charts/empty-chart-state.js';
|
|
92
101
|
export { PrototypeShell, PrototypeShellProps } from './prototype/prototype-shell.js';
|
|
93
102
|
export { DetailView, DetailViewProps, PrototypeInboxView, PrototypeInboxViewProps } from './prototype/prototype-inbox-view.js';
|
|
94
103
|
export { PrototypeInsightsView, PrototypeInsightsViewProps } from './prototype/prototype-insights-view.js';
|
|
@@ -100,5 +109,5 @@ import 'react';
|
|
|
100
109
|
import 'radix-ui';
|
|
101
110
|
import 'class-variance-authority/types';
|
|
102
111
|
import 'class-variance-authority';
|
|
103
|
-
import 'recharts';
|
|
104
112
|
import 'lucide-react';
|
|
113
|
+
import 'recharts';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { cn } from "./lib/utils.js";
|
|
2
2
|
import { BRAND_ICONS, BRAND_GRAPHICS } from "./lib/icons.js";
|
|
3
|
+
import { displayName, getInitials, shortName } from "./lib/user-display.js";
|
|
3
4
|
import { useIsMobile } from "./hooks/use-mobile.js";
|
|
4
5
|
export * from "./components/activity-detail.js";
|
|
5
6
|
export * from "./components/activity-log.js";
|
|
@@ -22,16 +23,21 @@ export * from "./components/data-table-filter.js";
|
|
|
22
23
|
export * from "./components/data-table-quick-views.js";
|
|
23
24
|
export * from "./components/data-table-toolbar.js";
|
|
24
25
|
export * from "./components/detail-view.js";
|
|
26
|
+
export * from "./components/detail-drawer.js";
|
|
25
27
|
export * from "./components/dialog.js";
|
|
26
28
|
export * from "./components/dropdown-menu.js";
|
|
27
29
|
export * from "./components/empty-state.js";
|
|
28
30
|
export * from "./components/entity-panel.js";
|
|
31
|
+
import { FeedbackFooter, FeedbackChipGroup, FeedbackInput, FeedbackActions } from "./components/feedback-primitives.js";
|
|
32
|
+
import { SignalPriorityPopover } from "./components/signal-priority-popover.js";
|
|
29
33
|
export * from "./components/filter-chip.js";
|
|
30
34
|
export * from "./components/inbox-row.js";
|
|
31
35
|
export * from "./components/inbox-toolbar.js";
|
|
32
36
|
export * from "./components/inline-banner.js";
|
|
33
37
|
export * from "./components/input.js";
|
|
34
38
|
export * from "./components/insights-filter-bar.js";
|
|
39
|
+
export * from "./components/days-open-cell.js";
|
|
40
|
+
export * from "./components/linked-entity-cell.js";
|
|
35
41
|
export * from "./components/item-list.js";
|
|
36
42
|
export * from "./components/item-list-display.js";
|
|
37
43
|
export * from "./components/item-list-filter.js";
|
|
@@ -41,9 +47,11 @@ export * from "./components/label.js";
|
|
|
41
47
|
export * from "./components/message.js";
|
|
42
48
|
export * from "./components/metric-card.js";
|
|
43
49
|
export * from "./components/performance-metrics-table.js";
|
|
50
|
+
export * from "./components/pill.js";
|
|
44
51
|
export * from "./components/preview-list.js";
|
|
45
52
|
export * from "./components/progress.js";
|
|
46
53
|
export * from "./components/quick-action-chat-area.js";
|
|
54
|
+
export * from "./components/quick-segment.js";
|
|
47
55
|
import {
|
|
48
56
|
QuickActionModal
|
|
49
57
|
} from "./components/quick-action-modal.js";
|
|
@@ -77,6 +85,7 @@ export * from "./components/tabs.js";
|
|
|
77
85
|
export * from "./components/textarea.js";
|
|
78
86
|
export * from "./components/timeline-activity.js";
|
|
79
87
|
export * from "./components/tooltip.js";
|
|
88
|
+
export * from "./components/user-display.js";
|
|
80
89
|
export * from "./components/variable-autocomplete.js";
|
|
81
90
|
export * from "./components/view-mode-toggle.js";
|
|
82
91
|
export * from "./components/virtualized-data-table.js";
|
|
@@ -95,8 +104,16 @@ export {
|
|
|
95
104
|
BrandIcon,
|
|
96
105
|
CollapsibleSection,
|
|
97
106
|
DraftFeedbackInline,
|
|
107
|
+
FeedbackActions,
|
|
108
|
+
FeedbackChipGroup,
|
|
109
|
+
FeedbackFooter,
|
|
110
|
+
FeedbackInput,
|
|
98
111
|
QuickActionModal,
|
|
112
|
+
SignalPriorityPopover,
|
|
99
113
|
cn,
|
|
114
|
+
displayName,
|
|
115
|
+
getInitials,
|
|
116
|
+
shortName,
|
|
100
117
|
useIsMobile
|
|
101
118
|
};
|
|
102
119
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @handled-ai/design-system\n * UI components and utilities (shadcn-style, New York)\n */\n\n// Utilities\nexport { cn } from \"./lib/utils\"\nexport { BRAND_ICONS, BRAND_GRAPHICS } from \"./lib/icons\"\n\n// Hooks\nexport { useIsMobile } from \"./hooks/use-mobile\"\n\n// Components (light — no recharts/nivo/three transitive deps)\nexport * from \"./components/activity-detail\"\nexport * from \"./components/activity-log\"\nexport * from \"./components/agent-popover\"\nexport * from \"./components/agent-widget\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/button\"\nexport * from \"./components/card\"\nexport { CollapsibleSection, type CollapsibleSectionProps } from \"./components/collapsible-section\"\nexport * from \"./components/compliance-badge\"\nexport * from \"./components/contact-chip\"\nexport * from \"./components/contact-list\"\nexport * from \"./components/contextual-quick-action-launcher\"\nexport * from \"./components/dashboard-cards\"\nexport * from \"./components/data-table\"\nexport * from \"./components/data-table-condition-filter\"\nexport * from \"./components/data-table-display\"\nexport * from \"./components/data-table-filter\"\nexport * from \"./components/data-table-quick-views\"\nexport * from \"./components/data-table-toolbar\"\nexport * from \"./components/detail-view\"\nexport * from \"./components/dialog\"\nexport * from \"./components/dropdown-menu\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/entity-panel\"\nexport * from \"./components/filter-chip\"\nexport * from \"./components/inbox-row\"\nexport * from \"./components/inbox-toolbar\"\nexport * from \"./components/inline-banner\"\nexport * from \"./components/input\"\nexport * from \"./components/insights-filter-bar\"\nexport * from \"./components/item-list\"\nexport * from \"./components/item-list-display\"\nexport * from \"./components/item-list-filter\"\nexport * from \"./components/item-list-toolbar\"\nexport * from \"./components/kbd-hint\"\nexport * from \"./components/label\"\nexport * from \"./components/message\"\nexport * from \"./components/metric-card\"\nexport * from \"./components/performance-metrics-table\"\nexport * from \"./components/preview-list\"\nexport * from \"./components/progress\"\nexport * from \"./components/quick-action-chat-area\"\nexport {\n QuickActionModal,\n type QuickActionPriority,\n type QuickActionTaskDraft,\n type QuickActionTemplate,\n} from \"./components/quick-action-modal\"\nexport * from \"./components/quick-action-sidebar-nav\"\nexport * from \"./components/recommended-actions-section\"\nexport * from \"./components/report-card\"\nexport * from \"./components/rich-text-toolbar\"\nexport * from \"./components/score-analysis-modal\"\nexport * from \"./components/score-breakdown\"\nexport * from \"./components/score-feedback\"\nexport * from \"./components/score-why-chips\"\nexport * from \"./components/score-ring\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/sheet\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/signal-feedback-inline\"\nexport * from \"./components/simple-data-table\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/status-badge\"\nexport * from \"./components/step-timeline\"\nexport * from \"./components/sticky-action-bar\"\nexport * from \"./components/styled-bar-list\"\nexport { DraftFeedbackInline } from \"./components/draft-feedback-inline\"\nexport type { DraftFeedbackInlineProps } from \"./components/draft-feedback-inline\"\nexport { AccountContactsPopover, BrandIcon } from \"./components/account-contacts-popover\"\nexport type { AccountContactsPopoverProps } from \"./components/account-contacts-popover\"\nexport * from \"./components/suggested-actions\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline-activity\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/variable-autocomplete\"\nexport * from \"./components/view-mode-toggle\"\nexport * from \"./components/virtualized-data-table\"\nexport type { ColumnSizingState } from \"@tanstack/react-table\"\n\n// Charts (re-exported for backward compatibility with root imports)\nexport * from \"./charts/index\"\n\n// Prototype template system (re-exported for backward compatibility)\nexport * from \"./prototype/prototype-config\"\nexport * from \"./prototype/prototype-shell\"\nexport * from \"./prototype/prototype-inbox-view\"\nexport * from \"./prototype/prototype-insights-view\"\nexport * from \"./prototype/prototype-accounts-view\"\nexport * from \"./prototype/prototype-admin-view\"\nexport * from \"./prototype/prototype-work-queue-view\"\n"],"mappings":"AAMA,SAAS,UAAU;AACnB,SAAS,aAAa,sBAAsB;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @handled-ai/design-system\n * UI components and utilities (shadcn-style, New York)\n */\n\n// Utilities\nexport { cn } from \"./lib/utils\"\nexport { BRAND_ICONS, BRAND_GRAPHICS } from \"./lib/icons\"\nexport { displayName, getInitials, shortName, type ProfileLike } from \"./lib/user-display\"\n\n// Hooks\nexport { useIsMobile } from \"./hooks/use-mobile\"\n\n// Components (light — no recharts/nivo/three transitive deps)\nexport * from \"./components/activity-detail\"\nexport * from \"./components/activity-log\"\nexport * from \"./components/agent-popover\"\nexport * from \"./components/agent-widget\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/button\"\nexport * from \"./components/card\"\nexport { CollapsibleSection, type CollapsibleSectionProps } from \"./components/collapsible-section\"\nexport * from \"./components/compliance-badge\"\nexport * from \"./components/contact-chip\"\nexport * from \"./components/contact-list\"\nexport * from \"./components/contextual-quick-action-launcher\"\nexport * from \"./components/dashboard-cards\"\nexport * from \"./components/data-table\"\nexport * from \"./components/data-table-condition-filter\"\nexport * from \"./components/data-table-display\"\nexport * from \"./components/data-table-filter\"\nexport * from \"./components/data-table-quick-views\"\nexport * from \"./components/data-table-toolbar\"\nexport * from \"./components/detail-view\"\nexport * from \"./components/detail-drawer\"\nexport * from \"./components/dialog\"\nexport * from \"./components/dropdown-menu\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/entity-panel\"\nexport { FeedbackFooter, FeedbackChipGroup, FeedbackInput, FeedbackActions } from \"./components/feedback-primitives\"\nexport type { FeedbackFooterProps, FeedbackChipTree, FeedbackChipGroupProps, FeedbackInputProps, FeedbackActionsProps, FeedbackSubmitData } from \"./components/feedback-primitives\"\nexport { SignalPriorityPopover } from \"./components/signal-priority-popover\"\nexport type { SignalPriorityPopoverProps, PriorityFactor } from \"./components/signal-priority-popover\"\nexport * from \"./components/filter-chip\"\nexport * from \"./components/inbox-row\"\nexport * from \"./components/inbox-toolbar\"\nexport * from \"./components/inline-banner\"\nexport * from \"./components/input\"\nexport * from \"./components/insights-filter-bar\"\nexport * from \"./components/days-open-cell\"\nexport * from \"./components/linked-entity-cell\"\nexport * from \"./components/item-list\"\nexport * from \"./components/item-list-display\"\nexport * from \"./components/item-list-filter\"\nexport * from \"./components/item-list-toolbar\"\nexport * from \"./components/kbd-hint\"\nexport * from \"./components/label\"\nexport * from \"./components/message\"\nexport * from \"./components/metric-card\"\nexport * from \"./components/performance-metrics-table\"\nexport * from \"./components/pill\"\nexport * from \"./components/preview-list\"\nexport * from \"./components/progress\"\nexport * from \"./components/quick-action-chat-area\"\nexport * from \"./components/quick-segment\"\nexport {\n QuickActionModal,\n type QuickActionPriority,\n type QuickActionTaskDraft,\n type QuickActionTemplate,\n} from \"./components/quick-action-modal\"\nexport * from \"./components/quick-action-sidebar-nav\"\nexport * from \"./components/recommended-actions-section\"\nexport * from \"./components/report-card\"\nexport * from \"./components/rich-text-toolbar\"\nexport * from \"./components/score-analysis-modal\"\nexport * from \"./components/score-breakdown\"\nexport * from \"./components/score-feedback\"\nexport * from \"./components/score-why-chips\"\nexport * from \"./components/score-ring\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/sheet\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/signal-feedback-inline\"\nexport * from \"./components/simple-data-table\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/status-badge\"\nexport * from \"./components/step-timeline\"\nexport * from \"./components/sticky-action-bar\"\nexport * from \"./components/styled-bar-list\"\nexport { DraftFeedbackInline } from \"./components/draft-feedback-inline\"\nexport type { DraftFeedbackInlineProps } from \"./components/draft-feedback-inline\"\nexport { AccountContactsPopover, BrandIcon } from \"./components/account-contacts-popover\"\nexport type { AccountContactsPopoverProps } from \"./components/account-contacts-popover\"\nexport * from \"./components/suggested-actions\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline-activity\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/user-display\"\nexport * from \"./components/variable-autocomplete\"\nexport * from \"./components/view-mode-toggle\"\nexport * from \"./components/virtualized-data-table\"\nexport type { ColumnSizingState } from \"@tanstack/react-table\"\n\n// Charts (re-exported for backward compatibility with root imports)\nexport * from \"./charts/index\"\n\n// Prototype template system (re-exported for backward compatibility)\nexport * from \"./prototype/prototype-config\"\nexport * from \"./prototype/prototype-shell\"\nexport * from \"./prototype/prototype-inbox-view\"\nexport * from \"./prototype/prototype-insights-view\"\nexport * from \"./prototype/prototype-accounts-view\"\nexport * from \"./prototype/prototype-admin-view\"\nexport * from \"./prototype/prototype-work-queue-view\"\n"],"mappings":"AAMA,SAAS,UAAU;AACnB,SAAS,aAAa,sBAAsB;AAC5C,SAAS,aAAa,aAAa,iBAAmC;AAGtE,SAAS,mBAAmB;AAG5B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,0BAAwD;AACjE,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,gBAAgB,mBAAmB,eAAe,uBAAuB;AAElF,SAAS,6BAA6B;AAEtC,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,OAIK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,2BAA2B;AAEpC,SAAS,wBAAwB,iBAAiB;AAElD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAId,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified display name and initials utilities for user profiles.
|
|
3
|
+
*
|
|
4
|
+
* Keep this behavior aligned with handled-platform's display-name utility so
|
|
5
|
+
* user labels and avatar fallbacks render consistently across products.
|
|
6
|
+
*/
|
|
7
|
+
interface ProfileLike {
|
|
8
|
+
first_name?: string | null;
|
|
9
|
+
last_name?: string | null;
|
|
10
|
+
name?: string | null;
|
|
11
|
+
email?: string | null;
|
|
12
|
+
avatar_url?: string | null;
|
|
13
|
+
role?: string | null;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Returns the best display name for a profile.
|
|
17
|
+
* Priority: first_name + last_name > first_name > name > email local-part > Unknown user.
|
|
18
|
+
*/
|
|
19
|
+
declare function displayName(profile?: ProfileLike | null): string;
|
|
20
|
+
/**
|
|
21
|
+
* Returns up to 2-character initials for avatar display.
|
|
22
|
+
* Priority: first/last initials > split name > first two email local chars > ?.
|
|
23
|
+
*/
|
|
24
|
+
declare function getInitials(profile?: ProfileLike | null): string;
|
|
25
|
+
/**
|
|
26
|
+
* Returns "First L." format for compact display.
|
|
27
|
+
* Falls back to displayName() if last name is unavailable.
|
|
28
|
+
*/
|
|
29
|
+
declare function shortName(profile?: ProfileLike | null): string;
|
|
30
|
+
|
|
31
|
+
export { type ProfileLike, displayName, getInitials, shortName };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function clean(value) {
|
|
2
|
+
const trimmed = value == null ? void 0 : value.trim();
|
|
3
|
+
return trimmed ? trimmed : void 0;
|
|
4
|
+
}
|
|
5
|
+
function emailLocalPart(email) {
|
|
6
|
+
const normalizedEmail = clean(email);
|
|
7
|
+
return (normalizedEmail == null ? void 0 : normalizedEmail.split("@")[0]) || void 0;
|
|
8
|
+
}
|
|
9
|
+
function displayName(profile) {
|
|
10
|
+
var _a;
|
|
11
|
+
const firstName = clean(profile == null ? void 0 : profile.first_name);
|
|
12
|
+
const lastName = clean(profile == null ? void 0 : profile.last_name);
|
|
13
|
+
if (firstName && lastName) {
|
|
14
|
+
return `${firstName} ${lastName}`;
|
|
15
|
+
}
|
|
16
|
+
if (firstName) return firstName;
|
|
17
|
+
const fullName = clean(profile == null ? void 0 : profile.name);
|
|
18
|
+
if (fullName) return fullName;
|
|
19
|
+
return (_a = emailLocalPart(profile == null ? void 0 : profile.email)) != null ? _a : "Unknown user";
|
|
20
|
+
}
|
|
21
|
+
function getInitials(profile) {
|
|
22
|
+
var _a;
|
|
23
|
+
const firstName = clean(profile == null ? void 0 : profile.first_name);
|
|
24
|
+
const lastName = clean(profile == null ? void 0 : profile.last_name);
|
|
25
|
+
if (firstName && lastName) {
|
|
26
|
+
return (firstName[0] + lastName[0]).toUpperCase();
|
|
27
|
+
}
|
|
28
|
+
const fullName = (_a = clean(profile == null ? void 0 : profile.name)) != null ? _a : firstName;
|
|
29
|
+
if (fullName) {
|
|
30
|
+
const parts = fullName.split(/\s+/).filter(Boolean);
|
|
31
|
+
if (parts.length >= 2) {
|
|
32
|
+
return (parts[0][0] + parts[1][0]).toUpperCase();
|
|
33
|
+
}
|
|
34
|
+
if (parts.length === 1 && parts[0].length > 0) {
|
|
35
|
+
return parts[0].slice(0, 2).toUpperCase();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
const localPart = emailLocalPart(profile == null ? void 0 : profile.email);
|
|
39
|
+
if (localPart) {
|
|
40
|
+
return localPart.slice(0, 2).toUpperCase();
|
|
41
|
+
}
|
|
42
|
+
return "?";
|
|
43
|
+
}
|
|
44
|
+
function shortName(profile) {
|
|
45
|
+
const firstName = clean(profile == null ? void 0 : profile.first_name);
|
|
46
|
+
const lastName = clean(profile == null ? void 0 : profile.last_name);
|
|
47
|
+
if (firstName && lastName) {
|
|
48
|
+
return `${firstName} ${lastName[0]}.`;
|
|
49
|
+
}
|
|
50
|
+
return displayName(profile);
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
displayName,
|
|
54
|
+
getInitials,
|
|
55
|
+
shortName
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=user-display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/lib/user-display.ts"],"sourcesContent":["/**\n * Unified display name and initials utilities for user profiles.\n *\n * Keep this behavior aligned with handled-platform's display-name utility so\n * user labels and avatar fallbacks render consistently across products.\n */\nexport interface ProfileLike {\n first_name?: string | null\n last_name?: string | null\n name?: string | null\n email?: string | null\n avatar_url?: string | null\n role?: string | null\n}\n\nfunction clean(value: string | null | undefined): string | undefined {\n const trimmed = value?.trim()\n return trimmed ? trimmed : undefined\n}\n\nfunction emailLocalPart(email: string | null | undefined): string | undefined {\n const normalizedEmail = clean(email)\n return normalizedEmail?.split(\"@\")[0] || undefined\n}\n\n/**\n * Returns the best display name for a profile.\n * Priority: first_name + last_name > first_name > name > email local-part > Unknown user.\n */\nexport function displayName(profile?: ProfileLike | null): string {\n const firstName = clean(profile?.first_name)\n const lastName = clean(profile?.last_name)\n\n if (firstName && lastName) {\n return `${firstName} ${lastName}`\n }\n if (firstName) return firstName\n\n const fullName = clean(profile?.name)\n if (fullName) return fullName\n\n return emailLocalPart(profile?.email) ?? \"Unknown user\"\n}\n\n/**\n * Returns up to 2-character initials for avatar display.\n * Priority: first/last initials > split name > first two email local chars > ?.\n */\nexport function getInitials(profile?: ProfileLike | null): string {\n const firstName = clean(profile?.first_name)\n const lastName = clean(profile?.last_name)\n\n if (firstName && lastName) {\n return (firstName[0] + lastName[0]).toUpperCase()\n }\n\n const fullName = clean(profile?.name) ?? firstName\n if (fullName) {\n const parts = fullName.split(/\\s+/).filter(Boolean)\n if (parts.length >= 2) {\n return (parts[0][0] + parts[1][0]).toUpperCase()\n }\n if (parts.length === 1 && parts[0].length > 0) {\n return parts[0].slice(0, 2).toUpperCase()\n }\n }\n\n const localPart = emailLocalPart(profile?.email)\n if (localPart) {\n return localPart.slice(0, 2).toUpperCase()\n }\n\n return \"?\"\n}\n\n/**\n * Returns \"First L.\" format for compact display.\n * Falls back to displayName() if last name is unavailable.\n */\nexport function shortName(profile?: ProfileLike | null): string {\n const firstName = clean(profile?.first_name)\n const lastName = clean(profile?.last_name)\n\n if (firstName && lastName) {\n return `${firstName} ${lastName[0]}.`\n }\n return displayName(profile)\n}\n"],"mappings":"AAeA,SAAS,MAAM,OAAsD;AACnE,QAAM,UAAU,+BAAO;AACvB,SAAO,UAAU,UAAU;AAC7B;AAEA,SAAS,eAAe,OAAsD;AAC5E,QAAM,kBAAkB,MAAM,KAAK;AACnC,UAAO,mDAAiB,MAAM,KAAK,OAAM;AAC3C;AAMO,SAAS,YAAY,SAAsC;AA7BlE;AA8BE,QAAM,YAAY,MAAM,mCAAS,UAAU;AAC3C,QAAM,WAAW,MAAM,mCAAS,SAAS;AAEzC,MAAI,aAAa,UAAU;AACzB,WAAO,GAAG,SAAS,IAAI,QAAQ;AAAA,EACjC;AACA,MAAI,UAAW,QAAO;AAEtB,QAAM,WAAW,MAAM,mCAAS,IAAI;AACpC,MAAI,SAAU,QAAO;AAErB,UAAO,oBAAe,mCAAS,KAAK,MAA7B,YAAkC;AAC3C;AAMO,SAAS,YAAY,SAAsC;AAhDlE;AAiDE,QAAM,YAAY,MAAM,mCAAS,UAAU;AAC3C,QAAM,WAAW,MAAM,mCAAS,SAAS;AAEzC,MAAI,aAAa,UAAU;AACzB,YAAQ,UAAU,CAAC,IAAI,SAAS,CAAC,GAAG,YAAY;AAAA,EAClD;AAEA,QAAM,YAAW,WAAM,mCAAS,IAAI,MAAnB,YAAwB;AACzC,MAAI,UAAU;AACZ,UAAM,QAAQ,SAAS,MAAM,KAAK,EAAE,OAAO,OAAO;AAClD,QAAI,MAAM,UAAU,GAAG;AACrB,cAAQ,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,CAAC,EAAE,CAAC,GAAG,YAAY;AAAA,IACjD;AACA,QAAI,MAAM,WAAW,KAAK,MAAM,CAAC,EAAE,SAAS,GAAG;AAC7C,aAAO,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,EAAE,YAAY;AAAA,IAC1C;AAAA,EACF;AAEA,QAAM,YAAY,eAAe,mCAAS,KAAK;AAC/C,MAAI,WAAW;AACb,WAAO,UAAU,MAAM,GAAG,CAAC,EAAE,YAAY;AAAA,EAC3C;AAEA,SAAO;AACT;AAMO,SAAS,UAAU,SAAsC;AAC9D,QAAM,YAAY,MAAM,mCAAS,UAAU;AAC3C,QAAM,WAAW,MAAM,mCAAS,SAAS;AAEzC,MAAI,aAAa,UAAU;AACzB,WAAO,GAAG,SAAS,IAAI,SAAS,CAAC,CAAC;AAAA,EACpC;AACA,SAAO,YAAY,OAAO;AAC5B;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AccountFilterTab, AccountsViewConfig, AdminTab, AdminViewConfig, BriefStyleVariant, EntityPanelConfig, EntityPanelSection, InboxDetailSections, InboxSortOption, InboxViewConfig, InsightsCustomTab, InsightsViewConfig, PrototypeBrandConfig, PrototypeConfig, QueueItem, SignalScoreData, SignalScoreExplanationBucket, SignalScoreExplanationSignal, SignalScoreUrgencyLabel, WorkQueueViewConfig } from '
|
|
1
|
+
export { A as AccountFilterTab, a as AccountsViewConfig, b as AdminTab, c as AdminViewConfig, B as BriefStyleVariant, E as EntityPanelConfig, d as EntityPanelSection, I as InboxDetailSections, e as InboxSortOption, f as InboxViewConfig, g as InsightsCustomTab, h as InsightsViewConfig, i as PrototypeBrandConfig, j as PrototypeConfig, Q as QueueItem, l as SignalScoreData, m as SignalScoreExplanationBucket, n as SignalScoreExplanationSignal, o as SignalScoreUrgencyLabel, W as WorkQueueViewConfig } from '../signal-priority-popover-DQ_VuHac.js';
|
|
2
2
|
export { PrototypeShell, PrototypeShellProps } from './prototype-shell.js';
|
|
3
3
|
export { DetailView, DetailViewProps, PrototypeInboxView, PrototypeInboxViewProps } from './prototype-inbox-view.js';
|
|
4
4
|
export { PrototypeInsightsView, PrototypeInsightsViewProps } from './prototype-insights-view.js';
|
|
@@ -6,6 +6,7 @@ export { PrototypeAccountsView, PrototypeAccountsViewProps } from './prototype-a
|
|
|
6
6
|
export { PrototypeAdminView, PrototypeAdminViewProps } from './prototype-admin-view.js';
|
|
7
7
|
export { PrototypeWorkQueueView, PrototypeWorkQueueViewProps } from './prototype-work-queue-view.js';
|
|
8
8
|
import 'react';
|
|
9
|
+
import '../components/feedback-primitives.js';
|
|
9
10
|
import '../components/quick-action-sidebar-nav.js';
|
|
10
11
|
import '../components/quick-action-modal.js';
|
|
11
12
|
import '../components/score-breakdown.js';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AccountsViewConfig } from '
|
|
2
|
+
import { a as AccountsViewConfig } from '../signal-priority-popover-DQ_VuHac.js';
|
|
3
3
|
import { DataRow } from '../components/data-table.js';
|
|
4
|
+
import '../components/feedback-primitives.js';
|
|
4
5
|
import '../components/quick-action-sidebar-nav.js';
|
|
5
6
|
import '../components/quick-action-modal.js';
|
|
6
7
|
import '../components/score-breakdown.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { AdminViewConfig } from '
|
|
2
|
+
import { c as AdminViewConfig } from '../signal-priority-popover-DQ_VuHac.js';
|
|
3
|
+
import '../components/feedback-primitives.js';
|
|
3
4
|
import '../components/quick-action-sidebar-nav.js';
|
|
4
5
|
import '../components/quick-action-modal.js';
|
|
5
6
|
import '../components/score-breakdown.js';
|