@ai-matrx/design-system 0.86.350 → 0.86.352
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 +10 -0
- package/dist/carousel.js +2 -2
- package/dist/{chunk-BCGNEWZM.js → chunk-FLWSEDUW.js} +2 -2
- package/dist/{chunk-UTADJKVR.js → chunk-GMNROZQJ.js} +3 -3
- package/dist/{chunk-UTADJKVR.js.map → chunk-GMNROZQJ.js.map} +1 -1
- package/dist/{chunk-SC3XPADZ.js → chunk-UGQRAQTE.js} +431 -342
- package/dist/chunk-UGQRAQTE.js.map +1 -0
- package/dist/controls.cjs +547 -458
- package/dist/controls.cjs.map +1 -1
- package/dist/controls.css +27 -18
- package/dist/controls.d.cts +51 -3
- package/dist/controls.d.ts +51 -3
- package/dist/controls.js +10 -2
- package/dist/data-table/index.cjs +45 -38
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +44 -37
- package/dist/data-table/index.js.map +1 -1
- package/dist/desktop.cjs +98 -34
- package/dist/desktop.cjs.map +1 -1
- package/dist/desktop.css +29 -0
- package/dist/desktop.d.cts +17 -5
- package/dist/desktop.d.ts +17 -5
- package/dist/desktop.js +98 -34
- package/dist/desktop.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/settings.cjs +2 -2
- package/dist/settings.cjs.map +1 -1
- package/dist/settings.js +1 -1
- package/dist/writing-field.cjs +2 -2
- package/dist/writing-field.cjs.map +1 -1
- package/dist/writing-field.js +1 -1
- package/package.json +2 -2
- package/dist/chunk-SC3XPADZ.js.map +0 -1
- /package/dist/{chunk-BCGNEWZM.js.map → chunk-FLWSEDUW.js.map} +0 -0
package/dist/desktop.css
CHANGED
|
@@ -549,6 +549,16 @@
|
|
|
549
549
|
padding-inline: var(--dialog-pad);
|
|
550
550
|
border-block: 1px solid transparent;
|
|
551
551
|
}
|
|
552
|
+
/* A body's least height (DialogBody minHeight): it grows with its content above it, up to the sheet's max. */
|
|
553
|
+
[data-desktop-sheet] > [data-slot="sheet-body"][data-min-height="sm"] {
|
|
554
|
+
min-height: 10rem;
|
|
555
|
+
}
|
|
556
|
+
[data-desktop-sheet] > [data-slot="sheet-body"][data-min-height="md"] {
|
|
557
|
+
min-height: 15rem;
|
|
558
|
+
}
|
|
559
|
+
[data-desktop-sheet] > [data-slot="sheet-body"][data-min-height="lg"] {
|
|
560
|
+
min-height: 20rem;
|
|
561
|
+
}
|
|
552
562
|
[data-desktop-sheet] > [data-slot="sheet-body"][data-overflowing] {
|
|
553
563
|
border-block-color: var(--mx-separator);
|
|
554
564
|
padding-block: 0.75rem;
|
|
@@ -1308,3 +1318,22 @@
|
|
|
1308
1318
|
color: var(--mx-label);
|
|
1309
1319
|
padding: 10px 10px 10px 12px;
|
|
1310
1320
|
}
|
|
1321
|
+
/* Inside the card the title is one line cut with an ellipsis and the line at most two, so a long
|
|
1322
|
+
notice never runs past the card or under its ×. Plain CSS here (not utility classes) so every
|
|
1323
|
+
host's build draws it. */
|
|
1324
|
+
[data-slot="banner"][data-float] [data-slot="banner-title"] {
|
|
1325
|
+
display: block;
|
|
1326
|
+
overflow: hidden;
|
|
1327
|
+
text-overflow: ellipsis;
|
|
1328
|
+
white-space: nowrap;
|
|
1329
|
+
}
|
|
1330
|
+
[data-slot="banner"][data-float] [data-slot="banner-message"] {
|
|
1331
|
+
display: -webkit-box;
|
|
1332
|
+
-webkit-line-clamp: 2;
|
|
1333
|
+
-webkit-box-orient: vertical;
|
|
1334
|
+
overflow: hidden;
|
|
1335
|
+
overflow-wrap: anywhere;
|
|
1336
|
+
}
|
|
1337
|
+
[data-slot="banner"][data-float] [data-slot="banner-text"] {
|
|
1338
|
+
flex-basis: 0;
|
|
1339
|
+
}
|
package/dist/desktop.d.cts
CHANGED
|
@@ -1338,13 +1338,15 @@ interface TableFilterBarProps<T> extends TableFilterMenuProps<T> {
|
|
|
1338
1338
|
shown: number;
|
|
1339
1339
|
/** What the rows are, for the search field's name ("Search processes"). */
|
|
1340
1340
|
label: string;
|
|
1341
|
+
/** What one row is, singular and plural (["chat", "chats"]): the count then says "2 chats", "1 of 2 chats", never a bare number. */
|
|
1342
|
+
noun?: readonly [string, string] | undefined;
|
|
1341
1343
|
}
|
|
1342
1344
|
/**
|
|
1343
1345
|
* The table's own filter bar (Finder's search bar, Mail's filter tokens), drawn above its header
|
|
1344
1346
|
* at one fixed height whether or not a filter is on, so the rows never move when one changes: the
|
|
1345
1347
|
* active filters' tokens (or the row count) lead; the search field and the filter button trail.
|
|
1346
1348
|
*/
|
|
1347
|
-
declare function TableFilterBar<T>({ columns, rows, state, onChange, shown, label }: TableFilterBarProps<T>): React.JSX.Element;
|
|
1349
|
+
declare function TableFilterBar<T>({ columns, rows, state, onChange, shown, label, noun }: TableFilterBarProps<T>): React.JSX.Element;
|
|
1348
1350
|
declare function ClearFiltersButton({ onClear, className }: {
|
|
1349
1351
|
onClear: () => void;
|
|
1350
1352
|
className?: string;
|
|
@@ -1508,6 +1510,8 @@ interface DataTableProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, "
|
|
|
1508
1510
|
* when the page draws the controls itself (`SearchField` + `TableFilterMenu` in its header's
|
|
1509
1511
|
* actions) and passes `filterState`. */
|
|
1510
1512
|
filterBar?: boolean;
|
|
1513
|
+
/** What one row is, singular and plural (["chat", "chats"]): the filter bar's count says "2 chats". */
|
|
1514
|
+
noun?: readonly [string, string];
|
|
1511
1515
|
className?: string;
|
|
1512
1516
|
}
|
|
1513
1517
|
/** Which optional columns start hidden (`Column.optional === "hidden"`). */
|
|
@@ -1519,7 +1523,7 @@ declare function initiallyHiddenColumns(columns: ReadonlyArray<Pick<Column<never
|
|
|
1519
1523
|
* column kinds sized like Activity Monitor's, the accent selection while focused. Arrow keys move
|
|
1520
1524
|
* between rows when rows are selectable.
|
|
1521
1525
|
*/
|
|
1522
|
-
declare function DataTable<T>({ rowKey, onRowSelect, selectedKey, selectedKeys, onSelectedKeysChange, empty, striped, detail, isDisabled, rowAction, rowMenu, rowButtons, defaultSort, rowData, limit, sort: sortProp, onSortChange, selection, onRowOpen, subRows, outline, expandable, onOutlineChange, rowSize, fill, spare, rowContextMenu, hiddenColumns, onHiddenColumnsChange, groups, filterState, onFilterStateChange, defaultFilter, filterBar, className, "aria-label": ariaLabel, columns: allColumns, rows: givenRows, ...rest }: DataTableProps<T>): React.JSX.Element;
|
|
1526
|
+
declare function DataTable<T>({ rowKey, onRowSelect, selectedKey, selectedKeys, onSelectedKeysChange, empty, striped, detail, isDisabled, rowAction, rowMenu, rowButtons, defaultSort, rowData, limit, sort: sortProp, onSortChange, selection, onRowOpen, subRows, outline, expandable, onOutlineChange, rowSize, fill, spare, rowContextMenu, hiddenColumns, onHiddenColumnsChange, groups, filterState, onFilterStateChange, defaultFilter, filterBar, noun, className, "aria-label": ariaLabel, columns: allColumns, rows: givenRows, ...rest }: DataTableProps<T>): React.JSX.Element;
|
|
1523
1527
|
interface NameCellProps {
|
|
1524
1528
|
/** The thing's name: it gets the room first, ends in an ellipsis when it must, and its tooltip
|
|
1525
1529
|
* is the whole name. */
|
|
@@ -2200,7 +2204,7 @@ interface BannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"
|
|
|
2200
2204
|
* THE inline notice (one pattern, every screen): the tone's icon, a semantic tint, one fixed
|
|
2201
2205
|
* minimum height, the title and one line, trailing actions, and × when it can be put away.
|
|
2202
2206
|
*/
|
|
2203
|
-
declare function Banner({ tone, icon, title, message, actions, detail, onDismiss, count, className, ...props }: BannerProps): React.JSX.Element;
|
|
2207
|
+
declare function Banner({ tone, icon, title, message, actions, detail, onDismiss, count, className, ...props }: BannerProps): React.JSX.Element | null;
|
|
2204
2208
|
interface ErrorBannerProps extends Omit<BannerProps, "tone" | "title" | "message" | "actions" | "detail" | "onDismiss"> {
|
|
2205
2209
|
/** The failed action's error (e.g. `useDesktopAction().error`); nothing renders without one. */
|
|
2206
2210
|
error: {
|
|
@@ -2875,7 +2879,15 @@ declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTML
|
|
|
2875
2879
|
* button bar stay put, and only this body scrolls between them. When it holds more than shows, a
|
|
2876
2880
|
* hairline marks each edge it scrolls under, as System Settings' sheets do; a short body has none.
|
|
2877
2881
|
*/
|
|
2878
|
-
|
|
2882
|
+
interface DialogBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2883
|
+
/**
|
|
2884
|
+
* The least the body is tall (a result sheet: Finder's and Xcode's keep a few rows of room however
|
|
2885
|
+
* few rows there are): `sm` 10 rem, `md` 15 rem, `lg` 20 rem. Above it the sheet grows with its
|
|
2886
|
+
* content up to its max height, then only the body scrolls. Unset: as short as its content.
|
|
2887
|
+
*/
|
|
2888
|
+
minHeight?: "sm" | "md" | "lg";
|
|
2889
|
+
}
|
|
2890
|
+
declare function DialogBody({ className, children, minHeight, ...props }: DialogBodyProps): React.JSX.Element;
|
|
2879
2891
|
/** The sheet's buttons: trailing, 8 px apart, the default (primary) one rightmost. */
|
|
2880
2892
|
declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
2881
2893
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -3344,4 +3356,4 @@ interface OrganizationPickerSheetProps {
|
|
|
3344
3356
|
declare function OrganizationPickerSheet({ open, onOpenChange, organizations, activeOrganizationId, favoriteOrganizationIds, onSwitch, onToggleFavorite, }: OrganizationPickerSheetProps): React.JSX.Element;
|
|
3345
3357
|
|
|
3346
3358
|
export { ActivityChart, AppRail, AppRailAvatar, AppRailGroup, AppRailItem, AppRailSpacer, Avatar, Banner, Button, CONSOLE_LINE_PX, CREDENTIAL_DOTS, CallButton, CanvasLayout, Checkbox, ChecklistAddRow, ChecklistRow, ClearFiltersButton, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, ColumnBrowser, ComingSoon, CompareLines, CompareView, ConfirmDialog, ConfirmDialogHost, ContextMenu, ContextMenuContent, ContextMenuEntries, ContextMenuItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger, ConversationHeader, CredentialField, CredentialFields, CredentialHeader, DataTable, DateStepper, DeviceFrame, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Disclosure, DisplayArrangement, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEntries, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EMPTY_TABLE_FILTER, EdgeResizer, EmptyContent, ErrorBanner, FIELD, FactList, FavoriteTile, FieldRow, GetButton, GroupTable, HelpButton, INFO_HINT_MAX, IconButton, IconView, IconViewItem, InfoButton, InfoFacts, InfoHeader, InfoHint, InfoStrip, InspectorPanel, Kbd, LOG_LINE_PX, LevelIndicator, LinkButton, ListHeading, ListRow, LogView, METER_THRESHOLDS, MenuItemLabel, MessageComposer, MessageList, Meter, MiddleTruncate, ModeSwitch, NameCell, NativeConfirmProvider, NavigatorColumn, NavigatorCustomizeSheet, NavigatorItem, NoticeSlot, Notices, OrganizationMark, OrganizationPickerSheet, POPOVER_ARROW, Page, PageHeader, PaneHeader, PathBar, PlaceMark, PlaceStrip, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressRing, PullDownButton, QuickLookSheet, RecordButton, RemovableTag, RenameField, ResizablePane, Resource, Row, ScopeBar, SearchField, Section, SectionButtons, SectionContent, Segmented, Select, ShortcutTile, Skeleton, Slider, SourceList, SourceListItem, SourceListMore, SourceListSection, SourceText, Sparkline, Spinner, SplitView, StartPage, StartPageSection, StateCell, StateView, StatusBar, StatusDot, StatusLight, StoreHeader, StoreLockup, StoreShelf, SummaryFact, SummaryPane, SummaryStrip, Switch, SymbolProvider, SymbolTile, SystemSymbol, TERMINAL_PROFILE, TEXT_STYLE_POINTS, TEXT_TONE, TOOLTIP_TEXT_BUDGET, TableFilterBar, TableFilterMenu, TableFilterTokens, Tag, Text, TextArea, TextField, TileGrid, TimedCode, Toolbar, ToolbarDivider, ToolbarGroup, ToolbarOverflow, ToolbarSpacer, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UnreadDot, UsageBar, Waveform, WindowToolbarActions, WindowToolbarHostMenu, WindowToolbarProvider, WindowToolbarTitle, baseNameEnd, buttonVariants, clipTooltipText, cn, columnKind, columnName, dateSectionOf, describeError, errorMessage, filterActive, filterChoices, filterRows, filterValues, formatAge, formatBytes, formatClockTime, formatDuration, formatFinderDate, formatMemory, formatMemoryUsage, formatUsage, groupByDateSection, infoHintText, initiallyHiddenColumns, meterTone, moveItem, organizationColor, peaksOf, tableFilters, tileColorFor, useWindowToolbarFull, useWindowToolbarOwnsMore };
|
|
3347
|
-
export type { ActivityBar, ActivityChartProps, AppRailAvatarProps, AppRailItemProps, ArrangedDisplay, AvatarProps, BannerProps, BannerTone, ButtonProps, CallButtonProps, CanvasColumnDef, CanvasLayoutProps, CanvasPanelDef, CheckboxProps, ChecklistAddRowProps, ChecklistRowProps, CodeBlockProps, Column, ColumnBrowserColumn, ColumnBrowserProps, ColumnFilter, ColumnKind, ColumnValuesFilter, ComingSoonProps, CompareChange, CompareLinesProps, ComparePane, CompareViewProps, ConfirmDialogProps, ConversationHeaderProps, CredentialFieldProps, CredentialHeaderProps, DataTableProps, DateSection, DateSectionKey, DateStepperProps, DatedSection, DescribedError, DesktopPickerOrganization, DesktopPopoverContentProps, DeviceFrameProps, DisclosureProps, DisplayArrangementProps, EdgeResizerProps, EmptyContentProps, ErrorBannerProps, Fact, FactListProps, FavoriteTileProps, FieldRowProps, FilterChoice, FilterableColumn, FinderDateOptions, GetButtonProps, GetButtonState, GroupTableColumn, GroupTableProps, GroupTableRow, HelpButtonProps, IconButtonProps, IconViewItemProps, IconViewProps, InfoButtonProps, InfoFact, InfoFactsProps, InfoHeaderProps, InfoHintProps, InfoStripItem, InfoStripProps, InspectorPanelProps, LevelIndicatorProps, LinkButtonProps, ListColor, ListHeadingProps, ListRowProps, LogColumns, LogLine, LogViewProps, MessageComposerProps, MessageListProps, MeterProps, ModeSwitchOption, ModeSwitchProps, NameCellProps, NativeConfirm, NativeConfirmRequest, NavigatorCustomizeItem, NavigatorCustomizeSheetProps, NavigatorItemProps, OrganizationPickerSheetProps, PageHeaderProps, PageProps, PageWidth, PaneHeaderProps, PathBarItem, PlaceMarkProps, PlaceMarkState, ProgressRingProps, PullDownButtonProps, QuickLookSheetProps, RecordButtonProps, RemovableTagProps, RenameFieldProps, ResizablePaneProps, ResourceProps, ResourceState, RowAction, RowMenuItem, RowProps, Scope, ScopeBarProps, SearchFieldProps, SectionButtonsProps, SectionProps, Segment, SegmentedProps, SelectOption, SelectProps, ShortcutTileProps, SliderProps, SortState, SourceLanguage, SourceListItemProps, SourceListMoreProps, SourceListProps, SourceListSectionProps, SparklineProps, SpinnerProps, SplitViewProps, StartPageProps, StartPageSectionProps, StateCellProps, StateViewProps, StatusBarProps, StatusDotProps, StatusLightProps, StatusTone$1 as StatusLightTone, StatusTone, StoreHeaderProps, StoreLockupProps, StoreShelfProps, SummaryFactProps, SummaryPaneProps, SwitchProps, SymbolImage, SymbolResolver, SymbolTileColor, SymbolTileProps, SymbolTileSize, SymbolWeight, SystemSymbolProps, TableFilterBarProps, TableFilterMenuProps, TableFilterState, TableGroups, TagProps, TagTone, TextAreaProps, TextFieldProps, TextProps, TextTone, TextVariant, TileGridProps, TimedCodeProps, ToolbarOverflowItem, ToolbarOverflowProps, ToolbarProps, TooltipContentProps, UsageBarProps, UsageColor, UsageSegment, WaveformProps, WindowToolbarTitleProps };
|
|
3359
|
+
export type { ActivityBar, ActivityChartProps, AppRailAvatarProps, AppRailItemProps, ArrangedDisplay, AvatarProps, BannerProps, BannerTone, ButtonProps, CallButtonProps, CanvasColumnDef, CanvasLayoutProps, CanvasPanelDef, CheckboxProps, ChecklistAddRowProps, ChecklistRowProps, CodeBlockProps, Column, ColumnBrowserColumn, ColumnBrowserProps, ColumnFilter, ColumnKind, ColumnValuesFilter, ComingSoonProps, CompareChange, CompareLinesProps, ComparePane, CompareViewProps, ConfirmDialogProps, ConversationHeaderProps, CredentialFieldProps, CredentialHeaderProps, DataTableProps, DateSection, DateSectionKey, DateStepperProps, DatedSection, DescribedError, DesktopPickerOrganization, DesktopPopoverContentProps, DeviceFrameProps, DialogBodyProps, DisclosureProps, DisplayArrangementProps, EdgeResizerProps, EmptyContentProps, ErrorBannerProps, Fact, FactListProps, FavoriteTileProps, FieldRowProps, FilterChoice, FilterableColumn, FinderDateOptions, GetButtonProps, GetButtonState, GroupTableColumn, GroupTableProps, GroupTableRow, HelpButtonProps, IconButtonProps, IconViewItemProps, IconViewProps, InfoButtonProps, InfoFact, InfoFactsProps, InfoHeaderProps, InfoHintProps, InfoStripItem, InfoStripProps, InspectorPanelProps, LevelIndicatorProps, LinkButtonProps, ListColor, ListHeadingProps, ListRowProps, LogColumns, LogLine, LogViewProps, MessageComposerProps, MessageListProps, MeterProps, ModeSwitchOption, ModeSwitchProps, NameCellProps, NativeConfirm, NativeConfirmRequest, NavigatorCustomizeItem, NavigatorCustomizeSheetProps, NavigatorItemProps, OrganizationPickerSheetProps, PageHeaderProps, PageProps, PageWidth, PaneHeaderProps, PathBarItem, PlaceMarkProps, PlaceMarkState, ProgressRingProps, PullDownButtonProps, QuickLookSheetProps, RecordButtonProps, RemovableTagProps, RenameFieldProps, ResizablePaneProps, ResourceProps, ResourceState, RowAction, RowMenuItem, RowProps, Scope, ScopeBarProps, SearchFieldProps, SectionButtonsProps, SectionProps, Segment, SegmentedProps, SelectOption, SelectProps, ShortcutTileProps, SliderProps, SortState, SourceLanguage, SourceListItemProps, SourceListMoreProps, SourceListProps, SourceListSectionProps, SparklineProps, SpinnerProps, SplitViewProps, StartPageProps, StartPageSectionProps, StateCellProps, StateViewProps, StatusBarProps, StatusDotProps, StatusLightProps, StatusTone$1 as StatusLightTone, StatusTone, StoreHeaderProps, StoreLockupProps, StoreShelfProps, SummaryFactProps, SummaryPaneProps, SwitchProps, SymbolImage, SymbolResolver, SymbolTileColor, SymbolTileProps, SymbolTileSize, SymbolWeight, SystemSymbolProps, TableFilterBarProps, TableFilterMenuProps, TableFilterState, TableGroups, TagProps, TagTone, TextAreaProps, TextFieldProps, TextProps, TextTone, TextVariant, TileGridProps, TimedCodeProps, ToolbarOverflowItem, ToolbarOverflowProps, ToolbarProps, TooltipContentProps, UsageBarProps, UsageColor, UsageSegment, WaveformProps, WindowToolbarTitleProps };
|
package/dist/desktop.d.ts
CHANGED
|
@@ -1338,13 +1338,15 @@ interface TableFilterBarProps<T> extends TableFilterMenuProps<T> {
|
|
|
1338
1338
|
shown: number;
|
|
1339
1339
|
/** What the rows are, for the search field's name ("Search processes"). */
|
|
1340
1340
|
label: string;
|
|
1341
|
+
/** What one row is, singular and plural (["chat", "chats"]): the count then says "2 chats", "1 of 2 chats", never a bare number. */
|
|
1342
|
+
noun?: readonly [string, string] | undefined;
|
|
1341
1343
|
}
|
|
1342
1344
|
/**
|
|
1343
1345
|
* The table's own filter bar (Finder's search bar, Mail's filter tokens), drawn above its header
|
|
1344
1346
|
* at one fixed height whether or not a filter is on, so the rows never move when one changes: the
|
|
1345
1347
|
* active filters' tokens (or the row count) lead; the search field and the filter button trail.
|
|
1346
1348
|
*/
|
|
1347
|
-
declare function TableFilterBar<T>({ columns, rows, state, onChange, shown, label }: TableFilterBarProps<T>): React.JSX.Element;
|
|
1349
|
+
declare function TableFilterBar<T>({ columns, rows, state, onChange, shown, label, noun }: TableFilterBarProps<T>): React.JSX.Element;
|
|
1348
1350
|
declare function ClearFiltersButton({ onClear, className }: {
|
|
1349
1351
|
onClear: () => void;
|
|
1350
1352
|
className?: string;
|
|
@@ -1508,6 +1510,8 @@ interface DataTableProps<T> extends Omit<React.HTMLAttributes<HTMLDivElement>, "
|
|
|
1508
1510
|
* when the page draws the controls itself (`SearchField` + `TableFilterMenu` in its header's
|
|
1509
1511
|
* actions) and passes `filterState`. */
|
|
1510
1512
|
filterBar?: boolean;
|
|
1513
|
+
/** What one row is, singular and plural (["chat", "chats"]): the filter bar's count says "2 chats". */
|
|
1514
|
+
noun?: readonly [string, string];
|
|
1511
1515
|
className?: string;
|
|
1512
1516
|
}
|
|
1513
1517
|
/** Which optional columns start hidden (`Column.optional === "hidden"`). */
|
|
@@ -1519,7 +1523,7 @@ declare function initiallyHiddenColumns(columns: ReadonlyArray<Pick<Column<never
|
|
|
1519
1523
|
* column kinds sized like Activity Monitor's, the accent selection while focused. Arrow keys move
|
|
1520
1524
|
* between rows when rows are selectable.
|
|
1521
1525
|
*/
|
|
1522
|
-
declare function DataTable<T>({ rowKey, onRowSelect, selectedKey, selectedKeys, onSelectedKeysChange, empty, striped, detail, isDisabled, rowAction, rowMenu, rowButtons, defaultSort, rowData, limit, sort: sortProp, onSortChange, selection, onRowOpen, subRows, outline, expandable, onOutlineChange, rowSize, fill, spare, rowContextMenu, hiddenColumns, onHiddenColumnsChange, groups, filterState, onFilterStateChange, defaultFilter, filterBar, className, "aria-label": ariaLabel, columns: allColumns, rows: givenRows, ...rest }: DataTableProps<T>): React.JSX.Element;
|
|
1526
|
+
declare function DataTable<T>({ rowKey, onRowSelect, selectedKey, selectedKeys, onSelectedKeysChange, empty, striped, detail, isDisabled, rowAction, rowMenu, rowButtons, defaultSort, rowData, limit, sort: sortProp, onSortChange, selection, onRowOpen, subRows, outline, expandable, onOutlineChange, rowSize, fill, spare, rowContextMenu, hiddenColumns, onHiddenColumnsChange, groups, filterState, onFilterStateChange, defaultFilter, filterBar, noun, className, "aria-label": ariaLabel, columns: allColumns, rows: givenRows, ...rest }: DataTableProps<T>): React.JSX.Element;
|
|
1523
1527
|
interface NameCellProps {
|
|
1524
1528
|
/** The thing's name: it gets the room first, ends in an ellipsis when it must, and its tooltip
|
|
1525
1529
|
* is the whole name. */
|
|
@@ -2200,7 +2204,7 @@ interface BannerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"
|
|
|
2200
2204
|
* THE inline notice (one pattern, every screen): the tone's icon, a semantic tint, one fixed
|
|
2201
2205
|
* minimum height, the title and one line, trailing actions, and × when it can be put away.
|
|
2202
2206
|
*/
|
|
2203
|
-
declare function Banner({ tone, icon, title, message, actions, detail, onDismiss, count, className, ...props }: BannerProps): React.JSX.Element;
|
|
2207
|
+
declare function Banner({ tone, icon, title, message, actions, detail, onDismiss, count, className, ...props }: BannerProps): React.JSX.Element | null;
|
|
2204
2208
|
interface ErrorBannerProps extends Omit<BannerProps, "tone" | "title" | "message" | "actions" | "detail" | "onDismiss"> {
|
|
2205
2209
|
/** The failed action's error (e.g. `useDesktopAction().error`); nothing renders without one. */
|
|
2206
2210
|
error: {
|
|
@@ -2875,7 +2879,15 @@ declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTML
|
|
|
2875
2879
|
* button bar stay put, and only this body scrolls between them. When it holds more than shows, a
|
|
2876
2880
|
* hairline marks each edge it scrolls under, as System Settings' sheets do; a short body has none.
|
|
2877
2881
|
*/
|
|
2878
|
-
|
|
2882
|
+
interface DialogBodyProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
2883
|
+
/**
|
|
2884
|
+
* The least the body is tall (a result sheet: Finder's and Xcode's keep a few rows of room however
|
|
2885
|
+
* few rows there are): `sm` 10 rem, `md` 15 rem, `lg` 20 rem. Above it the sheet grows with its
|
|
2886
|
+
* content up to its max height, then only the body scrolls. Unset: as short as its content.
|
|
2887
|
+
*/
|
|
2888
|
+
minHeight?: "sm" | "md" | "lg";
|
|
2889
|
+
}
|
|
2890
|
+
declare function DialogBody({ className, children, minHeight, ...props }: DialogBodyProps): React.JSX.Element;
|
|
2879
2891
|
/** The sheet's buttons: trailing, 8 px apart, the default (primary) one rightmost. */
|
|
2880
2892
|
declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
2881
2893
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -3344,4 +3356,4 @@ interface OrganizationPickerSheetProps {
|
|
|
3344
3356
|
declare function OrganizationPickerSheet({ open, onOpenChange, organizations, activeOrganizationId, favoriteOrganizationIds, onSwitch, onToggleFavorite, }: OrganizationPickerSheetProps): React.JSX.Element;
|
|
3345
3357
|
|
|
3346
3358
|
export { ActivityChart, AppRail, AppRailAvatar, AppRailGroup, AppRailItem, AppRailSpacer, Avatar, Banner, Button, CONSOLE_LINE_PX, CREDENTIAL_DOTS, CallButton, CanvasLayout, Checkbox, ChecklistAddRow, ChecklistRow, ClearFiltersButton, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, ColumnBrowser, ComingSoon, CompareLines, CompareView, ConfirmDialog, ConfirmDialogHost, ContextMenu, ContextMenuContent, ContextMenuEntries, ContextMenuItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuTrigger, ConversationHeader, CredentialField, CredentialFields, CredentialHeader, DataTable, DateStepper, DeviceFrame, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Disclosure, DisplayArrangement, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuEntries, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EMPTY_TABLE_FILTER, EdgeResizer, EmptyContent, ErrorBanner, FIELD, FactList, FavoriteTile, FieldRow, GetButton, GroupTable, HelpButton, INFO_HINT_MAX, IconButton, IconView, IconViewItem, InfoButton, InfoFacts, InfoHeader, InfoHint, InfoStrip, InspectorPanel, Kbd, LOG_LINE_PX, LevelIndicator, LinkButton, ListHeading, ListRow, LogView, METER_THRESHOLDS, MenuItemLabel, MessageComposer, MessageList, Meter, MiddleTruncate, ModeSwitch, NameCell, NativeConfirmProvider, NavigatorColumn, NavigatorCustomizeSheet, NavigatorItem, NoticeSlot, Notices, OrganizationMark, OrganizationPickerSheet, POPOVER_ARROW, Page, PageHeader, PaneHeader, PathBar, PlaceMark, PlaceStrip, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProgressRing, PullDownButton, QuickLookSheet, RecordButton, RemovableTag, RenameField, ResizablePane, Resource, Row, ScopeBar, SearchField, Section, SectionButtons, SectionContent, Segmented, Select, ShortcutTile, Skeleton, Slider, SourceList, SourceListItem, SourceListMore, SourceListSection, SourceText, Sparkline, Spinner, SplitView, StartPage, StartPageSection, StateCell, StateView, StatusBar, StatusDot, StatusLight, StoreHeader, StoreLockup, StoreShelf, SummaryFact, SummaryPane, SummaryStrip, Switch, SymbolProvider, SymbolTile, SystemSymbol, TERMINAL_PROFILE, TEXT_STYLE_POINTS, TEXT_TONE, TOOLTIP_TEXT_BUDGET, TableFilterBar, TableFilterMenu, TableFilterTokens, Tag, Text, TextArea, TextField, TileGrid, TimedCode, Toolbar, ToolbarDivider, ToolbarGroup, ToolbarOverflow, ToolbarSpacer, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UnreadDot, UsageBar, Waveform, WindowToolbarActions, WindowToolbarHostMenu, WindowToolbarProvider, WindowToolbarTitle, baseNameEnd, buttonVariants, clipTooltipText, cn, columnKind, columnName, dateSectionOf, describeError, errorMessage, filterActive, filterChoices, filterRows, filterValues, formatAge, formatBytes, formatClockTime, formatDuration, formatFinderDate, formatMemory, formatMemoryUsage, formatUsage, groupByDateSection, infoHintText, initiallyHiddenColumns, meterTone, moveItem, organizationColor, peaksOf, tableFilters, tileColorFor, useWindowToolbarFull, useWindowToolbarOwnsMore };
|
|
3347
|
-
export type { ActivityBar, ActivityChartProps, AppRailAvatarProps, AppRailItemProps, ArrangedDisplay, AvatarProps, BannerProps, BannerTone, ButtonProps, CallButtonProps, CanvasColumnDef, CanvasLayoutProps, CanvasPanelDef, CheckboxProps, ChecklistAddRowProps, ChecklistRowProps, CodeBlockProps, Column, ColumnBrowserColumn, ColumnBrowserProps, ColumnFilter, ColumnKind, ColumnValuesFilter, ComingSoonProps, CompareChange, CompareLinesProps, ComparePane, CompareViewProps, ConfirmDialogProps, ConversationHeaderProps, CredentialFieldProps, CredentialHeaderProps, DataTableProps, DateSection, DateSectionKey, DateStepperProps, DatedSection, DescribedError, DesktopPickerOrganization, DesktopPopoverContentProps, DeviceFrameProps, DisclosureProps, DisplayArrangementProps, EdgeResizerProps, EmptyContentProps, ErrorBannerProps, Fact, FactListProps, FavoriteTileProps, FieldRowProps, FilterChoice, FilterableColumn, FinderDateOptions, GetButtonProps, GetButtonState, GroupTableColumn, GroupTableProps, GroupTableRow, HelpButtonProps, IconButtonProps, IconViewItemProps, IconViewProps, InfoButtonProps, InfoFact, InfoFactsProps, InfoHeaderProps, InfoHintProps, InfoStripItem, InfoStripProps, InspectorPanelProps, LevelIndicatorProps, LinkButtonProps, ListColor, ListHeadingProps, ListRowProps, LogColumns, LogLine, LogViewProps, MessageComposerProps, MessageListProps, MeterProps, ModeSwitchOption, ModeSwitchProps, NameCellProps, NativeConfirm, NativeConfirmRequest, NavigatorCustomizeItem, NavigatorCustomizeSheetProps, NavigatorItemProps, OrganizationPickerSheetProps, PageHeaderProps, PageProps, PageWidth, PaneHeaderProps, PathBarItem, PlaceMarkProps, PlaceMarkState, ProgressRingProps, PullDownButtonProps, QuickLookSheetProps, RecordButtonProps, RemovableTagProps, RenameFieldProps, ResizablePaneProps, ResourceProps, ResourceState, RowAction, RowMenuItem, RowProps, Scope, ScopeBarProps, SearchFieldProps, SectionButtonsProps, SectionProps, Segment, SegmentedProps, SelectOption, SelectProps, ShortcutTileProps, SliderProps, SortState, SourceLanguage, SourceListItemProps, SourceListMoreProps, SourceListProps, SourceListSectionProps, SparklineProps, SpinnerProps, SplitViewProps, StartPageProps, StartPageSectionProps, StateCellProps, StateViewProps, StatusBarProps, StatusDotProps, StatusLightProps, StatusTone$1 as StatusLightTone, StatusTone, StoreHeaderProps, StoreLockupProps, StoreShelfProps, SummaryFactProps, SummaryPaneProps, SwitchProps, SymbolImage, SymbolResolver, SymbolTileColor, SymbolTileProps, SymbolTileSize, SymbolWeight, SystemSymbolProps, TableFilterBarProps, TableFilterMenuProps, TableFilterState, TableGroups, TagProps, TagTone, TextAreaProps, TextFieldProps, TextProps, TextTone, TextVariant, TileGridProps, TimedCodeProps, ToolbarOverflowItem, ToolbarOverflowProps, ToolbarProps, TooltipContentProps, UsageBarProps, UsageColor, UsageSegment, WaveformProps, WindowToolbarTitleProps };
|
|
3359
|
+
export type { ActivityBar, ActivityChartProps, AppRailAvatarProps, AppRailItemProps, ArrangedDisplay, AvatarProps, BannerProps, BannerTone, ButtonProps, CallButtonProps, CanvasColumnDef, CanvasLayoutProps, CanvasPanelDef, CheckboxProps, ChecklistAddRowProps, ChecklistRowProps, CodeBlockProps, Column, ColumnBrowserColumn, ColumnBrowserProps, ColumnFilter, ColumnKind, ColumnValuesFilter, ComingSoonProps, CompareChange, CompareLinesProps, ComparePane, CompareViewProps, ConfirmDialogProps, ConversationHeaderProps, CredentialFieldProps, CredentialHeaderProps, DataTableProps, DateSection, DateSectionKey, DateStepperProps, DatedSection, DescribedError, DesktopPickerOrganization, DesktopPopoverContentProps, DeviceFrameProps, DialogBodyProps, DisclosureProps, DisplayArrangementProps, EdgeResizerProps, EmptyContentProps, ErrorBannerProps, Fact, FactListProps, FavoriteTileProps, FieldRowProps, FilterChoice, FilterableColumn, FinderDateOptions, GetButtonProps, GetButtonState, GroupTableColumn, GroupTableProps, GroupTableRow, HelpButtonProps, IconButtonProps, IconViewItemProps, IconViewProps, InfoButtonProps, InfoFact, InfoFactsProps, InfoHeaderProps, InfoHintProps, InfoStripItem, InfoStripProps, InspectorPanelProps, LevelIndicatorProps, LinkButtonProps, ListColor, ListHeadingProps, ListRowProps, LogColumns, LogLine, LogViewProps, MessageComposerProps, MessageListProps, MeterProps, ModeSwitchOption, ModeSwitchProps, NameCellProps, NativeConfirm, NativeConfirmRequest, NavigatorCustomizeItem, NavigatorCustomizeSheetProps, NavigatorItemProps, OrganizationPickerSheetProps, PageHeaderProps, PageProps, PageWidth, PaneHeaderProps, PathBarItem, PlaceMarkProps, PlaceMarkState, ProgressRingProps, PullDownButtonProps, QuickLookSheetProps, RecordButtonProps, RemovableTagProps, RenameFieldProps, ResizablePaneProps, ResourceProps, ResourceState, RowAction, RowMenuItem, RowProps, Scope, ScopeBarProps, SearchFieldProps, SectionButtonsProps, SectionProps, Segment, SegmentedProps, SelectOption, SelectProps, ShortcutTileProps, SliderProps, SortState, SourceLanguage, SourceListItemProps, SourceListMoreProps, SourceListProps, SourceListSectionProps, SparklineProps, SpinnerProps, SplitViewProps, StartPageProps, StartPageSectionProps, StateCellProps, StateViewProps, StatusBarProps, StatusDotProps, StatusLightProps, StatusTone$1 as StatusLightTone, StatusTone, StoreHeaderProps, StoreLockupProps, StoreShelfProps, SummaryFactProps, SummaryPaneProps, SwitchProps, SymbolImage, SymbolResolver, SymbolTileColor, SymbolTileProps, SymbolTileSize, SymbolWeight, SystemSymbolProps, TableFilterBarProps, TableFilterMenuProps, TableFilterState, TableGroups, TagProps, TagTone, TextAreaProps, TextFieldProps, TextProps, TextTone, TextVariant, TileGridProps, TimedCodeProps, ToolbarOverflowItem, ToolbarOverflowProps, ToolbarProps, TooltipContentProps, UsageBarProps, UsageColor, UsageSegment, WaveformProps, WindowToolbarTitleProps };
|
package/dist/desktop.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
matchesOrganizationQuery,
|
|
20
20
|
orderOrganizationsForPicker,
|
|
21
21
|
organizationColor
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-FLWSEDUW.js";
|
|
23
23
|
import {
|
|
24
24
|
Collapsible,
|
|
25
25
|
CollapsibleContent,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import "./chunk-VQQ3O7J5.js";
|
|
42
42
|
import {
|
|
43
43
|
Tile
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-GMNROZQJ.js";
|
|
45
45
|
import "./chunk-HKLIRHT2.js";
|
|
46
46
|
import {
|
|
47
47
|
Skeleton
|
|
@@ -675,7 +675,7 @@ var DialogContent2 = React6.forwardRef(function DialogContent3({ className, show
|
|
|
675
675
|
function DialogHeader2({ className, ...props }) {
|
|
676
676
|
return /* @__PURE__ */ jsx9(DialogHeader, { className: cn2("gap-1 space-y-0 pr-0 text-left sm:text-left", className), ...props });
|
|
677
677
|
}
|
|
678
|
-
function DialogBody({ className, children, ...props }) {
|
|
678
|
+
function DialogBody({ className, children, minHeight, ...props }) {
|
|
679
679
|
const ref = React6.useRef(null);
|
|
680
680
|
const [overflowing, setOverflowing] = React6.useState(false);
|
|
681
681
|
React6.useLayoutEffect(() => {
|
|
@@ -689,7 +689,7 @@ function DialogBody({ className, children, ...props }) {
|
|
|
689
689
|
for (const child of Array.from(el.children)) observer.observe(child);
|
|
690
690
|
return () => observer.disconnect();
|
|
691
691
|
}, [children]);
|
|
692
|
-
return /* @__PURE__ */ jsx9("div", { ref, "data-slot": "sheet-body", "data-overflowing": overflowing ? "" : void 0, className: cn2("flex min-h-0 flex-col gap-4", className), ...props, children });
|
|
692
|
+
return /* @__PURE__ */ jsx9("div", { ref, "data-slot": "sheet-body", "data-min-height": minHeight, "data-overflowing": overflowing ? "" : void 0, className: cn2("flex min-h-0 flex-col gap-4", className), ...props, children });
|
|
693
693
|
}
|
|
694
694
|
function DialogFooter2({ className, ...props }) {
|
|
695
695
|
return /* @__PURE__ */ jsx9(DialogFooter, { className: cn2("flex-row justify-end gap-2 space-x-0 bg-content pt-1 sm:gap-2 sm:space-x-0", className), ...props });
|
|
@@ -1120,30 +1120,79 @@ var WIDTH = {
|
|
|
1120
1120
|
wide: "max-w-none",
|
|
1121
1121
|
full: "max-w-none"
|
|
1122
1122
|
};
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1123
|
+
var EMPTY_LAYOUT = { drawn: /* @__PURE__ */ new Map(), folded: 0, total: 0 };
|
|
1124
|
+
function createNoticeRegistry() {
|
|
1125
|
+
let entries = [];
|
|
1126
|
+
let expanded = false;
|
|
1127
|
+
let layout = EMPTY_LAYOUT;
|
|
1128
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
1129
|
+
const recompute = () => {
|
|
1130
|
+
const groups = collapseNotices(entries, (e) => e.key);
|
|
1131
|
+
const { shown, folded } = expanded ? { shown: groups, folded: 0 } : visibleNotices(groups);
|
|
1132
|
+
const drawn = /* @__PURE__ */ new Map();
|
|
1133
|
+
for (const g of shown) {
|
|
1134
|
+
const dismissers = g.members.map((m) => m.dismiss).filter((d) => typeof d === "function");
|
|
1135
|
+
drawn.set(g.item.id, { count: g.count, dismissAll: g.item.dismiss ? () => dismissers.forEach((d) => d()) : void 0 });
|
|
1136
|
+
}
|
|
1137
|
+
layout = { drawn, folded, total: entries.length };
|
|
1138
|
+
listeners.forEach((l) => l());
|
|
1139
|
+
};
|
|
1140
|
+
return {
|
|
1141
|
+
set(id, key2, dismiss) {
|
|
1142
|
+
const at = entries.findIndex((e) => e.id === id);
|
|
1143
|
+
if (at >= 0) {
|
|
1144
|
+
const old = entries[at];
|
|
1145
|
+
if (old.key === key2 && old.dismiss === dismiss) return;
|
|
1146
|
+
entries = entries.map((e, i) => i === at ? { id, key: key2, dismiss } : e);
|
|
1147
|
+
} else {
|
|
1148
|
+
entries = [...entries, { id, key: key2, dismiss }];
|
|
1149
|
+
}
|
|
1150
|
+
recompute();
|
|
1151
|
+
},
|
|
1152
|
+
remove(id) {
|
|
1153
|
+
if (!entries.some((e) => e.id === id)) return;
|
|
1154
|
+
entries = entries.filter((e) => e.id !== id);
|
|
1155
|
+
if (entries.length === 0) expanded = false;
|
|
1156
|
+
recompute();
|
|
1157
|
+
},
|
|
1158
|
+
subscribe(listener) {
|
|
1159
|
+
listeners.add(listener);
|
|
1160
|
+
return () => listeners.delete(listener);
|
|
1161
|
+
},
|
|
1162
|
+
snapshot: () => layout,
|
|
1163
|
+
expand() {
|
|
1164
|
+
expanded = true;
|
|
1165
|
+
recompute();
|
|
1166
|
+
}
|
|
1167
|
+
};
|
|
1168
|
+
}
|
|
1169
|
+
var NoticeStackContext = React8.createContext(null);
|
|
1170
|
+
function useNoticeStackLayout(registry) {
|
|
1171
|
+
return React8.useSyncExternalStore(
|
|
1172
|
+
React8.useCallback((l) => registry ? registry.subscribe(l) : () => void 0, [registry]),
|
|
1173
|
+
() => registry ? registry.snapshot() : EMPTY_LAYOUT,
|
|
1174
|
+
() => registry ? registry.snapshot() : EMPTY_LAYOUT
|
|
1175
|
+
);
|
|
1131
1176
|
}
|
|
1132
|
-
function
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1177
|
+
function bannerNoticeKey(tone, title, message) {
|
|
1178
|
+
if (typeof title !== "string" && typeof title !== "number") return null;
|
|
1179
|
+
return noticeKey(tone, title, message);
|
|
1180
|
+
}
|
|
1181
|
+
function holdsElements(children) {
|
|
1182
|
+
return React8.Children.toArray(children).some(
|
|
1183
|
+
(c) => React8.isValidElement(c) && c.type === React8.Fragment ? holdsElements(c.props.children) : React8.isValidElement(c)
|
|
1184
|
+
);
|
|
1136
1185
|
}
|
|
1137
|
-
var NoticeStackContext = React8.createContext(false);
|
|
1138
1186
|
function Notices({ children, className, onHeight, ...props }) {
|
|
1139
1187
|
const stack = React8.useRef(null);
|
|
1140
|
-
const
|
|
1141
|
-
const
|
|
1142
|
-
const
|
|
1188
|
+
const parent = React8.useContext(NoticeStackContext);
|
|
1189
|
+
const [registry] = React8.useState(createNoticeRegistry);
|
|
1190
|
+
const layout = useNoticeStackLayout(registry);
|
|
1191
|
+
const drawn = layout.total > 0;
|
|
1143
1192
|
React8.useLayoutEffect(() => {
|
|
1144
1193
|
const el = stack.current;
|
|
1145
1194
|
if (!onHeight) return;
|
|
1146
|
-
if (!el) return onHeight(0);
|
|
1195
|
+
if (!el || !drawn) return onHeight(0);
|
|
1147
1196
|
const report = () => onHeight(el.offsetHeight);
|
|
1148
1197
|
report();
|
|
1149
1198
|
if (typeof ResizeObserver === "undefined") return;
|
|
@@ -1154,9 +1203,8 @@ function Notices({ children, className, onHeight, ...props }) {
|
|
|
1154
1203
|
onHeight(0);
|
|
1155
1204
|
};
|
|
1156
1205
|
}, [onHeight, drawn]);
|
|
1157
|
-
if (
|
|
1158
|
-
|
|
1159
|
-
const { shown, folded } = expanded ? { shown: groups, folded: 0 } : visibleNotices(groups);
|
|
1206
|
+
if (parent) return /* @__PURE__ */ jsx11(Fragment3, { children });
|
|
1207
|
+
if (!holdsElements(children)) return null;
|
|
1160
1208
|
return /* @__PURE__ */ jsx11(
|
|
1161
1209
|
"div",
|
|
1162
1210
|
{
|
|
@@ -1164,15 +1212,16 @@ function Notices({ children, className, onHeight, ...props }) {
|
|
|
1164
1212
|
"data-slot": "notices",
|
|
1165
1213
|
"data-float": "",
|
|
1166
1214
|
"aria-live": "polite",
|
|
1215
|
+
hidden: !drawn || void 0,
|
|
1167
1216
|
style: { width: `${NOTICE_STACK.widthRem}rem` },
|
|
1168
1217
|
className: cn2("flex flex-col items-stretch gap-2 empty:hidden", className),
|
|
1169
1218
|
...props,
|
|
1170
|
-
children: /* @__PURE__ */ jsxs7(NoticeStackContext.Provider, { value:
|
|
1171
|
-
folded > 0 ? /* @__PURE__ */ jsx11("button", { type: "button", "data-slot": "notices-more", className: "self-end rounded-full px-2 py-0.5", onClick: () =>
|
|
1172
|
-
folded,
|
|
1219
|
+
children: /* @__PURE__ */ jsxs7(NoticeStackContext.Provider, { value: registry, children: [
|
|
1220
|
+
layout.folded > 0 ? /* @__PURE__ */ jsx11("button", { type: "button", "data-slot": "notices-more", className: "order-first self-end rounded-full px-2 py-0.5", onClick: () => registry.expand(), children: /* @__PURE__ */ jsxs7(Text, { variant: "caption", tone: "secondary", children: [
|
|
1221
|
+
layout.folded,
|
|
1173
1222
|
" more"
|
|
1174
1223
|
] }) }) : null,
|
|
1175
|
-
|
|
1224
|
+
children
|
|
1176
1225
|
] })
|
|
1177
1226
|
}
|
|
1178
1227
|
);
|
|
@@ -3127,7 +3176,21 @@ var BANNER_ICON = {
|
|
|
3127
3176
|
};
|
|
3128
3177
|
function Banner({ tone, icon, title, message, actions, detail, onDismiss, count, className, ...props }) {
|
|
3129
3178
|
const [copied, setCopied] = React20.useState(false);
|
|
3130
|
-
const
|
|
3179
|
+
const registry = React20.useContext(NoticeStackContext);
|
|
3180
|
+
const floating = registry !== null;
|
|
3181
|
+
const id = React20.useId();
|
|
3182
|
+
const key2 = bannerNoticeKey(tone, title, message);
|
|
3183
|
+
React20.useLayoutEffect(() => {
|
|
3184
|
+
registry?.set(id, key2, onDismiss);
|
|
3185
|
+
}, [registry, id, key2, onDismiss]);
|
|
3186
|
+
React20.useLayoutEffect(() => registry ? () => registry.remove(id) : void 0, [registry, id]);
|
|
3187
|
+
const layout = useNoticeStackLayout(registry);
|
|
3188
|
+
const slot = layout.drawn.get(id);
|
|
3189
|
+
if (floating && !slot) return null;
|
|
3190
|
+
if (slot) {
|
|
3191
|
+
count = Math.max(count ?? 1, slot.count);
|
|
3192
|
+
if (slot.dismissAll) onDismiss = slot.dismissAll;
|
|
3193
|
+
}
|
|
3131
3194
|
return /* @__PURE__ */ jsxs22(
|
|
3132
3195
|
"div",
|
|
3133
3196
|
{
|
|
@@ -3142,14 +3205,14 @@ function Banner({ tone, icon, title, message, actions, detail, onDismiss, count,
|
|
|
3142
3205
|
/* @__PURE__ */ jsx28("span", { className: cn2("flex shrink-0 self-start pt-px [&_svg]:size-icon", BANNER_TONE[tone].icon), children: icon ?? BANNER_ICON[tone] }),
|
|
3143
3206
|
/* @__PURE__ */ jsxs22("div", { "data-slot": "banner-body", className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-2", children: [
|
|
3144
3207
|
/* @__PURE__ */ jsxs22("div", { "data-slot": "banner-text", className: "flex min-w-0 flex-1 basis-56 flex-col gap-0.5", title: detail || void 0, children: [
|
|
3145
|
-
/* @__PURE__ */ jsxs22(Text, { emphasized: true,
|
|
3208
|
+
/* @__PURE__ */ jsxs22(Text, { "data-slot": "banner-title", emphasized: true, ...floating && typeof title === "string" ? { title } : {}, children: [
|
|
3146
3209
|
title,
|
|
3147
3210
|
count && count > 1 ? /* @__PURE__ */ jsxs22("span", { "data-slot": "banner-count", className: "ml-1.5 font-normal text-label-secondary", children: [
|
|
3148
3211
|
"\xD7",
|
|
3149
3212
|
count
|
|
3150
3213
|
] }) : null
|
|
3151
3214
|
] }),
|
|
3152
|
-
message ? /* @__PURE__ */ jsx28(Text, { as: "p", tone: "secondary", selectable: true,
|
|
3215
|
+
message ? /* @__PURE__ */ jsx28(Text, { "data-slot": "banner-message", as: "p", tone: "secondary", selectable: true, children: message }) : null
|
|
3153
3216
|
] }),
|
|
3154
3217
|
actions || detail ? /* @__PURE__ */ jsxs22("div", { "data-slot": "banner-actions", className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
3155
3218
|
detail ? /* @__PURE__ */ jsx28(
|
|
@@ -3309,13 +3372,13 @@ function TableFilterTokens({ columns, state, onChange }) {
|
|
|
3309
3372
|
return /* @__PURE__ */ jsx29(RemovableTag, { "data-table-filter-token": column.key, className: "shrink-0", removeLabel: `Remove the ${name} filter`, onRemove: () => onChange(setValues(state, column.key, [])), children: `${name}: ${labels.join(", ")}` }, column.key);
|
|
3310
3373
|
}) });
|
|
3311
3374
|
}
|
|
3312
|
-
function TableFilterBar({ columns, rows, state, onChange, shown, label }) {
|
|
3375
|
+
function TableFilterBar({ columns, rows, state, onChange, shown, label, noun }) {
|
|
3313
3376
|
const searchable = columns.some((c) => c.search);
|
|
3314
3377
|
const active = filterActive(state);
|
|
3315
3378
|
return /* @__PURE__ */ jsxs23("div", { "data-slot": "data-table-filter-bar", className: "flex h-table-filter-bar shrink-0 items-center gap-2 border-b border-separator px-3", children: [
|
|
3316
3379
|
/* @__PURE__ */ jsxs23("div", { className: "flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden", children: [
|
|
3317
3380
|
/* @__PURE__ */ jsx29(TableFilterTokens, { columns, state, onChange }),
|
|
3318
|
-
/* @__PURE__ */ jsx29(Text, { tone: "secondary", className: "shrink-0 tabular-nums", "data-table-filter-count": shown, children: active ? `${shown} of ${rows.length}` : `${rows.length}` })
|
|
3381
|
+
/* @__PURE__ */ jsx29(Text, { tone: "secondary", className: "shrink-0 tabular-nums", "data-table-filter-count": shown, children: `${active ? `${shown} of ${rows.length}` : `${rows.length}`}${noun ? ` ${rows.length === 1 ? noun[0] : noun[1]}` : ""}` })
|
|
3319
3382
|
] }),
|
|
3320
3383
|
searchable ? /* @__PURE__ */ jsx29(
|
|
3321
3384
|
SearchField,
|
|
@@ -3428,6 +3491,7 @@ function DataTable({
|
|
|
3428
3491
|
onFilterStateChange,
|
|
3429
3492
|
defaultFilter,
|
|
3430
3493
|
filterBar = true,
|
|
3494
|
+
noun,
|
|
3431
3495
|
className,
|
|
3432
3496
|
"aria-label": ariaLabel,
|
|
3433
3497
|
columns: allColumns,
|
|
@@ -3618,7 +3682,7 @@ function DataTable({
|
|
|
3618
3682
|
}
|
|
3619
3683
|
};
|
|
3620
3684
|
const contextItems = menuRow !== null && rowContextMenu ? rowContextMenu(menuRow) ?? null : null;
|
|
3621
|
-
const bar = filterable && filterBar && givenRows.length > 0 ? /* @__PURE__ */ jsx30(TableFilterBar, { columns: allColumns, rows: givenRows, state: filter, onChange: setFilter, shown: rows.length, label: ariaLabel.toLowerCase() }) : null;
|
|
3685
|
+
const bar = filterable && filterBar && givenRows.length > 0 ? /* @__PURE__ */ jsx30(TableFilterBar, { columns: allColumns, rows: givenRows, state: filter, onChange: setFilter, shown: rows.length, label: ariaLabel.toLowerCase(), noun }) : null;
|
|
3622
3686
|
const framed = (body) => bar ? /* @__PURE__ */ jsxs24(
|
|
3623
3687
|
"div",
|
|
3624
3688
|
{
|