@ai-matrx/design-system 0.13.0 → 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/CHANGELOG.md +62 -0
- package/dist/index.cjs +169 -118
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -1
- package/dist/index.d.ts +96 -1
- package/dist/index.js +169 -118
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1270,8 +1270,23 @@ declare const ARCHIVE_FILTER_VALUES: readonly ["active", "archived", "all"];
|
|
|
1270
1270
|
type ArchiveFilterValue = (typeof ARCHIVE_FILTER_VALUES)[number];
|
|
1271
1271
|
/** The platform default: a list hides archived rows until asked. */
|
|
1272
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";
|
|
1273
1280
|
/** The one wording. Hosts pass `labels` only to shorten, never to rename. */
|
|
1274
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;
|
|
1275
1290
|
/**
|
|
1276
1291
|
* Narrow an untrusted value (a URL param, a stored preference, an API echo)
|
|
1277
1292
|
* to the tri-state. Anything unrecognised falls back to the platform default
|
|
@@ -1300,6 +1315,86 @@ interface ArchiveFilterProps {
|
|
|
1300
1315
|
*/
|
|
1301
1316
|
declare function ArchiveFilter({ value, onValueChange, counts, labels, size, className, "aria-label": ariaLabel, disabled, }: ArchiveFilterProps): React.JSX.Element;
|
|
1302
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
|
+
|
|
1303
1398
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
1304
1399
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
1305
1400
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -2033,4 +2128,4 @@ declare const ALL_MOTION_CLASSES: readonly ["matrx-motion-overlay", "matrx-motio
|
|
|
2033
2128
|
*/
|
|
2034
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"];
|
|
2035
2130
|
|
|
2036
|
-
export { ALL_MOTION_CLASSES, ARCHIVE_FILTER_LABELS, ARCHIVE_FILTER_VALUES, 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, 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, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toArchiveFilter, 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
|
@@ -1270,8 +1270,23 @@ declare const ARCHIVE_FILTER_VALUES: readonly ["active", "archived", "all"];
|
|
|
1270
1270
|
type ArchiveFilterValue = (typeof ARCHIVE_FILTER_VALUES)[number];
|
|
1271
1271
|
/** The platform default: a list hides archived rows until asked. */
|
|
1272
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";
|
|
1273
1280
|
/** The one wording. Hosts pass `labels` only to shorten, never to rename. */
|
|
1274
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;
|
|
1275
1290
|
/**
|
|
1276
1291
|
* Narrow an untrusted value (a URL param, a stored preference, an API echo)
|
|
1277
1292
|
* to the tri-state. Anything unrecognised falls back to the platform default
|
|
@@ -1300,6 +1315,86 @@ interface ArchiveFilterProps {
|
|
|
1300
1315
|
*/
|
|
1301
1316
|
declare function ArchiveFilter({ value, onValueChange, counts, labels, size, className, "aria-label": ariaLabel, disabled, }: ArchiveFilterProps): React.JSX.Element;
|
|
1302
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
|
+
|
|
1303
1398
|
declare const Select: React.FC<SelectPrimitive.SelectProps>;
|
|
1304
1399
|
declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
1305
1400
|
declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -2033,4 +2128,4 @@ declare const ALL_MOTION_CLASSES: readonly ["matrx-motion-overlay", "matrx-motio
|
|
|
2033
2128
|
*/
|
|
2034
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"];
|
|
2035
2130
|
|
|
2036
|
-
export { ALL_MOTION_CLASSES, ARCHIVE_FILTER_LABELS, ARCHIVE_FILTER_VALUES, 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, 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, badgeVariants, buttonVariants, cn, scoreAccentBgClasses, scoreRingColorClasses, selectTriggerVariants, sheetVariants, toArchiveFilter, 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 };
|