botframework-webchat-fluent-theme 4.18.1-main.20241029.4a18bde → 4.18.1-main.20241104.06bf029

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botframework-webchat-fluent-theme",
3
- "version": "4.18.1-main.20241029.4a18bde",
3
+ "version": "4.18.1-main.20241104.06bf029",
4
4
  "description": "Fluent theme for Bot Framework Web Chat",
5
5
  "main": "./dist/botframework-webchat-fluent-theme.js",
6
6
  "types": "./dist/botframework-webchat-fluent-theme.d.ts",
@@ -68,15 +68,15 @@
68
68
  "@types/math-random": "^1.0.2",
69
69
  "@types/node": "^20.12.11",
70
70
  "@types/react": "^16.14.60",
71
- "botframework-webchat-base": "4.18.1-main.20241029.4a18bde",
72
- "botframework-webchat-styles": "4.18.1-main.20241029.4a18bde",
71
+ "botframework-webchat-base": "4.18.1-main.20241104.06bf029",
72
+ "botframework-webchat-styles": "4.18.1-main.20241104.06bf029",
73
73
  "tsup": "^8.0.2",
74
74
  "typescript": "^5.4.5"
75
75
  },
76
76
  "dependencies": {
77
- "botframework-webchat-api": "4.18.1-main.20241029.4a18bde",
78
- "botframework-webchat-component": "4.18.1-main.20241029.4a18bde",
79
- "botframework-webchat-core": "4.18.1-main.20241029.4a18bde",
77
+ "botframework-webchat-api": "4.18.1-main.20241104.06bf029",
78
+ "botframework-webchat-component": "4.18.1-main.20241104.06bf029",
79
+ "botframework-webchat-core": "4.18.1-main.20241104.06bf029",
80
80
  "classnames": "2.5.1",
81
81
  "inject-meta-tag": "0.0.1",
82
82
  "math-random": "2.0.1",
@@ -2,7 +2,7 @@
2
2
  /* biome-ignore format: do not print each class on the new line */
3
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
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
- /* biome-ignore lint: esbuild considers empty global classes as used and removes them due to lack of rules */
5
+ /* esbuild considers empty global classes as used and removes them due to lack of rules */
6
6
  }
7
7
  }
8
8
 
@@ -72,6 +72,10 @@
72
72
  --webchat-colorGray190: var(--colorGray190, #201f1e);
73
73
  --webchat-colorGray200: var(--colorGray200, #1b1a19);
74
74
 
75
+ /* New greys from the link above not exposed by Fluent */
76
+ --webchat-colorGrey8: #141414;
77
+ --webchat-colorGrey98: #fafafa;
78
+
75
79
  /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/utils/shadows.ts */
76
80
  --webchat-shadow2: var(--shadow2, 0 0 2px rgba(0, 0, 0, 12%), 0 1px 2px rgba(0, 0, 0, 14%));
77
81
  --webchat-shadow4: var(--shadow4, 0 0 2px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.14));
@@ -115,6 +119,7 @@
115
119
  'Helvetica Neue',
116
120
  sans-serif
117
121
  );
122
+ --webchat-fontFamilyMonospace: var(--fontFamilyMonospace, Consolas, 'Courier New', Courier, monospace);
118
123
  --webchat-fontFamilyNumeric: var(
119
124
  --fontFamilyNumeric,
120
125
  Bahnschrift,
@@ -161,7 +166,7 @@
161
166
 
162
167
  /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/strokeWidths.ts */
163
168
  --webchat-strokeWidthThin: var(--strokeWidthThin, 1px);
164
- --webchat-strokeWidthThick: var(--strokeWidthThicker, 2px);
169
+ --webchat-strokeWidthThick: var(--strokeWidthThick, 2px);
165
170
  --webchat-strokeWidthThicker: var(--strokeWidthThicker, 3px);
166
171
 
167
172
  /* https://github.com/microsoft/fluentui/blob/master/packages/tokens/src/global/durations.ts */
@@ -217,8 +222,9 @@
217
222
  padding-inline-start: var(--webchat-spacingHorizontalMNudge);
218
223
  }
219
224
 
220
- /* Transcript scrollable */
221
- :global(.webchat-fluent).theme :global(.webchat__basic-transcript .webchat__basic-transcript__scrollable) {
225
+ /* Scrollbars */
226
+ :global(.webchat-fluent).theme :global(.webchat__basic-transcript .webchat__basic-transcript__scrollable),
227
+ :global(.webchat-fluent).theme :global(.webchat__view-code-dialog__code-body) {
222
228
  /* Edge uses -webkit-scrollbar if scrollbar-* is not set */
223
229
  scrollbar-color: unset;
224
230
  scrollbar-width: unset;
@@ -231,6 +237,10 @@
231
237
  visibility: hidden;
232
238
  }
233
239
 
240
+ &::-webkit-scrollbar-corner {
241
+ background: transparent;
242
+ }
243
+
234
244
  &:hover::-webkit-scrollbar {
235
245
  width: var(--webchat-spacingVerticalMNudge);
236
246
  }
@@ -357,7 +367,7 @@
357
367
  }
358
368
 
359
369
  /* TODO: align with original fluent modal styles in WebChat as they don't match v9 anymore */
