@ai-matrx/design-system 0.12.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1243,6 +1243,158 @@ interface SegmentedControlProps {
1243
1243
  }
1244
1244
  declare function SegmentedControl({ value, onValueChange, data, name: _name, className, fullWidth, size, }: SegmentedControlProps): React.JSX.Element;
1245
1245
 
1246
+ /**
1247
+ * ArchiveFilter — THE platform archive filter control.
1248
+ *
1249
+ * THE ARCHIVED-ITEMS LAW (Arman, 2026-09-09 —
1250
+ * common-docs/policies/archived-items.md): every list surface over an entity
1251
+ * that can be archived carries this control, its default hides archived rows,
1252
+ * and revealing them is ONE click. It is a class, not an instance: agents,
1253
+ * workflows, employees, HR documents, conversations, admin tables — the same
1254
+ * three states, the same words, everywhere.
1255
+ *
1256
+ * The vocabulary is `matrx-frontend/lib/entity-list`'s `ArchivedFilter`
1257
+ * verbatim (`active` | `archived` | `all`, default `active`, labels "Active
1258
+ * only" / "Archived only" / "Active + archived") so a user meets one control,
1259
+ * not one per app. `@ai-matrx/agents/catalog`'s `archFilter` is the same axis
1260
+ * with its own legacy third value (`both`); `ARCHIVE_FILTER_VALUES` is the
1261
+ * canonical set new code binds to.
1262
+ *
1263
+ * The filter is a REQUEST, never a client-side sieve: hand the value to the
1264
+ * reader (an RPC's `p_archived`, an endpoint's `archived=`) so counts, badges
1265
+ * and pagination describe what the list actually renders.
1266
+ */
1267
+
1268
+ /** The three states, in display order. */
1269
+ declare const ARCHIVE_FILTER_VALUES: readonly ["active", "archived", "all"];
1270
+ type ArchiveFilterValue = (typeof ARCHIVE_FILTER_VALUES)[number];
1271
+ /** The platform default: a list hides archived rows until asked. */
1272
+ declare const DEFAULT_ARCHIVE_FILTER: ArchiveFilterValue;
1273
+ /**
1274
+ * The ONE noun for archived rows, platform-wide. Both controls speak it: the
1275
+ * filter's `archived` state ("Archived only") and `ArchivedDisclosure`'s
1276
+ * button ("Archived (N)"). Renaming it in one place renames it in both, which
1277
+ * is the point — a user meets one word, not two.
1278
+ */
1279
+ declare const ARCHIVE_LABEL = "Archived";
1280
+ /** The one wording. Hosts pass `labels` only to shorten, never to rename. */
1281
+ declare const ARCHIVE_FILTER_LABELS: Record<ArchiveFilterValue, string>;
1282
+ /**
1283
+ * A disclosure's open/closed state said in the tri-state vocabulary, for the
1284
+ * hosts whose "Archived (N)" toggle IS a server request rather than a nested
1285
+ * render. Closed asks for the platform default (archived hidden); open asks
1286
+ * for `all`, because a disclosure reveals archived rows BESIDE the live ones —
1287
+ * it never replaces the list with the archive.
1288
+ */
1289
+ declare function archiveFilterFromDisclosure(open: boolean): ArchiveFilterValue;
1290
+ /**
1291
+ * Narrow an untrusted value (a URL param, a stored preference, an API echo)
1292
+ * to the tri-state. Anything unrecognised falls back to the platform default
1293
+ * rather than silently widening a list to archived rows.
1294
+ */
1295
+ declare function toArchiveFilter(value: unknown, fallback?: ArchiveFilterValue): ArchiveFilterValue;
1296
+ interface ArchiveFilterProps {
1297
+ value: ArchiveFilterValue;
1298
+ onValueChange: (value: ArchiveFilterValue) => void;
1299
+ /**
1300
+ * Per-state row counts, when the reader returns them (a facet query, a
1301
+ * `total_count`). A count that is not honest is worse than none, so pass a
1302
+ * key only when the number describes what the list would actually render.
1303
+ */
1304
+ counts?: Partial<Record<ArchiveFilterValue, number>>;
1305
+ /** Shorter wording for a dense toolbar. Never a different meaning. */
1306
+ labels?: Partial<Record<ArchiveFilterValue, string>>;
1307
+ size?: "sm" | "md" | "lg";
1308
+ className?: string;
1309
+ /** Accessible name for the group. */
1310
+ "aria-label"?: string;
1311
+ disabled?: boolean;
1312
+ }
1313
+ /**
1314
+ * The control. One click from "Active only" to seeing archived rows.
1315
+ */
1316
+ declare function ArchiveFilter({ value, onValueChange, counts, labels, size, className, "aria-label": ariaLabel, disabled, }: ArchiveFilterProps): React.JSX.Element;
1317
+
1318
+ /**
1319
+ * ArchivedDisclosure — THE ARCHIVED-ITEMS LAW, card-list half.
1320
+ * (`common-docs/policies/archived-items.md`, Arman 2026-09-09.)
1321
+ *
1322
+ * Every list over an entity that can be archived carries an archive control,
1323
+ * it defaults to HIDING archived rows, and revealing them is one or two
1324
+ * clicks — on the surface itself. There are exactly TWO implementations of
1325
+ * that control in the platform, and both live in THIS package:
1326
+ *
1327
+ * • `ArchiveFilter` — the tri-state segmented control (Active only /
1328
+ * Archived only / Active + archived) for table and browse surfaces whose
1329
+ * reader takes an archive parameter. Prefer it whenever the surface can
1330
+ * express the request server-side.
1331
+ * • `ArchivedDisclosure` — THIS component: a one-click "Archived (N)"
1332
+ * disclosure, closed by default, revealing the archived rows in place
1333
+ * underneath. For card lists, panels and pickers that are not table
1334
+ * shaped.
1335
+ *
1336
+ * Never invent a third. The disclosure was proven first in matrx-frontend's
1337
+ * Transcript Studio, lived as `components/official/ArchivedDisclosure` there,
1338
+ * and moved here (0.14.0) verbatim so every client inherits the same control
1339
+ * instead of re-growing it per app.
1340
+ *
1341
+ * Both controls share one vocabulary: `ARCHIVE_LABEL` is the single noun, and
1342
+ * `archiveFilterFromDisclosure(open)` says a disclosure's state in the
1343
+ * tri-state words for a host whose toggle IS a server request.
1344
+ *
1345
+ * Two shapes, one primitive:
1346
+ *
1347
+ * <ArchivedDisclosure count={n} open={open} onOpenChange={setOpen}>
1348
+ * …archived rows…
1349
+ * </ArchivedDisclosure>
1350
+ *
1351
+ * renders the button AND the revealed block. Omit `children` when the caller
1352
+ * merges the archived rows into an existing table/grid itself — the button is
1353
+ * then the whole control.
1354
+ *
1355
+ * The count is ALWAYS the true number of archived rows the surface holds. A
1356
+ * screen never lies: when there is nothing archived the control renders
1357
+ * nothing at all rather than an empty promise. A surface whose archive view is
1358
+ * a SERVER request (the rows below the button are the archived page itself,
1359
+ * not children of it) passes `keepWhileOpen` so the revealed view never loses
1360
+ * its way back.
1361
+ *
1362
+ * `countLabel` exists for the one case a bare integer cannot tell the truth: a
1363
+ * server-side count that hit its cap (render `"12+"`), or a count that has not
1364
+ * landed yet (pass `null` and no parenthetical is printed at all).
1365
+ */
1366
+
1367
+ interface ArchivedDisclosureProps {
1368
+ /** True number of archived rows this surface holds. 0 renders nothing. */
1369
+ count: number;
1370
+ /** Whether archived rows are currently revealed. */
1371
+ open: boolean;
1372
+ onOpenChange: (open: boolean) => void;
1373
+ /**
1374
+ * The archived rows. Omit when the host merges them into its own list and
1375
+ * only needs the toggle.
1376
+ */
1377
+ children?: React.ReactNode;
1378
+ /** Noun for the rows, so the button reads in the surface's own words. */
1379
+ label?: string;
1380
+ /**
1381
+ * Override the parenthetical. A string replaces the number (`"12+"` for a
1382
+ * capped server count); `null` prints no parenthetical at all, for a count
1383
+ * that has not arrived yet. Omit it and the honest `count` is printed.
1384
+ */
1385
+ countLabel?: string | null;
1386
+ /**
1387
+ * Keep the control rendered while `open` even at `count === 0`. For surfaces
1388
+ * where opening SWITCHES the list to the archive (a server-side filter)
1389
+ * rather than nesting rows inside this component: without it the way back
1390
+ * would vanish the moment the count read zero or had not landed.
1391
+ */
1392
+ keepWhileOpen?: boolean;
1393
+ className?: string;
1394
+ contentClassName?: string;
1395
+ }
1396
+ declare function ArchivedDisclosure({ count, open, onOpenChange, children, label, countLabel, keepWhileOpen, className, contentClassName, }: ArchivedDisclosureProps): React.JSX.Element | null;
1397
+
1246
1398
  declare const Select: React.FC<SelectPrimitive.SelectProps>;
