botframework-webchat-fluent-theme 4.17.1 → 4.18.1-hotfix.20260127.b53acdf

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.
Files changed (96) hide show
  1. package/dist/botframework-webchat-fluent-theme.css.map +1 -1
  2. package/dist/botframework-webchat-fluent-theme.d.mts +23 -5
  3. package/dist/botframework-webchat-fluent-theme.d.ts +23 -5
  4. package/dist/botframework-webchat-fluent-theme.development.css.map +1 -1
  5. package/dist/botframework-webchat-fluent-theme.development.js +11 -1
  6. package/dist/botframework-webchat-fluent-theme.development.js.map +1 -1
  7. package/dist/botframework-webchat-fluent-theme.js +1 -1
  8. package/dist/botframework-webchat-fluent-theme.js.map +1 -1
  9. package/dist/botframework-webchat-fluent-theme.mjs +1 -1
  10. package/dist/botframework-webchat-fluent-theme.mjs.map +1 -1
  11. package/dist/botframework-webchat-fluent-theme.production.min.css.map +1 -1
  12. package/dist/botframework-webchat-fluent-theme.production.min.js +11 -1
  13. package/dist/botframework-webchat-fluent-theme.production.min.js.map +1 -1
  14. package/package.json +27 -26
  15. package/src/bundle.ts +2 -0
  16. package/src/components/activity/ActivityDecorator.module.css +432 -0
  17. package/src/components/activity/ActivityDecorator.tsx +26 -0
  18. package/src/components/activity/ActivityLoader.module.css +10 -0
  19. package/src/components/activity/ActivityLoader.tsx +21 -0
  20. package/src/components/activity/CopilotMessageHeader.module.css +38 -0
  21. package/src/components/activity/CopilotMessageHeader.tsx +49 -0
  22. package/src/components/activity/index.ts +2 -0
  23. package/src/components/activity/private/isAIGeneratedActivity.ts +5 -0
  24. package/src/components/activity/private/useActivityAuthor.ts +16 -0
  25. package/src/components/activity/private/useActivityStyleOptions.ts +19 -0
  26. package/src/components/assets/AssetComposer.tsx +37 -0
  27. package/src/components/assets/AssetName.ts +1 -0
  28. package/src/components/assets/SlidingDots.tsx +61 -0
  29. package/src/components/assets/private/Context.ts +24 -0
  30. package/src/components/assets/private/useAssetURL.ts +12 -0
  31. package/src/components/assets/private/useContext.ts +8 -0
  32. package/src/components/dropZone/DropZone.module.css +3 -4
  33. package/src/components/dropZone/DropZone.tsx +41 -6
  34. package/src/components/linerActivity/index.ts +2 -0
  35. package/src/components/linerActivity/private/LinerActivity.tsx +20 -0
  36. package/src/components/linerActivity/private/LinerMessageActivity.module.css +28 -0
  37. package/src/components/linerActivity/private/isLinerMessageActivity.ts +7 -0
  38. package/src/components/preChatActivity/PreChatMessageActivity.module.css +56 -0
  39. package/src/components/preChatActivity/PreChatMessageActivity.tsx +60 -0
  40. package/src/components/preChatActivity/StarterPromptsCardAction.module.css +126 -0
  41. package/src/components/preChatActivity/StarterPromptsCardAction.tsx +75 -0
  42. package/src/components/preChatActivity/StarterPromptsToolbar.module.css +18 -0
  43. package/src/components/preChatActivity/StarterPromptsToolbar.tsx +47 -0
  44. package/src/components/preChatActivity/index.tsx +2 -0
  45. package/src/components/preChatActivity/isPreChatMessageActivity.ts +7 -0
  46. package/src/components/sendBox/Attachments.module.css +1 -1
  47. package/src/components/sendBox/Attachments.tsx +5 -4
  48. package/src/components/sendBox/ErrorMessage.tsx +15 -4
  49. package/src/components/sendBox/SendBox.module.css +21 -6
  50. package/src/components/sendBox/SendBox.tsx +95 -56
  51. package/src/components/sendBox/TextArea.module.css +27 -8
  52. package/src/components/sendBox/TextArea.tsx +60 -31
  53. package/src/components/sendBox/Toolbar.module.css +15 -7
  54. package/src/components/sendBox/Toolbar.tsx +17 -7
  55. package/src/components/sendBox/index.tsx +1 -1
  56. package/src/components/sendBox/private/useSubmitError.ts +17 -4
  57. package/src/components/sendBox/private/useTranscriptNavigation.ts +53 -0
  58. package/src/components/suggestedActions/AccessibleButton.tsx +15 -13
  59. package/src/components/suggestedActions/SuggestedAction.module.css +14 -13
  60. package/src/components/suggestedActions/SuggestedAction.tsx +7 -4
  61. package/src/components/suggestedActions/SuggestedActions.module.css +2 -3
  62. package/src/components/suggestedActions/SuggestedActions.tsx +49 -46
  63. package/src/components/telephoneKeypad/private/Button.module.css +2 -3
  64. package/src/components/telephoneKeypad/private/Button.tsx +1 -5
  65. package/src/components/telephoneKeypad/private/TelephoneKeypad.module.css +0 -1
  66. package/src/components/telephoneKeypad/private/TelephoneKeypad.tsx +4 -8
  67. package/src/components/telephoneKeypad/types.ts +1 -1
  68. package/src/components/theme/Theme.module.css +665 -15
  69. package/src/components/theme/Theme.tsx +4 -3
  70. package/src/components/typingIndicator/SlidingDotsTypingIndicator.module.css +12 -0
  71. package/src/components/typingIndicator/SlidingDotsTypingIndicator.tsx +19 -0
  72. package/src/env.d.ts +1 -7
  73. package/src/external.umd/botframework-webchat-api/decorator.ts +1 -0
  74. package/src/external.umd/botframework-webchat-component/decorator.ts +1 -0
  75. package/src/external.umd/botframework-webchat-component/index.ts +5 -0
  76. package/src/external.umd/botframework-webchat-component/internal.ts +1 -0
  77. package/src/icons/AddDocumentIcon.tsx +8 -16
  78. package/src/icons/AttachmentIcon.tsx +8 -16
  79. package/src/icons/InfoSmallIcon.tsx +7 -15
  80. package/src/icons/SendIcon.tsx +7 -15
  81. package/src/icons/TelephoneKeypadIcon.tsx +7 -15
  82. package/src/index.ts +2 -4
  83. package/src/private/FluentThemeProvider.tsx +91 -10
  84. package/src/private/VariantComposer.ts +29 -0
  85. package/src/private/createComposer.tsx +16 -0
  86. package/src/private/useVariants.ts +7 -0
  87. package/src/styles/createStyles.ts +5 -0
  88. package/src/styles/index.ts +3 -2
  89. package/src/styles/useStyles.ts +2 -19
  90. package/src/styles/useVariantClassName.ts +16 -0
  91. package/src/testIds.ts +3 -0
  92. package/src/tsconfig.json +12 -10
  93. package/src/types/PropsOf.ts +2 -5
  94. package/src/external.umd/botframework-webchat-component.ts +0 -4
  95. package/src/styles/injectStyle.ts +0 -9
  96. /package/src/external.umd/{botframework-webchat-api.ts → botframework-webchat-api/index.ts} +0 -0
