@azure/communication-react 1.5.1-alpha-202304150013 → 1.5.1-alpha-202304180012

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 (160) hide show
  1. package/dist/communication-react.d.ts +296 -3
  2. package/dist/dist-cjs/communication-react/index.js +1726 -499
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +13 -0
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +36 -0
  8. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +49 -0
  10. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +53 -0
  11. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -0
  12. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +12 -0
  13. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +25 -1
  14. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +3 -0
  16. package/dist/dist-esm/calling-component-bindings/src/index.js +2 -0
  17. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  18. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +68 -1
  19. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  20. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +8 -0
  21. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +81 -0
  22. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  23. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +57 -0
  24. package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
  25. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +2 -0
  26. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +19 -0
  27. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  28. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +18 -0
  29. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +38 -0
  30. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -0
  31. package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +6 -0
  32. package/dist/dist-esm/calling-stateful-client/src/Converter.js +17 -1
  33. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  34. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.d.ts +7 -0
  35. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js +10 -0
  36. package/dist/dist-esm/calling-stateful-client/src/TypeGuards.js.map +1 -1
  37. package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
  38. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  39. package/dist/dist-esm/communication-react/src/index.d.ts +2 -0
  40. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/Caption.js +4 -3
  42. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  43. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +1 -0
  44. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +4 -4
  45. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  46. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +37 -0
  47. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +88 -0
  48. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -0
  49. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +2 -0
  50. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +1 -0
  51. package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.d.ts +70 -0
  53. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js +52 -0
  54. package/dist/dist-esm/react-components/src/components/StartCaptionsButton.js.map +1 -0
  55. package/dist/dist-esm/react-components/src/components/index.d.ts +2 -0
  56. package/dist/dist-esm/react-components/src/components/index.js +6 -0
  57. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +8 -0
  59. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +17 -2
  60. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  61. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.d.ts +34 -0
  62. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +85 -0
  63. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -0
  64. package/dist/dist-esm/react-components/src/components/utils.d.ts +4 -0
  65. package/dist/dist-esm/react-components/src/components/utils.js +4 -0
  66. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  67. package/dist/dist-esm/react-components/src/index.d.ts +1 -0
  68. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.d.ts +1 -1
  70. package/dist/dist-esm/react-components/src/permissions/PermissionsProvider.js.map +1 -1
  71. package/dist/dist-esm/react-components/src/theming/icons.d.ts +4 -0
  72. package/dist/dist-esm/react-components/src/theming/icons.js +11 -1
  73. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +48 -0
  75. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js +4 -0
  76. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -0
  77. package/dist/dist-esm/react-components/src/types/index.d.ts +1 -0
  78. package/dist/dist-esm/react-components/src/types/index.js +1 -0
  79. package/dist/dist-esm/react-components/src/types/index.js.map +1 -1
  80. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +65 -0
  81. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +13 -0
  83. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +61 -2
  84. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +54 -1
  86. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  87. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
  88. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
  89. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +18 -3
  90. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +1 -1
  92. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  93. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +16 -0
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -0
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -1
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +7 -0
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.js +21 -0
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.js.map +1 -0
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +22 -0
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +46 -0
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +9 -2
  106. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.d.ts +12 -0
  108. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/Strings.js.map +1 -1
  109. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +10 -0
  110. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +46 -0
  111. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  112. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +26 -1
  113. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +5 -0
  115. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +27 -1
  116. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  117. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +3 -1
  118. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js +6 -2
  119. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  120. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +6 -0
  121. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +60 -0
  122. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -0
  123. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.d.ts +12 -0
  124. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js +107 -0
  125. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBannerMoreButton.js.map +1 -0
  126. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.d.ts +7 -0
  127. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js +38 -0
  128. package/dist/dist-esm/react-composites/src/composites/common/CaptionsSettingsModal.js.map +1 -0
  129. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -0
  130. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +19 -1
  131. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  132. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +2 -0
  133. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +113 -6
  134. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  135. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +13 -0
  136. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +103 -0
  137. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  138. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.d.ts +6 -0
  139. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js +24 -0
  140. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js.map +1 -0
  141. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -0
  142. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js +5 -1
  143. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  144. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.d.ts +20 -0
  145. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js +55 -0
  146. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.js.map +1 -0
  147. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.d.ts +7 -0
  148. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js +25 -0
  149. package/dist/dist-esm/react-composites/src/composites/common/Drawer/SpokenLanguageDrawer.styles.js.map +1 -0
  150. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js +1 -1
  151. package/dist/dist-esm/react-composites/src/composites/common/MoreButton.js.map +1 -1
  152. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +0 -2
  153. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +20 -10
  154. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  155. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +4 -0
  156. package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +4 -0
  157. package/dist/dist-esm/react-composites/src/composites/common/utils.js +4 -0
  158. package/dist/dist-esm/react-composites/src/composites/common/utils.js.map +1 -1
  159. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +61 -1
  160. package/package.json +10 -10
