@getsoren/design-system 4.89.0 → 4.91.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 +76 -76
- package/dist/main.js +10837 -10702
- package/dist/src/components/DataDisplay/AiAssistant/AiAssistant.d.ts +2 -2
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantAvatar.d.ts +2 -2
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantFab.d.ts +1 -1
- package/dist/src/components/DataDisplay/AiAssistant/constants.d.ts +1 -1
- package/dist/src/components/DataDisplay/AiAssistant/types.d.ts +16 -6
- package/dist/src/components/DataDisplay/AiAssistant/utils/gradient.d.ts +0 -3
- package/dist/src/components/DataDisplay/Chat/components/ChatVoiceRecorder.d.ts +1 -1
- package/dist/src/components/DataDisplay/Chat/types.d.ts +8 -0
- package/dist/src/components/DataDisplay/Logo/Logo.d.ts +1 -1
- package/dist/src/components/Inputs/TextFieldPhone/TextFieldPhone.d.ts +15 -0
- package/dist/src/components/Inputs/TextFieldPhone/utils/computeNextPhone.d.ts +23 -0
- package/dist/src/locales/en.d.ts +24 -0
- package/dist/src/locales/fr.d.ts +24 -0
- package/dist/src/main.d.ts +3 -1
- package/package.json +1 -1
- package/dist/src/components/DataDisplay/AiAssistant/components/AiAssistantShape.d.ts +0 -3
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* Chat.MessageBubble / Chat.MessageInput / Chat.VoiceRecorder for the thread.
|
|
6
6
|
*/
|
|
7
7
|
declare const AiAssistant: {
|
|
8
|
-
Avatar: ({ variant, isWorking }: import('./types').AiAssistantAvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
Avatar: ({ portrait: livePortrait, variant, isWorking, rounded, size, }: import('./types').AiAssistantAvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
9
|
ConfirmationCard: ({ heading, summary, details, status, onAccept, onDecline, labels, icon, onOpen, links, dataTestId, }: import('./types').AiAssistantConfirmationCardProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
10
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;
|
|
11
|
+
Fab: ({ onClick, label, portrait, dataTestId, ...dataAttributes }: import('./types').AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
12
12
|
Header: ({ title, tag, onClose, docked, onToggleDocked, onNewConversation, labels }: import('./types').AiAssistantHeaderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
13
13
|
Mark: ({ size, color, isWorking }: import('./types').AiAssistantMarkProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
14
14
|
Nudge: ({ open, title, onClose, content, children, activeStep, onStepChange, labels, dataTestId, }: import('./types').AiAssistantNudgeProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AiAssistantAvatarProps } from '../types';
|
|
2
|
-
/** The assistant's
|
|
3
|
-
declare const AiAssistantAvatar: ({ variant, isWorking }: AiAssistantAvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
|
+
/** The assistant's portrait on a grey round; where it stands for the brand, the brand's colours cross it now and then. */
|
|
3
|
+
declare const AiAssistantAvatar: ({ portrait: livePortrait, variant, isWorking, rounded, size, }: AiAssistantAvatarProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
4
|
export default AiAssistantAvatar;
|
|
@@ -3,5 +3,5 @@ import { AiAssistantFabProps } from '../types';
|
|
|
3
3
|
* The assistant's entry point, a pill in the bottom-right corner: its avatar and a call to ask it.
|
|
4
4
|
* The host app hides it while the panel is open, the panel taking its corner.
|
|
5
5
|
*/
|
|
6
|
-
declare const AiAssistantFab: ({ onClick, label, dataTestId, ...dataAttributes }: AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const AiAssistantFab: ({ onClick, label, portrait, dataTestId, ...dataAttributes }: AiAssistantFabProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
7
|
export default AiAssistantFab;
|
|
@@ -19,5 +19,5 @@ export declare const AI_ASSISTANT_DOCKED_GAP = 4;
|
|
|
19
19
|
export declare const AI_ASSISTANT_DOCKED_SPACE: number;
|
|
20
20
|
/** Diameter of the avatar, in px: the Fab pill, the thread and the thinking row line up on it */
|
|
21
21
|
export declare const AI_ASSISTANT_AVATAR_SIZE = 28;
|
|
22
|
-
/**
|
|
22
|
+
/** The assistant's light, from its head to its tail: its mark and its avatar, and what the host app paints with it (its name) */
|
|
23
23
|
export declare const AI_ASSISTANT_GLOW_COLORS: readonly ["#FF5A1F", "#FFB547", "#FFC4A3", "#FF7EB3"];
|
|
@@ -4,8 +4,10 @@ import { DataAttributes } from '../../../types/dataAttributes';
|
|
|
4
4
|
export interface AiAssistantFabProps extends DataAttributes {
|
|
5
5
|
/** Opens the panel — the host app owns the open state, and hides the Fab while the panel is open */
|
|
6
6
|
onClick: () => void;
|
|
7
|
-
/** Call to ask the assistant, next to its avatar (e.g. "Ask Soren") */
|
|
8
|
-
label:
|
|
7
|
+
/** Call to ask the assistant, next to its avatar (e.g. "Ask Soren") — its text names the button */
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
/** Replaces the avatar's still portrait, e.g. a video of it */
|
|
10
|
+
portrait?: ReactNode;
|
|
9
11
|
/** Test hook on the Fab button (defaults to "assistantFab") */
|
|
10
12
|
dataTestId?: string;
|
|
11
13
|
}
|
|
@@ -17,9 +19,17 @@ export interface AiAssistantMarkProps {
|
|
|
17
19
|
/** The ellipse turns with two satellites, then settles back into its pose once false */
|
|
18
20
|
isWorking?: boolean;
|
|
19
21
|
}
|
|
20
|
-
export interface AiAssistantAvatarProps
|
|
21
|
-
/** "subtle" (default): a grey round, e.g. beside a reply; "brand": the brand
|
|
22
|
+
export interface AiAssistantAvatarProps {
|
|
23
|
+
/** "subtle" (default): a grey round, e.g. beside a reply; "brand": the brand's colours cross it now and then, e.g. on the Fab */
|
|
22
24
|
variant?: "subtle" | "brand";
|
|
25
|
+
/** A light turns around it while the assistant works */
|
|
26
|
+
isWorking?: boolean;
|
|
27
|
+
/** Side in px (defaults to AI_ASSISTANT_AVATAR_SIZE) */
|
|
28
|
+
size?: number;
|
|
29
|
+
/** A square with soft corners instead of a round, e.g. above a welcome */
|
|
30
|
+
rounded?: boolean;
|
|
31
|
+
/** Replaces the still portrait, e.g. a video of it on a transparent background */
|
|
32
|
+
portrait?: ReactNode;
|
|
23
33
|
}
|
|
24
34
|
export interface AiAssistantNudgeProps {
|
|
25
35
|
/** Bubble visibility — animated in/out of the Fab corner, unmounted when closed */
|
|
@@ -67,7 +77,7 @@ export interface AiAssistantPanelProps {
|
|
|
67
77
|
}
|
|
68
78
|
export interface AiAssistantHeaderProps {
|
|
69
79
|
/** Product name of the assistant — a brand chosen by the host app */
|
|
70
|
-
title:
|
|
80
|
+
title: ReactNode;
|
|
71
81
|
/** Small uppercase tag after the title (e.g. "Beta") */
|
|
72
82
|
tag?: string;
|
|
73
83
|
/** Close action of the panel — rendered as the trailing icon button */
|
|
@@ -89,7 +99,7 @@ export interface AiAssistantHeaderProps {
|
|
|
89
99
|
export interface AiAssistantEmptyStateProps {
|
|
90
100
|
/** Question to the user (e.g. "What do you want to do today?") */
|
|
91
101
|
title: string;
|
|
92
|
-
/** Shown above the title,
|
|
102
|
+
/** Shown above the title, e.g. the assistant's avatar */
|
|
93
103
|
icon?: ReactNode;
|
|
94
104
|
/** Rendered under the title — typically AiAssistant.Suggestion entries */
|
|
95
105
|
children?: ReactNode;
|
|
@@ -1,6 +1,3 @@
|
|
|
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
1
|
/** Stops of the mark's glow, evenly spread and back to the first colour so the turning gradient has no seam. */
|
|
5
2
|
export declare const assistantGlowStops: {
|
|
6
3
|
color: "#FF5A1F" | "#FFB547" | "#FFC4A3" | "#FF7EB3";
|
|
@@ -5,5 +5,5 @@ import { ChatVoiceRecorderProps } from '../types';
|
|
|
5
5
|
* the recorded audio Blob to `onRecorded`; transcription/upload is the caller's job
|
|
6
6
|
* (drive `isProcessing` while it runs).
|
|
7
7
|
*/
|
|
8
|
-
export declare const ChatVoiceRecorder: ({ onRecorded, onError, labels, isProcessing, disabled, autoSubmitOnSilence, maxDurationMs, silenceTimeoutMs, }: ChatVoiceRecorderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ChatVoiceRecorder: ({ onRecorded, onError, labels, isProcessing, disabled, isHighlighted, startLabel, autoSubmitOnSilence, maxDurationMs, silenceTimeoutMs, }: ChatVoiceRecorderProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
9
|
export default ChatVoiceRecorder;
|
|
@@ -163,6 +163,14 @@ export interface ChatVoiceRecorderProps {
|
|
|
163
163
|
* Disables the mic button (e.g. the chat is busy sending) — no recording can be started
|
|
164
164
|
*/
|
|
165
165
|
disabled?: boolean;
|
|
166
|
+
/**
|
|
167
|
+
* Fills the mic like a ready send button, with a slow halo: the action to take, e.g. while a guide asks for a spoken message
|
|
168
|
+
*/
|
|
169
|
+
isHighlighted?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Written next to the mic, which then reads as a call to action (e.g. « Try your voice » in a guide)
|
|
172
|
+
*/
|
|
173
|
+
startLabel?: string;
|
|
166
174
|
/**
|
|
167
175
|
* Hard stop: past this duration the take is validated automatically (default 2 min)
|
|
168
176
|
*/
|
|
@@ -58,5 +58,5 @@ type ImgLogoProps = CommonLogoProps & {
|
|
|
58
58
|
component?: "img";
|
|
59
59
|
};
|
|
60
60
|
export type LogoProps = SvgLogoProps | ImgLogoProps;
|
|
61
|
-
declare const _default: import('react').ForwardRefExoticComponent<LogoProps & import('react').RefAttributes<
|
|
61
|
+
declare const _default: import('react').ForwardRefExoticComponent<LogoProps & import('react').RefAttributes<HTMLDivElement | HTMLImageElement | SVGSVGElement>>;
|
|
62
62
|
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TextFieldProps } from '@mui/material';
|
|
2
|
+
export interface TextFieldPhoneProps extends Omit<TextFieldProps, "type" | "value" | "onChange"> {
|
|
3
|
+
/** Number as displayed, e.g. "06 34 39 39 49" */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Called with the formatted number on each change */
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
/** Display of the digits left by an edit, e.g. to cap their count (defaults to `phoneNumberAdapter`: French pairs) */
|
|
8
|
+
format?: (digits: string) => string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A phone number field formatted as it is typed ("06 34 39 39 49"), the caret kept after the digit it followed:
|
|
12
|
+
* reformatting would otherwise send it to the end on each edit in the middle of the number.
|
|
13
|
+
*/
|
|
14
|
+
declare const TextFieldPhone: ({ value, onChange, format, inputRef, slotProps, ...props }: TextFieldPhoneProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default TextFieldPhone;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const toDigits: (value: string) => string;
|
|
2
|
+
export interface NextPhoneParams {
|
|
3
|
+
/** Caret index in `rawValue` */
|
|
4
|
+
caret: number;
|
|
5
|
+
/** `InputEvent.inputType` — empty when the change was not a keystroke (autofill, a test harness) */
|
|
6
|
+
inputType: string;
|
|
7
|
+
/** Display value before the edit */
|
|
8
|
+
previous: string;
|
|
9
|
+
/** Input value as written by the browser, before formatting */
|
|
10
|
+
rawValue: string;
|
|
11
|
+
/** Display value of the digits left by the edit */
|
|
12
|
+
format: (digits: string) => string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Pure transition of a phone field: previous value + raw input → next display value and caret.
|
|
16
|
+
* Reformatting rewrites the whole value, which would send the browser caret to the end: an edit in
|
|
17
|
+
* the middle of the number would then continue at the end. The caret is put back after the same
|
|
18
|
+
* count of digits it followed (spaces move, digits do not).
|
|
19
|
+
*/
|
|
20
|
+
export declare const computeNextPhone: ({ caret, inputType, previous, rawValue, format }: NextPhoneParams) => {
|
|
21
|
+
caret: number;
|
|
22
|
+
formatted: string;
|
|
23
|
+
};
|
package/dist/src/locales/en.d.ts
CHANGED
|
@@ -1,29 +1,53 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
add: string;
|
|
3
|
+
addParticipant: string;
|
|
2
4
|
anErrorOccurred: string;
|
|
3
5
|
apply: string;
|
|
6
|
+
back: string;
|
|
7
|
+
cancel: string;
|
|
4
8
|
clear: string;
|
|
5
9
|
clickToUpload: string;
|
|
6
10
|
close: string;
|
|
7
11
|
closed: string;
|
|
8
12
|
collapseSidebar: string;
|
|
13
|
+
copied: string;
|
|
14
|
+
copy: string;
|
|
15
|
+
createYourFirstConversation: string;
|
|
9
16
|
day: string;
|
|
10
17
|
decrement: string;
|
|
18
|
+
deleteConversation: string;
|
|
19
|
+
dock: string;
|
|
20
|
+
enterToSend: string;
|
|
11
21
|
escape: string;
|
|
12
22
|
expandSidebar: string;
|
|
13
23
|
files: string;
|
|
24
|
+
helpful: string;
|
|
14
25
|
increment: string;
|
|
26
|
+
messages: string;
|
|
15
27
|
month: string;
|
|
28
|
+
newConversation: string;
|
|
16
29
|
noResult: string;
|
|
30
|
+
notHelpful: string;
|
|
17
31
|
oops: string;
|
|
18
32
|
open: string;
|
|
19
33
|
openFullPage: string;
|
|
20
34
|
openFullScreen: string;
|
|
21
35
|
orDragAndDrop: string;
|
|
36
|
+
participants: string;
|
|
37
|
+
recordVoiceMessage: string;
|
|
22
38
|
reload: string;
|
|
23
39
|
reset: string;
|
|
40
|
+
search: string;
|
|
41
|
+
searchContacts: string;
|
|
24
42
|
selectAll: string;
|
|
43
|
+
send: string;
|
|
44
|
+
startConversation: string;
|
|
45
|
+
stop: string;
|
|
25
46
|
today: string;
|
|
47
|
+
undock: string;
|
|
48
|
+
useRecording: string;
|
|
26
49
|
week: string;
|
|
50
|
+
writeAMessage: string;
|
|
27
51
|
year: string;
|
|
28
52
|
};
|
|
29
53
|
export default _default;
|
package/dist/src/locales/fr.d.ts
CHANGED
|
@@ -1,29 +1,53 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
+
add: string;
|
|
3
|
+
addParticipant: string;
|
|
2
4
|
anErrorOccurred: string;
|
|
3
5
|
apply: string;
|
|
6
|
+
back: string;
|
|
7
|
+
cancel: string;
|
|
4
8
|
clear: string;
|
|
5
9
|
clickToUpload: string;
|
|
6
10
|
close: string;
|
|
7
11
|
closed: string;
|
|
8
12
|
collapseSidebar: string;
|
|
13
|
+
copied: string;
|
|
14
|
+
copy: string;
|
|
15
|
+
createYourFirstConversation: string;
|
|
9
16
|
day: string;
|
|
10
17
|
decrement: string;
|
|
18
|
+
deleteConversation: string;
|
|
19
|
+
dock: string;
|
|
20
|
+
enterToSend: string;
|
|
11
21
|
escape: string;
|
|
12
22
|
expandSidebar: string;
|
|
13
23
|
files: string;
|
|
24
|
+
helpful: string;
|
|
14
25
|
increment: string;
|
|
26
|
+
messages: string;
|
|
15
27
|
month: string;
|
|
28
|
+
newConversation: string;
|
|
16
29
|
noResult: string;
|
|
30
|
+
notHelpful: string;
|
|
17
31
|
oops: string;
|
|
18
32
|
open: string;
|
|
19
33
|
openFullPage: string;
|
|
20
34
|
openFullScreen: string;
|
|
21
35
|
orDragAndDrop: string;
|
|
36
|
+
participants: string;
|
|
37
|
+
recordVoiceMessage: string;
|
|
22
38
|
reload: string;
|
|
23
39
|
reset: string;
|
|
40
|
+
search: string;
|
|
41
|
+
searchContacts: string;
|
|
24
42
|
selectAll: string;
|
|
43
|
+
send: string;
|
|
44
|
+
startConversation: string;
|
|
45
|
+
stop: string;
|
|
25
46
|
today: string;
|
|
47
|
+
undock: string;
|
|
48
|
+
useRecording: string;
|
|
26
49
|
week: string;
|
|
50
|
+
writeAMessage: string;
|
|
27
51
|
year: string;
|
|
28
52
|
};
|
|
29
53
|
export default _default;
|
package/dist/src/main.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
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
|
+
export { AI_ASSISTANT_DOCKED_SPACE, AI_ASSISTANT_GLOW_COLORS } from './components/DataDisplay/AiAssistant/constants';
|
|
11
11
|
export * from './components/DataDisplay/AiAssistant/types';
|
|
12
12
|
export { getAiAssistantNeighbourSx } from './components/DataDisplay/AiAssistant/utils/docked';
|
|
13
13
|
export * from './components/DataDisplay/ArticleImage/ArticleImage';
|
|
@@ -105,6 +105,8 @@ export * from './components/Inputs/TextFieldGroup/TextFieldGroup';
|
|
|
105
105
|
export { default as TextFieldGroup } from './components/Inputs/TextFieldGroup/TextFieldGroup';
|
|
106
106
|
export * from './components/Inputs/TextFieldPassword/TextFieldPassword';
|
|
107
107
|
export { default as TextFieldPassword } from './components/Inputs/TextFieldPassword/TextFieldPassword';
|
|
108
|
+
export * from './components/Inputs/TextFieldPhone/TextFieldPhone';
|
|
109
|
+
export { default as TextFieldPhone } from './components/Inputs/TextFieldPhone/TextFieldPhone';
|
|
108
110
|
export * from './components/Layout/Backoffice/Backoffice';
|
|
109
111
|
export { default as Backoffice } from './components/Layout/Backoffice/Backoffice';
|
|
110
112
|
export { default as CollapsingHeader } from './components/Layout/CollapsingHeader/CollapsingHeader';
|
package/package.json
CHANGED