botframework-webchat-fluent-theme 4.18.1-main.20250423.8c9cf52 → 4.18.1-main.20250505.488ce72

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.20250423.8c9cf52",
3
+ "version": "4.18.1-main.20250505.488ce72",
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",
@@ -72,15 +72,15 @@
72
72
  "@types/math-random": "^1.0.2",
73
73
  "@types/node": "^22.13.4",
74
74
  "@types/react": "^16.14.62",
75
- "botframework-webchat-base": "4.18.1-main.20250423.8c9cf52",
76
- "botframework-webchat-styles": "4.18.1-main.20250423.8c9cf52",
75
+ "botframework-webchat-base": "4.18.1-main.20250505.488ce72",
76
+ "botframework-webchat-styles": "4.18.1-main.20250505.488ce72",
77
77
  "tsup": "^8.3.6",
78
78
  "typescript": "^5.7.3"
79
79
  },
80
80
  "dependencies": {
81
- "botframework-webchat-api": "4.18.1-main.20250423.8c9cf52",
82
- "botframework-webchat-component": "4.18.1-main.20250423.8c9cf52",
83
- "botframework-webchat-core": "4.18.1-main.20250423.8c9cf52",
81
+ "botframework-webchat-api": "4.18.1-main.20250505.488ce72",
82
+ "botframework-webchat-component": "4.18.1-main.20250505.488ce72",
83
+ "botframework-webchat-core": "4.18.1-main.20250505.488ce72",
84
84
  "classnames": "2.5.1",
85
85
  "inject-meta-tag": "0.0.1",
86
86
  "math-random": "2.0.1",
@@ -14,7 +14,7 @@
14
14
 
15
15
  :global(.webchat-fluent) .sendbox__text-area--in-completion {
16
16
  .sendbox__text-area-doppelganger {
17
- visibility: visible;
17
+ visibility: unset;
18
18
  }
19
19
 
20
20
  .sendbox__text-area-input {
@@ -630,97 +630,101 @@
630
630
  }
631
631
 
632
632
  /* Feedback Form */
633
- :global(.webchat-fluent).theme :global(.webchat__feedback-form__body1) {
634
- font-family: var(--webchat-fontFamilyBase);
635
- color: var(--webchat-colorNeutralForeground1);
636
- font-size: var(--webchat-fontSizeBase300);
637
- font-weight: var(--webchat-fontWeightRegular);
638
- line-height: var(--webchat-lineHeightBase300);
639
- }
640
-
641
- :global(.webchat-fluent).theme :global(.webchat__feedback-form__caption1) {
642
- font-family: var(--webchat-fontFamilyBase);
643
- color: var(--webchat-colorNeutralForeground1);
644
- font-size: var(--webchat-fontSizeBase100);
645
- font-weight: var(--webchat-fontWeightRegular);
646
- line-height: var(--webchat-lineHeightBase200);
647
- }
633
+ :global(.webchat-fluent).theme :global(.webchat__feedback-form) {
634
+ gap: var(--webchat-spacingVerticalXS);
648
635
 
649
- :global(.webchat-fluent).theme :global(.webchat__feedback-form__button__submit) {
650
- background-color: var(--webchat-colorBrandBackground);
651
- border: var(--webchat-strokeWidthThin) solid var(--webchat-colorBrandBackground);
652
- border-radius: var(--webchat-borderRadiusMedium);
653
- color: var(--webchat-colorNeutralForegroundOnBrand);
654
- cursor: pointer;
655
- font-family: var(--webchat-fontFamilyBase);
656
- font-size: var(--webchat-fontSizeBase300);
657
- padding: var(--webchat-spacingVerticalNone) var(--webchat-spacingHorizontalS);
658
- transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
659
-
660
- &:hover {
661
- background-color: var(--webchat-colorBrandBackgroundHover);
662
- border: var(--webchat-strokeWidthThin) solid var(--webchat-colorBrandBackgroundHover);
663
- }
664
-
665
- &:focus-visible {
666
- outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
667
- outline-offset: calc(var(--webchat-strokeWidthThin) * -1);
668
- }
669
-
670
- &:active {
671
- background-color: var(--webchat-colorBrandBackgroundPressed);
672
- border: var(--webchat-strokeWidthThin) solid var(--webchat-colorBrandBackgroundPressed);
673
- }
674
- }
675
-
676
- :global(.webchat-fluent).theme :global(.webchat__feedback-form__button__cancel) {
677
- background-color: var(--webchat-colorNeutralBackground1);
678
- border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1);
679
- border-radius: var(--webchat-borderRadiusMedium);
680
- color: var(--webchat-colorNeutralForeground1);
681
- cursor: pointer;
682
- font-family: var(--webchat-fontFamilyBase);
683
- font-size: var(--webchat-fontSizeBase300);
684
- padding: var(--webchat-spacingVerticalNone) var(--webchat-spacingHorizontalS);
685
- transition: background-color var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
686
-
687
- &:hover {
688
- background-color: var(--webchat-colorNeutralBackground1Hover);
689
- border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1Hover);
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);
690
642
  }
691
-
692
- &:focus-visible {
693
- outline: var(--webchat-strokeWidthThick) solid var(--webchat-colorStrokeFocus2);
694
- outline-offset: calc(var(--webchat-strokeWidthThin) * -1);
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);
695
650
  }