1247
1399
  declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
1248
1400
  declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1976,4 +2128,4 @@ declare const ALL_MOTION_CLASSES: readonly ["matrx-motion-overlay", "matrx-motio
1976
2128
  */
1977
2129
  declare const FORBIDDEN_HOST_MOTION_UTILITIES: readonly ["animate-in", "animate-out", "fade-in", "fade-out", "zoom-in", "zoom-out", "slide-in-from", "slide-out-to", "animate-accordion", "animate-slide-down", "animate-slide-up", "animate-pulse", "animate-spin"];
1978
2130
 
1979
- export { ALL_MOTION_CLASSES, Accordion, AccordionContent, AccordionItem, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentPrimitive, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BasicInput, BasicTextarea, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, CENTERED_DIALOG, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSize, CardTitle, Checkbox, type CheckboxProps, type CheckboxSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ConfirmDialogHost, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_SCORE_THRESHOLDS, Dialog, DialogClose, DialogContent, DialogContentPrimitive, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentPrimitive, type DrawerContentProps, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerProps, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, FORBIDDEN_HOST_MOTION_UTILITIES, HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, Label, MOBILE_BREAKPOINT, MOTION_BOTTOM_SHEET, MOTION_DIALOG, MOTION_OVERLAY, MOTION_POPPER, MOTION_PULSE, MOTION_SHEET, MOTION_SPIN, OrganizationAbbreviation, OrganizationPicker, type OrganizationPickerOrganization, type OrganizationPickerProps, OverflowToolbar, type OverflowToolbarProps, POPPER_OFFSET, type PickerIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, Progress, type ProgressProps, type ProgressTone, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupSize, RadixDialogModalProvider, type RadixDialogModalProviderProps, ResizableHandle, type ResizableHandleProps, type ResizableHandleSize, ResizablePanel, ResizablePanelGroup, ScoreRing, type ScoreRingProps, type ScoreThresholds, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Switch, type SwitchProps, type SwitchSize, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableSize, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCore, Textarea, type TextareaProps, TextareaWithPrefix, type TextareaWithPrefixProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseScrollFadeResult, alertVariants, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toggleVariants, useAccordionSize, useCardSize, useDialogContainer, useDrawerDirection, useIsMobile, usePortalContainer, useRadixDialogModal, useScrollFade, useTableSize };
2131
+ export { ALL_MOTION_CLASSES, ARCHIVE_FILTER_LABELS, ARCHIVE_FILTER_VALUES, ARCHIVE_LABEL, Accordion, AccordionContent, AccordionItem, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentPrimitive, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, ArchiveFilter, type ArchiveFilterProps, type ArchiveFilterValue, ArchivedDisclosure, type ArchivedDisclosureProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BasicInput, BasicTextarea, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, CENTERED_DIALOG, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSize, CardTitle, Checkbox, type CheckboxProps, type CheckboxSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ConfirmDialogHost, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_ARCHIVE_FILTER, DEFAULT_SCORE_THRESHOLDS, Dialog, DialogClose, DialogContent, DialogContentPrimitive, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentPrimitive, type DrawerContentProps, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerProps, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, FORBIDDEN_HOST_MOTION_UTILITIES, HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, Label, MOBILE_BREAKPOINT, MOTION_BOTTOM_SHEET, MOTION_DIALOG, MOTION_OVERLAY, MOTION_POPPER, MOTION_PULSE, MOTION_SHEET, MOTION_SPIN, OrganizationAbbreviation, OrganizationPicker, type OrganizationPickerOrganization, type OrganizationPickerProps, OverflowToolbar, type OverflowToolbarProps, POPPER_OFFSET, type PickerIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, Progress, type ProgressProps, type ProgressTone, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupSize, RadixDialogModalProvider, type RadixDialogModalProviderProps, ResizableHandle, type ResizableHandleProps, type ResizableHandleSize, ResizablePanel, ResizablePanelGroup, ScoreRing, type ScoreRingProps, type ScoreThresholds, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Switch, type SwitchProps, type SwitchSize, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableSize, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCore, Textarea, type TextareaProps, TextareaWithPrefix, type TextareaWithPrefixProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseScrollFadeResult, alertVariants, archiveFilterFromDisclosure, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toArchiveFilter, toggleVariants, useAccordionSize, useCardSize, useDialogContainer, useDrawerDirection, useIsMobile, usePortalContainer, useRadixDialogModal, useScrollFade, useTableSize };
package/dist/index.d.ts CHANGED
@@ -1243,6 +1243,158 @@ interface SegmentedControlProps {
1243
1243
  }
1244
1244
  declare function SegmentedControl({ value, onValueChange, data, name: _name, className, fullWidth, size, }: SegmentedControlProps): React.JSX.Element;
1245
1245
 
1246
+ /**
1247
+ * ArchiveFilter — THE platform archive filter control.
1248
+ *
1249
+ * THE ARCHIVED-ITEMS LAW (Arman, 2026-09-09 —
1250
+ * common-docs/policies/archived-items.md): every list surface over an entity
1251
+ * that can be archived carries this control, its default hides archived rows,
1252
+ * and revealing them is ONE click. It is a class, not an instance: agents,
1253
+ * workflows, employees, HR documents, conversations, admin tables — the same
1254
+ * three states, the same words, everywhere.
1255
+ *
1256
+ * The vocabulary is `matrx-frontend/lib/entity-list`'s `ArchivedFilter`
1257
+ * verbatim (`active` | `archived` | `all`, default `active`, labels "Active
1258
+ * only" / "Archived only" / "Active + archived") so a user meets one control,
1259
+ * not one per app. `@ai-matrx/agents/catalog`'s `archFilter` is the same axis
1260
+ * with its own legacy third value (`both`); `ARCHIVE_FILTER_VALUES` is the
1261
+ * canonical set new code binds to.
1262
+ *
1263
+ * The filter is a REQUEST, never a client-side sieve: hand the value to the
1264
+ * reader (an RPC's `p_archived`, an endpoint's `archived=`) so counts, badges
1265
+ * and pagination describe what the list actually renders.
1266
+ */
1267
+
1268
+ /** The three states, in display order. */
1269
+ declare const ARCHIVE_FILTER_VALUES: readonly ["active", "archived", "all"];
1270
+ type ArchiveFilterValue = (typeof ARCHIVE_FILTER_VALUES)[number];
1271
+ /** The platform default: a list hides archived rows until asked. */
1272
+ declare const DEFAULT_ARCHIVE_FILTER: ArchiveFilterValue;
1273
+ /**
1274
+ * The ONE noun for archived rows, platform-wide. Both controls speak it: the
1275
+ * filter's `archived` state ("Archived only") and `ArchivedDisclosure`'s
1276
+ * button ("Archived (N)"). Renaming it in one place renames it in both, which
1277
+ * is the point — a user meets one word, not two.
1278
+ */
1279
+ declare const ARCHIVE_LABEL = "Archived";
1280
+ /** The one wording. Hosts pass `labels` only to shorten, never to rename. */
1281
+ declare const ARCHIVE_FILTER_LABELS: Record<ArchiveFilterValue, string>;
1282
+ /**
1283
+ * A disclosure's open/closed state said in the tri-state vocabulary, for the
1284
+ * hosts whose "Archived (N)" toggle IS a server request rather than a nested
1285
+ * render. Closed asks for the platform default (archived hidden); open asks
1286
+ * for `all`, because a disclosure reveals archived rows BESIDE the live ones —
1287
+ * it never replaces the list with the archive.
1288
+ */
1289
+ declare function archiveFilterFromDisclosure(open: boolean): ArchiveFilterValue;
1290
+ /**
1291
+ * Narrow an untrusted value (a URL param, a stored preference, an API echo)
1292
+ * to the tri-state. Anything unrecognised falls back to the platform default
1293
+ * rather than silently widening a list to archived rows.
1294
+ */
1295
+ declare function toArchiveFilter(value: unknown, fallback?: ArchiveFilterValue): ArchiveFilterValue;
1296
+ interface ArchiveFilterProps {
1297
+ value: ArchiveFilterValue;
1298
+ onValueChange: (value: ArchiveFilterValue) => void;
1299
+ /**
1300
+ * Per-state row counts, when the reader returns them (a facet query, a
1301
+ * `total_count`). A count that is not honest is worse than none, so pass a
1302
+ * key only when the number describes what the list would actually render.
1303
+ */
1304
+ counts?: Partial<Record<ArchiveFilterValue, number>>;
1305
+ /** Shorter wording for a dense toolbar. Never a different meaning. */
1306
+ labels?: Partial<Record<ArchiveFilterValue, string>>;
1307
+ size?: "sm" | "md" | "lg";
1308
+ className?: string;
1309
+ /** Accessible name for the group. */
1310
+ "aria-label"?: string;
1311
+ disabled?: boolean;
1312
+ }
1313
+ /**
1314
+ * The control. One click from "Active only" to seeing archived rows.
1315
+ */
1316
+ declare function ArchiveFilter({ value, onValueChange, counts, labels, size, className, "aria-label": ariaLabel, disabled, }: ArchiveFilterProps): React.JSX.Element;
1317
+
1318
+ /**
1319
+ * ArchivedDisclosure — THE ARCHIVED-ITEMS LAW, card-list half.
1320
+ * (`common-docs/policies/archived-items.md`, Arman 2026-09-09.)
1321
+ *
1322
+ * Every list over an entity that can be archived carries an archive control,
1323
+ * it defaults to HIDING archived rows, and revealing them is one or two
1324
+ * clicks — on the surface itself. There are exactly TWO implementations of
1325
+ * that control in the platform, and both live in THIS package:
1326
+ *
1327
+ * • `ArchiveFilter` — the tri-state segmented control (Active only /
1328
+ * Archived only / Active + archived) for table and browse surfaces whose
1329
+ * reader takes an archive parameter. Prefer it whenever the surface can
1330
+ * express the request server-side.
1331
+ * • `ArchivedDisclosure` — THIS component: a one-click "Archived (N)"
1332
+ * disclosure, closed by default, revealing the archived rows in place
1333
+ * underneath. For card lists, panels and pickers that are not table
1334
+ * shaped.
1335
+ *
1336
+ * Never invent a third. The disclosure was proven first in matrx-frontend's
1337
+ * Transcript Studio, lived as `components/official/ArchivedDisclosure` there,
1338
+ * and moved here (0.14.0) verbatim so every client inherits the same control
1339
+ * instead of re-growing it per app.
1340
+ *
1341
+ * Both controls share one vocabulary: `ARCHIVE_LABEL` is the single noun, and
1342
+ * `archiveFilterFromDisclosure(open)` says a disclosure's state in the
1343
+ * tri-state words for a host whose toggle IS a server request.
1344
+ *
1345
+ * Two shapes, one primitive:
1346
+ *
1347
+ * <ArchivedDisclosure count={n} open={open} onOpenChange={setOpen}>
1348
+ * …archived rows…
1349
+ * </ArchivedDisclosure>
1350
+ *
1351
+ * renders the button AND the revealed block. Omit `children` when the caller
1352
+ * merges the archived rows into an existing table/grid itself — the button is
1353
+ * then the whole control.
1354
+ *
1355
+ * The count is ALWAYS the true number of archived rows the surface holds. A
1356
+ * screen never lies: when there is nothing archived the control renders
1357
+ * nothing at all rather than an empty promise. A surface whose archive view is
1358
+ * a SERVER request (the rows below the button are the archived page itself,
1359
+ * not children of it) passes `keepWhileOpen` so the revealed view never loses
1360
+ * its way back.
1361
+ *
1362
+ * `countLabel` exists for the one case a bare integer cannot tell the truth: a
1363
+ * server-side count that hit its cap (render `"12+"`), or a count that has not
1364
+ * landed yet (pass `null` and no parenthetical is printed at all).
1365
+ */
1366
+
1367
+ interface ArchivedDisclosureProps {
1368
+ /** True number of archived rows this surface holds. 0 renders nothing. */
1369
+ count: number;
1370
+ /** Whether archived rows are currently revealed. */
1371
+ open: boolean;
1372
+ onOpenChange: (open: boolean) => void;
1373
+ /**
1374
+ * The archived rows. Omit when the host merges them into its own list and
1375
+ * only needs the toggle.
1376
+ */
1377
+ children?: React.ReactNode;
1378
+ /** Noun for the rows, so the button reads in the surface's own words. */
1379
+ label?: string;
1380
+ /**
1381
+ * Override the parenthetical. A string replaces the number (`"12+"` for a
1382
+ * capped server count); `null` prints no parenthetical at all, for a count
1383
+ * that has not arrived yet. Omit it and the honest `count` is printed.
1384
+ */
1385
+ countLabel?: string | null;
1386
+ /**
1387
+ * Keep the control rendered while `open` even at `count === 0`. For surfaces
1388
+ * where opening SWITCHES the list to the archive (a server-side filter)
1389
+ * rather than nesting rows inside this component: without it the way back
1390
+ * would vanish the moment the count read zero or had not landed.
1391
+ */
1392
+ keepWhileOpen?: boolean;
1393
+ className?: string;
1394
+ contentClassName?: string;
1395
+ }
1396
+ declare function ArchivedDisclosure({ count, open, onOpenChange, children, label, countLabel, keepWhileOpen, className, contentClassName, }: ArchivedDisclosureProps): React.JSX.Element | null;
1397
+
1246
1398
  declare const Select: React.FC<SelectPrimitive.SelectProps>;
1247
1399
  declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
1248
1400
  declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
@@ -1976,4 +2128,4 @@ declare const ALL_MOTION_CLASSES: readonly ["matrx-motion-overlay", "matrx-motio
1976
2128
  */
1977
2129
  declare const FORBIDDEN_HOST_MOTION_UTILITIES: readonly ["animate-in", "animate-out", "fade-in", "fade-out", "zoom-in", "zoom-out", "slide-in-from", "slide-out-to", "animate-accordion", "animate-slide-down", "animate-slide-up", "animate-pulse", "animate-spin"];
1978
2130
 
1979
- export { ALL_MOTION_CLASSES, Accordion, AccordionContent, AccordionItem, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentPrimitive, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BasicInput, BasicTextarea, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, CENTERED_DIALOG, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSize, CardTitle, Checkbox, type CheckboxProps, type CheckboxSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ConfirmDialogHost, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_SCORE_THRESHOLDS, Dialog, DialogClose, DialogContent, DialogContentPrimitive, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentPrimitive, type DrawerContentProps, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerProps, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, FORBIDDEN_HOST_MOTION_UTILITIES, HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, Label, MOBILE_BREAKPOINT, MOTION_BOTTOM_SHEET, MOTION_DIALOG, MOTION_OVERLAY, MOTION_POPPER, MOTION_PULSE, MOTION_SHEET, MOTION_SPIN, OrganizationAbbreviation, OrganizationPicker, type OrganizationPickerOrganization, type OrganizationPickerProps, OverflowToolbar, type OverflowToolbarProps, POPPER_OFFSET, type PickerIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, Progress, type ProgressProps, type ProgressTone, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupSize, RadixDialogModalProvider, type RadixDialogModalProviderProps, ResizableHandle, type ResizableHandleProps, type ResizableHandleSize, ResizablePanel, ResizablePanelGroup, ScoreRing, type ScoreRingProps, type ScoreThresholds, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Switch, type SwitchProps, type SwitchSize, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableSize, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCore, Textarea, type TextareaProps, TextareaWithPrefix, type TextareaWithPrefixProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseScrollFadeResult, alertVariants, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toggleVariants, useAccordionSize, useCardSize, useDialogContainer, useDrawerDirection, useIsMobile, usePortalContainer, useRadixDialogModal, useScrollFade, useTableSize };
2131
+ export { ALL_MOTION_CLASSES, ARCHIVE_FILTER_LABELS, ARCHIVE_FILTER_VALUES, ARCHIVE_LABEL, Accordion, AccordionContent, AccordionItem, type AccordionProps, type AccordionSize, AccordionTrigger, type AccordionTriggerProps, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogContentPrimitive, type AlertDialogContentProps, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, ArchiveFilter, type ArchiveFilterProps, type ArchiveFilterValue, ArchivedDisclosure, type ArchivedDisclosureProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, type AvatarSize, Badge, type BadgeProps, BasicInput, BasicTextarea, BottomSheet, BottomSheetBody, type BottomSheetBodyProps, BottomSheetFooter, type BottomSheetFooterProps, BottomSheetHeader, type BottomSheetHeaderProps, type BottomSheetProps, Button, type ButtonProps, CENTERED_DIALOG, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, type CardProps, type CardSize, CardTitle, Checkbox, type CheckboxProps, type CheckboxSize, Collapsible, CollapsibleContent, type CollapsibleContentProps, CollapsibleTrigger, Command, CommandDialog, type CommandDialogProps, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfirmDialog, ConfirmDialogHost, type ConfirmDialogProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, type ContextMenuContentProps, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CreatableOption, CreatablePicker, type CreatablePickerProps, DEFAULT_ARCHIVE_FILTER, DEFAULT_SCORE_THRESHOLDS, Dialog, DialogClose, DialogContent, DialogContentPrimitive, type DialogContentProps, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerContentPrimitive, type DrawerContentProps, DrawerDescription, type DrawerDirection, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, type DrawerProps, type DrawerSize, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EditableLabel, type EditableLabelActivation, type EditableLabelCommitMode, type EditableLabelProps, EnterInput, type EnterInputProps, FORBIDDEN_HOST_MOTION_UTILITIES, HoverCard, HoverCardContent, type HoverCardContentProps, HoverCardTrigger, Input, type InputProps, type InputVariant, InputWithPrefix, type InputWithPrefixProps, Label, MOBILE_BREAKPOINT, MOTION_BOTTOM_SHEET, MOTION_DIALOG, MOTION_OVERLAY, MOTION_POPPER, MOTION_PULSE, MOTION_SHEET, MOTION_SPIN, OrganizationAbbreviation, OrganizationPicker, type OrganizationPickerOrganization, type OrganizationPickerProps, OverflowToolbar, type OverflowToolbarProps, POPPER_OFFSET, type PickerIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentProps, PopoverTrigger, PortalContainerProvider, type PortalContainerProviderProps, Progress, type ProgressProps, type ProgressTone, RadioGroup, RadioGroupItem, type RadioGroupItemProps, type RadioGroupProps, type RadioGroupSize, RadixDialogModalProvider, type RadixDialogModalProviderProps, ResizableHandle, type ResizableHandleProps, type ResizableHandleSize, ResizablePanel, ResizablePanelGroup, ScoreRing, type ScoreRingProps, type ScoreThresholds, ScrollArea, type ScrollAreaProps, ScrollBar, type ScrollFadeState, type SegmentOption, SegmentedControl, type SegmentedControlProps, Select, SelectContent, type SelectContentProps, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, SheetContent, type SheetContentProps, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderSize, Switch, type SwitchProps, type SwitchSize, TabbedBottomSheet, type TabbedBottomSheetProps, type TabbedBottomSheetTab, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableSize, Tabs, TabsContent, TabsList, TabsTrigger, TabsTriggerCore, Textarea, type TextareaProps, TextareaWithPrefix, type TextareaWithPrefixProps, Toggle, ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps, type ToggleGroupProps, type ToggleProps, type ToolbarAction, type ToolbarActionTone, type ToolbarIcon, Tooltip, TooltipContent, type TooltipContentProps, TooltipProvider, TooltipTrigger, type UseScrollFadeResult, alertVariants, archiveFilterFromDisclosure, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toArchiveFilter, toggleVariants, useAccordionSize, useCardSize, useDialogContainer, useDrawerDirection, useIsMobile, usePortalContainer, useRadixDialogModal, useScrollFade, useTableSize };