botframework-webchat-fluent-theme 4.18.1-main.20240830.4534802 → 4.18.1-main.20240911.3e47786
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/botframework-webchat-fluent-theme.css.map +1 -1
- package/dist/botframework-webchat-fluent-theme.d.mts +2 -0
- package/dist/botframework-webchat-fluent-theme.d.ts +2 -0
- package/dist/botframework-webchat-fluent-theme.development.css.map +1 -1
- package/dist/botframework-webchat-fluent-theme.development.js +8 -8
- package/dist/botframework-webchat-fluent-theme.development.js.map +1 -1
- package/dist/botframework-webchat-fluent-theme.js +1 -1
- package/dist/botframework-webchat-fluent-theme.js.map +1 -1
- package/dist/botframework-webchat-fluent-theme.mjs +1 -1
- package/dist/botframework-webchat-fluent-theme.mjs.map +1 -1
- package/dist/botframework-webchat-fluent-theme.production.min.css.map +1 -1
- package/dist/botframework-webchat-fluent-theme.production.min.js +8 -8
- package/dist/botframework-webchat-fluent-theme.production.min.js.map +1 -1
- package/package.json +4 -4
- package/src/components/activity/ActivityDecorator.module.css +35 -17
- package/src/components/activity/ActivityDecorator.tsx +1 -1
- package/src/components/activity/CopilotMessageHeader.module.css +5 -3
- package/src/components/activity/CopilotMessageHeader.tsx +20 -12
- package/src/components/activity/index.ts +1 -0
- package/src/components/activity/private/isAIGeneratedActivity.ts +5 -0
- package/src/components/activity/private/useActivityAuthor.ts +16 -0
- package/src/components/activity/private/useActivityStyleOptions.ts +19 -0
- package/src/components/decorator/private/BorderFlair.module.css +4 -0
- package/src/components/decorator/private/BorderFlair.tsx +15 -2
- package/src/components/linerActivity/index.ts +2 -0
- package/src/components/linerActivity/private/LinerActivity.tsx +20 -0
- package/src/components/linerActivity/private/LinerMessageActivity.module.css +28 -0
- package/src/components/linerActivity/private/isLinerMessageActivity.ts +7 -0
- package/src/components/preChatActivity/PreChatMessageActivity.module.css +21 -7
- package/src/components/preChatActivity/PreChatMessageActivity.tsx +32 -26
- package/src/components/preChatActivity/StarterPromptsCardAction.module.css +55 -16
- package/src/components/preChatActivity/StarterPromptsCardAction.tsx +30 -24
- package/src/components/preChatActivity/StarterPromptsToolbar.tsx +23 -10
- package/src/components/sendBox/Attachments.tsx +5 -4
- package/src/components/sendBox/SendBox.module.css +7 -0
- package/src/components/sendBox/SendBox.tsx +31 -17
- package/src/components/sendBox/TextArea.tsx +50 -30
- package/src/components/sendBox/Toolbar.module.css +7 -1
- package/src/components/sendBox/Toolbar.tsx +17 -7
- package/src/components/suggestedActions/AccessibleButton.tsx +15 -13
- package/src/components/suggestedActions/SuggestedAction.module.css +8 -7
- package/src/components/suggestedActions/SuggestedAction.tsx +7 -4
- package/src/components/suggestedActions/SuggestedActions.tsx +3 -2
- package/src/components/theme/Theme.module.css +25 -8
- package/src/private/FluentThemeProvider.tsx +7 -1
- package/src/testIds.ts +2 -0
|
@@ -22,6 +22,9 @@
|
|
|
22
22
|
--webchat-colorNeutralBackground5: var(--colorNeutralBackground5, #ebebeb);
|
|
23
23
|
--webchat-colorNeutralBackground6: var(--colorNeutralBackground6, #e6e6e6);
|
|
24
24
|
|
|
25
|
+
--webchat-colorNeutralStencil1: var(--colorNeutralStencil1, #e6e6e6); /* #575757 for dark mode */
|
|
26
|
+
--webchat-colorNeutralStencil2: var(--colorNeutralStencil2, #fafafa); /* #333333 for dark mode */
|
|
27
|
+
|
|
25
28
|
--webchat-colorTransparentBackground: var(--colorTransparentBackground, rgba(0, 0, 0, 0.4));
|
|
26
29
|
|
|
27
30
|
--webchat-colorNeutralStrokeDisabled: var(--colorNeutralStrokeDisabled, #e0e0e0);
|
|
@@ -257,19 +260,33 @@
|
|
|
257
260
|
display: none;
|
|
258
261
|
}
|
|
259
262
|
|
|
260
|
-
:global(.webchat__bubble)::after,
|
|
261
|
-
|
|
262
|
-
position: absolute;
|
|
263
|
-
inset: -2px;
|
|
264
|
-
border: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
|
|
263
|
+
:global(.webchat__bubble)::after,
|
|
264
|
+
:global(.pre-chat-message-activity)::after {
|
|
265
265
|
border-radius: var(--webchat__bubble--border-radius);
|
|
266
|
+
content: '';
|
|
267
|
+
inset: 0;
|
|
268
|
+
outline-offset: 0;
|
|
269
|
+
outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
|
|
266
270
|
pointer-events: none;
|
|
271
|
+
position: absolute;
|
|
267
272
|
}
|
|
268
273
|
|
|
269
274
|
:global(.pre-chat-message-activity)::after {
|
|
270
|
-
|
|
271
|
-
|
|
275
|
+
border-radius: var(--webchat-borderRadiusMedium);
|
|
276
|
+
outline-offset: -3px;
|
|
272
277
|
}
|
|
278
|
+
|
|
279
|
+
:global(.liner-message-activity__text) {
|
|
280
|
+
border-radius: 20px;
|
|
281
|
+
outline-offset: 4px;
|
|
282
|
+
outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/* Transcript filer in copilot variant */
|
|
287
|
+
:global(.webchat-fluent).theme.variant-copilot :global(.webchat__basic-transcript .webchat__basic-transcript__filler) {
|
|
288
|
+
/* No filler unless pre-chat activity, see next rule */
|
|
289
|
+
flex-grow: 0;
|
|
273
290
|
}
|
|
274
291
|
|
|
275
292
|
/* Transcript with a single pre-chat activity */
|
|
@@ -350,7 +367,7 @@
|
|
|
350
367
|
outline-offset: calc(var(--webchat-strokeWidthThick) * -1);
|
|
351
368
|
}
|
|
352
369
|
|
|
353
|
-
|
|
370
|
+
&[aria-disabled="true"] {
|
|
354
371
|
background: var(--webchat-colorNeutralBackgroundDisabled);
|
|
355
372
|
border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStrokeDisabled);
|
|
356
373
|
color: var(--webchat-colorNeutralForegroundDisabled);
|
|
@@ -9,6 +9,7 @@ import { TelephoneKeypadProvider } from '../components/telephoneKeypad';
|
|
|
9
9
|
import { WebChatTheme } from '../components/theme';
|
|
10
10
|
import VariantComposer, { VariantList } from './VariantComposer';
|
|
11
11
|
import { FluentThemeDecorator } from '../components/decorator';
|
|
12
|
+
import { isLinerMessageActivity, LinerMessageActivity } from '../components/linerActivity';
|
|
12
13
|
|
|
13
14
|
const { ThemeProvider } = Components;
|
|
14
15
|
|
|
@@ -20,10 +21,15 @@ const activityMiddleware: readonly ActivityMiddleware[] = Object.freeze([
|
|
|
20
21
|
(...args) => {
|
|
21
22
|
const activity = args[0]?.activity;
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
// TODO: Should show pre-chat only when it is the very first message in the chat history.
|
|
25
|
+
if (isPreChatMessageActivity(activity)) {
|
|
24
26
|
return () => <PreChatMessageActivity activity={activity} />;
|
|
25
27
|
}
|
|
26
28
|
|
|
29
|
+
if (isLinerMessageActivity(activity)) {
|
|
30
|
+
return () => <LinerMessageActivity activity={activity} />;
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
const renderActivity = next(...args);
|
|
28
34
|
|
|
29
35
|
return renderActivity
|
package/src/testIds.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
const testIds = {
|
|
2
2
|
preChatMessageActivityStarterPromptsCardAction: 'pre-chat message activity starter prompts card action',
|
|
3
|
+
sendBoxContainer: 'send box container',
|
|
3
4
|
sendBoxDropZone: 'send box drop zone',
|
|
4
5
|
sendBoxSendButton: 'send box send button',
|
|
6
|
+
sendBoxSuggestedAction: 'send box suggested action',
|
|
5
7
|
sendBoxTextBox: 'send box text area',
|
|
6
8
|
sendBoxTelephoneKeypadButton1: `send box telephone keypad button 1`,
|
|
7
9
|
sendBoxTelephoneKeypadButton2: `send box telephone keypad button 2`,
|