@fluentui-copilot/react-attachments 0.12.1 → 0.12.3-hotfix.1

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 (224) hide show
  1. package/CHANGELOG.json +60 -1
  2. package/CHANGELOG.md +30 -2
  3. package/dist/index.d.ts +43 -1
  4. package/lib/AgentTag.js +1 -0
  5. package/lib/AgentTag.js.map +1 -0
  6. package/lib/Attachment.js +0 -1
  7. package/lib/AttachmentList.js +0 -1
  8. package/lib/AttachmentOverflowMenu.js +0 -1
  9. package/lib/AttachmentOverflowMenuButton.js +0 -1
  10. package/lib/AttachmentOverflowMenuItem.js +0 -1
  11. package/lib/AttachmentTag.js +0 -1
  12. package/lib/AttachmentTagItem.js +0 -1
  13. package/lib/AttachmentTagList.js +0 -1
  14. package/lib/components/AgentTag/AgentTag.js +11 -0
  15. package/lib/components/AgentTag/AgentTag.js.map +1 -0
  16. package/lib/components/AgentTag/AgentTag.types.js +3 -0
  17. package/lib/components/AgentTag/AgentTag.types.js.map +1 -0
  18. package/lib/components/AgentTag/index.js +4 -0
  19. package/lib/components/AgentTag/index.js.map +1 -0
  20. package/lib/components/AgentTag/renderAgentTag.js +6 -0
  21. package/lib/components/AgentTag/renderAgentTag.js.map +1 -0
  22. package/lib/components/AgentTag/useAgentTag.js +18 -0
  23. package/lib/components/AgentTag/useAgentTag.js.map +1 -0
  24. package/lib/components/AgentTag/useAgentTagStyles.styles.js +95 -0
  25. package/lib/components/AgentTag/useAgentTagStyles.styles.js.map +1 -0
  26. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +66 -0
  27. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
  28. package/lib/components/Attachment/Attachment.js +5 -6
  29. package/lib/components/Attachment/Attachment.types.js +1 -2
  30. package/lib/components/Attachment/Attachment.types.js.map +1 -1
  31. package/lib/components/Attachment/index.js +0 -1
  32. package/lib/components/Attachment/renderAttachment.js +38 -20
  33. package/lib/components/Attachment/renderAttachment.js.map +1 -1
  34. package/lib/components/Attachment/useAttachment.js +85 -90
  35. package/lib/components/Attachment/useAttachment.js.map +1 -1
  36. package/lib/components/Attachment/useAttachmentStyles.styles.js +15 -3
  37. package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
  38. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +293 -0
  39. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
  40. package/lib/components/AttachmentList/AttachmentList.js +6 -7
  41. package/lib/components/AttachmentList/AttachmentList.types.js +1 -2
  42. package/lib/components/AttachmentList/index.js +0 -1
  43. package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
  44. package/lib/components/AttachmentList/useAttachmentList.js +112 -119
  45. package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
  46. package/lib/components/AttachmentList/useAttachmentListContextValues.js +9 -13
  47. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +44 -0
  48. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
  49. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +8 -9
  50. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -2
  51. package/lib/components/AttachmentOverflowMenu/index.js +0 -1
  52. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +8 -13
  53. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +9 -15
  54. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +10 -15
  55. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +5 -6
  56. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -2
  57. package/lib/components/AttachmentOverflowMenuButton/index.js +0 -1
  58. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +11 -10
  59. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +36 -45
  60. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +94 -0
  61. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
  62. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +4 -5
  63. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -2
  64. package/lib/components/AttachmentOverflowMenuItem/index.js +0 -1
  65. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +9 -8
  66. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -49
  67. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +57 -0
  68. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
  69. package/lib/components/AttachmentTag/AttachmentTag.js +5 -7
  70. package/lib/components/AttachmentTag/AttachmentTag.types.js +1 -2
  71. package/lib/components/AttachmentTag/index.js +0 -1
  72. package/lib/components/AttachmentTag/renderAttachmentTag.js +10 -8
  73. package/lib/components/AttachmentTag/useAttachmentTag.js +9 -11
  74. package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +98 -0
  75. package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -0
  76. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -6
  77. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +1 -2
  78. package/lib/components/AttachmentTagItem/index.js +0 -1
  79. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +10 -8
  80. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +9 -11
  81. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +34 -0
  82. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -0
  83. package/lib/components/AttachmentTagList/AttachmentTagList.js +6 -8
  84. package/lib/components/AttachmentTagList/AttachmentTagList.types.js +1 -2
  85. package/lib/components/AttachmentTagList/index.js +0 -1
  86. package/lib/components/AttachmentTagList/renderAttachmentTagList.js +7 -9
  87. package/lib/components/AttachmentTagList/useAttachmentTagList.js +21 -25
  88. package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js +8 -11
  89. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +21 -0
  90. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -0
  91. package/lib/components/index.js +0 -1
  92. package/lib/components/utils/useAttachmentTagSlots.js +45 -52
  93. package/lib/components/utils/useProgressBarStyles.styles.raw.js +42 -0
  94. package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
  95. package/lib/contexts/attachmentListContext.js +3 -4
  96. package/lib/contexts/attachmentOverflowMenuContext.js +4 -5
  97. package/lib/contexts/attachmentTagListContext.js +2 -3
  98. package/lib/index.js +1 -1
  99. package/lib/index.js.map +1 -1
  100. package/lib-commonjs/AgentTag.js +28 -0
  101. package/lib-commonjs/AgentTag.js.map +1 -0
  102. package/lib-commonjs/Attachment.js +0 -1
  103. package/lib-commonjs/AttachmentList.js +0 -1
  104. package/lib-commonjs/AttachmentOverflowMenu.js +0 -1
  105. package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -1
  106. package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -1
  107. package/lib-commonjs/AttachmentTag.js +0 -1
  108. package/lib-commonjs/AttachmentTagItem.js +0 -1
  109. package/lib-commonjs/AttachmentTagList.js +0 -1
  110. package/lib-commonjs/components/AgentTag/AgentTag.js +21 -0
  111. package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -0
  112. package/lib-commonjs/components/AgentTag/AgentTag.types.js +6 -0
  113. package/lib-commonjs/components/AgentTag/AgentTag.types.js.map +1 -0
  114. package/lib-commonjs/components/AgentTag/index.js +31 -0
  115. package/lib-commonjs/components/AgentTag/index.js.map +1 -0
  116. package/lib-commonjs/components/AgentTag/renderAgentTag.js +14 -0
  117. package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -0
  118. package/lib-commonjs/components/AgentTag/useAgentTag.js +19 -0
  119. package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -0
  120. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js +145 -0
  121. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js.map +1 -0
  122. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +82 -0
  123. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
  124. package/lib-commonjs/components/Attachment/Attachment.js +1 -1
  125. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  126. package/lib-commonjs/components/Attachment/Attachment.types.js +0 -1
  127. package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
  128. package/lib-commonjs/components/Attachment/index.js +0 -1
  129. package/lib-commonjs/components/Attachment/renderAttachment.js +23 -7
  130. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  131. package/lib-commonjs/components/Attachment/useAttachment.js +7 -3
  132. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  133. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js +24 -3
  134. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -1
  135. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +312 -0
  136. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
  137. package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
  138. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  139. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +0 -1
  140. package/lib-commonjs/components/AttachmentList/index.js +0 -1
  141. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
  142. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
  143. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +6 -2
  144. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  145. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
  146. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  147. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +60 -0
  148. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
  149. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
  150. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
  151. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -1
  152. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -1
  153. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
  154. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
  155. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
  156. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
  157. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
  158. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
  159. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
  160. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  161. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -1
  162. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -1
  163. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
  164. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
  165. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
  166. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
  167. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +110 -0
  168. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
  169. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
  170. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  171. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -1
  172. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -1
  173. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
  174. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
  175. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
  176. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  177. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +73 -0
  178. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
  179. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +1 -1
  180. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
  181. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +0 -1
  182. package/lib-commonjs/components/AttachmentTag/index.js +0 -1
  183. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js +1 -1
  184. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
  185. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js +1 -1
  186. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  187. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +118 -0
  188. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -0
  189. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
  190. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  191. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +0 -1
  192. package/lib-commonjs/components/AttachmentTagItem/index.js +0 -1
  193. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js +1 -1
  194. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
  195. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js +1 -1
  196. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  197. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +50 -0
  198. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -0
  199. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +1 -1
  200. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  201. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js +0 -1
  202. package/lib-commonjs/components/AttachmentTagList/index.js +0 -1
  203. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js +1 -1
  204. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
  205. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +1 -1
  206. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
  207. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js +1 -1
  208. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
  209. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +37 -0
  210. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -0
  211. package/lib-commonjs/components/index.js +0 -1
  212. package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
  213. package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
  214. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +50 -0
  215. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
  216. package/lib-commonjs/contexts/attachmentListContext.js +1 -1
  217. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
  218. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
  219. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
  220. package/lib-commonjs/contexts/attachmentTagListContext.js +1 -1
  221. package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
  222. package/lib-commonjs/index.js +16 -1
  223. package/lib-commonjs/index.js.map +1 -1
  224. package/package.json +11 -15
