@azure/communication-react 1.8.1-alpha-202309300012 → 1.8.1-alpha-202310050013

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 (117) hide show
  1. package/dist/communication-react.d.ts +8 -9
  2. package/dist/dist-cjs/communication-react/index.js +921 -490
  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/react-components/src/components/CaptionsBanner.js +5 -7
  7. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionMenu.d.ts +2 -2
  9. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionMenu.js +5 -22
  10. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionMenu.js.map +1 -1
  11. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js +2 -1
  12. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageActionsFlyout.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.d.ts +2 -3
  14. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js +1 -1
  15. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponent.js.map +1 -1
  16. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.d.ts +0 -5
  17. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js +17 -13
  18. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsEditBox.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.d.ts +9 -0
  20. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js +79 -20
  21. package/dist/dist-esm/react-components/src/components/ChatMessage/ChatMessageComponentAsMessageBubble.js.map +1 -1
  22. package/dist/dist-esm/react-components/src/components/ImageGallery.js +8 -16
  23. package/dist/dist-esm/react-components/src/components/ImageGallery.js.map +1 -1
  24. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +9 -8
  25. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  26. package/dist/dist-esm/react-components/src/components/MessageThread.d.ts +15 -1
  27. package/dist/dist-esm/react-components/src/components/MessageThread.js +114 -93
  28. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/SystemMessage.js +1 -1
  30. package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
  31. package/dist/dist-esm/react-components/src/components/VerticalGallery.js +1 -1
  32. package/dist/dist-esm/react-components/src/components/VerticalGallery.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js +4 -4
  34. package/dist/dist-esm/react-components/src/components/VideoGallery/DefaultLayout.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js +6 -6
  36. package/dist/dist-esm/react-components/src/components/VideoGallery/FloatingLocalVideoLayout.js.map +1 -1
  37. package/dist/dist-esm/react-components/src/components/VideoGallery/LargeGalleryLayout.js +4 -4
  38. package/dist/dist-esm/react-components/src/components/VideoGallery/LargeGalleryLayout.js.map +1 -1
  39. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.d.ts +1 -1
  40. package/dist/dist-esm/react-components/src/components/VideoGallery/Layout.js.map +1 -1
  41. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js +4 -4
  42. package/dist/dist-esm/react-components/src/components/VideoGallery/OverflowGallery.js.map +1 -1
  43. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js +6 -6
  44. package/dist/dist-esm/react-components/src/components/VideoGallery/SpeakerVideoLayout.js.map +1 -1
  45. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +1 -1
  46. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js +2 -2
  47. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +2 -2
  49. package/dist/dist-esm/react-components/src/components/VideoGallery.js +1 -1
  50. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  51. package/dist/dist-esm/react-components/src/components/styles/Captions.style.d.ts +1 -1
  52. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +4 -4
  53. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.d.ts +5 -7
  55. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js +24 -9
  56. package/dist/dist-esm/react-components/src/components/styles/ChatMessageComponent.styles.js.map +1 -1
  57. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.d.ts +3 -2
  58. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js +10 -6
  59. package/dist/dist-esm/react-components/src/components/styles/EditBox.styles.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.d.ts +0 -4
  61. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js +0 -10
  62. package/dist/dist-esm/react-components/src/components/styles/ImageGallery.style.js.map +1 -1
  63. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.d.ts +4 -0
  64. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js +8 -2
  65. package/dist/dist-esm/react-components/src/components/styles/InputBoxComponent.style.js.map +1 -1
  66. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.d.ts +10 -19
  67. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +129 -119
  68. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.d.ts +8 -0
  70. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js +8 -2
  71. package/dist/dist-esm/react-components/src/components/styles/SendBox.styles.js.map +1 -1
  72. package/dist/dist-esm/react-components/src/components/styles/SystemMessage.styles.js +1 -1
  73. package/dist/dist-esm/react-components/src/components/styles/SystemMessage.styles.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/styles/v8StyleShim.d.ts +12 -0
  75. package/dist/dist-esm/react-components/src/components/styles/v8StyleShim.js +37 -0
  76. package/dist/dist-esm/react-components/src/components/styles/v8StyleShim.js.map +1 -0
  77. package/dist/dist-esm/react-components/src/components/utils/Datetime.d.ts +7 -8
  78. package/dist/dist-esm/react-components/src/components/utils/Datetime.js +9 -31
  79. package/dist/dist-esm/react-components/src/components/utils/Datetime.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +1 -1
  81. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  82. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -2
  83. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.d.ts +3 -4
  84. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js +40 -52
  85. package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.d.ts +22 -0
  87. package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.js +29 -0
  88. package/dist/dist-esm/react-components/src/theming/FluentV9ThemeProvider.js.map +1 -0
  89. package/dist/dist-esm/react-components/src/theming/themeDuplicates.d.ts +29 -0
  90. package/dist/dist-esm/react-components/src/theming/themeDuplicates.js +121 -0
  91. package/dist/dist-esm/react-components/src/theming/themeDuplicates.js.map +1 -0
  92. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.d.ts +12 -0
  93. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js +206 -0
  94. package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js.map +1 -0
  95. package/dist/dist-esm/react-components/src/types/ChatMessage.d.ts +2 -2
  96. package/dist/dist-esm/react-components/src/types/ChatMessage.js.map +1 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +1 -1
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.d.ts +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js +3 -3
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/MediaGallery.js.map +1 -1
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +2 -2
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -1
  106. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +31 -28
  109. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
  110. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +22 -17
  111. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  112. package/dist/dist-esm/react-composites/src/composites/common/icons.js +3 -3
  113. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +5 -5
  115. package/package.json +12 -11
  116. package/dist/dist-esm/northstar-wrapper/src/index.js +0 -2
  117. package/dist/dist-esm/northstar-wrapper/src/index.js.LICENSE.txt +0 -41
@@ -4,46 +4,24 @@
4
4
  * @private
5
5
  */
6
6
  export const formatTimeForChatMessage = (messageDate) => {
7
- let hours = messageDate.getHours();
8
- let minutes = messageDate.getMinutes().toString();
9
- const isAm = hours < 12;
10
- if (hours > 12) {
11
- hours = hours - 12;
12
- }
13
- if (hours === 0) {
14
- hours = 12;
15
- }
16
- if (minutes.length < 2) {
17
- minutes = '0' + minutes;
18
- }
19
- return hours.toString() + ':' + minutes + ' ' + (isAm ? 'a.m.' : 'p.m.');
7
+ return messageDate.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });
20
8
  };
21
9
  /**
22
10
  * @private
23
11
  */
24
12
  export const formatDateForChatMessage = (messageDate) => {
25
- const year = messageDate.getFullYear().toString();
26
- let month = (messageDate.getMonth() + 1).toString();
27
- let day = messageDate.getDate().toString();
28
- if (month.length === 1) {
29
- month = '0' + month;
30
- }
31
- if (day.length === 1) {
32
- day = '0' + day;
33
- }
34
- return year + '-' + month + '-' + day;
13
+ return messageDate.toLocaleDateString();
35
14
  };
