@upbound/monarch-blocks 0.4.0 → 0.4.1
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/cel-filter-bar.d.ts +2 -2
- package/dist/chart.d.ts +9 -10
- package/dist/chat-interface.d.ts +5 -6
- package/dist/code-block.d.ts +6 -7
- package/dist/data-table.d.ts +18 -19
- package/dist/filter-bar.d.ts +2 -3
- package/dist/floating-widget.d.ts +2 -3
- package/dist/index.d.ts +0 -1
- package/dist/page-header.d.ts +9 -9
- package/dist/relative-time.d.ts +3 -4
- package/dist/section-header.d.ts +8 -8
- package/dist/section-nav.d.ts +7 -8
- package/dist/timeline.d.ts +2 -3
- package/package.json +9 -9
package/dist/cel-filter-bar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { k as CompileResult, t as CelValidationMeta, d as CelFilterCondition, f as CelFilterSchema, V as ValidationIssue, g as CelFilterTree, P as PillActiveSurface, u as CelFilterType, h as CelOperator, v as CelFilterShape, C as CelColumnDefinition, w as CelEmitOn, D as DateCelValue, M as MapKeyCelValue, l as MultiTextCelValue, m as RelativeDurationPreset, c as CelFilterBarProps } from './types-BULiU2qC.js';
|
|
3
3
|
export { a as CelColumnOption, b as CelConditionValue, e as CelFilterGroup, i as CelRestrictedOptionSelectPayload, j as CheckboxCelValue, R as RadioCelValue, n as isCelFilterCondition, o as isCelFilterGroup, p as isCheckboxCelValue, q as isDateCelValue, r as isMapKeyCelValue, s as isMultiTextCelValue } from './types-BULiU2qC.js';
|
|
4
4
|
|
|
@@ -198,6 +198,6 @@ declare function readMultiTextCelValue(value: unknown): MultiTextCelValue;
|
|
|
198
198
|
declare const RELATIVE_DURATION_PRESET_VALUES: readonly ["24h", "168h", "720h"];
|
|
199
199
|
declare function isRelativeDurationPreset(value: string): value is RelativeDurationPreset;
|
|
200
200
|
|
|
201
|
-
declare function CelFilterBar({ tree, onChange, schema, onCompileResultChange, onRestrictedOptionSelect, showClearButton, className, }: CelFilterBarProps):
|
|
201
|
+
declare function CelFilterBar({ tree, onChange, schema, onCompileResultChange, onRestrictedOptionSelect, showClearButton, className, }: CelFilterBarProps): React.JSX.Element;
|
|
202
202
|
|
|
203
203
|
export { CelColumnDefinition, CelFilterBar, CelFilterBarProps, CelFilterCondition, CelFilterSchema, CelFilterTree, CelOperator, CompileResult, DateCelValue, MapKeyCelValue, MultiTextCelValue, PillActiveSurface, RELATIVE_DURATION_PRESET_VALUES, RelativeDurationPreset, ValidationIssue, allowsMultipleConditions, appendCondition, applyDisplayRules, applyOperatorChange, calendarDayEndInstant, calendarDayStartInstant, celStringLiteral, compileCelFilterTree, computeIsEmitReady, createCelNodeId, createDefaultCondition, createEmptyCelFilterTree, dateBoundaryForOperator, denormalizeColumnIdWithReservedNames, denormalizeColumnsWithReservedNames, escapeCelString, formatCalendarDateUtc, formatInstantLabel, getAllowedOperators, getColumnEmitOn, getDefaultOperator, getOperatorLabel, getQuantifierLabel, isDateRangeOperator, isDateRelativeOperator, isDateWindowOperator, isEndOfDayTimestamp, isEndOfMinuteTimestamp, isMultiTextColumn, isRealCalendarDay, isRelativeDateCelValue, isRelativeDurationPreset, isStartOfDayTimestamp, mergeContextualIntoCelTree, normalizeColumnsWithReservedNames, parseCalendarDate, readDateCelValue, readMapKeyCelValue, readMultiTextCelValue, readTimeOfDay, removeConditionById, replaceCondition, resolveColumnDefinition, resolveFilterShape, startInstantFromEndOfDay, startInstantFromEndOfMinute, validateCondition, withTimeOfDay };
|
package/dist/chart.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import * as RechartsPrimitive from 'recharts';
|
|
4
3
|
import { TooltipValueType } from 'recharts';
|
|
@@ -25,11 +24,11 @@ declare function ChartContainer({ id, className, children, config, initialDimens
|
|
|
25
24
|
width: number;
|
|
26
25
|
height: number;
|
|
27
26
|
};
|
|
28
|
-
}):
|
|
27
|
+
}): React.JSX.Element;
|
|
29
28
|
declare const ChartStyle: ({ id, config }: {
|
|
30
29
|
id: string;
|
|
31
30
|
config: ChartConfig;
|
|
32
|
-
}) =>
|
|
31
|
+
}) => React.JSX.Element | null;
|
|
33
32
|
declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
|
|
34
33
|
declare function ChartTooltipContent({ active, payload, className, indicator, hideLabel, hideIndicator, label, labelFormatter, labelClassName, formatter, color, nameKey, labelKey, }: React.ComponentProps<typeof RechartsPrimitive.Tooltip> & React.ComponentProps<'div'> & {
|
|
35
34
|
hideLabel?: boolean;
|
|
@@ -37,16 +36,16 @@ declare function ChartTooltipContent({ active, payload, className, indicator, hi
|
|
|
37
36
|
indicator?: 'line' | 'dot' | 'dashed';
|
|
38
37
|
nameKey?: string;
|
|
39
38
|
labelKey?: string;
|
|
40
|
-
} & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, 'accessibilityLayer'>):
|
|
39
|
+
} & Omit<RechartsPrimitive.DefaultTooltipContentProps<TooltipValueType, TooltipNameType>, 'accessibilityLayer'>): React.JSX.Element | null;
|
|
41
40
|
declare const ChartLegend: React.MemoExoticComponent<(outsideProps: RechartsPrimitive.LegendProps) => React.ReactPortal | null>;
|
|
42
41
|
declare function ChartLegendContent({ className, hideIcon, payload, verticalAlign, nameKey, }: React.ComponentProps<'div'> & {
|
|
43
42
|
hideIcon?: boolean;
|
|
44
43
|
nameKey?: string;
|
|
45
|
-
} & RechartsPrimitive.DefaultLegendContentProps):
|
|
46
|
-
declare function ChartHeader({ className, ...props }: React.ComponentProps<'div'>):
|
|
47
|
-
declare function ChartTitle({ className, ...props }: React.ComponentProps<'div'>):
|
|
48
|
-
declare function ChartDescription({ className, ...props }: React.ComponentProps<'div'>):
|
|
49
|
-
declare function ChartAction({ className, ...props }: React.ComponentProps<'div'>):
|
|
50
|
-
declare function ChartFooter({ className, ...props }: React.ComponentProps<'div'>):
|
|
44
|
+
} & RechartsPrimitive.DefaultLegendContentProps): React.JSX.Element | null;
|
|
45
|
+
declare function ChartHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
46
|
+
declare function ChartTitle({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
47
|
+
declare function ChartDescription({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
48
|
+
declare function ChartAction({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
49
|
+
declare function ChartFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
51
50
|
|
|
52
51
|
export { ChartAction, type ChartConfig, ChartContainer, ChartDescription, ChartFooter, ChartHeader, ChartLegend, ChartLegendContent, ChartStyle, ChartTitle, ChartTooltip, ChartTooltipContent };
|
package/dist/chat-interface.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
interface ChatMessage {
|
|
@@ -34,7 +33,7 @@ interface ChatSessionListProps {
|
|
|
34
33
|
onSelectSession: (id: string) => void;
|
|
35
34
|
className?: string;
|
|
36
35
|
}
|
|
37
|
-
declare function ChatSessionList({ sessions, activeSessionId, onSelectSession, className }: ChatSessionListProps):
|
|
36
|
+
declare function ChatSessionList({ sessions, activeSessionId, onSelectSession, className }: ChatSessionListProps): React.JSX.Element;
|
|
38
37
|
declare function ChatMessageBubble({ message, userName: _userName, assistantName, }: {
|
|
39
38
|
message: ChatMessage;
|
|
40
39
|
/**
|
|
@@ -50,7 +49,7 @@ declare function ChatMessageBubble({ message, userName: _userName, assistantName
|
|
|
50
49
|
* multi-agent scenarios (e.g. named provider agents in a group chat).
|
|
51
50
|
*/
|
|
52
51
|
assistantName?: string;
|
|
53
|
-
}):
|
|
52
|
+
}): React.JSX.Element;
|
|
54
53
|
interface ChatRoutine {
|
|
55
54
|
id: string;
|
|
56
55
|
name: string;
|
|
@@ -87,7 +86,7 @@ interface ChatInputProps {
|
|
|
87
86
|
onAttach?: () => void;
|
|
88
87
|
className?: string;
|
|
89
88
|
}
|
|
90
|
-
declare function ChatInput({ onSend, placeholder, routines, onSelectRoutine, onManageRoutines, usePageAsContext, onUsePageAsContext, onAttach, className, }: ChatInputProps):
|
|
89
|
+
declare function ChatInput({ onSend, placeholder, routines, onSelectRoutine, onManageRoutines, usePageAsContext, onUsePageAsContext, onAttach, className, }: ChatInputProps): React.JSX.Element;
|
|
91
90
|
interface ChatThreadProps {
|
|
92
91
|
messages: ChatMessage[];
|
|
93
92
|
onSend?: (message: string) => void;
|
|
@@ -126,7 +125,7 @@ interface ChatThreadProps {
|
|
|
126
125
|
*/
|
|
127
126
|
isThinking?: boolean;
|
|
128
127
|
}
|
|
129
|
-
declare function ChatThread({ messages, onSend, title, subtitle, placeholder, suggestions, assistantName, userName, routines, onSelectRoutine, onManageRoutines, usePageAsContext, onUsePageAsContext, onAttach, callout, headerActions, className, isThinking, }: ChatThreadProps):
|
|
128
|
+
declare function ChatThread({ messages, onSend, title, subtitle, placeholder, suggestions, assistantName, userName, routines, onSelectRoutine, onManageRoutines, usePageAsContext, onUsePageAsContext, onAttach, callout, headerActions, className, isThinking, }: ChatThreadProps): React.JSX.Element;
|
|
130
129
|
interface ChatNavRailProps {
|
|
131
130
|
onNewSession?: () => void;
|
|
132
131
|
onOpenRoutines?: () => void;
|
|
@@ -138,6 +137,6 @@ interface ChatInterfaceProps extends ChatThreadProps, ChatNavRailProps {
|
|
|
138
137
|
activeSessionId?: string;
|
|
139
138
|
onSelectSession?: (id: string) => void;
|
|
140
139
|
}
|
|
141
|
-
declare function ChatInterface({ sessions, activeSessionId, onSelectSession, onNewSession, onOpenRoutines, onOpenConnectors, onOpenCustomize, className, ...threadProps }: ChatInterfaceProps):
|
|
140
|
+
declare function ChatInterface({ sessions, activeSessionId, onSelectSession, onNewSession, onOpenRoutines, onOpenConnectors, onOpenCustomize, className, ...threadProps }: ChatInterfaceProps): React.JSX.Element;
|
|
142
141
|
|
|
143
142
|
export { ChatInput, type ChatInputProps, ChatInterface, type ChatInterfaceProps, type ChatMessage, ChatMessageBubble, type ChatRoutine, type ChatSession, ChatSessionList, type ChatSessionListProps, ChatThread, type ChatThreadProps, type ChatToolCall };
|
package/dist/code-block.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
declare function CodeBlock({ className, variant, size, ...props }: React.ComponentProps<'div'> & {
|
|
5
4
|
variant?: 'default' | 'terminal';
|
|
6
5
|
size?: 'default' | 'sm';
|
|
7
|
-
}):
|
|
8
|
-
declare function CodeBlockHeader({ className, ...props }: React.ComponentProps<'div'>):
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare function CodeBlockHeader({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
9
8
|
declare function CodeBlockBody({ className, code, html, lineNumbers, maxHeight, copyButton, downloadButton, ...props }: React.ComponentProps<'div'> & {
|
|
10
9
|
code: string;
|
|
11
10
|
html?: string;
|
|
@@ -13,15 +12,15 @@ declare function CodeBlockBody({ className, code, html, lineNumbers, maxHeight,
|
|
|
13
12
|
maxHeight?: string;
|
|
14
13
|
copyButton?: React.ReactNode;
|
|
15
14
|
downloadButton?: React.ReactNode;
|
|
16
|
-
}):
|
|
17
|
-
declare function CodeBlockFooter({ className, ...props }: React.ComponentProps<'div'>):
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
declare function CodeBlockFooter({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
18
17
|
declare function CodeBlockCopyButton({ code, className, ...props }: Omit<React.ComponentProps<'button'>, 'children'> & {
|
|
19
18
|
code: string;
|
|
20
|
-
}):
|
|
19
|
+
}): React.JSX.Element;
|
|
21
20
|
declare function CodeBlockDownloadButton({ code, fileName, mimeType, className, ...props }: Omit<React.ComponentProps<'button'>, 'children'> & {
|
|
22
21
|
code: string;
|
|
23
22
|
fileName: string;
|
|
24
23
|
mimeType?: string;
|
|
25
|
-
}):
|
|
24
|
+
}): React.JSX.Element;
|
|
26
25
|
|
|
27
26
|
export { CodeBlock, CodeBlockBody, CodeBlockCopyButton, CodeBlockDownloadButton, CodeBlockFooter, CodeBlockHeader };
|
package/dist/data-table.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { RowData, ColumnFilter, Cell, Column, ColumnOrderState, Row, ColumnDef, CellContext, HeaderGroup, TableOptions, TableState, InitialTableState, SortingFn, FilterFn, ExpandedState, ColumnFiltersState, PaginationState, SortingState, VisibilityState, ColumnPinningState, GroupingState, OnChangeFn, ColumnSizingState } from '@tanstack/react-table';
|
|
3
1
|
import * as React$1 from 'react';
|
|
4
2
|
import { ReactNode, Dispatch, SetStateAction, ComponentType } from 'react';
|
|
3
|
+
import { RowData, ColumnFilter, Cell, Column, ColumnOrderState, Row, ColumnDef, CellContext, HeaderGroup, TableOptions, TableState, InitialTableState, SortingFn, FilterFn, ExpandedState, ColumnFiltersState, PaginationState, SortingState, VisibilityState, ColumnPinningState, GroupingState, OnChangeFn, ColumnSizingState } from '@tanstack/react-table';
|
|
5
4
|
import { DropdownMenuItem, IconName } from '@upbound/monarch-core';
|
|
6
5
|
import { f as CelFilterSchema, g as CelFilterTree, k as CompileResult, i as CelRestrictedOptionSelectPayload } from './types-BULiU2qC.js';
|
|
7
6
|
|
|
@@ -28,7 +27,7 @@ type CellContextualFilterProps<TData extends RowData, TValue> = {
|
|
|
28
27
|
* `contextualMenuActions`. Renders only the `ContextMenuContent` — the
|
|
29
28
|
* `ContextMenu`/`ContextMenuTrigger` wrapping the cell lives in the caller.
|
|
30
29
|
*/
|
|
31
|
-
declare function CellContextualFilter<TData extends RowData, TValue>({ filter, globalSearch, cell, onContextCell, onContextSearch, contextualMenuActions, }: CellContextualFilterProps<TData, TValue>):
|
|
30
|
+
declare function CellContextualFilter<TData extends RowData, TValue>({ filter, globalSearch, cell, onContextCell, onContextSearch, contextualMenuActions, }: CellContextualFilterProps<TData, TValue>): React$1.JSX.Element;
|
|
32
31
|
|
|
33
32
|
type ColumnOptionsProps<TData extends RowData> = {
|
|
34
33
|
columns: Column<TData, unknown>[];
|
|
@@ -44,25 +43,25 @@ type ColumnOptionsProps<TData extends RowData> = {
|
|
|
44
43
|
* touches the unpinned slots (`mergeUnpinnedColumnOrder`), so pinned columns
|
|
45
44
|
* never jump position.
|
|
46
45
|
*/
|
|
47
|
-
declare function ColumnOptions<TData extends RowData>({ columns: rawColumns, columnOrdering, onColumnOrderingChange, disableColumnOrdering, }: ColumnOptionsProps<TData>):
|
|
46
|
+
declare function ColumnOptions<TData extends RowData>({ columns: rawColumns, columnOrdering, onColumnOrderingChange, disableColumnOrdering, }: ColumnOptionsProps<TData>): React$1.JSX.Element;
|
|
48
47
|
|
|
49
48
|
declare function RowActions({ align, children, contentClassName, }: {
|
|
50
49
|
align?: 'start' | 'end';
|
|
51
50
|
children: React$1.ReactNode;
|
|
52
51
|
contentClassName?: string;
|
|
53
|
-
}):
|
|
52
|
+
}): React$1.JSX.Element;
|
|
54
53
|
declare function RowActionItem({ disabled, className, tooltip, children, onClick, }: {
|
|
55
54
|
disabled?: boolean;
|
|
56
55
|
className?: string;
|
|
57
56
|
tooltip?: string;
|
|
58
57
|
children: React$1.ReactNode;
|
|
59
58
|
onClick?: React$1.ComponentProps<typeof DropdownMenuItem>['onClick'];
|
|
60
|
-
}):
|
|
59
|
+
}): React$1.JSX.Element;
|
|
61
60
|
/** A ready-made right-pinned, non-sortable/filterable/hideable "Actions" column. */
|
|
62
61
|
declare function getActionsColumnDefinition<TData extends RowData, TValue = unknown>({ cell, }: Pick<ColumnDef<TData, TValue>, 'cell'>): ColumnDef<TData, TValue>;
|
|
63
62
|
declare function ExpandButton<TData extends RowData>({ row }: {
|
|
64
63
|
row: Row<TData>;
|
|
65
|
-
}):
|
|
64
|
+
}): React$1.JSX.Element | null;
|
|
66
65
|
/** A ready-made right-pinned, fixed-width (28px) "Expand" column. Defaults to an `ExpandButton` cell. */
|
|
67
66
|
declare function getExpandColumnDefinition<TData extends RowData, TValue = unknown>(options?: {
|
|
68
67
|
cell?: (context: CellContext<TData, TValue>) => React$1.ReactNode;
|
|
@@ -82,11 +81,11 @@ type DataTableValueCellProps = {
|
|
|
82
81
|
* `Link` via a DI hook (`useLink()`); Monarch has no such layer, so the link
|
|
83
82
|
* branch renders a plain `<a>`.
|
|
84
83
|
*/
|
|
85
|
-
declare function DataTableValueCell({ content, title, className, href, onClick }: DataTableValueCellProps):
|
|
84
|
+
declare function DataTableValueCell({ content, title, className, href, onClick }: DataTableValueCellProps): React$1.JSX.Element;
|
|
86
85
|
/** A timestamp cell — relative time in the cell, absolute time on hover (via Monarch's `RelativeTime`); an em-dash when absent. */
|
|
87
86
|
declare function TimestampCell({ timestamp }: {
|
|
88
87
|
timestamp?: Date | string | number;
|
|
89
|
-
}):
|
|
88
|
+
}): React$1.JSX.Element;
|
|
90
89
|
|
|
91
90
|
/**
|
|
92
91
|
* Non-CEL column filter definitions — the `meta.filter` vocabulary consumed by
|
|
@@ -260,7 +259,7 @@ declare function DataTableEmptyView({ emptyView, tableState, filterCount, resetF
|
|
|
260
259
|
filterCount: number;
|
|
261
260
|
resetFilters: () => void;
|
|
262
261
|
className?: string;
|
|
263
|
-
}):
|
|
262
|
+
}): React$1.JSX.Element;
|
|
264
263
|
|
|
265
264
|
type RowCountRelation = 'eq' | 'gt';
|
|
266
265
|
/** Pass `true` for defaults, `false` to disable the footer entirely (handled by the caller, not this component), or an object to toggle individual parts. */
|
|
@@ -292,7 +291,7 @@ type DataTablePaginationProps = {
|
|
|
292
291
|
onPageChange: (page: number) => void;
|
|
293
292
|
onPageSizeChange: (pageSize: number) => void;
|
|
294
293
|
};
|
|
295
|
-
declare function DataTablePagination({ pageIndex, pageSize, rowCount, rowCountRelation, paginationConfig, onPageChange, onPageSizeChange, }: DataTablePaginationProps):
|
|
294
|
+
declare function DataTablePagination({ pageIndex, pageSize, rowCount, rowCountRelation, paginationConfig, onPageChange, onPageSizeChange, }: DataTablePaginationProps): React$1.JSX.Element;
|
|
296
295
|
|
|
297
296
|
declare function DataTableHeader<TData extends RowData>({ headerGroups, onAutosizeAll, onAutosizeColumn, onResetColumnSize, stickyHeader, layout, }: {
|
|
298
297
|
headerGroups: HeaderGroup<TData>[];
|
|
@@ -302,7 +301,7 @@ declare function DataTableHeader<TData extends RowData>({ headerGroups, onAutosi
|
|
|
302
301
|
onResetColumnSize: (columnId: string) => void;
|
|
303
302
|
stickyHeader?: StickyHeaderConfig;
|
|
304
303
|
layout?: TableLayout;
|
|
305
|
-
}):
|
|
304
|
+
}): React$1.JSX.Element;
|
|
306
305
|
type DataTableRowProps = React$1.HTMLAttributes<HTMLElement> & {
|
|
307
306
|
hoverable?: boolean;
|
|
308
307
|
disabled?: boolean;
|
|
@@ -321,12 +320,12 @@ declare function DataTableCell<TData extends RowData, TValue>({ cell, className,
|
|
|
321
320
|
onContextSearch?: (searchTerm: string, cell: Cell<TData, TValue>) => void;
|
|
322
321
|
contextualMenuActions?: ContextualMenuAction<TData, TValue>[];
|
|
323
322
|
layout?: TableLayout;
|
|
324
|
-
}):
|
|
323
|
+
}): React$1.JSX.Element;
|
|
325
324
|
declare function DataTableGroupRow({ groupLabel, colSpan, layout, }: {
|
|
326
325
|
groupLabel: string;
|
|
327
326
|
colSpan: number;
|
|
328
327
|
layout?: TableLayout;
|
|
329
|
-
}):
|
|
328
|
+
}): React$1.JSX.Element;
|
|
330
329
|
type SkeletonColumn = {
|
|
331
330
|
id: string;
|
|
332
331
|
size?: number;
|
|
@@ -338,13 +337,13 @@ declare function DataTableSkeletonBody({ rowCount, columns, renderCell, layout,
|
|
|
338
337
|
columns: SkeletonColumn[];
|
|
339
338
|
renderCell?: (columnId: string) => React$1.ReactNode | undefined;
|
|
340
339
|
layout?: TableLayout;
|
|
341
|
-
}):
|
|
340
|
+
}): React$1.JSX.Element;
|
|
342
341
|
declare function DataTableExpandedRow({ colSpan, show, children, layout, }: {
|
|
343
342
|
colSpan: number;
|
|
344
343
|
show?: boolean;
|
|
345
344
|
children: React$1.ReactNode;
|
|
346
345
|
layout?: TableLayout;
|
|
347
|
-
}):
|
|
346
|
+
}): React$1.JSX.Element | null;
|
|
348
347
|
declare function DataTableBody<TData extends RowData>({ tableRows, tableState, columns, skeletonRowCount, renderSkeletonCell, onRowRender, renderExpandedRow, showContextualFilter, onContextCell, onContextSearch, contextualMenuActions, layout, }: {
|
|
349
348
|
tableRows: Row<TData>[];
|
|
350
349
|
tableState: TableDataState;
|
|
@@ -358,7 +357,7 @@ declare function DataTableBody<TData extends RowData>({ tableRows, tableState, c
|
|
|
358
357
|
onContextSearch?: (searchTerm: string, cell: Cell<TData, unknown>) => void;
|
|
359
358
|
contextualMenuActions?: ContextualMenuAction<TData, unknown>[];
|
|
360
359
|
layout?: TableLayout;
|
|
361
|
-
}):
|
|
360
|
+
}): React$1.JSX.Element;
|
|
362
361
|
|
|
363
362
|
/**
|
|
364
363
|
* Table rendering mode. `'auto'` uses a native `<table>`. `'grid'` renders
|
|
@@ -489,7 +488,7 @@ interface DataTableProps<TData extends RowData> {
|
|
|
489
488
|
* difference is that columns, headers, rows, cells, and menus render through
|
|
490
489
|
* Monarch's own primitives instead of legacy's hand-rolled ones.
|
|
491
490
|
*/
|
|
492
|
-
declare function DataTable<TData extends RowData>({ id, config, title, description, emptyView, showError, className, fitContent, loading, renderSkeletonCell, serverSidePagination, ActionsComponent: Actions, onRowRender, renderExpandedRow, expanded: parentExpanded, onExpandedChange: parentOnExpandedChange, disableSearch, disableFilters, disableSorting, paginationConfig, disableColumnReordering, disableColumnVisibility, disableColumnResizing, disableColumnPinning, searchTerm: parentGlobalFilter, onSearchTermChange: parentSetGlobalFilter, filters: parentColumnFilters, onFiltersChange: parentSetColumnFilters, pagination: parentPagination, onPaginationChange: parentSetPagination, sorting: parentSorting, onSortingChange: parentSetSorting, columnOrdering: parentColumnOrdering, onColumnOrderingChange: parentSetColumnOrdering, columnVisibility: parentColumnVisibility, onColumnVisibilityChange: parentSetColumnVisibility, columnPinning: parentColumnPinning, onColumnPinningChange: parentSetColumnPinning, grouping: parentGrouping, onGroupingChange: parentSetGrouping, celFilterClassName, showContextualFilter, onContextCell, contextualMenuActions, layout, initialColumnSizing, onColumnSizingPersist, stickyHeader, celFilterConfig, }: DataTableProps<TData>):
|
|
491
|
+
declare function DataTable<TData extends RowData>({ id, config, title, description, emptyView, showError, className, fitContent, loading, renderSkeletonCell, serverSidePagination, ActionsComponent: Actions, onRowRender, renderExpandedRow, expanded: parentExpanded, onExpandedChange: parentOnExpandedChange, disableSearch, disableFilters, disableSorting, paginationConfig, disableColumnReordering, disableColumnVisibility, disableColumnResizing, disableColumnPinning, searchTerm: parentGlobalFilter, onSearchTermChange: parentSetGlobalFilter, filters: parentColumnFilters, onFiltersChange: parentSetColumnFilters, pagination: parentPagination, onPaginationChange: parentSetPagination, sorting: parentSorting, onSortingChange: parentSetSorting, columnOrdering: parentColumnOrdering, onColumnOrderingChange: parentSetColumnOrdering, columnVisibility: parentColumnVisibility, onColumnVisibilityChange: parentSetColumnVisibility, columnPinning: parentColumnPinning, onColumnPinningChange: parentSetColumnPinning, grouping: parentGrouping, onGroupingChange: parentSetGrouping, celFilterClassName, showContextualFilter, onContextCell, contextualMenuActions, layout, initialColumnSizing, onColumnSizingPersist, stickyHeader, celFilterConfig, }: DataTableProps<TData>): React$1.JSX.Element;
|
|
493
492
|
|
|
494
493
|
type ViewFilterProps<TData extends RowData> = {
|
|
495
494
|
columns: Column<TData, unknown>[];
|
|
@@ -507,6 +506,6 @@ type ViewFilterProps<TData extends RowData> = {
|
|
|
507
506
|
* false`). CEL-based filtering (`celFilterConfig`) is the richer,
|
|
508
507
|
* operator-driven tier this is not meant to replace.
|
|
509
508
|
*/
|
|
510
|
-
declare function ViewFilter<TData extends RowData>({ columns, columnFilters, onColumnFiltersChange, className, }: ViewFilterProps<TData>):
|
|
509
|
+
declare function ViewFilter<TData extends RowData>({ columns, columnFilters, onColumnFiltersChange, className, }: ViewFilterProps<TData>): React$1.JSX.Element;
|
|
511
510
|
|
|
512
511
|
export { CellContextualFilter, type CellContextualFilterProps, ColumnOptions, type ColumnOptionsProps, type ContextualMenuAction, DataTable, DataTableBody, type DataTableCelFilterConfig, DataTableCell, type DataTableEmptyConfig, DataTableEmptyView, DataTableExpandedRow, DataTableGroupRow, DataTableHeader, DataTablePagination, type DataTablePaginationConfig, type DataTablePaginationProps, type DataTableProps, DataTableRow, type DataTableRowProps, DataTableSkeletonBody, DataTableValueCell, type DataTableValueCellProps, ExpandButton, RowActionItem, RowActions, type RowCountRelation, type StickyHeaderConfig, type TableHookOptions, type TableLayout, TimestampCell, ViewFilter, type ViewFilterProps, defaultEmptyConfig, defaultErrorConfig, defaultNoFilterFoundConfig, getActionsColumnDefinition, getExpandColumnDefinition, normalizePageSizeOptions };
|
package/dist/filter-bar.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
type FilterType = 'checkbox' | 'radio' | 'text' | 'multiText' | 'date';
|
|
@@ -66,7 +65,7 @@ interface FilterBarProps extends React.ComponentProps<'div'> {
|
|
|
66
65
|
onRemoveFilter: (key: string) => void;
|
|
67
66
|
onChangeFilter: (key: string, value: FilterValue) => void;
|
|
68
67
|
}
|
|
69
|
-
declare function FilterBar({ filters, activeFilters, onAddFilter, onRemoveFilter, onChangeFilter, className, children, ...props }: FilterBarProps):
|
|
68
|
+
declare function FilterBar({ filters, activeFilters, onAddFilter, onRemoveFilter, onChangeFilter, className, children, ...props }: FilterBarProps): React.JSX.Element;
|
|
70
69
|
interface FilterChipProps {
|
|
71
70
|
definition: FilterDefinition;
|
|
72
71
|
value: FilterValue | undefined;
|
|
@@ -75,6 +74,6 @@ interface FilterChipProps {
|
|
|
75
74
|
onChangeValue: (value: FilterValue) => void;
|
|
76
75
|
onRemove: () => void;
|
|
77
76
|
}
|
|
78
|
-
declare function FilterChip({ definition, value, autoOpen, onChangeValue, onRemove }: FilterChipProps):
|
|
77
|
+
declare function FilterChip({ definition, value, autoOpen, onChangeValue, onRemove }: FilterChipProps): React.JSX.Element;
|
|
79
78
|
|
|
80
79
|
export { type ActiveFilter, type CheckboxFilterDefinition, type CheckboxFilterValue, type DateFilterDefinition, type DateFilterValue, FilterBar, type FilterBarProps, FilterChip, type FilterDefinition, type FilterOption, type FilterType, type FilterValue, type MultiTextFilterDefinition, type MultiTextFilterValue, type RadioFilterDefinition, type RadioFilterValue, type TextFilterDefinition, type TextFilterValue };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
type FloatingWidgetState = {
|
|
@@ -16,7 +15,7 @@ type FloatingWidgetState = {
|
|
|
16
15
|
};
|
|
17
16
|
declare function FloatingWidgetProvider({ children }: {
|
|
18
17
|
children: React.ReactNode;
|
|
19
|
-
}):
|
|
18
|
+
}): React.JSX.Element;
|
|
20
19
|
declare function useFloatingWidget(): FloatingWidgetState;
|
|
21
20
|
interface FloatingWidgetProps {
|
|
22
21
|
/** Title shown in the header bar. */
|
|
@@ -31,6 +30,6 @@ interface FloatingWidgetProps {
|
|
|
31
30
|
children?: React.ReactNode;
|
|
32
31
|
className?: string;
|
|
33
32
|
}
|
|
34
|
-
declare function FloatingWidget({ title, subtitle, menuItems, children, className }: FloatingWidgetProps):
|
|
33
|
+
declare function FloatingWidget({ title, subtitle, menuItems, children, className }: FloatingWidgetProps): React.JSX.Element | null;
|
|
35
34
|
|
|
36
35
|
export { FloatingWidget, FloatingWidgetProvider, useFloatingWidget };
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ export { AbsoluteTimestamp, AbsoluteTimestampProps, ElapsedTime, ElapsedTimeProp
|
|
|
11
11
|
export { SectionHeader, SectionHeaderActions, SectionHeaderContent, SectionHeaderDescription, SectionHeaderMeta, SectionHeaderTabs, SectionHeaderTitle } from './section-header.js';
|
|
12
12
|
export { SectionNav, SectionNavGroup, SectionNavGroupLabel, SectionNavItem, SectionNavItemDescription, SectionNavList, SectionNavSub } from './section-nav.js';
|
|
13
13
|
export { Timeline, TimelineItem } from './timeline.js';
|
|
14
|
-
import 'react/jsx-runtime';
|
|
15
14
|
import 'react';
|
|
16
15
|
import 'recharts';
|
|
17
16
|
import '@tanstack/react-table';
|
package/dist/page-header.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
|
|
3
|
-
declare function PageHeader({ className, children, ...props }: React.ComponentProps<'div'>):
|
|
4
|
-
declare function PageHeaderAvatar({ className, ...props }: React.ComponentProps<'div'>):
|
|
5
|
-
declare function PageHeaderContent({ className, ...props }: React.ComponentProps<'div'>):
|
|
6
|
-
declare function PageHeaderTitle({ className, ...props }: React.ComponentProps<'h1'>):
|
|
7
|
-
declare function PageHeaderDescription({ className, ...props }: React.ComponentProps<'p'>):
|
|
8
|
-
declare function PageHeaderMeta({ className, ...props }: React.ComponentProps<'div'>):
|
|
9
|
-
declare function PageHeaderActions({ className, ...props }: React.ComponentProps<'div'>):
|
|
10
|
-
declare function PageHeaderTabs({ className, ...props }: React.ComponentProps<'div'>):
|
|
3
|
+
declare function PageHeader({ className, children, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
4
|
+
declare function PageHeaderAvatar({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
5
|
+
declare function PageHeaderContent({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
6
|
+
declare function PageHeaderTitle({ className, ...props }: React.ComponentProps<'h1'>): React$1.JSX.Element;
|
|
7
|
+
declare function PageHeaderDescription({ className, ...props }: React.ComponentProps<'p'>): React$1.JSX.Element;
|
|
8
|
+
declare function PageHeaderMeta({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
9
|
+
declare function PageHeaderActions({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
10
|
+
declare function PageHeaderTabs({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
11
11
|
|
|
12
12
|
export { PageHeader, PageHeaderActions, PageHeaderAvatar, PageHeaderContent, PageHeaderDescription, PageHeaderMeta, PageHeaderTabs, PageHeaderTitle };
|
package/dist/relative-time.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
interface RelativeTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime' | 'title'> {
|
|
@@ -27,7 +26,7 @@ interface RelativeTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElemen
|
|
|
27
26
|
*
|
|
28
27
|
* @see https://design.upbound.io/components/date-and-time
|
|
29
28
|
*/
|
|
30
|
-
declare function RelativeTime({ date, variant, title, className, ...props }: RelativeTimeProps):
|
|
29
|
+
declare function RelativeTime({ date, variant, title, className, ...props }: RelativeTimeProps): React.JSX.Element;
|
|
31
30
|
interface AbsoluteTimestampProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime'> {
|
|
32
31
|
/** The timestamp to display. */
|
|
33
32
|
date: Date | string | number;
|
|
@@ -40,7 +39,7 @@ interface AbsoluteTimestampProps extends Omit<React.TimeHTMLAttributes<HTMLTimeE
|
|
|
40
39
|
* Formats a date as an absolute timestamp following the Content Principles.
|
|
41
40
|
* Use for deadlines, certificate expiry, audit logs, and date-only displays.
|
|
42
41
|
*/
|
|
43
|
-
declare function AbsoluteTimestamp({ date, variant, end, className, ...props }: AbsoluteTimestampProps):
|
|
42
|
+
declare function AbsoluteTimestamp({ date, variant, end, className, ...props }: AbsoluteTimestampProps): React.JSX.Element;
|
|
44
43
|
interface ElapsedTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime'> {
|
|
45
44
|
/** Total elapsed seconds. Ignored if startedAt is provided. */
|
|
46
45
|
seconds?: number;
|
|
@@ -55,6 +54,6 @@ interface ElapsedTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement
|
|
|
55
54
|
* Formats a duration as elapsed time following the Content Principles.
|
|
56
55
|
* Use for reconciliation loops, build jobs, health checks, and running operations.
|
|
57
56
|
*/
|
|
58
|
-
declare function ElapsedTime({ seconds: secondsProp, variant, live, startedAt, className, ...props }: ElapsedTimeProps):
|
|
57
|
+
declare function ElapsedTime({ seconds: secondsProp, variant, live, startedAt, className, ...props }: ElapsedTimeProps): React.JSX.Element;
|
|
59
58
|
|
|
60
59
|
export { AbsoluteTimestamp, type AbsoluteTimestampProps, ElapsedTime, type ElapsedTimeProps, RelativeTime, type RelativeTimeProps };
|
package/dist/section-header.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
2
|
|
|
3
|
-
declare function SectionHeader({ className, children, ...props }: React.ComponentProps<'div'>):
|
|
4
|
-
declare function SectionHeaderContent({ className, ...props }: React.ComponentProps<'div'>):
|
|
5
|
-
declare function SectionHeaderTitle({ className, ...props }: React.ComponentProps<'h2'>):
|
|
6
|
-
declare function SectionHeaderDescription({ className, ...props }: React.ComponentProps<'p'>):
|
|
7
|
-
declare function SectionHeaderMeta({ className, ...props }: React.ComponentProps<'div'>):
|
|
8
|
-
declare function SectionHeaderActions({ className, ...props }: React.ComponentProps<'div'>):
|
|
9
|
-
declare function SectionHeaderTabs({ className, ...props }: React.ComponentProps<'div'>):
|
|
3
|
+
declare function SectionHeader({ className, children, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
4
|
+
declare function SectionHeaderContent({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
5
|
+
declare function SectionHeaderTitle({ className, ...props }: React.ComponentProps<'h2'>): React$1.JSX.Element;
|
|
6
|
+
declare function SectionHeaderDescription({ className, ...props }: React.ComponentProps<'p'>): React$1.JSX.Element;
|
|
7
|
+
declare function SectionHeaderMeta({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
8
|
+
declare function SectionHeaderActions({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
9
|
+
declare function SectionHeaderTabs({ className, ...props }: React.ComponentProps<'div'>): React$1.JSX.Element;
|
|
10
10
|
|
|
11
11
|
export { SectionHeader, SectionHeaderActions, SectionHeaderContent, SectionHeaderDescription, SectionHeaderMeta, SectionHeaderTabs, SectionHeaderTitle };
|
package/dist/section-nav.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
|
|
4
3
|
/**
|
|
@@ -30,10 +29,10 @@ import * as React from 'react';
|
|
|
30
29
|
* <Link href="/settings">Account</Link>
|
|
31
30
|
* </SectionNavItem>
|
|
32
31
|
*/
|
|
33
|
-
declare function SectionNav({ className, ...props }: React.ComponentProps<'nav'>):
|
|
34
|
-
declare function SectionNavList({ className, ...props }: React.ComponentProps<'ul'>):
|
|
35
|
-
declare function SectionNavGroup({ className, ...props }: React.ComponentProps<'div'>):
|
|
36
|
-
declare function SectionNavGroupLabel({ className, ...props }: React.ComponentProps<'div'>):
|
|
32
|
+
declare function SectionNav({ className, ...props }: React.ComponentProps<'nav'>): React.JSX.Element;
|
|
33
|
+
declare function SectionNavList({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
34
|
+
declare function SectionNavGroup({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
35
|
+
declare function SectionNavGroupLabel({ className, ...props }: React.ComponentProps<'div'>): React.JSX.Element;
|
|
37
36
|
interface SectionNavItemProps extends React.ComponentProps<'a'> {
|
|
38
37
|
/**
|
|
39
38
|
* Marks the item as the current page. Applies active styling and sets
|
|
@@ -43,8 +42,8 @@ interface SectionNavItemProps extends React.ComponentProps<'a'> {
|
|
|
43
42
|
isActive?: boolean;
|
|
44
43
|
asChild?: boolean;
|
|
45
44
|
}
|
|
46
|
-
declare function SectionNavItem({ className, isActive, asChild, children, ...props }: SectionNavItemProps):
|
|
47
|
-
declare function SectionNavItemDescription({ className, ...props }: React.ComponentProps<'span'>):
|
|
48
|
-
declare function SectionNavSub({ className, ...props }: React.ComponentProps<'ul'>):
|
|
45
|
+
declare function SectionNavItem({ className, isActive, asChild, children, ...props }: SectionNavItemProps): React.JSX.Element;
|
|
46
|
+
declare function SectionNavItemDescription({ className, ...props }: React.ComponentProps<'span'>): React.JSX.Element;
|
|
47
|
+
declare function SectionNavSub({ className, ...props }: React.ComponentProps<'ul'>): React.JSX.Element;
|
|
49
48
|
|
|
50
49
|
export { SectionNav, SectionNavGroup, SectionNavGroupLabel, SectionNavItem, SectionNavItemDescription, SectionNavList, SectionNavSub };
|
package/dist/timeline.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import { ItemGroup, Item } from '@upbound/monarch-core';
|
|
4
3
|
|
|
5
|
-
declare function Timeline({ className, ...props }: React.ComponentProps<typeof ItemGroup>):
|
|
6
|
-
declare function TimelineItem({ className, children, ...props }: React.ComponentProps<typeof Item>):
|
|
4
|
+
declare function Timeline({ className, ...props }: React.ComponentProps<typeof ItemGroup>): React.JSX.Element;
|
|
5
|
+
declare function TimelineItem({ className, children, ...props }: React.ComponentProps<typeof Item>): React.JSX.Element;
|
|
7
6
|
|
|
8
7
|
export { Timeline, TimelineItem };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@upbound/monarch-blocks",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Upbound's design system — composed components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,25 +39,25 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"react": "^
|
|
42
|
+
"react": "^19.2.8",
|
|
43
43
|
"react-dom": "^18.3.0 || ^19.0.0",
|
|
44
44
|
"tailwindcss": "^4.0.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@upbound/monarch-core": "^0.
|
|
48
|
-
"recharts": "^3.8.0",
|
|
47
|
+
"@upbound/monarch-core": "^0.5.0",
|
|
49
48
|
"@tanstack/react-table": "^8.21.3",
|
|
49
|
+
"clsx": "^2.1.1",
|
|
50
50
|
"radix-ui": "^1.4.3",
|
|
51
51
|
"react-day-picker": "^10.0.1",
|
|
52
|
-
"
|
|
52
|
+
"recharts": "^3.8.0",
|
|
53
53
|
"tailwind-merge": "^3.5.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"
|
|
56
|
+
"@babel/preset-env": "^8.0.2",
|
|
57
|
+
"@types/node": "^20.19.37",
|
|
58
|
+
"babel-jest": "^30.5.1",
|
|
57
59
|
"glob": "^13.0.6",
|
|
58
60
|
"ts-jest": "^29.4.12",
|
|
59
|
-
"
|
|
60
|
-
"@babel/preset-env": "^8.0.2",
|
|
61
|
-
"@types/node": "^20.19.37"
|
|
61
|
+
"tsup": "^8.5.1"
|
|
62
62
|
}
|
|
63
63
|
}
|