package/CHANGELOG.json CHANGED
@@ -2,7 +2,66 @@
2
2
  "name": "@fluentui-copilot/react-attachments",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 19 Apr 2025 00:04:01 GMT",
5
+ "date": "Wed, 06 Aug 2025 16:01:28 GMT",
6
+ "tag": "@fluentui-copilot/react-attachments_v0.12.3-hotfix.1",
7
+ "version": "0.12.3-hotfix.1",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "hochelmartin@gmail.com",
12
+ "package": "@fluentui-copilot/react-attachments",
13
+ "commit": "cb43a5bd5258c678c965fddff7e7d5a95f9d0396",
14
+ "comment": "release: prepare hotfix 0.25.3-hotfix.1"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 30 Apr 2025 01:47:48 GMT",
21
+ "tag": "@fluentui-copilot/react-attachments_v0.12.3",
22
+ "version": "0.12.3",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "tristan.watanabe@gmail.com",
27
+ "package": "@fluentui-copilot/react-attachments",
28
+ "commit": "374dac276c54a98db00b46eb98e6f529592393c8",
29
+ "comment": "fix: overflowing Attachments within AttachmentList now receive the onClick handler."
30
+ },
31
+ {
32
+ "author": "owcampbe@microsoft.com",
33
+ "package": "@fluentui-copilot/react-attachments",
34
+ "commit": "5a9efb11481fbe2c9bd25c8825ec4a9b991050ab",
35
+ "comment": "chore: Bump @fluentui/react-components to 9.58.3."
36
+ }
37
+ ],
38
+ "none": [
39
+ {
40
+ "author": "tristan.watanabe@gmail.com",
41
+ "package": "@fluentui-copilot/react-attachments",
42
+ "commit": "1391e0a7243d050db30fcc27547fd3e91df0162c",
43
+ "comment": "chore: update tsconfig to remove allowSyntheticDefaultImports to enforce named imports."
44
+ }
45
+ ]
46
+ }
47
+ },
48
+ {
49
+ "date": "Thu, 24 Apr 2025 00:19:01 GMT",
50
+ "tag": "@fluentui-copilot/react-attachments_v0.12.2",
51
+ "version": "0.12.2",
52
+ "comments": {
53
+ "patch": [
54
+ {
55
+ "author": "owcampbe@microsoft.com",
56
+ "package": "@fluentui-copilot/react-attachments",
57
+ "commit": "3b678663e167612c9e90d36962eb10f0ee1ae032",
58
+ "comment": "feat: Add dismissOnly prop and AgentTag component."
59
+ }
60
+ ]
61
+ }
62
+ },
63
+ {
64
+ "date": "Sat, 19 Apr 2025 00:05:39 GMT",
6
65
  "tag": "@fluentui-copilot/react-attachments_v0.12.1",
7
66
  "version": "0.12.1",
8
67
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,40 @@
1
1
  # Change Log - @fluentui-copilot/react-attachments
2
2
 
3
- This log was last generated on Sat, 19 Apr 2025 00:04:01 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 06 Aug 2025 16:01:28 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.12.3-hotfix.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.12.3-hotfix.1)
8
+
9
+ Wed, 06 Aug 2025 16:01:28 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.12.3..@fluentui-copilot/react-attachments_v0.12.3-hotfix.1)
11
+
12
+ ### Changes
13
+
14
+ - release: prepare hotfix 0.25.3-hotfix.1 ([PR #3280](https://github.com/microsoft/fluentai/pull/3280) by hochelmartin@gmail.com)
15
+
16
+ ## [0.12.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.12.3)
17
+
18
+ Wed, 30 Apr 2025 01:47:48 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.12.2..@fluentui-copilot/react-attachments_v0.12.3)
20
+
21
+ ### Patches
22
+
23
+ - fix: overflowing Attachments within AttachmentList now receive the onClick handler. ([PR #2964](https://github.com/microsoft/fluentai/pull/2964) by tristan.watanabe@gmail.com)
24
+ - chore: Bump @fluentui/react-components to 9.58.3. ([PR #2963](https://github.com/microsoft/fluentai/pull/2963) by owcampbe@microsoft.com)
25
+
26
+ ## [0.12.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.12.2)
27
+
28
+ Thu, 24 Apr 2025 00:19:01 GMT
29
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.12.1..@fluentui-copilot/react-attachments_v0.12.2)
30
+
31
+ ### Patches
32
+
33
+ - feat: Add dismissOnly prop and AgentTag component. ([PR #2944](https://github.com/microsoft/fluentai/pull/2944) by owcampbe@microsoft.com)
34
+
7
35
  ## [0.12.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.12.1)
8
36
 
9
- Sat, 19 Apr 2025 00:04:01 GMT
37
+ Sat, 19 Apr 2025 00:05:39 GMT
10
38
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.11.0..@fluentui-copilot/react-attachments_v0.12.1)
11
39
 
12
40
  ### Patches
package/dist/index.d.ts CHANGED
@@ -22,6 +22,22 @@ import * as React_2 from 'react';
22
22
  import type { Slot } from '@fluentui/react-components';
23
23
  import type { SlotClassNames } from '@fluentui/react-components';
24
24
 
25
+ export declare const AgentTag: ForwardRefComponent<AgentTagProps>;
26
+
27
+ export declare const agentTagClassNames: SlotClassNames<AgentTagSlots>;
28
+
29
+ /**
30
+ * AgentTag Props
31
+ */
32
+ export declare type AgentTagProps = ComponentProps<Partial<Omit<AgentTagSlots, 'primaryAction' | 'progress'>>> & Omit<AttachmentProps, keyof AttachmentSlots | 'dismissOnly'>;
33
+
34
+ export declare type AgentTagSlots = AttachmentSlots;
35
+
36
+ /**
37
+ * State used in rendering AgentTag
38
+ */
39
+ export declare type AgentTagState = ComponentState<AgentTagSlots> & Omit<AttachmentState, keyof AttachmentSlots>;
40
+
25
41
  export declare const Attachment: ForwardRefComponent<AttachmentProps>;
26
42
 
27
43
  export declare const attachmentClassNames: SlotClassNames<AttachmentSlots>;
@@ -183,6 +199,11 @@ export declare type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> &
183
199
  * @default 'medium'
184
200
  */
185
201
  size?: 'small' | 'medium';
202
+ /**
203
+ * Use this prop if the attachment has no primary action
204
+ * and should be rendered as a single button
205
+ */
206
+ dismissOnly?: boolean;
186
207
  };
187
208
 
188
209
  export declare type AttachmentSlots = {
@@ -216,7 +237,7 @@ export declare type AttachmentSlots = {
216
237
  /**
217
238
  * State used in rendering Attachment
218
239
  */
219
- export declare type AttachmentState = ComponentState<AttachmentSlots> & Required<Pick<AttachmentProps, 'id' | 'size' | 'designVersion' | 'mode'>> & Pick<AttachmentProps, 'imageOnly'> & {
240
+ export declare type AttachmentState = ComponentState<AttachmentSlots> & Required<Pick<AttachmentProps, 'id' | 'size' | 'designVersion' | 'mode' | 'dismissOnly'>> & Pick<AttachmentProps, 'imageOnly'> & {
220
241
  isLoading: boolean;
221
242
  shouldUseOverflow: boolean;
222
243
  };
@@ -309,6 +330,11 @@ export declare type AttachmentTagSlots = {
309
330
  */
310
331
  export declare type AttachmentTagState = ComponentState<AttachmentTagSlots>;
311
332
 
333
+ /**
334
+ * Render the final JSX of AgentTag
335
+ */
336
+ export declare const renderAgentTag_unstable: (state: AgentTagState) => JSX.Element;
337
+
312
338
  /**
313
339
  * Render the final JSX of Attachment
314
340
  */
@@ -352,6 +378,22 @@ export declare const renderAttachmentTagItem_unstable: (state: AttachmentTagItem
352
378
  */
353
379
  export declare const renderAttachmentTagList_unstable: (state: AttachmentTagListState, contextValues: AttachmentTagListContextValues) => JSX.Element;
354
380
 
381
+ /**
382
+ * Create the state required to render AgentTag.
383
+ *
384
+ * The returned state can be modified with hooks such as useAgentTagStyles_unstable,
385
+ * before being passed to renderAgentTag_unstable.
386
+ *
387
+ * @param props - props from this instance of AgentTag
388
+ * @param ref - reference to root HTMLElement of AgentTag
389
+ */
390
+ export declare const useAgentTag_unstable: (props: AgentTagProps, ref: React_2.Ref<HTMLDivElement>) => AgentTagState;
391
+
392
+ /**
393
+ * Apply styling to the AgentTag slots based on the state
394
+ */
395
+ export declare const useAgentTagStyles_unstable: (state: AgentTagState) => AgentTagState;
396
+
355
397
  /**
356
398
  * Create the state required to render Attachment.
357
399
  *
@@ -0,0 +1 @@
1
+ export { AgentTag, renderAgentTag_unstable, useAgentTag_unstable, agentTagClassNames, useAgentTagStyles_unstable } from './components/AgentTag/index';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AgentTag.ts"],"sourcesContent":["export {\n AgentTag,\n renderAgentTag_unstable,\n useAgentTag_unstable,\n agentTagClassNames,\n useAgentTagStyles_unstable,\n} from './components/AgentTag/index';\nexport type { AgentTagProps, AgentTagSlots, AgentTagState } from './components/AgentTag/index';\n"],"names":["AgentTag","renderAgentTag_unstable","useAgentTag_unstable","agentTagClassNames","useAgentTagStyles_unstable"],"rangeMappings":"","mappings":"AAAA,SACEA,QAAQ,EACRC,uBAAuB,EACvBC,oBAAoB,EACpBC,kBAAkB,EAClBC,0BAA0B,QACrB,8BAA8B"}
package/lib/Attachment.js CHANGED
@@ -1,2 +1 @@
1
1
  export { Attachment, attachmentClassNames, renderAttachment_unstable, useAttachmentStyles_unstable, useAttachment_unstable, useOverflowStyles } from './components/Attachment/index';
2
- //# sourceMappingURL=Attachment.js.map
@@ -1,2 +1 @@
1
1
  export { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable, useAttachmentListStyles_unstable, useAttachmentList_unstable } from './components/AttachmentList/index';
2
- //# sourceMappingURL=AttachmentList.js.map
@@ -1,2 +1 @@
1
1
  export { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenuContextValues_unstable, useAttachmentOverflowMenu_unstable } from './components/AttachmentOverflowMenu/index';
2
- //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -1,2 +1 @@
1
1
  export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './components/AttachmentOverflowMenuButton/index';
2
- //# sourceMappingURL=AttachmentOverflowMenuButton.js.map
@@ -1,2 +1 @@
1
1
  export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './components/AttachmentOverflowMenuItem/index';
2
- //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
@@ -1,2 +1 @@
1
1
  export { ATTACHMENTTAG_MAXWIDTH, AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from './components/AttachmentTag/index';
2
- //# sourceMappingURL=AttachmentTag.js.map
@@ -1,2 +1 @@
1
1
  export { AttachmentTagItem, attachmentTagItemClassNames, renderAttachmentTagItem_unstable, useAttachmentTagItemStyles_unstable, useAttachmentTagItem_unstable } from './components/AttachmentTagItem/index';
2
- //# sourceMappingURL=AttachmentTagItem.js.map
@@ -1,2 +1 @@
1
1
  export { AttachmentTagList, attachmentTagListClassNames, renderAttachmentTagList_unstable, useAttachmentTagListStyles_unstable, useAttachmentTagList_unstable } from './components/AttachmentTagList/index';
2
- //# sourceMappingURL=AttachmentTagList.js.map
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { useAgentTag_unstable } from './useAgentTag';
3
+ import { renderAgentTag_unstable } from './renderAgentTag';
4
+ import { useAgentTagStyles_unstable } from './useAgentTagStyles.styles';
5
+ // AgentTag component - TODO: add more docs
6
+ export const AgentTag = /*#__PURE__*/ React.forwardRef((props, ref)=>{
7
+ const state = useAgentTag_unstable(props, ref);
8
+ useAgentTagStyles_unstable(state);
9
+ return renderAgentTag_unstable(state);
10
+ });
11
+ AgentTag.displayName = 'AgentTag';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AgentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAgentTag_unstable } from './useAgentTag';\nimport { renderAgentTag_unstable } from './renderAgentTag';\nimport { useAgentTagStyles_unstable } from './useAgentTagStyles.styles';\nimport type { AgentTagProps } from './AgentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// AgentTag component - TODO: add more docs\nexport const AgentTag: ForwardRefComponent<AgentTagProps> = React.forwardRef((props, ref) => {\n const state = useAgentTag_unstable(props, ref);\n\n useAgentTagStyles_unstable(state);\n return renderAgentTag_unstable(state);\n});\n\nAgentTag.displayName = 'AgentTag';\n"],"names":["React","useAgentTag_unstable","renderAgentTag_unstable","useAgentTagStyles_unstable","AgentTag","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAIxE,2CAA2C;AAC3C,OAAO,MAAMC,yBAA+CJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQP,qBAAqBK,OAAOC;IAE1CJ,2BAA2BK;IAC3B,OAAON,wBAAwBM;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
@@ -0,0 +1,3 @@
1
+ /**
2
+ * State used in rendering AgentTag
3
+ */ export { };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AgentTag.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-components';\nimport type { AttachmentSlots, AttachmentProps, AttachmentState } from '../Attachment';\n\nexport type AgentTagSlots = AttachmentSlots;\n\n/**\n * AgentTag Props\n */\nexport type AgentTagProps = ComponentProps<Partial<Omit<AgentTagSlots, 'primaryAction' | 'progress'>>> &\n Omit<AttachmentProps, keyof AttachmentSlots | 'dismissOnly'>;\n\n/**\n * State used in rendering AgentTag\n */\nexport type AgentTagState = ComponentState<AgentTagSlots> & Omit<AttachmentState, keyof AttachmentSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAWA;;CAEC,GACD,WAAyG"}
@@ -0,0 +1,4 @@
1
+ export { AgentTag } from './AgentTag';
2
+ export { renderAgentTag_unstable } from './renderAgentTag';
3
+ export { useAgentTag_unstable } from './useAgentTag';
4
+ export { agentTagClassNames, useAgentTagStyles_unstable } from './useAgentTagStyles.styles';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { AgentTag } from './AgentTag';\nexport type { AgentTagProps, AgentTagSlots, AgentTagState } from './AgentTag.types';\nexport { renderAgentTag_unstable } from './renderAgentTag';\nexport { useAgentTag_unstable } from './useAgentTag';\nexport { agentTagClassNames, useAgentTagStyles_unstable } from './useAgentTagStyles.styles';\n"],"names":["AgentTag","renderAgentTag_unstable","useAgentTag_unstable","agentTagClassNames","useAgentTagStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,QAAQ,QAAQ,aAAa;AAEtC,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,6BAA6B"}
@@ -0,0 +1,6 @@
1
+ import { renderAttachment_unstable } from '../Attachment';
2
+ /**
3
+ * Render the final JSX of AgentTag
4
+ */ export const renderAgentTag_unstable = (state)=>{
5
+ return renderAttachment_unstable(state);
6
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderAgentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { renderAttachment_unstable } from '../Attachment';\nimport type { AgentTagState } from './AgentTag.types';\n\n/**\n * Render the final JSX of AgentTag\n */\nexport const renderAgentTag_unstable = (state: AgentTagState) => {\n return renderAttachment_unstable(state);\n};\n"],"names":["renderAttachment_unstable","renderAgentTag_unstable","state"],"rangeMappings":";;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,yBAAyB,QAAQ,gBAAgB;AAG1D;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtC,OAAOF,0BAA0BE;AACnC,EAAE"}
@@ -0,0 +1,18 @@
1
+ import { useAttachment_unstable } from '..';
2
+ // If you add JSX to this file, be sure to change the file type to .tsx
3
+ /**
4
+ * Create the state required to render AgentTag.
5
+ *
6
+ * The returned state can be modified with hooks such as useAgentTagStyles_unstable,
7
+ * before being passed to renderAgentTag_unstable.
8
+ *
9
+ * @param props - props from this instance of AgentTag
10
+ * @param ref - reference to root HTMLElement of AgentTag
11
+ */ export const useAgentTag_unstable = (props, ref)=>{
12
+ const state = useAttachment_unstable({
13
+ ...props,
14
+ dismissOnly: true,
15
+ designVersion: 'next'
16
+ }, ref);
17
+ return state;
18
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAgentTag.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { AgentTagProps, AgentTagState } from './AgentTag.types';\nimport { useAttachment_unstable } from '..';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render AgentTag.\n *\n * The returned state can be modified with hooks such as useAgentTagStyles_unstable,\n * before being passed to renderAgentTag_unstable.\n *\n * @param props - props from this instance of AgentTag\n * @param ref - reference to root HTMLElement of AgentTag\n */\nexport const useAgentTag_unstable = (props: AgentTagProps, ref: React.Ref<HTMLDivElement>): AgentTagState => {\n const state = useAttachment_unstable({ ...props, dismissOnly: true, designVersion: 'next' }, ref);\n\n return state;\n};\n"],"names":["useAttachment_unstable","useAgentTag_unstable","props","ref","state","dismissOnly","designVersion"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAEA,SAASA,sBAAsB,QAAQ,KAAK;AAE5C,uEAAuE;AAEvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAsBC;IACzD,MAAMC,QAAQJ,uBAAuB;QAAE,GAAGE,KAAK;QAAEG,aAAa;QAAMC,eAAe;IAAO,GAAGH;IAE7F,OAAOC;AACT,EAAE"}
@@ -0,0 +1,95 @@
1
+ import { __styles, mergeClasses, typographyStyles } from '@fluentui/react-components';
2
+ import { useAttachmentStyles_unstable } from '..';
3
+ import { tokens } from '@fluentui-copilot/tokens';
4
+ export const agentTagClassNames = {
5
+ root: 'fai-AgentTag',
6
+ primaryAction: 'fai-AgentTag__primaryAction',
7
+ dismissIcon: 'fai-AgentTag__dismissIcon',
8
+ dismissButton: 'fai-AgentTag__dismissButton',
9
+ media: 'fai-AgentTag__media',
10
+ content: 'fai-AgentTag__content',
11
+ progress: 'fai-AgentTag__progress'
12
+ };
13
+ const useMediaStyles = __styles({
14
+ canvas: {
15
+ a9b677: "fq4mcun",
16
+ Bqenvij: "frvgh55"
17
+ },
18
+ sidecar: {
19
+ a9b677: "f64fuq3",
20
+ Bqenvij: "fjamq6b"
21
+ }
22
+ }, {
23
+ d: [".fq4mcun{width:24px;}", ".frvgh55{height:24px;}", ".f64fuq3{width:20px;}", ".fjamq6b{height:20px;}"]
24
+ });
25
+ const useContentStyles = __styles({
26
+ canvas: {
27
+ Bahqtrf: "fk6fouc",
28
+ Be2twd7: "fod5ikn",
29
+ Bhrd7zp: "fl43uef",
30
+ Bg96gwp: "faaz57k",
31
+ sj55zd: "fkfq4zb"
32
+ },
33
+ sidecar: {
34
+ Bahqtrf: "fk6fouc",
35
+ Be2twd7: "fkhj508",
36
+ Bhrd7zp: "fl43uef",
37
+ Bg96gwp: "f1i3iumi",
38
+ sj55zd: "fkfq4zb"
39
+ }
40
+ }, {
41
+ d: [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
42
+ });
43
+ const useDismissButtonStyles = __styles({
44
+ canvas: {
45
+ Beyfa6y: 0,
46
+ Bbmb7ep: 0,
47
+ Btl43ni: 0,
48
+ B7oj6ja: 0,
49
+ Dimara: "f1jxijnj",
50
+ uwmqm3: ["fhx4nu", "fjodcmx"],
51
+ z189sj: ["fw5db7e", "f1uw59to"]
52
+ },
53
+ sidecar: {
54
+ uwmqm3: ["f1uw59to", "fw5db7e"],
55
+ z189sj: ["f1vdfbxk", "f1f5gg8d"],
56
+ Beyfa6y: 0,
57
+ Bbmb7ep: 0,
58
+ Btl43ni: 0,
59
+ B7oj6ja: 0,
60
+ Dimara: "f1kijzfu"
61
+ }
62
+ }, {
63
+ d: [[".f1jxijnj{border-radius:var(--borderRadius2XL);}", {
64
+ p: -1
65
+ }], ".fhx4nu{padding-left:var(--spacingHorizontalL);}", ".fjodcmx{padding-right:var(--spacingHorizontalL);}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", [".f1kijzfu{border-radius:var(--borderRadiusXLarge);}", {
66
+ p: -1
67
+ }]]
68
+ });
69
+ /**
70
+ * Apply styling to the AgentTag slots based on the state
71
+ */
72
+ export const useAgentTagStyles_unstable = state => {
73
+ 'use no memo';
74
+
75
+ const {
76
+ mode
77
+ } = state;
78
+ const contentStyles = useContentStyles();
79
+ const dismissButtonStyles = useDismissButtonStyles();
80
+ const mediaStyles = useMediaStyles();
81
+ state.root.className = mergeClasses(agentTagClassNames.root, state.root.className);
82
+ state.primaryAction.className = mergeClasses(agentTagClassNames.primaryAction, state.primaryAction.className);
83
+ state.dismissIcon.className = mergeClasses(agentTagClassNames.dismissIcon, state.dismissIcon.className);
84
+ state.dismissButton.className = mergeClasses(agentTagClassNames.dismissButton, dismissButtonStyles[mode], state.dismissButton.className);
85
+ if (state.media) {
86
+ state.media.className = mergeClasses(agentTagClassNames.media, mediaStyles[mode], state.media.className);
87
+ }
88
+ state.content.className = mergeClasses(agentTagClassNames.content, contentStyles[mode], state.content.className);
89
+ if (state.progress) {
90
+ state.progress.className = mergeClasses(agentTagClassNames.progress, state.progress.className);
91
+ }
92
+ useAttachmentStyles_unstable(state);
93
+ return state;
94
+ };
95
+ //# sourceMappingURL=useAgentTagStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAgentTagStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport type { AgentTagSlots, AgentTagState } from './AgentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { useAttachmentStyles_unstable } from '..';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const agentTagClassNames: SlotClassNames<AgentTagSlots> = {\n root: 'fai-AgentTag',\n primaryAction: 'fai-AgentTag__primaryAction',\n dismissIcon: 'fai-AgentTag__dismissIcon',\n dismissButton: 'fai-AgentTag__dismissButton',\n media: 'fai-AgentTag__media',\n content: 'fai-AgentTag__content',\n progress: 'fai-AgentTag__progress',\n};\n\nconst useMediaStyles = makeStyles({\n canvas: {\n width: '24px',\n height: '24px',\n },\n sidecar: { width: '20px', height: '20px' },\n});\n\nconst useContentStyles = makeStyles({\n canvas: {\n ...typographyStyles.subtitle2,\n color: tokens.colorNeutralForeground2,\n },\n sidecar: {\n ...typographyStyles.body1Strong,\n color: tokens.colorNeutralForeground2,\n },\n});\n\nconst useDismissButtonStyles = makeStyles({\n canvas: {\n borderRadius: tokens.borderRadius2XL,\n paddingLeft: tokens.spacingHorizontalL,\n paddingRight: tokens.spacingHorizontalM,\n },\n sidecar: {\n paddingLeft: tokens.spacingHorizontalM,\n paddingRight: tokens.spacingHorizontalS,\n borderRadius: tokens.borderRadiusXLarge,\n },\n});\n\n/**\n * Apply styling to the AgentTag slots based on the state\n */\nexport const useAgentTagStyles_unstable = (state: AgentTagState): AgentTagState => {\n 'use no memo';\n\n const { mode } = state;\n\n const contentStyles = useContentStyles();\n const dismissButtonStyles = useDismissButtonStyles();\n const mediaStyles = useMediaStyles();\n\n state.root.className = mergeClasses(agentTagClassNames.root, state.root.className);\n\n state.primaryAction.className = mergeClasses(agentTagClassNames.primaryAction, state.primaryAction.className);\n\n state.dismissIcon.className = mergeClasses(agentTagClassNames.dismissIcon, state.dismissIcon.className);\n\n state.dismissButton.className = mergeClasses(\n agentTagClassNames.dismissButton,\n dismissButtonStyles[mode],\n state.dismissButton.className,\n );\n\n if (state.media) {\n state.media.className = mergeClasses(agentTagClassNames.media, mediaStyles[mode], state.media.className);\n }\n\n state.content.className = mergeClasses(agentTagClassNames.content, contentStyles[mode], state.content.className);\n\n if (state.progress) {\n state.progress.className = mergeClasses(agentTagClassNames.progress, state.progress.className);\n }\n\n useAttachmentStyles_unstable(state);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","typographyStyles","useAttachmentStyles_unstable","tokens","agentTagClassNames","root","primaryAction","dismissIcon","dismissButton","media","content","progress","useMediaStyles","canvas","width","height","sidecar","useContentStyles","subtitle2","color","colorNeutralForeground2","body1Strong","useDismissButtonStyles","borderRadius","borderRadius2XL","paddingLeft","spacingHorizontalL","paddingRight","spacingHorizontalM","spacingHorizontalS","borderRadiusXLarge","useAgentTagStyles_unstable","state","mode","contentStyles","dismissButtonStyles","mediaStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,6BAA6B;AAGxF,SAASC,4BAA4B,QAAQ,KAAK;AAClD,SAASC,MAAM,QAAQ,2BAA2B;AAElD,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;IACNC,eAAe;IACfC,aAAa;IACbC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,UAAU;AACZ,EAAE;AAEF,MAAMC,iBAAiBb,WAAW;IAChCc,QAAQ;QACNC,OAAO;QACPC,QAAQ;IACV;IACAC,SAAS;QAAEF,OAAO;QAAQC,QAAQ;IAAO;AAC3C;AAEA,MAAME,mBAAmBlB,WAAW;IAClCc,QAAQ;QACN,GAAGZ,iBAAiBiB,SAAS;QAC7BC,OAAOhB,OAAOiB,uBAAuB;IACvC;IACAJ,SAAS;QACP,GAAGf,iBAAiBoB,WAAW;QAC/BF,OAAOhB,OAAOiB,uBAAuB;IACvC;AACF;AAEA,MAAME,yBAAyBvB,WAAW;IACxCc,QAAQ;QACNU,cAAcpB,OAAOqB,eAAe;QACpCC,aAAatB,OAAOuB,kBAAkB;QACtCC,cAAcxB,OAAOyB,kBAAkB;IACzC;IACAZ,SAAS;QACPS,aAAatB,OAAOyB,kBAAkB;QACtCD,cAAcxB,OAAO0B,kBAAkB;QACvCN,cAAcpB,OAAO2B,kBAAkB;IACzC;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGD;IAEjB,MAAME,gBAAgBjB;IACtB,MAAMkB,sBAAsBb;IAC5B,MAAMc,cAAcxB;IAEpBoB,MAAM3B,IAAI,CAACgC,SAAS,GAAGrC,aAAaI,mBAAmBC,IAAI,EAAE2B,MAAM3B,IAAI,CAACgC,SAAS;IAEjFL,MAAM1B,aAAa,CAAC+B,SAAS,GAAGrC,aAAaI,mBAAmBE,aAAa,EAAE0B,MAAM1B,aAAa,CAAC+B,SAAS;IAE5GL,MAAMzB,WAAW,CAAC8B,SAAS,GAAGrC,aAAaI,mBAAmBG,WAAW,EAAEyB,MAAMzB,WAAW,CAAC8B,SAAS;IAEtGL,MAAMxB,aAAa,CAAC6B,SAAS,GAAGrC,aAC9BI,mBAAmBI,aAAa,EAChC2B,mBAAmB,CAACF,KAAK,EACzBD,MAAMxB,aAAa,CAAC6B,SAAS;IAG/B,IAAIL,MAAMvB,KAAK,EAAE;QACfuB,MAAMvB,KAAK,CAAC4B,SAAS,GAAGrC,aAAaI,mBAAmBK,KAAK,EAAE2B,WAAW,CAACH,KAAK,EAAED,MAAMvB,KAAK,CAAC4B,SAAS;IACzG;IAEAL,MAAMtB,OAAO,CAAC2B,SAAS,GAAGrC,aAAaI,mBAAmBM,OAAO,EAAEwB,aAAa,CAACD,KAAK,EAAED,MAAMtB,OAAO,CAAC2B,SAAS;IAE/G,IAAIL,MAAMrB,QAAQ,EAAE;QAClBqB,MAAMrB,QAAQ,CAAC0B,SAAS,GAAGrC,aAAaI,mBAAmBO,QAAQ,EAAEqB,MAAMrB,QAAQ,CAAC0B,SAAS;IAC/F;IAEAnC,6BAA6B8B;IAE7B,OAAOA;AACT,EAAE"}
@@ -0,0 +1,66 @@
1
+ import { makeStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';
2
+ import { useAttachmentStyles_unstable } from '..';
3
+ import { tokens } from '@fluentui-copilot/tokens';
4
+ export const agentTagClassNames = {
5
+ root: 'fai-AgentTag',
6
+ primaryAction: 'fai-AgentTag__primaryAction',
7
+ dismissIcon: 'fai-AgentTag__dismissIcon',
8
+ dismissButton: 'fai-AgentTag__dismissButton',
9
+ media: 'fai-AgentTag__media',
10
+ content: 'fai-AgentTag__content',
11
+ progress: 'fai-AgentTag__progress'
12
+ };
13
+ const useMediaStyles = makeStyles({
14
+ canvas: {
15
+ width: '24px',
16
+ height: '24px'
17
+ },
18
+ sidecar: {
19
+ width: '20px',
20
+ height: '20px'
21
+ }
22
+ });
23
+ const useContentStyles = makeStyles({
24
+ canvas: {
25
+ ...typographyStyles.subtitle2,
26
+ color: tokens.colorNeutralForeground2
27
+ },
28
+ sidecar: {
29
+ ...typographyStyles.body1Strong,
30
+ color: tokens.colorNeutralForeground2
31
+ }
32
+ });
33
+ const useDismissButtonStyles = makeStyles({
34
+ canvas: {
35
+ borderRadius: tokens.borderRadius2XL,
36
+ paddingLeft: tokens.spacingHorizontalL,
37
+ paddingRight: tokens.spacingHorizontalM
38
+ },
39
+ sidecar: {
40
+ paddingLeft: tokens.spacingHorizontalM,
41
+ paddingRight: tokens.spacingHorizontalS,
42
+ borderRadius: tokens.borderRadiusXLarge
43
+ }
44
+ });
45
+ /**
46
+ * Apply styling to the AgentTag slots based on the state
47
+ */ export const useAgentTagStyles_unstable = (state)=>{
48
+ 'use no memo';
49
+ const { mode } = state;
50
+ const contentStyles = useContentStyles();
51
+ const dismissButtonStyles = useDismissButtonStyles();
52
+ const mediaStyles = useMediaStyles();
53
+ state.root.className = mergeClasses(agentTagClassNames.root, state.root.className);
54
+ state.primaryAction.className = mergeClasses(agentTagClassNames.primaryAction, state.primaryAction.className);
55
+ state.dismissIcon.className = mergeClasses(agentTagClassNames.dismissIcon, state.dismissIcon.className);
56
+ state.dismissButton.className = mergeClasses(agentTagClassNames.dismissButton, dismissButtonStyles[mode], state.dismissButton.className);
57
+ if (state.media) {
58
+ state.media.className = mergeClasses(agentTagClassNames.media, mediaStyles[mode], state.media.className);
59
+ }
60
+ state.content.className = mergeClasses(agentTagClassNames.content, contentStyles[mode], state.content.className);
61
+ if (state.progress) {
62
+ state.progress.className = mergeClasses(agentTagClassNames.progress, state.progress.className);
63
+ }
64
+ useAttachmentStyles_unstable(state);
65
+ return state;
66
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAgentTagStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport type { AgentTagSlots, AgentTagState } from './AgentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { useAttachmentStyles_unstable } from '..';\nimport { tokens } from '@fluentui-copilot/tokens';\n\nexport const agentTagClassNames: SlotClassNames<AgentTagSlots> = {\n root: 'fai-AgentTag',\n primaryAction: 'fai-AgentTag__primaryAction',\n dismissIcon: 'fai-AgentTag__dismissIcon',\n dismissButton: 'fai-AgentTag__dismissButton',\n media: 'fai-AgentTag__media',\n content: 'fai-AgentTag__content',\n progress: 'fai-AgentTag__progress',\n};\n\nconst useMediaStyles = makeStyles({\n canvas: {\n width: '24px',\n height: '24px',\n },\n sidecar: { width: '20px', height: '20px' },\n});\n\nconst useContentStyles = makeStyles({\n canvas: {\n ...typographyStyles.subtitle2,\n color: tokens.colorNeutralForeground2,\n },\n sidecar: {\n ...typographyStyles.body1Strong,\n color: tokens.colorNeutralForeground2,\n },\n});\n\nconst useDismissButtonStyles = makeStyles({\n canvas: {\n borderRadius: tokens.borderRadius2XL,\n paddingLeft: tokens.spacingHorizontalL,\n paddingRight: tokens.spacingHorizontalM,\n },\n sidecar: {\n paddingLeft: tokens.spacingHorizontalM,\n paddingRight: tokens.spacingHorizontalS,\n borderRadius: tokens.borderRadiusXLarge,\n },\n});\n\n/**\n * Apply styling to the AgentTag slots based on the state\n */\nexport const useAgentTagStyles_unstable = (state: AgentTagState): AgentTagState => {\n 'use no memo';\n\n const { mode } = state;\n\n const contentStyles = useContentStyles();\n const dismissButtonStyles = useDismissButtonStyles();\n const mediaStyles = useMediaStyles();\n\n state.root.className = mergeClasses(agentTagClassNames.root, state.root.className);\n\n state.primaryAction.className = mergeClasses(agentTagClassNames.primaryAction, state.primaryAction.className);\n\n state.dismissIcon.className = mergeClasses(agentTagClassNames.dismissIcon, state.dismissIcon.className);\n\n state.dismissButton.className = mergeClasses(\n agentTagClassNames.dismissButton,\n dismissButtonStyles[mode],\n state.dismissButton.className,\n );\n\n if (state.media) {\n state.media.className = mergeClasses(agentTagClassNames.media, mediaStyles[mode], state.media.className);\n }\n\n state.content.className = mergeClasses(agentTagClassNames.content, contentStyles[mode], state.content.className);\n\n if (state.progress) {\n state.progress.className = mergeClasses(agentTagClassNames.progress, state.progress.className);\n }\n\n useAttachmentStyles_unstable(state);\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","typographyStyles","useAttachmentStyles_unstable","tokens","agentTagClassNames","root","primaryAction","dismissIcon","dismissButton","media","content","progress","useMediaStyles","canvas","width","height","sidecar","useContentStyles","subtitle2","color","colorNeutralForeground2","body1Strong","useDismissButtonStyles","borderRadius","borderRadius2XL","paddingLeft","spacingHorizontalL","paddingRight","spacingHorizontalM","spacingHorizontalS","borderRadiusXLarge","useAgentTagStyles_unstable","state","mode","contentStyles","dismissButtonStyles","mediaStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,gBAAgB,QAAQ,6BAA6B;AAGxF,SAASC,4BAA4B,QAAQ,KAAK;AAClD,SAASC,MAAM,QAAQ,2BAA2B;AAElD,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;IACNC,eAAe;IACfC,aAAa;IACbC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,UAAU;AACZ,EAAE;AAEF,MAAMC,iBAAiBb,WAAW;IAChCc,QAAQ;QACNC,OAAO;QACPC,QAAQ;IACV;IACAC,SAAS;QAAEF,OAAO;QAAQC,QAAQ;IAAO;AAC3C;AAEA,MAAME,mBAAmBlB,WAAW;IAClCc,QAAQ;QACN,GAAGZ,iBAAiBiB,SAAS;QAC7BC,OAAOhB,OAAOiB,uBAAuB;IACvC;IACAJ,SAAS;QACP,GAAGf,iBAAiBoB,WAAW;QAC/BF,OAAOhB,OAAOiB,uBAAuB;IACvC;AACF;AAEA,MAAME,yBAAyBvB,WAAW;IACxCc,QAAQ;QACNU,cAAcpB,OAAOqB,eAAe;QACpCC,aAAatB,OAAOuB,kBAAkB;QACtCC,cAAcxB,OAAOyB,kBAAkB;IACzC;IACAZ,SAAS;QACPS,aAAatB,OAAOyB,kBAAkB;QACtCD,cAAcxB,OAAO0B,kBAAkB;QACvCN,cAAcpB,OAAO2B,kBAAkB;IACzC;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGD;IAEjB,MAAME,gBAAgBjB;IACtB,MAAMkB,sBAAsBb;IAC5B,MAAMc,cAAcxB;IAEpBoB,MAAM3B,IAAI,CAACgC,SAAS,GAAGrC,aAAaI,mBAAmBC,IAAI,EAAE2B,MAAM3B,IAAI,CAACgC,SAAS;IAEjFL,MAAM1B,aAAa,CAAC+B,SAAS,GAAGrC,aAAaI,mBAAmBE,aAAa,EAAE0B,MAAM1B,aAAa,CAAC+B,SAAS;IAE5GL,MAAMzB,WAAW,CAAC8B,SAAS,GAAGrC,aAAaI,mBAAmBG,WAAW,EAAEyB,MAAMzB,WAAW,CAAC8B,SAAS;IAEtGL,MAAMxB,aAAa,CAAC6B,SAAS,GAAGrC,aAC9BI,mBAAmBI,aAAa,EAChC2B,mBAAmB,CAACF,KAAK,EACzBD,MAAMxB,aAAa,CAAC6B,SAAS;IAG/B,IAAIL,MAAMvB,KAAK,EAAE;QACfuB,MAAMvB,KAAK,CAAC4B,SAAS,GAAGrC,aAAaI,mBAAmBK,KAAK,EAAE2B,WAAW,CAACH,KAAK,EAAED,MAAMvB,KAAK,CAAC4B,SAAS;IACzG;IAEAL,MAAMtB,OAAO,CAAC2B,SAAS,GAAGrC,aAAaI,mBAAmBM,OAAO,EAAEwB,aAAa,CAACD,KAAK,EAAED,MAAMtB,OAAO,CAAC2B,SAAS;IAE/G,IAAIL,MAAMrB,QAAQ,EAAE;QAClBqB,MAAMrB,QAAQ,CAAC0B,SAAS,GAAGrC,aAAaI,mBAAmBO,QAAQ,EAAEqB,MAAMrB,QAAQ,CAAC0B,SAAS;IAC/F;IAEAnC,6BAA6B8B;IAE7B,OAAOA;AACT,EAAE"}
@@ -4,11 +4,10 @@ import { renderAttachment_unstable } from './renderAttachment';
4
4
  import { useAttachmentStyles_unstable } from './useAttachmentStyles.styles';
5
5
  import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
6
  // Attachment component - TODO: add more docs
7
- export const Attachment = /*#__PURE__*/React.forwardRef((props, ref) => {
8
- const state = useAttachment_unstable(props, ref);
9
- useAttachmentStyles_unstable(state);
10
- useCustomStyleHook('useAttachmentStyles')(state);
11
- return renderAttachment_unstable(state);
7
+ export const Attachment = /*#__PURE__*/ React.forwardRef((props, ref)=>{
8
+ const state = useAttachment_unstable(props, ref);
9
+ useAttachmentStyles_unstable(state);
10
+ useCustomStyleHook('useAttachmentStyles')(state);
11
+ return renderAttachment_unstable(state);
12
12
  });
13
13
  Attachment.displayName = 'Attachment';
14
- //# sourceMappingURL=Attachment.js.map
@@ -1,4 +1,3 @@
1
1
  /**
2
2
  * State used in rendering Attachment
3
- */export {};
4
- //# sourceMappingURL=Attachment.types.js.map
3
+ */ export { };
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport type { ComponentProps, ComponentState, ProgressBar, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Attachments support a primary action.\n */\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n\n /**\n * Attachments have a dismiss button.\n */\n dismissButton: NonNullable<Slot<'button'>>;\n\n /**\n * Attachments can include an image or other media.\n */\n media?: Slot<'span'>;\n\n /**\n * The content of the attachment.\n */\n content: NonNullable<Slot<'span'>>;\n\n /**\n * The icon that renders for the `dismissButton`.\n */\n dismissIcon: NonNullable<Slot<'span'>>;\n\n /**\n * An attachment supports a progress bar, which can display the attachment's upload progress.\n */\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> &\n CopilotMode &\n DesignVersion & {\n /**\n * Use this prop if an attachment has no text content.\n *\n * @default false\n */\n imageOnly?: boolean;\n\n /**\n * An attachment supports different sizes.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n };\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id' | 'size' | 'designVersion' | 'mode'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AA0DA;;CAEC,GACD,WAKI"}
1
+ {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { CopilotMode, DesignVersion } from '@fluentui-copilot/react-provider';\nimport type { ComponentProps, ComponentState, ProgressBar, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Attachments support a primary action.\n */\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n\n /**\n * Attachments have a dismiss button.\n */\n dismissButton: NonNullable<Slot<'button'>>;\n\n /**\n * Attachments can include an image or other media.\n */\n media?: Slot<'span'>;\n\n /**\n * The content of the attachment.\n */\n content: NonNullable<Slot<'span'>>;\n\n /**\n * The icon that renders for the `dismissButton`.\n */\n dismissIcon: NonNullable<Slot<'span'>>;\n\n /**\n * An attachment supports a progress bar, which can display the attachment's upload progress.\n */\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> &\n CopilotMode &\n DesignVersion & {\n /**\n * Use this prop if an attachment has no text content.\n *\n * @default false\n */\n imageOnly?: boolean;\n\n /**\n * An attachment supports different sizes.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium';\n /**\n * Use this prop if the attachment has no primary action\n * and should be rendered as a single button\n */\n dismissOnly?: boolean;\n };\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id' | 'size' | 'designVersion' | 'mode' | 'dismissOnly'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AA+DA;;CAEC,GACD,WAKI"}
@@ -2,4 +2,3 @@ export { Attachment } from './Attachment';
2
2
  export { renderAttachment_unstable } from './renderAttachment';
3
3
  export { useAttachment_unstable } from './useAttachment';
4
4
  export { attachmentClassNames, useAttachmentStyles_unstable, useOverflowStyles } from './useAttachmentStyles.styles';
5
- //# sourceMappingURL=index.js.map
@@ -1,24 +1,42 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { OverflowItem, assertSlots } from '@fluentui/react-components';
3
3
  /**
4
4
  * Render the final JSX of Attachment
5
- */
6
- export const renderAttachment_unstable = state => {
7
- assertSlots(state);
8
- const {
9
- id,
10
- shouldUseOverflow
11
- } = state;
12
- const attachment = /*#__PURE__*/_jsxs(state.root, {
13
- children: [/*#__PURE__*/_jsxs(state.primaryAction, {
14
- children: [state.media && !state.imageOnly && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), state.progress && /*#__PURE__*/_jsx(state.progress, {})]
15
- }), /*#__PURE__*/_jsx(state.dismissButton, {
16
- children: /*#__PURE__*/_jsx(state.dismissIcon, {})
17
- })]
18
- });
19
- return shouldUseOverflow ? /*#__PURE__*/_jsx(OverflowItem, {
20
- id: id,
21
- children: attachment
22
- }, id) : attachment;
5
+ */ export const renderAttachment_unstable = (state)=>{
6
+ const { id, shouldUseOverflow, designVersion, dismissOnly } = state;
7
+ const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);
8
+ return shouldUseOverflow ? /*#__PURE__*/ _jsx(OverflowItem, {
9
+ id: id,
10
+ children: attachment
11
+ }, id) : attachment;
12
+ };
13
+ const renderAttachment = (state)=>{
14
+ assertSlots(state);
15
+ return /*#__PURE__*/ _jsxs(state.root, {
16
+ children: [
17
+ /*#__PURE__*/ _jsxs(state.primaryAction, {
18
+ children: [
19
+ state.media && !state.imageOnly && /*#__PURE__*/ _jsx(state.media, {}),
20
+ /*#__PURE__*/ _jsx(state.content, {}),
21
+ state.progress && /*#__PURE__*/ _jsx(state.progress, {})
22
+ ]
23
+ }),
24
+ /*#__PURE__*/ _jsx(state.dismissButton, {
25
+ children: /*#__PURE__*/ _jsx(state.dismissIcon, {})
26
+ })
27
+ ]
28
+ });
29
+ };
30
+ const renderDismissOnly = (state)=>{
31
+ assertSlots(state);
32
+ return /*#__PURE__*/ _jsx(state.root, {
33
+ children: /*#__PURE__*/ _jsxs(state.dismissButton, {
34
+ children: [
35
+ state.media && !state.imageOnly && /*#__PURE__*/ _jsx(state.media, {}),
36
+ /*#__PURE__*/ _jsx(state.content, {}),
37
+ state.progress && /*#__PURE__*/ _jsx(state.progress, {}),
38
+ /*#__PURE__*/ _jsx(state.dismissIcon, {})
39
+ ]
40
+ })
41
+ });
23
42
  };
24
- //# sourceMappingURL=renderAttachment.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { OverflowItem, assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n const { id, shouldUseOverflow } = state;\n\n const attachment = (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n return shouldUseOverflow ? (\n <OverflowItem id={id} key={id}>\n {attachment}\n </OverflowItem>\n ) : (\n attachment\n );\n};\n"],"names":["OverflowItem","assertSlots","renderAttachment_unstable","state","id","shouldUseOverflow","attachment","root","primaryAction","media","imageOnly","content","progress","dismissButton","dismissIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,YAAY,EAAEC,WAAW,QAAQ,6BAA6B;AAGvE;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAC7B,MAAM,EAAEC,EAAE,EAAEC,iBAAiB,EAAE,GAAGF;IAElC,MAAMG,2BACJ,MAACH,MAAMI,IAAI;;0BACT,MAACJ,MAAMK,aAAa;;oBACjBL,MAAMM,KAAK,IAAI,CAACN,MAAMO,SAAS,kBAAI,KAACP,MAAMM,KAAK;kCAChD,KAACN,MAAMQ,OAAO;oBACbR,MAAMS,QAAQ,kBAAI,KAACT,MAAMS,QAAQ;;;0BAEpC,KAACT,MAAMU,aAAa;0BAClB,cAAA,KAACV,MAAMW,WAAW;;;;IAIxB,OAAOT,kCACL,KAACL;QAAaI,IAAIA;kBACfE;OADwBF,MAI3BE;AAEJ,EAAE"}
1
+ {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { OverflowItem, assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n const { id, shouldUseOverflow, designVersion, dismissOnly } = state;\n\n const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);\n\n return shouldUseOverflow ? (\n <OverflowItem id={id} key={id}>\n {attachment}\n </OverflowItem>\n ) : (\n attachment\n );\n};\n\nconst renderAttachment = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n\nconst renderDismissOnly = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.dismissButton>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n"],"names":["OverflowItem","assertSlots","renderAttachment_unstable","state","id","shouldUseOverflow","designVersion","dismissOnly","attachment","renderDismissOnly","renderAttachment","root","primaryAction","media","imageOnly","content","progress","dismissButton","dismissIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,YAAY,EAAEC,WAAW,QAAQ,6BAA6B;AAGvE;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxC,MAAM,EAAEC,EAAE,EAAEC,iBAAiB,EAAEC,aAAa,EAAEC,WAAW,EAAE,GAAGJ;IAE9D,MAAMK,aAAaF,kBAAkB,UAAUC,cAAcE,kBAAkBN,SAASO,iBAAiBP;IAEzG,OAAOE,kCACL,KAACL;QAAaI,IAAIA;kBACfI;OADwBJ,MAI3BI;AAEJ,EAAE;AAEF,MAAME,mBAAmB,CAACP;IACxBF,YAA6BE;IAE7B,qBACE,MAACA,MAAMQ,IAAI;;0BACT,MAACR,MAAMS,aAAa;;oBACjBT,MAAMU,KAAK,IAAI,CAACV,MAAMW,SAAS,kBAAI,KAACX,MAAMU,KAAK;kCAChD,KAACV,MAAMY,OAAO;oBACbZ,MAAMa,QAAQ,kBAAI,KAACb,MAAMa,QAAQ;;;0BAEpC,KAACb,MAAMc,aAAa;0BAClB,cAAA,KAACd,MAAMe,WAAW;;;;AAI1B;AAEA,MAAMT,oBAAoB,CAACN;IACzBF,YAA6BE;IAE7B,qBACE,KAACA,MAAMQ,IAAI;kBACT,cAAA,MAACR,MAAMc,aAAa;;gBACjBd,MAAMU,KAAK,IAAI,CAACV,MAAMW,SAAS,kBAAI,KAACX,MAAMU,KAAK;8BAChD,KAACV,MAAMY,OAAO;gBACbZ,MAAMa,QAAQ,kBAAI,KAACb,MAAMa,QAAQ;8BAClC,KAACb,MAAMe,WAAW;;;;AAI1B"}