@fluentui-copilot/react-attachments 0.8.3 → 0.9.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 (200) hide show
  1. package/CHANGELOG.json +71 -1
  2. package/CHANGELOG.md +28 -2
  3. package/dist/index.d.ts +154 -5
  4. package/lib/Attachment.js.map +1 -1
  5. package/lib/AttachmentList.js.map +1 -1
  6. package/lib/AttachmentOverflowMenu.js +2 -0
  7. package/lib/AttachmentOverflowMenu.js.map +1 -0
  8. package/lib/AttachmentOverflowMenuButton.js +2 -0
  9. package/lib/AttachmentOverflowMenuButton.js.map +1 -0
  10. package/lib/AttachmentOverflowMenuItem.js +2 -0
  11. package/lib/AttachmentOverflowMenuItem.js.map +1 -0
  12. package/lib/AttachmentTag.js.map +1 -1
  13. package/lib/AttachmentTagItem.js.map +1 -1
  14. package/lib/AttachmentTagList.js.map +1 -1
  15. package/lib/components/Attachment/Attachment.js.map +1 -1
  16. package/lib/components/Attachment/Attachment.types.js +3 -1
  17. package/lib/components/Attachment/Attachment.types.js.map +1 -1
  18. package/lib/components/Attachment/index.js.map +1 -1
  19. package/lib/components/Attachment/renderAttachment.js +1 -1
  20. package/lib/components/Attachment/renderAttachment.js.map +1 -1
  21. package/lib/components/Attachment/useAttachment.js +5 -1
  22. package/lib/components/Attachment/useAttachment.js.map +1 -1
  23. package/lib/components/Attachment/useAttachmentStyles.js +18 -3
  24. package/lib/components/Attachment/useAttachmentStyles.js.map +1 -1
  25. package/lib/components/AttachmentList/AttachmentList.js.map +1 -1
  26. package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -1
  27. package/lib/components/AttachmentList/index.js.map +1 -1
  28. package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -1
  29. package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
  30. package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  31. package/lib/components/AttachmentList/useAttachmentListStyles.js.map +1 -1
  32. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +15 -0
  33. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  34. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -0
  35. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  36. package/lib/components/AttachmentOverflowMenu/index.js +6 -0
  37. package/lib/components/AttachmentOverflowMenu/index.js.map +1 -0
  38. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +18 -0
  39. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  40. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +24 -0
  41. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  42. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +17 -0
  43. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  44. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +11 -0
  45. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
  46. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +4 -0
  47. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
  48. package/lib/components/AttachmentOverflowMenuButton/index.js +6 -0
  49. package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -0
  50. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +14 -0
  51. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
  52. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +32 -0
  53. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
  54. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +17 -0
  55. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
  56. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +11 -0
  57. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
  58. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +4 -0
  59. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
  60. package/lib/components/AttachmentOverflowMenuItem/index.js +6 -0
  61. package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -0
  62. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +10 -0
  63. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
  64. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +43 -0
  65. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
  66. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +25 -0
  67. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
  68. package/lib/components/AttachmentTag/AttachmentTag.js +4 -1
  69. package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
  70. package/lib/components/AttachmentTag/AttachmentTag.types.js +3 -1
  71. package/lib/components/AttachmentTag/AttachmentTag.types.js.map +1 -1
  72. package/lib/components/AttachmentTag/index.js.map +1 -1
  73. package/lib/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
  74. package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  75. package/lib/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
  76. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -0
  77. package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  78. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +3 -1
  79. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
  80. package/lib/components/AttachmentTagItem/index.js.map +1 -1
  81. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
  82. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  83. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
  84. package/lib/components/AttachmentTagList/AttachmentTagList.js +4 -1
  85. package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  86. package/lib/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -1
  87. package/lib/components/AttachmentTagList/index.js.map +1 -1
  88. package/lib/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
  89. package/lib/components/AttachmentTagList/useAttachmentTagList.js +2 -2
  90. package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
  91. package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
  92. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -1
  93. package/lib/components/index.js +3 -0
  94. package/lib/components/index.js.map +1 -1
  95. package/lib/components/utils/useAttachmentTagSlots.js +2 -2
  96. package/lib/components/utils/useAttachmentTagSlots.js.map +1 -1
  97. package/lib/contexts/attachmentListContext.js.map +1 -1
  98. package/lib/contexts/attachmentOverflowMenuContext.js +10 -0
  99. package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
  100. package/lib/contexts/attachmentTagListContext.js.map +1 -1
  101. package/lib/index.js +4 -0
  102. package/lib/index.js.map +1 -1
  103. package/lib-commonjs/Attachment.js.map +1 -1
  104. package/lib-commonjs/AttachmentList.js.map +1 -1
  105. package/lib-commonjs/AttachmentOverflowMenu.js +7 -0
  106. package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -0
  107. package/lib-commonjs/AttachmentOverflowMenuButton.js +7 -0
  108. package/lib-commonjs/AttachmentOverflowMenuButton.js.map +1 -0
  109. package/lib-commonjs/AttachmentOverflowMenuItem.js +7 -0
  110. package/lib-commonjs/AttachmentOverflowMenuItem.js.map +1 -0
  111. package/lib-commonjs/AttachmentTag.js.map +1 -1
  112. package/lib-commonjs/AttachmentTagItem.js.map +1 -1
  113. package/lib-commonjs/AttachmentTagList.js.map +1 -1
  114. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  115. package/lib-commonjs/components/Attachment/Attachment.types.js +3 -1
  116. package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
  117. package/lib-commonjs/components/Attachment/index.js.map +1 -1
  118. package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
  119. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  120. package/lib-commonjs/components/Attachment/useAttachment.js +3 -1
  121. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  122. package/lib-commonjs/components/Attachment/useAttachmentStyles.js +31 -5
  123. package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -1
  124. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  125. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -1
  126. package/lib-commonjs/components/AttachmentList/index.js.map +1 -1
  127. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
  128. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  129. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  130. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +1 -1
  131. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +24 -0
  132. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  133. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +5 -0
  134. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  135. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +11 -0
  136. package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -0
  137. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +21 -0
  138. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  139. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +21 -0
  140. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  141. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +22 -0
  142. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  143. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +21 -0
  144. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
  145. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +7 -0
  146. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
  147. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +11 -0
  148. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -0
  149. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +24 -0
  150. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
  151. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +28 -0
  152. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
  153. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +37 -0
  154. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
  155. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +21 -0
  156. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
  157. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +7 -0
  158. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
  159. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +11 -0
  160. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -0
  161. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +16 -0
  162. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
  163. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +40 -0
  164. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
  165. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +39 -0
  166. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
  167. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
  168. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +3 -1
  169. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js.map +1 -1
  170. package/lib-commonjs/components/AttachmentTag/index.js.map +1 -1
  171. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
  172. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  173. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js +7 -7
  174. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
  175. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  176. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +3 -1
  177. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
  178. package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -1
  179. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
  180. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  181. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
  182. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  183. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -1
  184. package/lib-commonjs/components/AttachmentTagList/index.js.map +1 -1
  185. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
  186. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +1 -1
  187. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
  188. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
  189. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -1
  190. package/lib-commonjs/components/index.js +3 -0
  191. package/lib-commonjs/components/index.js.map +1 -1
  192. package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
  193. package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
  194. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
  195. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
  196. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
  197. package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
  198. package/lib-commonjs/index.js +95 -43
  199. package/lib-commonjs/index.js.map +1 -1
  200. package/package.json +9 -9
