@fluentui-copilot/react-attachments 0.0.0-nightly-20251002-0405-17b34fb7.1 → 0.0.0-nightly-20251010-0406-7df7c6d1.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/package.json +8 -8
  4. package/dist/index.d.ts +0 -379
  5. package/lib/AgentTag.js +0 -1
  6. package/lib/AgentTag.js.map +0 -1
  7. package/lib/Attachment.js +0 -1
  8. package/lib/Attachment.js.map +0 -1
  9. package/lib/AttachmentList.js +0 -1
  10. package/lib/AttachmentList.js.map +0 -1
  11. package/lib/AttachmentOverflowMenu.js +0 -1
  12. package/lib/AttachmentOverflowMenu.js.map +0 -1
  13. package/lib/AttachmentOverflowMenuButton.js +0 -1
  14. package/lib/AttachmentOverflowMenuButton.js.map +0 -1
  15. package/lib/AttachmentOverflowMenuItem.js +0 -1
  16. package/lib/AttachmentOverflowMenuItem.js.map +0 -1
  17. package/lib/components/AgentTag/AgentTag.js +0 -11
  18. package/lib/components/AgentTag/AgentTag.js.map +0 -1
  19. package/lib/components/AgentTag/AgentTag.types.js +0 -3
  20. package/lib/components/AgentTag/AgentTag.types.js.map +0 -1
  21. package/lib/components/AgentTag/index.js +0 -4
  22. package/lib/components/AgentTag/index.js.map +0 -1
  23. package/lib/components/AgentTag/renderAgentTag.js +0 -6
  24. package/lib/components/AgentTag/renderAgentTag.js.map +0 -1
  25. package/lib/components/AgentTag/useAgentTag.js +0 -18
  26. package/lib/components/AgentTag/useAgentTag.js.map +0 -1
  27. package/lib/components/AgentTag/useAgentTagStyles.styles.js +0 -95
  28. package/lib/components/AgentTag/useAgentTagStyles.styles.js.map +0 -1
  29. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +0 -66
  30. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +0 -1
  31. package/lib/components/Attachment/Attachment.js +0 -13
  32. package/lib/components/Attachment/Attachment.js.map +0 -1
  33. package/lib/components/Attachment/Attachment.types.js +0 -3
  34. package/lib/components/Attachment/Attachment.types.js.map +0 -1
  35. package/lib/components/Attachment/index.js +0 -4
  36. package/lib/components/Attachment/index.js.map +0 -1
  37. package/lib/components/Attachment/renderAttachment.js +0 -42
  38. package/lib/components/Attachment/renderAttachment.js.map +0 -1
  39. package/lib/components/Attachment/useAttachment.js +0 -103
  40. package/lib/components/Attachment/useAttachment.js.map +0 -1
  41. package/lib/components/Attachment/useAttachmentStyles.styles.js +0 -348
  42. package/lib/components/Attachment/useAttachmentStyles.styles.js.map +0 -1
  43. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +0 -328
  44. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +0 -1
  45. package/lib/components/AttachmentList/AttachmentList.js +0 -14
  46. package/lib/components/AttachmentList/AttachmentList.js.map +0 -1
  47. package/lib/components/AttachmentList/AttachmentList.types.js +0 -1
  48. package/lib/components/AttachmentList/AttachmentList.types.js.map +0 -1
  49. package/lib/components/AttachmentList/index.js +0 -4
  50. package/lib/components/AttachmentList/index.js.map +0 -1
  51. package/lib/components/AttachmentList/renderAttachmentList.js +0 -31
  52. package/lib/components/AttachmentList/renderAttachmentList.js.map +0 -1
  53. package/lib/components/AttachmentList/useAttachmentList.js +0 -134
  54. package/lib/components/AttachmentList/useAttachmentList.js.map +0 -1
  55. package/lib/components/AttachmentList/useAttachmentListContextValues.js +0 -12
  56. package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +0 -1
  57. package/lib/components/AttachmentList/useAttachmentListStyles.styles.js +0 -48
  58. package/lib/components/AttachmentList/useAttachmentListStyles.styles.js.map +0 -1
  59. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +0 -44
  60. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +0 -1
  61. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +0 -14
  62. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +0 -1
  63. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -1
  64. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +0 -1
  65. package/lib/components/AttachmentOverflowMenu/index.js +0 -4
  66. package/lib/components/AttachmentOverflowMenu/index.js.map +0 -1
  67. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +0 -13
  68. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +0 -1
  69. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +0 -18
  70. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +0 -1
  71. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +0 -12
  72. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +0 -1
  73. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +0 -12
  74. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +0 -1
  75. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -3
  76. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +0 -1
  77. package/lib/components/AttachmentOverflowMenuButton/index.js +0 -4
  78. package/lib/components/AttachmentOverflowMenuButton/index.js.map +0 -1
  79. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +0 -15
  80. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +0 -1
  81. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +0 -69
  82. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +0 -1
  83. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js +0 -116
  84. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +0 -1
  85. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +0 -102
  86. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +0 -1
  87. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +0 -10
  88. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +0 -1
  89. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -3
  90. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +0 -1
  91. package/lib/components/AttachmentOverflowMenuItem/index.js +0 -4
  92. package/lib/components/AttachmentOverflowMenuItem/index.js.map +0 -1
  93. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +0 -13
  94. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +0 -1
  95. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +0 -56
  96. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +0 -1
  97. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js +0 -84
  98. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +0 -1
  99. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +0 -59
  100. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +0 -1
  101. package/lib/components/index.js +0 -5
  102. package/lib/components/index.js.map +0 -1
  103. package/lib/components/utils/useProgressBarStyles.styles.js +0 -54
  104. package/lib/components/utils/useProgressBarStyles.styles.js.map +0 -1
  105. package/lib/components/utils/useProgressBarStyles.styles.raw.js +0 -42
  106. package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +0 -1
  107. package/lib/contexts/attachmentListContext.js +0 -9
  108. package/lib/contexts/attachmentListContext.js.map +0 -1
  109. package/lib/contexts/attachmentOverflowMenuContext.js +0 -9
  110. package/lib/contexts/attachmentOverflowMenuContext.js.map +0 -1
  111. package/lib/index.js +0 -8
  112. package/lib/index.js.map +0 -1
  113. package/lib-commonjs/AgentTag.js +0 -28
  114. package/lib-commonjs/AgentTag.js.map +0 -1
  115. package/lib-commonjs/Attachment.js +0 -31
  116. package/lib-commonjs/Attachment.js.map +0 -1
  117. package/lib-commonjs/AttachmentList.js +0 -28
  118. package/lib-commonjs/AttachmentList.js.map +0 -1
  119. package/lib-commonjs/AttachmentOverflowMenu.js +0 -25
  120. package/lib-commonjs/AttachmentOverflowMenu.js.map +0 -1
  121. package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -28
  122. package/lib-commonjs/AttachmentOverflowMenuButton.js.map +0 -1
  123. package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -28
  124. package/lib-commonjs/AttachmentOverflowMenuItem.js.map +0 -1
  125. package/lib-commonjs/components/AgentTag/AgentTag.js +0 -21
  126. package/lib-commonjs/components/AgentTag/AgentTag.js.map +0 -1
  127. package/lib-commonjs/components/AgentTag/AgentTag.types.js +0 -6
  128. package/lib-commonjs/components/AgentTag/AgentTag.types.js.map +0 -1
  129. package/lib-commonjs/components/AgentTag/index.js +0 -31
  130. package/lib-commonjs/components/AgentTag/index.js.map +0 -1
  131. package/lib-commonjs/components/AgentTag/renderAgentTag.js +0 -14
  132. package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +0 -1
  133. package/lib-commonjs/components/AgentTag/useAgentTag.js +0 -19
  134. package/lib-commonjs/components/AgentTag/useAgentTag.js.map +0 -1
  135. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js +0 -145
  136. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js.map +0 -1
  137. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +0 -82
  138. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +0 -1
  139. package/lib-commonjs/components/Attachment/Attachment.js +0 -23
  140. package/lib-commonjs/components/Attachment/Attachment.js.map +0 -1
  141. package/lib-commonjs/components/Attachment/Attachment.types.js +0 -6
  142. package/lib-commonjs/components/Attachment/Attachment.types.js.map +0 -1
  143. package/lib-commonjs/components/Attachment/index.js +0 -34
  144. package/lib-commonjs/components/Attachment/index.js.map +0 -1
  145. package/lib-commonjs/components/Attachment/renderAttachment.js +0 -50
  146. package/lib-commonjs/components/Attachment/renderAttachment.js.map +0 -1
  147. package/lib-commonjs/components/Attachment/useAttachment.js +0 -105
  148. package/lib-commonjs/components/Attachment/useAttachment.js.map +0 -1
  149. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js +0 -550
  150. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +0 -1
  151. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +0 -347
  152. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +0 -1
  153. package/lib-commonjs/components/AttachmentList/AttachmentList.js +0 -25
  154. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +0 -1
  155. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +0 -4
  156. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +0 -1
  157. package/lib-commonjs/components/AttachmentList/index.js +0 -31
  158. package/lib-commonjs/components/AttachmentList/index.js.map +0 -1
  159. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +0 -39
  160. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +0 -1
  161. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +0 -137
  162. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +0 -1
  163. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +0 -22
  164. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +0 -1
  165. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js +0 -67
  166. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js.map +0 -1
  167. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +0 -60
  168. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +0 -1
  169. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +0 -24
  170. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +0 -1
  171. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -4
  172. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +0 -1
  173. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -28
  174. package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +0 -1
  175. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +0 -21
  176. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +0 -1
  177. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +0 -21
  178. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +0 -1
  179. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +0 -22
  180. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +0 -1
  181. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +0 -23
  182. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +0 -1
  183. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -6
  184. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +0 -1
  185. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -31
  186. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +0 -1
  187. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +0 -23
  188. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +0 -1
  189. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +0 -72
  190. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +0 -1
  191. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js +0 -178
  192. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +0 -1
  193. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +0 -118
  194. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +0 -1
  195. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +0 -21
  196. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +0 -1
  197. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -6
  198. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +0 -1
  199. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -31
  200. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +0 -1
  201. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +0 -21
  202. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +0 -1
  203. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +0 -59
  204. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +0 -1
  205. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js +0 -109
  206. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +0 -1
  207. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +0 -75
  208. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +0 -1
  209. package/lib-commonjs/components/index.js +0 -92
  210. package/lib-commonjs/components/index.js.map +0 -1
  211. package/lib-commonjs/components/utils/useProgressBarStyles.styles.js +0 -103
  212. package/lib-commonjs/components/utils/useProgressBarStyles.styles.js.map +0 -1
  213. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +0 -50
  214. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +0 -1
  215. package/lib-commonjs/contexts/attachmentListContext.js +0 -30
  216. package/lib-commonjs/contexts/attachmentListContext.js.map +0 -1
  217. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +0 -30
  218. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +0 -1
  219. package/lib-commonjs/index.js +0 -122
  220. package/lib-commonjs/index.js.map +0 -1
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- Attachment: function() {
13
- return _Attachment.Attachment;
14
- },
15
- attachmentClassNames: function() {
16
- return _useAttachmentStylesstyles.attachmentClassNames;
17
- },
18
- renderAttachment_unstable: function() {
19
- return _renderAttachment.renderAttachment_unstable;
20
- },
21
- useAttachmentStyles_unstable: function() {
22
- return _useAttachmentStylesstyles.useAttachmentStyles_unstable;
23
- },
24
- useAttachment_unstable: function() {
25
- return _useAttachment.useAttachment_unstable;
26
- },
27
- useOverflowStyles: function() {
28
- return _useAttachmentStylesstyles.useOverflowStyles;
29
- }
30
- });
31
- const _Attachment = require("./Attachment");
32
- const _renderAttachment = require("./renderAttachment");
33
- const _useAttachment = require("./useAttachment");
34
- const _useAttachmentStylesstyles = require("./useAttachmentStyles.styles");
@@ -1 +0,0 @@
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","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","useOverflowStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAIVC,oBAAoB;eAApBA,+CAAoB;;IAFpBC,yBAAyB;eAAzBA,2CAAyB;;IAEHC,4BAA4B;eAA5BA,uDAA4B;;IADlDC,sBAAsB;eAAtBA,qCAAsB;;IAC8BC,iBAAiB;eAAjBA,4CAAiB;;;4BAJnD;kCAEe;+BACH;2CAC+C"}
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "renderAttachment_unstable", {
6
- enumerable: true,
7
- get: function() {
8
- return renderAttachment_unstable;
9
- }
10
- });
11
- const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
- const _reactcomponents = require("@fluentui/react-components");
13
- const renderAttachment_unstable = (state)=>{
14
- const { id, shouldUseOverflow, designVersion, dismissOnly } = state;
15
- const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);
16
- return shouldUseOverflow ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcomponents.OverflowItem, {
17
- id: id,
18
- children: attachment
19
- }, id) : attachment;
20
- };
21
- const renderAttachment = (state)=>{
22
- (0, _reactcomponents.assertSlots)(state);
23
- return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
24
- children: [
25
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.primaryAction, {
26
- children: [
27
- state.media && !state.imageOnly && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {}),
28
- /*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
29
- state.progress && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.progress, {})
30
- ]
31
- }),
32
- /*#__PURE__*/ (0, _jsxruntime.jsx)(state.dismissButton, {
33
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.dismissIcon, {})
34
- })
35
- ]
36
- });
37
- };
38
- const renderDismissOnly = (state)=>{
39
- (0, _reactcomponents.assertSlots)(state);
40
- return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {
41
- children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.dismissButton, {
42
- children: [
43
- state.media && !state.imageOnly && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {}),
44
- /*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
45
- state.progress && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.progress, {}),
46
- /*#__PURE__*/ (0, _jsxruntime.jsx)(state.dismissIcon, {})
47
- ]
48
- })
49
- });
50
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { OverflowItem, assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n const { id, shouldUseOverflow, designVersion, dismissOnly } = state;\n\n const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);\n\n return shouldUseOverflow ? (\n <OverflowItem id={id} key={id}>\n {attachment}\n </OverflowItem>\n ) : (\n attachment\n );\n};\n\nconst renderAttachment = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n\nconst renderDismissOnly = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.dismissButton>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n"],"names":["renderAttachment_unstable","state","id","shouldUseOverflow","designVersion","dismissOnly","attachment","renderDismissOnly","renderAttachment","_jsx","OverflowItem","assertSlots","_jsxs","root","primaryAction","media","imageOnly","content","progress","dismissButton","dismissIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;iCAE0C;AAMnC,MAAMA,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,oBAAAA,WAAAA,GACLM,IAAAA,eAAA,EAACC,6BAAAA,EAAAA;QAAaR,IAAIA;kBACfI;OADwBJ,MAI3BI;AAEJ;AAEA,MAAME,mBAAmB,CAACP;IACxBU,IAAAA,4BAAAA,EAA6BV;IAE7B,OAAA,WAAA,GACEW,IAAAA,gBAAA,EAACX,MAAMY,IAAI,EAAA;;0BACTD,IAAAA,gBAAA,EAACX,MAAMa,aAAa,EAAA;;oBACjBb,MAAMc,KAAK,IAAI,CAACd,MAAMe,SAAS,IAAA,WAAA,GAAIP,IAAAA,eAAA,EAACR,MAAMc,KAAK,EAAA,CAAA;kCAChDN,IAAAA,eAAA,EAACR,MAAMgB,OAAO,EAAA,CAAA;oBACbhB,MAAMiB,QAAQ,IAAA,WAAA,GAAIT,IAAAA,eAAA,EAACR,MAAMiB,QAAQ,EAAA,CAAA;;;0BAEpCT,IAAAA,eAAA,EAACR,MAAMkB,aAAa,EAAA;0BAClB,WAAA,GAAAV,IAAAA,eAAA,EAACR,MAAMmB,WAAW,EAAA,CAAA;;;;AAI1B;AAEA,MAAMb,oBAAoB,CAACN;IACzBU,IAAAA,4BAAAA,EAA6BV;IAE7B,OAAA,WAAA,GACEQ,IAAAA,eAAA,EAACR,MAAMY,IAAI,EAAA;kBACT,WAAA,GAAAD,IAAAA,gBAAA,EAACX,MAAMkB,aAAa,EAAA;;gBACjBlB,MAAMc,KAAK,IAAI,CAACd,MAAMe,SAAS,IAAA,WAAA,GAAIP,IAAAA,eAAA,EAACR,MAAMc,KAAK,EAAA,CAAA;8BAChDN,IAAAA,eAAA,EAACR,MAAMgB,OAAO,EAAA,CAAA;gBACbhB,MAAMiB,QAAQ,IAAA,WAAA,GAAIT,IAAAA,eAAA,EAACR,MAAMiB,QAAQ,EAAA,CAAA;8BAClCT,IAAAA,eAAA,EAACR,MAAMmB,WAAW,EAAA,CAAA;;;;AAI1B"}
@@ -1,105 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "useAttachment_unstable", {
6
- enumerable: true,
7
- get: function() {
8
- return useAttachment_unstable;
9
- }
10
- });
11
- const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
- const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
- const _reactcomponents = require("@fluentui/react-components");
14
- const _reacticons = require("@fluentui/react-icons");
15
- const _attachmentListContext = require("../../contexts/attachmentListContext");
16
- const _reactprovider = require("@fluentui-copilot/react-provider");
17
- const useAttachment_unstable = (props, ref)=>{
18
- const { children, imageOnly, size = 'medium', dismissOnly = false } = props;
19
- const { onAttachmentDismiss, shouldUseOverflow } = (0, _attachmentListContext.useAttachmentListContext_unstable)((context)=>context);
20
- const attachmentId = (0, _reactcomponents.useId)('attachment-', props.id);
21
- const isLoading = !!props.progress;
22
- const mode = (0, _reactprovider.useCopilotMode)(props.mode);
23
- const designVersion = (0, _reactprovider.useDesignVersion)(props.designVersion);
24
- const root = _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
25
- ref,
26
- ...props,
27
- id: attachmentId
28
- }, [
29
- 'content'
30
- ]), {
31
- elementType: 'div'
32
- });
33
- const primaryAction = _reactcomponents.slot.always(props.primaryAction, {
34
- defaultProps: {
35
- as: dismissOnly ? 'span' : undefined
36
- },
37
- elementType: 'button'
38
- });
39
- const dismissButton = _reactcomponents.slot.always(props.dismissButton, {
40
- defaultProps: {
41
- 'aria-label': 'Remove attachment'
42
- },
43
- elementType: 'button'
44
- });
45
- dismissButton.onClick = (0, _reactcomponents.mergeCallbacks)(dismissButton.onClick, (ev)=>{
46
- onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
47
- content: children,
48
- media,
49
- id: attachmentId
50
- });
51
- });
52
- const media = _reactcomponents.slot.optional(props.media, {
53
- elementType: 'span'
54
- });
55
- const content = _reactcomponents.slot.always(props.content, {
56
- defaultProps: {
57
- children: props.children
58
- },
59
- elementType: 'span'
60
- });
61
- const dismissIcon = _reactcomponents.slot.always(props.dismissIcon, {
62
- defaultProps: {
63
- children: size === 'small' ? /*#__PURE__*/ _react.createElement(_reacticons.Dismiss12Regular, null) : /*#__PURE__*/ _react.createElement(_reacticons.Dismiss20Regular, null)
64
- },
65
- elementType: 'span'
66
- });
67
- const progress = _reactcomponents.slot.optional(props.progress, {
68
- defaultProps: {
69
- shape: 'square',
70
- thickness: 'large',
71
- 'aria-labelledby': props.id
72
- },
73
- elementType: _reactcomponents.ProgressBar
74
- });
75
- const state = {
76
- id: attachmentId,
77
- size,
78
- components: {
79
- root: 'div',
80
- primaryAction: 'button',
81
- dismissButton: 'button',
82
- media: 'span',
83
- content: 'span',
84
- dismissIcon: 'span',
85
- progress: _reactcomponents.ProgressBar
86
- },
87
- root,
88
- primaryAction,
89
- dismissButton,
90
- media,
91
- content,
92
- dismissIcon,
93
- progress,
94
- imageOnly,
95
- isLoading,
96
- shouldUseOverflow,
97
- mode,
98
- designVersion,
99
- dismissOnly
100
- };
101
- if (state.primaryAction.as === 'span') {
102
- state.components.primaryAction = 'span';
103
- }
104
- return state;
105
- };
@@ -1 +0,0 @@
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":["useAttachment_unstable","props","ref","children","imageOnly","size","dismissOnly","onAttachmentDismiss","shouldUseOverflow","useAttachmentListContext_unstable","context","attachmentId","useId","id","isLoading","progress","mode","useCopilotMode","designVersion","useDesignVersion","root","slot","always","getIntrinsicElementProps","elementType","primaryAction","defaultProps","as","undefined","dismissButton","onClick","mergeCallbacks","ev","content","media","optional","dismissIcon","React","createElement","Dismiss12Regular","Dismiss20Regular","shape","thickness","ProgressBar","state","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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