696
-
697
- &:active {
698
- background-color: var(--webchat-colorNeutralBackground1Pressed);
699
- border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1Pressed);
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
+ }
700
677
  }
701
- }
702
-
703
- :global(.webchat-fluent).theme :global(.webchat__feedback-form-text-area) {
704
- background-color: var(--webchat-colorNeutralBackground1);
705
- border-radius: var(--webchat-borderRadiusMedium);
706
- border: var(--webchat-strokeWidthThin) solid var(--webchat-colorNeutralStroke1);
707
- font-family: var(--webchat-fontFamilyBase);
708
- font-size: var(--webchat-fontSizeBase300);
709
- line-height: var(--webchat-lineHeightBase300);
710
- gap: var(--webchat-spacingVerticalSNudge);
711
- padding: var(--webchat-spacingVerticalS) var(--webchat-spacingHorizontalM);
712
- &::after {
713
- border-bottom-left-radius: var(--webchat-borderRadiusMedium);
714
- border-bottom-right-radius: var(--webchat-borderRadiusMedium);
715
- border-bottom: var(--webchat-strokeWidthThicker) solid var(--webchat-colorBrandForeground1);
716
- clip-path: inset(calc(100% - var(--webchat-strokeWidthThicker)) 50% 0 50%);
717
- transition: clip-path var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
718
- }
719
- &:focus-within {
678
+
679
+ :global(.webchat__feedback-form__cancel-button) {
680
+ background-color: var(--webchat-colorNeutralBackground1);
720
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
+ }
721
704
  }
722
- &:focus-within::after {
723
- clip-path: inset(calc(100% - var(--webchat-strokeWidthThicker)) 0 0 0);
724
- transition: clip-path var(--webchat-durationNormal) var(--webchat-curveDecelerateMid);
725
- }
726
- }
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
+ }
730
+ }
@@ -1,5 +1,10 @@
1
1
  import { type ActivityMiddleware, type StyleOptions, type TypingIndicatorMiddleware } from 'botframework-webchat-api';
2
- import { DecoratorComposer, DecoratorMiddleware } from 'botframework-webchat-api/decorator';
2
+ import {
3
+ DecoratorComposer,
4
+ DecoratorMiddleware,
5
+ type DecoratorMiddlewareInit,
6
+ type DecoratorMiddlewareTypes
7
+ } from 'botframework-webchat-api/decorator';
3
8
  import { Components } from 'botframework-webchat-component';
4
9
  import { WebChatDecorator } from 'botframework-webchat-component/decorator';