360
- :global(.webchat__modal-dialog__close-button):focus:not(:active):hover {
370
+ :global(.webchat__modal-dialog__close-button):not(:active):hover {
361
371
  background-color: var(--webchat-colorNeutralBackground3);
362
372
  }
363
373
 
@@ -378,6 +388,125 @@
378
388
  }
379
389
  }
380
390
 
391
+ /* View Code dialog */
392
+ :global(.webchat-fluent).theme :global(.webchat__modal-dialog.webchat__view-code-dialog) {
393
+ :global(.webchat__modal-dialog__close-button-layout) {
394
+ display: flex;
395
+ padding: var(--webchat-spacingVerticalS) var(--webchat-spacingHorizontalS);
396
+ }
397
+
398
+ :global(.webchat__modal-dialog__close-button) {
399
+ align-items: center;
400
+ aspect-ratio: 1;
401
+ display: flex;
402
+ height: var(--webchat-lineHeightBase300);
403
+ justify-content: center;
404
+ padding: 0;
405
+ width: unset;
406
+ }
407
+
408
+ :global(.webchat__view-code-dialog__copy-button) {
409
+ background: transparent;
410
+ border: none;
411
+ color: var(--webchat-colorNeutralForeground1);
412
+ height: 20px;
413
+ margin-block-start: var(--webchat-spacingVerticalS);
414
+ padding: 0;
415
+ position: absolute;
416
+ right: 32px;
417
+ top: 0;
418
+ transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
419
+ width: 20px;
420
+
421
+ :global(.webchat__code-block-copy-button__icon) {
422
+ background-color: currentColor;
423
+ }
424
+
425
+ &:hover {
426
+ background: var(--webchat-colorNeutralBackground3);
427
+ }
428
+
429
+ &:active {
430
+ background: var(--webchat-colorNeutralBackground3);
431
+ }
432
+
433
+ &:focus {
434
+ outline-color: var(--webchat-colorStrokeFocus2);
435
+ }
436
+ }
437
+
438
+ :global(.webchat__modal-dialog__box) {
439
+ width: fit-content;
440
+ }
441
+
442
+ :global(.webchat__modal-dialog__body) {
443
+ margin: 0;
444
+ padding: var(--webchat-spacingVerticalS) var(--webchat-spacingHorizontalM);
445
+ }
446
+
447
+ :global(.webchat__view-code-dialog__title) {
448
+ font-size: var(--webchat-fontSizeBase300);
449
+ font-weight: var(--webchat-fontWeightSemibold);
450
+ line-height: var(--webchat-lineHeightBase300);
451
+ }
452
+
453
+ :global(.webchat__view-code-dialog__body) {
454
+ display: contents;
455
+ }
456
+
457
+ :global(.webchat__view-code-dialog__code-body) {
458
+ background: var(--webchat__code-block--background);
459
+ font-family: var(--webchat-fontFamilyMonospace);
460
+ font-size: var(--webchat-fontSizeBase300);
461
+ line-height: var(--webchat-fontSizeBase300);
462
+ margin-inline: calc(var(--webchat-spacingHorizontalM) * -1);
463
+ padding-inline: var(--webchat-spacingHorizontalM);
464
+ }
465
+
466
+ :global(.webchat__view-code-dialog__code-body:has(.shiki:focus-visible)):focus-within {
467
+ outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
468
+ outline-offset: calc(var(--webchat-strokeWidthThick) * -1);
469
+
470
+ :global(.shiki) {
471
+ outline: none;
472
+ }
473
+ }
474
+
475
+ :global(.webchat__view-code-dialog__code-body:has(.shiki.github-light-default)) {
476
+ --webchat__code-block--background: var(--codeBlockBackground, var(--webchat-colorGrey98));
477
+ }
478
+
479
+ :global(.webchat__view-code-dialog__code-body:has(.shiki.github-dark-default)) {
480
+ --webchat__code-block--background: var(--codeBlockBackground, var(--webchat-colorGrey8));
481
+ }
482
+
483
+ :global(.webchat__view-code-dialog__footer) {
484
+ color: var(--webchat-colorNeutralForeground4);
485
+ font-size: var(--webchat-fontSizeBase100);
486
+ line-height: var(--webchat-lineHeightBase100);
487
+ }
488
+
489
+ :global(.webchat__view-code-dialog__link) {
490
+ color: var(--webchat-colorBrandForegroundLink);
491
+ text-decoration-color: transparent;
492
+
493
+ &:target {
494
+ color: var(--webchat-colorBrandForegroundLinkSelected);
495
+ }
496
+ &:hover {
497
+ color: var(--webchat-colorBrandForegroundLinkHover);
498
+ text-decoration: underline 1px currentColor;
499
+ }
500
+ &:active {
501
+ color: var(--webchat-colorBrandForegroundLinkPressed);
502
+ }
503
+ &:focus-visible {
504
+ outline: none;
505
+ text-decoration: underline 1px double var(--webchat-colorStrokeFocus2);
506
+ }
507
+ }
508
+ }
509
+
381
510
  /* Activity button */
382
511
  :global(.webchat-fluent).theme :global(.webchat__activity-button) {
383
512
  background: var(--webchat-colorNeutralBackground1);