@mithrl/design-system 0.3.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/components/approval-card/ApprovalCard.d.ts +61 -0
- package/dist/components/code-block/CodeBlock.d.ts +64 -0
- package/dist/components/command-search/CommandSearch.d.ts +121 -0
- package/dist/components/context-cards/ContextCards.d.ts +53 -0
- package/dist/components/disclosure/Disclosure.d.ts +38 -0
- package/dist/components/dot-field/DotField.d.ts +102 -0
- package/dist/components/field-message/FieldMessage.d.ts +12 -0
- package/dist/components/filter-table/FilterTable.d.ts +61 -0
- package/dist/components/flap-text/FlapText.d.ts +68 -0
- package/dist/components/flowchart/Flowchart.d.ts +250 -0
- package/dist/components/flowchart/graphLayout.d.ts +35 -0
- package/dist/components/global-app-bar/GlobalAppBar.d.ts +14 -4
- package/dist/components/icon-swap/IconSwap.d.ts +30 -0
- package/dist/components/insight-cards/InsightCards.d.ts +97 -0
- package/dist/components/number-flow/NumberFlow.d.ts +93 -0
- package/dist/components/pixel-loader/PixelLoader.d.ts +94 -0
- package/dist/components/progress-indicator/ProgressIndicator.d.ts +9 -1
- package/dist/components/prompt-bar/PromptBar.d.ts +103 -0
- package/dist/components/recommendation-card/RecommendationCard.d.ts +77 -0
- package/dist/components/records-table/RecordsTable.d.ts +87 -0
- package/dist/components/resizable-panels/ResizablePanels.d.ts +22 -0
- package/dist/components/selection-actions/SelectionActions.d.ts +72 -0
- package/dist/components/skeleton-reveal/SkeletonReveal.d.ts +33 -0
- package/dist/components/status-orb/StatusOrb.d.ts +51 -0
- package/dist/components/streaming-text/StreamingText.d.ts +85 -0
- package/dist/components/task-rows/TaskRows.d.ts +77 -0
- package/dist/components/text-reveal/TextReveal.d.ts +62 -0
- package/dist/components/upload-queue/UploadQueue.d.ts +10 -0
- package/dist/index.d.ts +49 -1
- package/dist/index.js +5959 -1863
- package/dist/internal/useStaggerBatch.d.ts +22 -0
- package/dist/patterns/notifications/Notifications.d.ts +159 -0
- package/dist/patterns/workspace-app-shell/WorkspaceAppShell.d.ts +50 -0
- package/dist/styles.css +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { type CSSProperties } from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Milliseconds one swap takes. Both halves of the strip share it — see the
|
|
5
|
+
* stylesheet for why they cannot be decoupled. Mirrors `--motion-duration-slow`;
|
|
6
|
+
* the CSS reads the token directly and only falls back to this number when the
|
|
7
|
+
* caller overrides `revealDuration`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const TEXT_REVEAL_DEFAULT_DURATION_MS = 320;
|
|
10
|
+
export type TextRevealElement = "span" | "div" | "p" | "strong" | "em";
|
|
11
|
+
export type TextRevealAlign = "start" | "center" | "end";
|
|
12
|
+
export interface TextRevealProps {
|
|
13
|
+
/** The string to display. Changing it rolls the whole line over. */
|
|
14
|
+
text: string;
|
|
15
|
+
/** Host element. @default "span" */
|
|
16
|
+
as?: TextRevealElement;
|
|
17
|
+
/** Swap duration, in milliseconds. @default `--motion-duration-slow` */
|
|
18
|
+
revealDuration?: number;
|
|
19
|
+
/** Horizontal alignment of the rendered line. @default "start" */
|
|
20
|
+
align?: TextRevealAlign;
|
|
21
|
+
className?: string;
|
|
22
|
+
style?: CSSProperties;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Roller-style line transition.
|
|
26
|
+
*
|
|
27
|
+
* The line lives behind a one-line mask. When `text` changes the two lines move
|
|
28
|
+
* together as one rigid strip, downwards: the incoming line starts one line
|
|
29
|
+
* height *above* the window and slides down into place, while the outgoing line
|
|
30
|
+
* slides down and out through the bottom. New copy is revealed from the top,
|
|
31
|
+
* the way a station roller tag turns over.
|
|
32
|
+
*
|
|
33
|
+
* This is the transitions.dev "texts-reveal" technique — opacity, `translateY`
|
|
34
|
+
* and blur transitioned together on a smooth-out curve — kept strictly 2D. An
|
|
35
|
+
* earlier `rotateX` version could not survive a consumer that clips the label:
|
|
36
|
+
* each half collapsed into a sliver at its own hinge, so the flip never read as
|
|
37
|
+
* completing. A masked strip is both the sturdier mechanism and the closer
|
|
38
|
+
* match to the roller reference.
|
|
39
|
+
*
|
|
40
|
+
* Layout: the outgoing line is lifted out of flow and the mask is exactly one
|
|
41
|
+
* line tall, so the host's height never changes across a swap.
|
|
42
|
+
*
|
|
43
|
+
* Interruption: one swap is identified by a token. A `text` change mid-flight
|
|
44
|
+
* bumps the token, which re-keys both lines and restarts the animation from a
|
|
45
|
+
* known state — there is no partial transform to inherit. Settling is driven by
|
|
46
|
+
* the incoming line's `animationend` *and* by a token-guarded timer, so a
|
|
47
|
+
* dropped event or a throttled background tab still resolves to the settled
|
|
48
|
+
* DOM: exactly one line, no outgoing line, no transform.
|
|
49
|
+
*
|
|
50
|
+
* Accessibility: the visual lines are `aria-hidden`, the host carries
|
|
51
|
+
* `aria-label={text}`, and a visually hidden polite live region announces the
|
|
52
|
+
* settled string once.
|
|
53
|
+
*
|
|
54
|
+
* Reduced motion: no travel and no blur — the line crossfades in place.
|
|
55
|
+
*/
|
|
56
|
+
export declare function TextReveal({ text, as, revealDuration, align, className, style, }: TextRevealProps): import("react").DetailedReactHTMLElement<{
|
|
57
|
+
className: string;
|
|
58
|
+
style: CSSProperties | undefined;
|
|
59
|
+
"aria-label": string;
|
|
60
|
+
"data-align": TextRevealAlign;
|
|
61
|
+
"data-revealing": string;
|
|
62
|
+
}, HTMLElement>;
|
|
@@ -25,6 +25,11 @@ export type UploadQueueItemProps = Omit<HTMLAttributes<HTMLLIElement>, "children
|
|
|
25
25
|
onRemove?: UploadQueueAction;
|
|
26
26
|
onCancel?: UploadQueueAction;
|
|
27
27
|
onRetry?: UploadQueueAction;
|
|
28
|
+
/**
|
|
29
|
+
* How many `--motion-stagger-tight` steps this row waits before entering.
|
|
30
|
+
* Set by `UploadQueue` for rows that arrived as one batch.
|
|
31
|
+
*/
|
|
32
|
+
staggerStep?: number;
|
|
28
33
|
};
|
|
29
34
|
export type UploadQueueProps = Omit<HTMLAttributes<HTMLElement>, "children" | "onCancel" | "role"> & {
|
|
30
35
|
items: readonly UploadQueueResource[];
|
|
@@ -51,6 +56,11 @@ export declare const UploadQueueItem: import("react").ForwardRefExoticComponent<
|
|
|
51
56
|
onRemove?: UploadQueueAction;
|
|
52
57
|
onCancel?: UploadQueueAction;
|
|
53
58
|
onRetry?: UploadQueueAction;
|
|
59
|
+
/**
|
|
60
|
+
* How many `--motion-stagger-tight` steps this row waits before entering.
|
|
61
|
+
* Set by `UploadQueue` for rows that arrived as one batch.
|
|
62
|
+
*/
|
|
63
|
+
staggerStep?: number;
|
|
54
64
|
} & import("react").RefAttributes<HTMLLIElement>>;
|
|
55
65
|
/**
|
|
56
66
|
* Semantic accepted-resource queue. Acquisition remains owned by File
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export { Button, buttonVariants } from "./components/button/Button";
|
|
|
3
3
|
export type { ButtonProps, ButtonSize, ButtonVariant, } from "./components/button/Button";
|
|
4
4
|
export { Icon, iconVariants } from "./components/icon/Icon";
|
|
5
5
|
export type { IconGlyphComponent, IconProps, IconSize, } from "./components/icon/Icon";
|
|
6
|
+
export { IconSwap } from "./components/icon-swap/IconSwap";
|
|
7
|
+
export type { IconSwapProps } from "./components/icon-swap/IconSwap";
|
|
6
8
|
export { NavigationItem, navigationItemVariants, } from "./components/navigation-item/NavigationItem";
|
|
7
9
|
export type { NavigationItemPreviewState, NavigationItemProps, } from "./components/navigation-item/NavigationItem";
|
|
8
10
|
export { WorkspaceNavigation, WorkspacePanelToggleButton, workspaceNavigationVariants, } from "./components/workspace-navigation/WorkspaceNavigation";
|
|
@@ -27,6 +29,8 @@ export { Textarea, textareaVariants } from "./components/textarea/Textarea";
|
|
|
27
29
|
export type { TextareaPreviewState, TextareaProps, TextareaResize, TextareaStatus, TextareaSurface, } from "./components/textarea/Textarea";
|
|
28
30
|
export { Composer } from "./components/composer/Composer";
|
|
29
31
|
export type { ComposerLabels, ComposerMode, ComposerPreviewState, ComposerProps, ComposerStatus, } from "./components/composer/Composer";
|
|
32
|
+
export { ApprovalCard } from "./components/approval-card/ApprovalCard";
|
|
33
|
+
export type { ApprovalCardAnswer, ApprovalCardLabels, ApprovalCardMode, ApprovalCardNavigationReason, ApprovalCardOption, ApprovalCardProps, ApprovalCardQuestion, } from "./components/approval-card/ApprovalCard";
|
|
30
34
|
export { ComposerViewTransition } from "./components/composer/ComposerViewTransition";
|
|
31
35
|
export type { ComposerView, ComposerViewTransitionProps, } from "./components/composer/ComposerViewTransition";
|
|
32
36
|
export { ComposerAttachmentView } from "./components/composer/ComposerAttachmentView";
|
|
@@ -44,9 +48,11 @@ export type { TagProps } from "./components/tag/Tag";
|
|
|
44
48
|
export { Avatar, avatarVariants } from "./components/avatar/Avatar";
|
|
45
49
|
export type { AvatarProps, AvatarSize, } from "./components/avatar/Avatar";
|
|
46
50
|
export { ProgressIndicator, progressIndicatorVariants, } from "./components/progress-indicator/ProgressIndicator";
|
|
47
|
-
export type { ProgressIndicatorProps, ProgressIndicatorSize, ProgressIndicatorTone, } from "./components/progress-indicator/ProgressIndicator";
|
|
51
|
+
export type { ProgressIndicatorProps, ProgressIndicatorSize, ProgressIndicatorState, ProgressIndicatorTone, } from "./components/progress-indicator/ProgressIndicator";
|
|
48
52
|
export { Skeleton, skeletonVariants } from "./components/skeleton/Skeleton";
|
|
49
53
|
export type { SkeletonProps, SkeletonRadius, } from "./components/skeleton/Skeleton";
|
|
54
|
+
export { SkeletonReveal } from "./components/skeleton-reveal/SkeletonReveal";
|
|
55
|
+
export type { SkeletonRevealProps } from "./components/skeleton-reveal/SkeletonReveal";
|
|
50
56
|
export { Checkbox } from "./components/checkbox/Checkbox";
|
|
51
57
|
export type { CheckboxPreviewState, CheckboxProps, } from "./components/checkbox/Checkbox";
|
|
52
58
|
export { Radio } from "./components/radio/Radio";
|
|
@@ -57,6 +63,8 @@ export { StandardTabs, standardTabsVariants, } from "./components/standard-tabs/
|
|
|
57
63
|
export type { StandardTabItem, StandardTabsActivationMode, StandardTabsProps, StandardTabsSize, } from "./components/standard-tabs/StandardTabs";
|
|
58
64
|
export { FieldMessage, fieldMessageVariants, } from "./components/field-message/FieldMessage";
|
|
59
65
|
export type { FieldMessageProps, FieldMessageTone, } from "./components/field-message/FieldMessage";
|
|
66
|
+
export { Disclosure } from "./components/disclosure/Disclosure";
|
|
67
|
+
export type { DisclosureProps } from "./components/disclosure/Disclosure";
|
|
60
68
|
export { Field } from "./components/field/Field";
|
|
61
69
|
export type { FieldControlProps, FieldControlStatus, FieldProps, FieldRenderProps, FieldSize, FieldState, } from "./components/field/Field";
|
|
62
70
|
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuLinkItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, dropdownMenuContentVariants, } from "./components/dropdown-menu/DropdownMenu";
|
|
@@ -91,3 +99,43 @@ export { WorkspaceQuestionSurface } from "./patterns/workspace-app-shell/Workspa
|
|
|
91
99
|
export type { WorkspaceAppShellNavigationRenderContext, WorkspaceAppShellNavigationRenderer, WorkspaceAppShellLayout, WorkspaceAppShellProps, WorkspaceNavigationConfiguration, } from "./patterns/workspace-app-shell/WorkspaceAppShell";
|
|
92
100
|
export type { WorkspaceNewQuestionDialogProps, WorkspaceNewQuestionDraft, } from "./patterns/workspace-app-shell/WorkspaceNewQuestionDialog";
|
|
93
101
|
export type { WorkspaceQuestionSurfacePanel, WorkspaceQuestionSurfaceProps, WorkspaceQuestionSurfaceScroll, } from "./patterns/workspace-app-shell/WorkspaceQuestionSurface";
|
|
102
|
+
export { PIXEL_LOADER_DEFAULT_LABEL, PIXEL_LOADER_GRID, PixelLoader, pixelLoaderCellDelay, pixelLoaderCellPhase, pixelLoaderLitCellsAt, pixelLoaderVariants, } from "./components/pixel-loader/PixelLoader";
|
|
103
|
+
export type { PixelLoaderProps, PixelLoaderSize, PixelLoaderVariant, } from "./components/pixel-loader/PixelLoader";
|
|
104
|
+
export { DotField, dotFieldDistanceToRect, dotFieldExclusionAlpha, dotFieldFalloff, dotFieldInflateRect, } from "./components/dot-field/DotField";
|
|
105
|
+
export type { DotFieldProps, DotFieldRect, } from "./components/dot-field/DotField";
|
|
106
|
+
export { StatusOrb } from "./components/status-orb/StatusOrb";
|
|
107
|
+
export type { StatusOrbProps, StatusOrbSize, StatusOrbState, StatusOrbTheme, } from "./components/status-orb/StatusOrb";
|
|
108
|
+
export { FlapText, FLAP_TEXT_DEFAULT_DURATION_MS, FLAP_TEXT_DEFAULT_STAGGER_MS, } from "./components/flap-text/FlapText";
|
|
109
|
+
export type { FlapTextAlign, FlapTextElement, FlapTextProps, } from "./components/flap-text/FlapText";
|
|
110
|
+
export { TextReveal, TEXT_REVEAL_DEFAULT_DURATION_MS, } from "./components/text-reveal/TextReveal";
|
|
111
|
+
export type { TextRevealAlign, TextRevealElement, TextRevealProps, } from "./components/text-reveal/TextReveal";
|
|
112
|
+
export { NumberFlow, numberFlowCells, NUMBER_FLOW_DEFAULT_DURATION_MS, NUMBER_FLOW_DEFAULT_STAGGER_MS, } from "./components/number-flow/NumberFlow";
|
|
113
|
+
export type { NumberFlowCell, NumberFlowDirection, NumberFlowElement, NumberFlowProps, NumberFlowSize, } from "./components/number-flow/NumberFlow";
|
|
114
|
+
export { CodeBlock } from "./components/code-block/CodeBlock";
|
|
115
|
+
export type { CodeBlockLabels, CodeBlockProps, CodeBlockRenderLineArgs, CodeBlockVariant, CodeLine, CodeLineKind, } from "./components/code-block/CodeBlock";
|
|
116
|
+
export { CommandSearch } from "./components/command-search/CommandSearch";
|
|
117
|
+
export type { CommandSearchItem, CommandSearchItemState, CommandSearchProps, } from "./components/command-search/CommandSearch";
|
|
118
|
+
export { ContextCard, ContextCardList, FileTypeChip, } from "./components/context-cards/ContextCards";
|
|
119
|
+
export type { ContextCardListProps, ContextCardProps, ContextFileType, FileTypeChipProps, } from "./components/context-cards/ContextCards";
|
|
120
|
+
export { FilterTable, filterTableStatusLabels, filterTableStatuses, } from "./components/filter-table/FilterTable";
|
|
121
|
+
export type { FilterTableProps, FilterTableRow, FilterTableStatus, FilterTableStatusLabelMap, } from "./components/filter-table/FilterTable";
|
|
122
|
+
export { FlowchartAction, FlowchartCanvas, FlowchartCondition, FlowchartConnector, FlowchartGraph, FlowchartTrigger, } from "./components/flowchart/Flowchart";
|
|
123
|
+
export type { FlowchartActionProps, FlowchartCanvasProps, FlowchartClauseJoin, FlowchartConditionClause, FlowchartConditionProps, FlowchartConnectorProps, FlowchartConnectorVariant, FlowchartGraphNode, FlowchartGraphProps, FlowchartTriggerProps, } from "./components/flowchart/Flowchart";
|
|
124
|
+
export { FLOWCHART_GRAPH_MAX_LANES, FLOWCHART_GRAPH_MAX_NODES, layoutFlowchartGraph, } from "./components/flowchart/graphLayout";
|
|
125
|
+
export type { FlowchartGraphEdge, FlowchartGraphLayout, FlowchartGraphNodeKind, } from "./components/flowchart/graphLayout";
|
|
126
|
+
export { InsightCards } from "./components/insight-cards/InsightCards";
|
|
127
|
+
export type { Insight, InsightCardsProps, InsightChart, InsightChartPoint, InsightComparison, InsightFollowUp, InsightSegment, InsightTone, } from "./components/insight-cards/InsightCards";
|
|
128
|
+
export { PromptBar, readTriggerAtCaret, } from "./components/prompt-bar/PromptBar";
|
|
129
|
+
export type { PromptBarCommand, PromptBarLabels, PromptBarModel, PromptBarProps, PromptBarShape, PromptBarSource, PromptBarTrigger, } from "./components/prompt-bar/PromptBar";
|
|
130
|
+
export { RecommendationCard, RecommendationEntityChip, } from "./components/recommendation-card/RecommendationCard";
|
|
131
|
+
export type { RecommendationAlternative, RecommendationCardProps, RecommendationConfidence, RecommendationEntityChipProps, } from "./components/recommendation-card/RecommendationCard";
|
|
132
|
+
export { RecordsTable, RecordsTableLink, RecordsTableStrength, RecordsTableTags, recordsTableStrengthLevels, } from "./components/records-table/RecordsTable";
|
|
133
|
+
export type { RecordsTableAlign, RecordsTableColumn, RecordsTableLinkProps, RecordsTableProps, RecordsTableSort, RecordsTableSortDirection, RecordsTableStrengthLevel, RecordsTableStrengthProps, RecordsTableTagsProps, } from "./components/records-table/RecordsTable";
|
|
134
|
+
export { SelectionActions, useSelectionRect, } from "./components/selection-actions/SelectionActions";
|
|
135
|
+
export type { SelectionAction, SelectionActionsProps, SelectionRect, UseSelectionRectOptions, } from "./components/selection-actions/SelectionActions";
|
|
136
|
+
export { SourceChip, SourceStack, StreamingText, } from "./components/streaming-text/StreamingText";
|
|
137
|
+
export type { FollowUpSuggestion, SourceChipProps, SourceChipTone, SourceStackProps, StreamingTextProps, } from "./components/streaming-text/StreamingText";
|
|
138
|
+
export { TaskRow, TaskRows } from "./components/task-rows/TaskRows";
|
|
139
|
+
export type { TaskRowItem, TaskRowProps, TaskRowsProps, TaskRowsView, TaskState, TaskStep, } from "./components/task-rows/TaskRows";
|
|
140
|
+
export { NotificationCenter, NotificationItem, NotificationStatusIcon, NotificationToast, NotificationToastProvider, NotificationToastViewport, NotificationTrigger, NotificationsDrawer, useNotificationToast, } from "./patterns/notifications/Notifications";
|
|
141
|
+
export type { NotificationCenterProps, NotificationFilter, NotificationItemPreviewState, NotificationItemProps, NotificationRecord, NotificationStatusIconProps, NotificationToastData, NotificationToastOptions, NotificationToastProps, NotificationToastProviderProps, NotificationToastViewportProps, NotificationTone, NotificationTriggerProps, NotificationsDrawerProps, } from "./patterns/notifications/Notifications";
|