package/CHANGELOG.json CHANGED
@@ -2,7 +2,77 @@
2
2
  "name": "@fluentui-copilot/react-attachments",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 03 Apr 2024 22:27:26 GMT",
5
+ "date": "Tue, 30 Apr 2024 20:54:47 GMT",
6
+ "tag": "@fluentui-copilot/react-attachments_v0.9.1",
7
+ "version": "0.9.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "tristan.watanabe@gmail.com",
12
+ "package": "@fluentui-copilot/react-attachments",
13
+ "commit": "22ac12f5ba69e976d9f3e8c697262b8ce8595072",
14
+ "comment": "feat: add imageOnly prop for cases where Attachment content is only an image."
15
+ },
16
+ {
17
+ "author": "sarah.higley@microsoft.com",
18
+ "package": "@fluentui-copilot/react-attachments",
19
+ "commit": "66eba4eb0956384ecc14b2a40c5fa722680f79d8",
20
+ "comment": "chore: bump @fluentui/react-components to latest, 9.49.0"
21
+ }
22
+ ],
23
+ "none": [
24
+ {
25
+ "author": "Humberto.Morimoto@microsoft.com",
26
+ "package": "@fluentui-copilot/react-attachments",
27
+ "commit": "f21ecfc955b4b5d5b3bb146dcedfb7d839170f93",
28
+ "comment": "docs: Fixing warning on API generation."
29
+ }
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "date": "Wed, 10 Apr 2024 23:07:49 GMT",
35
+ "tag": "@fluentui-copilot/react-attachments_v0.9.0",
36
+ "version": "0.9.0",
37
+ "comments": {
38
+ "patch": [
39
+ {
40
+ "author": "tristan.watanabe@gmail.com",
41
+ "package": "@fluentui-copilot/react-attachments",
42
+ "commit": "4e6e2a4e710f03067f5b3e5cac0137c42d35bf2f",
43
+ "comment": "feat: Implement AttachmentOverflowMenuButton."
44
+ },
45
+ {
46
+ "author": "tristan.watanabe@gmail.com",
47
+ "package": "@fluentui-copilot/react-attachments",
48
+ "commit": "7fb364f96cb69368bcbeeb961f088885f064be80",
49
+ "comment": "feat: Implement AttachmentOverflowMenuItem."
50
+ },
51
+ {
52
+ "author": "tristan.watanabe@gmail.com",
53
+ "package": "@fluentui-copilot/react-attachments",
54
+ "commit": "9453a2398ba32118a85c358b6de13799cf7d9949",
55
+ "comment": "feat: Implement AttachmentOverflowMenu."
56
+ },
57
+ {
58
+ "author": "tristan.watanabe@gmail.com",
59
+ "package": "@fluentui-copilot/react-attachments",
60
+ "commit": "4fc60898effc3b41c3642f1dda4b93ade0280dd0",
61
+ "comment": "chore: deprecate AttachmentTag, AttachmentTagList and AttachmentTagItem."
62
+ }
63
+ ],
64
+ "minor": [
65
+ {
66
+ "author": "Humberto.Morimoto@microsoft.com",
67
+ "package": "@fluentui-copilot/react-attachments",
68
+ "commit": "2afa98912cd99ed6f604c582caee4d49d1ba895d",
69
+ "comment": "fix: Replace usage of deprecated getNativeElementProps with getIntrinsicElementProps."
70
+ }
71
+ ]
72
+ }
73
+ },
74
+ {
75
+ "date": "Wed, 03 Apr 2024 22:27:34 GMT",
6
76
  "tag": "@fluentui-copilot/react-attachments_v0.8.3",
7
77
  "version": "0.8.3",
8
78
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,38 @@
1
1
  # Change Log - @fluentui-copilot/react-attachments
2
2
 
3
- This log was last generated on Wed, 03 Apr 2024 22:27:26 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 30 Apr 2024 20:54:47 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.9.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.9.1)
8
+
9
+ Tue, 30 Apr 2024 20:54:47 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.9.0..@fluentui-copilot/react-attachments_v0.9.1)
11
+
12
+ ### Patches
13
+
14
+ - feat: add imageOnly prop for cases where Attachment content is only an image. ([PR #1566](https://github.com/microsoft/fluentai/pull/1566) by tristan.watanabe@gmail.com)
15
+ - chore: bump @fluentui/react-components to latest, 9.49.0 ([PR #1580](https://github.com/microsoft/fluentai/pull/1580) by sarah.higley@microsoft.com)
16
+
17
+ ## [0.9.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.9.0)
18
+
19
+ Wed, 10 Apr 2024 23:07:49 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.3..@fluentui-copilot/react-attachments_v0.9.0)
21
+
22
+ ### Minor changes
23
+
24
+ - fix: Replace usage of deprecated getNativeElementProps with getIntrinsicElementProps. ([PR #1512](https://github.com/microsoft/fluentai/pull/1512) by Humberto.Morimoto@microsoft.com)
25
+
26
+ ### Patches
27
+
28
+ - feat: Implement AttachmentOverflowMenuButton. ([PR #1515](https://github.com/microsoft/fluentai/pull/1515) by tristan.watanabe@gmail.com)
29
+ - feat: Implement AttachmentOverflowMenuItem. ([PR #1517](https://github.com/microsoft/fluentai/pull/1517) by tristan.watanabe@gmail.com)
30
+ - feat: Implement AttachmentOverflowMenu. ([PR #1504](https://github.com/microsoft/fluentai/pull/1504) by tristan.watanabe@gmail.com)
31
+ - chore: deprecate AttachmentTag, AttachmentTagList and AttachmentTagItem. ([PR #1529](https://github.com/microsoft/fluentai/pull/1529) by tristan.watanabe@gmail.com)
32
+
7
33
  ## [0.8.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.8.3)
8
34
 
9
- Wed, 03 Apr 2024 22:27:26 GMT
35
+ Wed, 03 Apr 2024 22:27:34 GMT
10
36
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.2..@fluentui-copilot/react-attachments_v0.8.3)
11
37
 
12
38
  ### Patches
package/dist/index.d.ts CHANGED
@@ -6,6 +6,11 @@ import type { Context } from '@fluentui/react-context-selector';
6
6
  import type { ContextSelector } from '@fluentui/react-context-selector';
7
7
  import { FC } from 'react';
8
8
  import type { ForwardRefComponent } from '@fluentui/react-components';
9
+ import type { MenuContextValues } from '@fluentui/react-components';
10
+ import type { MenuItem } from '@fluentui/react-components';
11
+ import type { MenuProps } from '@fluentui/react-components';
12
+ import type { MenuSlots } from '@fluentui/react-components';
13
+ import type { MenuState } from '@fluentui/react-components';
9
14
  import { Provider } from 'react';
10
15
  import { ProviderProps } from 'react';
11
16
  import * as React_2 from 'react';
@@ -39,7 +44,7 @@ declare type AttachmentListContextValues = {
39
44
  * AttachmentList Props
40
45
  */
41
46
  export declare type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {
42
- onAttachmentDismiss?: (e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>, data: AttachmentDismissedData) => void;
47
+ onAttachmentDismiss?: (e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>, data: AttachmentDismissedData) => void;
43
48
  };
44
49
 
45
50
  export declare const AttachmentListProvider: Provider<AttachmentListContextValue> & FC<ProviderProps<AttachmentListContextValue>>;
@@ -53,11 +58,81 @@ export declare type AttachmentListSlots = {
53
58
  */
54
59
  export declare type AttachmentListState = ComponentState<AttachmentListSlots> & Pick<AttachmentListProps, 'onAttachmentDismiss'>;
55
60
 
61
+ export declare const AttachmentOverflowMenu: React_2.FC<AttachmentOverflowMenuProps>;
62
+
63
+ export declare const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps>;
64
+
65
+ export declare const attachmentOverflowMenuButtonClassNames: SlotClassNames<AttachmentOverflowMenuButtonSlots>;
66
+
67
+ /**
68
+ * AttachmentOverflowMenuButton Props
69
+ */
70
+ export declare type AttachmentOverflowMenuButtonProps = ComponentProps<Partial<AttachmentOverflowMenuButtonSlots>>;
71
+
72
+ export declare type AttachmentOverflowMenuButtonSlots = {
73
+ root: NonNullable<Slot<'button'>>;
74
+ };
75
+
76
+ /**
77
+ * State used in rendering AttachmentOverflowMenuButton
78
+ */
79
+ export declare type AttachmentOverflowMenuButtonState = ComponentState<AttachmentOverflowMenuButtonSlots> & Pick<AttachmentOverflowMenuState, 'isOverflowing' | 'overflowCount'>;
80
+
81
+ export declare const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue>;
82
+
83
+ /**
84
+ * Context shared between AttachmentOverflowMenu and its children components
85
+ */
86
+ export declare type AttachmentOverflowMenuContextValue = Pick<AttachmentOverflowMenuState, 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'>;
87
+
88
+ declare type AttachmentOverflowMenuContextValues = {
89
+ attachmentOverflowMenu: AttachmentOverflowMenuContextValue;
90
+ };
91
+
92
+ export declare const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps>;
93
+
94
+ export declare const attachmentOverflowMenuItemClassNames: SlotClassNames<AttachmentOverflowMenuItemSlots>;
95
+
96
+ /**
97
+ * AttachmentOverflowMenuItem Props
98
+ */
99
+ export declare type AttachmentOverflowMenuItemProps = ComponentProps<Partial<AttachmentOverflowMenuItemSlots>> & Pick<AttachmentProps, 'id' | 'media' | 'imageOnly'>;
100
+
101
+ export declare type AttachmentOverflowMenuItemSlots = {
102
+ root: NonNullable<Slot<typeof MenuItem>>;
103
+ };
104
+
105
+ /**
106
+ * State used in rendering AttachmentOverflowMenuItem
107
+ */
108
+ export declare type AttachmentOverflowMenuItemState = ComponentState<AttachmentOverflowMenuItemSlots> & Pick<AttachmentOverflowMenuItemProps, 'imageOnly'> & {
109
+ isVisible: boolean;
110
+ };
111
+
112
+ /**
113
+ * AttachmentOverflowMenu Props
114
+ */
115
+ export declare type AttachmentOverflowMenuProps = MenuProps;
116
+
117
+ export declare const AttachmentOverflowMenuProvider: Provider<AttachmentOverflowMenuContextValue> & FC<ProviderProps<AttachmentOverflowMenuContextValue>>;
118
+
119
+ export declare type AttachmentOverflowMenuSlots = MenuSlots;
120
+
121
+ /**
122
+ * State used in rendering AttachmentOverflowMenu
123
+ */
124
+ export declare type AttachmentOverflowMenuState = MenuState & {
125
+ isOverflowing: boolean;
126
+ overflowButtonRef?: React.RefObject<HTMLButtonElement>;
127
+ overflowCount: number;
128
+ };
129
+
56
130
  /**
57
131
  * Attachment Props
58
132
  */
59
133
  export declare type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {
60
134
  id: string;
135
+ imageOnly?: boolean;
61
136
  };
62
137
 
63
138
  export declare type AttachmentSlots = {
@@ -72,8 +147,12 @@ export declare type AttachmentSlots = {
72
147
  /**
73
148
  * State used in rendering Attachment
74
149
  */
75
- export declare type AttachmentState = ComponentState<AttachmentSlots>;
150
+ export declare type AttachmentState = ComponentState<AttachmentSlots> & Pick<AttachmentProps, 'imageOnly'>;
76
151
 
152
+ /**
153
+ * @deprecated use new Attachment component exported from \@fluentui-copilot/react-attachments package instead.
154
+ * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
155
+ */
77
156
  export declare const AttachmentTag: ForwardRefComponent<AttachmentTagProps>;
78
157
 
79
158
  export declare const attachmentTagClassNames: SlotClassNames<AttachmentTagSlots>;
@@ -83,6 +162,10 @@ export declare type AttachmentTagDismissedData = {
83
162
  media?: AttachmentTagProps['media'];
84
163
  };
85
164
 
165
+ /**
166
+ * @deprecated use new AttachmentOverflowMenuItem component exported from \@fluentui-copilot/react-attachments package instead.
167
+ * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
168
+ */
86
169
  export declare const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps>;
87
170
 
88
171
  export declare const attachmentTagItemClassNames: SlotClassNames<AttachmentTagItemSlots>;
@@ -104,6 +187,10 @@ export declare type AttachmentTagItemSlots = {
104
187
  */
105
188
  export declare type AttachmentTagItemState = ComponentState<AttachmentTagItemSlots>;
106
189
 
190
+ /**
191
+ * @deprecated use new AttachmentList component exported from \@fluentui-copilot/react-attachments package instead.
192
+ * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
193
+ */
107
194
  export declare const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps>;
108
195
 
109
196
  export declare const attachmentTagListClassNames: SlotClassNames<AttachmentTagListSlots>;
@@ -160,6 +247,24 @@ export declare const renderAttachment_unstable: (state: AttachmentState) => JSX.
160
247
  */
161
248
  export declare const renderAttachmentList_unstable: (state: AttachmentListState, contextValues: AttachmentListContextValues) => JSX.Element;
162
249
 
250
+ /**
251
+ * Render the final JSX of AttachmentOverflowMenu
252
+ */
253
+ export declare const renderAttachmentOverflowMenu_unstable: (state: AttachmentOverflowMenuState, contextValues: {
254
+ menuContextValues: MenuContextValues;
255
+ attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;
256
+ }) => JSX.Element | null;
257
+
258
+ /**
259
+ * Render the final JSX of AttachmentOverflowMenuButton
260
+ */
261
+ export declare const renderAttachmentOverflowMenuButton_unstable: (state: AttachmentOverflowMenuButtonState) => JSX.Element | null;
262
+
263
+ /**
264
+ * Render the final JSX of AttachmentOverflowMenuItem
265
+ */
266
+ export declare const renderAttachmentOverflowMenuItem_unstable: (state: AttachmentOverflowMenuItemState) => JSX.Element | null;
267
+
163
268
  /**
164
269
  * Render the final JSX of AttachmentTag
165
270
  */
@@ -204,6 +309,50 @@ export declare const useAttachmentListContext_unstable: <T>(selector: ContextSel
204
309
  */
205
310
  export declare const useAttachmentListStyles_unstable: (state: AttachmentListState) => AttachmentListState;
206
311
 
312
+ /**
313
+ * Create the state required to render AttachmentOverflowMenu.
314
+ *
315
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,
316
+ * before being passed to renderAttachmentOverflowMenu_unstable.
317
+ *
318
+ * @param props - props from this instance of AttachmentOverflowMenu
319
+ */
320
+ export declare const useAttachmentOverflowMenu_unstable: (props: AttachmentOverflowMenuProps) => AttachmentOverflowMenuState;
321
+
322
+ /**
323
+ * Create the state required to render AttachmentOverflowMenuButton.
324
+ *
325
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,
326
+ * before being passed to renderAttachmentOverflowMenuButton_unstable.
327
+ *
328
+ * @param props - props from this instance of AttachmentOverflowMenuButton
329
+ * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton
330
+ */
331
+ export declare const useAttachmentOverflowMenuButton_unstable: (props: AttachmentOverflowMenuButtonProps, ref: React.Ref<HTMLButtonElement>) => AttachmentOverflowMenuButtonState;
332
+
333
+ /**
334
+ * Apply styling to the AttachmentOverflowMenuButton slots based on the state
335
+ */
336
+ export declare const useAttachmentOverflowMenuButtonStyles_unstable: (state: AttachmentOverflowMenuButtonState) => AttachmentOverflowMenuButtonState;
337
+
338
+ export declare const useAttachmentOverflowMenuContext_unstable: <T>(selector: ContextSelector<AttachmentOverflowMenuContextValue, T>) => T;
339
+
340
+ /**
341
+ * Create the state required to render AttachmentOverflowMenuItem.
342
+ *
343
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,
344
+ * before being passed to renderAttachmentOverflowMenuItem_unstable.
345
+ *
346
+ * @param props - props from this instance of AttachmentOverflowMenuItem
347
+ * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem
348
+ */
349
+ export declare const useAttachmentOverflowMenuItem_unstable: (props: AttachmentOverflowMenuItemProps, ref: React_2.Ref<HTMLDivElement>) => AttachmentOverflowMenuItemState;
350
+
351
+ /**
352
+ * Apply styling to the AttachmentList slots based on the state
353
+ */
354
+ export declare const useAttachmentOverflowMenuItemStyles_unstable: (state: AttachmentOverflowMenuItemState) => AttachmentOverflowMenuItemState;
355
+
207
356
  /**
208
357
  * Apply styling to the Attachment slots based on the state
209
358
  */
@@ -218,7 +367,7 @@ export declare const useAttachmentStyles_unstable: (state: AttachmentState) => A
218
367
  * @param props - props from this instance of AttachmentTag
219
368
  * @param ref - reference to root HTMLElement of AttachmentTag
220
369
  */
221
- export declare const useAttachmentTag_unstable: (props: AttachmentTagProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagState;
370
+ export declare const useAttachmentTag_unstable: (props: AttachmentTagProps, ref: React_2.Ref<HTMLButtonElement>) => AttachmentTagState;
222
371
 
223
372
  /**
224
373
  * Create the state required to render AttachmentTagItem.
@@ -229,7 +378,7 @@ export declare const useAttachmentTag_unstable: (props: AttachmentTagProps, ref:
229
378
  * @param props - props from this instance of AttachmentTagItem
230
379
  * @param ref - reference to root HTMLElement of AttachmentTagItem
231
380
  */
232
- export declare const useAttachmentTagItem_unstable: (props: AttachmentTagItemProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagItemState;
381
+ export declare const useAttachmentTagItem_unstable: (props: AttachmentTagItemProps, ref: React_2.Ref<HTMLDivElement>) => AttachmentTagItemState;
233
382
 
234
383
  /**
235
384
  * Apply styling to the AttachmentTagItem slots based on the state
@@ -245,7 +394,7 @@ export declare const useAttachmentTagItemStyles_unstable: (state: AttachmentTagI
245
394
  * @param props - props from this instance of AttachmentTagList
246
395
  * @param ref - reference to root HTMLElement of AttachmentTagList
247
396
  */
248
- export declare const useAttachmentTagList_unstable: (props: AttachmentTagListProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagListState;
397
+ export declare const useAttachmentTagList_unstable: (props: AttachmentTagListProps, ref: React_2.Ref<HTMLDivElement>) => AttachmentTagListState;
249
398
 
250
399
  /**
251
400
  * Apply styling to the AttachmentTagList slots based on the state
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.ts"],"sourcesContent":["export * from './components/Attachment/index';\n"],"names":[],"mappings":"AAAA,cAAc,gCAAgC"}
1
+ {"version":3,"sources":["Attachment.ts"],"sourcesContent":["export * from './components/Attachment/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,gCAAgC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentList.ts"],"sourcesContent":["export * from './components/AttachmentList/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
1
+ {"version":3,"sources":["AttachmentList.ts"],"sourcesContent":["export * from './components/AttachmentList/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,oCAAoC"}
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentOverflowMenu/index';
2
+ //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenu/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,4CAA4C"}
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentOverflowMenuButton/index';
2
+ //# sourceMappingURL=AttachmentOverflowMenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenuButton.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenuButton/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,kDAAkD"}
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentOverflowMenuItem/index';
2
+ //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenuItem.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenuItem/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,gDAAgD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTag.ts"],"sourcesContent":["export * from './components/AttachmentTag/index';\n"],"names":[],"mappings":"AAAA,cAAc,mCAAmC"}
1
+ {"version":3,"sources":["AttachmentTag.ts"],"sourcesContent":["export * from './components/AttachmentTag/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,mCAAmC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTagItem.ts"],"sourcesContent":["export * from './components/AttachmentTagItem/index';\n"],"names":[],"mappings":"AAAA,cAAc,uCAAuC"}
1
+ {"version":3,"sources":["AttachmentTagItem.ts"],"sourcesContent":["export * from './components/AttachmentTagItem/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,uCAAuC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTagList.ts"],"sourcesContent":["export * from './components/AttachmentTagList/index';\n"],"names":[],"mappings":"AAAA,cAAc,uCAAuC"}
1
+ {"version":3,"sources":["AttachmentTagList.ts"],"sourcesContent":["export * from './components/AttachmentTagList/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,uCAAuC"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachment_unstable } from './useAttachment';\nimport { renderAttachment_unstable } from './renderAttachment';\nimport { useAttachmentStyles_unstable } from './useAttachmentStyles';\nimport type { AttachmentProps } from './Attachment.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// Attachment component - TODO: add more docs\nexport const Attachment: ForwardRefComponent<AttachmentProps> = React.forwardRef((props, ref) => {\n const state = useAttachment_unstable(props, ref);\n\n useAttachmentStyles_unstable(state);\n return renderAttachment_unstable(state);\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["React","useAttachment_unstable","renderAttachment_unstable","useAttachmentStyles_unstable","Attachment","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AAIrE,6CAA6C;AAC7C,OAAO,MAAMC,2BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7B,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Attachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachment_unstable } from './useAttachment';\nimport { renderAttachment_unstable } from './renderAttachment';\nimport { useAttachmentStyles_unstable } from './useAttachmentStyles';\nimport type { AttachmentProps } from './Attachment.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// Attachment component - TODO: add more docs\nexport const Attachment: ForwardRefComponent<AttachmentProps> = React.forwardRef((props, ref) => {\n const state = useAttachment_unstable(props, ref);\n\n useAttachmentStyles_unstable(state);\n return renderAttachment_unstable(state);\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["React","useAttachment_unstable","renderAttachment_unstable","useAttachmentStyles_unstable","Attachment","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AAIrE,6CAA6C;AAC7C,OAAO,MAAMC,2BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7B,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -1,2 +1,4 @@
1
- export {};
1
+ /**
2
+ * State used in rendering Attachment
3
+ */export {};
2
4
  //# sourceMappingURL=Attachment.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n dismissButton: NonNullable<Slot<'button'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n dismissIcon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n id: string;\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots>;\n"],"names":[],"mappings":"AAAA,WAqB8D"}
1
+ {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n dismissButton: NonNullable<Slot<'button'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n dismissIcon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n id: string;\n imageOnly?: boolean;\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> & Pick<AttachmentProps, 'imageOnly'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC,GACD,WAAmG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Attachment';\nexport * from './Attachment.types';\nexport * from './renderAttachment';\nexport * from './useAttachment';\nexport * from './useAttachmentStyles';\n"],"names":[],"mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,wBAAwB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Attachment';\nexport * from './Attachment.types';\nexport * from './renderAttachment';\nexport * from './useAttachment';\nexport * from './useAttachmentStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,wBAAwB"}
@@ -7,7 +7,7 @@ export const renderAttachment_unstable = state => {
7
7
  assertSlots(state);
8
8
  return /*#__PURE__*/_jsxs(state.root, {
9
9
  children: [/*#__PURE__*/_jsxs(state.primaryAction, {
10
- children: [state.media && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {})]
10
+ children: [state.media && !state.imageOnly && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {})]
11
11
  }), /*#__PURE__*/_jsx(state.dismissButton, {
12
12
  children: /*#__PURE__*/_jsx(state.dismissIcon, {})
13
13
  })]
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { 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\n return (\n <state.root>\n <state.primaryAction>\n {state.media && <state.media />}\n <state.content />\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAttachment_unstable","state","root","primaryAction","media","content","dismissButton","dismissIcon"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAE7B,qBACE,MAACA,MAAMC,IAAI;;0BACT,MAACD,MAAME,aAAa;;oBACjBF,MAAMG,KAAK,kBAAI,KAACH,MAAMG,KAAK;kCAC5B,KAACH,MAAMI,OAAO;;;0BAEhB,KAACJ,MAAMK,aAAa;0BAClB,cAAA,KAACL,MAAMM,WAAW;;;;AAI1B,EAAE"}
1
+ {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { 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\n return (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAttachment_unstable","state","root","primaryAction","media","imageOnly","content","dismissButton","dismissIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAE7B,qBACE,MAACA,MAAMC,IAAI;;0BACT,MAACD,MAAME,aAAa;;oBACjBF,MAAMG,KAAK,IAAI,CAACH,MAAMI,SAAS,kBAAI,KAACJ,MAAMG,KAAK;kCAChD,KAACH,MAAMK,OAAO;;;0BAEhB,KAACL,MAAMM,aAAa;0BAClB,cAAA,KAACN,MAAMO,WAAW;;;;AAI1B,EAAE"}
@@ -12,6 +12,9 @@ import { useAttachmentListContext_unstable } from '../../contexts/attachmentList
12
12
  * @param ref - reference to root HTMLElement of Attachment
13
13
  */
14
14
  export const useAttachment_unstable = (props, ref) => {
15
+ const {
16
+ imageOnly
17
+ } = props;
15
18
  const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
16
19
  const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);
17
20
  const root = slot.always(getIntrinsicElementProps('div', {
@@ -61,7 +64,8 @@ export const useAttachment_unstable = (props, ref) => {
61
64
  dismissButton,
62
65
  media,
63
66
  content,
64
- dismissIcon
67
+ dismissIcon,
68
+ imageOnly
65
69
  };
66
70
  if (state.primaryAction.as === 'span') {
67
71
  state.components.primaryAction = 'span';
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps, AttachmentState } from './Attachment.types';\n\n/**\n * Create the state required to render Attachment.\n *\n * The returned state can be modified with hooks such as useAttachmentStyles_unstable,\n * before being passed to renderAttachment_unstable.\n *\n * @param props - props from this instance of Attachment\n * @param ref - reference to root HTMLElement of Attachment\n */\nexport const useAttachment_unstable = (props: AttachmentProps, ref: React.Ref<HTMLDivElement>): AttachmentState => {\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n );\n\n const primaryAction = slot.always(props.primaryAction, {\n elementType: 'button',\n });\n\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: { 'aria-label': 'Dismiss' },\n elementType: 'button',\n });\n\n dismissButton.onClick = mergeCallbacks(\n dismissButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => onAttachmentDismiss?.(ev, { id: props.id }),\n );\n\n const media = slot.optional(props.media, { elementType: 'span' });\n\n const content = slot.always(props.content, {\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n });\n\n const dismissIcon = slot.always(props.dismissIcon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: 'span',\n });\n\n const state: AttachmentState = {\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentListContext_unstable","useAttachment_unstable","props","ref","DismissIcon","onAttachmentDismiss","context","root","always","elementType","primaryAction","dismissButton","defaultProps","onClick","ev","id","media","optional","content","children","dismissIcon","state","components","as"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AAC5F,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AACtF,SAASC,iCAAiC,QAAQ,uCAAuC;AAGzF;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,MAAMC,cAAcL,WAAWD,iBAAiBD;IAEhD,MAAMQ,sBAAsBL,kCAAkCM,CAAAA,UAAWA,QAAQD,mBAAmB;IAEpG,MAAME,OAAOX,KAAKY,MAAM,CACtBd,yBAAyB,OAAO;QAC9BS;QACA,GAAGD,KAAK;IACV,IACA;QAAEO,aAAa;IAAM;IAGvB,MAAMC,gBAAgBd,KAAKY,MAAM,CAACN,MAAMQ,aAAa,EAAE;QACrDD,aAAa;IACf;IAEA,MAAME,gBAAgBf,KAAKY,MAAM,CAACN,MAAMS,aAAa,EAAE;QACrDC,cAAc;YAAE,cAAc;QAAU;QACxCH,aAAa;IACf;IAEAE,cAAcE,OAAO,GAAGlB,eACtBgB,cAAcE,OAAO,EACrB,CAACC,KAAgET,gCAAAA,0CAAAA,oBAAsBS,IAAI;YAAEC,IAAIb,MAAMa,EAAE;QAAC;IAG5G,MAAMC,QAAQpB,KAAKqB,QAAQ,CAACf,MAAMc,KAAK,EAAE;QAAEP,aAAa;IAAO;IAE/D,MAAMS,UAAUtB,KAAKY,MAAM,CAACN,MAAMgB,OAAO,EAAE;QACzCN,cAAc;YACZO,UAAUjB,MAAMiB,QAAQ;QAC1B;QACAV,aAAa;IACf;IAEA,MAAMW,cAAcxB,KAAKY,MAAM,CAACN,MAAMkB,WAAW,EAAE;QACjDR,cAAc;YACZO,wBAAU,oBAACf;QACb;QACAK,aAAa;IACf;IAEA,MAAMY,QAAyB;QAC7BC,YAAY;YACVf,MAAM;YACNG,eAAe;YACfC,eAAe;YACfK,OAAO;YACPE,SAAS;YACTE,aAAa;QACf;QAEAb;QACAG;QACAC;QACAK;QACAE;QACAE;IACF;IAEA,IAAIC,MAAMX,aAAa,CAACa,EAAE,KAAK,QAAQ;QACrCF,MAAMC,UAAU,CAACZ,aAAa,GAAG;IACnC;IAEA,OAAOW;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps, AttachmentState } from './Attachment.types';\n\n/**\n * Create the state required to render Attachment.\n *\n * The returned state can be modified with hooks such as useAttachmentStyles_unstable,\n * before being passed to renderAttachment_unstable.\n *\n * @param props - props from this instance of Attachment\n * @param ref - reference to root HTMLElement of Attachment\n */\nexport const useAttachment_unstable = (props: AttachmentProps, ref: React.Ref<HTMLDivElement>): AttachmentState => {\n const { imageOnly } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n );\n\n const primaryAction = slot.always(props.primaryAction, {\n elementType: 'button',\n });\n\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: { 'aria-label': 'Dismiss' },\n elementType: 'button',\n });\n\n dismissButton.onClick = mergeCallbacks(\n dismissButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => onAttachmentDismiss?.(ev, { id: props.id }),\n );\n\n const media = slot.optional(props.media, { elementType: 'span' });\n\n const content = slot.always(props.content, {\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n });\n\n const dismissIcon = slot.always(props.dismissIcon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: 'span',\n });\n\n const state: AttachmentState = {\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n imageOnly,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentListContext_unstable","useAttachment_unstable","props","ref","imageOnly","DismissIcon","onAttachmentDismiss","context","root","always","elementType","primaryAction","dismissButton","defaultProps","onClick","ev","id","media","optional","content","children","dismissIcon","state","components","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AAC5F,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AACtF,SAASC,iCAAiC,QAAQ,uCAAuC;AAGzF;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,MAAM,EAAEC,SAAS,EAAE,GAAGF;IACtB,MAAMG,cAAcN,WAAWD,iBAAiBD;IAEhD,MAAMS,sBAAsBN,kCAAkCO,CAAAA,UAAWA,QAAQD,mBAAmB;IAEpG,MAAME,OAAOZ,KAAKa,MAAM,CACtBf,yBAAyB,OAAO;QAC9BS;QACA,GAAGD,KAAK;IACV,IACA;QAAEQ,aAAa;IAAM;IAGvB,MAAMC,gBAAgBf,KAAKa,MAAM,CAACP,MAAMS,aAAa,EAAE;QACrDD,aAAa;IACf;IAEA,MAAME,gBAAgBhB,KAAKa,MAAM,CAACP,MAAMU,aAAa,EAAE;QACrDC,cAAc;YAAE,cAAc;QAAU;QACxCH,aAAa;IACf;IAEAE,cAAcE,OAAO,GAAGnB,eACtBiB,cAAcE,OAAO,EACrB,CAACC,KAAgET,gCAAAA,0CAAAA,oBAAsBS,IAAI;YAAEC,IAAId,MAAMc,EAAE;QAAC;IAG5G,MAAMC,QAAQrB,KAAKsB,QAAQ,CAAChB,MAAMe,KAAK,EAAE;QAAEP,aAAa;IAAO;IAE/D,MAAMS,UAAUvB,KAAKa,MAAM,CAACP,MAAMiB,OAAO,EAAE;QACzCN,cAAc;YACZO,UAAUlB,MAAMkB,QAAQ;QAC1B;QACAV,aAAa;IACf;IAEA,MAAMW,cAAczB,KAAKa,MAAM,CAACP,MAAMmB,WAAW,EAAE;QACjDR,cAAc;YACZO,wBAAU,oBAACf;QACb;QACAK,aAAa;IACf;IAEA,MAAMY,QAAyB;QAC7BC,YAAY;YACVf,MAAM;YACNG,eAAe;YACfC,eAAe;YACfK,OAAO;YACPE,SAAS;YACTE,aAAa;QACf;QAEAb;QACAG;QACAC;QACAK;QACAE;QACAE;QACAjB;IACF;IAEA,IAAIkB,MAAMX,aAAa,CAACa,EAAE,KAAK,QAAQ;QACrCF,MAAMC,UAAU,CAACZ,aAAa,GAAG;IACnC;IAEA,OAAOW;AACT,EAAE"}
@@ -9,7 +9,7 @@ export const attachmentClassNames = {
9
9
  };
10
10
  const ATTACHMENT_MAXWIDTH = '180px';
11
11
  const ATTACHMENT_SIZE = '20px';
12
- const useRootBaseClassName = __resetStyles("rj3sqpg", null, [".rj3sqpg{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;}"]);
12
+ const useRootBaseClassName = __resetStyles("rmfolg5", null, [".rmfolg5{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;align-self:end;}"]);
13
13
  const buttonBaseStyles = {
14
14
  alignItems: 'center',
15
15
  backgroundColor: tokens.colorNeutralBackground1,
@@ -55,6 +55,19 @@ const useDismissButtonBaseClassName = __resetStyles("r1cf2ehf", "rhq1520", {
55
55
  const useMediaBaseClassName = __resetStyles("rz1lum2", null, [".rz1lum2{display:inline-flex;font-size:20px;height:20px;line-height:20px;width:20px;}"]);
56
56
  const useContentBaseClassName = __resetStyles("rmt99gk", null, [".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}"]);
57
57
  const useDismissIconBaseClassName = __resetStyles("r176grtk", null, [".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}"]);
58
+ const useImageOnlyStyles = __styles({
59
+ primaryAction: {
60
+ z8tnut: "f1g0x7ka",
61
+ z189sj: ["fhxju0i", "f1cnd47f"],
62
+ Byoj8tv: "f1qch9an",
63
+ uwmqm3: ["f1cnd47f", "fhxju0i"]
64
+ },
65
+ content: {
66
+ Bg96gwp: "fez10in"
67
+ }
68
+ }, {
69
+ d: [".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fez10in{line-height:0;}"]
70
+ });
58
71
  /**
59
72
  * Apply styling to the Attachment slots based on the state
60
73
  */
@@ -66,16 +79,18 @@ export const useAttachmentStyles_unstable = state => {
66
79
  const contentBaseClassName = useContentBaseClassName();
67
80
  const dismissIconBaseClassName = useDismissIconBaseClassName();
68
81
  const primaryActionStyles = usePrimaryActionStyles();
82
+ const imageOnlyStyles = useImageOnlyStyles();
69
83
  const {
84
+ imageOnly,
70
85
  primaryAction
71
86
  } = state;
72
87
  state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);
73
- state.primaryAction.className = mergeClasses(attachmentClassNames.primaryAction, primaryActionBaseClassName, primaryAction.as !== 'span' && primaryActionStyles.button, state.primaryAction.className);
88
+ state.primaryAction.className = mergeClasses(attachmentClassNames.primaryAction, primaryActionBaseClassName, primaryAction.as !== 'span' && primaryActionStyles.button, imageOnly && imageOnlyStyles.primaryAction, state.primaryAction.className);
74
89
  state.dismissButton.className = mergeClasses(attachmentClassNames.dismissButton, dismissButtonBaseClassName, state.dismissButton.className);
75
90
  if (state.media) {
76
91
  state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);
77
92
  }
78
- state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, state.content.className);
93
+ state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, imageOnly && imageOnlyStyles.content, state.content.className);
79
94
  state.dismissIcon.className = mergeClasses(attachmentClassNames.dismissIcon, dismissIconBaseClassName, state.dismissIcon.className);
80
95
  return state;
81
96
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentStyles.ts"],"sourcesContent":["import {\n createCustomFocusIndicatorStyle,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport type { AttachmentSlots, AttachmentState } from './Attachment.types';\nimport type { GriffelResetStyle, SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentClassNames: SlotClassNames<AttachmentSlots> = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon',\n};\n\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst ATTACHMENT_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n width: 'fit-content',\n});\n\nconst buttonBaseStyles: GriffelResetStyle = {\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n ...shorthands.outline(tokens.strokeWidthThick, 'solid', tokens.colorStrokeFocus2),\n zIndex: 1,\n }),\n verticalAlign: 'middle',\n};\n\nconst usePrimaryActionBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n});\n\nconst usePrimaryActionStyles = makeStyles({\n button: {\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n});\n\nconst useDismissButtonBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2BrandHover,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: ATTACHMENT_SIZE,\n lineHeight: ATTACHMENT_SIZE,\n width: ATTACHMENT_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useDismissIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = (state: AttachmentState): AttachmentState => {\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const primaryActionStyles = usePrimaryActionStyles();\n const { primaryAction } = state;\n\n state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);\n state.primaryAction.className = mergeClasses(\n attachmentClassNames.primaryAction,\n primaryActionBaseClassName,\n primaryAction.as !== 'span' && primaryActionStyles.button,\n state.primaryAction.className,\n );\n state.dismissButton.className = mergeClasses(\n attachmentClassNames.dismissButton,\n dismissButtonBaseClassName,\n state.dismissButton.className,\n );\n if (state.media) {\n state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, state.content.className);\n state.dismissIcon.className = mergeClasses(\n attachmentClassNames.dismissIcon,\n dismissIconBaseClassName,\n state.dismissIcon.className,\n );\n\n return state;\n};\n"],"names":["createCustomFocusIndicatorStyle","makeResetStyles","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","attachmentClassNames","root","primaryAction","dismissButton","media","content","dismissIcon","ATTACHMENT_MAXWIDTH","ATTACHMENT_SIZE","useRootBaseClassName","display","flexWrap","verticalAlign","boxSizing","width","buttonBaseStyles","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","zIndex","usePrimaryActionBaseClassName","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","maxWidth","spacingHorizontalXXS","spacingHorizontalXS","padding","spacingVerticalXS","spacingHorizontalS","usePrimaryActionStyles","button","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","useDismissButtonBaseClassName","minWidth","borderLeftColor","borderTopLeftRadius","borderBottomLeftRadius","colorNeutralForeground2BrandHover","colorBrandForegroundLinkHover","colorNeutralForeground2BrandPressed","useMediaBaseClassName","fontSize","height","lineHeight","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useDismissIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","useAttachmentStyles_unstable","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","primaryActionStyles","className","as"],"mappings":"AAAA,SACEA,+BAA+B,EAC/BC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AAIpC,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,aAAa;AACf,EAAE;AAEF,MAAMC,sBAAsB;AAC5B,MAAMC,kBAAkB;AAExB,MAAMC,uBAAuBf,gBAAgB;IAC3CgB,SAAS;IACTC,UAAU;IACVC,eAAe;IACfC,WAAW;IACXC,OAAO;AACT;AAEA,MAAMC,mBAAsC;IAC1CC,YAAY;IACZC,iBAAiBnB,OAAOoB,uBAAuB;IAC/CC,QAAQ,CAAC,EAAErB,OAAOsB,eAAe,CAAC,OAAO,EAAEtB,OAAOuB,mBAAmB,CAAC,CAAC;IACvEC,cAAcxB,OAAOyB,kBAAkB;IACvCV,WAAW;IACXW,WAAW1B,OAAO2B,uBAAuB;IACzCC,OAAO5B,OAAO6B,uBAAuB;IACrCC,QAAQ;IACRlB,SAAS;IACTC,UAAU;IACVkB,gBAAgB;IAChB,GAAGpC,gCAAgC;QACjC,GAAGI,WAAWiC,OAAO,CAAChC,OAAOiC,gBAAgB,EAAE,SAASjC,OAAOkC,iBAAiB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GrF,aAC9BI,qBAAqBG,aAAa,EAClCyE,4BACAH,MAAMtE,aAAa,CAAC8E,SAAS;IAE/B,IAAIR,MAAMrE,KAAK,EAAE;QACfqE,MAAMrE,KAAK,CAAC6E,SAAS,GAAGrF,aAAaI,qBAAqBI,KAAK,EAAEyE,oBAAoBJ,MAAMrE,KAAK,CAAC6E,SAAS;IAC5G;IACAR,MAAMpE,OAAO,CAAC4E,SAAS,GAAGrF,aAAaI,qBAAqBK,OAAO,EAAEyE,sBAAsBL,MAAMpE,OAAO,CAAC4E,SAAS;IAClHR,MAAMnE,WAAW,CAAC2E,SAAS,GAAGrF,aAC5BI,qBAAqBM,WAAW,EAChCyE,0BACAN,MAAMnE,WAAW,CAAC2E,SAAS;IAG7B,OAAOR;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachmentStyles.ts"],"sourcesContent":["import {\n createCustomFocusIndicatorStyle,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport type { AttachmentSlots, AttachmentState } from './Attachment.types';\nimport type { GriffelResetStyle, SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentClassNames: SlotClassNames<AttachmentSlots> = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon',\n};\n\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst ATTACHMENT_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n width: 'fit-content',\n alignSelf: 'end',\n});\n\nconst buttonBaseStyles: GriffelResetStyle = {\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n ...shorthands.outline(tokens.strokeWidthThick, 'solid', tokens.colorStrokeFocus2),\n zIndex: 1,\n }),\n verticalAlign: 'middle',\n};\n\nconst usePrimaryActionBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n});\n\nconst usePrimaryActionStyles = makeStyles({\n button: {\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n});\n\nconst useDismissButtonBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2BrandHover,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: ATTACHMENT_SIZE,\n lineHeight: ATTACHMENT_SIZE,\n width: ATTACHMENT_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useDismissIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\nconst useImageOnlyStyles = makeStyles({\n primaryAction: {\n ...shorthands.padding(0),\n },\n content: {\n lineHeight: 0,\n },\n});\n\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = (state: AttachmentState): AttachmentState => {\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const primaryActionStyles = usePrimaryActionStyles();\n const imageOnlyStyles = useImageOnlyStyles();\n const { imageOnly, primaryAction } = state;\n\n state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);\n state.primaryAction.className = mergeClasses(\n attachmentClassNames.primaryAction,\n primaryActionBaseClassName,\n primaryAction.as !== 'span' && primaryActionStyles.button,\n imageOnly && imageOnlyStyles.primaryAction,\n state.primaryAction.className,\n );\n state.dismissButton.className = mergeClasses(\n attachmentClassNames.dismissButton,\n dismissButtonBaseClassName,\n state.dismissButton.className,\n );\n if (state.media) {\n state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(\n attachmentClassNames.content,\n contentBaseClassName,\n imageOnly && imageOnlyStyles.content,\n state.content.className,\n );\n state.dismissIcon.className = mergeClasses(\n attachmentClassNames.dismissIcon,\n dismissIconBaseClassName,\n state.dismissIcon.className,\n );\n\n return state;\n};\n"],"names":["createCustomFocusIndicatorStyle","makeResetStyles","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","attachmentClassNames","root","primaryAction","dismissButton","media","content","dismissIcon","ATTACHMENT_MAXWIDTH","ATTACHMENT_SIZE","useRootBaseClassName","display","flexWrap","verticalAlign","boxSizing","width","alignSelf","buttonBaseStyles","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","zIndex","usePrimaryActionBaseClassName","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","maxWidth","spacingHorizontalXXS","spacingHorizontalXS","padding","spacingVerticalXS","spacingHorizontalS","usePrimaryActionStyles","button","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","useDismissButtonBaseClassName","minWidth","borderLeftColor","borderTopLeftRadius","borderBottomLeftRadius","colorNeutralForeground2BrandHover","colorBrandForegroundLinkHover","colorNeutralForeground2BrandPressed","useMediaBaseClassName","fontSize","height","lineHeight","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useDismissIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","useImageOnlyStyles","useAttachmentStyles_unstable","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","primaryActionStyles","imageOnlyStyles","imageOnly","className","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,+BAA+B,EAC/BC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AAIpC,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,aAAa;AACf,EAAE;AAEF,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