5
10
  import React, { memo, type ReactNode } from 'react';
@@ -18,7 +23,10 @@ import VariantComposer, { VariantList } from './VariantComposer';
18
23
 
19
24
  const { ThemeProvider } = Components;
20
25
 
21
- type Props = Readonly<{ children?: ReactNode | undefined; variant?: VariantList | undefined }>;
26
+ type FluentThemeProviderProps = Readonly<{
27
+ children?: ReactNode | undefined;
28
+ variant?: VariantList | undefined;
29
+ }>;
22
30
 
23
31
  const activityMiddleware: readonly ActivityMiddleware[] = Object.freeze([
24
32
  () =>
@@ -45,11 +53,14 @@ const activityMiddleware: readonly ActivityMiddleware[] = Object.freeze([
45
53
 
46
54
  const sendBoxMiddleware = [() => () => () => PrimarySendBox];
47
55
 
48
- const decoratorMiddleware: DecoratorMiddleware[] = [
49
- init =>
56
+ const decoratorMiddleware: readonly DecoratorMiddleware[] = Object.freeze([
57
+ (init: DecoratorMiddlewareInit) =>
50
58
  init === 'activity border' &&
51
- (next => request => (request.livestreamingState === 'preparing' ? ActivityLoader : next(request)))
52
- ];
59
+ ((next => request =>
60
+ request.livestreamingState === 'preparing'
61
+ ? ActivityLoader
62
+ : next(request)) satisfies DecoratorMiddlewareTypes['activity border'])
63
+ ]);
53
64
 
54
65
  const styles = createStyles();
55
66
 
@@ -64,26 +75,29 @@ const typingIndicatorMiddleware = Object.freeze([
64
75
  args[0].visible ? <SlidingDotsTypingIndicator /> : next(...args)
65
76
  ] satisfies TypingIndicatorMiddleware[]);
66
77
 
67
- const FluentThemeProvider = ({ children, variant = 'fluent' }: Props) => (
68
- <VariantComposer variant={variant}>
69
- <WebChatTheme>
70
- <TelephoneKeypadProvider>
71
- <ThemeProvider
72
- activityMiddleware={activityMiddleware}
73
- sendBoxMiddleware={sendBoxMiddleware}
74
- styleOptions={fluentStyleOptions}
75
- styles={styles}
76
- typingIndicatorMiddleware={typingIndicatorMiddleware}
77
- >
78
- <AssetComposer>
79
- <WebChatDecorator>
80
- <DecoratorComposer middleware={decoratorMiddleware}>{children}</DecoratorComposer>
81
- </WebChatDecorator>
82
- </AssetComposer>
83
- </ThemeProvider>
84
- </TelephoneKeypadProvider>
85
- </WebChatTheme>
86
- </VariantComposer>
87
- );
78
+ function FluentThemeProvider({ children, variant = 'fluent' }: FluentThemeProviderProps) {
79
+ return (
80
+ <VariantComposer variant={variant}>
81
+ <WebChatTheme>
82
+ <TelephoneKeypadProvider>
83
+ <ThemeProvider
84
+ activityMiddleware={activityMiddleware}
85
+ sendBoxMiddleware={sendBoxMiddleware}
86
+ styleOptions={fluentStyleOptions}
87
+ styles={styles}
88
+ typingIndicatorMiddleware={typingIndicatorMiddleware}
89
+ >
90
+ <AssetComposer>
91
+ <WebChatDecorator>
92
+ <DecoratorComposer middleware={decoratorMiddleware}>{children}</DecoratorComposer>
93
+ </WebChatDecorator>
94
+ </AssetComposer>
95
+ </ThemeProvider>
96
+ </TelephoneKeypadProvider>
97
+ </WebChatTheme>
98
+ </VariantComposer>
99
+ );
100
+ }
88
101
 
89
102
  export default memo(FluentThemeProvider);
103
+ export { type FluentThemeProviderProps };