@lindaui/blocks 0.4.1 → 0.5.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/README.md +56 -0
- package/dist/ai-cost-card-f403ypsg.js +99 -0
- package/dist/ai-performance-card-cggm09nc.js +191 -0
- package/dist/analytics/ai-cost-card.d.ts +3 -0
- package/dist/analytics/ai-cost-card.d.ts.map +1 -0
- package/dist/analytics/ai-performance-card.d.ts +3 -0
- package/dist/analytics/ai-performance-card.d.ts.map +1 -0
- package/dist/analytics/analytics-card.d.ts +3 -0
- package/dist/analytics/analytics-card.d.ts.map +1 -0
- package/dist/analytics/analytics-skeleton.d.ts +5 -0
- package/dist/analytics/analytics-skeleton.d.ts.map +1 -0
- package/dist/analytics/entity-health-card.d.ts +3 -0
- package/dist/analytics/entity-health-card.d.ts.map +1 -0
- package/dist/analytics/status-distribution-chart.d.ts +3 -0
- package/dist/analytics/status-distribution-chart.d.ts.map +1 -0
- package/dist/analytics/time-range-picker.d.ts +3 -0
- package/dist/analytics/time-range-picker.d.ts.map +1 -0
- package/dist/analytics/top-entities-table.d.ts +3 -0
- package/dist/analytics/top-entities-table.d.ts.map +1 -0
- package/dist/analytics/types.d.ts +104 -0
- package/dist/analytics/types.d.ts.map +1 -0
- package/dist/analytics-card-bcmijpt6.js +38 -0
- package/dist/analytics-skeleton-imve37du.js +164 -0
- package/dist/analytics.d.ts +11 -0
- package/dist/analytics.d.ts.map +1 -0
- package/dist/analytics.js +8 -0
- package/dist/app-shell/drawer-focus.d.ts +8 -0
- package/dist/app-shell/drawer-focus.d.ts.map +1 -0
- package/dist/app-shell/footer.d.ts +39 -0
- package/dist/app-shell/footer.d.ts.map +1 -0
- package/dist/app-shell/logout-dialog.d.ts +6 -0
- package/dist/app-shell/logout-dialog.d.ts.map +1 -0
- package/dist/app-shell/navigation.d.ts +15 -0
- package/dist/app-shell/navigation.d.ts.map +1 -0
- package/dist/app-shell/types.d.ts +55 -0
- package/dist/app-shell/types.d.ts.map +1 -0
- package/dist/app-shell.d.ts +7 -0
- package/dist/app-shell.d.ts.map +1 -0
- package/dist/app-shell.js +254 -0
- package/dist/channel-settings.d.ts +24 -0
- package/dist/channel-settings.d.ts.map +1 -0
- package/dist/channel-settings.js +60 -0
- package/dist/chat-avatar-jdmeyf2o.js +30 -0
- package/dist/chat-layout-fwx3x26g.js +25 -0
- package/dist/chat.d.ts +22 -0
- package/dist/chat.d.ts.map +1 -0
- package/dist/chat.js +66 -0
- package/dist/command-palette.d.ts +22 -0
- package/dist/command-palette.d.ts.map +1 -0
- package/dist/command-palette.js +141 -0
- package/dist/compat-chat/chat-avatar.d.ts +16 -0
- package/dist/compat-chat/chat-avatar.d.ts.map +1 -0
- package/dist/compat-chat/chat-header.d.ts +9 -0
- package/dist/compat-chat/chat-header.d.ts.map +1 -0
- package/dist/compat-chat/chat-layout.d.ts +10 -0
- package/dist/compat-chat/chat-layout.d.ts.map +1 -0
- package/dist/compat-chat/conversation-list-item.d.ts +10 -0
- package/dist/compat-chat/conversation-list-item.d.ts.map +1 -0
- package/dist/compat-chat/conversation-list.d.ts +24 -0
- package/dist/compat-chat/conversation-list.d.ts.map +1 -0
- package/dist/compat-chat/conversation-thread.d.ts +18 -0
- package/dist/compat-chat/conversation-thread.d.ts.map +1 -0
- package/dist/compat-chat/date-divider.d.ts +5 -0
- package/dist/compat-chat/date-divider.d.ts.map +1 -0
- package/dist/compat-chat/empty-chat-view.d.ts +6 -0
- package/dist/compat-chat/empty-chat-view.d.ts.map +1 -0
- package/dist/compat-chat/image-lightbox.d.ts +7 -0
- package/dist/compat-chat/image-lightbox.d.ts.map +1 -0
- package/dist/compat-chat/message-bubble.d.ts +6 -0
- package/dist/compat-chat/message-bubble.d.ts.map +1 -0
- package/dist/compat-chat/message-composer.d.ts +11 -0
- package/dist/compat-chat/message-composer.d.ts.map +1 -0
- package/dist/compat-chat/time-divider.d.ts +5 -0
- package/dist/compat-chat/time-divider.d.ts.map +1 -0
- package/dist/compat-chat/time-grouping.d.ts +5 -0
- package/dist/compat-chat/time-grouping.d.ts.map +1 -0
- package/dist/compat-chat/types.d.ts +35 -0
- package/dist/compat-chat/types.d.ts.map +1 -0
- package/dist/compat-chat/whatsapp-audio-player.d.ts +7 -0
- package/dist/compat-chat/whatsapp-audio-player.d.ts.map +1 -0
- package/dist/compat.d.ts +9 -0
- package/dist/compat.d.ts.map +1 -0
- package/dist/compat.js +4 -0
- package/dist/connected-panel-lhwy25yk.js +132 -0
- package/dist/connection-panel/connected-panel.d.ts +26 -0
- package/dist/connection-panel/connected-panel.d.ts.map +1 -0
- package/dist/connection-panel/disconnected-panel.d.ts +12 -0
- package/dist/connection-panel/disconnected-panel.d.ts.map +1 -0
- package/dist/connection-panel/instructions.d.ts +5 -0
- package/dist/connection-panel/instructions.d.ts.map +1 -0
- package/dist/connection-panel/qr-panel.d.ts +14 -0
- package/dist/connection-panel/qr-panel.d.ts.map +1 -0
- package/dist/connection-panel/use-qr-refresh.d.ts +18 -0
- package/dist/connection-panel/use-qr-refresh.d.ts.map +1 -0
- package/dist/connection-panel.d.ts +39 -0
- package/dist/connection-panel.d.ts.map +1 -0
- package/dist/connection-panel.js +328 -0
- package/dist/conversation-list-ekq2dzca.js +133 -0
- package/dist/conversation-list-item-fy6t5af2.js +55 -0
- package/dist/conversation-thread-c60431oa.js +205 -0
- package/dist/entity-card.d.ts +17 -0
- package/dist/entity-card.d.ts.map +1 -0
- package/dist/entity-card.js +69 -0
- package/dist/entity-health-card-ggnmrtrq.js +192 -0
- package/dist/entity-switcher.d.ts +33 -0
- package/dist/entity-switcher.d.ts.map +1 -0
- package/dist/entity-switcher.js +137 -0
- package/dist/filter-bar.d.ts +41 -0
- package/dist/filter-bar.d.ts.map +1 -0
- package/dist/filter-bar.js +155 -0
- package/dist/footer-f7r5e42b.js +192 -0
- package/dist/image-lightbox-ci3arb6z.js +62 -0
- package/dist/kanban/drop-utils.d.ts +18 -0
- package/dist/kanban/drop-utils.d.ts.map +1 -0
- package/dist/kanban/navigation-buttons.d.ts +9 -0
- package/dist/kanban/navigation-buttons.d.ts.map +1 -0
- package/dist/kanban/scroll-indicators.d.ts +6 -0
- package/dist/kanban/scroll-indicators.d.ts.map +1 -0
- package/dist/kanban/use-keyboard-navigation.d.ts +4 -0
- package/dist/kanban/use-keyboard-navigation.d.ts.map +1 -0
- package/dist/kanban-board.d.ts +31 -0
- package/dist/kanban-board.d.ts.map +1 -0
- package/dist/kanban-board.js +128 -0
- package/dist/kanban-column.d.ts +13 -0
- package/dist/kanban-column.d.ts.map +1 -0
- package/dist/kanban-column.js +58 -0
- package/dist/legacy-kpi-card.d.ts +16 -0
- package/dist/legacy-kpi-card.d.ts.map +1 -0
- package/dist/legacy-kpi-card.js +4 -0
- package/dist/logout-dialog-bbv59tbi.js +93 -0
- package/dist/message-bubble-odjvhroq.js +110 -0
- package/dist/message-composer-m2n6soo7.js +59 -0
- package/dist/navigation-buttons-e77mshh0.js +65 -0
- package/dist/navigation-hotcrqoq.js +115 -0
- package/dist/save-bar.d.ts +15 -0
- package/dist/save-bar.d.ts.map +1 -0
- package/dist/save-bar.js +38 -0
- package/dist/scroll-indicators-gvxapogd.js +39 -0
- package/dist/settings-layout.d.ts +20 -0
- package/dist/settings-layout.d.ts.map +1 -0
- package/dist/settings-layout.js +56 -0
- package/dist/source-selector.d.ts +18 -0
- package/dist/source-selector.d.ts.map +1 -0
- package/dist/source-selector.js +59 -0
- package/dist/status-distribution-chart-oucedzv7.js +87 -0
- package/dist/status-filters.d.ts +12 -0
- package/dist/status-filters.d.ts.map +1 -0
- package/dist/status-filters.js +31 -0
- package/dist/stepper.d.ts +15 -0
- package/dist/stepper.d.ts.map +1 -0
- package/dist/stepper.js +42 -0
- package/dist/time-range-picker-mu38hul4.js +123 -0
- package/dist/top-entities-table-o7xzpq96.js +78 -0
- package/dist/use-keyboard-navigation-he1xmriz.js +52 -0
- package/dist/whatsapp-audio-player-nooty6jb.js +277 -0
- package/llms.txt +87 -4
- package/package.json +192 -47
- package/src/analytics/ai-cost-card.tsx +31 -0
- package/src/analytics/ai-performance-card.tsx +48 -0
- package/src/analytics/analytics-card.tsx +14 -0
- package/src/analytics/analytics-skeleton.tsx +15 -0
- package/src/analytics/entity-health-card.tsx +50 -0
- package/src/analytics/status-distribution-chart.tsx +20 -0
- package/src/analytics/time-range-picker.tsx +43 -0
- package/src/analytics/top-entities-table.tsx +24 -0
- package/src/analytics/types.ts +43 -0
- package/src/analytics.ts +10 -0
- package/src/app-shell/drawer-focus.ts +42 -0
- package/src/app-shell/footer.tsx +160 -0
- package/src/app-shell/logout-dialog.tsx +68 -0
- package/src/app-shell/navigation.tsx +147 -0
- package/src/app-shell/types.ts +57 -0
- package/src/app-shell.tsx +166 -0
- package/src/area-chart.tsx +85 -0
- package/src/audio-player.tsx +74 -0
- package/src/auth-layout.tsx +132 -0
- package/src/auth-provider.tsx +29 -0
- package/src/bar-chart.tsx +78 -0
- package/src/channel-settings.tsx +76 -0
- package/src/chart-card.tsx +45 -0
- package/src/chat-avatar.tsx +57 -0
- package/src/chat-date-divider.tsx +18 -0
- package/src/chat-header.tsx +24 -0
- package/src/chat-layout.tsx +41 -0
- package/src/chat-time-divider.tsx +20 -0
- package/src/chat-types.ts +32 -0
- package/src/chat.ts +21 -0
- package/src/command-palette.tsx +110 -0
- package/src/compat-chat/chat-avatar.tsx +23 -0
- package/src/compat-chat/chat-header.tsx +12 -0
- package/src/compat-chat/chat-layout.tsx +14 -0
- package/src/compat-chat/conversation-list-item.tsx +27 -0
- package/src/compat-chat/conversation-list.tsx +49 -0
- package/src/compat-chat/conversation-thread.tsx +92 -0
- package/src/compat-chat/date-divider.tsx +7 -0
- package/src/compat-chat/empty-chat-view.tsx +9 -0
- package/src/compat-chat/image-lightbox.tsx +22 -0
- package/src/compat-chat/message-bubble.tsx +28 -0
- package/src/compat-chat/message-composer.tsx +26 -0
- package/src/compat-chat/time-divider.tsx +5 -0
- package/src/compat-chat/time-grouping.ts +19 -0
- package/src/compat-chat/types.ts +31 -0
- package/src/compat-chat/whatsapp-audio-player.tsx +100 -0
- package/src/compat.ts +8 -0
- package/src/confirm-dialog.tsx +85 -0
- package/src/connection-panel/connected-panel.tsx +106 -0
- package/src/connection-panel/disconnected-panel.tsx +48 -0
- package/src/connection-panel/instructions.tsx +9 -0
- package/src/connection-panel/qr-panel.tsx +62 -0
- package/src/connection-panel/use-qr-refresh.ts +52 -0
- package/src/connection-panel.tsx +141 -0
- package/src/conversation-list-item.tsx +53 -0
- package/src/conversation-list.tsx +67 -0
- package/src/conversation-thread.tsx +64 -0
- package/src/detail-panel.tsx +123 -0
- package/src/document-panel.tsx +109 -0
- package/src/document-reader.tsx +29 -0
- package/src/empty-chat-view.tsx +25 -0
- package/src/entity-card.tsx +74 -0
- package/src/entity-health-card.tsx +53 -0
- package/src/entity-switcher.tsx +126 -0
- package/src/fetching-indicator.tsx +16 -0
- package/src/field-array-form.tsx +166 -0
- package/src/filter-bar.tsx +203 -0
- package/src/image-viewer.tsx +129 -0
- package/src/kanban/drop-utils.ts +31 -0
- package/src/kanban/navigation-buttons.tsx +80 -0
- package/src/kanban/scroll-indicators.tsx +47 -0
- package/src/kanban/use-keyboard-navigation.ts +43 -0
- package/src/kanban-board.tsx +160 -0
- package/src/kanban-column.tsx +62 -0
- package/src/legacy-kpi-card.tsx +38 -0
- package/src/line-chart.tsx +58 -0
- package/src/list-item.tsx +63 -0
- package/src/list-pane.tsx +143 -0
- package/src/login-form.tsx +128 -0
- package/src/message-bubble.tsx +70 -0
- package/src/message-composer.tsx +52 -0
- package/src/pie-chart.tsx +70 -0
- package/src/radar-chart.tsx +55 -0
- package/src/radial-chart.tsx +103 -0
- package/src/recording-overlay.tsx +159 -0
- package/src/save-bar.tsx +35 -0
- package/src/settings-layout.tsx +79 -0
- package/src/source-selector.tsx +71 -0
- package/src/split-workspace.tsx +74 -0
- package/src/stat-card.tsx +166 -0
- package/src/stats-grid.tsx +23 -0
- package/src/status-filters.tsx +28 -0
- package/src/stepper.tsx +47 -0
- package/src/table-pane.tsx +194 -0
- package/src/time-range-picker.tsx +89 -0
- package/src/workspace-back-button.tsx +32 -0
- package/dist/chat-types.test.d.ts +0 -2
- package/dist/chat-types.test.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -12,6 +12,9 @@ pnpm add @lindaui/blocks @lindaui/ui @lindaui/tokens
|
|
|
12
12
|
|
|
13
13
|
Peer dependencies: `react >=19`, `react-dom >=19`, `react-hook-form >=7`,
|
|
14
14
|
`lucide-react` (icons), and `recharts` (chart blocks).
|
|
15
|
+
Blocks **0.5.0** additionally requires `@lindaui/ui >=0.5.0` and
|
|
16
|
+
`@lindaui/tokens >=0.4.0`. Those are the first versions containing the migration
|
|
17
|
+
compound/compat APIs and required styles; older published peers are incompatible.
|
|
15
18
|
|
|
16
19
|
## Usage
|
|
17
20
|
|
|
@@ -36,6 +39,59 @@ data-fetching / backend in the library — you wire that up.
|
|
|
36
39
|
`pie-chart`, `radar-chart`, `radial-chart`, `stat-card`, `chart-card`,
|
|
37
40
|
`stats-grid`.
|
|
38
41
|
|
|
42
|
+
**Application chrome:** `app-shell` (also exports `AppShellFooter`),
|
|
43
|
+
`entity-switcher`, `command-palette`. Router links, images, entities, translated
|
|
44
|
+
labels and business actions are injected by the consumer.
|
|
45
|
+
|
|
46
|
+
**Connections and configuration:** `connection-panel` (also exports
|
|
47
|
+
`ConnectedPanel`), `channel-settings`, `settings-layout`, `save-bar`, `stepper`.
|
|
48
|
+
`Stepper` presents the supplied percentage with `steps` or `compact` anatomy;
|
|
49
|
+
it does not calculate steps or own completion policy. Settings panels remain
|
|
50
|
+
mounted while selection changes; save buttons submit the supplied form id.
|
|
51
|
+
|
|
52
|
+
**Entity workflows:** `filter-bar`, `source-selector`, `kanban-board`,
|
|
53
|
+
`kanban-column`, `entity-card`. Data filtering, IDs, grouping, persistence,
|
|
54
|
+
activation handlers and domain-to-presentation mappings remain in the app.
|
|
55
|
+
|
|
56
|
+
## Explicit compatibility namespaces
|
|
57
|
+
|
|
58
|
+
These opt-in namespaces preserve former UI-kit presentation without changing
|
|
59
|
+
the existing flat Lindaui chat/chart APIs:
|
|
60
|
+
|
|
61
|
+
- `@lindaui/blocks/compat` — UI compatibility controls and utilities, `KPICard`,
|
|
62
|
+
`StatusFilters`, `DateDivider`. `KPICard` takes `title`, `value`, `icon`, `color`,
|
|
63
|
+
`trend` and `isLoading`; it is distinct from the existing `/stat-card`.
|
|
64
|
+
- `@lindaui/blocks/chat` — chat shell/list/thread/composer/avatar/header/empty
|
|
65
|
+
state and generic types. Messages use `side: "left" | "right" | "center"`,
|
|
66
|
+
`timestamp`, `text`, optional `authorTag` and `media`. The existing
|
|
67
|
+
`/chat-types` uses a different contract and must not be mixed with these types.
|
|
68
|
+
- `@lindaui/blocks/analytics` — analytics cards, status chart, entity table,
|
|
69
|
+
health presentation, loading indicators and the controlled date-range picker.
|
|
70
|
+
Its `TimeRangePicker` uses `preset` (`24h|7d|30d|custom`),
|
|
71
|
+
`customRange: RangeValue<DateValue> | null` and callbacks, unlike the existing
|
|
72
|
+
flat `/time-range-picker` with ISO date strings.
|
|
73
|
+
|
|
74
|
+
The package declares Dayjs, `@internationalized/date`, `@react-types/shared`,
|
|
75
|
+
Framer Motion and drag/drop primitives as runtime dependencies. Public date
|
|
76
|
+
declarations remain usable outside this monorepo; no consumer needs repo links.
|
|
77
|
+
|
|
78
|
+
For LeadConverter's existing appearance, import the independent
|
|
79
|
+
`@lindaui/tokens/lead-converter.css` Tailwind source entry instead of the teal
|
|
80
|
+
bundle. Do not import both. See the token package README for source scanning.
|
|
81
|
+
|
|
82
|
+
Interactive compatibility stories live in `src/compat-chat/chat.stories.tsx`
|
|
83
|
+
and `src/analytics/analytics.stories.tsx`, discovered by the repository's
|
|
84
|
+
Storybook. Stories and tests are excluded from public exports and build output.
|
|
85
|
+
|
|
86
|
+
## Published types
|
|
87
|
+
|
|
88
|
+
The package is ESM-only. All public and internal declarations, including the
|
|
89
|
+
`/chat`, `/analytics` and `/compat` namespaces, resolve with Node16/NodeNext
|
|
90
|
+
and bundler resolution. Declaration normalization resolves real files and
|
|
91
|
+
directory indexes without changing runtime JS or component client boundaries.
|
|
92
|
+
Exports put `types` first; `import` and `default` share the same ESM target.
|
|
93
|
+
This also supports `next/dynamic`'s weak-module lookup without a CommonJS build.
|
|
94
|
+
|
|
39
95
|
## License
|
|
40
96
|
|
|
41
97
|
MIT
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { Zap, DollarSign, TrendingUp, AlertCircle } from 'lucide-react';
|
|
4
|
+
import { memo } from 'react';
|
|
5
|
+
import { A as AnalyticsCard } from './analytics-card-bcmijpt6.js';
|
|
6
|
+
|
|
7
|
+
function formatUsd(value) {
|
|
8
|
+
return value.toLocaleString("en-US", {
|
|
9
|
+
currency: "USD",
|
|
10
|
+
maximumFractionDigits: 2,
|
|
11
|
+
minimumFractionDigits: 2,
|
|
12
|
+
style: "currency"
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function StatBlock({ icon: Icon, label, value, accent = false }) {
|
|
16
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
17
|
+
className: `rounded-xl px-4 py-3 ${accent ? "bg-accent/5" : "bg-surface-secondary"}`,
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ jsxs("div", {
|
|
20
|
+
className: "mb-1.5 flex items-center gap-1.5",
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ jsx(Icon, {
|
|
23
|
+
className: `h-3.5 w-3.5 ${accent ? "text-accent" : "text-muted"}`
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ jsx("p", {
|
|
26
|
+
className: "text-muted text-xs",
|
|
27
|
+
children: label
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ jsx("p", {
|
|
32
|
+
className: "font-bold text-foreground text-xl tabular-nums",
|
|
33
|
+
children: value
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function NotConfigured({ t }) {
|
|
39
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
40
|
+
className: "flex flex-col items-center justify-center gap-2 py-8 text-center",
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ jsx("div", {
|
|
43
|
+
className: "flex h-9 w-9 items-center justify-center rounded-xl bg-surface-secondary",
|
|
44
|
+
children: /*#__PURE__*/ jsx(AlertCircle, {
|
|
45
|
+
className: "h-5 w-5 text-muted"
|
|
46
|
+
})
|
|
47
|
+
}),
|
|
48
|
+
/*#__PURE__*/ jsx("p", {
|
|
49
|
+
className: "font-medium text-muted text-sm",
|
|
50
|
+
children: t("analytics.aiCost.notConfigured")
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ jsx("p", {
|
|
53
|
+
className: "max-w-[220px] text-muted text-xs",
|
|
54
|
+
children: t("analytics.aiCost.notConfiguredHint")
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function LoadingState() {
|
|
60
|
+
return /*#__PURE__*/ jsx("div", {
|
|
61
|
+
className: "grid grid-cols-3 gap-3",
|
|
62
|
+
children: [
|
|
63
|
+
"a",
|
|
64
|
+
"b",
|
|
65
|
+
"c"
|
|
66
|
+
].map((k)=>/*#__PURE__*/ jsx("div", {
|
|
67
|
+
className: "h-[72px] animate-pulse rounded-xl bg-surface-secondary"
|
|
68
|
+
}, k))
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
const AiCostCard = /*#__PURE__*/ memo(({ aiCost, isLoading, t })=>/*#__PURE__*/ jsx(AnalyticsCard, {
|
|
72
|
+
icon: Zap,
|
|
73
|
+
title: t("analytics.aiCost.title"),
|
|
74
|
+
children: isLoading ? /*#__PURE__*/ jsx(LoadingState, {}) : aiCost?.available === true ? /*#__PURE__*/ jsxs("div", {
|
|
75
|
+
className: "grid grid-cols-3 gap-3",
|
|
76
|
+
children: [
|
|
77
|
+
/*#__PURE__*/ jsx(StatBlock, {
|
|
78
|
+
accent: true,
|
|
79
|
+
icon: DollarSign,
|
|
80
|
+
label: t("analytics.aiCost.totalCost"),
|
|
81
|
+
value: formatUsd(aiCost.totalCostUsd)
|
|
82
|
+
}),
|
|
83
|
+
/*#__PURE__*/ jsx(StatBlock, {
|
|
84
|
+
icon: TrendingUp,
|
|
85
|
+
label: t("analytics.aiCost.costPerConversion"),
|
|
86
|
+
value: aiCost.conversionsCount > 0 ? formatUsd(aiCost.costPerConversion) : "—"
|
|
87
|
+
}),
|
|
88
|
+
/*#__PURE__*/ jsx(StatBlock, {
|
|
89
|
+
icon: Zap,
|
|
90
|
+
label: t("analytics.aiCost.conversions"),
|
|
91
|
+
value: aiCost.conversionsCount.toLocaleString()
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}) : /*#__PURE__*/ jsx(NotConfigured, {
|
|
95
|
+
t: t
|
|
96
|
+
})
|
|
97
|
+
}));
|
|
98
|
+
|
|
99
|
+
export { AiCostCard as A };
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Bot, Shield, Clock, User } from 'lucide-react';
|
|
4
|
+
import { memo } from 'react';
|
|
5
|
+
import { Divider } from '@lindaui/ui/compat';
|
|
6
|
+
import { A as AnalyticsCard } from './analytics-card-bcmijpt6.js';
|
|
7
|
+
|
|
8
|
+
const DEFAULT_AI_VS_HUMAN = {
|
|
9
|
+
aiConverted: 0,
|
|
10
|
+
aiLeads: 0,
|
|
11
|
+
aiRate: 0,
|
|
12
|
+
humanConverted: 0,
|
|
13
|
+
humanLeads: 0,
|
|
14
|
+
humanRate: 0
|
|
15
|
+
};
|
|
16
|
+
function rateColorClass(rate) {
|
|
17
|
+
return rate >= 10 ? "text-success" : rate >= 5 ? "text-warning" : "text-muted";
|
|
18
|
+
}
|
|
19
|
+
function StatRow({ label, value, valueClass = "text-foreground" }) {
|
|
20
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
21
|
+
className: "flex items-center justify-between",
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ jsx("span", {
|
|
24
|
+
className: "text-muted text-xs",
|
|
25
|
+
children: label
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ jsx("span", {
|
|
28
|
+
className: `font-semibold text-xs tabular-nums ${valueClass}`,
|
|
29
|
+
children: value
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
const AiPerformanceCard = /*#__PURE__*/ memo(({ containmentRate = 0, aiVsHuman: aiVsHumanProp, avgResponseTimeMinutes = 0, t })=>{
|
|
35
|
+
const aiVsHuman = aiVsHumanProp ?? DEFAULT_AI_VS_HUMAN;
|
|
36
|
+
return /*#__PURE__*/ jsxs(AnalyticsCard, {
|
|
37
|
+
icon: Bot,
|
|
38
|
+
title: t("analytics.aiPerformance.title"),
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ jsxs("div", {
|
|
41
|
+
className: "grid grid-cols-2 gap-3",
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ jsxs("div", {
|
|
44
|
+
className: "rounded-xl bg-accent/5 px-4 py-3",
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ jsxs("div", {
|
|
47
|
+
className: "mb-1.5 flex items-center gap-1.5",
|
|
48
|
+
children: [
|
|
49
|
+
/*#__PURE__*/ jsx(Shield, {
|
|
50
|
+
className: "h-3.5 w-3.5 text-accent"
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ jsx("p", {
|
|
53
|
+
className: "text-muted text-xs",
|
|
54
|
+
children: t("analytics.aiPerformance.containment")
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ jsxs("p", {
|
|
59
|
+
className: "font-bold text-3xl text-foreground tabular-nums",
|
|
60
|
+
children: [
|
|
61
|
+
containmentRate,
|
|
62
|
+
/*#__PURE__*/ jsx("span", {
|
|
63
|
+
className: "ml-0.5 font-medium text-lg text-muted",
|
|
64
|
+
children: "%"
|
|
65
|
+
})
|
|
66
|
+
]
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ jsxs("div", {
|
|
71
|
+
className: "rounded-xl bg-surface-secondary px-4 py-3",
|
|
72
|
+
children: [
|
|
73
|
+
/*#__PURE__*/ jsxs("div", {
|
|
74
|
+
className: "mb-1.5 flex items-center gap-1.5",
|
|
75
|
+
children: [
|
|
76
|
+
/*#__PURE__*/ jsx(Clock, {
|
|
77
|
+
className: "h-3.5 w-3.5 text-muted"
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ jsx("p", {
|
|
80
|
+
className: "text-muted text-xs",
|
|
81
|
+
children: t("analytics.aiPerformance.responseTime")
|
|
82
|
+
})
|
|
83
|
+
]
|
|
84
|
+
}),
|
|
85
|
+
/*#__PURE__*/ jsxs("p", {
|
|
86
|
+
className: "font-bold text-3xl text-foreground tabular-nums",
|
|
87
|
+
children: [
|
|
88
|
+
avgResponseTimeMinutes,
|
|
89
|
+
/*#__PURE__*/ jsx("span", {
|
|
90
|
+
className: "ml-1 font-normal text-muted text-sm",
|
|
91
|
+
children: t("analytics.aiPerformance.minutes")
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}),
|
|
99
|
+
/*#__PURE__*/ jsx(Divider, {
|
|
100
|
+
className: "my-4"
|
|
101
|
+
}),
|
|
102
|
+
/*#__PURE__*/ jsx("p", {
|
|
103
|
+
className: "mb-3 font-medium text-muted text-xs uppercase tracking-wider",
|
|
104
|
+
children: t("analytics.aiPerformance.comparison")
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ jsxs("div", {
|
|
107
|
+
className: "grid grid-cols-2 gap-4",
|
|
108
|
+
children: [
|
|
109
|
+
/*#__PURE__*/ jsxs("div", {
|
|
110
|
+
className: "space-y-3",
|
|
111
|
+
children: [
|
|
112
|
+
/*#__PURE__*/ jsxs("div", {
|
|
113
|
+
className: "flex items-center gap-1.5",
|
|
114
|
+
children: [
|
|
115
|
+
/*#__PURE__*/ jsx("div", {
|
|
116
|
+
className: "flex h-5 w-5 items-center justify-center rounded-md bg-accent/10",
|
|
117
|
+
children: /*#__PURE__*/ jsx(Bot, {
|
|
118
|
+
className: "h-3 w-3 text-accent"
|
|
119
|
+
})
|
|
120
|
+
}),
|
|
121
|
+
/*#__PURE__*/ jsx("p", {
|
|
122
|
+
className: "font-semibold text-foreground text-xs",
|
|
123
|
+
children: t("analytics.aiPerformance.ai")
|
|
124
|
+
})
|
|
125
|
+
]
|
|
126
|
+
}),
|
|
127
|
+
/*#__PURE__*/ jsxs("div", {
|
|
128
|
+
className: "space-y-2",
|
|
129
|
+
children: [
|
|
130
|
+
/*#__PURE__*/ jsx(StatRow, {
|
|
131
|
+
label: t("analytics.aiPerformance.leads"),
|
|
132
|
+
value: aiVsHuman.aiLeads.toLocaleString()
|
|
133
|
+
}),
|
|
134
|
+
/*#__PURE__*/ jsx(StatRow, {
|
|
135
|
+
label: t("analytics.aiPerformance.converted"),
|
|
136
|
+
value: aiVsHuman.aiConverted.toLocaleString()
|
|
137
|
+
}),
|
|
138
|
+
/*#__PURE__*/ jsx(StatRow, {
|
|
139
|
+
label: t("analytics.aiPerformance.rate"),
|
|
140
|
+
value: `${aiVsHuman.aiRate}%`,
|
|
141
|
+
valueClass: rateColorClass(aiVsHuman.aiRate)
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
})
|
|
145
|
+
]
|
|
146
|
+
}),
|
|
147
|
+
/*#__PURE__*/ jsxs("div", {
|
|
148
|
+
className: "space-y-3 border-border border-l pl-4",
|
|
149
|
+
children: [
|
|
150
|
+
/*#__PURE__*/ jsxs("div", {
|
|
151
|
+
className: "flex items-center gap-1.5",
|
|
152
|
+
children: [
|
|
153
|
+
/*#__PURE__*/ jsx("div", {
|
|
154
|
+
className: "flex h-5 w-5 items-center justify-center rounded-md bg-surface-secondary",
|
|
155
|
+
children: /*#__PURE__*/ jsx(User, {
|
|
156
|
+
className: "h-3 w-3 text-muted"
|
|
157
|
+
})
|
|
158
|
+
}),
|
|
159
|
+
/*#__PURE__*/ jsx("p", {
|
|
160
|
+
className: "font-semibold text-foreground text-xs",
|
|
161
|
+
children: t("analytics.aiPerformance.human")
|
|
162
|
+
})
|
|
163
|
+
]
|
|
164
|
+
}),
|
|
165
|
+
/*#__PURE__*/ jsxs("div", {
|
|
166
|
+
className: "space-y-2",
|
|
167
|
+
children: [
|
|
168
|
+
/*#__PURE__*/ jsx(StatRow, {
|
|
169
|
+
label: t("analytics.aiPerformance.leads"),
|
|
170
|
+
value: aiVsHuman.humanLeads.toLocaleString()
|
|
171
|
+
}),
|
|
172
|
+
/*#__PURE__*/ jsx(StatRow, {
|
|
173
|
+
label: t("analytics.aiPerformance.converted"),
|
|
174
|
+
value: aiVsHuman.humanConverted.toLocaleString()
|
|
175
|
+
}),
|
|
176
|
+
/*#__PURE__*/ jsx(StatRow, {
|
|
177
|
+
label: t("analytics.aiPerformance.rate"),
|
|
178
|
+
value: `${aiVsHuman.humanRate}%`,
|
|
179
|
+
valueClass: rateColorClass(aiVsHuman.humanRate)
|
|
180
|
+
})
|
|
181
|
+
]
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
})
|
|
185
|
+
]
|
|
186
|
+
})
|
|
187
|
+
]
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
export { AiPerformanceCard as A };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-cost-card.d.ts","sourceRoot":"","sources":["../../src/analytics/ai-cost-card.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAS,CAAC;AAiB/C,eAAO,MAAM,UAAU,iEAAmC,eAAe,iCAQvE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AiPerformanceCardProps } from "./types.js";
|
|
2
|
+
export declare const AiPerformanceCard: import("react").MemoExoticComponent<({ containmentRate, aiVsHuman: aiVsHumanProp, avgResponseTimeMinutes, t }: AiPerformanceCardProps) => import("react").JSX.Element>;
|
|
3
|
+
//# sourceMappingURL=ai-performance-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-performance-card.d.ts","sourceRoot":"","sources":["../../src/analytics/ai-performance-card.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAiB,MAAM,YAAS,CAAC;AAOrE,eAAO,MAAM,iBAAiB,iHAA2F,sBAAsB,iCAkC7I,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-card.d.ts","sourceRoot":"","sources":["../../src/analytics/analytics-card.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAS,CAAC;AAElD,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,kBAAkB,+BAQxF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-skeleton.d.ts","sourceRoot":"","sources":["../../src/analytics/analytics-skeleton.tsx"],"names":[],"mappings":"AAMA,wBAAgB,iBAAiB,gCAOhC;AACD,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,+BAAkJ"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { EntityHealthCardProps } from "./types.js";
|
|
2
|
+
export declare const EntityHealthCard: import("react").MemoExoticComponent<({ entities, labels, renderEntityLink }: EntityHealthCardProps) => import("react").JSX.Element>;
|
|
3
|
+
//# sourceMappingURL=entity-health-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-health-card.d.ts","sourceRoot":"","sources":["../../src/analytics/entity-health-card.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,qBAAqB,EAA8B,MAAM,YAAS,CAAC;AAWjF,eAAO,MAAM,gBAAgB,+EAAiD,qBAAqB,iCAgCjG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-distribution-chart.d.ts","sourceRoot":"","sources":["../../src/analytics/status-distribution-chart.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,YAAS,CAAC;AAE5D,wBAAgB,uBAAuB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,MAAY,EAAE,EAAE,4BAA4B,+BAanH"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TimeRangePickerProps } from "./types.js";
|
|
2
|
+
export declare const TimeRangePicker: import("react").MemoExoticComponent<({ preset, customRange, onPresetChange, onCustomRangeChange, t }: TimeRangePickerProps) => import("react").JSX.Element>;
|
|
3
|
+
//# sourceMappingURL=time-range-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time-range-picker.d.ts","sourceRoot":"","sources":["../../src/analytics/time-range-picker.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAU,oBAAoB,EAAE,MAAM,YAAS,CAAC;AAK5D,eAAO,MAAM,eAAe,wGAA0E,oBAAoB,iCAgCxH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"top-entities-table.d.ts","sourceRoot":"","sources":["../../src/analytics/top-entities-table.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAc,qBAAqB,EAAE,MAAM,YAAS,CAAC;AAEjE,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAe,EAAE,EAAE,qBAAqB,+BAYrG"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import type { DateValue } from "@internationalized/date";
|
|
2
|
+
import type { RangeValue } from "@react-types/shared";
|
|
3
|
+
import type { LucideIcon } from "lucide-react";
|
|
4
|
+
import type { ReactNode } from "react";
|
|
5
|
+
/** Presentation-only analytics types. Domain mapping stays in the consumer. */
|
|
6
|
+
export interface StatusDatum {
|
|
7
|
+
color: string;
|
|
8
|
+
count: number;
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
}
|
|
12
|
+
export interface StatusDistributionChartProps {
|
|
13
|
+
data: StatusDatum[];
|
|
14
|
+
emptyLabel: string;
|
|
15
|
+
height?: number;
|
|
16
|
+
valueLabel: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EntityCell {
|
|
19
|
+
align?: "left" | "right";
|
|
20
|
+
badge?: {
|
|
21
|
+
color: "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
22
|
+
label: string;
|
|
23
|
+
};
|
|
24
|
+
value: string;
|
|
25
|
+
}
|
|
26
|
+
export interface TopEntityRow {
|
|
27
|
+
cells: EntityCell[];
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
export interface TopEntitiesColumn {
|
|
32
|
+
align?: "left" | "right";
|
|
33
|
+
key: string;
|
|
34
|
+
label: string;
|
|
35
|
+
}
|
|
36
|
+
export interface TopEntitiesTableProps {
|
|
37
|
+
columns: TopEntitiesColumn[];
|
|
38
|
+
emptyLabel: string;
|
|
39
|
+
rows: TopEntityRow[];
|
|
40
|
+
showRank?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export type HealthStatus = "at_risk" | "critical" | "healthy";
|
|
43
|
+
export interface HealthEntity {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
score: number;
|
|
47
|
+
status: HealthStatus;
|
|
48
|
+
}
|
|
49
|
+
export interface HealthCardLabels {
|
|
50
|
+
allHealthy: string;
|
|
51
|
+
atRisk: string;
|
|
52
|
+
critical: string;
|
|
53
|
+
criticalBadge: (count: number) => string;
|
|
54
|
+
healthy: string;
|
|
55
|
+
idleNote: string;
|
|
56
|
+
scoreLabel: (score: number) => string;
|
|
57
|
+
statusLabel: (status: HealthStatus) => string;
|
|
58
|
+
title: string;
|
|
59
|
+
}
|
|
60
|
+
export interface EntityHealthCardProps {
|
|
61
|
+
entities: HealthEntity[];
|
|
62
|
+
labels: HealthCardLabels;
|
|
63
|
+
renderEntityLink?: (entity: HealthEntity, children: ReactNode) => ReactNode;
|
|
64
|
+
}
|
|
65
|
+
export interface AiVsHumanData {
|
|
66
|
+
aiConverted: number;
|
|
67
|
+
aiLeads: number;
|
|
68
|
+
aiRate: number;
|
|
69
|
+
humanConverted: number;
|
|
70
|
+
humanLeads: number;
|
|
71
|
+
humanRate: number;
|
|
72
|
+
}
|
|
73
|
+
export interface AiPerformanceCardProps {
|
|
74
|
+
aiVsHuman: AiVsHumanData;
|
|
75
|
+
avgResponseTimeMinutes: number;
|
|
76
|
+
containmentRate: number;
|
|
77
|
+
t: (key: string, opts?: Record<string, unknown>) => string;
|
|
78
|
+
}
|
|
79
|
+
export interface AiCostData {
|
|
80
|
+
available: boolean;
|
|
81
|
+
conversionsCount: number;
|
|
82
|
+
costPerConversion: number;
|
|
83
|
+
totalCostUsd: number;
|
|
84
|
+
}
|
|
85
|
+
export interface AiCostCardProps {
|
|
86
|
+
aiCost: AiCostData | undefined;
|
|
87
|
+
isLoading: boolean;
|
|
88
|
+
t: (key: string, opts?: Record<string, unknown>) => string;
|
|
89
|
+
}
|
|
90
|
+
export type Preset = "24h" | "7d" | "30d" | "custom";
|
|
91
|
+
export interface TimeRangePickerProps {
|
|
92
|
+
customRange: RangeValue<DateValue> | null;
|
|
93
|
+
onCustomRangeChange: (v: RangeValue<DateValue> | null) => void;
|
|
94
|
+
onPresetChange: (p: Preset) => void;
|
|
95
|
+
preset: Preset;
|
|
96
|
+
t: (key: string) => string;
|
|
97
|
+
}
|
|
98
|
+
export interface AnalyticsCardProps {
|
|
99
|
+
action?: ReactNode;
|
|
100
|
+
children: ReactNode;
|
|
101
|
+
icon: LucideIcon;
|
|
102
|
+
title: string;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/analytics/types.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { Card } from '@lindaui/ui/compound';
|
|
4
|
+
|
|
5
|
+
function AnalyticsCard({ icon: Icon, title, action, children }) {
|
|
6
|
+
return /*#__PURE__*/ jsxs(Card, {
|
|
7
|
+
className: "border border-border bg-surface shadow-none",
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ jsxs(Card.Header, {
|
|
10
|
+
className: "flex items-center justify-between px-5 pt-5 pb-0",
|
|
11
|
+
children: [
|
|
12
|
+
/*#__PURE__*/ jsxs("div", {
|
|
13
|
+
className: "flex items-center gap-2",
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ jsx("div", {
|
|
16
|
+
className: "flex h-7 w-7 items-center justify-center rounded-lg bg-accent/8",
|
|
17
|
+
children: /*#__PURE__*/ jsx(Icon, {
|
|
18
|
+
className: "h-4 w-4 text-accent"
|
|
19
|
+
})
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ jsx("h2", {
|
|
22
|
+
className: "font-semibold text-foreground text-sm",
|
|
23
|
+
children: title
|
|
24
|
+
})
|
|
25
|
+
]
|
|
26
|
+
}),
|
|
27
|
+
action
|
|
28
|
+
]
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ jsx(Card.Content, {
|
|
31
|
+
className: "px-5 pt-4 pb-5",
|
|
32
|
+
children: children
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { AnalyticsCard as A };
|