botframework-webchat-component 4.13.0 → 4.15.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/.eslintrc.yml +4 -100
- package/.prettierrc.yml +1 -1
- package/lib/Activity/Avatar.d.ts +10 -0
- package/lib/Activity/Avatar.d.ts.map +1 -0
- package/lib/Activity/Avatar.js +2 -1
- package/lib/Activity/Bubble.d.ts +11 -0
- package/lib/Activity/Bubble.d.ts.map +1 -0
- package/lib/Activity/Bubble.js +2 -2
- package/lib/Activity/CarouselFilmStrip.js +21 -31
- package/lib/Activity/CarouselFilmStripAttachment.js +120 -0
- package/lib/Activity/CarouselLayout.js +5 -5
- package/lib/Activity/Speak.d.ts +10 -0
- package/lib/Activity/Speak.d.ts.map +1 -0
- package/lib/Activity/Speak.js +11 -13
- package/lib/Activity/StackedLayout.d.ts +18 -0
- package/lib/Activity/StackedLayout.d.ts.map +1 -0
- package/lib/Activity/StackedLayout.js +19 -15
- package/lib/Assets/TypingAnimation.js +2 -2
- package/lib/Attachment/Assets/DownloadIcon.js +3 -1
- package/lib/Attachment/AudioAttachment.js +2 -2
- package/lib/Attachment/AudioContent.d.ts +11 -0
- package/lib/Attachment/AudioContent.d.ts.map +1 -0
- package/lib/Attachment/AudioContent.js +4 -4
- package/lib/Attachment/FileAttachment.js +2 -2
- package/lib/Attachment/FileContent.d.ts +10 -0
- package/lib/Attachment/FileContent.d.ts.map +1 -0
- package/lib/Attachment/FileContent.js +14 -9
- package/lib/Attachment/HTMLVideoContent.d.ts +11 -0
- package/lib/Attachment/HTMLVideoContent.d.ts.map +1 -0
- package/lib/Attachment/HTMLVideoContent.js +2 -2
- package/lib/Attachment/ImageContent.d.ts +8 -0
- package/lib/Attachment/ImageContent.d.ts.map +1 -0
- package/lib/Attachment/ImageContent.js +2 -2
- package/lib/Attachment/TextContent.d.ts +8 -0
- package/lib/Attachment/TextContent.d.ts.map +1 -0
- package/lib/Attachment/TextContent.js +4 -4
- package/lib/Attachment/VideoAttachment.js +2 -2
- package/lib/Attachment/VideoContent.d.ts +11 -0
- package/lib/Attachment/VideoContent.d.ts.map +1 -0
- package/lib/Attachment/VideoContent.js +1 -1
- package/lib/Attachment/VimeoContent.d.ts +10 -0
- package/lib/Attachment/VimeoContent.d.ts.map +1 -0
- package/lib/Attachment/VimeoContent.js +8 -8
- package/lib/Attachment/YouTubeContent.d.ts +10 -0
- package/lib/Attachment/YouTubeContent.d.ts.map +1 -0
- package/lib/Attachment/YouTubeContent.js +5 -5
- package/lib/Avatar/ImageAvatar.js +2 -2
- package/lib/Avatar/InitialsAvatar.js +2 -2
- package/lib/BasicConnectivityStatus.js +2 -2
- package/lib/BasicSendBox.d.ts +9 -0
- package/lib/BasicSendBox.d.ts.map +1 -0
- package/lib/BasicSendBox.js +7 -6
- package/lib/BasicToast.js +4 -4
- package/lib/BasicToaster.js +8 -5
- package/lib/BasicTranscript.d.ts +7 -0
- package/lib/BasicTranscript.d.ts.map +1 -0
- package/lib/BasicTranscript.js +406 -743
- package/lib/BasicTypingIndicator.d.ts +6 -0
- package/lib/BasicTypingIndicator.d.ts.map +1 -0
- package/lib/BasicTypingIndicator.js +13 -5
- package/lib/BasicWebChat.d.ts +9 -0
- package/lib/BasicWebChat.d.ts.map +1 -0
- package/lib/BasicWebChat.js +6 -4
- package/lib/Composer.d.ts +23 -0
- package/lib/Composer.d.ts.map +1 -0
- package/lib/Composer.js +65 -82
- package/lib/ConnectivityStatus/Assets/ErrorNotificationIcon.js +2 -2
- package/lib/ConnectivityStatus/Assets/SpinnerAnimation.js +2 -2
- package/lib/ConnectivityStatus/Assets/WarningNotificationIcon.js +2 -2
- package/lib/ConnectivityStatus/Connected.js +1 -1
- package/lib/ConnectivityStatus/Connecting.js +4 -4
- package/lib/ConnectivityStatus/FailedToConnect.js +2 -2
- package/lib/ConnectivityStatus/JavaScriptError.js +2 -2
- package/lib/Dictation.js +13 -4
- package/lib/ErrorBox.d.ts +8 -0
- package/lib/ErrorBox.d.ts.map +1 -0
- package/lib/ErrorBox.js +2 -2
- package/lib/Middleware/Activity/createCoreMiddleware.d.ts +3 -0
- package/lib/Middleware/Activity/createCoreMiddleware.d.ts.map +1 -0
- package/lib/Middleware/Activity/createCoreMiddleware.js +1 -1
- package/lib/Middleware/ActivityStatus/AbsoluteTime.js +1 -1
- package/lib/Middleware/ActivityStatus/RelativeTime.js +1 -1
- package/lib/Middleware/ActivityStatus/SendStatus/SendFailedRetry.js +3 -3
- package/lib/Middleware/ActivityStatus/SendStatus/SendStatus.d.ts +11 -0
- package/lib/Middleware/ActivityStatus/SendStatus/SendStatus.d.ts.map +1 -0
- package/lib/Middleware/ActivityStatus/SendStatus/SendStatus.js +5 -5
- package/lib/Middleware/ActivityStatus/Timestamp.d.ts +9 -0
- package/lib/Middleware/ActivityStatus/Timestamp.d.ts.map +1 -0
- package/lib/Middleware/ActivityStatus/Timestamp.js +2 -2
- package/lib/Middleware/ActivityStatus/createCoreMiddleware.d.ts +3 -0
- package/lib/Middleware/ActivityStatus/createCoreMiddleware.d.ts.map +1 -0
- package/lib/Middleware/ActivityStatus/createCoreMiddleware.js +1 -1
- package/lib/Middleware/ActivityStatus/createSendStatusMiddleware.js +21 -16
- package/lib/Middleware/ActivityStatus/createTimestampMiddleware.js +1 -1
- package/lib/Middleware/Attachment/createCoreMiddleware.d.ts +3 -0
- package/lib/Middleware/Attachment/createCoreMiddleware.d.ts.map +1 -0
- package/lib/Middleware/Attachment/createCoreMiddleware.js +10 -13
- package/lib/Middleware/AttachmentForScreenReader/AudioAttachment.js +1 -1
- package/lib/Middleware/AttachmentForScreenReader/FileAttachment.js +1 -1
- package/lib/Middleware/AttachmentForScreenReader/ImageAttachment.js +1 -1
- package/lib/Middleware/AttachmentForScreenReader/TextAttachment.js +1 -1
- package/lib/Middleware/AttachmentForScreenReader/VideoAttachment.js +1 -1
- package/lib/Middleware/AttachmentForScreenReader/createCoreMiddleware.d.ts +3 -0
- package/lib/Middleware/AttachmentForScreenReader/createCoreMiddleware.d.ts.map +1 -0
- package/lib/Middleware/AttachmentForScreenReader/createCoreMiddleware.js +9 -5
- package/lib/Middleware/Avatar/createCoreMiddleware.d.ts +11 -0
- package/lib/Middleware/Avatar/createCoreMiddleware.d.ts.map +1 -0
- package/lib/Middleware/Avatar/createCoreMiddleware.js +3 -4
- package/lib/Middleware/CardAction/createCoreMiddleware.js +11 -4
- package/lib/Middleware/GroupActivities/createCoreMiddleware.js +1 -1
- package/lib/Middleware/ScrollToEndButton/ScrollToEndButton.js +71 -0
- package/lib/Middleware/ScrollToEndButton/createScrollToEndButtonMiddleware.d.ts +3 -0
- package/lib/Middleware/ScrollToEndButton/createScrollToEndButtonMiddleware.d.ts.map +1 -0
- package/lib/Middleware/ScrollToEndButton/createScrollToEndButtonMiddleware.js +27 -0
- package/lib/Middleware/Toast/createCoreMiddleware.d.ts +4 -0
- package/lib/Middleware/Toast/createCoreMiddleware.d.ts.map +1 -0
- package/lib/Middleware/Toast/createCoreMiddleware.js +1 -1
- package/lib/Middleware/TypingIndicator/createCoreMiddleware.d.ts +3 -0
- package/lib/Middleware/TypingIndicator/createCoreMiddleware.d.ts.map +1 -0
- package/lib/Middleware/TypingIndicator/createCoreMiddleware.js +9 -6
- package/lib/ReactWebChat.d.ts +10 -0
- package/lib/ReactWebChat.d.ts.map +1 -0
- package/lib/ReactWebChat.js +19 -7
- package/lib/ScreenReaderActivity.js +76 -48
- package/lib/ScreenReaderText.d.ts +9 -0
- package/lib/ScreenReaderText.d.ts.map +1 -0
- package/lib/ScreenReaderText.js +22 -8
- package/lib/SendBox/Assets/AttachmentIcon.js +3 -1
- package/lib/SendBox/Assets/MicrophoneIcon.js +3 -1
- package/lib/SendBox/Assets/SendIcon.js +2 -2
- package/lib/SendBox/AutoResizeTextArea.d.ts +23 -0
- package/lib/SendBox/AutoResizeTextArea.d.ts.map +1 -0
- package/lib/SendBox/AutoResizeTextArea.js +6 -6
- package/lib/SendBox/DictationInterims.d.ts +9 -0
- package/lib/SendBox/DictationInterims.d.ts.map +1 -0
- package/lib/SendBox/DictationInterims.js +3 -3
- package/lib/SendBox/IconButton.d.ts +11 -0
- package/lib/SendBox/IconButton.d.ts.map +1 -0
- package/lib/SendBox/IconButton.js +27 -7
- package/lib/SendBox/MicrophoneButton.d.ts +11 -0
- package/lib/SendBox/MicrophoneButton.d.ts.map +1 -0
- package/lib/SendBox/MicrophoneButton.js +25 -24
- package/lib/SendBox/SendButton.d.ts +9 -0
- package/lib/SendBox/SendButton.d.ts.map +1 -0
- package/lib/SendBox/SendButton.js +8 -6
- package/lib/SendBox/SuggestedAction.d.ts +17 -0
- package/lib/SendBox/SuggestedAction.d.ts.map +1 -0
- package/lib/SendBox/SuggestedAction.js +29 -24
- package/lib/SendBox/SuggestedActions.d.ts +5 -0
- package/lib/SendBox/SuggestedActions.d.ts.map +1 -0
- package/lib/SendBox/SuggestedActions.js +33 -13
- package/lib/SendBox/TextBox.d.ts +28 -0
- package/lib/SendBox/TextBox.d.ts.map +1 -0
- package/lib/SendBox/TextBox.js +13 -8
- package/lib/SendBox/UploadButton.d.ts +9 -0
- package/lib/SendBox/UploadButton.d.ts.map +1 -0
- package/lib/SendBox/UploadButton.js +6 -6
- package/lib/Styles/StyleSet/Activities.d.ts +5 -0
- package/lib/Styles/StyleSet/Activities.d.ts.map +1 -0
- package/lib/Styles/StyleSet/AudioAttachment.d.ts +6 -0
- package/lib/Styles/StyleSet/AudioAttachment.d.ts.map +1 -0
- package/lib/Styles/StyleSet/AudioContent.d.ts +4 -0
- package/lib/Styles/StyleSet/AudioContent.d.ts.map +1 -0
- package/lib/Styles/StyleSet/AutoResizeTextArea.d.ts +37 -0
- package/lib/Styles/StyleSet/AutoResizeTextArea.d.ts.map +1 -0
- package/lib/Styles/StyleSet/Avatar.d.ts +9 -0
- package/lib/Styles/StyleSet/Avatar.d.ts.map +1 -0
- package/lib/Styles/StyleSet/BasicTranscript.d.ts +85 -0
- package/lib/Styles/StyleSet/BasicTranscript.d.ts.map +1 -0
- package/lib/Styles/StyleSet/BasicTranscript.js +21 -9
- package/lib/Styles/StyleSet/Bubble.d.ts +5 -0
- package/lib/Styles/StyleSet/Bubble.d.ts.map +1 -0
- package/lib/Styles/StyleSet/Bubble.js +2 -2
- package/lib/Styles/StyleSet/CarouselFilmStrip.d.ts +5 -0
- package/lib/Styles/StyleSet/CarouselFilmStrip.d.ts.map +1 -0
- package/lib/Styles/StyleSet/CarouselFilmStrip.js +2 -18
- package/lib/Styles/StyleSet/CarouselFilmStripAttachment.d.ts +3 -0
- package/lib/Styles/StyleSet/CarouselFilmStripAttachment.d.ts.map +1 -0
- package/lib/Styles/StyleSet/CarouselFilmStripAttachment.js +63 -0
- package/lib/Styles/StyleSet/CarouselFlipper.d.ts +27 -0
- package/lib/Styles/StyleSet/CarouselFlipper.d.ts.map +1 -0
- package/lib/Styles/StyleSet/ConnectivityNotification.d.ts +13 -0
- package/lib/Styles/StyleSet/ConnectivityNotification.d.ts.map +1 -0
- package/lib/Styles/StyleSet/DictationInterims.d.ts +13 -0
- package/lib/Styles/StyleSet/DictationInterims.d.ts.map +1 -0
- package/lib/Styles/StyleSet/ErrorBox.d.ts +33 -0
- package/lib/Styles/StyleSet/ErrorBox.d.ts.map +1 -0
- package/lib/Styles/StyleSet/ErrorNotification.d.ts +23 -0
- package/lib/Styles/StyleSet/ErrorNotification.d.ts.map +1 -0
- package/lib/Styles/StyleSet/FileContent.d.ts +32 -0
- package/lib/Styles/StyleSet/FileContent.d.ts.map +1 -0
- package/lib/Styles/StyleSet/ImageAvatar.d.ts +7 -0
- package/lib/Styles/StyleSet/ImageAvatar.d.ts.map +1 -0
- package/lib/Styles/StyleSet/InitialsAvatar.d.ts +19 -0
- package/lib/Styles/StyleSet/InitialsAvatar.d.ts.map +1 -0
- package/lib/Styles/StyleSet/KeyboardHelp.d.ts +123 -0
- package/lib/Styles/StyleSet/KeyboardHelp.d.ts.map +1 -0
- package/lib/Styles/StyleSet/KeyboardHelp.js +145 -0
- package/lib/Styles/StyleSet/MicrophoneButton.d.ts +13 -0
- package/lib/Styles/StyleSet/MicrophoneButton.d.ts.map +1 -0
- package/lib/Styles/StyleSet/Root.d.ts +8 -0
- package/lib/Styles/StyleSet/Root.d.ts.map +1 -0
- package/lib/Styles/StyleSet/ScrollToEndButton.d.ts +36 -0
- package/lib/Styles/StyleSet/ScrollToEndButton.d.ts.map +1 -0
- package/lib/Styles/StyleSet/ScrollToEndButton.js +36 -34
- package/lib/Styles/StyleSet/SendBox.d.ts +24 -0
- package/lib/Styles/StyleSet/SendBox.d.ts.map +1 -0
- package/lib/Styles/StyleSet/SendBoxButton.d.ts +79 -0
- package/lib/Styles/StyleSet/SendBoxButton.d.ts.map +1 -0
- package/lib/Styles/StyleSet/SendBoxButton.js +76 -12
- package/lib/Styles/StyleSet/SendBoxTextBox.d.ts +41 -0
- package/lib/Styles/StyleSet/SendBoxTextBox.d.ts.map +1 -0
- package/lib/Styles/StyleSet/SendBoxTextBox.js +3 -3
- package/lib/Styles/StyleSet/SendStatus.d.ts +8 -0
- package/lib/Styles/StyleSet/SendStatus.d.ts.map +1 -0
- package/lib/Styles/StyleSet/SingleAttachmentActivity.d.ts +11 -0
- package/lib/Styles/StyleSet/SingleAttachmentActivity.d.ts.map +1 -0
- package/lib/Styles/StyleSet/SpinnerAnimation.d.ts +15 -0
- package/lib/Styles/StyleSet/SpinnerAnimation.d.ts.map +1 -0
- package/lib/Styles/StyleSet/StackedLayout.d.ts +63 -0
- package/lib/Styles/StyleSet/StackedLayout.d.ts.map +1 -0
- package/lib/Styles/StyleSet/StackedLayout.js +1 -1
- package/lib/Styles/StyleSet/SuggestedAction.d.ts +94 -0
- package/lib/Styles/StyleSet/SuggestedAction.d.ts.map +1 -0
- package/lib/Styles/StyleSet/SuggestedAction.js +116 -41
- package/lib/Styles/StyleSet/SuggestedActions.d.ts +125 -0
- package/lib/Styles/StyleSet/SuggestedActions.d.ts.map +1 -0
- package/lib/Styles/StyleSet/SuggestedActions.js +13 -6
- package/lib/Styles/StyleSet/TextContent.d.ts +28 -0
- package/lib/Styles/StyleSet/TextContent.d.ts.map +1 -0
- package/lib/Styles/StyleSet/Toast.d.ts +65 -0
- package/lib/Styles/StyleSet/Toast.d.ts.map +1 -0
- package/lib/Styles/StyleSet/Toaster.d.ts +111 -0
- package/lib/Styles/StyleSet/Toaster.d.ts.map +1 -0
- package/lib/Styles/StyleSet/TypingAnimation.d.ts +8 -0
- package/lib/Styles/StyleSet/TypingAnimation.d.ts.map +1 -0
- package/lib/Styles/StyleSet/TypingIndicator.d.ts +11 -0
- package/lib/Styles/StyleSet/TypingIndicator.d.ts.map +1 -0
- package/lib/Styles/StyleSet/UploadButton.d.ts +14 -0
- package/lib/Styles/StyleSet/UploadButton.d.ts.map +1 -0
- package/lib/Styles/StyleSet/VideoAttachment.d.ts +2 -0
- package/lib/Styles/StyleSet/VideoAttachment.d.ts.map +1 -0
- package/lib/Styles/StyleSet/VideoContent.d.ts +6 -0
- package/lib/Styles/StyleSet/VideoContent.d.ts.map +1 -0
- package/lib/Styles/StyleSet/VimeoContent.d.ts +7 -0
- package/lib/Styles/StyleSet/VimeoContent.d.ts.map +1 -0
- package/lib/Styles/StyleSet/WarningNotification.d.ts +22 -0
- package/lib/Styles/StyleSet/WarningNotification.d.ts.map +1 -0
- package/lib/Styles/StyleSet/YouTubeContent.d.ts +7 -0
- package/lib/Styles/StyleSet/YouTubeContent.d.ts.map +1 -0
- package/lib/Styles/createStyleSet.d.ts +1372 -0
- package/lib/Styles/createStyleSet.d.ts.map +1 -0
- package/lib/Styles/createStyleSet.js +47 -41
- package/lib/Styles/mirrorStyle.js +13 -4
- package/lib/Toast/CollapseIcon.js +3 -1
- package/lib/Toast/DismissIcon.js +3 -1
- package/lib/Toast/ExpandIcon.js +3 -1
- package/lib/Toast/NotificationIcon.js +7 -3
- package/lib/Toast/createToastMiddleware.d.ts +4 -0
- package/lib/Toast/createToastMiddleware.d.ts.map +1 -0
- package/lib/Toast/createToastMiddleware.js +2 -2
- package/lib/Transcript/ActivityRow.d.ts +9 -0
- package/lib/Transcript/ActivityRow.d.ts.map +1 -0
- package/lib/Transcript/ActivityRow.js +157 -0
- package/lib/Transcript/ActivityTextAlt.js +57 -0
- package/lib/Transcript/FocusTrap.d.ts +8 -0
- package/lib/Transcript/FocusTrap.d.ts.map +1 -0
- package/lib/Transcript/FocusTrap.js +74 -0
- package/lib/Transcript/KeyboardHelp.d.ts +4 -0
- package/lib/Transcript/KeyboardHelp.d.ts.map +1 -0
- package/lib/Transcript/KeyboardHelp.js +550 -0
- package/lib/Transcript/LiveRegionTranscript.d.ts +8 -0
- package/lib/Transcript/LiveRegionTranscript.d.ts.map +1 -0
- package/lib/Transcript/LiveRegionTranscript.js +214 -0
- package/lib/Transcript/types.d.ts +2 -0
- package/lib/Transcript/types.d.ts.map +1 -0
- package/lib/Transcript/types.js +2 -0
- package/lib/Transcript/useActivityAccessibleName.d.ts +4 -0
- package/lib/Transcript/useActivityAccessibleName.d.ts.map +1 -0
- package/lib/Transcript/useActivityAccessibleName.js +97 -0
- package/lib/Utils/AccessKeySink/Surface.js +7 -5
- package/lib/Utils/AccessibleButton.d.ts +11 -0
- package/lib/Utils/AccessibleButton.d.ts.map +1 -0
- package/lib/Utils/AccessibleButton.js +15 -8
- package/lib/Utils/AccessibleInputText.d.ts +21 -0
- package/lib/Utils/AccessibleInputText.d.ts.map +1 -0
- package/lib/Utils/AccessibleInputText.js +29 -25
- package/lib/Utils/AccessibleTextArea.d.ts +20 -0
- package/lib/Utils/AccessibleTextArea.d.ts.map +1 -0
- package/lib/Utils/AccessibleTextArea.js +35 -24
- package/lib/Utils/CroppedImage.js +2 -2
- package/lib/Utils/Fade.js +2 -2
- package/lib/Utils/FocusRedirector.d.ts +9 -0
- package/lib/Utils/FocusRedirector.d.ts.map +1 -0
- package/lib/Utils/FocusRedirector.js +18 -15
- package/lib/Utils/InlineMarkdown.js +17 -10
- package/lib/Utils/TypeFocusSink/FocusBox.js +6 -4
- package/lib/Utils/TypeFocusSink/getTabIndex.d.ts +2 -0
- package/lib/Utils/TypeFocusSink/getTabIndex.d.ts.map +1 -0
- package/lib/Utils/TypeFocusSink/getTabIndex.js +1 -1
- package/lib/Utils/TypeFocusSink/inputtableKey.d.ts +2 -0
- package/lib/Utils/TypeFocusSink/inputtableKey.d.ts.map +1 -0
- package/lib/Utils/TypeFocusSink/inputtableKey.js +5 -2
- package/lib/Utils/TypeFocusSink/navigableEvent.js +1 -1
- package/lib/Utils/activityAltText.d.ts +8 -0
- package/lib/Utils/activityAltText.d.ts.map +1 -0
- package/lib/Utils/activityAltText.js +100 -0
- package/lib/Utils/addTargetBlankToHyperlinksMarkdown.js +1 -1
- package/lib/Utils/createCustomEvent.js +9 -3
- package/lib/Utils/debounce.js +1 -1
- package/lib/Utils/detectBrowser.js +4 -2
- package/lib/Utils/downscaleImageToDataURL/downscaleImageToDataURLUsingWorker.js +3 -3
- package/lib/Utils/downscaleImageToDataURL/index.js +2 -2
- package/lib/Utils/filterMap.js +1 -1
- package/lib/Utils/findAncestor.js +17 -0
- package/lib/Utils/getActivityUniqueId.js +4 -2
- package/lib/Utils/intersectionOf.d.ts +5 -0
- package/lib/Utils/intersectionOf.d.ts.map +1 -0
- package/lib/Utils/intersectionOf.js +17 -2
- package/lib/Utils/isZeroOrPositive.d.ts +5 -0
- package/lib/Utils/isZeroOrPositive.d.ts.map +1 -0
- package/lib/Utils/isZeroOrPositive.js +4 -1
- package/lib/Utils/mapMap.js +10 -3
- package/lib/Utils/readDataURIToBlob.js +3 -3
- package/lib/Utils/scrollIntoViewWithBlockNearest.d.ts +7 -0
- package/lib/Utils/scrollIntoViewWithBlockNearest.d.ts.map +1 -0
- package/lib/Utils/scrollIntoViewWithBlockNearest.js +48 -0
- package/lib/Utils/shallowEquals.js +7 -3
- package/lib/Utils/singleToArray.js +1 -1
- package/lib/Utils/supportPseudoClass.d.ts +2 -0
- package/lib/Utils/supportPseudoClass.d.ts.map +1 -0
- package/lib/Utils/supportPseudoClass.js +23 -0
- package/lib/Utils/tabbableElements.d.ts +2 -0
- package/lib/Utils/tabbableElements.d.ts.map +1 -0
- package/lib/Utils/tabbableElements.js +2 -2
- package/lib/connectToWebChat.js +17 -7
- package/lib/hooks/index.d.ts +21 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +25 -25
- package/lib/hooks/internal/BypassSpeechSynthesisPonyfill.js +100 -41
- package/lib/hooks/internal/UITracker.js +2 -2
- package/lib/hooks/internal/useChanged.js +8 -1
- package/lib/hooks/internal/useDispatchScrollPosition.js +3 -7
- package/lib/hooks/internal/useDispatchTranscriptFocusByActivityKey.d.ts +2 -0
- package/lib/hooks/internal/useDispatchTranscriptFocusByActivityKey.d.ts.map +1 -0
- package/lib/hooks/internal/useDispatchTranscriptFocusByActivityKey.js +15 -0
- package/lib/hooks/internal/useEnterKeyHint.js +1 -1
- package/lib/hooks/internal/useFocusVisible.d.ts +3 -0
- package/lib/hooks/internal/useFocusVisible.d.ts.map +1 -0
- package/lib/hooks/internal/useFocusVisible.js +48 -0
- package/lib/hooks/internal/useForceRender.js +2 -2
- package/lib/hooks/internal/useForceRenderAtInterval.js +2 -2
- package/lib/hooks/internal/useInternalRenderMarkdownInline.js +1 -1
- package/lib/hooks/internal/useLocalizeAccessKey.js +2 -2
- package/lib/hooks/internal/useMemoWithPrevious.d.ts +3 -0
- package/lib/hooks/internal/useMemoWithPrevious.d.ts.map +1 -0
- package/lib/hooks/internal/useMemoWithPrevious.js +22 -0
- package/lib/hooks/internal/useMemoize.d.ts +14 -0
- package/lib/hooks/internal/useMemoize.d.ts.map +1 -0
- package/lib/hooks/internal/useMemoize.js +12 -3
- package/lib/hooks/internal/useNavigatorPlatform.js +1 -1
- package/lib/hooks/internal/useNonce.js +1 -1
- package/lib/hooks/internal/useObserveFocusVisible.d.ts +3 -0
- package/lib/hooks/internal/useObserveFocusVisible.d.ts.map +1 -0
- package/lib/hooks/internal/useObserveFocusVisible.js +208 -0
- package/lib/hooks/internal/usePrevious.d.ts +2 -0
- package/lib/hooks/internal/usePrevious.d.ts.map +1 -0
- package/lib/hooks/internal/usePrevious.js +18 -0
- package/lib/hooks/internal/useRegisterFocusSendBox.js +1 -1
- package/lib/hooks/internal/useRegisterFocusTranscript.js +1 -1
- package/lib/hooks/internal/useRegisterScrollRelative.js +1 -1
- package/lib/hooks/internal/useRegisterScrollTo.js +1 -1
- package/lib/hooks/internal/useRegisterScrollToEnd.js +1 -1
- package/lib/hooks/internal/useReplaceEmoticon.js +2 -2
- package/lib/hooks/internal/useResumeAudioContext.js +33 -0
- package/lib/hooks/internal/useScrollRelative.js +1 -1
- package/lib/hooks/internal/useSettableDictateAbortable.js +1 -1
- package/lib/hooks/internal/useStateRef.d.ts +3 -0
- package/lib/hooks/internal/useStateRef.d.ts.map +1 -0
- package/lib/hooks/internal/useStateRef.js +40 -0
- package/lib/hooks/internal/useSuggestedActionsAccessKey.js +1 -1
- package/lib/hooks/internal/useUniqueId.d.ts +2 -0
- package/lib/hooks/internal/useUniqueId.d.ts.map +1 -0
- package/lib/hooks/internal/useUniqueId.js +1 -1
- package/lib/hooks/internal/useValueRef.d.ts +3 -0
- package/lib/hooks/internal/useValueRef.d.ts.map +1 -0
- package/lib/hooks/internal/useValueRef.js +25 -0
- package/lib/hooks/useDictateAbortable.d.ts +2 -0
- package/lib/hooks/useDictateAbortable.d.ts.map +1 -0
- package/lib/hooks/useDictateAbortable.js +2 -2
- package/lib/hooks/useFocus.d.ts +2 -0
- package/lib/hooks/useFocus.d.ts.map +1 -0
- package/lib/hooks/useFocus.js +1 -1
- package/lib/hooks/useFocusSendBox.d.ts +3 -0
- package/lib/hooks/useFocusSendBox.d.ts.map +1 -0
- package/lib/hooks/useFocusSendBox.js +2 -1
- package/lib/hooks/useObserveScrollPosition.d.ts +3 -0
- package/lib/hooks/useObserveScrollPosition.d.ts.map +1 -0
- package/lib/hooks/useObserveScrollPosition.js +2 -2
- package/lib/hooks/useObserveTranscriptFocus.d.ts +5 -0
- package/lib/hooks/useObserveTranscriptFocus.d.ts.map +1 -0
- package/lib/hooks/useObserveTranscriptFocus.js +2 -2
- package/lib/hooks/useRenderMarkdownAsHTML.d.ts +5 -0
- package/lib/hooks/useRenderMarkdownAsHTML.d.ts.map +1 -0
- package/lib/hooks/useRenderMarkdownAsHTML.js +2 -2
- package/lib/hooks/useScrollDown.d.ts +4 -0
- package/lib/hooks/useScrollDown.d.ts.map +1 -0
- package/lib/hooks/useScrollDown.js +1 -1
- package/lib/hooks/useScrollTo.d.ts +5 -0
- package/lib/hooks/useScrollTo.d.ts.map +1 -0
- package/lib/hooks/useScrollTo.js +1 -1
- package/lib/hooks/useScrollToEnd.d.ts +2 -0
- package/lib/hooks/useScrollToEnd.d.ts.map +1 -0
- package/lib/hooks/useScrollToEnd.js +1 -1
- package/lib/hooks/useScrollUp.d.ts +4 -0
- package/lib/hooks/useScrollUp.d.ts.map +1 -0
- package/lib/hooks/useScrollUp.js +1 -1
- package/lib/hooks/useSendFiles.d.ts +2 -0
- package/lib/hooks/useSendFiles.d.ts.map +1 -0
- package/lib/hooks/useSendFiles.js +3 -3
- package/lib/hooks/useStyleSet.d.ts +2 -0
- package/lib/hooks/useStyleSet.d.ts.map +1 -0
- package/lib/hooks/useStyleSet.js +1 -1
- package/lib/hooks/useWebSpeechPonyfill.d.ts +3 -0
- package/lib/hooks/useWebSpeechPonyfill.d.ts.map +1 -0
- package/lib/hooks/useWebSpeechPonyfill.js +1 -1
- package/lib/index.d.ts +219 -22
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +22 -20
- package/lib/providers/ActivityTree/ActivityTreeComposer.d.ts +5 -0
- package/lib/providers/ActivityTree/ActivityTreeComposer.d.ts.map +1 -0
- package/lib/providers/ActivityTree/ActivityTreeComposer.js +86 -0
- package/lib/providers/ActivityTree/private/Context.d.ts +9 -0
- package/lib/providers/ActivityTree/private/Context.d.ts.map +1 -0
- package/lib/providers/ActivityTree/private/Context.js +13 -0
- package/lib/providers/ActivityTree/private/types.d.ts +10 -0
- package/lib/providers/ActivityTree/private/types.d.ts.map +1 -0
- package/lib/providers/ActivityTree/private/types.js +2 -0
- package/lib/providers/ActivityTree/private/useActivitiesWithRenderer.d.ts +4 -0
- package/lib/providers/ActivityTree/private/useActivitiesWithRenderer.d.ts.map +1 -0
- package/lib/providers/ActivityTree/private/useActivitiesWithRenderer.js +58 -0
- package/lib/providers/ActivityTree/private/useActivityTreeWithRenderer.d.ts +5 -0
- package/lib/providers/ActivityTree/private/useActivityTreeWithRenderer.d.ts.map +1 -0
- package/lib/providers/ActivityTree/private/useActivityTreeWithRenderer.js +166 -0
- package/lib/providers/ActivityTree/private/useContext.d.ts +3 -0
- package/lib/providers/ActivityTree/private/useContext.d.ts.map +1 -0
- package/lib/providers/ActivityTree/private/useContext.js +24 -0
- package/lib/providers/ActivityTree/useActivityTreeWithRenderer.d.ts +8 -0
- package/lib/providers/ActivityTree/useActivityTreeWithRenderer.d.ts.map +1 -0
- package/lib/providers/ActivityTree/useActivityTreeWithRenderer.js +17 -0
- package/lib/providers/LiveRegionTwin/LiveRegionTwinComposer.d.ts +35 -0
- package/lib/providers/LiveRegionTwin/LiveRegionTwinComposer.d.ts.map +1 -0
- package/lib/providers/LiveRegionTwin/LiveRegionTwinComposer.js +156 -0
- package/lib/providers/LiveRegionTwin/private/Context.d.ts +10 -0
- package/lib/providers/LiveRegionTwin/private/Context.d.ts.map +1 -0
- package/lib/providers/LiveRegionTwin/private/Context.js +13 -0
- package/lib/providers/LiveRegionTwin/private/LiveRegionTwinContainer.d.ts +11 -0
- package/lib/providers/LiveRegionTwin/private/LiveRegionTwinContainer.d.ts.map +1 -0
- package/lib/providers/LiveRegionTwin/private/LiveRegionTwinContainer.js +86 -0
- package/lib/providers/LiveRegionTwin/private/types.d.ts +8 -0
- package/lib/providers/LiveRegionTwin/private/types.d.ts.map +1 -0
- package/lib/providers/LiveRegionTwin/private/types.js +2 -0
- package/lib/providers/LiveRegionTwin/private/useContext.d.ts +3 -0
- package/lib/providers/LiveRegionTwin/private/useContext.d.ts.map +1 -0
- package/lib/providers/LiveRegionTwin/private/useContext.js +24 -0
- package/lib/providers/LiveRegionTwin/private/useMarkAllAsRenderedEffect.d.ts +2 -0
- package/lib/providers/LiveRegionTwin/private/useMarkAllAsRenderedEffect.d.ts.map +1 -0
- package/lib/providers/LiveRegionTwin/private/useMarkAllAsRenderedEffect.js +24 -0
- package/lib/providers/LiveRegionTwin/private/useStaticElementEntries.d.ts +3 -0
- package/lib/providers/LiveRegionTwin/private/useStaticElementEntries.d.ts.map +1 -0
- package/lib/providers/LiveRegionTwin/private/useStaticElementEntries.js +15 -0
- package/lib/providers/LiveRegionTwin/useQueueStaticElement.d.ts +8 -0
- package/lib/providers/LiveRegionTwin/useQueueStaticElement.d.ts.map +1 -0
- package/lib/providers/LiveRegionTwin/useQueueStaticElement.js +20 -0
- package/lib/providers/TranscriptFocus/TranscriptFocusComposer.d.ts +7 -0
- package/lib/providers/TranscriptFocus/TranscriptFocusComposer.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/TranscriptFocusComposer.js +184 -0
- package/lib/providers/TranscriptFocus/private/Context.d.ts +12 -0
- package/lib/providers/TranscriptFocus/private/Context.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/private/Context.js +13 -0
- package/lib/providers/TranscriptFocus/private/useContext.d.ts +2 -0
- package/lib/providers/TranscriptFocus/private/useContext.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/private/useContext.js +24 -0
- package/lib/providers/TranscriptFocus/useActiveDescendantId.d.ts +2 -0
- package/lib/providers/TranscriptFocus/useActiveDescendantId.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/useActiveDescendantId.js +15 -0
- package/lib/providers/TranscriptFocus/useFocusByActivityKey.d.ts +8 -0
- package/lib/providers/TranscriptFocus/useFocusByActivityKey.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/useFocusByActivityKey.js +21 -0
- package/lib/providers/TranscriptFocus/useFocusRelativeActivity.d.ts +2 -0
- package/lib/providers/TranscriptFocus/useFocusRelativeActivity.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/useFocusRelativeActivity.js +15 -0
- package/lib/providers/TranscriptFocus/useFocusedActivityKey.d.ts +2 -0
- package/lib/providers/TranscriptFocus/useFocusedActivityKey.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/useFocusedActivityKey.js +15 -0
- package/lib/providers/TranscriptFocus/useFocusedExplicitly.d.ts +2 -0
- package/lib/providers/TranscriptFocus/useFocusedExplicitly.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/useFocusedExplicitly.js +15 -0
- package/lib/providers/TranscriptFocus/useGetDescendantIdByActivityKey.d.ts +2 -0
- package/lib/providers/TranscriptFocus/useGetDescendantIdByActivityKey.d.ts.map +1 -0
- package/lib/providers/TranscriptFocus/useGetDescendantIdByActivityKey.js +15 -0
- package/lib/tsconfig.json +1 -1
- package/lib/types/ScrollPosition.d.ts +6 -0
- package/lib/types/ScrollPosition.d.ts.map +1 -0
- package/lib/types/ScrollPosition.js +2 -0
- package/package.json +33 -40
- package/src/Activity/{Avatar.js → Avatar.tsx} +9 -2
- package/src/Activity/{Bubble.js → Bubble.tsx} +10 -2
- package/src/Activity/CarouselFilmStrip.js +20 -29
- package/src/Activity/CarouselFilmStripAttachment.js +91 -0
- package/src/Activity/{Speak.js → Speak.tsx} +12 -5
- package/src/Activity/{StackedLayout.js → StackedLayout.tsx} +46 -20
- package/src/Attachment/Assets/DownloadIcon.js +8 -1
- package/src/Attachment/{AudioContent.js → AudioContent.tsx} +12 -3
- package/src/Attachment/FileAttachment.js +1 -1
- package/src/Attachment/{FileContent.js → FileContent.tsx} +22 -7
- package/src/Attachment/{HTMLVideoContent.js → HTMLVideoContent.tsx} +10 -2
- package/src/Attachment/{ImageContent.js → ImageContent.tsx} +7 -2
- package/src/Attachment/{TextContent.js → TextContent.tsx} +14 -7
- package/src/Attachment/{VideoContent.js → VideoContent.tsx} +10 -2
- package/src/Attachment/{VimeoContent.js → VimeoContent.tsx} +15 -8
- package/src/Attachment/{YouTubeContent.js → YouTubeContent.tsx} +12 -5
- package/src/{BasicSendBox.js → BasicSendBox.tsx} +9 -5
- package/src/BasicToaster.js +9 -5
- package/src/BasicTranscript.tsx +878 -0
- package/src/{BasicTypingIndicator.js → BasicTypingIndicator.tsx} +4 -3
- package/src/{BasicWebChat.js → BasicWebChat.tsx} +13 -4
- package/src/{Composer.js → Composer.tsx} +82 -71
- package/src/Dictation.js +13 -4
- package/src/{ErrorBox.js → ErrorBox.tsx} +7 -2
- package/src/Middleware/Activity/createCoreMiddleware.tsx +78 -0
- package/src/Middleware/ActivityStatus/SendStatus/{SendStatus.js → SendStatus.tsx} +8 -3
- package/src/Middleware/ActivityStatus/{Timestamp.js → Timestamp.tsx} +8 -2
- package/src/Middleware/ActivityStatus/{createCoreMiddleware.js → createCoreMiddleware.tsx} +3 -1
- package/src/Middleware/ActivityStatus/createSendStatusMiddleware.js +10 -6
- package/src/Middleware/ActivityStatus/createTimestampMiddleware.js +10 -8
- package/src/Middleware/Attachment/createCoreMiddleware.tsx +44 -0
- package/src/Middleware/AttachmentForScreenReader/createCoreMiddleware.tsx +40 -0
- package/src/Middleware/Avatar/{createCoreMiddleware.js → createCoreMiddleware.tsx} +19 -11
- package/src/Middleware/CardAction/createCoreMiddleware.js +51 -42
- package/src/Middleware/GroupActivities/createCoreMiddleware.js +6 -4
- package/src/Middleware/ScrollToEndButton/ScrollToEndButton.js +45 -0
- package/src/Middleware/ScrollToEndButton/createScrollToEndButtonMiddleware.ts +19 -0
- package/src/Middleware/Toast/createCoreMiddleware.tsx +24 -0
- package/src/Middleware/TypingIndicator/{createCoreMiddleware.js → createCoreMiddleware.tsx} +10 -5
- package/src/{ReactWebChat.js → ReactWebChat.tsx} +25 -7
- package/src/ScreenReaderActivity.js +65 -40
- package/src/{ScreenReaderText.js → ScreenReaderText.tsx} +27 -9
- package/src/SendBox/Assets/AttachmentIcon.js +1 -1
- package/src/SendBox/Assets/MicrophoneIcon.js +1 -1
- package/src/SendBox/{AutoResizeTextArea.js → AutoResizeTextArea.tsx} +30 -4
- package/src/SendBox/{DictationInterims.js → DictationInterims.tsx} +6 -2
- package/src/SendBox/{IconButton.js → IconButton.tsx} +19 -3
- package/src/SendBox/{MicrophoneButton.js → MicrophoneButton.tsx} +35 -25
- package/src/SendBox/{SendButton.js → SendButton.tsx} +8 -3
- package/src/SendBox/{SuggestedAction.js → SuggestedAction.tsx} +62 -39
- package/src/SendBox/{SuggestedActions.js → SuggestedActions.tsx} +70 -22
- package/src/SendBox/{TextBox.js → TextBox.tsx} +21 -7
- package/src/SendBox/{UploadButton.js → UploadButton.tsx} +7 -3
- package/src/Styles/StyleSet/BasicTranscript.ts +34 -20
- package/src/Styles/StyleSet/Bubble.ts +0 -1
- package/src/Styles/StyleSet/CarouselFilmStrip.ts +12 -30
- package/src/Styles/StyleSet/CarouselFilmStripAttachment.ts +57 -0
- package/src/Styles/StyleSet/KeyboardHelp.ts +157 -0
- package/src/Styles/StyleSet/ScrollToEndButton.ts +33 -31
- package/src/Styles/StyleSet/SendBoxButton.ts +84 -13
- package/src/Styles/StyleSet/SendBoxTextBox.ts +1 -2
- package/src/Styles/StyleSet/StackedLayout.ts +13 -11
- package/src/Styles/StyleSet/SuggestedAction.ts +130 -43
- package/src/Styles/StyleSet/SuggestedActions.ts +13 -5
- package/src/Styles/createStyleSet.ts +43 -40
- package/src/Styles/mirrorStyle.js +10 -2
- package/src/Toast/CollapseIcon.js +9 -1
- package/src/Toast/DismissIcon.js +9 -1
- package/src/Toast/ExpandIcon.js +9 -1
- package/src/Toast/NotificationIcon.js +4 -1
- package/src/Toast/createToastMiddleware.tsx +15 -0
- package/src/Transcript/ActivityRow.tsx +124 -0
- package/src/Transcript/ActivityTextAlt.tsx +32 -0
- package/src/Transcript/FocusTrap.tsx +64 -0
- package/src/Transcript/KeyboardHelp.tsx +282 -0
- package/src/Transcript/LiveRegionTranscript.tsx +181 -0
- package/src/Transcript/types.ts +1 -0
- package/src/Transcript/useActivityAccessibleName.ts +85 -0
- package/src/Utils/{AccessibleButton.js → AccessibleButton.tsx} +19 -4
- package/src/Utils/{AccessibleInputText.js → AccessibleInputText.tsx} +48 -5
- package/src/Utils/{AccessibleTextArea.js → AccessibleTextArea.tsx} +67 -6
- package/src/Utils/{FocusRedirector.js → FocusRedirector.tsx} +21 -8
- package/src/Utils/InlineMarkdown.js +18 -2
- package/src/Utils/TypeFocusSink/FocusBox.js +4 -4
- package/src/Utils/TypeFocusSink/getTabIndex.ts +1 -1
- package/src/Utils/TypeFocusSink/inputtableKey.ts +5 -1
- package/src/Utils/activityAltText.ts +135 -0
- package/src/Utils/createCustomEvent.js +7 -1
- package/src/Utils/detectBrowser.js +2 -1
- package/src/Utils/findAncestor.ts +12 -0
- package/src/Utils/getActivityUniqueId.ts +5 -0
- package/src/Utils/intersectionOf.spec.js +2 -0
- package/src/Utils/intersectionOf.ts +14 -0
- package/src/Utils/isZeroOrPositive.ts +7 -0
- package/src/Utils/mapMap.js +7 -1
- package/src/Utils/mapMap.spec.js +2 -0
- package/src/Utils/removeInline.spec.js +2 -0
- package/src/Utils/scrollIntoViewWithBlockNearest.ts +20 -0
- package/src/Utils/shallowEquals.js +8 -1
- package/src/Utils/{singleToArray.js → singleToArray.ts} +1 -1
- package/src/Utils/supportPseudoClass.ts +17 -0
- package/src/Utils/{tabbableElements.js → tabbableElements.ts} +6 -5
- package/src/Utils/walkMarkdownTokens.spec.js +3 -3
- package/src/connectToWebChat.js +11 -4
- package/src/hooks/{index.js → index.ts} +1 -0
- package/src/hooks/internal/BypassSpeechSynthesisPonyfill.js +70 -17
- package/src/hooks/internal/useChanged.ts +17 -0
- package/src/hooks/internal/useDispatchScrollPosition.js +1 -3
- package/src/hooks/internal/useDispatchTranscriptFocusByActivityKey.ts +5 -0
- package/src/hooks/internal/useFocusVisible.ts +22 -0
- package/src/hooks/internal/useMemoWithPrevious.ts +16 -0
- package/src/hooks/internal/useMemoize.spec.js +3 -1
- package/src/hooks/internal/useMemoize.ts +53 -0
- package/src/hooks/internal/useObserveFocusVisible.ts +252 -0
- package/src/hooks/internal/usePrevious.ts +12 -0
- package/src/hooks/internal/useResumeAudioContext.ts +7 -0
- package/src/hooks/internal/useScrollRelative.js +4 -3
- package/src/hooks/internal/useStateRef.ts +31 -0
- package/src/hooks/internal/{useUniqueId.js → useUniqueId.ts} +1 -1
- package/src/hooks/internal/useValueRef.ts +22 -0
- package/src/hooks/{useDictateAbortable.js → useDictateAbortable.ts} +1 -1
- package/src/hooks/{useFocus.js → useFocus.ts} +1 -1
- package/src/hooks/{useFocusSendBox.js → useFocusSendBox.ts} +2 -1
- package/src/hooks/{useObserveScrollPosition.js → useObserveScrollPosition.ts} +6 -1
- package/src/hooks/{useObserveTranscriptFocus.js → useObserveTranscriptFocus.ts} +6 -1
- package/src/hooks/useRenderMarkdownAsHTML.ts +23 -0
- package/src/hooks/{useScrollDown.js → useScrollDown.ts} +1 -1
- package/src/hooks/useScrollTo.ts +16 -0
- package/src/hooks/useScrollToEnd.ts +12 -0
- package/src/hooks/{useScrollUp.js → useScrollUp.ts} +1 -1
- package/src/hooks/{useSendFiles.js → useSendFiles.ts} +3 -2
- package/src/hooks/{useStyleSet.js → useStyleSet.ts} +1 -1
- package/src/hooks/useWebSpeechPonyfill.ts +7 -0
- package/src/index.ts +7 -12
- package/src/providers/ActivityTree/ActivityTreeComposer.tsx +74 -0
- package/src/providers/ActivityTree/private/Context.ts +12 -0
- package/src/providers/ActivityTree/private/types.ts +12 -0
- package/src/providers/ActivityTree/private/useActivitiesWithRenderer.ts +66 -0
- package/src/providers/ActivityTree/private/useActivityTreeWithRenderer.ts +140 -0
- package/src/providers/ActivityTree/private/useContext.ts +15 -0
- package/src/providers/ActivityTree/useActivityTreeWithRenderer.ts +16 -0
- package/src/providers/LiveRegionTwin/LiveRegionTwinComposer.tsx +154 -0
- package/src/providers/LiveRegionTwin/private/Context.ts +15 -0
- package/src/providers/LiveRegionTwin/private/LiveRegionTwinContainer.tsx +64 -0
- package/src/providers/LiveRegionTwin/private/types.ts +10 -0
- package/src/providers/LiveRegionTwin/private/useContext.ts +15 -0
- package/src/providers/LiveRegionTwin/private/useMarkAllAsRenderedEffect.ts +13 -0
- package/src/providers/LiveRegionTwin/private/useStaticElementEntries.ts +7 -0
- package/src/providers/LiveRegionTwin/useQueueStaticElement.ts +12 -0
- package/src/providers/TranscriptFocus/TranscriptFocusComposer.tsx +180 -0
- package/src/providers/TranscriptFocus/private/Context.ts +16 -0
- package/src/providers/TranscriptFocus/private/useContext.ts +13 -0
- package/src/providers/TranscriptFocus/useActiveDescendantId.ts +5 -0
- package/src/providers/TranscriptFocus/useFocusByActivityKey.ts +14 -0
- package/src/providers/TranscriptFocus/useFocusRelativeActivity.ts +5 -0
- package/src/providers/TranscriptFocus/useFocusedActivityKey.ts +5 -0
- package/src/providers/TranscriptFocus/useFocusedExplicitly.ts +5 -0
- package/src/providers/TranscriptFocus/useGetDescendantIdByActivityKey.ts +5 -0
- package/src/tsconfig.json +1 -1
- package/src/types/ScrollPosition.ts +6 -0
- package/.eslintignore +0 -9
- package/lib/Activity/ScrollToEndButton.js +0 -81
- package/lib/Attachment/Assets/ErrorIcon.js +0 -22
- package/lib/Utils/findLastIndex.js +0 -32
- package/lib/Utils/remarkStripMarkdown.js +0 -26
- package/lib/hooks/internal/useAcknowledgedActivity.js +0 -90
- package/lib/hooks/internal/useDispatchTranscriptFocus.js +0 -19
- package/lib/hooks/internal/useStripMarkdown.js +0 -19
- package/src/Activity/ScrollToEndButton.js +0 -58
- package/src/Attachment/Assets/ErrorIcon.js +0 -9
- package/src/BasicTranscript.js +0 -1123
- package/src/Middleware/Activity/createCoreMiddleware.js +0 -71
- package/src/Middleware/Attachment/createCoreMiddleware.js +0 -43
- package/src/Middleware/AttachmentForScreenReader/createCoreMiddleware.js +0 -37
- package/src/Middleware/Toast/createCoreMiddleware.js +0 -20
- package/src/Toast/createToastMiddleware.js +0 -11
- package/src/Utils/findLastIndex.js +0 -11
- package/src/Utils/findLastIndex.spec.js +0 -29
- package/src/Utils/getActivityUniqueId.js +0 -3
- package/src/Utils/intersectionOf.js +0 -11
- package/src/Utils/isZeroOrPositive.js +0 -4
- package/src/Utils/remarkStripMarkdown.js +0 -13
- package/src/hooks/internal/useAcknowledgedActivity.js +0 -65
- package/src/hooks/internal/useChanged.js +0 -10
- package/src/hooks/internal/useDispatchTranscriptFocus.js +0 -7
- package/src/hooks/internal/useMemoize.js +0 -37
- package/src/hooks/internal/useStripMarkdown.js +0 -7
- package/src/hooks/useRenderMarkdownAsHTML.js +0 -20
- package/src/hooks/useScrollTo.js +0 -11
- package/src/hooks/useScrollToEnd.js +0 -11
- package/src/hooks/useWebSpeechPonyfill.js +0 -5
- package/src/index.tsx +0 -35
|
@@ -26,9 +26,12 @@ export default function createBasicTranscriptStyleSet({
|
|
|
26
26
|
borderStyle: transcriptActivityVisualKeyboardIndicatorStyle,
|
|
27
27
|
borderWidth: transcriptActivityVisualKeyboardIndicatorWidth,
|
|
28
28
|
boxSizing: 'border-box',
|
|
29
|
-
height: `calc(100% - ${paddingRegular}px)`,
|
|
29
|
+
height: `calc(100% - ${paddingRegular / 2}px)`,
|
|
30
30
|
left: 0,
|
|
31
|
-
|
|
31
|
+
marginBottom: 0,
|
|
32
|
+
marginLeft: paddingRegular / 2,
|
|
33
|
+
marginRight: paddingRegular / 2,
|
|
34
|
+
marginTop: 0,
|
|
32
35
|
pointerEvents: 'none',
|
|
33
36
|
position: 'absolute',
|
|
34
37
|
top: 0,
|
|
@@ -36,40 +39,51 @@ export default function createBasicTranscriptStyleSet({
|
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
|
|
39
|
-
'&:focus .webchat__basic-transcript__focus-indicator, .webchat__basic-transcript__terminator:focus + .webchat__basic-transcript__focus-indicator':
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
'&:focus .webchat__basic-transcript__focus-indicator, .webchat__basic-transcript__terminator:focus + .webchat__basic-transcript__focus-indicator':
|
|
43
|
+
{
|
|
44
|
+
height: '100%',
|
|
45
|
+
borderColor: transcriptVisualKeyboardIndicatorColor,
|
|
46
|
+
borderStyle: transcriptVisualKeyboardIndicatorStyle,
|
|
47
|
+
borderWidth: transcriptVisualKeyboardIndicatorWidth,
|
|
48
|
+
boxSizing: 'border-box',
|
|
49
|
+
pointerEvents: 'none',
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
top: 0,
|
|
52
|
+
width: '100%'
|
|
53
|
+
},
|
|
50
54
|
|
|
51
55
|
'& .webchat__basic-transcript__activity': {
|
|
52
|
-
paddingTop: paddingRegular,
|
|
56
|
+
paddingTop: paddingRegular / 2,
|
|
53
57
|
position: 'relative',
|
|
54
58
|
|
|
59
|
+
'&:first-child': {
|
|
60
|
+
marginTop: paddingRegular / 2
|
|
61
|
+
},
|
|
62
|
+
|
|
55
63
|
'&:not(:first-child)': {
|
|
56
|
-
marginTop: -paddingRegular
|
|
64
|
+
marginTop: -paddingRegular / 2
|
|
57
65
|
}
|
|
58
66
|
},
|
|
59
67
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
'& .webchat__basic-transcript__activity-sentinel': {
|
|
68
|
+
// When the activity is focused as active descendant, `scrollIntoView()` will scroll this invisible <div> into view.
|
|
69
|
+
'& .webchat__basic-transcript__activity-active-descendant': {
|
|
65
70
|
height: '100%',
|
|
66
71
|
left: 0,
|
|
72
|
+
marginTop: -paddingRegular / 2,
|
|
73
|
+
paddingBottom: paddingRegular / 2,
|
|
74
|
+
// The bounding box is expanded to both top and bottom to scroll focus indicator into view.
|
|
75
|
+
// We should ignore clicks to make sure this expansion don't register click as focus.
|
|
76
|
+
// Otherwise, when clicking on the very bottom edge of the activity, it will focus on next activity instead.
|
|
67
77
|
pointerEvents: 'none',
|
|
68
78
|
position: 'absolute',
|
|
69
79
|
top: 0,
|
|
70
80
|
width: '100%'
|
|
71
81
|
},
|
|
72
82
|
|
|
83
|
+
'& .webchat__basic-transcript__activity-body:not(:empty)': {
|
|
84
|
+
paddingBottom: paddingRegular
|
|
85
|
+
},
|
|
86
|
+
|
|
73
87
|
'& .webchat__basic-transcript__terminator': {
|
|
74
88
|
bottom: 0,
|
|
75
89
|
height: 0,
|
|
@@ -6,7 +6,6 @@ import mirrorStyle from '../mirrorStyle';
|
|
|
6
6
|
export default function CarouselFilmStrip({
|
|
7
7
|
avatarSize,
|
|
8
8
|
bubbleMaxWidth,
|
|
9
|
-
bubbleMinWidth,
|
|
10
9
|
paddingRegular,
|
|
11
10
|
transitionDuration
|
|
12
11
|
}: StrictStyleOptions) {
|
|
@@ -18,24 +17,18 @@ export default function CarouselFilmStrip({
|
|
|
18
17
|
marginBottom: -17
|
|
19
18
|
},
|
|
20
19
|
|
|
21
|
-
'& .webchat__carousel-filmstrip__attachment': {
|
|
22
|
-
minWidth: bubbleMinWidth,
|
|
23
|
-
maxWidth: bubbleMaxWidth,
|
|
24
|
-
transitionDuration,
|
|
25
|
-
transitionProperty: 'max-width, min-width'
|
|
26
|
-
},
|
|
27
|
-
|
|
28
20
|
'& .webchat__carousel-filmstrip__message': {
|
|
29
21
|
maxWidth: bubbleMaxWidth,
|
|
30
22
|
transitionDuration,
|
|
31
23
|
transitionProperty: 'max-width'
|
|
32
24
|
},
|
|
33
25
|
|
|
34
|
-
'&.webchat__carousel-filmstrip--hide-nub, &.webchat__carousel-filmstrip--show-nub, &.webchat__carousel-filmstrip--hide-avatar, &.webchat__carousel-filmstrip--show-avatar':
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
'&.webchat__carousel-filmstrip--hide-nub, &.webchat__carousel-filmstrip--show-nub, &.webchat__carousel-filmstrip--hide-avatar, &.webchat__carousel-filmstrip--show-avatar':
|
|
27
|
+
{
|
|
28
|
+
'& .webchat__carousel-filmstrip__message': {
|
|
29
|
+
maxWidth: bubbleMaxWidth + paddingRegular
|
|
30
|
+
}
|
|
31
|
+
},
|
|
39
32
|
|
|
40
33
|
'& .webchat__carousel-filmstrip__alignment-pad': {
|
|
41
34
|
transitionDuration,
|
|
@@ -69,11 +62,12 @@ export default function CarouselFilmStrip({
|
|
|
69
62
|
}
|
|
70
63
|
},
|
|
71
64
|
|
|
72
|
-
'&.webchat__carousel-filmstrip--hide-avatar, &.webchat__carousel-filmstrip--show-avatar, &.webchat__carousel-filmstrip--hide-nub, &.webchat__carousel-filmstrip--show-nub':
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
65
|
+
'&.webchat__carousel-filmstrip--hide-avatar, &.webchat__carousel-filmstrip--show-avatar, &.webchat__carousel-filmstrip--hide-nub, &.webchat__carousel-filmstrip--show-nub':
|
|
66
|
+
{
|
|
67
|
+
'& .webchat__carousel-filmstrip__nub-pad': {
|
|
68
|
+
width: paddingRegular
|
|
69
|
+
}
|
|
70
|
+
},
|
|
77
71
|
|
|
78
72
|
'&:not(.webchat__carousel-filmstrip--top-callout) .webchat__carousel-filmstrip__avatar-gutter': {
|
|
79
73
|
justifyContent: 'flex-end'
|
|
@@ -88,17 +82,9 @@ export default function CarouselFilmStrip({
|
|
|
88
82
|
marginLeft: -paddingRegular
|
|
89
83
|
},
|
|
90
84
|
|
|
91
|
-
'& .webchat__carousel-filmstrip__attachment': {
|
|
92
|
-
paddingLeft: paddingRegular
|
|
93
|
-
},
|
|
94
|
-
|
|
95
85
|
'&.webchat__carousel-filmstrip--hide-avatar, &.webchat__carousel-filmstrip--show-avatar': {
|
|
96
86
|
'& .webchat__carousel-filmstrip__attachments': {
|
|
97
87
|
marginLeft: -(avatarSize + paddingRegular * 2)
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
'& .webchat__carousel-filmstrip__attachment:first-child': {
|
|
101
|
-
paddingLeft: avatarSize + paddingRegular * 2
|
|
102
88
|
}
|
|
103
89
|
},
|
|
104
90
|
|
|
@@ -106,10 +92,6 @@ export default function CarouselFilmStrip({
|
|
|
106
92
|
'&:not(.webchat__carousel-filmstrip--hide-avatar.webchat__carousel-filmstrip--show-avatar)': {
|
|
107
93
|
'& .webchat__carousel-filmstrip__attachments': {
|
|
108
94
|
marginLeft: -paddingRegular * 2
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
'& .webchat__carousel-filmstrip__attachment:first-child': {
|
|
112
|
-
paddingLeft: paddingRegular * 2
|
|
113
95
|
}
|
|
114
96
|
}
|
|
115
97
|
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* eslint no-magic-numbers: ["error", { "ignore": [2] }] */
|
|
2
|
+
import { StrictStyleOptions } from 'botframework-webchat-api';
|
|
3
|
+
|
|
4
|
+
import mirrorStyle from '../mirrorStyle';
|
|
5
|
+
|
|
6
|
+
export default function CarouselFilmStripAttachment({
|
|
7
|
+
avatarSize,
|
|
8
|
+
bubbleMaxWidth,
|
|
9
|
+
bubbleMinWidth,
|
|
10
|
+
paddingRegular,
|
|
11
|
+
transcriptVisualKeyboardIndicatorColor,
|
|
12
|
+
transcriptVisualKeyboardIndicatorStyle,
|
|
13
|
+
transcriptVisualKeyboardIndicatorWidth,
|
|
14
|
+
transitionDuration
|
|
15
|
+
}: StrictStyleOptions) {
|
|
16
|
+
return {
|
|
17
|
+
'&.webchat__carousel-filmstrip-attachment': {
|
|
18
|
+
minWidth: bubbleMinWidth,
|
|
19
|
+
maxWidth: bubbleMaxWidth,
|
|
20
|
+
transitionDuration,
|
|
21
|
+
transitionProperty: 'max-width, min-width',
|
|
22
|
+
|
|
23
|
+
'&:focus': {
|
|
24
|
+
outline: 0
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
'&:focus .webchat__carousel-filmstrip-attachment--focus': {
|
|
28
|
+
borderColor: transcriptVisualKeyboardIndicatorColor,
|
|
29
|
+
borderStyle: transcriptVisualKeyboardIndicatorStyle,
|
|
30
|
+
borderWidth: transcriptVisualKeyboardIndicatorWidth,
|
|
31
|
+
boxSizing: 'border-box',
|
|
32
|
+
height: `calc(100% - ${transcriptVisualKeyboardIndicatorWidth}px)`,
|
|
33
|
+
left: 0,
|
|
34
|
+
pointerEvents: 'none',
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
top: 0,
|
|
37
|
+
width: `calc(100% - ${transcriptVisualKeyboardIndicatorWidth}px)`
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
...mirrorStyle('&.webchat__carousel-filmstrip-attachment--rtl', {
|
|
41
|
+
paddingLeft: paddingRegular,
|
|
42
|
+
|
|
43
|
+
'&.webchat__carousel-filmstrip-attachment--hide-avatar, &.webchat__carousel-filmstrip-attachment--show-avatar': {
|
|
44
|
+
'&:first-child': {
|
|
45
|
+
paddingLeft: avatarSize + paddingRegular * 2
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
'&.webchat__carousel-filmstrip-attachment--hide-nub, &.webchat__carousel-filmstrip-attachment--show-nub': {
|
|
50
|
+
'&:not(.webchat__carousel-filmstrip-attachment--hide-avatar.webchat__carousel-filmstrip-attachment--show-avatar):first-child':
|
|
51
|
+
{
|
|
52
|
+
paddingLeft: paddingRegular * 2
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// Numbers are commonly used in CSS.
|
|
2
|
+
/* eslint-disable no-magic-numbers */
|
|
3
|
+
|
|
4
|
+
import { StrictStyleOptions } from 'botframework-webchat-api';
|
|
5
|
+
|
|
6
|
+
export default function createKeyboardHelpStyleSet({ paddingRegular, primaryFont }: StrictStyleOptions) {
|
|
7
|
+
return {
|
|
8
|
+
'&.webchat__keyboard-help': {
|
|
9
|
+
fontFamily: primaryFont,
|
|
10
|
+
fontSize: 14,
|
|
11
|
+
height: '100%',
|
|
12
|
+
margin: paddingRegular,
|
|
13
|
+
outline: 0,
|
|
14
|
+
|
|
15
|
+
'&:not(.webchat__keyboard-help--shown)': {
|
|
16
|
+
height: 0,
|
|
17
|
+
margin: 0,
|
|
18
|
+
overflow: 'hidden',
|
|
19
|
+
pointerEvents: 'none',
|
|
20
|
+
width: 0
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
'& .webchat__keyboard-help__box': {
|
|
24
|
+
// From Power BI:
|
|
25
|
+
// boxShadow: '0 6.4px 14.4px rgb(0 0 0 / 13%), 0 1.2px 3.6px rgb(0 0 0 / 11%)',
|
|
26
|
+
// From Fluent (depth-16 for teaching callouts):
|
|
27
|
+
borderRadius: 2,
|
|
28
|
+
boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.14), 0px 0px 2px rgba(0, 0, 0, 0.12)',
|
|
29
|
+
boxSizing: 'border-box',
|
|
30
|
+
height: '100%',
|
|
31
|
+
padding: paddingRegular * 2,
|
|
32
|
+
position: 'relative',
|
|
33
|
+
|
|
34
|
+
'@media (forced-colors: active)': {
|
|
35
|
+
boxShadow: 'none',
|
|
36
|
+
outlineColor: 'white',
|
|
37
|
+
outlineStyle: 'solid',
|
|
38
|
+
outlineWidth: 4
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
'@media (forced-colors: none) and (prefers-color-scheme: dark)': {
|
|
42
|
+
boxShadow: '0px 8px 16px rgba(0, 0, 0, 0.28), 0px 0px 2px rgba(0, 0, 0, 0.24)'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
'& .webchat__keyboard-help__close-button': {
|
|
47
|
+
appearance: 'none',
|
|
48
|
+
backgroundColor: 'transparent',
|
|
49
|
+
borderColor: 'black',
|
|
50
|
+
borderRadius: 4,
|
|
51
|
+
borderStyle: 'solid',
|
|
52
|
+
borderWidth: 2,
|
|
53
|
+
color: '#999',
|
|
54
|
+
height: 34,
|
|
55
|
+
padding: 0,
|
|
56
|
+
position: 'absolute',
|
|
57
|
+
right: paddingRegular,
|
|
58
|
+
top: paddingRegular,
|
|
59
|
+
width: 34,
|
|
60
|
+
|
|
61
|
+
'@media (forced-colors: none) and (prefers-color-scheme: light)': {
|
|
62
|
+
'&:active': {
|
|
63
|
+
backgroundColor: '#EDEBE9' // neutralLight (gray30)
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
'&:not(:active):hover': {
|
|
67
|
+
backgroundColor: '#F3F2F1' // neutralLighter (gray20)
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
'@media (forced-colors: none) and (prefers-color-scheme: dark)': {
|
|
72
|
+
borderColor: 'white',
|
|
73
|
+
|
|
74
|
+
'&:active': {
|
|
75
|
+
backgroundColor: '#292827' // neutralLight (gray30)
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
'&:not(:active):hover': {
|
|
79
|
+
backgroundColor: '#252423' // neutralLight (gray30)
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
'& .webchat__keyboard-help__close-button_image': {
|
|
85
|
+
fill: '#323130', // neutralPrimary (gray160)
|
|
86
|
+
height: 10,
|
|
87
|
+
width: 10,
|
|
88
|
+
|
|
89
|
+
'@media (forced-colors: active)': {
|
|
90
|
+
fill: 'White'
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
'@media (forced-colors: none) and (prefers-color-scheme: dark)': {
|
|
94
|
+
fill: '#F3F2F1' // neutralPrimary (gray160)
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
'& .webchat__keyboard-help__header, & .webchat__keyboard-help__sub-header': {
|
|
99
|
+
marginBottom: paddingRegular / 2,
|
|
100
|
+
marginTop: 0
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
'& .webchat__keyboard-help__section': {
|
|
104
|
+
marginBottom: paddingRegular
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
'& .webchat__keyboard-help__two-panes': {
|
|
108
|
+
alignItems: 'flex-start',
|
|
109
|
+
display: 'flex'
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
'& .webchat__keyboard-help__image': {
|
|
113
|
+
flexShrink: 10000,
|
|
114
|
+
paddingRight: paddingRegular
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
'& .webchat__keyboard-help__image--dark, & .webchat__keyboard-help__image--high-contrast': {
|
|
118
|
+
display: 'none'
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
'@media (forced-colors: active)': {
|
|
122
|
+
'& .webchat__keyboard-help__image--dark, & .webchat__keyboard-help__image--light': {
|
|
123
|
+
display: 'none'
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
'& .webchat__keyboard-help__image--high-contrast': {
|
|
127
|
+
display: 'unset'
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
'@media (forced-colors: none) and (prefers-color-scheme: dark)': {
|
|
132
|
+
backgroundColor: 'black',
|
|
133
|
+
color: '#F3F2F1',
|
|
134
|
+
|
|
135
|
+
'& .webchat__keyboard-help__image--light': {
|
|
136
|
+
display: 'none'
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
'& .webchat__keyboard-help__image--dark': {
|
|
140
|
+
display: 'unset'
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
'& .webchat__keyboard-help__notes': {
|
|
145
|
+
marginBottom: paddingRegular
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
'& .webchat__keyboard-help__notes-header': {
|
|
149
|
+
margin: 0
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
'& .webchat__keyboard-help__notes-text': {
|
|
153
|
+
margin: 0
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { StrictStyleOptions } from 'botframework-webchat-api';
|
|
2
2
|
|
|
3
3
|
export default function createScrollToEndButtonStyle({
|
|
4
|
-
newMessagesButtonFontSize,
|
|
5
4
|
paddingRegular,
|
|
6
5
|
primaryFont,
|
|
6
|
+
scrollToEndButtonFontSize,
|
|
7
7
|
transcriptOverlayButtonBackground,
|
|
8
8
|
transcriptOverlayButtonBackgroundOnFocus,
|
|
9
9
|
transcriptOverlayButtonBackgroundOnHover,
|
|
@@ -12,41 +12,43 @@ export default function createScrollToEndButtonStyle({
|
|
|
12
12
|
transcriptOverlayButtonColorOnHover
|
|
13
13
|
}: StrictStyleOptions) {
|
|
14
14
|
return {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
'&.webchat__scroll-to-end-button': {
|
|
16
|
+
// TODO: [P3] Can we not to unset borderWidth and outline earlier?
|
|
17
|
+
'@media screen and (forced-colors: active)': {
|
|
18
|
+
borderWidth: 'initial',
|
|
19
|
+
outline: 'initial'
|
|
20
|
+
},
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
appearance: 'none',
|
|
23
|
+
backgroundColor: transcriptOverlayButtonBackground,
|
|
24
|
+
borderRadius: paddingRegular,
|
|
25
|
+
borderWidth: 0,
|
|
26
|
+
bottom: 5,
|
|
27
|
+
color: transcriptOverlayButtonColor,
|
|
28
|
+
fontFamily: primaryFont,
|
|
29
|
+
fontSize: scrollToEndButtonFontSize,
|
|
30
|
+
outline: 0,
|
|
31
|
+
padding: paddingRegular,
|
|
32
|
+
position: 'absolute',
|
|
33
|
+
zIndex: 1, // We formed a stacking context in the parent container, so we can use "z-index" here.
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
'&:hover': {
|
|
36
|
+
backgroundColor: transcriptOverlayButtonBackgroundOnHover,
|
|
37
|
+
color: transcriptOverlayButtonColorOnHover || transcriptOverlayButtonColor
|
|
38
|
+
},
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
'&:focus': {
|
|
41
|
+
backgroundColor: transcriptOverlayButtonBackgroundOnFocus,
|
|
42
|
+
color: transcriptOverlayButtonColorOnFocus || transcriptOverlayButtonColor
|
|
43
|
+
},
|
|
43
44
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
'&:not(.webchat__scroll-to-end-button--rtl)': {
|
|
46
|
+
right: 20
|
|
47
|
+
},
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
'&.webchat__scroll-to-end-button--rtl': {
|
|
50
|
+
left: 20
|
|
51
|
+
}
|
|
50
52
|
}
|
|
51
53
|
};
|
|
52
54
|
}
|
|
@@ -2,47 +2,118 @@ import { StrictStyleOptions } from 'botframework-webchat-api';
|
|
|
2
2
|
|
|
3
3
|
export default function createSendBoxButtonStyle({
|
|
4
4
|
sendBoxButtonColor,
|
|
5
|
+
sendBoxButtonColorOnActive,
|
|
5
6
|
sendBoxButtonColorOnDisabled,
|
|
6
7
|
sendBoxButtonColorOnFocus,
|
|
7
8
|
sendBoxButtonColorOnHover,
|
|
9
|
+
sendBoxButtonKeyboardFocusIndicatorBorderColor,
|
|
10
|
+
sendBoxButtonKeyboardFocusIndicatorBorderRadius,
|
|
11
|
+
sendBoxButtonKeyboardFocusIndicatorBorderStyle,
|
|
12
|
+
sendBoxButtonKeyboardFocusIndicatorBorderWidth,
|
|
13
|
+
sendBoxButtonKeyboardFocusIndicatorInset,
|
|
14
|
+
sendBoxButtonShadeBorderRadius,
|
|
15
|
+
sendBoxButtonShadeColor,
|
|
16
|
+
sendBoxButtonShadeColorOnActive,
|
|
17
|
+
sendBoxButtonShadeColorOnDisabled,
|
|
18
|
+
sendBoxButtonShadeColorOnFocus,
|
|
19
|
+
sendBoxButtonShadeColorOnHover,
|
|
20
|
+
sendBoxButtonShadeInset,
|
|
8
21
|
sendBoxHeight,
|
|
9
22
|
subtle
|
|
10
23
|
}: StrictStyleOptions) {
|
|
11
24
|
return {
|
|
12
25
|
'&.webchat__icon-button': {
|
|
13
26
|
alignItems: 'center',
|
|
27
|
+
appearance: 'none',
|
|
14
28
|
backgroundColor: 'Transparent',
|
|
15
29
|
border: 0,
|
|
16
30
|
display: 'flex',
|
|
31
|
+
fill: sendBoxButtonColor || subtle,
|
|
17
32
|
justifyContent: 'center',
|
|
18
33
|
outline: 0,
|
|
19
34
|
padding: 0,
|
|
20
|
-
|
|
21
|
-
// We use the sendBoxHeight, so the button looks square
|
|
22
|
-
width: sendBoxHeight,
|
|
35
|
+
position: 'relative',
|
|
36
|
+
width: sendBoxHeight, // We use the sendBoxHeight, so the button looks square
|
|
23
37
|
|
|
24
38
|
'&:not(.webchat__icon-button--stretch)': {
|
|
25
39
|
height: sendBoxHeight
|
|
26
40
|
},
|
|
27
41
|
|
|
42
|
+
// Order of style preferences (based on effort of user gesture): disabled > active > hover > focus.
|
|
43
|
+
// Keyboard focus indicator styles applied by :focus-visible do not conflict with :active/:hover/:focus, so it is not included here.
|
|
44
|
+
'&:disabled, &[aria-disabled="true"]': {
|
|
45
|
+
fill: sendBoxButtonColorOnDisabled,
|
|
46
|
+
|
|
47
|
+
'& .webchat__icon-button__shade': {
|
|
48
|
+
backgroundColor: sendBoxButtonShadeColorOnDisabled
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
|
|
28
52
|
'&:not(:disabled):not([aria-disabled="true"])': {
|
|
29
|
-
'&:
|
|
30
|
-
fill:
|
|
53
|
+
'&:active': {
|
|
54
|
+
fill: sendBoxButtonColorOnActive,
|
|
55
|
+
|
|
56
|
+
'& .webchat__icon-button__shade': {
|
|
57
|
+
backgroundColor: sendBoxButtonShadeColorOnActive
|
|
58
|
+
}
|
|
31
59
|
},
|
|
32
60
|
|
|
33
|
-
'&:
|
|
34
|
-
|
|
61
|
+
'&:not(:active)': {
|
|
62
|
+
'&:hover': {
|
|
63
|
+
fill: sendBoxButtonColorOnHover,
|
|
64
|
+
|
|
65
|
+
'& .webchat__icon-button__shade': {
|
|
66
|
+
backgroundColor: sendBoxButtonShadeColorOnHover
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
'&:not(:hover)': {
|
|
71
|
+
'&:focus': {
|
|
72
|
+
fill: sendBoxButtonColorOnFocus,
|
|
73
|
+
|
|
74
|
+
'& .webchat__icon-button__shade': {
|
|
75
|
+
backgroundColor: sendBoxButtonShadeColorOnFocus
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
35
79
|
}
|
|
36
80
|
},
|
|
37
81
|
|
|
38
|
-
|
|
39
|
-
|
|
82
|
+
// On unsupported browser, :focus-visible and :not(:focus-visible) is always false.
|
|
83
|
+
// And it will turn the whole CSS selector ":unsupported, .truthy" to false.
|
|
84
|
+
'&:not(:focus-visible) .webchat__icon-button__keyboard-focus-indicator': {
|
|
85
|
+
display: 'none'
|
|
40
86
|
},
|
|
41
87
|
|
|
42
|
-
'&:
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
88
|
+
'&:not(.webchat__icon-button--focus-visible) .webchat__icon-button__keyboard-focus-indicator': {
|
|
89
|
+
display: 'none'
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
// Make sure all contents are in the same stacking context.
|
|
93
|
+
'& > *': {
|
|
94
|
+
position: 'relative'
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
'& .webchat__icon-button__shade': {
|
|
98
|
+
backgroundColor: sendBoxButtonShadeColor,
|
|
99
|
+
borderRadius: sendBoxButtonShadeBorderRadius,
|
|
100
|
+
bottom: sendBoxButtonShadeInset,
|
|
101
|
+
left: sendBoxButtonShadeInset,
|
|
102
|
+
position: 'absolute',
|
|
103
|
+
right: sendBoxButtonShadeInset,
|
|
104
|
+
top: sendBoxButtonShadeInset
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
'& .webchat__icon-button__keyboard-focus-indicator': {
|
|
108
|
+
borderColor: sendBoxButtonKeyboardFocusIndicatorBorderColor,
|
|
109
|
+
borderRadius: sendBoxButtonKeyboardFocusIndicatorBorderRadius,
|
|
110
|
+
borderStyle: sendBoxButtonKeyboardFocusIndicatorBorderStyle,
|
|
111
|
+
borderWidth: sendBoxButtonKeyboardFocusIndicatorBorderWidth,
|
|
112
|
+
bottom: sendBoxButtonKeyboardFocusIndicatorInset,
|
|
113
|
+
left: sendBoxButtonKeyboardFocusIndicatorInset,
|
|
114
|
+
position: 'absolute',
|
|
115
|
+
right: sendBoxButtonKeyboardFocusIndicatorInset,
|
|
116
|
+
top: sendBoxButtonKeyboardFocusIndicatorInset
|
|
46
117
|
}
|
|
47
118
|
}
|
|
48
119
|
};
|
|
@@ -3,7 +3,6 @@ import { StrictStyleOptions } from 'botframework-webchat-api';
|
|
|
3
3
|
export default function createSendBoxTextBoxStyle({
|
|
4
4
|
paddingRegular,
|
|
5
5
|
primaryFont,
|
|
6
|
-
sendBoxBackground,
|
|
7
6
|
sendBoxDisabledTextColor,
|
|
8
7
|
sendBoxMaxHeight,
|
|
9
8
|
sendBoxPlaceholderColor,
|
|
@@ -27,7 +26,7 @@ export default function createSendBoxTextBoxStyle({
|
|
|
27
26
|
},
|
|
28
27
|
|
|
29
28
|
'& .webchat__send-box-text-box__input, & .webchat__send-box-text-box__html-text-area': {
|
|
30
|
-
backgroundColor: sendBoxBackground
|
|
29
|
+
backgroundColor: 'transparent', // We set this to transparent because we already applied "sendBoxBackground" to a parent container.
|
|
31
30
|
|
|
32
31
|
'&:not(:disabled):not([aria-disabled="true"])': {
|
|
33
32
|
color: sendBoxTextColor
|
|
@@ -42,9 +42,10 @@ export default function createStackedLayoutStyle({
|
|
|
42
42
|
width: '100%'
|
|
43
43
|
},
|
|
44
44
|
|
|
45
|
-
'&.webchat__stacked-layout--no-message .webchat__stacked-layout__attachment-row.webchat__stacked-layout__attachment-row--first':
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
'&.webchat__stacked-layout--no-message .webchat__stacked-layout__attachment-row.webchat__stacked-layout__attachment-row--first':
|
|
46
|
+
{
|
|
47
|
+
marginTop: 0
|
|
48
|
+
},
|
|
48
49
|
|
|
49
50
|
'& .webchat__stacked-layout__message': {
|
|
50
51
|
maxWidth: bubbleMaxWidth,
|
|
@@ -65,15 +66,16 @@ export default function createStackedLayoutStyle({
|
|
|
65
66
|
}
|
|
66
67
|
},
|
|
67
68
|
|
|
68
|
-
'&.webchat__stacked-layout--hide-avatar, &.webchat__stacked-layout--show-avatar, &.webchat__stacked-layout--hide-nub, &.webchat__stacked-layout--show-nub':
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
'&.webchat__stacked-layout--hide-avatar, &.webchat__stacked-layout--show-avatar, &.webchat__stacked-layout--hide-nub, &.webchat__stacked-layout--show-nub':
|
|
70
|
+
{
|
|
71
|
+
'& .webchat__stacked-layout__attachment, & .webchat__stacked-layout__message': {
|
|
72
|
+
maxWidth: bubbleMaxWidth + paddingRegular
|
|
73
|
+
},
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
'& .webchat__stacked-layout__nub-pad': {
|
|
76
|
+
width: paddingRegular
|
|
77
|
+
}
|
|
78
|
+
},
|
|
77
79
|
|
|
78
80
|
'&:not(.webchat__stacked-layout--top-callout)': {
|
|
79
81
|
'& .webchat__stacked-layout__avatar-gutter, & .webchat__stacked-layout__content': {
|