36
15
  /**
37
- * Given a message date object in ISO8601 and a current date object, generates a user friendly timestamp text like the
38
- * following:
39
- *
40
- * 1:30 p.m.
41
- * Yesterday 1:30 p.m.
42
- * Monday 1:30 p.m.
43
- * 2021-01-10 1:30 p.m.
16
+ * Given a message date object in ISO8601 and a current date object, generates a user friendly timestamp text
17
+ * using the system locale.
18
+ * <time in locale format>.
19
+ * Yesterday <time in locale format>.
20
+ * <dateStrings day of week> <time in locale format>.
21
+ * <date in locale format> <time in locale format>.
44
22
  *
45
23
  * If message is after yesterday, then only show the time.
46
- * If message is before yesteray and after day before yesterday, then show 'Yesterday' plus the time.
24
+ * If message is before yesterday and after day before yesterday, then show 'Yesterday' plus the time.
47
25
  * If message is before day before yesterday and within the current week, then show 'Monday/Tuesday/etc' plus the time.
48
26
  * - We consider start of the week as Sunday. If current day is Sunday, then any time before that is in previous week.
49
27
  * If message is in previous or older weeks, then show date string plus the time.
@@ -1 +1 @@
1
- {"version":3,"file":"Datetime.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/Datetime.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAiB,EAAU,EAAE;IACpE,IAAI,KAAK,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;IACnC,IAAI,OAAO,GAAG,WAAW,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC;IAClD,MAAM,IAAI,GAAG,KAAK,GAAG,EAAE,CAAC;IACxB,IAAI,KAAK,GAAG,EAAE,EAAE;QACd,KAAK,GAAG,KAAK,GAAG,EAAE,CAAC;KACpB;IACD,IAAI,KAAK,KAAK,CAAC,EAAE;QACf,KAAK,GAAG,EAAE,CAAC;KACZ;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;QACtB,OAAO,GAAG,GAAG,GAAG,OAAO,CAAC;KACzB;IACD,OAAO,KAAK,CAAC,QAAQ,EAAE,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAC3E,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAiB,EAAU,EAAE;IACpE,MAAM,IAAI,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC;IAClD,IAAI,KAAK,GAAG,CAAC,WAAW,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IACpD,IAAI,GAAG,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC;IAE3C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACtB,KAAK,GAAG,GAAG,GAAG,KAAK,CAAC;KACrB;IACD,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE;QACpB,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;KACjB;IAED,OAAO,IAAI,GAAG,GAAG,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,CAAC;AACxC,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,WAAiB,EACjB,SAAe,EACf,WAAiC,EACzB,EAAE;IACV,qFAAqF;IACrF,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAChG,IAAI,WAAW,GAAG,UAAU,EAAE;QAC5B,OAAO,wBAAwB,CAAC,WAAW,CAAC,CAAC;KAC9C;IAED,qFAAqF;IACrF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IACvG,IAAI,WAAW,GAAG,aAAa,EAAE;QAC/B,OAAO,WAAW,CAAC,SAAS,GAAG,GAAG,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;KAC5E;IAED,iGAAiG;IACjG,0BAA0B;IAC1B,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;IACnC,IAAI,OAAO,KAAK,CAAC,EAAE;QACjB,OAAO,wBAAwB,CAAC,WAAW,CAAC,GAAG,GAAG,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;KAC5F;IAED,6FAA6F;IAC7F,MAAM,qBAAqB,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC;IACrH,IAAI,WAAW,GAAG,qBAAqB,EAAE;QACvC,OAAO,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,GAAG,GAAG,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;KACtG;IAED,mGAAmG;IACnG,OAAO,wBAAwB,CAAC,WAAW,CAAC,GAAG,GAAG,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;AAC7F,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,WAAiC,EAAU,EAAE;IAC9E,QAAQ,GAAG,EAAE;QACX,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,MAAM,CAAC;QAC5B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,MAAM,CAAC;QAC5B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,OAAO,CAAC;QAC7B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,SAAS,CAAC;QAC/B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,QAAQ,CAAC;QAC9B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,MAAM,CAAC;QAC5B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,QAAQ,CAAC;QAC9B;YACE,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,UAAU,CAAC,CAAC;KAClD;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageThreadStrings } from '../MessageThread';\n\n/**\n * @private\n */\nexport const formatTimeForChatMessage = (messageDate: Date): string => {\n let hours = messageDate.getHours();\n let minutes = messageDate.getMinutes().toString();\n const isAm = hours < 12;\n if (hours > 12) {\n hours = hours - 12;\n }\n if (hours === 0) {\n hours = 12;\n }\n if (minutes.length < 2) {\n minutes = '0' + minutes;\n }\n return hours.toString() + ':' + minutes + ' ' + (isAm ? 'a.m.' : 'p.m.');\n};\n\n/**\n * @private\n */\nexport const formatDateForChatMessage = (messageDate: Date): string => {\n const year = messageDate.getFullYear().toString();\n let month = (messageDate.getMonth() + 1).toString();\n let day = messageDate.getDate().toString();\n\n if (month.length === 1) {\n month = '0' + month;\n }\n if (day.length === 1) {\n day = '0' + day;\n }\n\n return year + '-' + month + '-' + day;\n};\n\n/**\n * Given a message date object in ISO8601 and a current date object, generates a user friendly timestamp text like the\n * following:\n *\n * 1:30 p.m.\n * Yesterday 1:30 p.m.\n * Monday 1:30 p.m.\n * 2021-01-10 1:30 p.m.\n *\n * If message is after yesterday, then only show the time.\n * If message is before yesteray and after day before yesterday, then show 'Yesterday' plus the time.\n * If message is before day before yesterday and within the current week, then show 'Monday/Tuesday/etc' plus the time.\n * - We consider start of the week as Sunday. If current day is Sunday, then any time before that is in previous week.\n * If message is in previous or older weeks, then show date string plus the time.\n *\n * @param messageDate - date of message\n * @param currentDate - date used as offset to create the user friendly timestamp (e.g. to create 'Yesterday' instead of an absolute date)\n *\n * @private\n */\nexport const formatTimestampForChatMessage = (\n messageDate: Date,\n todayDate: Date,\n dateStrings: MessageThreadStrings\n): string => {\n // If message was in the same day timestamp string is just the time like '1:30 p.m.'.\n const startOfDay = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate());\n if (messageDate > startOfDay) {\n return formatTimeForChatMessage(messageDate);\n }\n\n // If message was yesterday then timestamp string is like this 'Yesterday 1:30 p.m.'.\n const yesterdayDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate() - 1);\n if (messageDate > yesterdayDate) {\n return dateStrings.yesterday + ' ' + formatTimeForChatMessage(messageDate);\n }\n\n // If message was before Sunday and today is Sunday (start of week) then timestamp string is like\n // '2021-01-10 1:30 p.m.'.\n const weekDay = todayDate.getDay();\n if (weekDay === 0) {\n return formatDateForChatMessage(messageDate) + ' ' + formatTimeForChatMessage(messageDate);\n }\n\n // If message was before first day of the week then timestamp string is like Monday 1:30 p.m.\n const firstDayOfTheWeekDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate() - weekDay);\n if (messageDate > firstDayOfTheWeekDate) {\n return dayToDayName(messageDate.getDay(), dateStrings) + ' ' + formatTimeForChatMessage(messageDate);\n }\n\n // If message date is in previous or older weeks then timestamp string is like 2021-01-10 1:30 p.m.\n return formatDateForChatMessage(messageDate) + ' ' + formatTimeForChatMessage(messageDate);\n};\n\nconst dayToDayName = (day: number, dateStrings: MessageThreadStrings): string => {\n switch (day) {\n case 0:\n return dateStrings.sunday;\n case 1:\n return dateStrings.monday;\n case 2:\n return dateStrings.tuesday;\n case 3:\n return dateStrings.wednesday;\n case 4:\n return dateStrings.thursday;\n case 5:\n return dateStrings.friday;\n case 6:\n return dateStrings.saturday;\n default:\n throw new Error(`Invalid day [${day}] passed`);\n }\n};\n"]}
1
+ {"version":3,"file":"Datetime.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/Datetime.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAiB,EAAU,EAAE;IACpE,OAAO,WAAW,CAAC,kBAAkB,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC;AACpF,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,WAAiB,EAAU,EAAE;IACpE,OAAO,WAAW,CAAC,kBAAkB,EAAE,CAAC;AAC1C,CAAC,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAC3C,WAAiB,EACjB,SAAe,EACf,WAAiC,EACzB,EAAE;IACV,qFAAqF;IACrF,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;IAChG,IAAI,WAAW,GAAG,UAAU,EAAE;QAC5B,OAAO,wBAAwB,CAAC,WAAW,CAAC,CAAC;KAC9C;IAED,qFAAqF;IACrF,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;IACvG,IAAI,WAAW,GAAG,aAAa,EAAE;QAC/B,OAAO,WAAW,CAAC,SAAS,GAAG,GAAG,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;KAC5E;IAED,iGAAiG;IACjG,0BAA0B;IAC1B,MAAM,OAAO,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC;IACnC,IAAI,OAAO,KAAK,CAAC,EAAE;QACjB,OAAO,wBAAwB,CAAC,WAAW,CAAC,GAAG,GAAG,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;KAC5F;IAED,6FAA6F;IAC7F,MAAM,qBAAqB,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,CAAC,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC;IACrH,IAAI,WAAW,GAAG,qBAAqB,EAAE;QACvC,OAAO,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,EAAE,WAAW,CAAC,GAAG,GAAG,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;KACtG;IAED,mGAAmG;IACnG,OAAO,wBAAwB,CAAC,WAAW,CAAC,GAAG,GAAG,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;AAC7F,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,WAAiC,EAAU,EAAE;IAC9E,QAAQ,GAAG,EAAE;QACX,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,MAAM,CAAC;QAC5B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,MAAM,CAAC;QAC5B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,OAAO,CAAC;QAC7B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,SAAS,CAAC;QAC/B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,QAAQ,CAAC;QAC9B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,MAAM,CAAC;QAC5B,KAAK,CAAC;YACJ,OAAO,WAAW,CAAC,QAAQ,CAAC;QAC9B;YACE,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,UAAU,CAAC,CAAC;KAClD;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { MessageThreadStrings } from '../MessageThread';\n\n/**\n * @private\n */\nexport const formatTimeForChatMessage = (messageDate: Date): string => {\n return messageDate.toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' });\n};\n\n/**\n * @private\n */\nexport const formatDateForChatMessage = (messageDate: Date): string => {\n return messageDate.toLocaleDateString();\n};\n\n/**\n * Given a message date object in ISO8601 and a current date object, generates a user friendly timestamp text\n * using the system locale.\n * <time in locale format>.\n * Yesterday <time in locale format>.\n * <dateStrings day of week> <time in locale format>.\n * <date in locale format> <time in locale format>.\n *\n * If message is after yesterday, then only show the time.\n * If message is before yesterday and after day before yesterday, then show 'Yesterday' plus the time.\n * If message is before day before yesterday and within the current week, then show 'Monday/Tuesday/etc' plus the time.\n * - We consider start of the week as Sunday. If current day is Sunday, then any time before that is in previous week.\n * If message is in previous or older weeks, then show date string plus the time.\n *\n * @param messageDate - date of message\n * @param currentDate - date used as offset to create the user friendly timestamp (e.g. to create 'Yesterday' instead of an absolute date)\n *\n * @private\n */\nexport const formatTimestampForChatMessage = (\n messageDate: Date,\n todayDate: Date,\n dateStrings: MessageThreadStrings\n): string => {\n // If message was in the same day timestamp string is just the time like '1:30 p.m.'.\n const startOfDay = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate());\n if (messageDate > startOfDay) {\n return formatTimeForChatMessage(messageDate);\n }\n\n // If message was yesterday then timestamp string is like this 'Yesterday 1:30 p.m.'.\n const yesterdayDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate() - 1);\n if (messageDate > yesterdayDate) {\n return dateStrings.yesterday + ' ' + formatTimeForChatMessage(messageDate);\n }\n\n // If message was before Sunday and today is Sunday (start of week) then timestamp string is like\n // '2021-01-10 1:30 p.m.'.\n const weekDay = todayDate.getDay();\n if (weekDay === 0) {\n return formatDateForChatMessage(messageDate) + ' ' + formatTimeForChatMessage(messageDate);\n }\n\n // If message was before first day of the week then timestamp string is like Monday 1:30 p.m.\n const firstDayOfTheWeekDate = new Date(todayDate.getFullYear(), todayDate.getMonth(), todayDate.getDate() - weekDay);\n if (messageDate > firstDayOfTheWeekDate) {\n return dayToDayName(messageDate.getDay(), dateStrings) + ' ' + formatTimeForChatMessage(messageDate);\n }\n\n // If message date is in previous or older weeks then timestamp string is like 2021-01-10 1:30 p.m.\n return formatDateForChatMessage(messageDate) + ' ' + formatTimeForChatMessage(messageDate);\n};\n\nconst dayToDayName = (day: number, dateStrings: MessageThreadStrings): string => {\n switch (day) {\n case 0:\n return dateStrings.sunday;\n case 1:\n return dateStrings.monday;\n case 2:\n return dateStrings.tuesday;\n case 3:\n return dateStrings.wednesday;\n case 4:\n return dateStrings.thursday;\n case 5:\n return dateStrings.friday;\n case 6:\n return dateStrings.saturday;\n default:\n throw new Error(`Invalid day [${day}] passed`);\n }\n};\n"]}
@@ -109,7 +109,7 @@ export interface ComponentStrings {
109
109
  /**
110
110
  * Strings for the VerticalGallery.
111
111
  */
112
- VerticalGallery: VerticalGalleryStrings;
112
+ verticalGallery: VerticalGalleryStrings;
113
113
  /** Strings for the participant list component */
114
114
  ParticipantList: ParticipantListStrings;
115
115
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/localization/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAiCzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AA8InD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAkB,sBAAsB,CAAC,CAAC;AAcpF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnC,OAAO,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IAAG,QAAQ,CAA0B,CAAC;AACpF,CAAC,CAAC;AAEF,kCAAkC;AAClC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAoB,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { createContext, useContext } from 'react';\nimport {\n CameraButtonStrings,\n EndCallButtonStrings,\n ErrorBarStrings,\n MessageStatusIndicatorStrings,\n MessageThreadStrings,\n MicrophoneButtonStrings,\n DevicesButtonStrings,\n ParticipantsButtonStrings,\n ParticipantItemStrings,\n ScreenShareButtonStrings,\n SendBoxStrings,\n TypingIndicatorStrings,\n VideoGalleryStrings\n} from '../components';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButtonStrings } from '../components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButtonStrings } from '../components';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { DialpadStrings } from '../components';\n/* @conditional-compile-remove(call-readiness) */\nimport { SitePermissionsStrings } from '../components/DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedStrings } from '../components/DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedIOSStrings } from '../components/DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserStrings } from '../components/UnsupportedBrowser';\n/* @conditional-compile-remove(one-to-n-calling) */\n// @conditional-compile-remove(PSTN-calls)\nimport { VideoTileStrings } from '../components/VideoTile';\nimport { COMPONENT_LOCALE_EN_US } from './locales';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserVersionStrings } from '../components/UnsupportedBrowserVersion';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedOperatingSystemStrings } from '../components/UnsupportedOperatingSystem';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { VerticalGalleryStrings } from '../components/VerticalGallery';\n/* @conditional-compile-remove(total-participant-count) */\nimport { ParticipantListStrings } from '../components/ParticipantList';\n/* @conditional-compile-remove(mention) */\nimport { MentionPopoverStrings } from '../components/MentionPopover';\n/* @conditional-compile-remove(image-gallery) */\nimport { ImageGalleryStrings } from '../components/ImageGallery';\n\n/**\n * Locale information for all components exported from this library.\n *\n * @public\n */\nexport interface ComponentLocale {\n /** Strings for components */\n strings: ComponentStrings;\n /* @conditional-compile-remove(date-time-customization) */\n /**\n * Optional function to provide customized date format.\n * @beta\n */\n onDisplayDateTimeString?: (messageDate: Date) => string;\n}\n\n/**\n * Strings used by all components exported from this library.\n *\n * @public\n */\nexport interface ComponentStrings {\n /** Strings for MessageThread */\n messageThread: MessageThreadStrings;\n /** Strings for ParticipantItem */\n participantItem: ParticipantItemStrings;\n /** Strings for CameraButton */\n cameraButton: CameraButtonStrings;\n /** Strings for MicrophoneButton */\n microphoneButton: MicrophoneButtonStrings;\n /** Strings for EndCallButton */\n endCallButton: EndCallButtonStrings;\n /** Strings for DevicesButton */\n devicesButton: DevicesButtonStrings;\n /** Strings for ParticipantsButton */\n participantsButton: ParticipantsButtonStrings;\n /** Strings for ScreenShareButton */\n screenShareButton: ScreenShareButtonStrings;\n /* @conditional-compile-remove(raise-hand) */\n /** Strings for RaiseHandButton */\n raiseHandButton: RaiseHandButtonStrings;\n /** Strings for TypingIndicator */\n typingIndicator: TypingIndicatorStrings;\n /** Strings for SendBox */\n sendBox: SendBoxStrings;\n /* @conditional-compile-remove(mention) */\n /** Strings for MentionPopover */\n mentionPopover: MentionPopoverStrings;\n /* @conditional-compile-remove(image-gallery) */\n /** Strings for ImageGallery */\n imageGallery: ImageGalleryStrings;\n /** Strings for MessageStatusIndicator */\n messageStatusIndicator: MessageStatusIndicatorStrings;\n /** Strings for ErroBar */\n errorBar: ErrorBarStrings;\n /** Strings for VideoGallery */\n videoGallery: VideoGalleryStrings;\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n /** Strings for Dialpad */\n dialpad: DialpadStrings;\n /* @conditional-compile-remove(one-to-n-calling) */\n // @conditional-compile-remove(PSTN-calls)\n /** Strings for VideoTile */\n videoTile: VideoTileStrings;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /** Strings for HoldButton */\n holdButton: HoldButtonStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraAndMicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n MicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraAndMicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n MicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraAndMicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraAndMicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n MicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n MicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser UI */\n UnsupportedBrowser: UnsupportedBrowserStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedBrowserVersion: UnsupportedBrowserVersionStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedOperatingSystem: UnsupportedOperatingSystemStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDenied */\n BrowserPermissionDenied: BrowserPermissionDeniedStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDeniedIOS */\n BrowserPermissionDeniedIOS: BrowserPermissionDeniedIOSStrings;\n /* @conditional-compile-remove(vertical-gallery) */\n /**\n * Strings for the VerticalGallery.\n */\n VerticalGallery: VerticalGalleryStrings;\n /* @conditional-compile-remove(total-participant-count) */\n /** Strings for the participant list component */\n ParticipantList: ParticipantListStrings;\n}\n\n/**\n * Context for providing localized strings to components exported from this library.\n *\n * @public\n */\nexport const LocaleContext = createContext<ComponentLocale>(COMPONENT_LOCALE_EN_US);\n\n/**\n * Props for {@link LocalizationProvider}.\n *\n * @public\n */\nexport type LocalizationProviderProps = {\n /** Locale context to provide components */\n locale: ComponentLocale;\n /** Children to provide locale context. */\n children: React.ReactNode;\n};\n\n/**\n * Provider to provide localized strings for this library's react components.\n *\n * @remarks Components will be provided localized strings in English (US) by default if this\n * provider is not used.\n *\n * @public\n */\nexport const LocalizationProvider = (props: LocalizationProviderProps): JSX.Element => {\n const { locale, children } = props;\n return <LocaleContext.Provider value={locale}>{children}</LocaleContext.Provider>;\n};\n\n/** React hook to access locale */\nexport const useLocale = (): ComponentLocale => useContext(LocaleContext);\n"]}
1
+ {"version":3,"file":"LocalizationProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/localization/LocalizationProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAiCzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AA8InD;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAkB,sBAAsB,CAAC,CAAC;AAcpF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnC,OAAO,oBAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,IAAG,QAAQ,CAA0B,CAAC;AACpF,CAAC,CAAC;AAEF,kCAAkC;AAClC,MAAM,CAAC,MAAM,SAAS,GAAG,GAAoB,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { createContext, useContext } from 'react';\nimport {\n CameraButtonStrings,\n EndCallButtonStrings,\n ErrorBarStrings,\n MessageStatusIndicatorStrings,\n MessageThreadStrings,\n MicrophoneButtonStrings,\n DevicesButtonStrings,\n ParticipantsButtonStrings,\n ParticipantItemStrings,\n ScreenShareButtonStrings,\n SendBoxStrings,\n TypingIndicatorStrings,\n VideoGalleryStrings\n} from '../components';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButtonStrings } from '../components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButtonStrings } from '../components';\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { DialpadStrings } from '../components';\n/* @conditional-compile-remove(call-readiness) */\nimport { SitePermissionsStrings } from '../components/DevicePermissions/SitePermissionsScaffolding';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedStrings } from '../components/DevicePermissions/BrowserPermissionDenied';\n/* @conditional-compile-remove(call-readiness) */\nimport { BrowserPermissionDeniedIOSStrings } from '../components/DevicePermissions/BrowserPermissionDeniedIOS';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserStrings } from '../components/UnsupportedBrowser';\n/* @conditional-compile-remove(one-to-n-calling) */\n// @conditional-compile-remove(PSTN-calls)\nimport { VideoTileStrings } from '../components/VideoTile';\nimport { COMPONENT_LOCALE_EN_US } from './locales';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedBrowserVersionStrings } from '../components/UnsupportedBrowserVersion';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { UnsupportedOperatingSystemStrings } from '../components/UnsupportedOperatingSystem';\n/* @conditional-compile-remove(vertical-gallery) */\nimport { VerticalGalleryStrings } from '../components/VerticalGallery';\n/* @conditional-compile-remove(total-participant-count) */\nimport { ParticipantListStrings } from '../components/ParticipantList';\n/* @conditional-compile-remove(mention) */\nimport { MentionPopoverStrings } from '../components/MentionPopover';\n/* @conditional-compile-remove(image-gallery) */\nimport { ImageGalleryStrings } from '../components/ImageGallery';\n\n/**\n * Locale information for all components exported from this library.\n *\n * @public\n */\nexport interface ComponentLocale {\n /** Strings for components */\n strings: ComponentStrings;\n /* @conditional-compile-remove(date-time-customization) */\n /**\n * Optional function to provide customized date format.\n * @beta\n */\n onDisplayDateTimeString?: (messageDate: Date) => string;\n}\n\n/**\n * Strings used by all components exported from this library.\n *\n * @public\n */\nexport interface ComponentStrings {\n /** Strings for MessageThread */\n messageThread: MessageThreadStrings;\n /** Strings for ParticipantItem */\n participantItem: ParticipantItemStrings;\n /** Strings for CameraButton */\n cameraButton: CameraButtonStrings;\n /** Strings for MicrophoneButton */\n microphoneButton: MicrophoneButtonStrings;\n /** Strings for EndCallButton */\n endCallButton: EndCallButtonStrings;\n /** Strings for DevicesButton */\n devicesButton: DevicesButtonStrings;\n /** Strings for ParticipantsButton */\n participantsButton: ParticipantsButtonStrings;\n /** Strings for ScreenShareButton */\n screenShareButton: ScreenShareButtonStrings;\n /* @conditional-compile-remove(raise-hand) */\n /** Strings for RaiseHandButton */\n raiseHandButton: RaiseHandButtonStrings;\n /** Strings for TypingIndicator */\n typingIndicator: TypingIndicatorStrings;\n /** Strings for SendBox */\n sendBox: SendBoxStrings;\n /* @conditional-compile-remove(mention) */\n /** Strings for MentionPopover */\n mentionPopover: MentionPopoverStrings;\n /* @conditional-compile-remove(image-gallery) */\n /** Strings for ImageGallery */\n imageGallery: ImageGalleryStrings;\n /** Strings for MessageStatusIndicator */\n messageStatusIndicator: MessageStatusIndicatorStrings;\n /** Strings for ErroBar */\n errorBar: ErrorBarStrings;\n /** Strings for VideoGallery */\n videoGallery: VideoGalleryStrings;\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n /** Strings for Dialpad */\n dialpad: DialpadStrings;\n /* @conditional-compile-remove(one-to-n-calling) */\n // @conditional-compile-remove(PSTN-calls)\n /** Strings for VideoTile */\n videoTile: VideoTileStrings;\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n /** Strings for HoldButton */\n holdButton: HoldButtonStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraAndMicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n CameraSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission request prompt */\n MicrophoneSitePermissionsRequest: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraAndMicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n CameraSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission generic checking prompt */\n MicrophoneSitePermissionsCheck: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraAndMicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraAndMicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n CameraSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt */\n MicrophoneSitePermissionsDenied: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n CameraSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for a site's permission denied prompt for safari browsers*/\n MicrophoneSitePermissionsDeniedSafari: SitePermissionsStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser UI */\n UnsupportedBrowser: UnsupportedBrowserStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedBrowserVersion: UnsupportedBrowserVersionStrings;\n /* @conditional-compile-remove(unsupported-browser) */\n /** Strings for unsupported browser version UI */\n UnsupportedOperatingSystem: UnsupportedOperatingSystemStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDenied */\n BrowserPermissionDenied: BrowserPermissionDeniedStrings;\n /* @conditional-compile-remove(call-readiness) */\n /** Strings for BrowserPemissionDeniedIOS */\n BrowserPermissionDeniedIOS: BrowserPermissionDeniedIOSStrings;\n /* @conditional-compile-remove(vertical-gallery) */\n /**\n * Strings for the VerticalGallery.\n */\n verticalGallery: VerticalGalleryStrings;\n /* @conditional-compile-remove(total-participant-count) */\n /** Strings for the participant list component */\n ParticipantList: ParticipantListStrings;\n}\n\n/**\n * Context for providing localized strings to components exported from this library.\n *\n * @public\n */\nexport const LocaleContext = createContext<ComponentLocale>(COMPONENT_LOCALE_EN_US);\n\n/**\n * Props for {@link LocalizationProvider}.\n *\n * @public\n */\nexport type LocalizationProviderProps = {\n /** Locale context to provide components */\n locale: ComponentLocale;\n /** Children to provide locale context. */\n children: React.ReactNode;\n};\n\n/**\n * Provider to provide localized strings for this library's react components.\n *\n * @remarks Components will be provided localized strings in English (US) by default if this\n * provider is not used.\n *\n * @public\n */\nexport const LocalizationProvider = (props: LocalizationProviderProps): JSX.Element => {\n const { locale, children } = props;\n return <LocaleContext.Provider value={locale}>{children}</LocaleContext.Provider>;\n};\n\n/** React hook to access locale */\nexport const useLocale = (): ComponentLocale => useContext(LocaleContext);\n"]}
@@ -147,7 +147,7 @@
147
147
  "newMessagesIndicator": "New messages",