@@ -1,37 +1,72 @@
1
+ :global {
2
+ /* biome-ignore format: do not print each class on the new line */
3
+ .a, .b, .c, .d, .e, .f, .g, .h, .i, .j, .k, .l, .m, .n, .o, .p, .q, .r, .s, .t, .v, .w, .u, .x, .y, .z,
4
+ .A, .B, .C, .D, .E, .F, .G, .H, .I, .J, .K, .L, .M, .N, .O, .P, .Q, .R, .S, .T, .V, .W, .U, .X, .Y, .Z {
5
+ /* esbuild considers empty global classes as used and removes them due to lack of rules */
6
+ }
7
+ }
1
8
 
2
9
  :global(.webchat-fluent).theme {
3
10
  display: contents;
4
11
 
12
+ --webchat-colorNeutralForegroundDisabled: var(--colorNeutralForegroundDisabled, #bdbdbd);
5
13
  --webchat-colorNeutralForeground1: var(--colorNeutralForeground1, #242424);
14
+ --webchat-colorNeutralForeground1Hover: var(--colorNeutralForeground1Hover, #242424);
15
+ --webchat-colorNeutralForeground1Pressed: var(--colorNeutralForeground1Pressed, #242424);
6
16
  --webchat-colorNeutralForeground2: var(--colorNeutralForeground2, #424242);
7
- --webchat-colorNeutralForeground4: var(--colorNeutralForeground4, #707070);
8
-
9
17
  --webchat-colorNeutralForeground2BrandHover: var(--colorNeutralForeground2BrandHover, #02729c);
10
18
  --webchat-colorNeutralForeground2BrandPressed: var(--colorNeutralForeground2BrandPressed, #01678c);
11
19
  --webchat-colorNeutralForeground2BrandSelected: var(--colorNeutralForeground2BrandSelected, #067191);
20
+ --webchat-colorNeutralForeground3: var(--colorNeutralForeground3, #616161);
21
+ --webchat-colorNeutralForeground4: var(--colorNeutralForeground4, #707070);
22
+ --webchat-colorNeutralForeground5: var(--colorNeutralForeground5, #7e7e7e);
12
23
 
13
- --webchat-colorNeutralForegroundDisabled: var(--colorNeutralForegroundDisabled, #bdbdbd);
24
+ --webchat-colorNeutralForegroundOnBrand: var(--colorNeutralForegroundOnBrand, #fff);
14
25
 
26
+ --webchat-colorNeutralBackgroundDisabled: var(--colorNeutralBackgroundDisabled, #f0f0f0);
15
27
  --webchat-colorNeutralBackground1: var(--colorNeutralBackground1, #ffffff);
28
+ --webchat-colorNeutralBackground1Hover: var(--colorNeutralBackground1Hover, #f5f5f5);
29
+ --webchat-colorNeutralBackground1Pressed: var(--colorNeutralBackground1Pressed, #e0e0e0);
30
+ --webchat-colorNeutralBackground3: var(--colorNeutralBackground3, #f5f5f5);
16
31
  --webchat-colorNeutralBackground4: var(--colorNeutralBackground4, #f0f0f0);
17
32
  --webchat-colorNeutralBackground5: var(--colorNeutralBackground5, #ebebeb);
33
+ --webchat-colorNeutralBackground6: var(--colorNeutralBackground6, #e6e6e6);
34
+
35
+ --webchat-colorNeutralStencil1: var(--colorNeutralStencil1, #e6e6e6); /* #575757 for dark mode */
36
+ --webchat-colorNeutralStencil2: var(--colorNeutralStencil2, #fafafa); /* #333333 for dark mode */
37
+
38
+ --webchat-colorNeutralShadowAmbient: var(--colorNeutralShadowAmbient, rgba(0, 0, 0, 0.12));
39
+ --webchat-colorNeutralShadowKey: var(--colorNeutralShadowKey, rgba(0, 0, 0, 0.14));
18
40
 
41
+ --webchat-colorTransparentBackground: var(--colorTransparentBackground, rgba(0, 0, 0, 0.4));
42
+
43
+ --webchat-colorNeutralStrokeDisabled: var(--colorNeutralStrokeDisabled, #e0e0e0);
19
44
  --webchat-colorNeutralStroke1: var(--colorNeutralStroke1, #d1d1d1);
20
- --webchat-colorNeutralStroke2: var(--colorNeutralStroke2, #e0e0e0);
45
+ --webchat-colorNeutralStroke1Hover: var(--colorNeutralStroke1Hover, #c7c7c7);
46
+ --webchat-colorNeutralStroke1Pressed: var(--colorNeutralStroke1Pressed, #b3b3b3);
21
47
  --webchat-colorNeutralStroke1Selected: var(--colorNeutralStroke1Selected, #bdbdbd);
22
-
48
+ --webchat-colorNeutralStroke2: var(--colorNeutralStroke2, #e0e0e0);
49
+
23
50
  --webchat-colorStrokeFocus2: var(--colorStrokeFocus2, #000000);
24
51
 
25
52
  --webchat-colorBrandStroke2: var(--colorBrandStroke2, #9edcf7);
53
+ --webchat-colorBrandStroke2Pressed: var(--colorBrandStroke2Pressed, #01384d);
26
54
 
55
+ --webchat-colorTransparentStroke: var(--colorTransparentStroke, transparent);
56
+
57
+ --webchat-colorBrandForeground1: var(--colorBrandForeground1, #01678c);
27
58
  --webchat-colorBrandForeground2Hover: var(--colorBrandForeground2Hover, #015a7a);
28
59
  --webchat-colorBrandForeground2Pressed: var(--colorBrandForeground2Pressed, #01384d);
29
60
 
30
61
  --webchat-colorBrandForegroundLink: var(--colorBrandForegroundLink, #01678c);
31
62
  --webchat-colorBrandForegroundLinkHover: var(--colorBrandForegroundLinkHover, #015a7a);
32
63
  --webchat-colorBrandForegroundLinkPressed: var(--colorBrandForegroundLinkPressed, #014259);
33
- --webchat-colorBrandForegroundLinkSelected: var(--colorBrandForegroundLinkSelected, #01678c);
64
+ --webchat-colorBrandForegroundLinkSelected: var(--colorBrandForegroundLinkSelected, #01678c);
34
65
 
66
+ --webchat-colorBrandBackground: var(--colorBrandBackground, #077fab);
67
+ --webchat-colorBrandBackgroundHover: var(--colorBrandBackgroundHover, #06729a);
68
+ --webchat-colorBrandBackgroundPressed: var(--colorBrandBackgroundPressed, #044760);
69
+ --webchat-colorBrandBackground2: var(--colorBrandBackground2, #def2fc);
35
70
  --webchat-colorBrandBackground2Hover: var(--colorBrandBackground2Hover, #bee7fa);
36
71
  --webchat-colorBrandBackground2Pressed: var(--colorBrandBackground2Pressed, #7fd2f5);
37
72
 
@@ -45,31 +80,113 @@
45
80
  --webchat-colorGray190: var(--colorGray190, #201f1e);
46
81
  --webchat-colorGray200: var(--colorGray200, #1b1a19);
47
82
 
48
- /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/borderRadius.ts */
49
- --webchat-borderRadiusSmall: var(--borderRadiusSmall, 2px);
50
- --webchat-borderRadiusLarge: var(--borderRadiusLarge, 6px);
51
- --webchat-borderRadiusXLarge: var(--borderRadiusXLarge, 8px);
83
+ /* New greys from the link above not exposed by Fluent */
84
+ --webchat-colorGrey8: #141414;
85
+ --webchat-colorGrey14: #242424;
86
+ --webchat-colorGrey92: #ebebeb;
87
+ --webchat-colorGrey98: #fafafa;
52
88
 
53
89
  /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/utils/shadows.ts */
90
+ --webchat-shadow2: var(--shadow2, 0 0 2px rgba(0, 0, 0, 12%), 0 1px 2px rgba(0, 0, 0, 14%));
91
+ --webchat-shadow4: var(--shadow4, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.14));
54
92
  --webchat-shadow16: var(--shadow16, 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108));
93
+ --webchat-shadow64: var(--shadow64, 0 0 8px rgba(0, 0, 0, 0.12), 0 32px 64px rgba(0, 0, 0, 0.14));
55
94
 
56
95
  /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/spacings.ts */
96
+ --webchat-spacingHorizontalNone: var(--spacingHorizontalNone, 0);
97
+ --webchat-spacingHorizontalXXS: var(--spacingHorizontalXXS, 2px);
98
+ --webchat-spacingHorizontalXS: var(--spacingHorizontalXS, 4px);
99
+ --webchat-spacingHorizontalSNudge: var(--spacingHorizontalSNudge, 6px);
100
+ --webchat-spacingHorizontalS: var(--spacingHorizontalS, 8px);
57
101
  --webchat-spacingHorizontalMNudge: var(--spacingHorizontalMNudge, 10px);
102
+ --webchat-spacingHorizontalM: var(--spacingHorizontalM, 12px);
103
+ --webchat-spacingHorizontalL: var(--spacingHorizontalL, 16px);
104
+ --webchat-spacingHorizontalXL: var(--spacingHorizontalXL, 20px);
105
+ --webchat-spacingHorizontalXXL: var(--spacingHorizontalXXL, 24px);
106
+ --webchat-spacingHorizontalXXXL: var(--spacingHorizontalXXXL, 32px);
107
+
108
+ /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/spacings.ts */
109
+ --webchat-spacingVerticalNone: var(--spacingVerticalNone, 0);
110
+ --webchat-spacingVerticalXXS: var(--spacingVerticalXXS, 2px);
111
+ --webchat-spacingVerticalXS: var(--spacingVerticalXS, 4px);
112
+ --webchat-spacingVerticalSNudge: var(--spacingVerticalSNudge, 6px);
113
+ --webchat-spacingVerticalS: var(--spacingVerticalS, 8px);
114
+ --webchat-spacingVerticalMNudge: var(--spacingVerticalMNudge, 10px);
115
+ --webchat-spacingVerticalM: var(--spacingVerticalM, 12px);
116
+ --webchat-spacingVerticalL: var(--spacingVerticalL, 16px);
117
+ --webchat-spacingVerticalXL: var(--spacingVerticalXL, 20px);
118
+ --webchat-spacingVerticalXXL: var(--spacingVerticalXXL, 24px);
119
+ --webchat-spacingVerticalXXXL: var(--spacingVerticalXXXL, 32px);
58
120
 
59
121
  /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/fonts.ts */
60
- --webchat-fontFamilyBase: var(--fontFamilyBase, 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif);
61
- --webchat-fontFamilyNumeric: var(--fontFamilyNumeric, Bahnschrift, 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif);
122
+ --webchat-fontFamilyBase: var(
123
+ --fontFamilyBase,
124
+ 'Segoe UI',
125
+ 'Segoe UI Web (West European)',
126
+ -apple-system,
127
+ BlinkMacSystemFont,
128
+ Roboto,
129
+ 'Helvetica Neue',
130
+ sans-serif
131
+ );
132
+ --webchat-fontFamilyMonospace: var(--fontFamilyMonospace, Consolas, 'Courier New', Courier, monospace);
133
+ --webchat-fontFamilyNumeric: var(
134
+ --fontFamilyNumeric,
135
+ Bahnschrift,
136
+ 'Segoe UI',
137
+ 'Segoe UI Web (West European)',
138
+ -apple-system,
139
+ BlinkMacSystemFont,
140
+ Roboto,
141
+ 'Helvetica Neue',
142
+ sans-serif
143
+ );
62
144
 
63
145
  /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/fonts.ts */
146
+ --webchat-fontWeightRegular: var(--fontWeightRegular, 400);
64
147
  --webchat-fontWeightSemibold: var(--fontWeightSemibold, 600);
65
-
148
+
149
+ /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/fonts.ts */
150
+ --webchat-fontSizeBase100: var(--fontSizeBase100, 10px);
151
+ --webchat-fontSizeBase200: var(--fontSizeBase200, 12px);
152
+ --webchat-fontSizeBase300: var(--fontSizeBase300, 14px);
153
+ --webchat-fontSizeBase400: var(--fontSizeBase400, 16px);
154
+ --webchat-fontSizeBase500: var(--fontSizeBase500, 20px);
155
+ --webchat-fontSizeBase600: var(--fontSizeBase600, 24px);
156
+ --webchat-fontSizeHero700: var(--fontSizeHero700, 28px);
157
+ --webchat-fontSizeHero800: var(--fontSizeHero800, 32px);
158
+ --webchat-fontSizeHero900: var(--fontSizeHero900, 40px);
159
+
160
+ --webchat-lineHeightBase100: var(--lineHeightBase100, 14px);
161
+ --webchat-lineHeightBase200: var(--lineHeightBase200, 16px);
162
+ --webchat-lineHeightBase300: var(--lineHeightBase300, 20px);
163
+ --webchat-lineHeightBase400: var(--lineHeightBase400, 22px);
164
+ --webchat-lineHeightBase500: var(--lineHeightBase500, 28px);
165
+ --webchat-lineHeightBase600: var(--lineHeightBase600, 32px);
166
+ --webchat-lineHeightHero700: var(--lineHeightHero700, 36px);
167
+ --webchat-lineHeightHero800: var(--lineHeightHero800, 40px);
168
+ --webchat-lineHeightHero900: var(--lineHeightHero900, 52px);
169
+ --webchat-lineHeightHero1000: var(--lineHeightHero1000, 92px);
170
+
171
+ /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/borderRadius.ts */
172
+ --webchat-borderRadiusSmall: var(--borderRadiusSmall, 2px);
173
+ --webchat-borderRadiusMedium: var(--borderRadiusMedium, 4px);
174
+ --webchat-borderRadiusLarge: var(--borderRadiusLarge, 6px);
175
+ --webchat-borderRadiusXLarge: var(--borderRadiusXLarge, 8px);
176
+
177
+ /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/strokeWidths.ts */
178
+ --webchat-strokeWidthThin: var(--strokeWidthThin, 1px);
179
+ --webchat-strokeWidthThick: var(--strokeWidthThick, 2px);
66
180
  --webchat-strokeWidthThicker: var(--strokeWidthThicker, 3px);
67
181
 
182
+ /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/durations.ts */
68
183
  --webchat-durationUltraFast: var(--durationUltraFast, 0);
69
184
  --webchat-durationNormal: var(--durationNormal, 200ms);
185
+ --webchat-durationUltraSlow: var(--durationUltraSlow, 500ms);
70
186
 
71
- --webchat-curveAccelerateMid: var(--curveAccelerateMid, cubic-bezier(1,0,1,1));
72
- --webchat-curveDecelerateMid: var(--curveDecelerateMid, cubic-bezier(0,0,0,1));
187
+ /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/curves.ts */
188
+ --webchat-curveAccelerateMid: var(--curveAccelerateMid, cubic-bezier(1, 0, 1, 1));
189
+ --webchat-curveDecelerateMid: var(--curveDecelerateMid, cubic-bezier(0, 0, 0, 1));
73
190
  }
74
191
 
75
192
  @media (prefers-reduced-motion) {
@@ -77,4 +194,537 @@
77
194
  --webchat-durationUltraFast: 0.01ms;
78
195
  --webchat-durationNormal: 0.01ms;
79
196
  }
197
+ }
198
+
199
+ /* Style Options override */
200
+ :global(.webchat-fluent).theme :global(.webchat__css-custom-properties) {
201
+ --webchat__color--accent: var(--webchat-colorBrandForeground1);
202
+ --webchat__color--subtle: var(--webchat-colorNeutralForeground2);
203
+ --webchat__color--timestamp: var(--webchat-colorNeutralForeground3);
204
+ --webchat__font--primary: var(--webchat-fontFamilyBase);
205
+ --webchat__font-size--small: var(--webchat-fontSizeBase200);
206
+ --webchat__font-size--medium: var(--webchat-fontSizeBase300);
207
+ --webchat__line-height--small: var(--webchat-lineHeightBase200);
208
+ --webchat__line-height--medium: var(--webchat-lineHeightBase300);
209
+ --webchat__max-width--bubble: var(--webchat-bubble-maxWidth);
210
+ --webchat__min-height--bubble: var(--webchat-bubble-minHeight);
211
+ --webchat__padding--regular: var(--webchat-spacingVerticalS);
212
+ --webchat__padding--sendbox: var(--webchat-spacingVerticalNone) var(--webchat-spacingHorizontalMNudge)
213
+ var(--webchat-spacingHorizontalMNudge);
214
+ --webchat__border-animation--color-1: #464feb;
215
+ --webchat__border-animation--color-2: #47cffa;
216
+ --webchat__border-animation--color-3: #b47cf8;
217
+ }
218
+
219
+ :global(.webchat-fluent).theme.variant-copilot :global(.webchat__css-custom-properties) {
220
+ --webchat__padding--sendbox: var(--webchat-spacingVerticalNone) var(--webchat-spacingHorizontalXL)
221
+ var(--webchat-spacingVerticalMNudge) var(--webchat-spacingHorizontalMNudge);
222
+ }
223
+
224
+ /* Transcript surface */
225
+ :global(.webchat-fluent).theme :global(.webchat__surface) {
226
+ background-color: var(--webchat__color--surface);
227
+ }
228
+
229
+ :global(.webchat-fluent).theme.variant-copilot :global(.webchat__surface) {
230
+ box-sizing: border-box;
231
+ padding-inline-start: var(--webchat-spacingHorizontalMNudge);
232
+ }
233
+
234
+ /* Scrollbars */
235
+ :global(.webchat-fluent).theme :global(.webchat__basic-transcript .webchat__basic-transcript__scrollable),
236
+ :global(.webchat-fluent).theme :global(.webchat__view-code-dialog__code-body),
237
+ :global(.webchat-fluent).theme :global(.webchat__render-markdown [data-math-type='block']),
238
+ :global(.webchat-fluent).theme :global(.webchat__feedback-form-text-area-input--scroll),
239
+ :global(.webchat-fluent).theme :global(.webchat__view-code-dialog__body) {
240
+ /* Edge uses -webkit-scrollbar if scrollbar-* is not set */
241
+ scrollbar-color: unset;
242
+ scrollbar-width: unset;
243
+ /* Firefox */
244
+ -moz-scrollbar-color: var(--webchat-colorNeutralForeground5) transparent;
245
+ -moz-scrollbar-width: thin;
246
+
247
+ &::-webkit-scrollbar {
248
+ height: var(--webchat-spacingVerticalMNudge);
249
+ width: var(--webchat-spacingVerticalMNudge);
250
+ visibility: hidden;
251
+ }
252
+
253
+ &::-webkit-scrollbar-corner {
254
+ background: transparent;
255
+ }
256
+
257
+ &:hover::-webkit-scrollbar {
258
+ height: var(--webchat-spacingVerticalMNudge);
259
+ width: var(--webchat-spacingVerticalMNudge);
260
+ }
261
+
262
+ &:hover::-webkit-scrollbar-thumb {
263
+ background-clip: padding-box;
264
+ background-color: var(--webchat-colorNeutralForeground5);
265
+ border-radius: 10px;
266
+ border-right: 4px solid transparent;
267
+ border: 3px solid transparent;
268
+ }
269
+
270
+ &:hover::-webkit-scrollbar-thumb:hover {
271
+ background-clip: padding-box;
272
+ background-color: var(--webchat-colorNeutralForeground5);
273
+ border-radius: 10px;
274
+ border-right: 2px solid transparent;
275
+ border: 1px solid transparent;
276
+ }
277
+ }
278
+
279
+ :global(.webchat-fluent).theme.variant-copilot
280
+ :global(.webchat__basic-transcript .webchat__basic-transcript__scrollable) {
281
+ scrollbar-gutter: stable;
282
+ }
283
+
284
+ /* Transcript focus indicator color when in focus-visible state */
285
+ :global(.webchat-fluent).theme
286
+ :global(
287
+ .webchat__basic-transcript
288
+ .webchat__basic-transcript__terminator:focus-visible
289
+ + .webchat__basic-transcript__focus-indicator
290
+ ) {
291
+ border-color: var(--webchat-colorStrokeFocus2);
292
+ }
293
+
294
+ /* Transcript Activity indicator without focus-visible state */
295
+ :global(.webchat-fluent).theme
296
+ :global(.webchat__basic-transcript:not(:focus-visible) .webchat__basic-transcript__activity-indicator--focus) {
297
+ /* Hide activity focus when no focus-visible state */
298
+ display: none;
299
+ }
300
+
301
+ /* Transcript Focus indicator when activity focused */
302
+ :global(.webchat-fluent).theme
303
+ :global(.webchat__basic-transcript:focus-visible:has(.webchat__basic-transcript__activity-indicator--focus)) {
304
+ :global(.webchat__basic-transcript__focus-indicator) {
305
+ /* Hide transcript focus when an activity is focused */
306
+ display: none;
307
+ }
308
+ }
309
+
310
+ /* Transcript focused activity */
311
+ :global(.webchat-fluent).theme
312
+ :global(
313
+ .webchat__basic-transcript:focus-visible
314
+ .webchat__basic-transcript__activity:has(.webchat__basic-transcript__activity-indicator--focus)
315
+ ) {
316
+ :global(.webchat__basic-transcript__activity-indicator--focus) {
317
+ /* Hide transcript activity focus when the activity is focused */
318
+ display: none;
319
+ }
320
+
321
+ :global(.webchat__bubble)::after,
322
+ :global(.pre-chat-message-activity)::after {
323
+ border-radius: var(--webchat__bubble--border-radius);
324
+ content: '';
325
+ inset: 0;
326
+ outline-offset: 0;
327
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
328
+ pointer-events: none;
329
+ position: absolute;
330
+ }
331
+
332
+ :global(.pre-chat-message-activity)::after {
333
+ border-radius: var(--webchat-borderRadiusMedium);
334
+ outline-offset: -3px;
335
+ }
336
+
337
+ :global(.liner-message-activity__text) {
338
+ border-radius: 20px;
339
+ outline-offset: 4px;
340
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
341
+ }
342
+ }
343
+
344
+ /* Transcript filer in copilot variant */
345
+ :global(.webchat-fluent).theme.variant-copilot :global(.webchat__basic-transcript .webchat__basic-transcript__filler) {
346
+ /* No filler unless pre-chat activity, see next rule */
347
+ flex-grow: 0;
348
+ }
349
+
350
+ /* Transcript with a single pre-chat activity */
351
+ :global(.webchat-fluent).theme
352
+ :global(
353
+ .webchat__basic-transcript:has(.webchat__basic-transcript__activity:only-child):has(.pre-chat-message-activity)
354
+ .webchat__basic-transcript__filler
355
+ ) {
356
+ /* limit grow to half of the size to center the activity */
357
+ flex-grow: 0.5;
358
+ }
359
+
360
+ /* Modal */
361
+ :global(.webchat-fluent).theme :global(.webchat__modal-dialog) {
362
+ height: 100%;
363
+ display: grid;
364
+ place-items: center;
365
+
366
+ &::backdrop {
367
+ background-color: var(--webchat-colorTransparentBackground);
368
+ }
369
+
370
+ :global(.webchat__modal-dialog__box) {
371
+ background-color: var(--webchat-colorNeutralBackground1);
372
+ border-radius: var(--webchat-borderRadiusXLarge);
373
+ position: relative;
374
+ color: var(--webchat-colorNeutralForeground1);
375
+ box-shadow: var(--webchat-shadow64);
376
+ }
377
+
378
+ :global(.webchat__modal-dialog__close-button) {
379
+ color: var(--webchat-colorNeutralForeground1);
380
+ transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
381
+ }
382
+
383
+ /* TODO: align with original fluent modal styles in WebChat as they don't match v9 anymore */
384
+ :global(.webchat__modal-dialog__close-button):not(:active):hover {
385
+ background-color: var(--webchat-colorNeutralBackground3);
386
+ }
387
+
388
+ :global(.webchat__modal-dialog__close-button):focus:active {
389
+ background-color: var(--webchat-colorNeutralBackground4);
390
+ }
391
+
392
+ :global(.webchat__modal-dialog__close-button):not(:focus-visible) {
393
+ border: none;
394
+ }
395
+
396
+ :global(.webchat__modal-dialog__close-button):focus {
397
+ border-color: var(--webchat-colorStrokeFocus2);
398
+ }
399
+
400
+ :global(.webchat__modal-dialog__close-button-image) {
401
+ fill: currentColor;
402
+ }
403
+ }
404
+
405
+ /* Code block */
406
+ :global(.webchat-fluent).theme :global(.webchat__code-block) {
407
+ border: none;
408
+ font-family: var(--webchat-fontFamilyMonospace);
409
+ font-size: var(--webchat-fontSizeBase300);
410
+
411
+ --webchat__code-block__copy-button--color: var(--webchat-colorNeutralForeground1);
412
+ --webchat__code-block__copy-button--background: var(--webchat-colorNeutralBackground3);
413
+
414
+ :global(.webchat__code-block-copy-button) {
415
+ background: transparent;
416
+ border: none;
417
+ color: var(--webchat__code-block__copy-button--color);
418
+ height: 20px;
419
+ margin-inline-start: var(--webchat-spacingHorizontalS);
420
+ padding: 0;
421
+ width: 20px;
422
+ transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
423
+
424
+ :global(.webchat__code-block-copy-button__icon) {
425
+ background-color: currentColor;
426
+ }
427
+
428
+ &:hover {
429
+ background: var(--webchat__code-block__copy-button--background);
430
+ color: var(--webchat__code-block__copy-button--color);
431
+ }
432
+
433
+ &:active {
434
+ background: var(--webchat__code-block__copy-button--background);
435
+ color: var(--webchat__code-block__copy-button--color);
436
+ }
437
+
438
+ &:focus {
439
+ color: var(--webchat__code-block__copy-button--color);
440
+ outline-color: currentColor;
441
+ }
442
+ }
443
+
444
+ &:global(:has(.webchat__code-block__body:focus-visible)):focus-within {
445
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
446
+ outline-offset: calc(var(--webchat-strokeWidthThick) * -1);
447
+
448
+ :global(.webchat__code-block__body) {
449
+ outline: none;
450
+ }
451
+ }
452
+
453
+ &:global(:has(> .webchat__code-block__theme--github-dark-default)) {
454
+ --webchat__background--code-block: var(--codeBlockBackground, var(--webchat-colorGrey8));
455
+ --webchat__code-block__copy-button--background: var(
456
+ --codeBlockCopyButtonBackgroundPressed,
457
+ var(--webchat-colorGrey14)
458
+ );
459
+ --webchat__code-block__copy-button--color: var(--codeBlockCopyButtonForeground, var(--webchat__color--code-block));
460
+ --webchat__color--code-block: var(--codeBlockForeground, var(--webchat-colorGrey98));
461
+ }
462
+
463
+ &:global(:has(> .webchat__code-block__theme--github-light-default)) {
464
+ --webchat__background--code-block: var(--codeBlockBackground, var(--webchat-colorGrey98));
465
+ --webchat__code-block__copy-button--background: var(--codeBlockBackgroundPressed, var(--webchat-colorGrey92));
466
+ --webchat__code-block__copy-button--color: var(--codeBlockCopyButtonForeground, var(--webchat__color--code-block));
467
+ --webchat__color--code-block: var(--codeBlockForeground, var(--webchat-colorGrey8));
468
+ }
469
+ }
470
+
471
+ /* View Code dialog */
472
+ :global(.webchat-fluent).theme :global(.webchat__modal-dialog.webchat__view-code-dialog) {
473
+ :global(.webchat__modal-dialog__close-button-layout) {
474
+ display: flex;
475
+ padding: var(--webchat-spacingVerticalS) var(--webchat-spacingHorizontalS);
476
+ }
477
+
478
+ :global(.webchat__modal-dialog__close-button) {
479
+ align-items: center;
480
+ aspect-ratio: 1;
481
+ display: flex;
482
+ height: var(--webchat-lineHeightBase300);
483
+ justify-content: center;
484
+ padding: 0;
485
+ width: unset;
486
+ }
487
+
488
+ :global(.webchat__code-block-copy-button) {
489
+ --webchat__code-block__copy-button--color: var(--webchat-colorNeutralForeground1);
490
+ --webchat__code-block__copy-button--background: var(--webchat-colorNeutralBackground3);
491
+
492
+ margin-block-start: var(--webchat-spacingVerticalS);
493
+ position: absolute;
494
+ right: 32px;
495
+ top: 0;
496
+ }
497
+
498
+ :global(.webchat__modal-dialog__box) {
499
+ width: fit-content;
500
+ }
501
+
502
+ :global(.webchat__modal-dialog__body) {
503
+ margin: 0;
504
+ padding: var(--webchat-spacingVerticalS) var(--webchat-spacingHorizontalM);
505
+ }
506
+
507
+ :global(.webchat__view-code-dialog__title) {
508
+ font-size: var(--webchat-fontSizeBase300);
509
+ font-weight: var(--webchat-fontWeightSemibold);
510
+ line-height: var(--webchat-lineHeightBase300);
511
+ }
512
+
513
+ :global(.webchat__view-code-dialog__body) {
514
+ font-family: var(--webchat-fontFamilyMonospace);
515
+ font-size: var(--webchat-fontSizeBase300);
516
+ margin: 0 calc(var(--webchat-spacingHorizontalM) * -1);
517
+ padding: 0 var(--webchat-spacingHorizontalM);
518
+ }
519
+
520
+ :global(.webchat__view-code-dialog__footer) {
521
+ color: var(--webchat-colorNeutralForeground4);
522
+ font-size: var(--webchat-fontSizeBase100);
523
+ line-height: var(--webchat-lineHeightBase100);
524
+ }
525
+
526
+ :global(.webchat__view-code-dialog__link) {
527
+ color: var(--webchat-colorBrandForegroundLink);
528
+ text-decoration-color: transparent;
529
+
530
+ &:target {
531
+ color: var(--webchat-colorBrandForegroundLinkSelected);
532
+ }
533
+ &:hover {
534
+ color: var(--webchat-colorBrandForegroundLinkHover);
535
+ text-decoration: underline 1px currentColor;
536
+ }
537
+ &:active {
538
+ color: var(--webchat-colorBrandForegroundLinkPressed);
539
+ }
540
+ &:focus-visible {
541
+ outline: none;
542
+ text-decoration: underline 1px double var(--webchat-colorStrokeFocus2);
543
+ }
544
+ }
545
+ }
546
+
547
+ /* Activity button */
548
+ :global(.webchat-fluent).theme :global(.webchat__activity-button) {
549
+ background: var(--webchat-colorNeutralBackground1);
550
+ border-radius: var(--webchat-borderRadiusMedium);
551
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1);
552
+ color: var(--webchat-colorNeutralForeground1);
553
+ gap: var(--webchat-spacingHorizontalXS);
554
+ padding: 5px var(--webchat-spacingHorizontalM);
555
+
556
+ &:hover {
557
+ background: var(--webchat-colorNeutralBackground1Hover);
558
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1Hover);
559
+ color: var(--webchat-colorNeutralForeground1Hover);
560
+ }
561
+
562
+ &:active {
563
+ background: var(--webchat-colorNeutralBackground1Pressed);
564
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1Pressed);
565
+ color: var(--webchat-colorNeutralForeground1Pressed);
566
+ }
567
+
568
+ &:focus-visible {
569
+ background: var(--webchat-colorNeutralBackground1);
570
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
571
+ outline-offset: calc(var(--webchat-strokeWidthThick) * -1);
572
+ }
573
+
574
+ &[aria-disabled='true'] {
575
+ background: var(--webchat-colorNeutralBackgroundDisabled);
576
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStrokeDisabled);
577
+ color: var(--webchat-colorNeutralForegroundDisabled);
578
+ }
579
+
580
+ :global(.webchat__activity-button__icon) {
581
+ height: 20px;
582
+ width: 20px;
583
+ }
584
+ }
585
+
586
+ /* Copy button */
587
+ :global(.webchat-fluent).theme :global(.webchat__activity-copy-button) {
588
+ :global(.webchat__activity-copy-button__copied-text) {
589
+ background-color: var(--webchat-colorNeutralBackground1);
590
+ }
591
+
592
+ &:global(.webchat__activity-copy-button--copied) :global(.webchat__activity-copy-button__copied-text) {
593
+ animation-duration: var(--webchat-durationUltraSlow);
594
+ }
595
+ }
596
+
597
+ /* Monochrome image masker */
598
+ :global(.webchat-fluent).theme :global(.webchat__monochrome-image-masker) {
599
+ background-color: currentColor;
600
+ height: 1em;
601
+ width: 1em;
602
+ }
603
+
604
+ /* Feedback button */
605
+ :global(.webchat-fluent).theme :global(.webchat__thumb-button) {
606
+ color: var(--webchat-colorNeutralForeground1);
607
+
608
+ &:focus-visible {
609
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
610
+ }
611
+
612
+ &[aria-disabled='true'] {
613
+ color: var(--webchat-colorNeutralForegroundDisabled);
614
+ }
615
+ }
616
+
617
+ /* Tooltip */
618
+ :global(.webchat-fluent).theme :global(.webchat__tooltip) {
619
+ --webchat__tooltip-background: var(--tooltip-background, var(--webchat-colorNeutralBackground1));
620
+
621
+ color: var(--webchat-colorNeutralForeground1);
622
+ filter: drop-shadow(0 0 2px var(--webchat-colorNeutralShadowAmbient))
623
+ drop-shadow(0 4px 8px var(--webchat-colorNeutralShadowKey));
624
+ font-family: var(--webchat-fontFamilyBase);
625
+ font-size: var(--webchat-fontSizeBase200);
626
+ font-weight: var(--webchat-fontWeightRegular);
627
+ line-height: var(--webchat-lineHeightBase200);
628
+ padding: var(--webchat-spacingVerticalSNudge) var(--webchat-spacingHorizontalM);
629
+ transition: opacity var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
630
+ }
631
+
632
+ /* Feedback Form */
633
+ :global(.webchat-fluent).theme :global(.webchat__feedback-form) {
634
+ gap: var(--webchat-spacingVerticalXS);
635
+
636
+ :global(.webchat__feedback-form__body) {
637
+ font-family: var(--webchat-fontFamilyBase);
638
+ color: var(--webchat-colorNeutralForeground1);
639
+ font-size: var(--webchat-fontSizeBase300);
640
+ font-weight: var(--webchat-fontWeightRegular);
641
+ line-height: var(--webchat-lineHeightBase300);
642
+ }
643
+
644
+ :global(.webchat__feedback-form__caption) {
645
+ font-family: var(--webchat-fontFamilyBase);
646
+ color: var(--webchat-colorNeutralForeground1);
647
+ font-size: var(--webchat-fontSizeBase100);
648
+ font-weight: var(--webchat-fontWeightRegular);
649
+ line-height: var(--webchat-lineHeightBase200);
650
+ }
651
+
652
+ :global(.webchat__feedback-form__submit-button) {
653
+ background-color: var(--webchat-colorBrandBackground);
654
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorBrandBackground);
655
+ border-radius: var(--webchat-borderRadiusMedium);
656
+ color: var(--webchat-colorNeutralForegroundOnBrand);
657
+ cursor: pointer;
658
+ font-family: var(--webchat-fontFamilyBase);
659
+ font-size: var(--webchat-fontSizeBase300);
660
+ padding: var(--webchat-spacingVerticalNone) var(--webchat-spacingHorizontalS);
661
+ transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
662
+
663
+ &:hover {
664
+ background-color: var(--webchat-colorBrandBackgroundHover);
665
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorBrandBackgroundHover);
666
+ }
667
+
668
+ &:focus-visible {
669
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
670
+ outline-offset: calc(var(--webchat-strokeWidthThin) * -1);
671
+ }
672
+
673
+ &:active {
674
+ background-color: var(--webchat-colorBrandBackgroundPressed);
675
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorBrandBackgroundPressed);
676
+ }
677
+ }
678
+
679
+ :global(.webchat__feedback-form__cancel-button) {
680
+ background-color: var(--webchat-colorNeutralBackground1);
681
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1);
682
+ border-radius: var(--webchat-borderRadiusMedium);
683
+ color: var(--webchat-colorNeutralForeground1);
684
+ cursor: pointer;
685
+ font-family: var(--webchat-fontFamilyBase);
686
+ font-size: var(--webchat-fontSizeBase300);
687
+ padding: var(--webchat-spacingVerticalNone) var(--webchat-spacingHorizontalS);
688
+ transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
689
+
690
+ &:hover {
691
+ background-color: var(--webchat-colorNeutralBackground1Hover);
692
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1Hover);
693
+ }
694
+
695
+ &:focus-visible {
696
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
697
+ outline-offset: calc(var(--webchat-strokeWidthThin) * -1);
698
+ }
699
+
700
+ &:active {
701
+ background-color: var(--webchat-colorNeutralBackground1Pressed);
702
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1Pressed);
703
+ }
704
+ }
705
+
706
+ :global(.webchat__feedback-form-text-area) {
707
+ background-color: var(--webchat-colorNeutralBackground1);
708
+ border-radius: var(--webchat-borderRadiusMedium);
709
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1);
710
+ font-family: var(--webchat-fontFamilyBase);
711
+ font-size: var(--webchat-fontSizeBase300);
712
+ line-height: var(--webchat-lineHeightBase300);
713
+ gap: var(--webchat-spacingVerticalSNudge);
714
+ padding: var(--webchat-spacingVerticalS) var(--webchat-spacingHorizontalM);
715
+ &::after {
716
+ border-bottom-left-radius: var(--webchat-borderRadiusMedium);
717
+ border-bottom-right-radius: var(--webchat-borderRadiusMedium);
718
+ border-bottom: var(--webchat-strokeWidthThicker) solid var(--webchat-colorBrandForeground1);
719
+ clip-path: inset(calc(100% - var(--webchat-strokeWidthThicker)) 50% 0 50%);
720
+ transition: clip-path var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
721
+ }
722
+ &:focus-within {
723
+ border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1);
724
+ }
725
+ &:focus-within::after {
726
+ clip-path: inset(calc(100% - var(--webchat-strokeWidthThicker)) 0 0 0);
727
+ transition: clip-path var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
728
+ }
729
+ }
80
730
  }