@fluentui-copilot/react-attachments 0.0.0-nightly-20251010-0406-7df7c6d1.1 → 0.0.0-nightly-20251013-0406-7c7739c8.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 (220) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  3. package/dist/index.d.ts +379 -0
  4. package/lib/AgentTag.js +1 -0
  5. package/lib/AgentTag.js.map +1 -0
  6. package/lib/Attachment.js +1 -0
  7. package/lib/Attachment.js.map +1 -0
  8. package/lib/AttachmentList.js +1 -0
  9. package/lib/AttachmentList.js.map +1 -0
  10. package/lib/AttachmentOverflowMenu.js +1 -0
  11. package/lib/AttachmentOverflowMenu.js.map +1 -0
  12. package/lib/AttachmentOverflowMenuButton.js +1 -0
  13. package/lib/AttachmentOverflowMenuButton.js.map +1 -0
  14. package/lib/AttachmentOverflowMenuItem.js +1 -0
  15. package/lib/AttachmentOverflowMenuItem.js.map +1 -0
  16. package/lib/components/AgentTag/AgentTag.js +11 -0
  17. package/lib/components/AgentTag/AgentTag.js.map +1 -0
  18. package/lib/components/AgentTag/AgentTag.types.js +3 -0
  19. package/lib/components/AgentTag/AgentTag.types.js.map +1 -0
  20. package/lib/components/AgentTag/index.js +4 -0
  21. package/lib/components/AgentTag/index.js.map +1 -0
  22. package/lib/components/AgentTag/renderAgentTag.js +6 -0
  23. package/lib/components/AgentTag/renderAgentTag.js.map +1 -0
  24. package/lib/components/AgentTag/useAgentTag.js +18 -0
  25. package/lib/components/AgentTag/useAgentTag.js.map +1 -0
  26. package/lib/components/AgentTag/useAgentTagStyles.styles.js +95 -0
  27. package/lib/components/AgentTag/useAgentTagStyles.styles.js.map +1 -0
  28. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +66 -0
  29. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
  30. package/lib/components/Attachment/Attachment.js +13 -0
  31. package/lib/components/Attachment/Attachment.js.map +1 -0
  32. package/lib/components/Attachment/Attachment.types.js +3 -0
  33. package/lib/components/Attachment/Attachment.types.js.map +1 -0
  34. package/lib/components/Attachment/index.js +4 -0
  35. package/lib/components/Attachment/index.js.map +1 -0
  36. package/lib/components/Attachment/renderAttachment.js +42 -0
  37. package/lib/components/Attachment/renderAttachment.js.map +1 -0
  38. package/lib/components/Attachment/useAttachment.js +103 -0
  39. package/lib/components/Attachment/useAttachment.js.map +1 -0
  40. package/lib/components/Attachment/useAttachmentStyles.styles.js +348 -0
  41. package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -0
  42. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +328 -0
  43. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
  44. package/lib/components/AttachmentList/AttachmentList.js +14 -0
  45. package/lib/components/AttachmentList/AttachmentList.js.map +1 -0
  46. package/lib/components/AttachmentList/AttachmentList.types.js +1 -0
  47. package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -0
  48. package/lib/components/AttachmentList/index.js +4 -0
  49. package/lib/components/AttachmentList/index.js.map +1 -0
  50. package/lib/components/AttachmentList/renderAttachmentList.js +31 -0
  51. package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -0
  52. package/lib/components/AttachmentList/useAttachmentList.js +134 -0
  53. package/lib/components/AttachmentList/useAttachmentList.js.map +1 -0
  54. package/lib/components/AttachmentList/useAttachmentListContextValues.js +12 -0
  55. package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -0
  56. package/lib/components/AttachmentList/useAttachmentListStyles.styles.js +48 -0
  57. package/lib/components/AttachmentList/useAttachmentListStyles.styles.js.map +1 -0
  58. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +44 -0
  59. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
  60. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +14 -0
  61. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  62. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -0
  63. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  64. package/lib/components/AttachmentOverflowMenu/index.js +4 -0
  65. package/lib/components/AttachmentOverflowMenu/index.js.map +1 -0
  66. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +13 -0
  67. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  68. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +18 -0
  69. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  70. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +12 -0
  71. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  72. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +12 -0
  73. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
  74. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +3 -0
  75. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
  76. package/lib/components/AttachmentOverflowMenuButton/index.js +4 -0
  77. package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -0
  78. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +15 -0
  79. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
  80. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +69 -0
  81. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
  82. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js +116 -0
  83. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -0
  84. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +102 -0
  85. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
  86. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +10 -0
  87. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
  88. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +3 -0
  89. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
  90. package/lib/components/AttachmentOverflowMenuItem/index.js +4 -0
  91. package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -0
  92. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +13 -0
  93. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
  94. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +56 -0
  95. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
  96. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js +84 -0
  97. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +1 -0
  98. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +59 -0
  99. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
  100. package/lib/components/index.js +5 -0
  101. package/lib/components/index.js.map +1 -0
  102. package/lib/components/utils/useProgressBarStyles.styles.js +54 -0
  103. package/lib/components/utils/useProgressBarStyles.styles.js.map +1 -0
  104. package/lib/components/utils/useProgressBarStyles.styles.raw.js +42 -0
  105. package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
  106. package/lib/contexts/attachmentListContext.js +9 -0
  107. package/lib/contexts/attachmentListContext.js.map +1 -0
  108. package/lib/contexts/attachmentOverflowMenuContext.js +9 -0
  109. package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
  110. package/lib/index.js +8 -0
  111. package/lib/index.js.map +1 -0
  112. package/lib-commonjs/AgentTag.js +28 -0
  113. package/lib-commonjs/AgentTag.js.map +1 -0
  114. package/lib-commonjs/Attachment.js +31 -0
  115. package/lib-commonjs/Attachment.js.map +1 -0
  116. package/lib-commonjs/AttachmentList.js +28 -0
  117. package/lib-commonjs/AttachmentList.js.map +1 -0
  118. package/lib-commonjs/AttachmentOverflowMenu.js +25 -0
  119. package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -0
  120. package/lib-commonjs/AttachmentOverflowMenuButton.js +28 -0
  121. package/lib-commonjs/AttachmentOverflowMenuButton.js.map +1 -0
  122. package/lib-commonjs/AttachmentOverflowMenuItem.js +28 -0
  123. package/lib-commonjs/AttachmentOverflowMenuItem.js.map +1 -0
  124. package/lib-commonjs/components/AgentTag/AgentTag.js +21 -0
  125. package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -0
  126. package/lib-commonjs/components/AgentTag/AgentTag.types.js +6 -0
  127. package/lib-commonjs/components/AgentTag/AgentTag.types.js.map +1 -0
  128. package/lib-commonjs/components/AgentTag/index.js +31 -0
  129. package/lib-commonjs/components/AgentTag/index.js.map +1 -0
  130. package/lib-commonjs/components/AgentTag/renderAgentTag.js +14 -0
  131. package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -0
  132. package/lib-commonjs/components/AgentTag/useAgentTag.js +19 -0
  133. package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -0
  134. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js +145 -0
  135. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js.map +1 -0
  136. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +82 -0
  137. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
  138. package/lib-commonjs/components/Attachment/Attachment.js +23 -0
  139. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -0
  140. package/lib-commonjs/components/Attachment/Attachment.types.js +6 -0
  141. package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -0
  142. package/lib-commonjs/components/Attachment/index.js +34 -0
  143. package/lib-commonjs/components/Attachment/index.js.map +1 -0
  144. package/lib-commonjs/components/Attachment/renderAttachment.js +50 -0
  145. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -0
  146. package/lib-commonjs/components/Attachment/useAttachment.js +105 -0
  147. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -0
  148. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js +550 -0
  149. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -0
  150. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +347 -0
  151. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
  152. package/lib-commonjs/components/AttachmentList/AttachmentList.js +25 -0
  153. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -0
  154. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +4 -0
  155. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -0
  156. package/lib-commonjs/components/AttachmentList/index.js +31 -0
  157. package/lib-commonjs/components/AttachmentList/index.js.map +1 -0
  158. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +39 -0
  159. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -0
  160. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +137 -0
  161. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -0
  162. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +22 -0
  163. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -0
  164. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js +67 -0
  165. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js.map +1 -0
  166. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +60 -0
  167. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
  168. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +24 -0
  169. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  170. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +4 -0
  171. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  172. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +28 -0
  173. package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -0
  174. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +21 -0
  175. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  176. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +21 -0
  177. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  178. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +22 -0
  179. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  180. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +23 -0
  181. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
  182. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +6 -0
  183. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
  184. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +31 -0
  185. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -0
  186. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +23 -0
  187. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
  188. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +72 -0
  189. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
  190. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js +178 -0
  191. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -0
  192. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +118 -0
  193. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
  194. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +21 -0
  195. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
  196. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +6 -0
  197. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
  198. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +31 -0
  199. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -0
  200. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +21 -0
  201. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
  202. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +59 -0
  203. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
  204. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js +109 -0
  205. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +1 -0
  206. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +75 -0
  207. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
  208. package/lib-commonjs/components/index.js +92 -0
  209. package/lib-commonjs/components/index.js.map +1 -0
  210. package/lib-commonjs/components/utils/useProgressBarStyles.styles.js +103 -0
  211. package/lib-commonjs/components/utils/useProgressBarStyles.styles.js.map +1 -0
  212. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +50 -0
  213. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
  214. package/lib-commonjs/contexts/attachmentListContext.js +30 -0
  215. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -0
  216. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
  217. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
  218. package/lib-commonjs/index.js +122 -0
  219. package/lib-commonjs/index.js.map +1 -0
  220. package/package.json +4 -4