@@ -0,0 +1,37 @@
1
+ /// <reference types="react" />
2
+ import { _captionsOptions } from './StartCaptionsButton';
3
+ import { CaptionsAvailableLanguageStrings } from '../types';
4
+ /**
5
+ * @internal
6
+ * strings for captions setting modal
7
+ */
8
+ export interface _CaptionsSettingsModalStrings {
9
+ captionsSettingsModalTitle?: string;
10
+ captionsSettingsDropdownLabel?: string;
11
+ captionsSettingsDropdownInfoText?: string;
12
+ captionsSettingsConfirmButtonLabel?: string;
13
+ captionsSettingsCancelButtonLabel?: string;
14
+ captionsSettingsModalAriaLabel?: string;
15
+ captionsSettingsCloseModalButtonAriaLabel?: string;
16
+ }
17
+ /**
18
+ * @internal
19
+ * _CaptionsSettingsModal Component Props.
20
+ */
21
+ export interface _CaptionsSettingsModalProps {
22
+ supportedSpokenLanguages: string[];
23
+ onSetSpokenLanguage: (language: string) => Promise<void>;
24
+ onStartCaptions: (options?: _captionsOptions) => Promise<void>;
25
+ currentSpokenLanguage: string;
26
+ captionsAvailableLanguageStrings?: CaptionsAvailableLanguageStrings;
27
+ isCaptionsFeatureActive?: boolean;
28
+ strings?: _CaptionsSettingsModalStrings;
29
+ showModal?: boolean;
30
+ onDismissCaptionsSettings?: () => void;
31
+ }
32
+ /**
33
+ * @internal
34
+ * a component for setting spoken languages
35
+ */
36
+ export declare const _CaptionsSettingsModal: (props: _CaptionsSettingsModalProps) => JSX.Element;
37
+ //# sourceMappingURL=CaptionsSettingsModal.d.ts.map
@@ -0,0 +1,88 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ // Copyright (c) Microsoft Corporation.
11
+ // Licensed under the MIT license.
12
+ import React, { useCallback } from 'react';
13
+ import { useMemo, useState } from 'react';
14
+ import { Modal, Stack, useTheme, Text, IconButton, Dropdown, DefaultButton, PrimaryButton } from '@fluentui/react';
15
+ import { buttonsContainerClassName, buttonStyles, dropdownContainerClassName, dropdownInfoTextStyle, dropdownStyles, themedCaptionsSettingsModalStyle, titleClassName, titleContainerClassName } from './styles/CaptionsSettingsModal.styles';
16
+ import { defaultSpokenLanguage } from './utils';
17
+ import { _preventDismissOnEvent } from "../../../acs-ui-common/src";
18
+ /**
19
+ * @internal
20
+ * a component for setting spoken languages
21
+ */
22
+ export const _CaptionsSettingsModal = (props) => {
23
+ const { supportedSpokenLanguages, currentSpokenLanguage, isCaptionsFeatureActive, showModal, onSetSpokenLanguage, onDismissCaptionsSettings, onStartCaptions, strings, captionsAvailableLanguageStrings } = props;
24
+ const theme = useTheme();
25
+ const [selectedItem, setSelectedItem] = useState({
26
+ key: currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage,
27
+ text: currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage
28
+ });
29
+ const onDismiss = useCallback(() => {
30
+ if (onDismissCaptionsSettings) {
31
+ onDismissCaptionsSettings();
32
+ }
33
+ }, [onDismissCaptionsSettings]);
34
+ const onConfirm = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
35
+ const languageCode = selectedItem.key.toString();
36
+ if (isCaptionsFeatureActive) {
37
+ onSetSpokenLanguage(languageCode);
38
+ }
39
+ else {
40
+ yield onStartCaptions({ spokenLanguage: languageCode });
41
+ // set spoken language when start captions with a spoken language specified.
42
+ // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language
43
+ onSetSpokenLanguage(languageCode);
44
+ }
45
+ onDismiss();
46
+ }), [onDismiss, isCaptionsFeatureActive, onSetSpokenLanguage, onStartCaptions, selectedItem.key]);
47
+ const dropdownOptions = useMemo(() => {
48
+ return supportedSpokenLanguages.map((languageCode) => {
49
+ return {
50
+ key: languageCode,
51
+ text: captionsAvailableLanguageStrings ? captionsAvailableLanguageStrings[languageCode] : languageCode
52
+ };
53
+ });
54
+ }, [supportedSpokenLanguages, captionsAvailableLanguageStrings]);
55
+ const onChange = (event, option) => {
56
+ if (option) {
57
+ setSelectedItem(option);
58
+ }
59
+ };
60
+ const calloutProps = useMemo(() => ({
61
+ preventDismissOnEvent: _preventDismissOnEvent
62
+ }), []);
63
+ const CaptionsSettingsComponent = useCallback(() => {
64
+ return (React.createElement(Stack, null,
65
+ React.createElement(Dropdown, { label: strings === null || strings === void 0 ? void 0 : strings.captionsSettingsDropdownLabel, selectedKey: selectedItem ? selectedItem.key : undefined, onChange: onChange, calloutProps: calloutProps, placeholder: currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage, options: dropdownOptions, styles: dropdownStyles }),
66
+ React.createElement(Text, { className: dropdownInfoTextStyle(theme) }, strings === null || strings === void 0 ? void 0 : strings.captionsSettingsDropdownInfoText)));
67
+ }, [
68
+ calloutProps,
69
+ currentSpokenLanguage,
70
+ dropdownOptions,
71
+ selectedItem,
72
+ strings === null || strings === void 0 ? void 0 : strings.captionsSettingsDropdownInfoText,
73
+ strings === null || strings === void 0 ? void 0 : strings.captionsSettingsDropdownLabel,
74
+ theme
75
+ ]);
76
+ const CaptionsSettingsModalStyle = useMemo(() => themedCaptionsSettingsModalStyle(theme), [theme]);
77
+ return (React.createElement(React.Fragment, null, React.createElement(Modal, { titleAriaId: strings === null || strings === void 0 ? void 0 : strings.captionsSettingsModalAriaLabel, isOpen: showModal, onDismiss: onDismiss, isBlocking: true, styles: CaptionsSettingsModalStyle },
78
+ React.createElement(Stack, { horizontal: true, horizontalAlign: "space-between", verticalAlign: "center", className: titleContainerClassName },
79
+ React.createElement(Text, { className: titleClassName }, strings === null || strings === void 0 ? void 0 : strings.captionsSettingsModalTitle),
80
+ React.createElement(IconButton, { iconProps: { iconName: 'Cancel' }, ariaLabel: strings === null || strings === void 0 ? void 0 : strings.captionsSettingsCloseModalButtonAriaLabel, onClick: onDismiss, style: { color: theme.palette.black } })),
81
+ React.createElement(Stack, { className: dropdownContainerClassName }, CaptionsSettingsComponent()),
82
+ React.createElement(Stack, { horizontal: true, horizontalAlign: "end", className: buttonsContainerClassName },
83
+ React.createElement(PrimaryButton, { styles: buttonStyles(theme), onClick: onConfirm },
84
+ React.createElement("span", null, strings === null || strings === void 0 ? void 0 : strings.captionsSettingsConfirmButtonLabel)),
85
+ React.createElement(DefaultButton, { onClick: onDismiss, styles: buttonStyles(theme) },
86
+ React.createElement("span", null, strings === null || strings === void 0 ? void 0 : strings.captionsSettingsCancelButtonLabel))))));
87
+ };
88
+ //# sourceMappingURL=CaptionsSettingsModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CaptionsSettingsModal.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/CaptionsSettingsModal.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAEL,KAAK,EACL,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,UAAU,EACV,QAAQ,EAER,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,yBAAyB,EACzB,YAAY,EACZ,0BAA0B,EAC1B,qBAAqB,EACrB,cAAc,EACd,gCAAgC,EAChC,cAAc,EACd,uBAAuB,EACxB,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CA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AkC,CAAQ,CAC5C;YAChB,oBAAC,aAAa,IAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC;gBAC5D,kCAAO,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iCAAiC,CAAQ,CAC3C,CACV,CACF,CAET,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport React, { useCallback } from 'react';\nimport { useMemo, useState } from 'react';\nimport {\n IModalStyles,\n Modal,\n Stack,\n useTheme,\n Text,\n IconButton,\n Dropdown,\n IDropdownOption,\n DefaultButton,\n PrimaryButton\n} from '@fluentui/react';\n\nimport {\n buttonsContainerClassName,\n buttonStyles,\n dropdownContainerClassName,\n dropdownInfoTextStyle,\n dropdownStyles,\n themedCaptionsSettingsModalStyle,\n titleClassName,\n titleContainerClassName\n} from './styles/CaptionsSettingsModal.styles';\nimport { _captionsOptions } from './StartCaptionsButton';\nimport { defaultSpokenLanguage } from './utils';\nimport { CaptionsAvailableLanguageStrings } from '../types';\nimport { _preventDismissOnEvent } from '@internal/acs-ui-common';\n\n/**\n * @internal\n * strings for captions setting modal\n */\nexport interface _CaptionsSettingsModalStrings {\n captionsSettingsModalTitle?: string;\n captionsSettingsDropdownLabel?: string;\n captionsSettingsDropdownInfoText?: string;\n captionsSettingsConfirmButtonLabel?: string;\n captionsSettingsCancelButtonLabel?: string;\n captionsSettingsModalAriaLabel?: string;\n captionsSettingsCloseModalButtonAriaLabel?: string;\n}\n\n/**\n * @internal\n * _CaptionsSettingsModal Component Props.\n */\nexport interface _CaptionsSettingsModalProps {\n supportedSpokenLanguages: string[];\n onSetSpokenLanguage: (language: string) => Promise<void>;\n onStartCaptions: (options?: _captionsOptions) => Promise<void>;\n currentSpokenLanguage: string;\n captionsAvailableLanguageStrings?: CaptionsAvailableLanguageStrings;\n isCaptionsFeatureActive?: boolean;\n strings?: _CaptionsSettingsModalStrings;\n showModal?: boolean;\n onDismissCaptionsSettings?: () => void;\n}\n\n/**\n * @internal\n * a component for setting spoken languages\n */\nexport const _CaptionsSettingsModal = (props: _CaptionsSettingsModalProps): JSX.Element => {\n const {\n supportedSpokenLanguages,\n currentSpokenLanguage,\n isCaptionsFeatureActive,\n showModal,\n onSetSpokenLanguage,\n onDismissCaptionsSettings,\n onStartCaptions,\n strings,\n captionsAvailableLanguageStrings\n } = props;\n\n const theme = useTheme();\n\n const [selectedItem, setSelectedItem] = useState<IDropdownOption>({\n key: currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage,\n text: currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage\n });\n\n const onDismiss = useCallback((): void => {\n if (onDismissCaptionsSettings) {\n onDismissCaptionsSettings();\n }\n }, [onDismissCaptionsSettings]);\n\n const onConfirm = useCallback(async (): Promise<void> => {\n const languageCode = selectedItem.key.toString();\n if (isCaptionsFeatureActive) {\n onSetSpokenLanguage(languageCode);\n } else {\n await onStartCaptions({ spokenLanguage: languageCode });\n // set spoken language when start captions with a spoken language specified.\n // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language\n onSetSpokenLanguage(languageCode);\n }\n onDismiss();\n }, [onDismiss, isCaptionsFeatureActive, onSetSpokenLanguage, onStartCaptions, selectedItem.key]);\n\n const dropdownOptions: IDropdownOption[] = useMemo(() => {\n return supportedSpokenLanguages.map((languageCode) => {\n return {\n key: languageCode,\n text: captionsAvailableLanguageStrings ? captionsAvailableLanguageStrings[languageCode] : languageCode\n };\n });\n }, [supportedSpokenLanguages, captionsAvailableLanguageStrings]);\n\n const onChange = (event: React.FormEvent<HTMLDivElement>, option: IDropdownOption | undefined): void => {\n if (option) {\n setSelectedItem(option);\n }\n };\n\n const calloutProps = useMemo(\n () => ({\n preventDismissOnEvent: _preventDismissOnEvent\n }),\n []\n );\n\n const CaptionsSettingsComponent = useCallback((): JSX.Element => {\n return (\n <Stack>\n <Dropdown\n label={strings?.captionsSettingsDropdownLabel}\n selectedKey={selectedItem ? selectedItem.key : undefined}\n onChange={onChange}\n calloutProps={calloutProps}\n placeholder={currentSpokenLanguage !== '' ? currentSpokenLanguage : defaultSpokenLanguage}\n options={dropdownOptions}\n styles={dropdownStyles}\n />\n <Text className={dropdownInfoTextStyle(theme)}>{strings?.captionsSettingsDropdownInfoText}</Text>\n </Stack>\n );\n }, [\n calloutProps,\n currentSpokenLanguage,\n dropdownOptions,\n selectedItem,\n strings?.captionsSettingsDropdownInfoText,\n strings?.captionsSettingsDropdownLabel,\n theme\n ]);\n\n const CaptionsSettingsModalStyle: Partial<IModalStyles> = useMemo(\n () => themedCaptionsSettingsModalStyle(theme),\n [theme]\n );\n\n return (\n <>\n {\n <Modal\n titleAriaId={strings?.captionsSettingsModalAriaLabel}\n isOpen={showModal}\n onDismiss={onDismiss}\n isBlocking={true}\n styles={CaptionsSettingsModalStyle}\n >\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\" className={titleContainerClassName}>\n <Text className={titleClassName}>{strings?.captionsSettingsModalTitle}</Text>\n <IconButton\n iconProps={{ iconName: 'Cancel' }}\n ariaLabel={strings?.captionsSettingsCloseModalButtonAriaLabel}\n onClick={onDismiss}\n style={{ color: theme.palette.black }}\n />\n </Stack>\n\n <Stack className={dropdownContainerClassName}>{CaptionsSettingsComponent()}</Stack>\n <Stack horizontal horizontalAlign=\"end\" className={buttonsContainerClassName}>\n <PrimaryButton styles={buttonStyles(theme)} onClick={onConfirm}>\n <span>{strings?.captionsSettingsConfirmButtonLabel}</span>\n </PrimaryButton>\n <DefaultButton onClick={onDismiss} styles={buttonStyles(theme)}>\n <span>{strings?.captionsSettingsCancelButtonLabel}</span>\n </DefaultButton>\n </Stack>\n </Modal>\n }\n </>\n );\n};\n\"../../../acs-ui-common/src\""]}
@@ -13,6 +13,8 @@ export interface _DrawerMenuItemProps {
13
13
  text?: string;
14
14
  /** Text that shows at the end of the menu item before any secondaryIcon is supplied */
15
15
  secondaryText?: string;
16
+ /** A component that shows at the end of the menu item before any secondaryIcon is supplied */
17
+ secondaryComponent?: JSX.Element;
16
18
  /** Icon shown at the start of the menu item (before the menu item text) */
17
19
  iconProps?: IIconProps;
18
20
  /**
@@ -24,6 +24,7 @@ export const DrawerMenuItem = (props) => {
24
24
  React.createElement(Text, { styles: {
25
25
  root: { color: props.disabled ? theme.palette.neutralTertiaryAlt : theme.palette.neutralSecondary }
26
26
  } }, props.secondaryText))),
27
+ props.secondaryComponent && React.createElement(Stack.Item, null, props.secondaryComponent),
27
28
  secondaryIcon && React.createElement(Stack.Item, null, secondaryIcon)));
28
29
  };
29
30
  const MenuItemIcon = (props) => (React.createElement(FontIcon, Object.assign({ className: mergeStyles(iconStyles) }, props)));
@@ -1 +1 @@
1
- {"version":3,"file":"DrawerMenuItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Drawer/DrawerMenuItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,QAAQ,EAMR,WAAW,EACX,KAAK,EACL,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAkCjE;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,KAA2B,EAAe,EAAE;;IACzE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,OAAO,GAAG,CAAC,EAAqE,EAAQ,EAAE,CAC9F,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IAC5D,MAAM,UAAU,GAAG,CAAC,EAAoC,EAAQ,EAAE,CAAC,OAAO,IAAI,kBAAkB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAE9G,MAAM,aAAa,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IACrB,UAAU,EAAE,UAAU;IACtB,gBAAgB,EAAE;QAChB,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AAEH,oHAAoH;AACpH,MAAM,wBAAwB,GAAiB;IAC7C,IAAI,EAAE;QACJ,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,UAAU;QACxB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC;AAEF,MAAM,UAAU,GAAW;IACzB,4GAA4G;IAC5G,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,MAAM;IAEd,qGAAqG;IACrG,OAAO,EAAE;QACP,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,MAAM;KACf;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAW;IAClC,2FAA2F;IAC3F,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n FontIcon,\n IFontIconProps,\n IIconProps,\n IRawStyle,\n IStackStyles,\n IStyle,\n mergeStyles,\n Stack,\n Text\n} from '@fluentui/react';\nimport React from 'react';\nimport { useTheme } from '../../theming/FluentThemeProvider';\nimport { BaseCustomStyles } from '../../types';\nimport { submitWithKeyboard } from '../utils/keyboardNavigation';\n\n/**\n * Props for the DrawerMenuItem\n *\n * @internal\n */\nexport interface _DrawerMenuItemProps {\n onItemClick?: (ev?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, itemKey?: string) => void;\n itemKey: string;\n /** Text that shows at the start of the menu item after any icon supplied */\n text?: string;\n /** Text that shows at the end of the menu item before any secondaryIcon is supplied */\n secondaryText?: string;\n /** Icon shown at the start of the menu item (before the menu item text) */\n iconProps?: IIconProps;\n /**\n * Icon shown at the end of the menu item.\n * By default if this component has subMenuProps, this icon is the RightChevron.\n */\n secondaryIconProps?: IIconProps;\n styles?: BaseCustomStyles;\n subMenuProps?: _DrawerMenuItemProps[];\n /**\n * Whether the menu item is disabled\n * @defaultvalue false\n */\n disabled?: boolean;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n}\n\n/**\n * Maps the individual item in menuProps.items passed in the {@link DrawerMenu} into a UI component.\n *\n * @private\n */\nexport const DrawerMenuItem = (props: _DrawerMenuItemProps): JSX.Element => {\n const theme = useTheme();\n const onClick = (ev?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>): void =>\n props.onItemClick && props.onItemClick(ev, props.itemKey);\n const onKeyPress = (ev: React.KeyboardEvent<HTMLElement>): void => onClick && submitWithKeyboard(ev, onClick);\n\n const secondaryIcon = props.secondaryIconProps ? (\n <MenuItemIcon {...props.secondaryIconProps} />\n ) : props.subMenuProps ? (\n <MenuItemIcon iconName=\"ChevronRight\" />\n ) : undefined;\n\n return (\n <Stack\n tabIndex={0}\n role=\"menuitem\"\n horizontal\n className={mergeStyles(\n drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small),\n props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined,\n props.styles?.root\n )}\n onKeyPress={props.disabled ? undefined : onKeyPress}\n onClick={props.disabled ? undefined : onClick}\n tokens={menuItemChildrenGap}\n id={props.id}\n >\n {props.iconProps && (\n <Stack.Item\n role=\"presentation\"\n styles={props.disabled ? { root: { color: theme.palette.neutralTertiaryAlt } } : undefined}\n >\n <MenuItemIcon {...props.iconProps} />\n </Stack.Item>\n )}\n <Stack.Item styles={drawerMenuItemTextStyles} grow>\n <Text styles={props.disabled ? { root: { color: theme.palette.neutralTertiaryAlt } } : undefined}>\n {props.text}\n </Text>\n </Stack.Item>\n {props.secondaryText && (\n <Stack.Item styles={drawerMenuItemTextStyles} className={mergeStyles(secondaryTextStyles)}>\n <Text\n styles={{\n root: { color: props.disabled ? theme.palette.neutralTertiaryAlt : theme.palette.neutralSecondary }\n }}\n >\n {props.secondaryText}\n </Text>\n </Stack.Item>\n )}\n {secondaryIcon && <Stack.Item>{secondaryIcon}</Stack.Item>}\n </Stack>\n );\n};\n\nconst MenuItemIcon = (props: IFontIconProps): JSX.Element => (\n <FontIcon className={mergeStyles(iconStyles)} {...props} />\n);\n\nconst menuItemChildrenGap = { childrenGap: '0.5rem' };\n\nconst drawerMenuItemRootStyles = (hoverBackground: string, fontSize: IRawStyle): IStyle => ({\n ...fontSize,\n height: '3rem',\n lineHeight: '3rem',\n padding: '0rem 0.75rem',\n cursor: 'pointer',\n ':hover, :focus': {\n background: hoverBackground\n }\n});\n\nconst disabledDrawerMenuItemRootStyles = (background: string): IStyle => ({\n pointerEvents: 'none',\n background: background,\n ':hover, :focus': {\n background: background\n }\n});\n\n/** Ensure long text entries appropriately show ellipsis instead of wrapping to a new line or showing a scrollbar */\nconst drawerMenuItemTextStyles: IStackStyles = {\n root: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n }\n};\n\nconst iconStyles: IStyle = {\n // Vertically center icons in the menu item. Using line-height does not work for centering fluent SVG icons.\n display: 'flex',\n alignItems: 'center',\n height: '100%',\n\n // This can be removed when we upgrade to fluent-react-icons v2 (that removes the inner span element)\n ' span': {\n display: 'flex',\n alignItems: 'center',\n height: '100%'\n }\n};\n\nconst secondaryTextStyles: IStyle = {\n // limit width for secondaryText in the menu item so it does not overlap with text on left.\n maxWidth: '50%'\n};\n"]}
1
+ {"version":3,"file":"DrawerMenuItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/Drawer/DrawerMenuItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,QAAQ,EAMR,WAAW,EACX,KAAK,EACL,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAoCjE;;;;GAIG;A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QAAQ,kBAAC,SAAS,EAAE,WAAW,CAAC,UAAU,CAAC,IAAM,KAAK,EAAI,CAC5D,CAAC;AAEF,MAAM,mBAAmB,GAAG,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;AAEtD,MAAM,wBAAwB,GAAG,CAAC,eAAuB,EAAE,QAAmB,EAAU,EAAE,CAAC,iCACtF,QAAQ,KACX,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,SAAS,EACjB,gBAAgB,EAAE;QAChB,UAAU,EAAE,eAAe;KAC5B,IACD,CAAC;AAEH,MAAM,gCAAgC,GAAG,CAAC,UAAkB,EAAU,EAAE,CAAC,CAAC;IACxE,aAAa,EAAE,MAAM;IACrB,UAAU,EAAE,UAAU;IACtB,gBAAgB,EAAE;QAChB,UAAU,EAAE,UAAU;KACvB;CACF,CAAC,CAAC;AAEH,oHAAoH;AACpH,MAAM,wBAAwB,GAAiB;IAC7C,IAAI,EAAE;QACJ,QAAQ,EAAE,QAAQ;QAClB,YAAY,EAAE,UAAU;QACxB,UAAU,EAAE,QAAQ;KACrB;CACF,CAAC;AAEF,MAAM,UAAU,GAAW;IACzB,4GAA4G;IAC5G,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,MAAM,EAAE,MAAM;IAEd,qGAAqG;IACrG,OAAO,EAAE;QACP,OAAO,EAAE,MAAM;QACf,UAAU,EAAE,QAAQ;QACpB,MAAM,EAAE,MAAM;KACf;CACF,CAAC;AAEF,MAAM,mBAAmB,GAAW;IAClC,2FAA2F;IAC3F,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n FontIcon,\n IFontIconProps,\n IIconProps,\n IRawStyle,\n IStackStyles,\n IStyle,\n mergeStyles,\n Stack,\n Text\n} from '@fluentui/react';\nimport React from 'react';\nimport { useTheme } from '../../theming/FluentThemeProvider';\nimport { BaseCustomStyles } from '../../types';\nimport { submitWithKeyboard } from '../utils/keyboardNavigation';\n\n/**\n * Props for the DrawerMenuItem\n *\n * @internal\n */\nexport interface _DrawerMenuItemProps {\n onItemClick?: (ev?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, itemKey?: string) => void;\n itemKey: string;\n /** Text that shows at the start of the menu item after any icon supplied */\n text?: string;\n /** Text that shows at the end of the menu item before any secondaryIcon is supplied */\n secondaryText?: string;\n /** A component that shows at the end of the menu item before any secondaryIcon is supplied */\n secondaryComponent?: JSX.Element;\n /** Icon shown at the start of the menu item (before the menu item text) */\n iconProps?: IIconProps;\n /**\n * Icon shown at the end of the menu item.\n * By default if this component has subMenuProps, this icon is the RightChevron.\n */\n secondaryIconProps?: IIconProps;\n styles?: BaseCustomStyles;\n subMenuProps?: _DrawerMenuItemProps[];\n /**\n * Whether the menu item is disabled\n * @defaultvalue false\n */\n disabled?: boolean;\n /**\n * A unique id set for the standard HTML id attibute\n */\n id?: string;\n}\n\n/**\n * Maps the individual item in menuProps.items passed in the {@link DrawerMenu} into a UI component.\n *\n * @private\n */\nexport const DrawerMenuItem = (props: _DrawerMenuItemProps): JSX.Element => {\n const theme = useTheme();\n const onClick = (ev?: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>): void =>\n props.onItemClick && props.onItemClick(ev, props.itemKey);\n const onKeyPress = (ev: React.KeyboardEvent<HTMLElement>): void => onClick && submitWithKeyboard(ev, onClick);\n\n const secondaryIcon = props.secondaryIconProps ? (\n <MenuItemIcon {...props.secondaryIconProps} />\n ) : props.subMenuProps ? (\n <MenuItemIcon iconName=\"ChevronRight\" />\n ) : undefined;\n\n return (\n <Stack\n tabIndex={0}\n role=\"menuitem\"\n horizontal\n className={mergeStyles(\n drawerMenuItemRootStyles(theme.palette.neutralLight, theme.fonts.small),\n props.disabled ? disabledDrawerMenuItemRootStyles(theme.palette.neutralQuaternaryAlt) : undefined,\n props.styles?.root\n )}\n onKeyPress={props.disabled ? undefined : onKeyPress}\n onClick={props.disabled ? undefined : onClick}\n tokens={menuItemChildrenGap}\n id={props.id}\n >\n {props.iconProps && (\n <Stack.Item\n role=\"presentation\"\n styles={props.disabled ? { root: { color: theme.palette.neutralTertiaryAlt } } : undefined}\n >\n <MenuItemIcon {...props.iconProps} />\n </Stack.Item>\n )}\n <Stack.Item styles={drawerMenuItemTextStyles} grow>\n <Text styles={props.disabled ? { root: { color: theme.palette.neutralTertiaryAlt } } : undefined}>\n {props.text}\n </Text>\n </Stack.Item>\n {props.secondaryText && (\n <Stack.Item styles={drawerMenuItemTextStyles} className={mergeStyles(secondaryTextStyles)}>\n <Text\n styles={{\n root: { color: props.disabled ? theme.palette.neutralTertiaryAlt : theme.palette.neutralSecondary }\n }}\n >\n {props.secondaryText}\n </Text>\n </Stack.Item>\n )}\n {props.secondaryComponent && <Stack.Item>{props.secondaryComponent}</Stack.Item>}\n {secondaryIcon && <Stack.Item>{secondaryIcon}</Stack.Item>}\n </Stack>\n );\n};\n\nconst MenuItemIcon = (props: IFontIconProps): JSX.Element => (\n <FontIcon className={mergeStyles(iconStyles)} {...props} />\n);\n\nconst menuItemChildrenGap = { childrenGap: '0.5rem' };\n\nconst drawerMenuItemRootStyles = (hoverBackground: string, fontSize: IRawStyle): IStyle => ({\n ...fontSize,\n height: '3rem',\n lineHeight: '3rem',\n padding: '0rem 0.75rem',\n cursor: 'pointer',\n ':hover, :focus': {\n background: hoverBackground\n }\n});\n\nconst disabledDrawerMenuItemRootStyles = (background: string): IStyle => ({\n pointerEvents: 'none',\n background: background,\n ':hover, :focus': {\n background: background\n }\n});\n\n/** Ensure long text entries appropriately show ellipsis instead of wrapping to a new line or showing a scrollbar */\nconst drawerMenuItemTextStyles: IStackStyles = {\n root: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n }\n};\n\nconst iconStyles: IStyle = {\n // Vertically center icons in the menu item. Using line-height does not work for centering fluent SVG icons.\n display: 'flex',\n alignItems: 'center',\n height: '100%',\n\n // This can be removed when we upgrade to fluent-react-icons v2 (that removes the inner span element)\n ' span': {\n display: 'flex',\n alignItems: 'center',\n height: '100%'\n }\n};\n\nconst secondaryTextStyles: IStyle = {\n // limit width for secondaryText in the menu item so it does not overlap with text on left.\n maxWidth: '50%'\n};\n"]}
@@ -0,0 +1,70 @@
1
+ /// <reference types="react" />
2
+ import { ControlBarButtonProps } from './ControlBarButton';
3
+ /**
4
+ * options bag to start captions
5
+ *
6
+ * @internal
7
+ */
8
+ export declare type _captionsOptions = {
9
+ spokenLanguage: string;
10
+ };
11
+ /**
12
+ *@internal
13
+ */
14
+ export interface _StartCaptionsButtonProps extends ControlBarButtonProps {
15
+ /**
16
+ * Utility property for using this component with communication react handlers
17
+ * Start captions based on captions state
18
+ */
19
+ onStartCaptions: (options?: _captionsOptions) => Promise<void>;
20
+ /**
21
+ * Utility property for using this component with communication react handlers
22
+ * Stop captions based on captions state
23
+ */
24
+ onStopCaptions: () => Promise<void>;
25
+ /**
26
+ * Utility property for using this component with communication react handlers
27
+ * set captions spoken language
28
+ */
29
+ onSetSpokenLanguage: (language: string) => Promise<void>;
30
+ /**
31
+ * Spoken language set for starting captions
32
+ */
33
+ currentSpokenLanguage: string;
34
+ /**
35
+ * Optional strings to override in component
36
+ */
37
+ strings?: _StartCaptionsButtonStrings;
38
+ }
39
+ /**
40
+ * Strings for the hold button labels
41
+ * @internal
42
+ */
43
+ export interface _StartCaptionsButtonStrings {
44
+ /**
45
+ * Label for when action is to start Captions
46
+ */
47
+ onLabel: string;
48
+ /**
49
+ * Label for when action is to stop Captions
50
+ */
51
+ offLabel: string;
52
+ /**
53
+ * Content for when button is checked, captions is on
54
+ */
55
+ tooltipOnContent: string;
56
+ /**
57
+ * Content for when button is unchecked, captions is off
58
+ */
59
+ tooltipOffContent: string;
60
+ }
61
+ /**
62
+ * a button to start or stop captions
63
+ *
64
+ * Can be used with {@link ControlBar}
65
+ *
66
+ * @param props - properties for the start captions button.
67
+ * @internal
68
+ */
69
+ export declare const _StartCaptionsButton: (props: _StartCaptionsButtonProps) => JSX.Element;
70
+ //# sourceMappingURL=StartCaptionsButton.d.ts.map
@@ -0,0 +1,52 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
+ return new (P || (P = Promise))(function (resolve, reject) {
6
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
10
+ });
11
+ };
12
+ import { ControlBarButton } from './ControlBarButton';
13
+ import React, { useCallback, useMemo } from 'react';
14
+ import { _HighContrastAwareIcon } from './HighContrastAwareIcon';
15
+ import { defaultSpokenLanguage } from './utils';
16
+ /**
17
+ * a button to start or stop captions
18
+ *
19
+ * Can be used with {@link ControlBar}
20
+ *
21
+ * @param props - properties for the start captions button.
22
+ * @internal
23
+ */
24
+ export const _StartCaptionsButton = (props) => {
25
+ const { onStartCaptions, onStopCaptions, onSetSpokenLanguage, currentSpokenLanguage, strings } = props;
26
+ const onRenderStartIcon = () => {
27
+ /* @conditional-compile-remove(close-captions) */
28
+ return React.createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "CaptionsIcon" });
29
+ return React.createElement(React.Fragment, null);
30
+ };
31
+ const onRenderOffIcon = () => {
32
+ /* @conditional-compile-remove(close-captions) */
33
+ return React.createElement(_HighContrastAwareIcon, { disabled: props.disabled, iconName: "CaptionsOffIcon" });
34
+ return React.createElement(React.Fragment, null);
35
+ };
36
+ const options = useMemo(() => {
37
+ return { spokenLanguage: currentSpokenLanguage === '' ? defaultSpokenLanguage : currentSpokenLanguage };
38
+ }, [currentSpokenLanguage]);
39
+ const onToggleStartCaptions = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
40
+ if (props.checked) {
41
+ onStopCaptions();
42
+ }
43
+ else {
44
+ yield onStartCaptions(options);
45
+ // set spoken language when start captions with a spoken language specified.
46
+ // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language
47
+ onSetSpokenLanguage(options.spokenLanguage);
48
+ }
49
+ }), [props.checked, onStartCaptions, onStopCaptions, onSetSpokenLanguage, options]);
50
+ return (React.createElement(ControlBarButton, Object.assign({}, props, { strings: strings, onClick: onToggleStartCaptions !== null && onToggleStartCaptions !== void 0 ? onToggleStartCaptions : props.onClick, onRenderOnIcon: onRenderStartIcon, onRenderOffIcon: onRenderOffIcon })));
51
+ };
52
+ //# sourceMappingURL=StartCaptionsButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StartCaptionsButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/StartCaptionsButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA+DhD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEvG,MAAM,iBAAiB,GAAG,GAAgB,EAAE;QAC1C,iDAAiD;QACjD,OAAO,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAC,cAAc,GAAG,CAAC;QACpF,OAAO,yCAAK,CAAC;IACf,CAAC,CAAC;IACF,MAAM,eAAe,GAAG,GAAgB,EAAE;QACxC,iDAAiD;QACjD,OAAO,oBAAC,sBAAsB,IAAC,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAC,iBAAiB,GAAG,CAAC;QACvF,OAAO,yCAAK,CAAC;IACf,CAAC,CAAC;IAEF,MAAM,OAAO,GAAqB,OAAO,CAAC,GAAG,EAAE;QAC7C,OAAO,EAAE,cAAc,EAAE,qBAAqB,KAAK,EAAE,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,qBAAqB,EAAE,CAAC;IAC1G,CAAC,EAAE,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAE5B,MAAM,qBAAqB,GAAG,WAAW,CAAC,GAAwB,EAAE;QAClE,IAAI,KAAK,CAAC,OAAO,EAAE;YACjB,cAAc,EAAE,CAAC;SAClB;aAAM;YACL,MAAM,eAAe,CAAC,OAAO,CAAC,CAAC;YAC/B,4EAA4E;YAC5E,iIAAiI;YACjI,mBAAmB,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;SAC7C;IACH,CAAC,CAAA,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,mBAAmB,EAAE,OAAO,CAAC,CAAC,CAAC;IAEnF,OAAO,CACL,oBAAC,gBAAgB,oBACX,KAAK,IACT,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,KAAK,CAAC,OAAO,EAC/C,cAAc,EAAE,iBAAiB,EACjC,eAAe,EAAE,eAAe,IAChC,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ControlBarButton, ControlBarButtonProps } from './ControlBarButton';\nimport React, { useCallback, useMemo } from 'react';\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nimport { defaultSpokenLanguage } from './utils';\n\n/**\n * options bag to start captions\n *\n * @internal\n */\nexport type _captionsOptions = {\n spokenLanguage: string;\n};\n\n/**\n *@internal\n */\nexport interface _StartCaptionsButtonProps extends ControlBarButtonProps {\n /**\n * Utility property for using this component with communication react handlers\n * Start captions based on captions state\n */\n onStartCaptions: (options?: _captionsOptions) => Promise<void>;\n /**\n * Utility property for using this component with communication react handlers\n * Stop captions based on captions state\n */\n onStopCaptions: () => Promise<void>;\n /**\n * Utility property for using this component with communication react handlers\n * set captions spoken language\n */\n onSetSpokenLanguage: (language: string) => Promise<void>;\n /**\n * Spoken language set for starting captions\n */\n currentSpokenLanguage: string;\n /**\n * Optional strings to override in component\n */\n strings?: _StartCaptionsButtonStrings;\n}\n\n/**\n * Strings for the hold button labels\n * @internal\n */\nexport interface _StartCaptionsButtonStrings {\n /**\n * Label for when action is to start Captions\n */\n onLabel: string;\n /**\n * Label for when action is to stop Captions\n */\n offLabel: string;\n /**\n * Content for when button is checked, captions is on\n */\n tooltipOnContent: string;\n /**\n * Content for when button is unchecked, captions is off\n */\n tooltipOffContent: string;\n}\n\n/**\n * a button to start or stop captions\n *\n * Can be used with {@link ControlBar}\n *\n * @param props - properties for the start captions button.\n * @internal\n */\nexport const _StartCaptionsButton = (props: _StartCaptionsButtonProps): JSX.Element => {\n const { onStartCaptions, onStopCaptions, onSetSpokenLanguage, currentSpokenLanguage, strings } = props;\n\n const onRenderStartIcon = (): JSX.Element => {\n /* @conditional-compile-remove(close-captions) */\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"CaptionsIcon\" />;\n return <></>;\n };\n const onRenderOffIcon = (): JSX.Element => {\n /* @conditional-compile-remove(close-captions) */\n return <_HighContrastAwareIcon disabled={props.disabled} iconName=\"CaptionsOffIcon\" />;\n return <></>;\n };\n\n const options: _captionsOptions = useMemo(() => {\n return { spokenLanguage: currentSpokenLanguage === '' ? defaultSpokenLanguage : currentSpokenLanguage };\n }, [currentSpokenLanguage]);\n\n const onToggleStartCaptions = useCallback(async (): Promise<void> => {\n if (props.checked) {\n onStopCaptions();\n } else {\n await onStartCaptions(options);\n // set spoken language when start captions with a spoken language specified.\n // this is to fix the bug when a second user starts captions with a new spoken language, captions bot ignore that spoken language\n onSetSpokenLanguage(options.spokenLanguage);\n }\n }, [props.checked, onStartCaptions, onStopCaptions, onSetSpokenLanguage, options]);\n\n return (\n <ControlBarButton\n {...props}\n strings={strings}\n onClick={onToggleStartCaptions ?? props.onClick}\n onRenderOnIcon={onRenderStartIcon}\n onRenderOffIcon={onRenderOffIcon}\n />\n );\n};\n"]}
@@ -94,4 +94,6 @@ export type { _VideoBackgroundEffectsPickerProps, _VideoBackgroundEffectChoiceOp
94
94
  export type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';
95
95
  export * from './CaptionsBanner';
96
96
  export * from './Caption';
97
+ export * from './StartCaptionsButton';
98
+ export * from './CaptionsSettingsModal';
97
99
  //# sourceMappingURL=index.d.ts.map
@@ -51,6 +51,12 @@ export { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionD
51
51
  export { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';
52
52
  export { _VideoEffectsItemNoBackground, _VideoEffectsItemBlur, _VideoEffectsItemAddImage } from './VideoEffects/PresetVideoEffectsItems';
53
53
  export { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';
54
+ /* @conditional-compile-remove(close-captions) */
54
55
  export * from './CaptionsBanner';
56
+ /* @conditional-compile-remove(close-captions) */
55
57
  export * from './Caption';
58
+ /* @conditional-compile-remove(close-captions) */
59
+ export * from './StartCaptionsButton';
60
+ /* @conditional-compile-remove(close-captions) */
61
+ export * from './CaptionsSettingsModal';
56
62
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC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jC,cAAc,WAAW,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { TypingIndicator } from './TypingIndicator';\nexport type { TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps } from './TypingIndicator';\n\nexport { ErrorBar } from './ErrorBar';\nexport type { ActiveErrorMessage, ErrorBarProps, ErrorBarStrings, ErrorType } from './ErrorBar';\n\nexport { GridLayout } from './GridLayout';\nexport type { GridLayoutProps, GridLayoutStyles } from './GridLayout';\n\nexport { SendBox } from './SendBox';\n/* @conditional-compile-remove(at-mention) */\nexport { _AtMentionFlyout } from './AtMentionFlyout';\n\nexport type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';\n/* @conditional-compile-remove(at-mention) */\nexport type {\n _AtMentionFlyoutProps,\n AtMentionLookupOptions,\n AtMentionDisplayOptions,\n AtMentionOptions,\n AtMentionSuggestion\n} from './AtMentionFlyout';\n/* @conditional-compile-remove(file-sharing) */\nexport type { ActiveFileUpload } from './SendBox';\n\nexport { MessageStatusIndicator } from './MessageStatusIndicator';\nexport type { MessageStatusIndicatorProps, MessageStatusIndicatorStrings } from './MessageStatusIndicator';\n\nexport { MessageThread } from './MessageThread';\nexport type {\n MessageProps,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n JumpToNewMessageButtonProps,\n MessageRenderer,\n UpdateMessageCallback,\n CancelEditCallback\n} from './MessageThread';\n\nexport { StreamMedia } from './StreamMedia';\nexport type { StreamMediaProps } from './StreamMedia';\nexport type { LoadingState } from './StreamMedia';\n\nexport { ParticipantItem } from './ParticipantItem';\nexport type { ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\n\nexport { ParticipantList } from './ParticipantList';\nexport type {\n ParticipantListItemStyles,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback\n} from './ParticipantList';\n\nexport { Announcer } from './Announcer';\nexport type { AnnouncerProps } from './Announcer';\n\nexport { VideoGallery } from './VideoGallery';\nexport type { VideoGalleryProps, VideoGalleryStrings, VideoGalleryStyles, VideoGalleryLayout } from './VideoGallery';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from './VideoGallery';\n/* @conditional-compile-remove(vertical-gallery) */\nexport type { OverflowGalleryPosition } from './VideoGallery';\nexport type { HorizontalGalleryStyles } from './HorizontalGallery';\n\nexport { LocalVideoCameraCycleButton } from './LocalVideoCameraButton';\nexport type { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\n\nexport { CameraButton } from './CameraButton';\nexport type {\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles\n} from './CameraButton';\n\nexport { ControlBar } from './ControlBar';\nexport type { ControlBarProps, ControlBarLayout } from './ControlBar';\n\nexport { ControlBarButton } from './ControlBarButton';\nexport type { ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles } from './ControlBarButton';\n\nexport { EndCallButton } from './EndCallButton';\nexport type { EndCallButtonProps, EndCallButtonStrings } from './EndCallButton';\n\nexport { MicrophoneButton } from './MicrophoneButton';\nexport type {\n MicrophoneButtonStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings\n} from './MicrophoneButton';\n\nexport { DevicesButton } from './DevicesButton';\nexport type {\n OptionsDevice,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n DevicesButtonContextualMenuStyles\n} from './DevicesButton';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport type { SitePermissionsStrings, SitePermissionsStyles } from './DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDenied } from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedProps\n} from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDeniedIOS } from './DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedIOSProps\n} from './DevicePermissions/BrowserPermissionDeniedIOS';\n\nexport { ParticipantsButton } from './ParticipantsButton';\nexport type {\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles\n} from './ParticipantsButton';\n\nexport { ScreenShareButton } from './ScreenShareButton';\nexport type { ScreenShareButtonProps, ScreenShareButtonStrings } from './ScreenShareButton';\n\nexport { VideoTile } from './VideoTile';\nexport type { VideoTileProps, VideoTileStylesProps } from './VideoTile';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { VideoTileStrings } from './VideoTile';\n\nexport { _PictureInPictureInPicture } from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureProps,\n _PictureInPictureInPictureStrings\n} from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureTileProps,\n _TileOrientation\n} from './PictureInPictureInPicture/PictureInPictureInPictureTile';\n\nexport * from './Drawer';\n/* @conditional-compile-remove(file-sharing) */\nexport type { SendBoxErrorBarError } from './SendBoxErrorBar';\nexport * from './FileCard';\nexport * from './FileCardGroup';\nexport * from './ModalClone/ModalClone';\nexport * from './FileDownloadCards';\nexport type { _FileUploadCardsStrings } from './FileUploadCards';\n\nexport { _useContainerHeight, _useContainerWidth } from './utils/responsive';\n\nexport { _ComplianceBanner } from './ComplianceBanner';\nexport type { _ComplianceBannerProps, _ComplianceBannerStrings } from './ComplianceBanner';\nexport { Dialpad } from './Dialpad/Dialpad';\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from './Dialpad/Dialpad';\n\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from './HoldButton';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from './HoldButton';\n\nexport { _LocalVideoTile } from './LocalVideoTile';\nexport { _RemoteVideoTile } from './RemoteVideoTile';\nexport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nexport type { _HighContrastAwareIconProps } from './HighContrastAwareIcon';\n\nexport { UnsupportedBrowser } from './UnsupportedBrowser';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from './UnsupportedBrowser';\nexport { UnsupportedBrowserVersion } from './UnsupportedBrowserVersion';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from './UnsupportedBrowserVersion';\nexport { UnsupportedOperatingSystem } from './UnsupportedOperatingSystem';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from './UnsupportedOperatingSystem';\n\nexport { _TroubleshootingGuideErrorBar } from './TroubleshootingGuideErrorBar';\nexport type {\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBarProps\n} from './TroubleshootingGuideErrorBar';\n\nexport { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionDropdown';\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from './DevicePermissions/DevicePermissionDropdown';\n\nexport { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';\nexport type { _VideoEffectsItemProps, _VideoEffectsItemStyles } from './VideoEffects/VideoEffectsItem';\nexport {\n _VideoEffectsItemNoBackground,\n _VideoEffectsItemBlur,\n _VideoEffectsItemAddImage\n} from './VideoEffects/PresetVideoEffectsItems';\n\nexport { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';\nexport type {\n _VideoBackgroundEffectsPickerProps,\n _VideoBackgroundEffectChoiceOption,\n _VideoBackgroundEffectsPickerStyles\n} from './VideoEffects/VideoBackgroundEffectsPicker';\n\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';\n\nexport * from './CaptionsBanner';\nexport * from './Caption';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/index.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,6CAA6C;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAcrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAYhD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAQpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAGvE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C,OAAO,EAA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AAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAM/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAOzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,yBAAyB,EAC1B,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,6BAA6B,EAAE,MAAM,6CAA6C,CAAC;AAQ5F,iDAAiD;AACjD,cAAc,kBAAkB,CAAC;AACjC,iDAAiD;AACjD,cAAc,WAAW,CAAC;AAC1B,iDAAiD;AACjD,cAAc,uBAAuB,CAAC;AACtC,iDAAiD;AACjD,cAAc,yBAAyB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nexport { TypingIndicator } from './TypingIndicator';\nexport type { TypingIndicatorProps, TypingIndicatorStrings, TypingIndicatorStylesProps } from './TypingIndicator';\n\nexport { ErrorBar } from './ErrorBar';\nexport type { ActiveErrorMessage, ErrorBarProps, ErrorBarStrings, ErrorType } from './ErrorBar';\n\nexport { GridLayout } from './GridLayout';\nexport type { GridLayoutProps, GridLayoutStyles } from './GridLayout';\n\nexport { SendBox } from './SendBox';\n/* @conditional-compile-remove(at-mention) */\nexport { _AtMentionFlyout } from './AtMentionFlyout';\n\nexport type { SendBoxProps, SendBoxStrings, SendBoxStylesProps } from './SendBox';\n/* @conditional-compile-remove(at-mention) */\nexport type {\n _AtMentionFlyoutProps,\n AtMentionLookupOptions,\n AtMentionDisplayOptions,\n AtMentionOptions,\n AtMentionSuggestion\n} from './AtMentionFlyout';\n/* @conditional-compile-remove(file-sharing) */\nexport type { ActiveFileUpload } from './SendBox';\n\nexport { MessageStatusIndicator } from './MessageStatusIndicator';\nexport type { MessageStatusIndicatorProps, MessageStatusIndicatorStrings } from './MessageStatusIndicator';\n\nexport { MessageThread } from './MessageThread';\nexport type {\n MessageProps,\n MessageThreadProps,\n MessageThreadStrings,\n MessageThreadStyles,\n JumpToNewMessageButtonProps,\n MessageRenderer,\n UpdateMessageCallback,\n CancelEditCallback\n} from './MessageThread';\n\nexport { StreamMedia } from './StreamMedia';\nexport type { StreamMediaProps } from './StreamMedia';\nexport type { LoadingState } from './StreamMedia';\n\nexport { ParticipantItem } from './ParticipantItem';\nexport type { ParticipantItemProps, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\n\nexport { ParticipantList } from './ParticipantList';\nexport type {\n ParticipantListItemStyles,\n ParticipantListProps,\n ParticipantListStyles,\n ParticipantMenuItemsCallback\n} from './ParticipantList';\n\nexport { Announcer } from './Announcer';\nexport type { AnnouncerProps } from './Announcer';\n\nexport { VideoGallery } from './VideoGallery';\nexport type { VideoGalleryProps, VideoGalleryStrings, VideoGalleryStyles, VideoGalleryLayout } from './VideoGallery';\n/* @conditional-compile-remove(pinned-participants) */\nexport type { VideoTileContextualMenuProps, VideoTileDrawerMenuProps } from './VideoGallery';\n/* @conditional-compile-remove(vertical-gallery) */\nexport type { OverflowGalleryPosition } from './VideoGallery';\nexport type { HorizontalGalleryStyles } from './HorizontalGallery';\n\nexport { LocalVideoCameraCycleButton } from './LocalVideoCameraButton';\nexport type { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\n\nexport { CameraButton } from './CameraButton';\nexport type {\n CameraButtonContextualMenuStyles,\n CameraButtonProps,\n CameraButtonStrings,\n CameraButtonStyles\n} from './CameraButton';\n\nexport { ControlBar } from './ControlBar';\nexport type { ControlBarProps, ControlBarLayout } from './ControlBar';\n\nexport { ControlBarButton } from './ControlBarButton';\nexport type { ControlBarButtonProps, ControlBarButtonStrings, ControlBarButtonStyles } from './ControlBarButton';\n\nexport { EndCallButton } from './EndCallButton';\nexport type { EndCallButtonProps, EndCallButtonStrings } from './EndCallButton';\n\nexport { MicrophoneButton } from './MicrophoneButton';\nexport type {\n MicrophoneButtonStyles,\n MicrophoneButtonContextualMenuStyles,\n MicrophoneButtonProps,\n MicrophoneButtonStrings\n} from './MicrophoneButton';\n\nexport { DevicesButton } from './DevicesButton';\nexport type {\n OptionsDevice,\n DevicesButtonProps,\n DevicesButtonStrings,\n DevicesButtonStyles,\n DevicesButtonContextualMenuStyles\n} from './DevicesButton';\n\n/* @conditional-compile-remove(call-readiness) */\nexport {\n CameraAndMicrophoneSitePermissions,\n MicrophoneSitePermissions,\n CameraSitePermissions\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport type { SitePermissionsStrings, SitePermissionsStyles } from './DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n CameraAndMicrophoneSitePermissionsStrings,\n CameraAndMicrophoneSitePermissionsProps,\n CameraSitePermissionsStrings,\n CameraSitePermissionsProps,\n CommonSitePermissionsProps,\n MicrophoneSitePermissionsStrings,\n MicrophoneSitePermissionsProps\n} from './DevicePermissions/SitePermissions';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDenied } from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedStrings,\n BrowserPermissionDeniedStyles,\n BrowserPermissionDeniedProps\n} from './DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nexport { BrowserPermissionDeniedIOS } from './DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */\nexport type {\n BrowserPermissionDeniedIOSStrings,\n BrowserPermissionDeniedIOSProps\n} from './DevicePermissions/BrowserPermissionDeniedIOS';\n\nexport { ParticipantsButton } from './ParticipantsButton';\nexport type {\n ParticipantsButtonContextualMenuStyles,\n ParticipantsButtonProps,\n ParticipantsButtonStrings,\n ParticipantsButtonStyles\n} from './ParticipantsButton';\n\nexport { ScreenShareButton } from './ScreenShareButton';\nexport type { ScreenShareButtonProps, ScreenShareButtonStrings } from './ScreenShareButton';\n\nexport { VideoTile } from './VideoTile';\nexport type { VideoTileProps, VideoTileStylesProps } from './VideoTile';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { VideoTileStrings } from './VideoTile';\n\nexport { _PictureInPictureInPicture } from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureProps,\n _PictureInPictureInPictureStrings\n} from './PictureInPictureInPicture/PictureInPictureInPicture';\nexport type {\n _PictureInPictureInPictureTileProps,\n _TileOrientation\n} from './PictureInPictureInPicture/PictureInPictureInPictureTile';\n\nexport * from './Drawer';\n/* @conditional-compile-remove(file-sharing) */\nexport type { SendBoxErrorBarError } from './SendBoxErrorBar';\nexport * from './FileCard';\nexport * from './FileCardGroup';\nexport * from './ModalClone/ModalClone';\nexport * from './FileDownloadCards';\nexport type { _FileUploadCardsStrings } from './FileUploadCards';\n\nexport { _useContainerHeight, _useContainerWidth } from './utils/responsive';\n\nexport { _ComplianceBanner } from './ComplianceBanner';\nexport type { _ComplianceBannerProps, _ComplianceBannerStrings } from './ComplianceBanner';\nexport { Dialpad } from './Dialpad/Dialpad';\nexport type { DialpadProps, DialpadStrings, DialpadStyles, DtmfTone } from './Dialpad/Dialpad';\n\n/* @conditional-compile-remove(PSTN-calls) */\nexport { HoldButton } from './HoldButton';\n/* @conditional-compile-remove(PSTN-calls) */\nexport type { HoldButtonProps, HoldButtonStrings } from './HoldButton';\n\nexport { _LocalVideoTile } from './LocalVideoTile';\nexport { _RemoteVideoTile } from './RemoteVideoTile';\nexport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\nexport type { _HighContrastAwareIconProps } from './HighContrastAwareIcon';\n\nexport { UnsupportedBrowser } from './UnsupportedBrowser';\nexport type { UnsupportedBrowserStrings, UnsupportedBrowserProps } from './UnsupportedBrowser';\nexport { UnsupportedBrowserVersion } from './UnsupportedBrowserVersion';\nexport type { UnsupportedBrowserVersionStrings, UnsupportedBrowserVersionProps } from './UnsupportedBrowserVersion';\nexport { UnsupportedOperatingSystem } from './UnsupportedOperatingSystem';\nexport type { UnsupportedOperatingSystemStrings, UnsupportedOperatingSystemProps } from './UnsupportedOperatingSystem';\n\nexport { _TroubleshootingGuideErrorBar } from './TroubleshootingGuideErrorBar';\nexport type {\n _TroubleshootingGuideErrorBarStrings,\n _TroubleshootingGuideErrorBarProps\n} from './TroubleshootingGuideErrorBar';\n\nexport { _DevicePermissionDropdown } from './DevicePermissions/DevicePermissionDropdown';\nexport type {\n _DevicePermissionDropdownStrings,\n _DevicePermissionDropdownProps,\n _PermissionConstraints\n} from './DevicePermissions/DevicePermissionDropdown';\n\nexport { _VideoEffectsItem } from './VideoEffects/VideoEffectsItem';\nexport type { _VideoEffectsItemProps, _VideoEffectsItemStyles } from './VideoEffects/VideoEffectsItem';\nexport {\n _VideoEffectsItemNoBackground,\n _VideoEffectsItemBlur,\n _VideoEffectsItemAddImage\n} from './VideoEffects/PresetVideoEffectsItems';\n\nexport { _VideoBackgroundEffectsPicker } from './VideoEffects/VideoBackgroundEffectsPicker';\nexport type {\n _VideoBackgroundEffectsPickerProps,\n _VideoBackgroundEffectChoiceOption,\n _VideoBackgroundEffectsPickerStyles\n} from './VideoEffects/VideoBackgroundEffectsPicker';\n\nexport type { VerticalGalleryStyles, VerticalGalleryStrings, VerticalGalleryControlBarStyles } from './VerticalGallery';\n/* @conditional-compile-remove(close-captions) */\nexport * from './CaptionsBanner';\n/* @conditional-compile-remove(close-captions) */\nexport * from './Caption';\n/* @conditional-compile-remove(close-captions) */\nexport * from './StartCaptionsButton';\n/* @conditional-compile-remove(close-captions) */\nexport * from './CaptionsSettingsModal';\n"]}
@@ -18,4 +18,12 @@ export declare const captionContainerClassName: string;
18
18
  * @private
