@arbidocs/blocks 0.3.161 → 0.3.163
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.cjs +77 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +78 -54
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -722,6 +722,12 @@ interface RecentActivityCardProps {
|
|
|
722
722
|
actionLabel?: string;
|
|
723
723
|
actionIcon?: LucideIcon;
|
|
724
724
|
onAction?: () => void;
|
|
725
|
+
/**
|
|
726
|
+
* A custom header action node — rendered in the action slot INSTEAD of the
|
|
727
|
+
* built-in label button. For actions that aren't a single click (e.g. a
|
|
728
|
+
* source dropdown). The empty-card CTA still uses `onAction`/`emptyActionLabel`.
|
|
729
|
+
*/
|
|
730
|
+
action?: ReactNode;
|
|
725
731
|
rows: RecentActivityRow[];
|
|
726
732
|
/** Says what the list is — "Recent", "Recently joined". */
|
|
727
733
|
caption?: string;
|
|
@@ -764,7 +770,7 @@ interface RecentActivityCardProps {
|
|
|
764
770
|
* Styled with SEMANTIC tokens only (card, border, foreground, muted-foreground,
|
|
765
771
|
* primary, accent), so every firm gets it in its own colours.
|
|
766
772
|
*/
|
|
767
|
-
declare function RecentActivityCard({ icon: Icon, title, count, onOpen, actionLabel, actionIcon: ActionIcon, onAction, rows, caption, emptyText, emptyActionLabel, className, testId, }: RecentActivityCardProps): react.JSX.Element;
|
|
773
|
+
declare function RecentActivityCard({ icon: Icon, title, count, onOpen, actionLabel, actionIcon: ActionIcon, onAction, action, rows, caption, emptyText, emptyActionLabel, className, testId, }: RecentActivityCardProps): react.JSX.Element;
|
|
768
774
|
|
|
769
775
|
interface AskBarProps {
|
|
770
776
|
/** Receives the trimmed question; the caller owns what asking means. */
|
|
@@ -835,6 +841,11 @@ interface SectionStripAction {
|
|
|
835
841
|
label: string;
|
|
836
842
|
onClick: () => void;
|
|
837
843
|
testId?: string;
|
|
844
|
+
/**
|
|
845
|
+
* A custom element rendered in place of the default ghost button — for a
|
|
846
|
+
* primary/emphasised action that shouldn't look like the quiet header doors.
|
|
847
|
+
*/
|
|
848
|
+
node?: ReactNode;
|
|
838
849
|
}
|
|
839
850
|
interface SectionStripProps {
|
|
840
851
|
/** Glyph beside the title, in the header. */
|
|
@@ -849,11 +860,18 @@ interface SectionStripProps {
|
|
|
849
860
|
actions?: SectionStripAction[];
|
|
850
861
|
/** Captioned row groups; groups with no rows are skipped. */
|
|
851
862
|
groups: SectionStripGroup[];
|
|
852
|
-
/**
|
|
863
|
+
/**
|
|
864
|
+
* Shown when every group is empty. By default a single quiet row. Supply an
|
|
865
|
+
* `icon` (and optional `description`) to render the fuller dashed empty state
|
|
866
|
+
* instead — the same shape a card uses, for sections that want the empty
|
|
867
|
+
* state to invite rather than just note.
|
|
868
|
+
*/
|
|
853
869
|
empty?: {
|
|
854
870
|
label: ReactNode;
|
|
855
871
|
onClick?: () => void;
|
|
856
872
|
testId?: string;
|
|
873
|
+
icon?: LucideIcon;
|
|
874
|
+
description?: ReactNode;
|
|
857
875
|
};
|
|
858
876
|
className?: string;
|
|
859
877
|
/** Root test id; children derive `-open` and per-action/per-group ids. */
|
package/dist/index.d.ts
CHANGED
|
@@ -722,6 +722,12 @@ interface RecentActivityCardProps {
|
|
|
722
722
|
actionLabel?: string;
|
|
723
723
|
actionIcon?: LucideIcon;
|
|
724
724
|
onAction?: () => void;
|
|
725
|
+
/**
|
|
726
|
+
* A custom header action node — rendered in the action slot INSTEAD of the
|
|
727
|
+
* built-in label button. For actions that aren't a single click (e.g. a
|
|
728
|
+
* source dropdown). The empty-card CTA still uses `onAction`/`emptyActionLabel`.
|
|
729
|
+
*/
|
|
730
|
+
action?: ReactNode;
|
|
725
731
|
rows: RecentActivityRow[];
|
|
726
732
|
/** Says what the list is — "Recent", "Recently joined". */
|
|
727
733
|
caption?: string;
|
|
@@ -764,7 +770,7 @@ interface RecentActivityCardProps {
|
|
|
764
770
|
* Styled with SEMANTIC tokens only (card, border, foreground, muted-foreground,
|
|
765
771
|
* primary, accent), so every firm gets it in its own colours.
|
|
766
772
|
*/
|
|
767
|
-
declare function RecentActivityCard({ icon: Icon, title, count, onOpen, actionLabel, actionIcon: ActionIcon, onAction, rows, caption, emptyText, emptyActionLabel, className, testId, }: RecentActivityCardProps): react.JSX.Element;
|
|
773
|
+
declare function RecentActivityCard({ icon: Icon, title, count, onOpen, actionLabel, actionIcon: ActionIcon, onAction, action, rows, caption, emptyText, emptyActionLabel, className, testId, }: RecentActivityCardProps): react.JSX.Element;
|
|
768
774
|
|
|
769
775
|
interface AskBarProps {
|
|
770
776
|
/** Receives the trimmed question; the caller owns what asking means. */
|
|
@@ -835,6 +841,11 @@ interface SectionStripAction {
|
|
|
835
841
|
label: string;
|
|
836
842
|
onClick: () => void;
|
|
837
843
|
testId?: string;
|
|
844
|
+
/**
|
|
845
|
+
* A custom element rendered in place of the default ghost button — for a
|
|
846
|
+
* primary/emphasised action that shouldn't look like the quiet header doors.
|
|
847
|
+
*/
|
|
848
|
+
node?: ReactNode;
|
|
838
849
|
}
|
|
839
850
|
interface SectionStripProps {
|
|
840
851
|
/** Glyph beside the title, in the header. */
|
|
@@ -849,11 +860,18 @@ interface SectionStripProps {
|
|
|
849
860
|
actions?: SectionStripAction[];
|
|
850
861
|
/** Captioned row groups; groups with no rows are skipped. */
|
|
851
862
|
groups: SectionStripGroup[];
|
|
852
|
-
/**
|
|
863
|
+
/**
|
|
864
|
+
* Shown when every group is empty. By default a single quiet row. Supply an
|
|
865
|
+
* `icon` (and optional `description`) to render the fuller dashed empty state
|
|
866
|
+
* instead — the same shape a card uses, for sections that want the empty
|
|
867
|
+
* state to invite rather than just note.
|
|
868
|
+
*/
|
|
853
869
|
empty?: {
|
|
854
870
|
label: ReactNode;
|
|
855
871
|
onClick?: () => void;
|
|
856
872
|
testId?: string;
|
|
873
|
+
icon?: LucideIcon;
|
|
874
|
+
description?: ReactNode;
|
|
857
875
|
};
|
|
858
876
|
className?: string;
|
|
859
877
|
/** Root test id; children derive `-open` and per-action/per-group ids. */
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { formatPageRefs, tid, initials, fromNow, fmtDate, assetRefId, applyStoredTheme, AssetResolverProvider, ThemeEditor, applyThemeVars, SectionHeading, PricingTable, Tabs as Tabs$1, Accordion, Gallery, VideoEmbed, ContactForm, Banner, MediaText, TeamGrid, Steps, TestimonialGrid, Columns, Spacer, Container, Hero, FeatureGrid, Testimonial, CTABanner, LogoCloud, FAQ, Timeline, RichTextBlock, Callout, BlockImage, AvatarBlock, Navbar, Footer, ListBlock, isAssetRef, asAssetRef } from './chunk-27Q4AST5.js';
|
|
2
2
|
export { ASSET_REF_PREFIX, Accordion, AssetResolverProvider, AvatarBlock, Banner, BlockImage, BlockLink, CTABanner, Callout, Columns, ContactForm, Container, FAQ, FONT_PAIRINGS, FeatureGrid, Footer, Gallery, Hero, ListBlock, LogoCloud, MediaText, Navbar, PricingTable, RichTextBlock, SectionHeading, Spacer, Steps, THEME_STYLE_ID, Tabs, TeamGrid, Testimonial, TestimonialGrid, ThemeEditor, Timeline, TimelineCalendar, TimelineGantt, VideoEmbed, applyFontVars, applyStoredTheme, applyThemeVars, asAssetRef, assetRefId, clearFontVars, clearThemeVars, createThemeStore, dayKey, daysUntil, fmtDate, fmtDateTime, fontPackages, formatPageRefs, formatSpan, fromNow, gbp, getFontPairing, hrs, initials, isAssetRef, matchFontPairing, monthLabel, parseIso, pct, tid, toEmbedUrl, toHslTriplet, useAssetRenderer, useAssetResolverActive, utcDay } from './chunk-27Q4AST5.js';
|
|
3
3
|
import { createContext, useState, useRef, useEffect, useMemo, useCallback, useContext } from 'react';
|
|
4
|
-
import { MessageSquare, Cpu, Code, Cloud, Layers, Target, Award, MapPin, Phone, Mail, Lock, Globe, Heart, Star, Rocket, Shield, Zap, Sparkles, Gavel, Scale, Bell, Activity, BarChart3, DollarSign, TrendingUp, Info, AlertCircle, CheckCircle, Clock, Calendar, Briefcase, Users, Folder, FileText, X, Loader2, UploadCloud, Search, Pencil, ChevronDown, ArrowUpRight, ArrowDownRight,
|
|
4
|
+
import { MessageSquare, Cpu, Code, Cloud, Layers, Target, Award, MapPin, Phone, Mail, Lock, Globe, Heart, Star, Rocket, Shield, Zap, Sparkles, Gavel, Scale, Bell, Activity, BarChart3, DollarSign, TrendingUp, Info, AlertCircle, CheckCircle, Clock, Calendar, Briefcase, Users, Folder, FileText, X, Loader2, UploadCloud, Search, Pencil, ChevronDown, ArrowUpRight, ArrowDownRight, Plus, FolderLock, CheckCircle2, ArrowLeftRight, MessagesSquare, Menu, ArrowLeft, Palette, RotateCcw, ChevronUp, BrainCircuit, Bot, LayoutGrid, FileJson, Download, Crop, ImagePlus, Upload, Link2, Check } from 'lucide-react';
|
|
5
5
|
import { cn, DocumentEntity, useArbi, ArbiProvider, useAiTask, useWorkspaceDocs as useWorkspaceDocs$1, useSemanticSearch as useSemanticSearch$1, Table, TableHeader, TableRow, TableHead, TableBody, TableCell, Input, Textarea, Avatar, AvatarImage, AvatarFallback, Card, Button, CardHeader, CardTitle, CardDescription, CardContent, Tooltip, TooltipTrigger, TooltipContent, CardFooter, TooltipProvider, NotificationBell, UserMenu, useThumbnails, Badge, Switch, useConfigs, useAgents, Checkbox, Tabs, TabsList, TabsTrigger, TabsContent, Separator, ArbiWebSocketProvider, useDocuments, ImageCropModal, DEFAULT_ASPECT_OPTIONS, useConversations } from '@arbidocs/react';
|
|
6
6
|
export { DocumentCard, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, redlineStats, textToArtifact, toRedlineMarkdown } from '@arbidocs/react';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1236,7 +1236,7 @@ function EntityIdentityBar({
|
|
|
1236
1236
|
/* @__PURE__ */ jsxs("dl", { className: "min-w-0 flex-1 space-y-1.5", children: [
|
|
1237
1237
|
fields.map((field) => /* @__PURE__ */ jsx(IdentityFieldRow, { field, canEdit }, field.label)),
|
|
1238
1238
|
extraRows.map((row) => /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", "data-testid": row.testId, children: [
|
|
1239
|
-
/* @__PURE__ */ jsxs("dt", { className: "w-24 shrink-0 text-
|
|
1239
|
+
/* @__PURE__ */ jsxs("dt", { className: "w-24 shrink-0 text-sm font-medium text-muted-foreground", children: [
|
|
1240
1240
|
row.label,
|
|
1241
1241
|
":"
|
|
1242
1242
|
] }),
|
|
@@ -1304,7 +1304,7 @@ function IdentityFieldRow({ field, canEdit }) {
|
|
|
1304
1304
|
"dt",
|
|
1305
1305
|
{
|
|
1306
1306
|
className: cn(
|
|
1307
|
-
"w-24 shrink-0 text-
|
|
1307
|
+
"w-24 shrink-0 text-sm font-medium text-muted-foreground",
|
|
1308
1308
|
multiline && "pt-1"
|
|
1309
1309
|
),
|
|
1310
1310
|
children: [
|
|
@@ -1320,15 +1320,9 @@ function IdentityFieldRow({ field, canEdit }) {
|
|
|
1320
1320
|
{
|
|
1321
1321
|
...shared,
|
|
1322
1322
|
rows: 2,
|
|
1323
|
-
className: cn(fieldClass, "min-h-0 resize-none
|
|
1323
|
+
className: cn(fieldClass, "min-h-0 resize-none leading-snug", valueClassName)
|
|
1324
1324
|
}
|
|
1325
|
-
) : /* @__PURE__ */ jsx(
|
|
1326
|
-
Input,
|
|
1327
|
-
{
|
|
1328
|
-
...shared,
|
|
1329
|
-
className: cn(fieldClass, "pr-20 text-xl font-semibold tracking-tight")
|
|
1330
|
-
}
|
|
1331
|
-
),
|
|
1325
|
+
) : /* @__PURE__ */ jsx(Input, { ...shared, className: cn(fieldClass, "pr-20", valueClassName) }),
|
|
1332
1326
|
charsLeft !== null && charsLeft <= COUNTER_THRESHOLD && /* @__PURE__ */ jsx(
|
|
1333
1327
|
"span",
|
|
1334
1328
|
{
|
|
@@ -1340,21 +1334,26 @@ function IdentityFieldRow({ field, canEdit }) {
|
|
|
1340
1334
|
children: charsLeft < 0 ? `${-charsLeft} over` : `${charsLeft} left`
|
|
1341
1335
|
}
|
|
1342
1336
|
)
|
|
1343
|
-
] }) :
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
"
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1337
|
+
] }) : (
|
|
1338
|
+
// `identity-field` (not the generic `group`) scopes the pencil's hover
|
|
1339
|
+
// to THIS field only — an ancestor card also carries `group`, so a
|
|
1340
|
+
// `.group:hover` rule would reveal every field's pencil at once.
|
|
1341
|
+
/* @__PURE__ */ jsxs("span", { className: "identity-field flex min-w-0 items-center gap-1.5", children: [
|
|
1342
|
+
/* @__PURE__ */ jsx("span", { className: cn("px-1.5 py-0.5", valueClassName), "data-testid": testId, children: value || /* @__PURE__ */ jsx("span", { className: "italic text-muted-foreground", children: placeholder }) }),
|
|
1343
|
+
canEdit && /* @__PURE__ */ jsx(
|
|
1344
|
+
"button",
|
|
1345
|
+
{
|
|
1346
|
+
type: "button",
|
|
1347
|
+
onClick: () => setIsEditing(true),
|
|
1348
|
+
"aria-label": `Edit ${label.toLowerCase()}`,
|
|
1349
|
+
title: `Edit ${label.toLowerCase()}`,
|
|
1350
|
+
className: "shrink-0 cursor-pointer rounded p-1 text-muted-foreground opacity-0 transition-[color,background-color,opacity] hover:bg-accent hover:text-foreground focus-visible:opacity-100 [.identity-field:hover_&]:opacity-100",
|
|
1351
|
+
"data-testid": testId && `${testId}-edit`,
|
|
1352
|
+
children: /* @__PURE__ */ jsx(Pencil, { className: "size-3.5" })
|
|
1353
|
+
}
|
|
1354
|
+
)
|
|
1355
|
+
] })
|
|
1356
|
+
),
|
|
1358
1357
|
trailing ? /* @__PURE__ */ jsx("div", { className: "ml-auto shrink-0", children: trailing }) : null
|
|
1359
1358
|
] })
|
|
1360
1359
|
] });
|
|
@@ -1463,6 +1462,7 @@ function RecentActivityCard({
|
|
|
1463
1462
|
actionLabel,
|
|
1464
1463
|
actionIcon: ActionIcon,
|
|
1465
1464
|
onAction,
|
|
1465
|
+
action,
|
|
1466
1466
|
rows,
|
|
1467
1467
|
caption,
|
|
1468
1468
|
emptyText,
|
|
@@ -1479,7 +1479,11 @@ function RecentActivityCard({
|
|
|
1479
1479
|
// scrolling inside a fixed-height card puts a scrollbar in the middle
|
|
1480
1480
|
// of the page, where every other page in the app scrolls at its outer
|
|
1481
1481
|
// edge. The page is the scroll container; the card is just tall.
|
|
1482
|
-
|
|
1482
|
+
//
|
|
1483
|
+
// No `card-hover` lift: the card is a container, not a single link — its
|
|
1484
|
+
// header and each row have their OWN hover, so a whole-card lift on any
|
|
1485
|
+
// hover would highlight the section instead of the item under the cursor.
|
|
1486
|
+
"flex flex-col overflow-hidden rounded-xl bg-card p-0 shadow-sm",
|
|
1483
1487
|
className
|
|
1484
1488
|
),
|
|
1485
1489
|
"data-testid": testId,
|
|
@@ -1496,12 +1500,11 @@ function RecentActivityCard({
|
|
|
1496
1500
|
children: [
|
|
1497
1501
|
Icon && /* @__PURE__ */ jsx(Icon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
1498
1502
|
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-sm font-semibold text-foreground", children: title }),
|
|
1499
|
-
count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
|
|
1500
|
-
onOpen && /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto size-4 shrink-0 text-muted-foreground/50 transition-transform group-hover:translate-x-0.5 group-hover:text-foreground" })
|
|
1503
|
+
count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
|
|
1501
1504
|
]
|
|
1502
1505
|
}
|
|
1503
1506
|
),
|
|
1504
|
-
actionLabel ? /* @__PURE__ */ jsxs(
|
|
1507
|
+
action ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action }) : actionLabel ? /* @__PURE__ */ jsxs(
|
|
1505
1508
|
Button,
|
|
1506
1509
|
{
|
|
1507
1510
|
variant: "ghost",
|
|
@@ -1528,7 +1531,7 @@ function RecentActivityCard({
|
|
|
1528
1531
|
className: "group m-3 flex flex-1 cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-border px-4 text-center transition-colors hover:border-border hover:bg-accent/50 focus-visible:border-border focus-visible:bg-accent/50 focus-visible:outline-none",
|
|
1529
1532
|
"data-testid": testId && `${testId}-empty-action`,
|
|
1530
1533
|
children: [
|
|
1531
|
-
/* @__PURE__ */ jsx("span", { className: "flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground", children: ActionIcon ? /* @__PURE__ */ jsx(ActionIcon, { className: "size-5" }) : /* @__PURE__ */ jsx(Plus, { className: "size-5" }) }),
|
|
1534
|
+
/* @__PURE__ */ jsx("span", { className: "mt-6 flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground", children: ActionIcon ? /* @__PURE__ */ jsx(ActionIcon, { className: "size-5" }) : /* @__PURE__ */ jsx(Plus, { className: "size-5" }) }),
|
|
1532
1535
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: emptyActionLabel ?? actionLabel }),
|
|
1533
1536
|
/* @__PURE__ */ jsx("span", { className: "text-xs leading-relaxed text-muted-foreground", children: emptyText })
|
|
1534
1537
|
]
|
|
@@ -1550,11 +1553,13 @@ function RecentActivityCard({
|
|
|
1550
1553
|
{
|
|
1551
1554
|
className: cn(
|
|
1552
1555
|
"group relative flex items-center border-b border-border/60 transition-colors last:border-b-0",
|
|
1553
|
-
//
|
|
1554
|
-
//
|
|
1555
|
-
//
|
|
1556
|
-
//
|
|
1557
|
-
|
|
1556
|
+
// Clearly highlight the row under the cursor so it's obvious
|
|
1557
|
+
// which item will be clicked. Use the ungated `[&:hover]`
|
|
1558
|
+
// selector rather than `hover:` — the latter compiles behind
|
|
1559
|
+
// `@media (hover: hover)`, so on a touchscreen (primary pointer
|
|
1560
|
+
// reports `hover: none`) the highlight never shows even with a
|
|
1561
|
+
// real mouse attached.
|
|
1562
|
+
"[&:hover]:bg-primary/10 has-[button:focus-visible]:bg-primary/10"
|
|
1558
1563
|
),
|
|
1559
1564
|
children: [
|
|
1560
1565
|
/* @__PURE__ */ jsxs(
|
|
@@ -1749,29 +1754,48 @@ function SectionStrip({
|
|
|
1749
1754
|
children: [
|
|
1750
1755
|
Icon && /* @__PURE__ */ jsx(Icon, { className: "size-4 shrink-0 text-muted-foreground" }),
|
|
1751
1756
|
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap text-sm font-semibold text-foreground", children: title }),
|
|
1752
|
-
count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
|
|
1753
|
-
onOpen && /* @__PURE__ */ jsx(ChevronRight, { className: "ml-auto size-4 shrink-0 text-muted-foreground/50 transition-transform group-hover:translate-x-0.5 group-hover:text-foreground" })
|
|
1757
|
+
count !== void 0 && /* @__PURE__ */ jsx("span", { className: "text-xs tabular-nums text-muted-foreground", children: count })
|
|
1754
1758
|
]
|
|
1755
1759
|
}
|
|
1756
1760
|
),
|
|
1757
|
-
actions.map(
|
|
1758
|
-
|
|
1761
|
+
actions.map(
|
|
1762
|
+
(action) => action.node ? /* @__PURE__ */ jsx("div", { className: "shrink-0", children: action.node }, action.label) : /* @__PURE__ */ jsxs(
|
|
1763
|
+
Button,
|
|
1764
|
+
{
|
|
1765
|
+
variant: "ghost",
|
|
1766
|
+
size: "sm",
|
|
1767
|
+
className: "h-8 shrink-0 px-2 text-xs font-medium text-muted-foreground hover:text-foreground",
|
|
1768
|
+
onClick: action.onClick,
|
|
1769
|
+
title: action.label,
|
|
1770
|
+
"data-testid": action.testId,
|
|
1771
|
+
children: [
|
|
1772
|
+
action.icon && /* @__PURE__ */ jsx(action.icon, { className: "size-3.5" }),
|
|
1773
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only @md:not-sr-only @md:ml-1.5", children: action.label })
|
|
1774
|
+
]
|
|
1775
|
+
},
|
|
1776
|
+
action.label
|
|
1777
|
+
)
|
|
1778
|
+
)
|
|
1779
|
+
] }),
|
|
1780
|
+
filledGroups.length === 0 ? empty ? empty.icon ? (
|
|
1781
|
+
// Fuller dashed empty state, matching a card's — an invitation, not
|
|
1782
|
+
// just a note. The icon glyph rides a tinted circle that fills on
|
|
1783
|
+
// hover, exactly like RecentActivityCard's empty card.
|
|
1784
|
+
/* @__PURE__ */ jsxs(
|
|
1785
|
+
"button",
|
|
1759
1786
|
{
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
className: "
|
|
1763
|
-
|
|
1764
|
-
title: action.label,
|
|
1765
|
-
"data-testid": action.testId,
|
|
1787
|
+
type: "button",
|
|
1788
|
+
onClick: empty.onClick,
|
|
1789
|
+
className: "group mt-2 flex w-full cursor-pointer flex-col items-center justify-center gap-2 rounded-lg border-2 border-dashed border-border px-4 py-8 text-center transition-colors hover:border-border hover:bg-accent/50 focus-visible:border-border focus-visible:bg-accent/50 focus-visible:outline-none",
|
|
1790
|
+
"data-testid": empty.testId,
|
|
1766
1791
|
children: [
|
|
1767
|
-
|
|
1768
|
-
/* @__PURE__ */ jsx("span", { className: "
|
|
1792
|
+
/* @__PURE__ */ jsx("span", { className: "mt-2 flex size-11 items-center justify-center rounded-full bg-primary/10 text-primary transition-colors group-hover:bg-primary group-hover:text-primary-foreground", children: /* @__PURE__ */ jsx(empty.icon, { className: "size-5" }) }),
|
|
1793
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-foreground", children: empty.label }),
|
|
1794
|
+
empty.description && /* @__PURE__ */ jsx("span", { className: "text-xs leading-relaxed text-muted-foreground", children: empty.description })
|
|
1769
1795
|
]
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
] }),
|
|
1774
|
-
filledGroups.length === 0 ? empty ? /* @__PURE__ */ jsxs(
|
|
1796
|
+
}
|
|
1797
|
+
)
|
|
1798
|
+
) : /* @__PURE__ */ jsxs(
|
|
1775
1799
|
"button",
|
|
1776
1800
|
{
|
|
1777
1801
|
type: "button",
|
|
@@ -1791,7 +1815,7 @@ function SectionStrip({
|
|
|
1791
1815
|
type: "button",
|
|
1792
1816
|
onClick: row.onClick,
|
|
1793
1817
|
title: row.title,
|
|
1794
|
-
className: "group flex w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 text-left transition-colors hover:bg-primary/10",
|
|
1818
|
+
className: "group flex w-full min-w-0 items-center gap-2 rounded-lg px-2 py-1.5 text-left transition-colors [&:hover]:bg-primary/10",
|
|
1795
1819
|
"data-testid": group.rowTestId ?? (testId && `${testId}-row`),
|
|
1796
1820
|
children: [
|
|
1797
1821
|
row.leading,
|