@@ -0,0 +1,66 @@
1
+ import { makeStyles, mergeClasses } from '@fluentui/react-components';
2
+ import { useAttachmentStyles_unstable } from '..';
3
+ import { tokens, typographyStyles } 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 } from '@fluentui/react-components';\nimport type { AgentTagSlots, AgentTagState } from './AgentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\nimport { useAttachmentStyles_unstable } from '..';\nimport { tokens, typographyStyles } 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","useAttachmentStyles_unstable","tokens","typographyStyles","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,QAAQ,6BAA6B;AAGtE,SAASC,4BAA4B,QAAQ,KAAK;AAClD,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,2BAA2B;AAEpE,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,GAAGV,iBAAiBe,SAAS;QAC7BC,OAAOjB,OAAOkB,uBAAuB;IACvC;IACAJ,SAAS;QACP,GAAGb,iBAAiBkB,WAAW;QAC/BF,OAAOjB,OAAOkB,uBAAuB;IACvC;AACF;AAEA,MAAME,yBAAyBvB,WAAW;IACxCc,QAAQ;QACNU,cAAcrB,OAAOsB,eAAe;QACpCC,aAAavB,OAAOwB,kBAAkB;QACtCC,cAAczB,OAAO0B,kBAAkB;IACzC;IACAZ,SAAS;QACPS,aAAavB,OAAO0B,kBAAkB;QACtCD,cAAczB,OAAO2B,kBAAkB;QACvCN,cAAcrB,OAAO4B,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;IAEApC,6BAA6B+B;IAE7B,OAAOA;AACT,EAAE"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { useAttachment_unstable } from './useAttachment';
3
+ import { renderAttachment_unstable } from './renderAttachment';
4
+ import { useAttachmentStyles_unstable } from './useAttachmentStyles.styles';
5
+ import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
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);
12
+ });
13
+ Attachment.displayName = 'Attachment';
@@ -0,0 +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.styles';\nimport type { AttachmentProps } from './Attachment.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\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 useCustomStyleHook('useAttachmentStyles')(state);\n\n return renderAttachment_unstable(state);\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["React","useAttachment_unstable","renderAttachment_unstable","useAttachmentStyles_unstable","useCustomStyleHook","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,+BAA+B;AAG5E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,6CAA6C;AAC7C,OAAO,MAAMC,2BAAmDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQR,uBAAuBM,OAAOC;IAE5CL,6BAA6BM;IAC7BL,mBAAmB,uBAAuBK;IAE1C,OAAOP,0BAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -0,0 +1,3 @@
1
+ /**
2
+ * State used in rendering Attachment
3
+ */ export { };
@@ -0,0 +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 = Omit<ComponentProps<Partial<AttachmentSlots>>, 'content'> &\n Pick<Partial<AttachmentSlots>, 'content'> &\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":"AAgEA;;CAEC,GACD,WAKI"}
@@ -0,0 +1,4 @@
1
+ export { Attachment } from './Attachment';
2
+ export { renderAttachment_unstable } from './renderAttachment';
3
+ export { useAttachment_unstable } from './useAttachment';
4
+ export { attachmentClassNames, useAttachmentStyles_unstable, useOverflowStyles } from './useAttachmentStyles.styles';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { Attachment } from './Attachment';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment.types';\nexport { renderAttachment_unstable } from './renderAttachment';\nexport { useAttachment_unstable } from './useAttachment';\nexport { attachmentClassNames, useAttachmentStyles_unstable, useOverflowStyles } from './useAttachmentStyles.styles';\n"],"names":["Attachment","renderAttachment_unstable","useAttachment_unstable","attachmentClassNames","useAttachmentStyles_unstable","useOverflowStyles"],"rangeMappings":";;;","mappings":"AAAA,SAASA,UAAU,QAAQ,eAAe;AAE1C,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,oBAAoB,EAAEC,4BAA4B,EAAEC,iBAAiB,QAAQ,+BAA+B"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { OverflowItem, assertSlots } from '@fluentui/react-components';
3
+ /**
4
+ * Render the final JSX of 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
+ });
42
+ };
@@ -0,0 +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 { JSXElement } 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): JSXElement => {\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): JSXElement => {\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): JSXElement => {\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;AAIvE;;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"}
@@ -0,0 +1,103 @@
1
+ import * as React from 'react';
2
+ import { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot, useId } from '@fluentui/react-components';
3
+ import { Dismiss12Regular, Dismiss20Regular } from '@fluentui/react-icons';
4
+ import { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';
5
+ import { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';
6
+ /**
7
+ * Create the state required to render Attachment.
8
+ *
9
+ * The returned state can be modified with hooks such as useAttachmentStyles_unstable,
10
+ * before being passed to renderAttachment_unstable.
11
+ *
12
+ * @param props - props from this instance of Attachment
13
+ * @param ref - reference to root HTMLElement of Attachment
14
+ */ export const useAttachment_unstable = (props, ref)=>{
15
+ const { children, imageOnly, size = 'medium', dismissOnly = false } = props;
16
+ const { onAttachmentDismiss, shouldUseOverflow } = useAttachmentListContext_unstable((context)=>context);
17
+ const attachmentId = useId('attachment-', props.id);
18
+ const isLoading = !!props.progress;
19
+ const mode = useCopilotMode(props.mode);
20
+ const designVersion = useDesignVersion(props.designVersion);
21
+ const root = slot.always(getIntrinsicElementProps('div', {
22
+ ref,
23
+ ...props,
24
+ id: attachmentId
25
+ }, // `content` is a slot and it's type clashes with the HTMLElement `content` attribute
26
+ [
27
+ 'content'
28
+ ]), {
29
+ elementType: 'div'
30
+ });
31
+ const primaryAction = slot.always(props.primaryAction, {
32
+ defaultProps: {
33
+ as: dismissOnly ? 'span' : undefined
34
+ },
35
+ elementType: 'button'
36
+ });
37
+ const dismissButton = slot.always(props.dismissButton, {
38
+ defaultProps: {
39
+ 'aria-label': 'Remove attachment'
40
+ },
41
+ elementType: 'button'
42
+ });
43
+ dismissButton.onClick = mergeCallbacks(dismissButton.onClick, (ev)=>{
44
+ onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
45
+ content: children,
46
+ media,
47
+ id: attachmentId
48
+ });
49
+ });
50
+ const media = slot.optional(props.media, {
51
+ elementType: 'span'
52
+ });
53
+ const content = slot.always(props.content, {
54
+ defaultProps: {
55
+ children: props.children
56
+ },
57
+ elementType: 'span'
58
+ });
59
+ const dismissIcon = slot.always(props.dismissIcon, {
60
+ defaultProps: {
61
+ children: size === 'small' ? /*#__PURE__*/ React.createElement(Dismiss12Regular, null) : /*#__PURE__*/ React.createElement(Dismiss20Regular, null)
62
+ },
63
+ elementType: 'span'
64
+ });
65
+ const progress = slot.optional(props.progress, {
66
+ defaultProps: {
67
+ shape: 'square',
68
+ thickness: 'large',
69
+ 'aria-labelledby': props.id
70
+ },
71
+ elementType: ProgressBar
72
+ });
73
+ const state = {
74
+ id: attachmentId,
75
+ size,
76
+ components: {
77
+ root: 'div',
78
+ primaryAction: 'button',
79
+ dismissButton: 'button',
80
+ media: 'span',
81
+ content: 'span',
82
+ dismissIcon: 'span',
83
+ progress: ProgressBar
84
+ },
85
+ root,
86
+ primaryAction,
87
+ dismissButton,
88
+ media,
89
+ content,
90
+ dismissIcon,
91
+ progress,
92
+ imageOnly,
93
+ isLoading,
94
+ shouldUseOverflow,
95
+ mode,
96
+ designVersion,
97
+ dismissOnly
98
+ };
99
+ if (state.primaryAction.as === 'span') {
100
+ state.components.primaryAction = 'span';
101
+ }
102
+ return state;
103
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot, useId } from '@fluentui/react-components';\nimport { Dismiss12Regular, Dismiss20Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps, AttachmentState } from './Attachment.types';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\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 { children, imageOnly, size = 'medium', dismissOnly = false } = props;\n const { onAttachmentDismiss, shouldUseOverflow } = useAttachmentListContext_unstable(context => context);\n const attachmentId = useId('attachment-', props.id);\n const isLoading = !!props.progress;\n\n const mode = useCopilotMode(props.mode);\n const designVersion = useDesignVersion(props.designVersion);\n\n const root = slot.always(\n getIntrinsicElementProps(\n 'div',\n {\n ref,\n ...props,\n id: attachmentId,\n },\n // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n ['content'],\n ),\n { elementType: 'div' },\n );\n\n const primaryAction = slot.always(props.primaryAction, {\n defaultProps: { as: dismissOnly ? 'span' : undefined },\n elementType: 'button',\n });\n\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: { 'aria-label': 'Remove attachment' },\n elementType: 'button',\n });\n\n dismissButton.onClick = mergeCallbacks(\n dismissButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => {\n onAttachmentDismiss?.(ev, { content: children, media, id: attachmentId });\n },\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: size === 'small' ? <Dismiss12Regular /> : <Dismiss20Regular />,\n },\n elementType: 'span',\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n const state: AttachmentState = {\n id: attachmentId,\n size,\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n progress: ProgressBar,\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n progress,\n imageOnly,\n isLoading,\n shouldUseOverflow,\n mode,\n designVersion,\n dismissOnly,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["React","ProgressBar","getIntrinsicElementProps","mergeCallbacks","slot","useId","Dismiss12Regular","Dismiss20Regular","useAttachmentListContext_unstable","useCopilotMode","useDesignVersion","useAttachment_unstable","props","ref","children","imageOnly","size","dismissOnly","onAttachmentDismiss","shouldUseOverflow","context","attachmentId","id","isLoading","progress","mode","designVersion","root","always","elementType","primaryAction","defaultProps","as","undefined","dismissButton","onClick","ev","content","media","optional","dismissIcon","shape","thickness","state","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,WAAW,EAAEC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,KAAK,QAAQ,6BAA6B;AAChH,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,wBAAwB;AAC3E,SAASC,iCAAiC,QAAQ,uCAAuC;AAEzF,SAASC,cAAc,EAAEC,gBAAgB,QAAQ,mCAAmC;AAEpF;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,OAAO,QAAQ,EAAEC,cAAc,KAAK,EAAE,GAAGL;IACtE,MAAM,EAAEM,mBAAmB,EAAEC,iBAAiB,EAAE,GAAGX,kCAAkCY,CAAAA,UAAWA;IAChG,MAAMC,eAAehB,MAAM,eAAeO,MAAMU,EAAE;IAClD,MAAMC,YAAY,CAAC,CAACX,MAAMY,QAAQ;IAElC,MAAMC,OAAOhB,eAAeG,MAAMa,IAAI;IACtC,MAAMC,gBAAgBhB,iBAAiBE,MAAMc,aAAa;IAE1D,MAAMC,OAAOvB,KAAKwB,MAAM,CACtB1B,yBACE,OACA;QACEW;QACA,GAAGD,KAAK;QACRU,IAAID;IACN,GACA,qFAAqF;IACrF;QAAC;KAAU,GAEb;QAAEQ,aAAa;IAAM;IAGvB,MAAMC,gBAAgB1B,KAAKwB,MAAM,CAAChB,MAAMkB,aAAa,EAAE;QACrDC,cAAc;YAAEC,IAAIf,cAAc,SAASgB;QAAU;QACrDJ,aAAa;IACf;IAEA,MAAMK,gBAAgB9B,KAAKwB,MAAM,CAAChB,MAAMsB,aAAa,EAAE;QACrDH,cAAc;YAAE,cAAc;QAAoB;QAClDF,aAAa;IACf;IAEAK,cAAcC,OAAO,GAAGhC,eACtB+B,cAAcC,OAAO,EACrB,CAACC;QACClB,gCAAAA,0CAAAA,oBAAsBkB,IAAI;YAAEC,SAASvB;YAAUwB;YAAOhB,IAAID;QAAa;IACzE;IAGF,MAAMiB,QAAQlC,KAAKmC,QAAQ,CAAC3B,MAAM0B,KAAK,EAAE;QAAET,aAAa;IAAO;IAE/D,MAAMQ,UAAUjC,KAAKwB,MAAM,CAAChB,MAAMyB,OAAO,EAAE;QACzCN,cAAc;YACZjB,UAAUF,MAAME,QAAQ;QAC1B;QACAe,aAAa;IACf;IAEA,MAAMW,cAAcpC,KAAKwB,MAAM,CAAChB,MAAM4B,WAAW,EAAE;QACjDT,cAAc;YACZjB,UAAUE,SAAS,wBAAU,oBAACV,wCAAsB,oBAACC;QACvD;QACAsB,aAAa;IACf;IAEA,MAAML,WAAWpB,KAAKmC,QAAQ,CAAC3B,MAAMY,QAAQ,EAAE;QAC7CO,cAAc;YACZU,OAAO;YACPC,WAAW;YACX,mBAAmB9B,MAAMU,EAAE;QAC7B;QACAO,aAAa5B;IACf;IAEA,MAAM0C,QAAyB;QAC7BrB,IAAID;QACJL;QACA4B,YAAY;YACVjB,MAAM;YACNG,eAAe;YACfI,eAAe;YACfI,OAAO;YACPD,SAAS;YACTG,aAAa;YACbhB,UAAUvB;QACZ;QAEA0B;QACAG;QACAI;QACAI;QACAD;QACAG;QACAhB;QACAT;QACAQ;QACAJ;QACAM;QACAC;QACAT;IACF;IAEA,IAAI0B,MAAMb,aAAa,CAACE,EAAE,KAAK,QAAQ;QACrCW,MAAMC,UAAU,CAACd,aAAa,GAAG;IACnC;IAEA,OAAOa;AACT,EAAE"}
@@ -0,0 +1,348 @@
1
+ import { createCustomFocusIndicatorStyle, __resetStyles, __styles, mergeClasses, slot, typographyStyles } from '@fluentui/react-components';
2
+ import { tokens } from '@fluentui-copilot/tokens';
3
+ import { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';
4
+ export const attachmentClassNames = {
5
+ root: 'fai-Attachment',
6
+ primaryAction: 'fai-Attachment__primaryAction',
7
+ dismissButton: 'fai-Attachment__dismissButton',
8
+ media: 'fai-Attachment__media',
9
+ content: 'fai-Attachment__content',
10
+ dismissIcon: 'fai-Attachment__dismissIcon',
11
+ progress: 'fai-Attachment__progress'
12
+ };
13
+ const ATTACHMENT_MAXWIDTH = '180px';
14
+ const SMALL_ATTACHMENT_SIZE = '16px';
15
+ const ATTACHMENT_SIZE = '20px';
16
+ const useRootBaseClassName = __resetStyles("r16wonf3", null, [".r16wonf3{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;align-self:end;position:relative;}"]);
17
+ const buttonBaseStyles = {
18
+ alignItems: 'center',
19
+ backgroundColor: tokens.colorSubtleBackground,
20
+ border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
21
+ borderRadius: tokens.borderRadiusMedium,
22
+ boxSizing: 'border-box',
23
+ columnGap: tokens.spacingHorizontalSNudge,
24
+ color: tokens.colorNeutralForeground1,
25
+ cursor: 'pointer',
26
+ display: 'inline-flex',
27
+ flexWrap: 'nowrap',
28
+ justifyContent: 'center',
29
+ ...createCustomFocusIndicatorStyle({
30
+ outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,
31
+ outlineOffset: `calc(${tokens.strokeWidthThick} * -1)`,
32
+ zIndex: 1
33
+ }),
34
+ verticalAlign: 'middle'
35
+ };
36
+ const usePrimaryActionBaseClassName = __resetStyles("r1cypics", "r1zmptn", [".r1cypics{align-items:center;background-color:var(--colorSubtleBackground);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;border-top-right-radius:var(--borderRadiusNone);border-bottom-right-radius:var(--borderRadiusNone);border-right-style:none;max-width:calc(180px - 20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS) - var(--spacingHorizontalXS));padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalS);}", ".r1cypics[data-fui-focus-visible]{outline:var(--strokeWidthThick) solid var(--colorStrokeFocus2);outline-offset:calc(var(--strokeWidthThick) * -1);z-index:1;}", ".r1zmptn{align-items:center;background-color:var(--colorSubtleBackground);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;border-top-left-radius:var(--borderRadiusNone);border-bottom-left-radius:var(--borderRadiusNone);border-left-style:none;max-width:calc(180px - 20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS) - var(--spacingHorizontalXS));padding:var(--spacingVerticalXS) var(--spacingHorizontalS) var(--spacingVerticalXS) var(--spacingHorizontalS);}", ".r1zmptn[data-fui-focus-visible]{outline:var(--strokeWidthThick) solid var(--colorStrokeFocus2);outline-offset:calc(var(--strokeWidthThick) * -1);z-index:1;}"]);
37
+ const usePrimaryActionStyles = __styles({
38
+ button: {
39
+ eoavqd: "f8491dx",
40
+ Jwef8y: "f1t94bn6",
41
+ Bi91k9c: "fnwyq0v",
42
+ ecr2s2: "f1wfn5kd",
43
+ lj723h: "flvvhsy",
44
+ Bbkh6qg: "fkiggi6",
45
+ Cnge2b: "f8zknr1"
46
+ }
47
+ }, {
48
+ h: [".f8491dx:hover{cursor:pointer;}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}"],
49
+ a: [".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}"],
50
+ m: [["@media (forced-colors: active){.fkiggi6:hover{background-color:HighlightText;}}", {
51
+ m: "(forced-colors: active)"
52
+ }], ["@media (forced-colors: active){.f8zknr1:active{background-color:HighlightText;}}", {
53
+ m: "(forced-colors: active)"
54
+ }]]
55
+ });
56
+ const useDismissButtonBaseClassName = __resetStyles("r10lynrk", "r2f20ug", {
57
+ r: [".r10lynrk{align-items:center;background-color:var(--colorSubtleBackground);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalXS);max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);border-left-color:var(--colorNeutralStroke1);border-top-left-radius:var(--borderRadiusNone);border-bottom-left-radius:var(--borderRadiusNone);border-top-right-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);}", ".r10lynrk[data-fui-focus-visible]{outline:var(--strokeWidthThick) solid var(--colorStrokeFocus2);outline-offset:calc(var(--strokeWidthThick) * -1);z-index:1;}", ".r10lynrk:hover{cursor:pointer;background-color:var(--colorSubtleBackgroundHover);color:var(--colorNeutralForeground2BrandHover);}", ".r10lynrk:active{background-color:var(--colorSubtleBackgroundPressed);color:var(--colorNeutralForeground2BrandPressed);}", ".r2f20ug{align-items:center;background-color:var(--colorSubtleBackground);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalXS);max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);border-right-color:var(--colorNeutralStroke1);border-top-right-radius:var(--borderRadiusNone);border-bottom-right-radius:var(--borderRadiusNone);border-top-left-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);}", ".r2f20ug[data-fui-focus-visible]{outline:var(--strokeWidthThick) solid var(--colorStrokeFocus2);outline-offset:calc(var(--strokeWidthThick) * -1);z-index:1;}", ".r2f20ug:hover{cursor:pointer;background-color:var(--colorSubtleBackgroundHover);color:var(--colorNeutralForeground2BrandHover);}", ".r2f20ug:active{background-color:var(--colorSubtleBackgroundPressed);color:var(--colorNeutralForeground2BrandPressed);}"],
58
+ s: ["@media (forced-colors: active){.r10lynrk:hover{background-color:HighlightText;}.r10lynrk:active{background-color:HighlightText;}}", "@media (forced-colors: active){.r2f20ug:hover{background-color:HighlightText;}.r2f20ug:active{background-color:HighlightText;}}"]
59
+ });
60
+ const useDismissButtonCurrentStyles = __styles({
61
+ root: {
62
+ Bpw4n2g: "fgptp6q"
63
+ }
64
+ }, {
65
+ h: [".fgptp6q:hover .fai-Attachment__dismissIcon{color:var(--colorBrandForegroundLinkHover);}"]
66
+ });
67
+ const useMediaBaseClassName = __resetStyles("r1a4a4my", null, [".r1a4a4my{align-items:center;display:inline-flex;font-size:20px;height:20px;line-height:20px;width:20px;}"]);
68
+ 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);}"]);
69
+ 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);}"]);
70
+ const useDismissIconNextStyles = __styles({
71
+ dismissOnly: {
72
+ Bi91k9c: "f139oj5f",
73
+ lj723h: "f19au66r"
74
+ }
75
+ }, {
76
+ h: [".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}"],
77
+ a: [".f19au66r:active{color:var(--colorNeutralForeground2BrandPressed);}"]
78
+ });
79
+ const useImageOnlyStyles = __styles({
80
+ primaryAction: {
81
+ Byoj8tv: 0,
82
+ uwmqm3: 0,
83
+ z189sj: 0,
84
+ z8tnut: 0,
85
+ B0ocmuz: "f1mk8lai"
86
+ },
87
+ content: {
88
+ Bg96gwp: "fez10in"
89
+ }
90
+ }, {
91
+ d: [[".f1mk8lai{padding:0;}", {
92
+ p: -1
93
+ }], ".fez10in{line-height:0;}"]
94
+ });
95
+ export const useOverflowStyles = __styles({
96
+ overflow: {
97
+ B2u0y6b: "f6dzj5z",
98
+ a9b677: "fly5x3f"
99
+ }
100
+ }, {
101
+ d: [".f6dzj5z{max-width:100%;}", ".fly5x3f{width:100%;}"]
102
+ });
103
+ const useSmallStyles = __styles({
104
+ primaryAction: {
105
+ B2u0y6b: "fyv37rf",
106
+ Byoj8tv: 0,
107
+ uwmqm3: 0,
108
+ z189sj: 0,
109
+ z8tnut: 0,
110
+ B0ocmuz: "f1o3rc9c"
111
+ },
112
+ media: {
113
+ Be2twd7: "f4ybsrx",
114
+ Bqenvij: "fd461yt",
115
+ Bg96gwp: "f104wqfl",
116
+ a9b677: "fjw5fx7"
117
+ },
118
+ content: {
119
+ Bahqtrf: "fk6fouc",
120
+ Be2twd7: "fy9rknc",
121
+ Bhrd7zp: "figsok6",
122
+ Bg96gwp: "fwrc4pm"
123
+ },
124
+ dismissButton: {
125
+ Byoj8tv: 0,
126
+ uwmqm3: 0,
127
+ z189sj: 0,
128
+ z8tnut: 0,
129
+ B0ocmuz: "fnsh2i4",
130
+ B2u0y6b: "fatynhj",
131
+ Bf4jedk: "fydhda"
132
+ },
133
+ dismissIcon: {
134
+ Be2twd7: "f4ybsrx",
135
+ Bqenvij: "fzi9ji0",
136
+ B2u0y6b: "f11qte0n",
137
+ Bf4jedk: "fy1a5sw"
138
+ }
139
+ }, {
140
+ d: [".fyv37rf{max-width:calc(180px - 16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS) - var(--spacingHorizontalXS));}", [".f1o3rc9c{padding:var(--spacingVerticalXXS) var(--spacingHorizontalSNudge) var(--spacingVerticalXXS) var(--spacingHorizontalSNudge);}", {
141
+ p: -1
142
+ }], ".f4ybsrx{font-size:16px;}", ".fd461yt{height:16px;}", ".f104wqfl{line-height:16px;}", ".fjw5fx7{width:16px;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", [".fnsh2i4{padding:var(--spacingVerticalXXS) var(--spacingHorizontalXXS);}", {
143
+ p: -1
144
+ }], ".fatynhj{max-width:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);}", ".fydhda{min-width:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);}", ".fzi9ji0{height:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));}", ".f11qte0n{max-width:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));}", ".fy1a5sw{min-width:calc(16px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));}"]
145
+ });
146
+ const usePrimaryActionNextStyles = __styles({
147
+ root: {
148
+ Btl43ni: ["f8yange", "f1el4m67"],
149
+ Beyfa6y: ["fc7yr5o", "fnivh3a"]
150
+ },
151
+ canvas: {
152
+ Byoj8tv: 0,
153
+ uwmqm3: 0,
154
+ z189sj: 0,
155
+ z8tnut: 0,
156
+ B0ocmuz: "f1nm7172",
157
+ sshi5w: "f1w5jphr"
158
+ },
159
+ sidecar: {
160
+ Byoj8tv: 0,
161
+ uwmqm3: 0,
162
+ z189sj: 0,
163
+ z8tnut: 0,
164
+ B0ocmuz: "f1nm7172",
165
+ sshi5w: "f1nxs5xn"
166
+ }
167
+ }, {
168
+ d: [".f8yange{border-top-left-radius:var(--borderRadiusXLarge);}", ".f1el4m67{border-top-right-radius:var(--borderRadiusXLarge);}", ".fc7yr5o{border-bottom-left-radius:var(--borderRadiusXLarge);}", ".fnivh3a{border-bottom-right-radius:var(--borderRadiusXLarge);}", [".f1nm7172{padding:var(--spacingVerticalNone) var(--spacingHorizontalS);}", {
169
+ p: -1
170
+ }], ".f1w5jphr{min-height:40px;}", [".f1nm7172{padding:var(--spacingVerticalNone) var(--spacingHorizontalS);}", {
171
+ p: -1
172
+ }], ".f1nxs5xn{min-height:32px;}"]
173
+ });
174
+ const useDismissButtonNextStyles = __styles({
175
+ root: {
176
+ B7oj6ja: ["f1el4m67", "f8yange"],
177
+ Bbmb7ep: ["fnivh3a", "fc7yr5o"],
178
+ Bi91k9c: "f3p8bqa",
179
+ lj723h: "flvvhsy",
180
+ zhjwy3: ["f1lxtadh", "f1akhkt"],
181
+ ibv6hh: ["f1ojsxk5", "f5tn483"],
182
+ wvpqe5: ["fjik90z", "fcdblym"]
183
+ },
184
+ withPrimary: {
185
+ Bpw4n2g: "f19lmcbl",
186
+ B9er7hs: "fem51fo"
187
+ },
188
+ canvas: {
189
+ Byoj8tv: 0,
190
+ uwmqm3: 0,
191
+ z189sj: 0,
192
+ z8tnut: 0,
193
+ B0ocmuz: "f1nm7172",
194
+ sshi5w: "f1w5jphr",
195
+ a9b677: "feqmc2u"
196
+ },
197
+ sidecar: {
198
+ Byoj8tv: 0,
199
+ uwmqm3: 0,
200
+ z189sj: 0,
201
+ z8tnut: 0,
202
+ B0ocmuz: "f19d5dog",
203
+ sshi5w: "f1nxs5xn",
204
+ a9b677: "f1szoe96"
205
+ },
206
+ dismissOnly: {
207
+ Beyfa6y: 0,
208
+ Bbmb7ep: 0,
209
+ Btl43ni: 0,
210
+ B7oj6ja: 0,
211
+ Dimara: "f1kijzfu",
212
+ a9b677: "fkyq1ak",
213
+ zhjwy3: ["fjscplz", "f1gn591s"],
214
+ De3pzq: "f16xq7d1",
215
+ Jwef8y: "fk4wa99",
216
+ ecr2s2: "f1iyuj0z"
217
+ }
218
+ }, {
219
+ d: [".f1el4m67{border-top-right-radius:var(--borderRadiusXLarge);}", ".f8yange{border-top-left-radius:var(--borderRadiusXLarge);}", ".fnivh3a{border-bottom-right-radius:var(--borderRadiusXLarge);}", ".fc7yr5o{border-bottom-left-radius:var(--borderRadiusXLarge);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".fjik90z{border-left-style:solid;}", ".fcdblym{border-right-style:solid;}", [".f1nm7172{padding:var(--spacingVerticalNone) var(--spacingHorizontalS);}", {
220
+ p: -1
221
+ }], ".f1w5jphr{min-height:40px;}", ".feqmc2u{width:40px;}", [".f19d5dog{padding:var(--spacingVerticalNone) var(--spacingHorizontalMNudge);}", {
222
+ p: -1
223
+ }], ".f1nxs5xn{min-height:32px;}", ".f1szoe96{width:32px;}", [".f1kijzfu{border-radius:var(--borderRadiusXLarge);}", {
224
+ p: -1
225
+ }], ".fkyq1ak{width:unset;}", ".fjscplz{border-left-color:var(--colorTransparentStroke);}", ".f1gn591s{border-right-color:var(--colorTransparentStroke);}", ".f16xq7d1{background-color:var(--colorNeutralBackground3);}"],
226
+ h: [".f3p8bqa:hover{color:var(--colorNeutralForeground2);}", ".f19lmcbl:hover .fai-Attachment__dismissIcon{color:var(--colorNeutralForeground2);}", ".fk4wa99:hover{background-color:var(--colorNeutralBackground3);}"],
227
+ a: [".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}", ".fem51fo:active .fai-Attachment__dismissIcon{color:var(--colorNeutralForeground2Pressed);}", ".f1iyuj0z:active{background-color:var(--colorNeutralBackground3);}"]
228
+ });
229
+ const usePrimaryDismissNextStyles = __styles({
230
+ sharedStyles: {
231
+ Bgfg5da: 0,
232
+ B9xav0g: 0,
233
+ oivjwe: 0,
234
+ Bn0qgzm: 0,
235
+ B4g9neb: 0,
236
+ zhjwy3: 0,
237
+ wvpqe5: 0,
238
+ ibv6hh: 0,
239
+ u1mtju: 0,
240
+ h3c5rm: 0,
241
+ vrafjx: 0,
242
+ Bekrc4i: 0,
243
+ i8vvqc: 0,
244
+ g2u3we: 0,
245
+ icvyot: 0,
246
+ B4j52fo: 0,
247
+ irswps: "f3bhgqh",
248
+ De3pzq: "f16xq7d1"
249
+ },
250
+ sharedInteractiveStyles: {
251
+ Jwef8y: "f1h648pw",
252
+ ecr2s2: "fwdzr64"
253
+ }
254
+ }, {
255
+ d: [[".f3bhgqh{border:none;}", {
256
+ p: -2
257
+ }], ".f16xq7d1{background-color:var(--colorNeutralBackground3);}"],
258
+ h: [".f1h648pw:hover{background-color:var(--colorNeutralBackground3Hover);}"],
259
+ a: [".fwdzr64:active{background-color:var(--colorNeutralBackground3Pressed);}"]
260
+ });
261
+ const useRootNextStyles = __styles({
262
+ root: {
263
+ Bw0xxkn: 0,
264
+ oeaueh: 0,
265
+ Bpd4iqm: 0,
266
+ Befb4lg: "f1bars0k",
267
+ Beyfa6y: 0,
268
+ Bbmb7ep: 0,
269
+ Btl43ni: 0,
270
+ B7oj6ja: 0,
271
+ Dimara: "f1kijzfu"
272
+ }
273
+ }, {
274
+ d: [[".f1bars0k{outline:var(--strokeWidthThin) solid var(--colorTransparentStroke);}", {
275
+ p: -1
276
+ }], [".f1kijzfu{border-radius:var(--borderRadiusXLarge);}", {
277
+ p: -1
278
+ }]]
279
+ });
280
+ const useFocusStyles = __styles({
281
+ primaryActionButton: {
282
+ B6xbmo0: ["f146y5a9", "f1k2ftg"],
283
+ kdpuga: ["f1ndz5i7", "f1co4qro"]
284
+ },
285
+ dismissButton: {
286
+ dm238s: ["f1k2ftg", "f146y5a9"],
287
+ Bw81rd7: ["f1co4qro", "f1ndz5i7"]
288
+ }
289
+ }, {
290
+ d: [".f146y5a9[data-fui-focus-visible]{border-top-right-radius:var(--borderRadiusNone);}", ".f1k2ftg[data-fui-focus-visible]{border-top-left-radius:var(--borderRadiusNone);}", ".f1ndz5i7[data-fui-focus-visible]{border-bottom-right-radius:var(--borderRadiusNone);}", ".f1co4qro[data-fui-focus-visible]{border-bottom-left-radius:var(--borderRadiusNone);}"]
291
+ });
292
+ /**
293
+ * Apply styling to the Attachment slots based on the state
294
+ */
295
+ export const useAttachmentStyles_unstable = state => {
296
+ 'use no memo';
297
+
298
+ const rootBaseClassName = useRootBaseClassName();
299
+ const primaryActionBaseClassName = usePrimaryActionBaseClassName();
300
+ const dismissButtonBaseClassName = useDismissButtonBaseClassName();
301
+ const dismissButtonCurrentStyles = useDismissButtonCurrentStyles();
302
+ const mediaBaseClassName = useMediaBaseClassName();
303
+ const contentBaseClassName = useContentBaseClassName();
304
+ const dismissIconBaseClassName = useDismissIconBaseClassName();
305
+ const dismissIconNextStyles = useDismissIconNextStyles();
306
+ const progressBarStyles = useProgressBarStyles();
307
+ const primaryActionStyles = usePrimaryActionStyles();
308
+ const imageOnlyStyles = useImageOnlyStyles();
309
+ const smallStyles = useSmallStyles();
310
+ const primaryActionNextStyles = usePrimaryActionNextStyles();
311
+ const dismissButtonNextStyles = useDismissButtonNextStyles();
312
+ const primaryDismissNextStyles = usePrimaryDismissNextStyles();
313
+ const rootNextStyles = useRootNextStyles();
314
+ const focusStyles = useFocusStyles();
315
+ const {
316
+ imageOnly,
317
+ primaryAction,
318
+ size,
319
+ mode,
320
+ designVersion,
321
+ dismissOnly
322
+ } = state;
323
+ state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, designVersion === 'next' && rootNextStyles.root, state.root.className);
324
+ state.primaryAction.className = mergeClasses(attachmentClassNames.primaryAction, primaryActionBaseClassName, size === 'small' && smallStyles.primaryAction, primaryAction.as !== 'span' && !state.isLoading && primaryActionStyles.button, imageOnly && imageOnlyStyles.primaryAction, designVersion === 'next' && primaryDismissNextStyles.sharedStyles, designVersion === 'next' && primaryAction.as !== 'span' && !state.isLoading && primaryDismissNextStyles.sharedInteractiveStyles, designVersion === 'next' && primaryActionNextStyles.root, designVersion === 'next' && primaryActionNextStyles[mode], focusStyles.primaryActionButton, state.primaryAction.className);
325
+ state.dismissButton.className = mergeClasses(attachmentClassNames.dismissButton, dismissButtonBaseClassName, designVersion === 'current' && dismissButtonCurrentStyles.root, size === 'small' && smallStyles.dismissButton, designVersion === 'next' && primaryDismissNextStyles.sharedStyles, designVersion === 'next' && primaryDismissNextStyles.sharedInteractiveStyles, designVersion === 'next' && dismissButtonNextStyles.root, designVersion === 'next' && dismissButtonNextStyles[mode], designVersion === 'next' && dismissOnly && dismissButtonNextStyles.dismissOnly, designVersion === 'next' && !dismissOnly && dismissButtonNextStyles.withPrimary, focusStyles.dismissButton, state.dismissButton.className);
326
+ if (state.media) {
327
+ state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, size === 'small' && smallStyles.media, state.media.className);
328
+ }
329
+ state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, size === 'small' && smallStyles.content, imageOnly && imageOnlyStyles.content, state.content.className);
330
+ state.dismissIcon.className = mergeClasses(attachmentClassNames.dismissIcon, dismissIconBaseClassName, size === 'small' && smallStyles.dismissIcon, designVersion === 'next' && dismissOnly && dismissIconNextStyles.dismissOnly, state.dismissIcon.className);
331
+ if (state.progress) {
332
+ state.progress.className = mergeClasses(attachmentClassNames.progress, progressBarStyles.progress, state.progress.className);
333
+ const bar = slot.optional(state.progress.bar, {
334
+ elementType: 'div',
335
+ renderByDefault: true
336
+ });
337
+ if (bar) {
338
+ if (state.progress.value === undefined) {
339
+ bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);
340
+ } else {
341
+ bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);
342
+ }
343
+ state.progress.bar = bar;
344
+ }
345
+ }
346
+ return state;
347
+ };
348
+ //# sourceMappingURL=useAttachmentStyles.styles.js.map