19
19
  */
20
20
  export declare const captionsBannerClassName: string;
21
+ /**
22
+ * @private
23
+ */
24
+ export declare const captionsContentContainerClassName: string;
25
+ /**
26
+ * @private
27
+ */
28
+ export declare const displayNameContainerClassName: string;
21
29
  //# sourceMappingURL=Captions.style.d.ts.map
@@ -29,13 +29,28 @@ export const captionClassName = mergeStyles({
29
29
  */
30
30
  export const captionContainerClassName = mergeStyles({
31
31
  marginTop: _pxToRem(6),
32
- marginBottom: _pxToRem(6)
32
+ marginBottom: _pxToRem(6),
33
+ overflowAnchor: 'none'
33
34
  });
34
35
  /**
35
36
  * @private
36
37
  */
37
38
  export const captionsBannerClassName = mergeStyles({
38
39
  height: _pxToRem(100),
39
- overflow: 'scroll'
40
+ overflowY: 'auto',
41
+ overflowX: 'hidden'
42
+ });
43
+ /**
44
+ * @private
45
+ */
46
+ export const captionsContentContainerClassName = mergeStyles({
47
+ minWidth: 0
48
+ });
49
+ /**
50
+ * @private
51
+ */
52
+ export const displayNameContainerClassName = mergeStyles({
53
+ overflow: 'hidden',
54
+ textOverflow: 'ellipsis'
40
55
  });
41
56
  //# sourceMappingURL=Captions.style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Captions.style.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/Captions.style.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,sCAAgC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACvC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;IAC1C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC;IACnD,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IACtB,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC;IACjD,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC;IACrB,QAAQ,EAAE,QAAQ;CACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const iconClassName = mergeStyles({\n marginRight: _pxToRem(8)\n});\n\n/**\n * @private\n */\nexport const displayNameClassName = mergeStyles({\n fontWeight: 400,\n fontSize: _pxToRem(12),\n lineHeight: _pxToRem(16)\n});\n\n/**\n * @private\n */\nexport const captionClassName = mergeStyles({\n fontWeight: 400,\n fontSize: _pxToRem(16),\n lineHeight: _pxToRem(22)\n});\n\n/**\n * @private\n */\nexport const captionContainerClassName = mergeStyles({\n marginTop: _pxToRem(6),\n marginBottom: _pxToRem(6)\n});\n\n/**\n * @private\n */\nexport const captionsBannerClassName = mergeStyles({\n height: _pxToRem(100),\n overflow: 'scroll'\n});\n\"../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"Captions.style.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/Captions.style.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,sCAAgC;AAEnD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACvC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,WAAW,CAAC;IAC9C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;IAC1C,UAAU,EAAE,GAAG;IACf,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC;IACtB,UAAU,EAAE,QAAQ,CAAC,EAAE,CAAC;CACzB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,WAAW,CAAC;IACnD,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC;IACtB,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IACzB,cAAc,EAAE,MAAM;CACvB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAC;IACjD,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC;IACrB,SAAS,EAAE,MAAM;IACjB,SAAS,EAAE,QAAQ;CACpB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,WAAW,CAAC;IAC3D,QAAQ,EAAE,CAAC;CACZ,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,WAAW,CAAC;IACvD,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,UAAU;CACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles } from '@fluentui/react';\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/**\n * @private\n */\nexport const iconClassName = mergeStyles({\n marginRight: _pxToRem(8)\n});\n\n/**\n * @private\n */\nexport const displayNameClassName = mergeStyles({\n fontWeight: 400,\n fontSize: _pxToRem(12),\n lineHeight: _pxToRem(16)\n});\n\n/**\n * @private\n */\nexport const captionClassName = mergeStyles({\n fontWeight: 400,\n fontSize: _pxToRem(16),\n lineHeight: _pxToRem(22)\n});\n\n/**\n * @private\n */\nexport const captionContainerClassName = mergeStyles({\n marginTop: _pxToRem(6),\n marginBottom: _pxToRem(6),\n overflowAnchor: 'none'\n});\n\n/**\n * @private\n */\nexport const captionsBannerClassName = mergeStyles({\n height: _pxToRem(100),\n overflowY: 'auto',\n overflowX: 'hidden'\n});\n\n/**\n * @private\n */\nexport const captionsContentContainerClassName = mergeStyles({\n minWidth: 0\n});\n\n/**\n * @private\n */\nexport const displayNameContainerClassName = mergeStyles({\n overflow: 'hidden',\n textOverflow: 'ellipsis'\n});\n\"../../../../acs-ui-common/src\""]}
@@ -0,0 +1,34 @@
1
+ import { IButtonStyles, IDropdownStyles, IModalStyles, Theme } from '@fluentui/react';
2
+ /**
3
+ * @private
4
+ */
5
+ export declare const themedCaptionsSettingsModalStyle: (theme: Theme) => Partial<IModalStyles>;
6
+ /**
7
+ * @private
8
+ */
9
+ export declare const titleClassName: string;
10
+ /**
11
+ * @private
12
+ */
13
+ export declare const titleContainerClassName: string;
14
+ /**
15
+ * @private
16
+ */
17
+ export declare const dropdownContainerClassName: string;
18
+ /**
19
+ * @private
20
+ */
21
+ export declare const dropdownInfoTextStyle: (theme: Theme) => string;
22
+ /**
23
+ * @private
24
+ */
25
+ export declare const buttonsContainerClassName: string;
26
+ /**
27
+ * @private
28
+ */
29
+ export declare const buttonStyles: (theme: Theme) => IButtonStyles;
30
+ /**
31
+ * @private
32
+ */
33
+ export declare const dropdownStyles: Partial<IDropdownStyles>;
34
+ //# sourceMappingURL=CaptionsSettingsModal.styles.d.ts.map
@@ -0,0 +1,85 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { mergeStyles } from '@fluentui/react';
4
+ import { _pxToRem } from "../../../../acs-ui-common/src";
5
+ /**
6
+ * @private
7
+ */
8
+ export const themedCaptionsSettingsModalStyle = (theme) => ({
9
+ main: {
10
+ borderRadius: theme.effects.roundedCorner6,
11
+ padding: _pxToRem(24),
12
+ width: _pxToRem(440),
13
+ height: _pxToRem(268),
14
+ overflow: 'hidden'
15
+ }
16
+ });
17
+ /**
18
+ * @private
19
+ */
20
+ export const titleClassName = mergeStyles({
21
+ fontWeight: 600,
22
+ fontSize: _pxToRem(20),
23
+ lineHeight: _pxToRem(28)
24
+ });
25
+ /**
26
+ * @private
27
+ */
28
+ export const titleContainerClassName = mergeStyles({
29
+ paddingBottom: _pxToRem(20)
30
+ });
31
+ /**
32
+ * @private
33
+ */
34
+ export const dropdownContainerClassName = mergeStyles({
35
+ paddingBottom: _pxToRem(16),
36
+ paddingTop: _pxToRem(16)
37
+ });
38
+ /**
39
+ * @private
40
+ */
41
+ export const dropdownInfoTextStyle = (theme) => mergeStyles({
42
+ fontWeight: 400,
43
+ fontSize: _pxToRem(12),
44
+ lineHeight: _pxToRem(16),
45
+ color: theme.palette.neutralSecondary
46
+ });
47
+ /**
48
+ * @private
49
+ */
50
+ export const buttonsContainerClassName = mergeStyles({
51
+ paddingTop: _pxToRem(16)
52
+ });
53
+ /**
54
+ * @private
55
+ */
56
+ export const buttonStyles = (theme) => {
57
+ return {
58
+ root: {
59
+ borderRadius: _pxToRem(2),
60
+ margin: _pxToRem(8)
61
+ },
62
+ rootHovered: {
63
+ backgroundColor: theme.palette.themePrimary,
64
+ borderColor: theme.palette.themePrimary,
65
+ color: theme.palette.white
66
+ },
67
+ rootFocused: {
68
+ backgroundColor: theme.palette.themePrimary,
69
+ borderColor: theme.palette.themePrimary,
70
+ color: theme.palette.white
71
+ },
72
+ rootPressed: {
73
+ backgroundColor: theme.palette.themePrimary,
74
+ borderColor: theme.palette.themePrimary,
75
+ color: theme.palette.white
76
+ }
77
+ };
78
+ };
79
+ /**
80
+ * @private
81
+ */
82
+ export const dropdownStyles = {
83
+ callout: { height: _pxToRem(300), overflow: 'auto' }
84
+ };
85
+ //# sourceMappingURL=CaptionsSettingsModal.styles.js.map