148
148
  "noDisplayNameSub": "No name",
149
149
  "editBoxCancelButton": "Cancel",
150
- "editBoxSubmitButton": "Submit",
150
+ "editBoxSubmitButton": "Done",
151
151
  "messageReadCount": "Read by {messageReadByCount} of {remoteParticipantsCount}",
152
152
  "actionMenuMoreOptions": "More Options",
153
153
  "downloadFile": "Download file",
@@ -338,7 +338,7 @@
338
338
  "step3DigitText": "3",
339
339
  "step4DigitText": "4"
340
340
  },
341
- "VerticalGallery": {
341
+ "verticalGallery": {
342
342
  "leftNavButtonAriaLabel": "previous page",
343
343
  "rightNavButtonAriaLabel": "next page"
344
344
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { Theme, PartialTheme } from '@fluentui/react';
2
+ import { PartialTheme, Theme } from '@fluentui/react';
3
3
  /**
4
4
  * Props for {@link FluentThemeProvider}.
5
5
  *
@@ -20,9 +20,8 @@ export interface FluentThemeProviderProps {
20
20
  * Provider to apply a Fluent theme across this library's react components.
21
21
  *
22
22
  * @remarks Components in this library are composed primarily from [Fluent UI](https://developer.microsoft.com/fluentui#/controls/web),
23
- * controls, and also from [Fluent React Northstar](https://fluentsite.z22.web.core.windows.net/0.53.0) controls.
24
- * This provider handles applying any theme provided to both the underlying Fluent UI controls, as well as the Fluent React Northstar controls.
25
- *
23
+ * controls, mixing v8 and v9 controls.
24
+ * This provider handles applying any theme provided to the underlying Fluent UI controls. *
26
25
  * @public
27
26
  */
28
27
  export declare const FluentThemeProvider: (props: FluentThemeProviderProps) => JSX.Element;
@@ -2,73 +2,55 @@
2
2
  // Licensed under the MIT License.
3
3
  import React, { createContext, useContext } from 'react';
4
4
  import { ThemeProvider, getTheme, mergeThemes, mergeStyles } from '@fluentui/react';
5
- import { mergeThemes as mergeNorthstarThemes, Provider, teamsTheme } from "../../../northstar-wrapper/src";
6
5
  import { lightTheme } from './themes';
7
6
  const wrapper = mergeStyles({
8
7
  height: '100%',
9
8
  width: '100%',
10
- overflow: 'auto'
11
- });
12
- const defaultTheme = mergeThemes(getTheme(), lightTheme);
13
- /** Theme context for library's react components */
14
- const ThemeContext = createContext(defaultTheme);
15
- const initialFluentNorthstarTheme = mergeNorthstarThemes(teamsTheme, {
16
- componentStyles: {
17
- ChatMessage: {
18
- root: {
19
- lineHeight: '1.4286'
20
- }
21
- }
9
+ overflow: 'auto',
10
+ // Add NorthStar styling used previously in the library
11
+ '*': {
12
+ boxSizing: 'border-box'
22
13
  },
23
- fontFaces: [],
24
- siteVariables: {
25
- // suppressing body styles from teamsTheme to avoid inherited styling to other elements
26
- bodyPadding: undefined,
27
- bodyFontSize: undefined,
28
- bodyFontFamily: undefined,
29
- bodyBackground: undefined,
30
- bodyColor: undefined,
31
- bodyLineHeight: undefined
14
+ '*:before': {
15
+ boxSizing: 'border-box'
16
+ },
17
+ '*:after': {
18
+ boxSizing: 'border-box'
19
+ },
20
+ /* Adding priority for HTML `hidden` attribute to be applied correctly */
21
+ '[hidden]': {
22
+ display: 'none!important'
32
23
  }
33
24
  });
25
+ const defaultTheme = Object.assign({}, mergeThemes(getTheme(), lightTheme));
26
+ /** Theme context for library's react components */
27
+ const ThemeContext = createContext(defaultTheme);
28
+ const SingleUsageCheckContext = createContext(false);
34
29
  /**
35
30
  * Provider to apply a Fluent theme across this library's react components.
36
31
  *
37
32
  * @remarks Components in this library are composed primarily from [Fluent UI](https://developer.microsoft.com/fluentui#/controls/web),
38
- * controls, and also from [Fluent React Northstar](https://fluentsite.z22.web.core.windows.net/0.53.0) controls.
39
- * This provider handles applying any theme provided to both the underlying Fluent UI controls, as well as the Fluent React Northstar controls.
40
- *
33
+ * controls, mixing v8 and v9 controls.
34
+ * This provider handles applying any theme provided to the underlying Fluent UI controls. *
41
35
  * @public
42
36
  */
43
37
  export const FluentThemeProvider = (props) => {
44
38
  const { fluentTheme, rtl, children } = props;
45
- let fluentUITheme = mergeThemes(defaultTheme, fluentTheme);
46
- // merge in rtl from FluentThemeProviderProps
47
- fluentUITheme = mergeThemes(fluentUITheme, { rtl });
48
- const fluentNorthstarTheme = mergeNorthstarThemes(initialFluentNorthstarTheme, {
49
- componentVariables: {
50
- Chat: {
51
- backgroundColor: fluentUITheme.palette.white
52
- },
53
- ChatMessage: {
54
- authorColor: fluentUITheme.palette.neutralPrimary,
55
- contentColor: fluentUITheme.palette.neutralPrimary,
56
- backgroundColor: fluentUITheme.palette.neutralLighter,
57
- backgroundColorMine: fluentUITheme.palette.themeLight
58
- }
59
- },
60
- componentStyles: {
61
- ChatMessage: {
62
- timestamp: {
63
- WebkitTextFillColor: fluentUITheme.palette.neutralSecondary
64
- }
65
- }
66
- }
67
- // add more northstar components to align with Fluent UI theme
68
- });
69
- return (React.createElement(ThemeContext.Provider, { value: fluentUITheme },
70
- React.createElement(ThemeProvider, { theme: fluentUITheme, className: wrapper },
71
- React.createElement(Provider, { theme: fluentNorthstarTheme, className: wrapper, rtl: rtl }, children))));
39
+ /**
40
+ * Pass only the children if we previously wrapped.
41
+ * This is to prevent the provider from being applied
42
+ * multiple times and wiping out configuration like RTL
43
+ * FluentThemeProvider
44
+ */
45
+ const alreadyWrapped = useSingleUsageCheck();
46
+ if (alreadyWrapped) {
47
+ return React.createElement(React.Fragment, null, children);
48
+ }
49
+ let fluentV8Theme = mergeThemes(defaultTheme, fluentTheme);
50
+ fluentV8Theme = mergeThemes(fluentV8Theme, { rtl });
51
+ return (React.createElement(SingleUsageCheckContext.Provider, { value: true },
52
+ React.createElement(ThemeContext.Provider, { value: fluentV8Theme },
53
+ React.createElement(ThemeProvider, { theme: fluentV8Theme, className: wrapper }, children))));
72
54
  };
73
55
  /**
74
56
  * React hook to access theme
@@ -76,4 +58,10 @@ export const FluentThemeProvider = (props) => {
76
58
  * @public
77
59
  */
78
60
  export const useTheme = () => useContext(ThemeContext);
61
+ /**
62
+ * This is used to prevent the provider from being applied multiple times.
63
+ *
64
+ * @private
65
+ */
66
+ const useSingleUsageCheck = () => useContext(SingleUsageCheckContext);
79
67
  //# sourceMappingURL=FluentThemeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FluentThemeProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/theming/FluentThemeProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,aAAa,EAAuB,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzG,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,QAAQ,EAAE,UAAU,EAAE,uCAAoC;AACxG,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAmBtC,MAAM,OAAO,GAAG,WAAW,CAAC;IAC1B,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;CACjB,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,WAAW,CAAC,QAAQ,EAAE,EAAE,UAAU,CAAC,CAAC;AAEzD,mDAAmD;AACnD,MAAM,YAAY,GAAG,aAAa,CAAQ,YAAY,CAAC,CAAC;AAExD,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,UAAU,EAAE;IACnE,eAAe,EAAE;QACf,WAAW,EAAE;YACX,IAAI,EAAE;gBACJ,UAAU,EAAE,QAAQ;aACrB;SACF;KACF;IACD,SAAS,EAAE,EAAE;IACb,aAAa,EAAE;QACb,uFAAuF;QACvF,WAAW,EAAE,SAAS;QACtB,YAAY,EAAE,SAAS;QACvB,cAAc,EAAE,SAAS;QACzB,cAAc,EAAE,SAAS;QACzB,SAAS,EAAE,SAAS;QACpB,cAAc,EAAE,SAAS;KAC1B;CACF,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAe,EAAE;IAClF,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE7C,IAAI,aAAa,GAAU,WAAW,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IAClE,6CAA6C;IAC7C,aAAa,GAAG,WAAW,CAAC,aAAa,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAEpD,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,2BAA2B,EAAE;QAC7E,kBAAkB,EAAE;YAClB,IAAI,EAAE;gBACJ,eAAe,EAAE,aAAa,CAAC,OAAO,CAAC,KAAK;aAC7C;YACD,WAAW,EAAE;gBACX,WAAW,EAAE,aAAa,CAAC,OAAO,CAAC,cAAc;gBACjD,YAAY,EAAE,aAAa,CAAC,OAAO,CAAC,cAAc;gBAClD,eAAe,EAAE,aAAa,CAAC,OAAO,CAAC,cAAc;gBACrD,mBAAmB,EAAE,aAAa,CAAC,OAAO,CAAC,UAAU;aACtD;SACF;QACD,eAAe,EAAE;YACf,WAAW,EAAE;gBACX,SAAS,EAAE;oBACT,mBAAmB,EAAE,aAAa,CAAC,OAAO,CAAC,gBAAgB;iBAC5D;aACF;SACF;QACD,8DAA8D;KAC/D,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,aAAa;QACzC,oBAAC,aAAa,IAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO;YACrD,oBAAC,QAAQ,IAAC,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,IAChE,QAAQ,CACA,CACG,CACM,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAU,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { createContext, useContext } from 'react';\nimport { ThemeProvider, Theme, PartialTheme, getTheme, mergeThemes, mergeStyles } from '@fluentui/react';\nimport { mergeThemes as mergeNorthstarThemes, Provider, teamsTheme } from '@internal/northstar-wrapper';\nimport { lightTheme } from './themes';\n\n/**\n * Props for {@link FluentThemeProvider}.\n *\n * @public\n */\nexport interface FluentThemeProviderProps {\n /** Children to be themed. */\n children: React.ReactNode;\n /** Theme for components. Defaults to a light theme if not provided. */\n fluentTheme?: PartialTheme | Theme;\n /**\n * Whether components are displayed right-to-left\n * @defaultValue `false`\n */\n rtl?: boolean;\n}\n\nconst wrapper = mergeStyles({\n height: '100%',\n width: '100%',\n overflow: 'auto'\n});\n\nconst defaultTheme = mergeThemes(getTheme(), lightTheme);\n\n/** Theme context for library's react components */\nconst ThemeContext = createContext<Theme>(defaultTheme);\n\nconst initialFluentNorthstarTheme = mergeNorthstarThemes(teamsTheme, {\n componentStyles: {\n ChatMessage: {\n root: {\n lineHeight: '1.4286'\n }\n }\n },\n fontFaces: [], // suppressing font faces from teamsTheme as recommended by FluentUI N* to avoid font styling to other elements\n siteVariables: {\n // suppressing body styles from teamsTheme to avoid inherited styling to other elements\n bodyPadding: undefined,\n bodyFontSize: undefined,\n bodyFontFamily: undefined,\n bodyBackground: undefined,\n bodyColor: undefined,\n bodyLineHeight: undefined\n }\n});\n\n/**\n * Provider to apply a Fluent theme across this library's react components.\n *\n * @remarks Components in this library are composed primarily from [Fluent UI](https://developer.microsoft.com/fluentui#/controls/web),\n * controls, and also from [Fluent React Northstar](https://fluentsite.z22.web.core.windows.net/0.53.0) controls.\n * This provider handles applying any theme provided to both the underlying Fluent UI controls, as well as the Fluent React Northstar controls.\n *\n * @public\n */\nexport const FluentThemeProvider = (props: FluentThemeProviderProps): JSX.Element => {\n const { fluentTheme, rtl, children } = props;\n\n let fluentUITheme: Theme = mergeThemes(defaultTheme, fluentTheme);\n // merge in rtl from FluentThemeProviderProps\n fluentUITheme = mergeThemes(fluentUITheme, { rtl });\n\n const fluentNorthstarTheme = mergeNorthstarThemes(initialFluentNorthstarTheme, {\n componentVariables: {\n Chat: {\n backgroundColor: fluentUITheme.palette.white\n },\n ChatMessage: {\n authorColor: fluentUITheme.palette.neutralPrimary,\n contentColor: fluentUITheme.palette.neutralPrimary,\n backgroundColor: fluentUITheme.palette.neutralLighter,\n backgroundColorMine: fluentUITheme.palette.themeLight\n }\n },\n componentStyles: {\n ChatMessage: {\n timestamp: {\n WebkitTextFillColor: fluentUITheme.palette.neutralSecondary\n }\n }\n }\n // add more northstar components to align with Fluent UI theme\n });\n\n return (\n <ThemeContext.Provider value={fluentUITheme}>\n <ThemeProvider theme={fluentUITheme} className={wrapper}>\n <Provider theme={fluentNorthstarTheme} className={wrapper} rtl={rtl}>\n {children}\n </Provider>\n </ThemeProvider>\n </ThemeContext.Provider>\n );\n};\n\n/**\n * React hook to access theme\n *\n * @public\n */\nexport const useTheme = (): Theme => useContext(ThemeContext);\n\"../../../northstar-wrapper/src\""]}
1
+ {"version":3,"file":"FluentThemeProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/theming/FluentThemeProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,aAAa,EAAuB,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAmBtC,MAAM,OAAO,GAAG,WAAW,CAAC;IAC1B,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,uDAAuD;IACvD,GAAG,EAAE;QACH,SAAS,EAAE,YAAY;KACxB;IACD,UAAU,EAAE;QACV,SAAS,EAAE,YAAY;KACxB;IACD,SAAS,EAAE;QACT,SAAS,EAAE,YAAY;KACxB;IACD,yEAAyE;IACzE,UAAU,EAAE;QACV,OAAO,EAAE,gBAAgB;KAC1B;CACF,CAAC,CAAC;AAEH,MAAM,YAAY,qBACb,WAAW,CAAC,QAAQ,EAAE,EAAE,UAAU,CAAC,CACvC,CAAC;AAEF,mDAAmD;AACnD,MAAM,YAAY,GAAG,aAAa,CAAQ,YAAY,CAAC,CAAC;AACxD,MAAM,uBAAuB,GAAG,aAAa,CAAU,KAAK,CAAC,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAA+B,EAAe,EAAE;IAClF,MAAM,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE7C;;;;;OAKG;IACH,MAAM,cAAc,GAAG,mBAAmB,EAAE,CAAC;IAC7C,IAAI,cAAc,EAAE;QAClB,OAAO,0CAAG,QAAQ,CAAI,CAAC;KACxB;IAED,IAAI,aAAa,GAAU,WAAW,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IAClE,aAAa,GAAG,WAAW,CAAC,aAAa,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IAEpD,OAAO,CACL,oBAAC,uBAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI;QAC3C,oBAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,aAAa;YACzC,oBAAC,aAAa,IAAC,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,OAAO,IACpD,QAAQ,CACK,CACM,CACS,CACpC,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAU,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAE9D;;;;GAIG;AACH,MAAM,mBAAmB,GAAG,GAAY,EAAE,CAAC,UAAU,CAAC,uBAAuB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { createContext, useContext } from 'react';\nimport { ThemeProvider, PartialTheme, Theme, getTheme, mergeThemes, mergeStyles } from '@fluentui/react';\nimport { lightTheme } from './themes';\n\n/**\n * Props for {@link FluentThemeProvider}.\n *\n * @public\n */\nexport interface FluentThemeProviderProps {\n /** Children to be themed. */\n children: React.ReactNode;\n /** Theme for components. Defaults to a light theme if not provided. */\n fluentTheme?: PartialTheme | Theme;\n /**\n * Whether components are displayed right-to-left\n * @defaultValue `false`\n */\n rtl?: boolean;\n}\n\nconst wrapper = mergeStyles({\n height: '100%',\n width: '100%',\n overflow: 'auto',\n // Add NorthStar styling used previously in the library\n '*': {\n boxSizing: 'border-box'\n },\n '*:before': {\n boxSizing: 'border-box'\n },\n '*:after': {\n boxSizing: 'border-box'\n },\n /* Adding priority for HTML `hidden` attribute to be applied correctly */\n '[hidden]': {\n display: 'none!important'\n }\n});\n\nconst defaultTheme: Theme = {\n ...mergeThemes(getTheme(), lightTheme)\n};\n\n/** Theme context for library's react components */\nconst ThemeContext = createContext<Theme>(defaultTheme);\nconst SingleUsageCheckContext = createContext<boolean>(false);\n\n/**\n * Provider to apply a Fluent theme across this library's react components.\n *\n * @remarks Components in this library are composed primarily from [Fluent UI](https://developer.microsoft.com/fluentui#/controls/web),\n * controls, mixing v8 and v9 controls.\n * This provider handles applying any theme provided to the underlying Fluent UI controls. *\n * @public\n */\nexport const FluentThemeProvider = (props: FluentThemeProviderProps): JSX.Element => {\n const { fluentTheme, rtl, children } = props;\n\n /**\n * Pass only the children if we previously wrapped.\n * This is to prevent the provider from being applied\n * multiple times and wiping out configuration like RTL\n * FluentThemeProvider\n */\n const alreadyWrapped = useSingleUsageCheck();\n if (alreadyWrapped) {\n return <>{children}</>;\n }\n\n let fluentV8Theme: Theme = mergeThemes(defaultTheme, fluentTheme);\n fluentV8Theme = mergeThemes(fluentV8Theme, { rtl });\n\n return (\n <SingleUsageCheckContext.Provider value={true}>\n <ThemeContext.Provider value={fluentV8Theme}>\n <ThemeProvider theme={fluentV8Theme} className={wrapper}>\n {children}\n </ThemeProvider>\n </ThemeContext.Provider>\n </SingleUsageCheckContext.Provider>\n );\n};\n\n/**\n * React hook to access theme\n *\n * @public\n */\nexport const useTheme = (): Theme => useContext(ThemeContext);\n\n/**\n * This is used to prevent the provider from being applied multiple times.\n *\n * @private\n */\nconst useSingleUsageCheck = (): boolean => useContext(SingleUsageCheckContext);\n"]}
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { Theme as ThemeV8 } from '@fluentui/react';
3
+ /**
4
+ * Props for {@link FluentThemeProvider}.
5
+ *
6
+ * @private
7
+ */
8
+ export interface FluentV9ThemeProviderProps {
9
+ /** Children to be themed. */
10
+ children: React.ReactNode;
11
+ /** FluentUI v8 theme to be mapped to FluentUI v9 theme */
12
+ v8Theme: ThemeV8;
13
+ }
14
+ /**
15
+ * @private
16
+ */
17
+ export declare const useFluentV9Wrapper: () => Record<"body", string>;
18
+ /**
19
+ * @private
20
+ */
21
+ export declare const FluentV9ThemeProvider: (props: FluentV9ThemeProviderProps) => JSX.Element;
22
+ //# sourceMappingURL=FluentV9ThemeProvider.d.ts.map
@@ -0,0 +1,29 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ import React from 'react';
4
+ import { makeStyles, shorthands, FluentProvider } from '@fluentui/react-components';
5
+ import { createV9Theme } from './v9ThemeShim';
6
+ import { TextDirectionProvider } from '@griffel/react';
7
+ /**
8
+ * @private
9
+ */
10
+ export const useFluentV9Wrapper = makeStyles({
11
+ body: Object.assign(Object.assign(Object.assign(Object.assign({ height: '100%' }, shorthands.margin(0)), shorthands.overflow('hidden')), shorthands.padding(0)), { width: '100%' })
12
+ });
13
+ /**
14
+ * @private
15
+ */
16
+ export const FluentV9ThemeProvider = (props) => {
17
+ const { v8Theme, children } = props;
18
+ const v9Theme = createV9Theme(v8Theme);
19
+ const dir = v8Theme.rtl ? 'rtl' : 'ltr';
20
+ return (
21
+ // TextDirectionProvider is needed to fix issue with direction value update in FluentProvider
22
+ React.createElement(TextDirectionProvider, { dir: dir },
23
+ React.createElement(FluentProviderWithStylesOverrides, { theme: v9Theme, dir: dir }, children)));
24
+ };
25
+ const FluentProviderWithStylesOverrides = (props) => {
26
+ const classes = useFluentV9Wrapper();
27
+ return React.createElement(FluentProvider, Object.assign({}, props, { className: classes.body }));
28
+ };
29
+ //# sourceMappingURL=FluentV9ThemeProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FluentV9ThemeProvider.js","sourceRoot":"","sources":["../../../../../../react-components/src/theming/FluentV9ThemeProvider.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAuB,MAAM,4BAA4B,CAAC;AAEzG,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAcvD;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,4DACF,MAAM,EAAE,MAAM,IACX,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,GACpB,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAC7B,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,KACxB,KAAK,EAAE,MAAM,GACd;CACF,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAiC,EAAe,EAAE;IACtF,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACpC,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;IAExC,OAAO;IACL,6FAA6F;IAC7F,oBAAC,qBAAqB,IAAC,GAAG,EAAE,GAAG;QAE7B,oBAAC,iCAAiC,IAAC,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,IACxD,QAAQ,CACyB,CACd,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,iCAAiC,GAAkC,CAAC,KAAK,EAAE,EAAE;IACjF,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,OAAO,oBAAC,cAAc,oBAAK,KAAK,IAAE,SAAS,EAAE,OAAO,CAAC,IAAI,IAAI,CAAC;AAChE,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { makeStyles, shorthands, FluentProvider, FluentProviderProps } from '@fluentui/react-components';\nimport { Theme as ThemeV8 } from '@fluentui/react';\nimport { createV9Theme } from './v9ThemeShim';\nimport { TextDirectionProvider } from '@griffel/react';\n\n/**\n * Props for {@link FluentThemeProvider}.\n *\n * @private\n */\nexport interface FluentV9ThemeProviderProps {\n /** Children to be themed. */\n children: React.ReactNode;\n /** FluentUI v8 theme to be mapped to FluentUI v9 theme */\n v8Theme: ThemeV8;\n}\n\n/**\n * @private\n */\nexport const useFluentV9Wrapper = makeStyles({\n body: {\n height: '100%',\n ...shorthands.margin(0),\n ...shorthands.overflow('hidden'),\n ...shorthands.padding(0),\n width: '100%'\n }\n});\n\n/**\n * @private\n */\nexport const FluentV9ThemeProvider = (props: FluentV9ThemeProviderProps): JSX.Element => {\n const { v8Theme, children } = props;\n const v9Theme = createV9Theme(v8Theme);\n const dir = v8Theme.rtl ? 'rtl' : 'ltr';\n\n return (\n // TextDirectionProvider is needed to fix issue with direction value update in FluentProvider\n <TextDirectionProvider dir={dir}>\n {/* Wrapper is required to call \"useClasses\" hook with proper context values */}\n <FluentProviderWithStylesOverrides theme={v9Theme} dir={dir}>\n {children}\n </FluentProviderWithStylesOverrides>\n </TextDirectionProvider>\n );\n};\n\nconst FluentProviderWithStylesOverrides: React.FC<FluentProviderProps> = (props) => {\n const classes = useFluentV9Wrapper();\n\n return <FluentProvider {...props} className={classes.body} />;\n};\n"]}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @private
3
+ */
4
+ export declare const grey: Record<Greys, string>;
5
+ /**
6
+ * @private
7
+ */
8
+ export declare const whiteAlpha: Record<AlphaColors, string>;
9
+ /**
10
+ * @private
11
+ */
12
+ export declare const blackAlpha: Record<AlphaColors, string>;
13
+ /**
14
+ * @private
15
+ */
16
+ export declare const grey10Alpha: Record<AlphaColors, string>;
17
+ /**
18
+ * @private
19
+ */
20
+ export declare const grey12Alpha: Record<AlphaColors, string>;
21
+ /**
22
+ * @private
23
+ */
24
+ export declare type Greys = 0 | 2 | 4 | 6 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 76 | 78 | 80 | 82 | 84 | 86 | 88 | 90 | 92 | 94 | 96 | 98 | 100;
25
+ /**
26
+ * @private
27
+ */
28
+ export declare type AlphaColors = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90;
29
+ //# sourceMappingURL=themeDuplicates.d.ts.map
@@ -0,0 +1,121 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ // These color records are required for createV9Theme
4
+ // For more info, check https://react.fluentui.dev/iframe.html?viewMode=docs&id=concepts-migration-from-v8-components-theme-migration--page#compatible-themes
5
+ /**
6
+ * @private
7
+ */
8
+ export const grey = {
9
+ '0': '#000000',
10
+ '2': '#050505',
11
+ '4': '#0a0a0a',
12
+ '6': '#0f0f0f',
13
+ '8': '#141414',
14
+ '10': '#1a1a1a',
15
+ '12': '#1f1f1f',
16
+ '14': '#242424',
17
+ '16': '#292929',
18
+ '18': '#2e2e2e',
19
+ '20': '#333333',
20
+ '22': '#383838',
21
+ '24': '#3d3d3d',
22
+ '26': '#424242',
23
+ '28': '#474747',
24
+ '30': '#4d4d4d',
25
+ '32': '#525252',
26
+ '34': '#575757',
27
+ '36': '#5c5c5c',
28
+ '38': '#616161',
29
+ '40': '#666666',
30
+ '42': '#6b6b6b',
31
+ '44': '#707070',
32
+ '46': '#757575',
33
+ '48': '#7a7a7a',
34
+ '50': '#808080',
35
+ '52': '#858585',
36
+ '54': '#8a8a8a',
37
+ '56': '#8f8f8f',
38
+ '58': '#949494',
39
+ '60': '#999999',
40
+ '62': '#9e9e9e',
41
+ '64': '#a3a3a3',
42
+ '66': '#a8a8a8',
43
+ '68': '#adadad',
44
+ '70': '#b3b3b3',
45
+ '72': '#b8b8b8',
46
+ '74': '#bdbdbd',
47
+ '76': '#c2c2c2',
48
+ '78': '#c7c7c7',
49
+ '80': '#cccccc',
50
+ '82': '#d1d1d1',
51
+ '84': '#d6d6d6',
52
+ '86': '#dbdbdb',
53
+ '88': '#e0e0e0',
54
+ '90': '#e6e6e6',
55
+ '92': '#ebebeb',
56
+ '94': '#f0f0f0',
57
+ '96': '#f5f5f5',
58
+ '98': '#fafafa',
59
+ '100': '#ffffff'
60
+ };
61
+ /**
62
+ * @private
63
+ */
64
+ export const whiteAlpha = {
65
+ '5': 'rgba(255, 255, 255, 0.05)',
66
+ '10': 'rgba(255, 255, 255, 0.1)',
67
+ '20': 'rgba(255, 255, 255, 0.2)',
68
+ '30': 'rgba(255, 255, 255, 0.3)',
69
+ '40': 'rgba(255, 255, 255, 0.4)',
70
+ '50': 'rgba(255, 255, 255, 0.5)',
71
+ '60': 'rgba(255, 255, 255, 0.6)',
72
+ '70': 'rgba(255, 255, 255, 0.7)',
73
+ '80': 'rgba(255, 255, 255, 0.8)',
74
+ '90': 'rgba(255, 255, 255, 0.9)'
75
+ };
76
+ /**
77
+ * @private
78
+ */
79
+ export const blackAlpha = {
80
+ '5': 'rgba(0, 0, 0, 0.05)',
81
+ '10': 'rgba(0, 0, 0, 0.1)',
82
+ '20': 'rgba(0, 0, 0, 0.2)',
83
+ '30': 'rgba(0, 0, 0, 0.3)',
84
+ '40': 'rgba(0, 0, 0, 0.4)',
85
+ '50': 'rgba(0, 0, 0, 0.5)',
86
+ '60': 'rgba(0, 0, 0, 0.6)',
87
+ '70': 'rgba(0, 0, 0, 0.7)',
88
+ '80': 'rgba(0, 0, 0, 0.8)',
89
+ '90': 'rgba(0, 0, 0, 0.9)'
90
+ };
91
+ /**
92
+ * @private
93
+ */
94
+ export const grey10Alpha = {
95
+ '5': 'rgba(26, 26, 26, 0.05)',
96
+ '10': 'rgba(26, 26, 26, 0.1)',
97
+ '20': 'rgba(26, 26, 26, 0.2)',
98
+ '30': 'rgba(26, 26, 26, 0.3)',
99
+ '40': 'rgba(26, 26, 26, 0.4)',
100
+ '50': 'rgba(26, 26, 26, 0.5)',
101
+ '60': 'rgba(26, 26, 26, 0.6)',
102
+ '70': 'rgba(26, 26, 26, 0.7)',
103
+ '80': 'rgba(26, 26, 26, 0.8)',
104
+ '90': 'rgba(26, 26, 26, 0.9)'
105
+ };
106
+ /**
107
+ * @private
108
+ */
109
+ export const grey12Alpha = {
110
+ '5': 'rgba(31, 31, 31, 0.05)',
111
+ '10': 'rgba(31, 31, 31, 0.1)',
112
+ '20': 'rgba(31, 31, 31, 0.2)',
113
+ '30': 'rgba(31, 31, 31, 0.3)',
114
+ '40': 'rgba(31, 31, 31, 0.4)',
115
+ '50': 'rgba(31, 31, 31, 0.5)',
116
+ '60': 'rgba(31, 31, 31, 0.6)',
117
+ '70': 'rgba(31, 31, 31, 0.7)',
118
+ '80': 'rgba(31, 31, 31, 0.8)',
119
+ '90': 'rgba(31, 31, 31, 0.9)'
120
+ };
121
+ //# sourceMappingURL=themeDuplicates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeDuplicates.js","sourceRoot":"","sources":["../../../../../../react-components/src/theming/themeDuplicates.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// These color records are required for createV9Theme\n// For more info, check https://react.fluentui.dev/iframe.html?viewMode=docs&id=concepts-migration-from-v8-components-theme-migration--page#compatible-themes\n\n/**\n * @private\n */\nexport const grey: Record<Greys, string> = {\n '0': '#000000',\n '2': '#050505',\n '4': '#0a0a0a',\n '6': '#0f0f0f',\n '8': '#141414',\n '10': '#1a1a1a',\n '12': '#1f1f1f',\n '14': '#242424',\n '16': '#292929',\n '18': '#2e2e2e',\n '20': '#333333',\n '22': '#383838',\n '24': '#3d3d3d',\n '26': '#424242',\n '28': '#474747',\n '30': '#4d4d4d',\n '32': '#525252',\n '34': '#575757',\n '36': '#5c5c5c',\n '38': '#616161',\n '40': '#666666',\n '42': '#6b6b6b',\n '44': '#707070',\n '46': '#757575',\n '48': '#7a7a7a',\n '50': '#808080',\n '52': '#858585',\n '54': '#8a8a8a',\n '56': '#8f8f8f',\n '58': '#949494',\n '60': '#999999',\n '62': '#9e9e9e',\n '64': '#a3a3a3',\n '66': '#a8a8a8',\n '68': '#adadad',\n '70': '#b3b3b3',\n '72': '#b8b8b8',\n '74': '#bdbdbd',\n '76': '#c2c2c2',\n '78': '#c7c7c7',\n '80': '#cccccc',\n '82': '#d1d1d1',\n '84': '#d6d6d6',\n '86': '#dbdbdb',\n '88': '#e0e0e0',\n '90': '#e6e6e6',\n '92': '#ebebeb',\n '94': '#f0f0f0',\n '96': '#f5f5f5',\n '98': '#fafafa',\n '100': '#ffffff'\n};\n\n/**\n * @private\n */\nexport const whiteAlpha: Record<AlphaColors, string> = {\n '5': 'rgba(255, 255, 255, 0.05)',\n '10': 'rgba(255, 255, 255, 0.1)',\n '20': 'rgba(255, 255, 255, 0.2)',\n '30': 'rgba(255, 255, 255, 0.3)',\n '40': 'rgba(255, 255, 255, 0.4)',\n '50': 'rgba(255, 255, 255, 0.5)',\n '60': 'rgba(255, 255, 255, 0.6)',\n '70': 'rgba(255, 255, 255, 0.7)',\n '80': 'rgba(255, 255, 255, 0.8)',\n '90': 'rgba(255, 255, 255, 0.9)'\n};\n\n/**\n * @private\n */\nexport const blackAlpha: Record<AlphaColors, string> = {\n '5': 'rgba(0, 0, 0, 0.05)',\n '10': 'rgba(0, 0, 0, 0.1)',\n '20': 'rgba(0, 0, 0, 0.2)',\n '30': 'rgba(0, 0, 0, 0.3)',\n '40': 'rgba(0, 0, 0, 0.4)',\n '50': 'rgba(0, 0, 0, 0.5)',\n '60': 'rgba(0, 0, 0, 0.6)',\n '70': 'rgba(0, 0, 0, 0.7)',\n '80': 'rgba(0, 0, 0, 0.8)',\n '90': 'rgba(0, 0, 0, 0.9)'\n};\n\n/**\n * @private\n */\nexport const grey10Alpha: Record<AlphaColors, string> = {\n '5': 'rgba(26, 26, 26, 0.05)',\n '10': 'rgba(26, 26, 26, 0.1)',\n '20': 'rgba(26, 26, 26, 0.2)',\n '30': 'rgba(26, 26, 26, 0.3)',\n '40': 'rgba(26, 26, 26, 0.4)',\n '50': 'rgba(26, 26, 26, 0.5)',\n '60': 'rgba(26, 26, 26, 0.6)',\n '70': 'rgba(26, 26, 26, 0.7)',\n '80': 'rgba(26, 26, 26, 0.8)',\n '90': 'rgba(26, 26, 26, 0.9)'\n};\n\n/**\n * @private\n */\nexport const grey12Alpha: Record<AlphaColors, string> = {\n '5': 'rgba(31, 31, 31, 0.05)',\n '10': 'rgba(31, 31, 31, 0.1)',\n '20': 'rgba(31, 31, 31, 0.2)',\n '30': 'rgba(31, 31, 31, 0.3)',\n '40': 'rgba(31, 31, 31, 0.4)',\n '50': 'rgba(31, 31, 31, 0.5)',\n '60': 'rgba(31, 31, 31, 0.6)',\n '70': 'rgba(31, 31, 31, 0.7)',\n '80': 'rgba(31, 31, 31, 0.8)',\n '90': 'rgba(31, 31, 31, 0.9)'\n};\n\n/**\n * @private\n */\nexport type Greys =\n | 0\n | 2\n | 4\n | 6\n | 8\n | 10\n | 12\n | 14\n | 16\n | 18\n | 20\n | 22\n | 24\n | 26\n | 28\n | 30\n | 32\n | 34\n | 36\n | 38\n | 40\n | 42\n | 44\n | 46\n | 48\n | 50\n | 52\n | 54\n | 56\n | 58\n | 60\n | 62\n | 64\n | 66\n | 68\n | 70\n | 72\n | 74\n | 76\n | 78\n | 80\n | 82\n | 84\n | 86\n | 88\n | 90\n | 92\n | 94\n | 96\n | 98\n | 100;\n\n/**\n * @private\n */\nexport type AlphaColors = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90;\n"]}
@@ -0,0 +1,12 @@
1
+ import { Theme as ThemeV8 } from '@fluentui/react';
2
+ import { Theme as ThemeV9 } from '@fluentui/react-components';
3
+ /**
4
+ * Creates a v9 theme from a v8 theme and base v9 theme.
5
+ * FluentUI webLightTheme is used in case if no baseThemeV9 is provided.
6
+ *
7
+ * @private
8
+ */
9
+ export declare const createV9Theme: (themeV8: ThemeV8, baseThemeV9?: ThemeV9 | undefined) => ThemeV9 & {
10
+ errorText: string;
11
+ };
12
+ //# sourceMappingURL=v9ThemeShim.d.ts.map