@getsoren/design-system 4.87.0 → 4.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +75 -73
- package/dist/main.js +11188 -10470
- package/dist/node_modules/@mui/material/esm/useMediaQuery/index.d.ts +7 -0
- package/dist/src/components/DataDisplay/AiAssistant/AiAssistant.d.ts +14 -10
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantAvatar.d.ts +4 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantConfirmationCard.d.ts +1 -1
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantEmptyState.d.ts +2 -2
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantFab.d.ts +3 -6
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantHeader.d.ts +2 -2
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantMark.d.ts +4 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantNudge.d.ts +1 -1
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantPanel.d.ts +4 -7
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantReplyActions.d.ts +4 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantShape.d.ts +3 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantSuggestion.d.ts +4 -0
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantThinking.d.ts +7 -0
- package/dist/src/components/DataDisplay/AiAssistant/constants.d.ts +23 -0
- package/dist/src/components/DataDisplay/AiAssistant/types.d.ts +102 -29
- package/dist/src/components/DataDisplay/AiAssistant/utils/docked.d.ts +24 -0
- package/dist/src/components/DataDisplay/AiAssistant/utils/gradient.d.ts +8 -11
- package/dist/src/components/DataDisplay/Chat/components/ChatMessageBubble.d.ts +1 -1
- package/dist/src/components/DataDisplay/Chat/components/ChatMessageInput.d.ts +1 -1
- package/dist/src/components/DataDisplay/Chat/types.d.ts +8 -0
- package/dist/src/components/DataDisplay/EventFlag/EventFlag.d.ts +7 -0
- package/dist/src/components/DataDisplay/Icons/CloseLineIcon.d.ts +8 -0
- package/dist/src/components/DataDisplay/Icons/CollapseIcon.d.ts +8 -0
- package/dist/src/components/DataDisplay/Icons/CopyIcon.d.ts +8 -0
- package/dist/src/components/DataDisplay/Icons/MicIcon.d.ts +3 -2
- package/dist/src/components/DataDisplay/Icons/NewChatIcon.d.ts +8 -0
- package/dist/src/components/DataDisplay/Icons/ThumbDownIcon.d.ts +10 -0
- package/dist/src/components/DataDisplay/Icons/ThumbUpIcon.d.ts +10 -0
- package/dist/src/components/Layout/Backoffice/Backoffice.d.ts +3 -1
- package/dist/src/components/Layout/CollapsingHeader/CollapsingHeader.d.ts +1 -1
- package/dist/src/components/Layout/CollapsingHeader/types.d.ts +2 -0
- package/dist/src/components/Navigation/NavigationMenu/NavigationMenu.d.ts +5 -1
- package/dist/src/config/theme.d.ts +1 -0
- package/dist/src/constants/appBar.d.ts +2 -0
- package/dist/src/main.d.ts +5 -1
- package/dist/src/utils/getSubtleSurfaceColor.d.ts +4 -0
- package/package.json +1 -1
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantThinkingOrb.d.ts +0 -9
- package/dist/src/components/DataDisplay/Icons/AiSparkIcon.d.ts +0 -7
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UseMediaQueryOptions } from '@mui/system/useMediaQuery';
|
|
2
|
+
import { Theme } from '../styles/createTheme.js';
|
|
3
|
+
export * from '@mui/system/useMediaQuery';
|
|
4
|
+
|
|
5
|
+
// TODO v7: remove the generic. It's only used to prevent a breaking change in v6 from system's useMediaQuery in https://github.com/mui/material-ui/pull/44339.
|
|
6
|
+
declare function useMediaQuery<T = Theme>(queryInput: string | ((theme: T) => string), options?: UseMediaQueryOptions): boolean;
|
|
7
|
+
export default useMediaQuery;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Building blocks for an in-app AI assistant (
|
|
3
|
-
* thinking
|
|
4
|
-
* agentic loop, the tools and the wording
|
|
5
|
-
*
|
|
2
|
+
* Building blocks for an in-app AI assistant (Fab, floating or docked panel, header, empty state,
|
|
3
|
+
* thinking row, reply actions, confirmation cards, onboarding nudge and spotlight). Purely
|
|
4
|
+
* presentational: the host app owns the agentic loop, the tools and the wording — combine with
|
|
5
|
+
* Chat.MessageBubble / Chat.MessageInput / Chat.VoiceRecorder for the thread.
|
|
6
6
|
*/
|
|
7
7
|
declare const AiAssistant: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
Avatar: ({ variant, isWorking }: import('./types').AiAssistantAvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
ConfirmationCard: ({ heading, summary, details, status, onAccept, onDecline, labels, icon, onOpen, links, dataTestId, }: import('./types').AiAssistantConfirmationCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
EmptyState: ({ title, icon, children }: import('./types').AiAssistantEmptyStateProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
+
Fab: ({ onClick, label, dataTestId, ...dataAttributes }: import('./types').AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
|
+
Header: ({ title, tag, onClose, docked, onToggleDocked, onNewConversation, labels }: import('./types').AiAssistantHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
+
Mark: ({ size, color, isWorking }: import('./types').AiAssistantMarkProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
14
|
Nudge: ({ open, title, onClose, content, children, activeStep, onStepChange, labels, dataTestId, }: import('./types').AiAssistantNudgeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
|
-
Panel: ({ open,
|
|
15
|
+
Panel: ({ open, docked, children, dataTestId }: import('./types').AiAssistantPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
+
ReplyActions: ({ content, onVote, labels, slotProps, vote, dataTestId, }: import('./types').AiAssistantReplyActionsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
17
|
Spotlight: ({ anchor, blocking, onWindowClick, dataTestId, }: import('./types').AiAssistantSpotlightProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
-
|
|
18
|
+
Suggestion: ({ children, onClick, dataTestId, ...dataAttributes }: import('./types').AiAssistantSuggestionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
19
|
+
Thinking: ({ label, steps, onStop, labels, slotProps, dataTestId, }: import('./types').AiAssistantThinkingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
20
|
};
|
|
17
21
|
export default AiAssistant;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AiAssistantAvatarProps } from '../types';
|
|
2
|
+
/** The assistant's mark in a round: grey in the thread, or the flowing brand gradient where it stands for the brand. */
|
|
3
|
+
declare const AiAssistantAvatar: ({ variant, isWorking }: AiAssistantAvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default AiAssistantAvatar;
|
package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantConfirmationCard.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ import { AiAssistantConfirmationCardProps } from '../types';
|
|
|
4
4
|
* done and blocks until the user accepts or declines. After the choice, the card stays
|
|
5
5
|
* in the thread as a record of the decision.
|
|
6
6
|
*/
|
|
7
|
-
declare const AiAssistantConfirmationCard: ({ heading, summary, details, status, onAccept, onDecline, labels, dataTestId, }: AiAssistantConfirmationCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const AiAssistantConfirmationCard: ({ heading, summary, details, status, onAccept, onDecline, labels, icon, onOpen, links, dataTestId, }: AiAssistantConfirmationCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default AiAssistantConfirmationCard;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AiAssistantEmptyStateProps } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Welcome of an empty thread, set right above the composer — render it conditionally in place of the
|
|
4
4
|
* message list content ({!messages.length && <AiAssistant.EmptyState … />}).
|
|
5
5
|
*/
|
|
6
|
-
declare const AiAssistantEmptyState: ({
|
|
6
|
+
declare const AiAssistantEmptyState: ({ title, icon, children }: AiAssistantEmptyStateProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default AiAssistantEmptyState;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { AiAssistantFabProps } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
* The assistant's
|
|
4
|
-
*
|
|
5
|
-
* blob morph, breath and pulsing aura while idle; calm circle with a close glyph when
|
|
6
|
-
* the panel is open. The animations live on a ::before layer so the hit-box never
|
|
7
|
-
* moves (reliable clicks, stable e2e).
|
|
3
|
+
* The assistant's entry point, a pill in the bottom-right corner: its avatar and a call to ask it.
|
|
4
|
+
* The host app hides it while the panel is open, the panel taking its corner.
|
|
8
5
|
*/
|
|
9
|
-
declare const AiAssistantFab: ({
|
|
6
|
+
declare const AiAssistantFab: ({ onClick, label, dataTestId, ...dataAttributes }: AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
7
|
export default AiAssistantFab;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AiAssistantHeaderProps } from '../types';
|
|
2
|
-
/** Panel header:
|
|
3
|
-
declare const AiAssistantHeader: ({ title,
|
|
2
|
+
/** Panel header: the assistant's name (host-app choice) and its tag, then the panel's buttons */
|
|
3
|
+
declare const AiAssistantHeader: ({ title, tag, onClose, docked, onToggleDocked, onNewConversation, labels }: AiAssistantHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default AiAssistantHeader;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AiAssistantMarkProps } from '../types';
|
|
2
|
+
/** The Soren logo's ellipse in a glow, turning with two satellites while the assistant works. */
|
|
3
|
+
declare const AiAssistantMark: ({ size, color, isWorking }: AiAssistantMarkProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default AiAssistantMark;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AiAssistantNudgeProps } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Contextual nudge anchored where the assistant lives — a compact bubble growing out of
|
|
4
|
-
* the Fab,
|
|
4
|
+
* the Fab, right above it, free-height and one-click dismissable.
|
|
5
5
|
* No backdrop, no focus trap: the ongoing interaction is never blocked. Host apps use it
|
|
6
6
|
* for proactive one-shot messages (onboarding hints…) without opening the full panel.
|
|
7
7
|
*
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { AiAssistantPanelProps } from '../types';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* fade, but the motion tells where the panel comes from. While `isBusy`, a soft
|
|
7
|
-
* iridescent aura breathes around the panel; every animation frame keeps an ambient
|
|
8
|
-
* depth shadow (the animation overrides the elevation one).
|
|
3
|
+
* The assistant's chat, without a modal backdrop so the host app stays usable while the assistant
|
|
4
|
+
* navigates. Floating, it takes the bottom-right corner the Fab leaves while the panel is open, and
|
|
5
|
+
* grows from it; docked, it is a full-height column under the app bar, beside the content.
|
|
9
6
|
*/
|
|
10
|
-
declare const AiAssistantPanel: ({ open,
|
|
7
|
+
declare const AiAssistantPanel: ({ open, docked, children, dataTestId }: AiAssistantPanelProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
8
|
export default AiAssistantPanel;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AiAssistantReplyActionsProps } from '../types';
|
|
2
|
+
/** Copy and vote buttons under an assistant reply; the vote is controlled by the host app. */
|
|
3
|
+
declare const AiAssistantReplyActions: ({ content, onVote, labels, slotProps, vote, dataTestId, }: AiAssistantReplyActionsProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default AiAssistantReplyActions;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AiAssistantSuggestionProps } from '../types';
|
|
2
|
+
/** A suggested prompt, listed under the empty state's title. */
|
|
3
|
+
declare const AiAssistantSuggestion: ({ children, onClick, dataTestId, ...dataAttributes }: AiAssistantSuggestionProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
export default AiAssistantSuggestion;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AiAssistantThinkingProps } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* The assistant at work, in place of its next reply: the working avatar and what it does, then one
|
|
4
|
+
* line per step of the turn, the one in progress pulsing.
|
|
5
|
+
*/
|
|
6
|
+
declare const AiAssistantThinking: ({ label, steps, onStop, labels, slotProps, dataTestId, }: AiAssistantThinkingProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default AiAssistantThinking;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Width of the docked panel, in px */
|
|
2
|
+
export declare const AI_ASSISTANT_DOCKED_WIDTH = 420;
|
|
3
|
+
/** Gap between the docked panel and the screen edges, in px */
|
|
4
|
+
export declare const AI_ASSISTANT_DOCKED_INSET = 12;
|
|
5
|
+
/** Shadow of the docked panel, shared with the surfaces docked beside it */
|
|
6
|
+
export declare const AI_ASSISTANT_DOCKED_SHADOW = "0 4px 24px rgba(0, 0, 0, 0.06)";
|
|
7
|
+
/** Gap between the floating surfaces (Fab, floating panel, nudge) and the screen edges, in px, from sm up */
|
|
8
|
+
export declare const AI_ASSISTANT_FLOATING_INSET = 24;
|
|
9
|
+
/** Same gap on phones, in px */
|
|
10
|
+
export declare const AI_ASSISTANT_FLOATING_INSET_XS = 16;
|
|
11
|
+
/** Height of the Fab pill, in px: the nudge sits above it and grows from its rounded end */
|
|
12
|
+
export declare const AI_ASSISTANT_FAB_HEIGHT = 44;
|
|
13
|
+
/** Shadow of the Fab at rest, then hovered */
|
|
14
|
+
export declare const AI_ASSISTANT_FAB_SHADOW = "0 4px 16px rgba(0, 0, 0, 0.1)";
|
|
15
|
+
export declare const AI_ASSISTANT_FAB_HOVER_SHADOW = "0 6px 24px rgba(0, 0, 0, 0.14)";
|
|
16
|
+
/** Gap between the docked panel and the page beside it, in px: the page's own padding does the rest */
|
|
17
|
+
export declare const AI_ASSISTANT_DOCKED_GAP = 4;
|
|
18
|
+
/** Room the host layout leaves for the docked panel (e.g. Backoffice `asideWidth`) */
|
|
19
|
+
export declare const AI_ASSISTANT_DOCKED_SPACE: number;
|
|
20
|
+
/** Diameter of the avatar, in px: the Fab pill, the thread and the thinking row line up on it */
|
|
21
|
+
export declare const AI_ASSISTANT_AVATAR_SIZE = 28;
|
|
22
|
+
/** Glow colours of the mark and of the pill's working outline, from the head of the light to its tail */
|
|
23
|
+
export declare const AI_ASSISTANT_GLOW_COLORS: readonly ["#FF5A1F", "#FFB547", "#FFC4A3", "#FF7EB3"];
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { DataAttributes } from '../../../types/dataAttributes';
|
|
3
|
-
/** Extra `data-*` props (e.g. an analytics feature id) land on the
|
|
3
|
+
/** Extra `data-*` props (e.g. an analytics feature id) land on the Fab button itself */
|
|
4
4
|
export interface AiAssistantFabProps extends DataAttributes {
|
|
5
|
-
/**
|
|
6
|
-
open: boolean;
|
|
7
|
-
/** Toggles the panel — the FAB never owns the open state, the host app does */
|
|
5
|
+
/** Opens the panel — the host app owns the open state, and hides the Fab while the panel is open */
|
|
8
6
|
onClick: () => void;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** Test hook on the
|
|
7
|
+
/** Call to ask the assistant, next to its avatar (e.g. "Ask Soren") */
|
|
8
|
+
label: string;
|
|
9
|
+
/** Test hook on the Fab button (defaults to "assistantFab") */
|
|
12
10
|
dataTestId?: string;
|
|
13
11
|
}
|
|
12
|
+
export interface AiAssistantMarkProps {
|
|
13
|
+
/** Side of the square, in px (defaults to 32) */
|
|
14
|
+
size?: number;
|
|
15
|
+
/** Theme path or CSS colour of the ellipse (defaults to text.primary) */
|
|
16
|
+
color?: string;
|
|
17
|
+
/** The ellipse turns with two satellites, then settles back into its pose once false */
|
|
18
|
+
isWorking?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface AiAssistantAvatarProps extends Pick<AiAssistantMarkProps, "isWorking"> {
|
|
21
|
+
/** "subtle" (default): a grey round, e.g. beside a reply; "brand": the brand gradient with a white mark, e.g. on the Fab */
|
|
22
|
+
variant?: "subtle" | "brand";
|
|
23
|
+
}
|
|
14
24
|
export interface AiAssistantNudgeProps {
|
|
15
25
|
/** Bubble visibility — animated in/out of the Fab corner, unmounted when closed */
|
|
16
26
|
open: boolean;
|
|
@@ -46,10 +56,10 @@ export interface AiAssistantSpotlightProps {
|
|
|
46
56
|
dataTestId?: string;
|
|
47
57
|
}
|
|
48
58
|
export interface AiAssistantPanelProps {
|
|
49
|
-
/** Panel visibility — grows
|
|
59
|
+
/** Panel visibility — grows from the corner when opening, unmounted when closed */
|
|
50
60
|
open: boolean;
|
|
51
|
-
/**
|
|
52
|
-
|
|
61
|
+
/** Full-height column under the app bar; the host layout leaves room for it (AI_ASSISTANT_DOCKED_SPACE) */
|
|
62
|
+
docked?: boolean;
|
|
53
63
|
/** Panel content — typically Header + a Chat.* composition owned by the host app */
|
|
54
64
|
children: ReactNode;
|
|
55
65
|
/** Test hook on the panel container (defaults to "assistantPanel") */
|
|
@@ -58,22 +68,85 @@ export interface AiAssistantPanelProps {
|
|
|
58
68
|
export interface AiAssistantHeaderProps {
|
|
59
69
|
/** Product name of the assistant — a brand chosen by the host app */
|
|
60
70
|
title: string;
|
|
61
|
-
/**
|
|
62
|
-
|
|
71
|
+
/** Small uppercase tag after the title (e.g. "Beta") */
|
|
72
|
+
tag?: string;
|
|
63
73
|
/** Close action of the panel — rendered as the trailing icon button */
|
|
64
74
|
onClose: () => void;
|
|
65
|
-
/**
|
|
66
|
-
|
|
75
|
+
/** Picks the glyph of the dock toggle */
|
|
76
|
+
docked?: boolean;
|
|
77
|
+
/** Shows a button to dock or float the panel */
|
|
78
|
+
onToggleDocked?: () => void;
|
|
79
|
+
/** Shows a "new conversation" button */
|
|
80
|
+
onNewConversation?: () => void;
|
|
81
|
+
/** Accessible names of the header buttons */
|
|
82
|
+
labels?: {
|
|
83
|
+
close?: string;
|
|
84
|
+
dock?: string;
|
|
85
|
+
newConversation?: string;
|
|
86
|
+
undock?: string;
|
|
87
|
+
};
|
|
67
88
|
}
|
|
68
89
|
export interface AiAssistantEmptyStateProps {
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
/**
|
|
90
|
+
/** Question to the user (e.g. "What do you want to do today?") */
|
|
91
|
+
title: string;
|
|
92
|
+
/** Shown above the title, on the logo's silhouette */
|
|
93
|
+
icon?: ReactNode;
|
|
94
|
+
/** Rendered under the title — typically AiAssistant.Suggestion entries */
|
|
72
95
|
children?: ReactNode;
|
|
73
96
|
}
|
|
74
|
-
export interface
|
|
75
|
-
/**
|
|
76
|
-
|
|
97
|
+
export interface AiAssistantSuggestionProps extends DataAttributes {
|
|
98
|
+
/** What the user could ask */
|
|
99
|
+
children: ReactNode;
|
|
100
|
+
onClick: () => void;
|
|
101
|
+
dataTestId?: string;
|
|
102
|
+
}
|
|
103
|
+
export interface AiAssistantThinkingStep {
|
|
104
|
+
/** Stable key of the step, e.g. its activity kind */
|
|
105
|
+
id: string;
|
|
106
|
+
label: string;
|
|
107
|
+
/** Pulses while true; a done step stays, greyed */
|
|
108
|
+
isInProgress: boolean;
|
|
109
|
+
}
|
|
110
|
+
export interface AiAssistantThinkingProps {
|
|
111
|
+
/** What the assistant is doing, next to the working avatar (e.g. "Thinking…") */
|
|
112
|
+
label: string;
|
|
113
|
+
/** One line per step of the turn, under the label */
|
|
114
|
+
steps?: AiAssistantThinkingStep[];
|
|
115
|
+
/** Shows a button to cut the turn short */
|
|
116
|
+
onStop?: () => void;
|
|
117
|
+
labels?: {
|
|
118
|
+
stop?: string;
|
|
119
|
+
};
|
|
120
|
+
/** `data-*` attributes of the stop button, e.g. analytics ids or test hooks */
|
|
121
|
+
slotProps?: {
|
|
122
|
+
stopButton?: DataAttributes;
|
|
123
|
+
};
|
|
124
|
+
/** Test hook on the row (defaults to "assistantThinking"); the steps append "Steps" */
|
|
125
|
+
dataTestId?: string;
|
|
126
|
+
}
|
|
127
|
+
export type AiAssistantVote = "up" | "down";
|
|
128
|
+
export interface AiAssistantReplyActionsProps {
|
|
129
|
+
/** Text the copy button puts on the clipboard */
|
|
130
|
+
content: string;
|
|
131
|
+
/** Vote cast on the reply, null when none */
|
|
132
|
+
vote?: AiAssistantVote | null;
|
|
133
|
+
/** Called with the new vote, or null when the user takes theirs back; the vote buttons only show with it */
|
|
134
|
+
onVote?: (vote: AiAssistantVote | null) => void;
|
|
135
|
+
/** Accessible names and tooltips (host-app i18n) */
|
|
136
|
+
labels?: {
|
|
137
|
+
copy?: string;
|
|
138
|
+
copied?: string;
|
|
139
|
+
helpful?: string;
|
|
140
|
+
notHelpful?: string;
|
|
141
|
+
};
|
|
142
|
+
/** `data-*` attributes of each button, e.g. analytics ids */
|
|
143
|
+
slotProps?: {
|
|
144
|
+
copyButton?: DataAttributes;
|
|
145
|
+
upVoteButton?: DataAttributes;
|
|
146
|
+
downVoteButton?: DataAttributes;
|
|
147
|
+
};
|
|
148
|
+
/** Test hook on the row (defaults to "assistantReplyActions") */
|
|
149
|
+
dataTestId?: string;
|
|
77
150
|
}
|
|
78
151
|
export interface AiAssistantConfirmationCardProps {
|
|
79
152
|
/** Small caption above the action ("Action to confirm") */
|
|
@@ -88,19 +161,19 @@ export interface AiAssistantConfirmationCardProps {
|
|
|
88
161
|
onAccept: () => void;
|
|
89
162
|
/** Called when the user declines the action */
|
|
90
163
|
onDecline: () => void;
|
|
91
|
-
/**
|
|
164
|
+
/** Wording (host-app i18n): the buttons, then the decision that replaces the heading once made */
|
|
92
165
|
labels: {
|
|
93
166
|
accept: string;
|
|
94
167
|
decline: string;
|
|
168
|
+
accepted: string;
|
|
169
|
+
declined: string;
|
|
95
170
|
};
|
|
171
|
+
/** Rendered left of the summary */
|
|
172
|
+
icon?: ReactNode;
|
|
173
|
+
/** Once decided, makes the card clickable (e.g. to open what the action created) */
|
|
174
|
+
onOpen?: () => void;
|
|
175
|
+
/** Once decided, rendered under the summary */
|
|
176
|
+
links?: ReactNode;
|
|
96
177
|
/** Test hook on the card (defaults to "assistantConfirmationCard") */
|
|
97
178
|
dataTestId?: string;
|
|
98
179
|
}
|
|
99
|
-
export interface AiSparkIconProps {
|
|
100
|
-
/** Icon box in px */
|
|
101
|
-
size?: number;
|
|
102
|
-
/** Solid fill — ignored with variant="gradient" */
|
|
103
|
-
color?: string;
|
|
104
|
-
/** "solid" (currentColor/color) or "gradient" (brand gradient) */
|
|
105
|
-
variant?: "gradient" | "solid";
|
|
106
|
-
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** A card floating along the right edge of the screen: the docked panel and the surfaces docked beside it. */
|
|
2
|
+
export declare const dockedSurfaceSx: {
|
|
3
|
+
readonly border: 1;
|
|
4
|
+
readonly borderColor: "divider";
|
|
5
|
+
readonly borderRadius: 2;
|
|
6
|
+
readonly bottom: 12;
|
|
7
|
+
readonly boxShadow: "0 4px 24px rgba(0, 0, 0, 0.06)";
|
|
8
|
+
readonly height: "auto";
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Docks a fixed surface (e.g. an entity preview) beside the docked panel, under `top` (e.g. APP_BAR_HEIGHT).
|
|
12
|
+
* Meant for screens where the panel is docked as a column, from md up.
|
|
13
|
+
*/
|
|
14
|
+
export declare const getAiAssistantNeighbourSx: (top?: number) => {
|
|
15
|
+
readonly overflow: "hidden";
|
|
16
|
+
readonly right: number;
|
|
17
|
+
readonly top: number;
|
|
18
|
+
readonly border: 1;
|
|
19
|
+
readonly borderColor: "divider";
|
|
20
|
+
readonly borderRadius: 2;
|
|
21
|
+
readonly bottom: 12;
|
|
22
|
+
readonly boxShadow: "0 4px 24px rgba(0, 0, 0, 0.06)";
|
|
23
|
+
readonly height: "auto";
|
|
24
|
+
};
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/** Flowing gradient of the
|
|
3
|
-
export declare const assistantOrbGradient: (mode:
|
|
4
|
-
/** Stops of the
|
|
5
|
-
export declare const
|
|
6
|
-
color:
|
|
7
|
-
offset:
|
|
8
|
-
}
|
|
9
|
-
color: string;
|
|
10
|
-
offset: string;
|
|
11
|
-
})[];
|
|
1
|
+
import { Palette } from '@mui/material/styles';
|
|
2
|
+
/** Flowing gradient of the brand avatar (animated background position). */
|
|
3
|
+
export declare const assistantOrbGradient: ({ mode, secondary }: Palette) => string;
|
|
4
|
+
/** Stops of the mark's glow, evenly spread and back to the first colour so the turning gradient has no seam. */
|
|
5
|
+
export declare const assistantGlowStops: {
|
|
6
|
+
color: "#FF5A1F" | "#FFB547" | "#FFC4A3" | "#FF7EB3";
|
|
7
|
+
offset: number;
|
|
8
|
+
}[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ChatMessageBubbleProps } from '../types';
|
|
2
|
-
declare const ChatMessageBubble: ({ isOwn, message, participants, avatarSrcResolver, renderAfterBubble, formatTime, hideAvatar, }: ChatMessageBubbleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ChatMessageBubble: ({ isOwn, message, participants, avatarSrcResolver, renderAfterBubble, formatTime, hideAvatar, variant, avatar, }: ChatMessageBubbleProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ChatMessageBubble;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ChatMessageInputProps } from '../types';
|
|
2
|
-
declare const ChatMessageInput: ({ onSend, labels, autoFocusKey, isSending, defaultMessage, startActions, slotProps, maxLength, }: ChatMessageInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare const ChatMessageInput: ({ onSend, labels, autoFocusKey, isSending, defaultMessage, startActions, slotProps, maxLength, footnote, variant, }: ChatMessageInputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
export default ChatMessageInput;
|
|
@@ -117,6 +117,10 @@ export interface ChatMessageBubbleProps {
|
|
|
117
117
|
renderAfterBubble?: (urls: string[]) => ReactNode;
|
|
118
118
|
formatTime?: (date: string) => string;
|
|
119
119
|
hideAvatar?: boolean;
|
|
120
|
+
/** "plain": replies as plain text and own messages on a grey surface, e.g. for an AI assistant */
|
|
121
|
+
variant?: "bubble" | "plain";
|
|
122
|
+
/** Plain variant only: shown left of the reply */
|
|
123
|
+
avatar?: ReactNode;
|
|
120
124
|
}
|
|
121
125
|
/** `data-*` attributes forwarded to the message input's inner controls */
|
|
122
126
|
export interface ChatMessageInputSlotProps {
|
|
@@ -132,6 +136,10 @@ export interface ChatMessageInputProps {
|
|
|
132
136
|
/** Rendered on the left of the bottom bar, facing the send button (e.g. ChatVoiceRecorder) */
|
|
133
137
|
startActions?: ReactNode;
|
|
134
138
|
slotProps?: ChatMessageInputSlotProps;
|
|
139
|
+
/** Filled variant only: small print under the composer */
|
|
140
|
+
footnote?: ReactNode;
|
|
141
|
+
/** "filled": a grey surface outlined on focus, with a round send button */
|
|
142
|
+
variant?: "outlined" | "filled";
|
|
135
143
|
}
|
|
136
144
|
export interface ChatVoiceRecorderLabels {
|
|
137
145
|
record?: string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export interface EventFlagProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "color"> {
|
|
3
|
+
/** "open" (default) in warning tones, "closed" in success tones */
|
|
4
|
+
status?: "open" | "closed";
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import('react').ForwardRefExoticComponent<EventFlagProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SvgIconProps, SxProps } from '@mui/material';
|
|
2
|
+
interface CloseLineIconProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
sx?: SxProps;
|
|
5
|
+
fontSize?: SvgIconProps["fontSize"];
|
|
6
|
+
}
|
|
7
|
+
declare const CloseLineIcon: ({ sx, fontSize, color }: CloseLineIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CloseLineIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SvgIconProps, SxProps } from '@mui/material';
|
|
2
|
+
interface CollapseIconProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
sx?: SxProps;
|
|
5
|
+
fontSize?: SvgIconProps["fontSize"];
|
|
6
|
+
}
|
|
7
|
+
declare const CollapseIcon: ({ sx, fontSize, color }: CollapseIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CollapseIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SvgIconProps, SxProps } from '@mui/material';
|
|
2
|
+
interface CopyIconProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
sx?: SxProps;
|
|
5
|
+
fontSize?: SvgIconProps["fontSize"];
|
|
6
|
+
}
|
|
7
|
+
declare const CopyIcon: ({ sx, fontSize, color }: CopyIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CopyIcon;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { SvgIconProps } from '@mui/material';
|
|
2
|
+
interface MicIconProps extends Omit<SvgIconProps, "color"> {
|
|
2
3
|
color?: string;
|
|
3
4
|
}
|
|
4
|
-
declare const MicIcon: ({ color }: MicIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const MicIcon: ({ color, ...props }: MicIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
6
|
export default MicIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SvgIconProps, SxProps } from '@mui/material';
|
|
2
|
+
interface NewChatIconProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
sx?: SxProps;
|
|
5
|
+
fontSize?: SvgIconProps["fontSize"];
|
|
6
|
+
}
|
|
7
|
+
declare const NewChatIcon: ({ sx, fontSize, color }: NewChatIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default NewChatIcon;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SvgIconProps, SxProps } from '@mui/material';
|
|
2
|
+
interface ThumbDownIconProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
sx?: SxProps;
|
|
5
|
+
fontSize?: SvgIconProps["fontSize"];
|
|
6
|
+
/** Filled hand, e.g. once the vote is cast */
|
|
7
|
+
filled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const ThumbDownIcon: ({ sx, fontSize, color, filled }: ThumbDownIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default ThumbDownIcon;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SvgIconProps, SxProps } from '@mui/material';
|
|
2
|
+
interface ThumbUpIconProps {
|
|
3
|
+
color?: string;
|
|
4
|
+
sx?: SxProps;
|
|
5
|
+
fontSize?: SvgIconProps["fontSize"];
|
|
6
|
+
/** Filled hand, e.g. once the vote is cast */
|
|
7
|
+
filled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const ThumbUpIcon: ({ sx, fontSize, color, filled }: ThumbUpIconProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default ThumbUpIcon;
|
|
@@ -3,6 +3,8 @@ interface BackofficeProps {
|
|
|
3
3
|
AppBar?: ReactNode;
|
|
4
4
|
Main?: ReactNode;
|
|
5
5
|
Sidebar?: ReactNode;
|
|
6
|
+
/** Room kept on the right, under the app bar, for a docked panel (e.g. AI_ASSISTANT_DOCKED_SPACE); ignored on small screens */
|
|
7
|
+
asideWidth?: number;
|
|
6
8
|
}
|
|
7
|
-
declare const Backoffice: ({ Main, Sidebar, AppBar }: BackofficeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const Backoffice: ({ Main, Sidebar, AppBar, asideWidth }: BackofficeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
10
|
export default Backoffice;
|
|
@@ -4,5 +4,5 @@ import { CollapsingHeaderProps } from './types';
|
|
|
4
4
|
* Preview: "open full page" link + close button above the title. Full page: back link above the
|
|
5
5
|
* title, compact actions in the sticky bar.
|
|
6
6
|
*/
|
|
7
|
-
declare const CollapsingHeader: ({ compactTitle, fullTitle, actions, compactActions, variant, onClose, onOpenFullPage, backLabel, onBack, labels, maxWidth, }: CollapsingHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const CollapsingHeader: ({ compactTitle, fullTitle, actions, compactActions, variant, onClose, onOpenFullPage, dense, backLabel, onBack, labels, maxWidth, }: CollapsingHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
8
|
export default CollapsingHeader;
|
|
@@ -28,6 +28,8 @@ export interface CollapsingHeaderProps {
|
|
|
28
28
|
onClose?: () => void;
|
|
29
29
|
/** Preview only: open the entity full page. */
|
|
30
30
|
onOpenFullPage?: () => void;
|
|
31
|
+
/** Preview only: 8px instead of 24px above the first line, e.g. docked beside the AI assistant panel. */
|
|
32
|
+
dense?: boolean;
|
|
31
33
|
/** Full page only: back link label. */
|
|
32
34
|
backLabel?: string;
|
|
33
35
|
/** Full page only: back link handler. */
|
|
@@ -250,6 +250,10 @@ export interface NavigationMenuProps {
|
|
|
250
250
|
* @default "soren-navigation-menu-collapsed"
|
|
251
251
|
*/
|
|
252
252
|
storageKey?: string;
|
|
253
|
+
/**
|
|
254
|
+
* Folds the menu to its icon rail without changing the saved preference, e.g. while the AI assistant is docked
|
|
255
|
+
*/
|
|
256
|
+
makeRoom?: boolean;
|
|
253
257
|
/**
|
|
254
258
|
* Vertical density of the navigation. A closed set owned by the design system: "compact" only
|
|
255
259
|
* tightens the vertical rhythm (row height, paddings, gaps between blocks). Font size, horizontal
|
|
@@ -270,5 +274,5 @@ declare const DEFAULT_CONTEXT_VALUE: {
|
|
|
270
274
|
};
|
|
271
275
|
type NavigationMenuContextValue = NavigationMenuProps & typeof DEFAULT_CONTEXT_VALUE;
|
|
272
276
|
export declare const NavigationMenuContext: import('react').Context<NavigationMenuContextValue>;
|
|
273
|
-
declare const _default: import('react').MemoExoticComponent<({ AppBar, NavLink, Search, Logo, Footer, items, enableSearchFocusShortcut, disableResponsive, hideSearchDesktop, bottomLink, sideBarWidth, storageKey, density, }: NavigationMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
277
|
+
declare const _default: import('react').MemoExoticComponent<({ AppBar, NavLink, Search, Logo, Footer, items, enableSearchFocusShortcut, disableResponsive, hideSearchDesktop, bottomLink, sideBarWidth, storageKey, density, makeRoom, }: NavigationMenuProps) => import("@emotion/react/jsx-runtime").JSX.Element>;
|
|
274
278
|
export default _default;
|
package/dist/src/main.d.ts
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
export * from '@mui/material';
|
|
8
8
|
export * from '@mui/material/transitions';
|
|
9
9
|
export { default as AiAssistant } from './components/DataDisplay/AiAssistant/AiAssistant';
|
|
10
|
+
export { AI_ASSISTANT_DOCKED_SPACE } from './components/DataDisplay/AiAssistant/constants';
|
|
10
11
|
export * from './components/DataDisplay/AiAssistant/types';
|
|
12
|
+
export { getAiAssistantNeighbourSx } from './components/DataDisplay/AiAssistant/utils/docked';
|
|
11
13
|
export * from './components/DataDisplay/ArticleImage/ArticleImage';
|
|
12
14
|
export { default as ArticleImage } from './components/DataDisplay/ArticleImage/ArticleImage';
|
|
13
15
|
export type { AvatarProps } from './components/DataDisplay/Avatar/Avatar';
|
|
@@ -28,9 +30,10 @@ export { default as ChatVoiceRecorder } from './components/DataDisplay/Chat/comp
|
|
|
28
30
|
export * from './components/DataDisplay/Chat/types';
|
|
29
31
|
export * from './components/DataDisplay/Chip/Chip';
|
|
30
32
|
export { default as Chip } from './components/DataDisplay/Chip/Chip';
|
|
33
|
+
export * from './components/DataDisplay/EventFlag/EventFlag';
|
|
34
|
+
export { default as EventFlag } from './components/DataDisplay/EventFlag/EventFlag';
|
|
31
35
|
export * from './components/DataDisplay/FileViewer/FileViewer';
|
|
32
36
|
export { default as FileViewer } from './components/DataDisplay/FileViewer/FileViewer';
|
|
33
|
-
export { default as AiSparkIcon } from './components/DataDisplay/Icons/AiSparkIcon';
|
|
34
37
|
export * from './components/DataDisplay/Kanban/Kanban';
|
|
35
38
|
export { default as Kanban } from './components/DataDisplay/Kanban/Kanban';
|
|
36
39
|
export * from './components/DataDisplay/ListAvatar/ListAvatar';
|
|
@@ -123,6 +126,7 @@ export { default as CardModal } from './components/Surface/CardModal/CardModal';
|
|
|
123
126
|
export * from './components/Utils/HasPermission/HasPermission';
|
|
124
127
|
export { default as HasPermission } from './components/Utils/HasPermission/HasPermission';
|
|
125
128
|
export { default as theme } from './config/theme';
|
|
129
|
+
export * from './constants/appBar';
|
|
126
130
|
export * from './context/Permission/PermissionProvider';
|
|
127
131
|
export { default as PermissionProvider } from './context/Permission/PermissionProvider';
|
|
128
132
|
export * from './context/Snackbar/SnackbarProvider';
|