@fluentui-copilot/react-attachments 0.0.0-nightly-20250708-1433-52f2b6b1.1 → 0.0.0-nightly-20250709-0404-150e065c.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 (133) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  3. package/lib/AgentTag.js +1 -0
  4. package/lib/Attachment.js +1 -0
  5. package/lib/AttachmentList.js +1 -0
  6. package/lib/AttachmentOverflowMenu.js +1 -0
  7. package/lib/AttachmentOverflowMenuButton.js +1 -0
  8. package/lib/AttachmentOverflowMenuItem.js +1 -0
  9. package/lib/components/AgentTag/AgentTag.js +5 -4
  10. package/lib/components/AgentTag/AgentTag.types.js +2 -1
  11. package/lib/components/AgentTag/index.js +1 -0
  12. package/lib/components/AgentTag/renderAgentTag.js +5 -3
  13. package/lib/components/AgentTag/useAgentTag.js +9 -7
  14. package/lib/components/Attachment/Attachment.js +6 -5
  15. package/lib/components/Attachment/Attachment.types.js +2 -1
  16. package/lib/components/Attachment/index.js +1 -0
  17. package/lib/components/Attachment/renderAttachment.js +31 -36
  18. package/lib/components/Attachment/useAttachment.js +95 -85
  19. package/lib/components/AttachmentList/AttachmentList.js +7 -6
  20. package/lib/components/AttachmentList/AttachmentList.types.js +2 -1
  21. package/lib/components/AttachmentList/index.js +1 -0
  22. package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
  23. package/lib/components/AttachmentList/useAttachmentList.js +124 -113
  24. package/lib/components/AttachmentList/useAttachmentListContextValues.js +15 -10
  25. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +9 -8
  26. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -1
  27. package/lib/components/AttachmentOverflowMenu/index.js +1 -0
  28. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +13 -8
  29. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +15 -9
  30. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +15 -10
  31. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +6 -5
  32. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +2 -1
  33. package/lib/components/AttachmentOverflowMenuButton/index.js +1 -0
  34. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +10 -11
  35. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +59 -51
  36. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +5 -4
  37. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +2 -1
  38. package/lib/components/AttachmentOverflowMenuItem/index.js +1 -0
  39. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +8 -9
  40. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +49 -41
  41. package/lib/components/index.js +1 -0
  42. package/lib/contexts/attachmentListContext.js +5 -4
  43. package/lib/contexts/attachmentOverflowMenuContext.js +5 -4
  44. package/lib/index.js +1 -0
  45. package/lib-commonjs/AgentTag.js +1 -0
  46. package/lib-commonjs/Attachment.js +1 -0
  47. package/lib-commonjs/AttachmentList.js +1 -0
  48. package/lib-commonjs/AttachmentOverflowMenu.js +1 -0
  49. package/lib-commonjs/AttachmentOverflowMenuButton.js +1 -0
  50. package/lib-commonjs/AttachmentOverflowMenuItem.js +1 -0
  51. package/lib-commonjs/components/AgentTag/AgentTag.js +1 -1
  52. package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -1
  53. package/lib-commonjs/components/AgentTag/AgentTag.types.js +1 -0
  54. package/lib-commonjs/components/AgentTag/index.js +1 -0
  55. package/lib-commonjs/components/AgentTag/renderAgentTag.js +1 -1
  56. package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -1
  57. package/lib-commonjs/components/AgentTag/useAgentTag.js +1 -1
  58. package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -1
  59. package/lib-commonjs/components/Attachment/Attachment.js +1 -1
  60. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  61. package/lib-commonjs/components/Attachment/Attachment.types.js +1 -0
  62. package/lib-commonjs/components/Attachment/index.js +1 -0
  63. package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
  64. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  65. package/lib-commonjs/components/Attachment/useAttachment.js +1 -1
  66. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  67. package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
  68. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  69. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +1 -0
  70. package/lib-commonjs/components/AttachmentList/index.js +1 -0
  71. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
  72. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
  73. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +1 -1
  74. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  75. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
  76. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  77. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
  78. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
  79. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -0
  80. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +1 -0
  81. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
  82. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
  83. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
  84. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
  85. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
  86. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
  87. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
  88. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  89. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -0
  90. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +1 -0
  91. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
  92. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
  93. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
  94. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
  95. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
  96. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  97. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -0
  98. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +1 -0
  99. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
  100. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
  101. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
  102. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  103. package/lib-commonjs/components/index.js +1 -0
  104. package/lib-commonjs/contexts/attachmentListContext.js +1 -1
  105. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
  106. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
  107. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
  108. package/lib-commonjs/index.js +1 -0
  109. package/package.json +4 -4
  110. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +0 -66
  111. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +0 -1
  112. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +0 -317
  113. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +0 -1
  114. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +0 -44
  115. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +0 -1
  116. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +0 -102
  117. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +0 -1
  118. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +0 -57
  119. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +0 -1
  120. package/lib/components/utils/useProgressBarStyles.styles.raw.js +0 -42
  121. package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +0 -1
  122. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +0 -82
  123. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +0 -1
  124. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +0 -336
  125. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +0 -1
  126. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +0 -60
  127. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +0 -1
  128. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +0 -118
  129. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +0 -1
  130. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +0 -73
  131. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +0 -1
  132. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +0 -50
  133. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +0 -1
@@ -11,46 +11,54 @@ import { useDesignVersion } from '@fluentui-copilot/react-provider';
11
11
  *
12
12
  * @param props - props from this instance of AttachmentOverflowMenuItem
13
13
  * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem
14
- */ export const useAttachmentOverflowMenuItem_unstable = (props, ref)=>{
15
- 'use no memo';
16
- const { imageOnly, media } = props;
17
- const menuItemId = useId('attachment-', props.id);
18
- const isVisible = useIsOverflowItemVisible(menuItemId);
19
- const { onAttachmentDismiss } = useAttachmentListContext_unstable((context)=>context);
20
- const designVersion = useDesignVersion(props.designVersion);
21
- const root = slot.always({
22
- ref,
23
- icon: media,
24
- secondaryContent: /*#__PURE__*/ React.createElement(Dismiss20Regular, null),
25
- ...props,
26
- id: menuItemId
27
- }, {
28
- elementType: MenuItem
14
+ */
15
+ export const useAttachmentOverflowMenuItem_unstable = (props, ref) => {
16
+ 'use no memo';
17
+
18
+ const {
19
+ imageOnly,
20
+ media
21
+ } = props;
22
+ const menuItemId = useId('attachment-', props.id);
23
+ const isVisible = useIsOverflowItemVisible(menuItemId);
24
+ const {
25
+ onAttachmentDismiss
26
+ } = useAttachmentListContext_unstable(context => context);
27
+ const designVersion = useDesignVersion(props.designVersion);
28
+ const root = slot.always({
29
+ ref,
30
+ icon: media,
31
+ secondaryContent: /*#__PURE__*/React.createElement(Dismiss20Regular, null),
32
+ ...props,
33
+ id: menuItemId
34
+ }, {
35
+ elementType: MenuItem
36
+ });
37
+ root.onClick = mergeCallbacks(root.onClick, ev => {
38
+ onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
39
+ content: props.children,
40
+ media,
41
+ id: menuItemId
29
42
  });
30
- root.onClick = mergeCallbacks(root.onClick, (ev)=>{
31
- onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
32
- content: props.children,
33
- media,
34
- id: menuItemId
35
- });
36
- });
37
- const progress = slot.optional(props.progress, {
38
- defaultProps: {
39
- shape: 'square',
40
- thickness: 'large',
41
- 'aria-labelledby': props.id
42
- },
43
- elementType: ProgressBar
44
- });
45
- return {
46
- components: {
47
- root: MenuItem,
48
- progress: ProgressBar
49
- },
50
- root,
51
- progress,
52
- isVisible,
53
- imageOnly,
54
- designVersion
55
- };
43
+ });
44
+ const progress = slot.optional(props.progress, {
45
+ defaultProps: {
46
+ shape: 'square',
47
+ thickness: 'large',
48
+ 'aria-labelledby': props.id
49
+ },
50
+ elementType: ProgressBar
51
+ });
52
+ return {
53
+ components: {
54
+ root: MenuItem,
55
+ progress: ProgressBar
56
+ },
57
+ root,
58
+ progress,
59
+ isVisible,
60
+ imageOnly,
61
+ designVersion
62
+ };
56
63
  };
64
+ //# sourceMappingURL=useAttachmentOverflowMenuItem.js.map
@@ -3,3 +3,4 @@ export { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable
3
3
  export { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenuContextValues_unstable, useAttachmentOverflowMenu_unstable } from './AttachmentOverflowMenu';
4
4
  export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';
5
5
  export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';
6
+ //# sourceMappingURL=index.js.map
@@ -1,9 +1,10 @@
1
1
  import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
2
  export const AttachmentListContext = createContext(undefined);
3
3
  const attachmentListContextDefaultValue = {
4
- onAttachmentDismiss: ()=>null,
5
- shouldUseOverflow: false,
6
- numberOfAttachments: 0
4
+ onAttachmentDismiss: () => null,
5
+ shouldUseOverflow: false,
6
+ numberOfAttachments: 0
7
7
  };
8
8
  export const AttachmentListProvider = AttachmentListContext.Provider;
9
- export const useAttachmentListContext_unstable = (selector)=>useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue)=>selector(ctx));
9
+ export const useAttachmentListContext_unstable = selector => useContextSelector(AttachmentListContext, (ctx = attachmentListContextDefaultValue) => selector(ctx));
10
+ //# sourceMappingURL=attachmentListContext.js.map
@@ -1,9 +1,10 @@
1
1
  import { createContext, useContextSelector } from '@fluentui/react-context-selector';
2
2
  export const AttachmentOverflowMenuContext = createContext(undefined);
3
3
  const overflowMenuContextDefaultValue = {
4
- isOverflowing: false,
5
- overflowButtonRef: undefined,
6
- overflowCount: 0
4
+ isOverflowing: false,
5
+ overflowButtonRef: undefined,
6
+ overflowCount: 0
7
7
  };
8
8
  export const AttachmentOverflowMenuProvider = AttachmentOverflowMenuContext.Provider;
9
- export const useAttachmentOverflowMenuContext_unstable = (selector)=>useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue)=>selector(ctx));
9
+ export const useAttachmentOverflowMenuContext_unstable = selector => useContextSelector(AttachmentOverflowMenuContext, (ctx = overflowMenuContextDefaultValue) => selector(ctx));
10
+ //# sourceMappingURL=attachmentOverflowMenuContext.js.map
package/lib/index.js CHANGED
@@ -6,3 +6,4 @@ export { AttachmentOverflowMenuContext, AttachmentOverflowMenuProvider, useAttac
6
6
  export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';
7
7
  export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';
8
8
  export { AgentTag, renderAgentTag_unstable, useAgentTag_unstable, agentTagClassNames, useAgentTagStyles_unstable } from './AgentTag';
9
+ //# sourceMappingURL=index.js.map
@@ -26,3 +26,4 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _index = require("./components/AgentTag/index");
29
+ //# sourceMappingURL=AgentTag.js.map
@@ -29,3 +29,4 @@ _export(exports, {
29
29
  }
30
30
  });
31
31
  const _index = require("./components/Attachment/index");
32
+ //# sourceMappingURL=Attachment.js.map
@@ -26,3 +26,4 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _index = require("./components/AttachmentList/index");
29
+ //# sourceMappingURL=AttachmentList.js.map
@@ -23,3 +23,4 @@ _export(exports, {
23
23
  }
24
24
  });
25
25
  const _index = require("./components/AttachmentOverflowMenu/index");
26
+ //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -26,3 +26,4 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _index = require("./components/AttachmentOverflowMenuButton/index");
29
+ //# sourceMappingURL=AttachmentOverflowMenuButton.js.map
@@ -26,3 +26,4 @@ _export(exports, {
26
26
  }
27
27
  });
28
28
  const _index = require("./components/AttachmentOverflowMenuItem/index");
29
+ //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
@@ -18,4 +18,4 @@ const AgentTag = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
18
18
  (0, _useAgentTagStylesstyles.useAgentTagStyles_unstable)(state);
19
19
  return (0, _renderAgentTag.renderAgentTag_unstable)(state);
20
20
  });
21
- AgentTag.displayName = 'AgentTag';
21
+ AgentTag.displayName = 'AgentTag'; //# sourceMappingURL=AgentTag.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["AgentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAgentTag_unstable } from './useAgentTag';\nimport { renderAgentTag_unstable } from './renderAgentTag';\nimport { useAgentTagStyles_unstable } from './useAgentTagStyles.styles';\nimport type { AgentTagProps } from './AgentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// AgentTag component - TODO: add more docs\nexport const AgentTag: ForwardRefComponent<AgentTagProps> = React.forwardRef((props, ref) => {\n const state = useAgentTag_unstable(props, ref);\n\n useAgentTagStyles_unstable(state);\n return renderAgentTag_unstable(state);\n});\n\nAgentTag.displayName = 'AgentTag';\n"],"names":["AgentTag","React","forwardRef","props","ref","state","useAgentTag_unstable","useAgentTagStyles_unstable","renderAgentTag_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;6BACc;gCACG;yCACG;AAKpC,MAAMA,WAAAA,WAAAA,GAA+CC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQC,IAAAA,iCAAAA,EAAqBH,OAAOC;IAE1CG,IAAAA,mDAAAA,EAA2BF;IAC3B,OAAOG,IAAAA,uCAAAA,EAAwBH;AACjC;AAEAL,SAASS,WAAW,GAAG"}
1
+ {"version":3,"sources":["AgentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAgentTag_unstable } from './useAgentTag';\nimport { renderAgentTag_unstable } from './renderAgentTag';\nimport { useAgentTagStyles_unstable } from './useAgentTagStyles.styles';\nimport type { AgentTagProps } from './AgentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// AgentTag component - TODO: add more docs\nexport const AgentTag: ForwardRefComponent<AgentTagProps> = React.forwardRef((props, ref) => {\n const state = useAgentTag_unstable(props, ref);\n\n useAgentTagStyles_unstable(state);\n return renderAgentTag_unstable(state);\n});\n\nAgentTag.displayName = 'AgentTag';\n"],"names":["AgentTag","React","forwardRef","props","state","useAgentTag_unstable","useAgentTagStyles_unstable","renderAgentTag_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;6BACc;gCACG;yCACG;AAKpC,MAAMA,WAAAA,WAAAA,GAAAA,OAA+CC,UAAMC,CAAU,CAACC,OAACA;UAC5EC,QAAMA,IAAAA,iCAAQC,EAAAA,OAAqBF;2DAEnCG,EAAAA;WACAC,IAAAA,uCAAOA,EAAAA;AACT;AAEAP,SAASQ,WAAW,GAAG"}
@@ -4,3 +4,4 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ //# sourceMappingURL=AgentTag.types.js.map
@@ -29,3 +29,4 @@ const _AgentTag = require("./AgentTag");
29
29
  const _renderAgentTag = require("./renderAgentTag");
30
30
  const _useAgentTag = require("./useAgentTag");
31
31
  const _useAgentTagStylesstyles = require("./useAgentTagStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -11,4 +11,4 @@ Object.defineProperty(exports, "renderAgentTag_unstable", {
11
11
  const _Attachment = require("../Attachment");
12
12
  const renderAgentTag_unstable = (state)=>{
13
13
  return (0, _Attachment.renderAttachment_unstable)(state);
14
- };
14
+ }; //# sourceMappingURL=renderAgentTag.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAgentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { renderAttachment_unstable } from '../Attachment';\nimport type { AgentTagState } from './AgentTag.types';\n\n/**\n * Render the final JSX of AgentTag\n */\nexport const renderAgentTag_unstable = (state: AgentTagState) => {\n return renderAttachment_unstable(state);\n};\n"],"names":["renderAgentTag_unstable","state","renderAttachment_unstable"],"rangeMappings":";;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;AAQO,MAAMA,0BAA0B,CAACC;IACtC,OAAOC,IAAAA,qCAAAA,EAA0BD;AACnC"}
1
+ {"version":3,"sources":["renderAgentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { renderAttachment_unstable } from '../Attachment';\nimport type { AgentTagState } from './AgentTag.types';\n\n/**\n * Render the final JSX of AgentTag\n */\nexport const renderAgentTag_unstable = (state: AgentTagState) => {\n return renderAttachment_unstable(state);\n};\n"],"names":["renderAttachment_unstable","state"],"rangeMappings":";;;;;;;;;;;;","mappings":";;;;+BAUSA;;;eAAAA;;;4BATT;AASE,MAAOA,0BAA0BC,CAAAA;IACjC,OAAAD,IAAAA,qCAAA,EAAAC"}
@@ -16,4 +16,4 @@ const useAgentTag_unstable = (props, ref)=>{
16
16
  designVersion: 'next'
17
17
  }, ref);
18
18
  return state;
19
- };
19
+ }; //# sourceMappingURL=useAgentTag.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAgentTag.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { AgentTagProps, AgentTagState } from './AgentTag.types';\nimport { useAttachment_unstable } from '..';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render AgentTag.\n *\n * The returned state can be modified with hooks such as useAgentTagStyles_unstable,\n * before being passed to renderAgentTag_unstable.\n *\n * @param props - props from this instance of AgentTag\n * @param ref - reference to root HTMLElement of AgentTag\n */\nexport const useAgentTag_unstable = (props: AgentTagProps, ref: React.Ref<HTMLDivElement>): AgentTagState => {\n const state = useAttachment_unstable({ ...props, dismissOnly: true, designVersion: 'next' }, ref);\n\n return state;\n};\n"],"names":["useAgentTag_unstable","props","ref","state","useAttachment_unstable","dismissOnly","designVersion"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;kBAb0B;AAahC,MAAMA,uBAAuB,CAACC,OAAsBC;IACzD,MAAMC,QAAQC,IAAAA,wBAAAA,EAAuB;QAAE,GAAGH,KAAK;QAAEI,aAAa;QAAMC,eAAe;IAAO,GAAGJ;IAE7F,OAAOC;AACT"}
1
+ {"version":3,"sources":["useAgentTag.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { AgentTagProps, AgentTagState } from './AgentTag.types';\nimport { useAttachment_unstable } from '..';\n\n// If you add JSX to this file, be sure to change the file type to .tsx\n\n/**\n * Create the state required to render AgentTag.\n *\n * The returned state can be modified with hooks such as useAgentTagStyles_unstable,\n * before being passed to renderAgentTag_unstable.\n *\n * @param props - props from this instance of AgentTag\n * @param ref - reference to root HTMLElement of AgentTag\n */\nexport const useAgentTag_unstable = (props: AgentTagProps, ref: React.Ref<HTMLDivElement>): AgentTagState => {\n const state = useAttachment_unstable({ ...props, dismissOnly: true, designVersion: 'next' }, ref);\n\n return state;\n};\n"],"names":["state","useAttachment_unstable","ref","dismissOnly","designVersion"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBQA;;;eAAAA;;;kBAd+B;AAcrC,MAAMA,uBAAQC,CAAAA,OAAuBC;UAAEF,QAAQC,IAAAA,wBAAA,EAAA;gBAAEE;qBAAmBC;QAAsBA,eAAGF;OAE7FA;IACA,OAAAF"}
@@ -20,4 +20,4 @@ const Attachment = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
20
20
  (0, _reactprovider.useCustomStyleHook)('useAttachmentStyles')(state);
21
21
  return (0, _renderAttachment.renderAttachment_unstable)(state);
22
22
  });
23
- Attachment.displayName = 'Attachment';
23
+ Attachment.displayName = 'Attachment'; //# sourceMappingURL=Attachment.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachment_unstable } from './useAttachment';\nimport { renderAttachment_unstable } from './renderAttachment';\nimport { useAttachmentStyles_unstable } from './useAttachmentStyles.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":["Attachment","React","forwardRef","props","ref","state","useAttachment_unstable","useAttachmentStyles_unstable","useCustomStyleHook","renderAttachment_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;+BACgB;kCACG;2CACG;+BAGV;AAG5B,MAAMA,aAAAA,WAAAA,GAAmDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQC,IAAAA,qCAAAA,EAAuBH,OAAOC;IAE5CG,IAAAA,uDAAAA,EAA6BF;IAC7BG,IAAAA,iCAAAA,EAAmB,uBAAuBH;IAE1C,OAAOI,IAAAA,2CAAAA,EAA0BJ;AACnC;AAEAL,WAAWU,WAAW,GAAG"}
1
+ {"version":3,"sources":["Attachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachment_unstable } from './useAttachment';\nimport { renderAttachment_unstable } from './renderAttachment';\nimport { useAttachmentStyles_unstable } from './useAttachmentStyles.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":["Attachment","React","forwardRef","props","state","useAttachment_unstable","useAttachmentStyles_unstable","useCustomStyleHook","renderAttachment_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;+BACgB;kCACG;2CACG;+BAGV;AAG5B,MAAMA,aAAAA,WAAAA,GAAAA,OAAmDC,UAAMC,CAAU,CAACC,OAACA;UAChFC,QAAMA,IAAAA,qCAAQC,EAAAA,OAAuBF;+DAErCG,EAAAA;yCACAC,EAAAA,uBAAmBH;WAEnBI,IAAAA,2CAAOA,EAAAA;AACT;AAEAR,WAAWS,WAAW,GAAG"}
@@ -4,3 +4,4 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
+ //# sourceMappingURL=Attachment.types.js.map
@@ -32,3 +32,4 @@ const _Attachment = require("./Attachment");
32
32
  const _renderAttachment = require("./renderAttachment");
33
33
  const _useAttachment = require("./useAttachment");
34
34
  const _useAttachmentStylesstyles = require("./useAttachmentStyles.styles");
35
+ //# sourceMappingURL=index.js.map
@@ -47,4 +47,4 @@ const renderDismissOnly = (state)=>{
47
47
  ]
48
48
  })
49
49
  });
50
- };
50
+ }; //# sourceMappingURL=renderAttachment.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { OverflowItem, assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n 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
+ {"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":["id","designVersion","attachment","state","renderAttachment","assertSlots","progress","root","dismissButton","_jsx","dismissIcon","renderDismissOnly","children","_jsxs","media","content"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAUUA;;;eAAAA;;;4BATV;iCAE0C;AAOxC,MAAQA,4BAAuBC,CAAAA;UAE/B,EAEAD,EAAA,mBACoBA,4BAIlBE,EAEF,GAAAC;IAEF,MAAMC,aAAAA,kBAAoBD,UAAAA,cAAAA,kBAAAA,SAAAA,iBAAAA;WACxBE,oBAA6BF,WAAAA,GAAAA,IAAAA,eAAAA,EAAAA,6BAAAA,EAAAA;QAE7BH,IAAAA;;;;yBAGOG,CAAAA;;sBAEAA,GAAAA,IAAAA,gBAAMG,EAAAA,MAAQC,IAAA,EAAA;;;;;;;;;+CAEjBJ,MAACA,aAAMK,EAAAA;qCACL,GAAAC,IAAAA,eAAA,EAAAN,MAAAO,WAAOA,EAAAA,CAAAA;;;;;AAIf,MAAAC,oBAAAR,CAAAA;IAEAE,IAAAA,4BAAMM,EAAAA;WACJN,WAA6BF,GAAAA,IAAAA,eAAAA,EAAAA,MAAAA,IAAAA,EAAAA;QAE7BS,UAAA,WACE,GAAAC,IAAAA,gBAACV,EAAAA,MAAMI,aAAI,EAAA;;sBACTO,KAAA,IAAA,CAAAX,MAACA,SAAMK,IAAAA,WAAa,GAAAC,IAAAA,eAAA,EAAAN,MAAAW,KAAA,EAAA,CAAA;gBAAA,WAAA,GAAAL,IAAAA,eAAA,EAAAN,MAAAY,OAAA,EAAA,CAAA;gBAAAZ,MAAAG,QAAA,IAAA,WAAA,GAAAG,IAAAA,eAAA,EAAAN,MAAAG,QAAA,EAAA,CAAA;gBAAA,WAAA,GAAAG,IAAAA,eAAA,EAAAN,MAAAO,WAAA,EAAA,CAAA;aAAA;;;+CAGH"}
@@ -100,4 +100,4 @@ const useAttachment_unstable = (props, ref)=>{
100
100
  state.components.primaryAction = 'span';
101
101
  }
102
102
  return state;
103
- };
103
+ }; //# sourceMappingURL=useAttachment.js.map
@@ -1 +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('div', {\n ref,\n ...props,\n id: attachmentId,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;i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AACrB,MAAMgC,OAAO,EAAE;QACzCP,cAAc;YACZvB,UAAUF,MAAME,QAAQ;QAC1B;QACAqB,aAAa;IACf;IAEA,MAAMY,cAAcf,qBAAAA,CAAKC,MAAM,CAACrB,MAAMmC,WAAW,EAAE;QACjDV,cAAc;YACZvB,UAAUE,SAAS,UAAA,WAAA,GAAUgC,OAAAC,aAAA,CAACC,4BAAAA,EAAAA,QAAAA,WAAAA,GAAsBF,OAAAC,aAAA,CAACE,4BAAAA,EAAAA;QACvD;QACAhB,aAAa;IACf;IAEA,MAAMT,WAAWM,qBAAAA,CAAKc,QAAQ,CAAClC,MAAMc,QAAQ,EAAE;QAC7CW,cAAc;YACZe,OAAO;YACPC,WAAW;YACX,mBAAmBzC,MAAMY,EAAE;QAC7B;QACAW,aAAamB,4BAAAA;IACf;IAEA,MAAMC,QAAyB;QAC7B/B,IAAIF;QACJN;QACAwC,YAAY;YACVzB,MAAM;YACNK,eAAe;YACfI,eAAe;YACfK,OAAO;YACPD,SAAS;YACTG,aAAa;YACbrB,UAAU4B,4BAAAA;QACZ;QAEAvB;QACAK;QACAI;QACAK;QACAD;QACAG;QACArB;QACAX;QACAU;QACAN;QACAQ;QACAE;QACAZ;IACF;IAEA,IAAIsC,MAAMnB,aAAa,CAACE,EAAE,KAAK,QAAQ;QACrCiB,MAAMC,UAAU,CAACpB,aAAa,GAAG;IACnC;IAEA,OAAOmB;AACT"}
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('div', {\n ref,\n ...props,\n id: attachmentId,\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":["children","size","ref","attachmentId","imageOnly","isLoading","mode","useCopilotMode","dismissOnly","designVersion","props","useAttachmentListContext_unstable","context","elementType","useId","id","progress","primaryAction","slot","always","defaultProps","useDesignVersion","as","undefined","dismissButton","onAttachmentDismiss","media","onClick","mergeCallbacks","ev","dismissIcon","content","thickness","React","createElement","Dismiss12Regular","Dismiss20Regular","components","root","shouldUseOverflow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiBUA;;;eAAAA;;;;iEAjBa;iCAC4D;4BAChC;uCACD;+BAED;AAY/C,MAAQA,yBAAqBC,CAAAA,OAAOC;UACpC,EACAF,QAAMG,EACNC,SAAMC,EAENJ,OAAMK,QAAOC,EACbC,cAAMC,KAAAA,KAENC;UAEIR,qBACQ,mBACJC,KACNQ,IAAAA,wDACA,EAAAC,CAAAA,UAAAA;UAAEC,eAAaC,IAAAA,sBAAA,EAAA,eAAAJ,MAAAK,EAAA;UAAMV,YAAA,CAAA,CAAAK,MAAAM,QAAA;UAGvBV,OAAMW,IAAAA,6BAAgBC,EAAAA,MAAKC,IAAOT;UAChCU,gBAAcC,IAAAA,+BAAA,EAAAX,MAAAD,aAAA;iBAAEa,qBAAId,CAAAA,MAAAA,CAAAA,IAAAA,yCAAuBe,EAAAA,OAAAA;;gBAC3CV;QACFE,IAAAZ;QAEA;qBACEiB;;UAAkDH,gBAAAC,qBAAA,CAAAC,MAAA,CAAAT,MAAAO,aAAA,EAAA;sBAClDJ;YACFS,IAAAd,cAAA,SAAAe;QAEAC;qBAGIC;;0BAA+CC,qBAAAA,CAAAA,MAAAA,CAAAA,MAAAA,aAAAA,EAAAA;sBAAWvB;0BAAa;QACzE;QAGFU,aAAMa;;kBAAyDC,OAAA,GAAAC,IAAAA,+BAAA,EAAAJ,cAAAG,OAAA,EAAAE,CAAAA;QAE/DJ,wBAAqBN,QAAOT,wBAAe,KAAA,IAAA,KAAA,IAAAe,oBAAAI,IAAA;qBACzCT;;gBAEAjB;;;UAIFuB,QAAMI,qBAAAA,CAAAA,QAAmBX,CAAAA,MAAOT,KAAAA,EAAMoB;qBACpCV;;UAEAW,UAAAb,qBAAA,CAAAC,MAAA,CAAAT,MAAAqB,OAAA,EAAA;sBACAlB;YACFb,UAAAU,MAAAV,QAAA;QAEA;qBACEoB;;wBAEEY,qBAAW,CAAAb,MAAA,CAAAT,MAAAoB,WAAA,EAAA;sBACX;sBACF7B,SAAA,UAAA,WAAA,GAAAgC,OAAAC,aAAA,CAAAC,4BAAA,EAAA,QAAA,WAAA,GAAAF,OAAAC,aAAA,CAAAE,4BAAA,EAAA;;QAEFvB,aAAA;;UAGEE,WAAIZ,qBAAAA,CAAAA,QAAAA,CAAAA,MAAAA,QAAAA,EAAAA;sBACJF;mBACAoC;uBACEC;+BACArB,MAAeF,EAAA;;qBAEfW,4BAAO;;kBAEPI;;;oBAIFQ;kBACArB;2BACAO;2BACAE;mBACAK;qBACAD;yBACAd;sBACAZ,4BAAAA;;;;;;QAMF2B;QAEAD;;QAEA1B;QAEAC;QACAkC"}
@@ -22,4 +22,4 @@ const AttachmentList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
22
22
  (0, _reactprovider.useCustomStyleHook)('useAttachmentListStyles')(state);
23
23
  return (0, _renderAttachmentList.renderAttachmentList_unstable)(state, contextValues);
24
24
  });
25
- AttachmentList.displayName = 'AttachmentList';
25
+ AttachmentList.displayName = 'AttachmentList'; //# sourceMappingURL=AttachmentList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentList_unstable } from './useAttachmentList';\nimport { renderAttachmentList_unstable } from './renderAttachmentList';\nimport { useAttachmentListStyles_unstable } from './useAttachmentListStyles.styles';\nimport { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';\nimport type { AttachmentListProps } from './AttachmentList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\nexport const AttachmentList: ForwardRefComponent<AttachmentListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentList_unstable(props, ref);\n const contextValues = useAttachmentListContextValues_unstable(state);\n\n useAttachmentListStyles_unstable(state);\n useCustomStyleHook('useAttachmentListStyles')(state);\n\n return renderAttachmentList_unstable(state, contextValues);\n});\n\nAttachmentList.displayName = 'AttachmentList';\n"],"names":["AttachmentList","React","forwardRef","props","ref","state","useAttachmentList_unstable","contextValues","useAttachmentListContextValues_unstable","useAttachmentListStyles_unstable","useCustomStyleHook","renderAttachmentList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;mCACoB;sCACG;+CACG;gDACO;+BAGrB;AAE5B,MAAMA,iBAAAA,WAAAA,GAA2DC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQC,IAAAA,6CAAAA,EAA2BH,OAAOC;IAChD,MAAMG,gBAAgBC,IAAAA,uEAAAA,EAAwCH;IAE9DI,IAAAA,+DAAAA,EAAiCJ;IACjCK,IAAAA,iCAAAA,EAAmB,2BAA2BL;IAE9C,OAAOM,IAAAA,mDAAAA,EAA8BN,OAAOE;AAC9C;AAEAP,eAAeY,WAAW,GAAG"}
1
+ {"version":3,"sources":["AttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentList_unstable } from './useAttachmentList';\nimport { renderAttachmentList_unstable } from './renderAttachmentList';\nimport { useAttachmentListStyles_unstable } from './useAttachmentListStyles.styles';\nimport { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';\nimport type { AttachmentListProps } from './AttachmentList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\nexport const AttachmentList: ForwardRefComponent<AttachmentListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentList_unstable(props, ref);\n const contextValues = useAttachmentListContextValues_unstable(state);\n\n useAttachmentListStyles_unstable(state);\n useCustomStyleHook('useAttachmentListStyles')(state);\n\n return renderAttachmentList_unstable(state, contextValues);\n});\n\nAttachmentList.displayName = 'AttachmentList';\n"],"names":["AttachmentList","React","forwardRef","props","state","useAttachmentList_unstable","contextValues","useAttachmentListContextValues_unstable","useAttachmentListStyles_unstable","useCustomStyleHook","renderAttachmentList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;mCACoB;sCACG;+CACG;gDACO;+BAGrB;AAE5B,MAAMA,iBAAAA,WAAAA,GAAAA,OAA2DC,UAAMC,CAAU,CAACC,OAACA;UACxFC,QAAMA,IAAAA,6CAAQC,EAAAA,OAA2BF;UACzCG,gBAAMA,IAAAA,uEAAgBC,EAAAA;uEAEtBC,EAAAA;yCACAC,EAAAA,2BAAmBL;WAEnBM,IAAAA,mDAAOA,EAAAA,OAA8BN;AACvC;AAEAJ,eAAeW,WAAW,GAAG"}
@@ -2,3 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
+ //# sourceMappingURL=AttachmentList.types.js.map
@@ -29,3 +29,4 @@ const _AttachmentList = require("./AttachmentList");
29
29
  const _renderAttachmentList = require("./renderAttachmentList");
30
30
  const _useAttachmentList = require("./useAttachmentList");
31
31
  const _useAttachmentListStylesstyles = require("./useAttachmentListStyles.styles");
32
+ //# sourceMappingURL=index.js.map
@@ -36,4 +36,4 @@ const renderAttachmentList_unstable = (state, contextValues)=>{
36
36
  })
37
37
  }) : /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {})
38
38
  });
39
- };
39
+ }; //# sourceMappingURL=renderAttachmentList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachmentList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Overflow, assertSlots } from '@fluentui/react-components';\nimport { AttachmentListProvider } from '../../contexts/attachmentListContext';\nimport { AttachmentOverflowMenu } from '../AttachmentOverflowMenu';\nimport type { AttachmentListState, AttachmentListSlots, AttachmentListContextValues } from './AttachmentList.types';\n\n/**\n * Render the final JSX of AttachmentList\n */\nexport const renderAttachmentList_unstable = (\n state: AttachmentListState,\n contextValues: AttachmentListContextValues,\n) => {\n assertSlots<AttachmentListSlots>(state);\n const { overflowMenuProps, root, shouldUseOverflow } = state;\n\n return (\n <AttachmentListProvider value={contextValues.attachmentList}>\n {shouldUseOverflow && state.overflowMenuButton && state.menuList && state.menuPopover ? (\n <Overflow ref={root.ref}>\n <state.root>\n {root.children}\n <AttachmentOverflowMenu positioning={'above'} {...overflowMenuProps}>\n <state.overflowMenuButton />\n <state.menuPopover>\n <state.menuList />\n </state.menuPopover>\n </AttachmentOverflowMenu>\n </state.root>\n </Overflow>\n ) : (\n <state.root />\n )}\n </AttachmentListProvider>\n );\n};\n"],"names":["renderAttachmentList_unstable","state","contextValues","assertSlots","overflowMenuProps","root","shouldUseOverflow","_jsx","AttachmentListProvider","value","attachmentList","overflowMenuButton","menuList","menuPopover","Overflow","ref","_jsxs","children","AttachmentOverflowMenu","positioning"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;4BAVb;iCAEsC;uCACC;wCACA;AAMhC,MAAMA,gCAAgC,CAC3CC,OACAC;IAEAC,IAAAA,4BAAAA,EAAiCF;IACjC,MAAM,EAAEG,iBAAiB,EAAEC,IAAI,EAAEC,iBAAiB,EAAE,GAAGL;IAEvD,OAAA,WAAA,GACEM,IAAAA,eAAA,EAACC,6CAAAA,EAAAA;QAAuBC,OAAOP,cAAcQ,cAAc;kBACxDJ,qBAAqBL,MAAMU,kBAAkB,IAAIV,MAAMW,QAAQ,IAAIX,MAAMY,WAAW,GAAA,WAAA,GACnFN,IAAAA,eAAA,EAACO,yBAAAA,EAAAA;YAASC,KAAKV,KAAKU,GAAG;sBACrB,WAAA,GAAAC,IAAAA,gBAAA,EAACf,MAAMI,IAAI,EAAA;;oBACRA,KAAKY,QAAQ;kCACdD,IAAAA,gBAAA,EAACE,8CAAAA,EAAAA;wBAAuBC,aAAa;wBAAU,GAAGf,iBAAiB;;0CACjEG,IAAAA,eAAA,EAACN,MAAMU,kBAAkB,EAAA,CAAA;0CACzBJ,IAAAA,eAAA,EAACN,MAAMY,WAAW,EAAA;0CAChB,WAAA,GAAAN,IAAAA,eAAA,EAACN,MAAMW,QAAQ,EAAA,CAAA;;;;;;2BAMvBL,IAAAA,eAAA,EAACN,MAAMI,IAAI,EAAA,CAAA;;AAInB"}
1
+ {"version":3,"sources":["renderAttachmentList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Overflow, assertSlots } from '@fluentui/react-components';\nimport { AttachmentListProvider } from '../../contexts/attachmentListContext';\nimport { AttachmentOverflowMenu } from '../AttachmentOverflowMenu';\nimport type { AttachmentListState, AttachmentListSlots, AttachmentListContextValues } from './AttachmentList.types';\n\n/**\n * Render the final JSX of AttachmentList\n */\nexport const renderAttachmentList_unstable = (\n state: AttachmentListState,\n contextValues: AttachmentListContextValues,\n) => {\n assertSlots<AttachmentListSlots>(state);\n const { overflowMenuProps, root, shouldUseOverflow } = state;\n\n return (\n <AttachmentListProvider value={contextValues.attachmentList}>\n {shouldUseOverflow && state.overflowMenuButton && state.menuList && state.menuPopover ? (\n <Overflow ref={root.ref}>\n <state.root>\n {root.children}\n <AttachmentOverflowMenu positioning={'above'} {...overflowMenuProps}>\n <state.overflowMenuButton />\n <state.menuPopover>\n <state.menuList />\n </state.menuPopover>\n </AttachmentOverflowMenu>\n </state.root>\n </Overflow>\n ) : (\n <state.root />\n )}\n </AttachmentListProvider>\n );\n};\n"],"names":["assertSlots","state","overflowMenuProps","contextValues","root","children","AttachmentOverflowMenu","overflowMenuButton","menuList","_jsx","menuPopover"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeEA;;;eAAAA;;;4BAdF;iCAEsC;uCACC;wCACA;AAUrCA,MAAAA,gCAAiCC,CAAAA,OAAAA;oCACzBC,EAAAA;UAER,mBACiCC,yBAEZC;;6BAELC,cAAQ;uCACdJ,MAACK,kBAAAA,IAAAA,MAAAA,QAAAA,IAAAA,MAAAA,WAAAA,GAAAA,WAAAA,GAAAA,IAAAA,eAAAA,EAAAA,yBAAAA,EAAAA;;iCAAiDJ,GAAAA,IAAAA,gBAAAA,EAAAA,MAAAA,IAAiB,EAAA;;;;;;;qEAG/DK,kBAACN,EAAAA,CAAAA;4BAAMO,WAAQ,GAAAC,IAAAA,eAAA,EAAAR,MAAAS,WAAA,EAAA;;;;;;;;;GAU/B,gDAAE"}
@@ -134,4 +134,4 @@ const useAttachmentList_unstable = (props, ref)=>{
134
134
  renderByDefault: true
135
135
  })
136
136
  };
137
- };
137
+ }; //# sourceMappingURL=useAttachmentList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuList,\n MenuPopover,\n getIntrinsicElementProps,\n slot,\n useArrowNavigationGroup,\n useEventCallback,\n useFocusFinders,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useTimeout } from '@fluentui/react-utilities';\nimport { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';\nimport { useOverflowStyles } from '../Attachment';\nimport { AttachmentOverflowMenuButton } from '../AttachmentOverflowMenuButton';\nimport { attachmentOverflowMenuButtonClassNames } from '../AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles';\nimport { AttachmentOverflowMenuItem } from '../AttachmentOverflowMenuItem';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport type { AttachmentListProps, AttachmentListState } from './AttachmentList.types';\nimport type { AttachmentProps } from '../Attachment/Attachment.types';\n\n/**\n * Create the state required to render AttachmentList.\n *\n * The returned state can be modified with hooks such as useAttachmentListStyles_unstable,\n * before being passed to renderAttachmentList_unstable.\n *\n * @param props - props from this instance of AttachmentList\n * @param ref - reference to root HTMLElement of AttachmentList\n */\nexport const useAttachmentList_unstable = (\n props: AttachmentListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentListState => {\n const { children, maxVisibleAttachments, onAttachmentDismiss, overflowMenuProps } = props;\n const innerRef = React.useRef<HTMLDivElement>(null);\n const [setTimeout] = useTimeout();\n const { targetDocument } = useFluent();\n\n const designVersion = useDesignVersion(props.designVersion);\n const { findNextFocusable, findPrevFocusable, findLastFocusable } = useFocusFinders();\n const handleAttachmentDismiss: AttachmentListState['onAttachmentDismiss'] = useEventCallback((e, data) => {\n if (!onAttachmentDismiss) {\n return;\n }\n\n onAttachmentDismiss(e, data);\n\n // set focus after attachment dismiss\n const activeElement = targetDocument?.activeElement;\n if (innerRef.current?.contains(activeElement as HTMLElement)) {\n // focus on next attachment only if the active element is within the current attachment list\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n if (next) {\n // focus on the overflow button if the next focusable element is the overflow button.\n // if overflow button is removed from the DOM, focus on the last focusable element in the attachment list.\n if (next.classList.contains(attachmentOverflowMenuButtonClassNames.root)) {\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n } else {\n next.focus();\n }\n } else {\n const prev = findPrevFocusable(activeElement?.parentElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n } else {\n // Handles keyboard focus when attachment removed is in the overflow menu. Also handles focus when the overflow button is removed from the DOM.\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n }\n });\n\n const styles = useOverflowStyles();\n const resolvedChildren = useOverflowMaxVisibleItems({\n children,\n maxVisibleItems: maxVisibleAttachments,\n overflowClassName: styles.overflow,\n });\n\n const attachmentOverflowMenuItems = React.useMemo(() => {\n if (resolvedChildren && Array.isArray(resolvedChildren)) {\n return resolvedChildren\n .filter(child => React.isValidElement(child))\n .map(child => (child as React.ReactElement).props)\n .map((attachment: AttachmentProps) => {\n const dismissButton = slot.optional(attachment.dismissButton, { elementType: 'button' });\n return (\n <AttachmentOverflowMenuItem\n {...attachment}\n key={attachment.id}\n onClick={dismissButton?.onClick as AttachmentProps['onClick']}\n />\n );\n });\n }\n return [];\n }, [resolvedChildren]);\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n memorizeCurrent: true,\n });\n\n const shouldUseOverflow = maxVisibleAttachments !== undefined;\n\n return {\n designVersion,\n onAttachmentDismiss: handleAttachmentDismiss,\n shouldUseOverflow,\n numberOfAttachments: resolvedChildren.length,\n overflowMenuProps,\n components: {\n root: 'div',\n menuList: MenuList,\n menuPopover: MenuPopover,\n overflowMenuButton: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref: useMergedRefs(ref, innerRef),\n role: 'toolbar',\n ...arrowNavigationProps,\n ...props,\n children: resolvedChildren,\n }),\n { elementType: 'div' },\n ),\n menuList: slot.optional(props.menuList, {\n defaultProps: { children: attachmentOverflowMenuItems },\n elementType: MenuList,\n renderByDefault: true,\n }),\n menuPopover: slot.optional(props.menuPopover, { elementType: MenuPopover, renderByDefault: true }),\n overflowMenuButton: slot.optional(props.overflowMenuButton, {\n defaultProps: { children: <AttachmentOverflowMenuButton /> },\n elementType: 'span',\n renderByDefault: true,\n }),\n };\n};\n"],"names":["useAttachmentList_unstable","props","ref","children","maxVisibleAttachments","onAttachmentDismiss","overflowMenuProps","innerRef","React","useRef","setTimeout","useTimeout","targetDocument","useFluent","designVersion","useDesignVersion","findNextFocusable","findPrevFocusable","findLastFocusable","useFocusFinders","handleAttachmentDismiss","useEventCallback","e","data","activeElement","current","contains","next","container","classList","attachmentOverflowMenuButtonClassNames","root","focus","prev","parentElement","styles","useOverflowStyles","resolvedChildren","useOverflowMaxVisibleItems","maxVisibleItems","overflowClassName","overflow","attachmentOverflowMenuItems","useMemo","Array","isArray","filter","child","isValidElement","map","attachment","dismissButton","slot","optional","elementType","createElement","AttachmentOverflowMenuItem","key","id","onClick","arrowNavigationProps","useArrowNavigationGroup","circular","axis","memorizeCurrent","shouldUseOverflow","undefined","numberOfAttachments","length","components","menuList","MenuList","menuPopover","MenuPopover","overflowMenuButton","always","getIntrinsicElementProps","useMergedRefs","role","defaultProps","renderByDefault","AttachmentOverflowMenuButton"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BA+BaA;;;eAAAA;;;;iEA/BU;iCAUhB;qCACyC;gCACrB;iCACgB;4BACT;8CACW;6DACU;4CACZ;+BACV;AAa1B,MAAMA,6BAA6B,CACxCC,OACAC;IAEA,MAAM,EAAEC,QAAQ,EAAEC,qBAAqB,EAAEC,mBAAmB,EAAEC,iBAAiB,EAAE,GAAGL;IACpF,MAAMM,WAAWC,OAAMC,MAAM,CAAiB;IAC9C,MAAM,CAACC,WAAW,GAAGC,IAAAA,0BAAAA;IACrB,MAAM,EAAEC,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAE3B,MAAMC,gBAAgBC,IAAAA,+BAAAA,EAAiBd,MAAMa,aAAa;IAC1D,MAAM,EAAEE,iBAAiB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAE,GAAGC,IAAAA,gCAAAA;IACpE,MAAMC,0BAAsEC,IAAAA,iCAAAA,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AEvBgB,UAAUlB,qBAAAA,CAAKC,QAAQ,CAACpD,MAAMqE,QAAQ,EAAE;YACtCS,cAAc;gBAAE5E,UAAUuC;YAA4B;YACtDY,aAAaiB,yBAAAA;YACbS,iBAAiB;QACnB;QACAR,aAAapB,qBAAAA,CAAKC,QAAQ,CAACpD,MAAMuE,WAAW,EAAE;YAAElB,aAAamB,4BAAAA;YAAaO,iBAAiB;QAAK;QAChGN,oBAAoBtB,qBAAAA,CAAKC,QAAQ,CAACpD,MAAMyE,kBAAkB,EAAE;YAC1DK,cAAc;gBAAE5E,UAAAA,WAAAA,GAAUK,OAAA+C,aAAA,CAAC0B,0DAAAA,EAAAA;YAAgC;YAC3D3B,aAAa;YACb0B,iBAAiB;QACnB;IACF;AACF"}
1
+ {"version":3,"sources":["useAttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuList,\n MenuPopover,\n getIntrinsicElementProps,\n slot,\n useArrowNavigationGroup,\n useEventCallback,\n useFocusFinders,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useTimeout } from '@fluentui/react-utilities';\nimport { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';\nimport { useOverflowStyles } from '../Attachment';\nimport { AttachmentOverflowMenuButton } from '../AttachmentOverflowMenuButton';\nimport { attachmentOverflowMenuButtonClassNames } from '../AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles';\nimport { AttachmentOverflowMenuItem } from '../AttachmentOverflowMenuItem';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\nimport type { AttachmentListProps, AttachmentListState } from './AttachmentList.types';\nimport type { AttachmentProps } from '../Attachment/Attachment.types';\n\n/**\n * Create the state required to render AttachmentList.\n *\n * The returned state can be modified with hooks such as useAttachmentListStyles_unstable,\n * before being passed to renderAttachmentList_unstable.\n *\n * @param props - props from this instance of AttachmentList\n * @param ref - reference to root HTMLElement of AttachmentList\n */\nexport const useAttachmentList_unstable = (\n props: AttachmentListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentListState => {\n const { children, maxVisibleAttachments, onAttachmentDismiss, overflowMenuProps } = props;\n const innerRef = React.useRef<HTMLDivElement>(null);\n const [setTimeout] = useTimeout();\n const { targetDocument } = useFluent();\n\n const designVersion = useDesignVersion(props.designVersion);\n const { findNextFocusable, findPrevFocusable, findLastFocusable } = useFocusFinders();\n const handleAttachmentDismiss: AttachmentListState['onAttachmentDismiss'] = useEventCallback((e, data) => {\n if (!onAttachmentDismiss) {\n return;\n }\n\n onAttachmentDismiss(e, data);\n\n // set focus after attachment dismiss\n const activeElement = targetDocument?.activeElement;\n if (innerRef.current?.contains(activeElement as HTMLElement)) {\n // focus on next attachment only if the active element is within the current attachment list\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n if (next) {\n // focus on the overflow button if the next focusable element is the overflow button.\n // if overflow button is removed from the DOM, focus on the last focusable element in the attachment list.\n if (next.classList.contains(attachmentOverflowMenuButtonClassNames.root)) {\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n } else {\n next.focus();\n }\n } else {\n const prev = findPrevFocusable(activeElement?.parentElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n } else {\n // Handles keyboard focus when attachment removed is in the overflow menu. Also handles focus when the overflow button is removed from the DOM.\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n }\n });\n\n const styles = useOverflowStyles();\n const resolvedChildren = useOverflowMaxVisibleItems({\n children,\n maxVisibleItems: maxVisibleAttachments,\n overflowClassName: styles.overflow,\n });\n\n const attachmentOverflowMenuItems = React.useMemo(() => {\n if (resolvedChildren && Array.isArray(resolvedChildren)) {\n return resolvedChildren\n .filter(child => React.isValidElement(child))\n .map(child => (child as React.ReactElement).props)\n .map((attachment: AttachmentProps) => {\n const dismissButton = slot.optional(attachment.dismissButton, { elementType: 'button' });\n return (\n <AttachmentOverflowMenuItem\n {...attachment}\n key={attachment.id}\n onClick={dismissButton?.onClick as AttachmentProps['onClick']}\n />\n );\n });\n }\n return [];\n }, [resolvedChildren]);\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n memorizeCurrent: true,\n });\n\n const shouldUseOverflow = maxVisibleAttachments !== undefined;\n\n return {\n designVersion,\n onAttachmentDismiss: handleAttachmentDismiss,\n shouldUseOverflow,\n numberOfAttachments: resolvedChildren.length,\n overflowMenuProps,\n components: {\n root: 'div',\n menuList: MenuList,\n menuPopover: MenuPopover,\n overflowMenuButton: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref: useMergedRefs(ref, innerRef),\n role: 'toolbar',\n ...arrowNavigationProps,\n ...props,\n children: resolvedChildren,\n }),\n { elementType: 'div' },\n ),\n menuList: slot.optional(props.menuList, {\n defaultProps: { children: attachmentOverflowMenuItems },\n elementType: MenuList,\n renderByDefault: true,\n }),\n menuPopover: slot.optional(props.menuPopover, { elementType: MenuPopover, renderByDefault: true }),\n overflowMenuButton: slot.optional(props.overflowMenuButton, {\n defaultProps: { children: <AttachmentOverflowMenuButton /> },\n elementType: 'span',\n renderByDefault: true,\n }),\n };\n};\n"],"names":["children","maxVisibleAttachments","props","onAttachmentDismiss","setTimeout","targetDocument","designVersion","overflowMenuProps","findNextFocusable","innerRef","useDesignVersion","next","container","useEventCallback","e","data","findLastFocusable","current","_innerRef_current","contains","activeElement","prev","root","_findLastFocusable","focus","findPrevFocusable","parentElement","styles","useOverflowStyles","overflowClassName","attachmentOverflowMenuItems","resolvedChildren","child","React","isValidElement","attachment","onClick","useMemo","Array","isArray","filter","map","elementType","circular","createElement","AttachmentOverflowMenuItem","axis","memorizeCurrent","id","dismissButton","shouldUseOverflow","numberOfAttachments","components","MenuPopover","handleAttachmentDismiss","useMergedRefs","arrowNavigationProps","menuList","slot","defaultProps","MenuList","renderByDefault","menuPopover","optional","overflowMenuButton"],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A,EAAA;0BAChGO;0BACEL;;yBAA2DC,yBAAA;6BAC3DlB;;qBAEFgB,qBAAA,CAAAK,QAAA,CAAA7D,MAAA4D,WAAA,EAAA;YACFpB,aAAAW,4BAAA;YACAQ,iBAAA"}
@@ -19,4 +19,4 @@ function useAttachmentListContextValues_unstable(state) {
19
19
  return {
20
20
  attachmentList
21
21
  };
22
- }
22
+ } //# sourceMappingURL=useAttachmentListContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentListContextValues.ts"],"sourcesContent":["import type { AttachmentListContextValues, AttachmentListState } from './AttachmentList.types';\n\nexport function useAttachmentListContextValues_unstable(state: AttachmentListState): AttachmentListContextValues {\n const { numberOfAttachments, onAttachmentDismiss, shouldUseOverflow } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentList = {\n numberOfAttachments,\n onAttachmentDismiss,\n shouldUseOverflow,\n };\n\n return { attachmentList };\n}\n"],"names":["useAttachmentListContextValues_unstable","state","numberOfAttachments","onAttachmentDismiss","shouldUseOverflow","attachmentList"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,wCAAwCC,KAA0B;IAChF,MAAM,EAAEC,mBAAmB,EAAEC,mBAAmB,EAAEC,iBAAiB,EAAE,GAAGH;IAExE,mGAAmG;IACnG,MAAMI,iBAAiB;QACrBH;QACAC;QACAC;IACF;IAEA,OAAO;QAAEC;IAAe;AAC1B"}
1
+ {"version":3,"sources":["useAttachmentListContextValues.ts"],"sourcesContent":["import type { AttachmentListContextValues, AttachmentListState } from './AttachmentList.types';\n\nexport function useAttachmentListContextValues_unstable(state: AttachmentListState): AttachmentListContextValues {\n const { numberOfAttachments, onAttachmentDismiss, shouldUseOverflow } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentList = {\n numberOfAttachments,\n onAttachmentDismiss,\n shouldUseOverflow,\n };\n\n return { attachmentList };\n}\n"],"names":["useAttachmentListContextValues_unstable","state","numberOfAttachments","onAttachmentDismiss","attachmentList","shouldUseOverflow"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,wCAAwCC,KAA0B;UAChF,EAEAC,mBAAA,EACAC,mBAAMC,mBACJF;uGAEAG;UACFD,iBAAA;QAEAF;;QAAwBG;IAC1B"}
@@ -21,4 +21,4 @@ const AttachmentOverflowMenu = (props)=>{
21
21
  attachmentOverflowMenuContextValues
22
22
  });
23
23
  };
24
- AttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';
24
+ AttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu'; //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentOverflowMenu.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentOverflowMenu_unstable } from './useAttachmentOverflowMenu';\nimport { renderAttachmentOverflowMenu_unstable } from './renderAttachmentOverflowMenu';\nimport { useAttachmentOverflowMenuContextValues_unstable } from './useAttachmentOverflowMenuContextValues';\nimport { useMenuContextValues_unstable } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps } from './AttachmentOverflowMenu.types';\n\nexport const AttachmentOverflowMenu: React.FC<AttachmentOverflowMenuProps> = props => {\n const state = useAttachmentOverflowMenu_unstable(props);\n const menuContextValues = useMenuContextValues_unstable(state);\n const attachmentOverflowMenuContextValues = useAttachmentOverflowMenuContextValues_unstable(state);\n\n return renderAttachmentOverflowMenu_unstable(state, { menuContextValues, attachmentOverflowMenuContextValues });\n};\n\nAttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';\n"],"names":["AttachmentOverflowMenu","props","state","useAttachmentOverflowMenu_unstable","menuContextValues","useMenuContextValues_unstable","attachmentOverflowMenuContextValues","useAttachmentOverflowMenuContextValues_unstable","renderAttachmentOverflowMenu_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;2CANsC;8CACG;wDACU;iCAClB;AAGvC,MAAMA,yBAAgEC,CAAAA;IAC3E,MAAMC,QAAQC,IAAAA,6DAAAA,EAAmCF;IACjD,MAAMG,oBAAoBC,IAAAA,8CAAAA,EAA8BH;IACxD,MAAMI,sCAAsCC,IAAAA,uFAAAA,EAAgDL;IAE5F,OAAOM,IAAAA,mEAAAA,EAAsCN,OAAO;QAAEE;QAAmBE;IAAoC;AAC/G;AAEAN,uBAAuBS,WAAW,GAAG"}
1
+ {"version":3,"sources":["AttachmentOverflowMenu.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentOverflowMenu_unstable } from './useAttachmentOverflowMenu';\nimport { renderAttachmentOverflowMenu_unstable } from './renderAttachmentOverflowMenu';\nimport { useAttachmentOverflowMenuContextValues_unstable } from './useAttachmentOverflowMenuContextValues';\nimport { useMenuContextValues_unstable } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps } from './AttachmentOverflowMenu.types';\n\nexport const AttachmentOverflowMenu: React.FC<AttachmentOverflowMenuProps> = props => {\n const state = useAttachmentOverflowMenu_unstable(props);\n const menuContextValues = useMenuContextValues_unstable(state);\n const attachmentOverflowMenuContextValues = useAttachmentOverflowMenuContextValues_unstable(state);\n\n return renderAttachmentOverflowMenu_unstable(state, { menuContextValues, attachmentOverflowMenuContextValues });\n};\n\nAttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';\n"],"names":["AttachmentOverflowMenu","props","state","useAttachmentOverflowMenu_unstable","menuContextValues","useMenuContextValues_unstable","attachmentOverflowMenuContextValues","useAttachmentOverflowMenuContextValues_unstable","renderAttachmentOverflowMenu_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;2CANsC;8CACG;wDACU;iCAClB;AAGvC,MAAMA,yBAAgEC,CAAAA;UAC3EC,QAAMA,IAAAA,6DAAQC,EAAAA;UACdC,oBAAMA,IAAAA,8CAAoBC,EAAAA;UAC1BC,sCAAMA,IAAAA,uFAAsCC,EAAAA;WAE5CC,IAAAA,mEAAOA,EAAAA,OAAsCN;;;;AAC/C;AAEAF,uBAAuBS,WAAW,GAAG"}
@@ -2,3 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
+ //# sourceMappingURL=AttachmentOverflowMenu.types.js.map
@@ -26,3 +26,4 @@ const _AttachmentOverflowMenu = require("./AttachmentOverflowMenu");
26
26
  const _renderAttachmentOverflowMenu = require("./renderAttachmentOverflowMenu");
27
27
  const _useAttachmentOverflowMenu = require("./useAttachmentOverflowMenu");
28
28
  const _useAttachmentOverflowMenuContextValues = require("./useAttachmentOverflowMenuContextValues");
29
+ //# sourceMappingURL=index.js.map
@@ -18,4 +18,4 @@ const renderAttachmentOverflowMenu_unstable = (state, contextValues)=>{
18
18
  value: attachmentOverflowMenuContextValues.attachmentOverflowMenu,
19
19
  children: (0, _reactcomponents.renderMenu_unstable)(state, menuContextValues)
20
20
  }) : null;
21
- };
21
+ }; //# sourceMappingURL=renderAttachmentOverflowMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachmentOverflowMenu.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, renderMenu_unstable } from '@fluentui/react-components';\nimport { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuState,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuContextValues,\n} from './AttachmentOverflowMenu.types';\nimport type { MenuContextValues } from '@fluentui/react-components';\n\n/**\n * Render the final JSX of AttachmentOverflowMenu\n */\nexport const renderAttachmentOverflowMenu_unstable = (\n state: AttachmentOverflowMenuState,\n contextValues: {\n menuContextValues: MenuContextValues;\n attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;\n },\n) => {\n const { menuContextValues, attachmentOverflowMenuContextValues } = contextValues;\n assertSlots<AttachmentOverflowMenuSlots>(state);\n\n return state.isOverflowing ? (\n <AttachmentOverflowMenuProvider value={attachmentOverflowMenuContextValues.attachmentOverflowMenu}>\n {renderMenu_unstable(state, menuContextValues)}\n </AttachmentOverflowMenuProvider>\n ) : null;\n};\n"],"names":["renderAttachmentOverflowMenu_unstable","state","contextValues","menuContextValues","attachmentOverflowMenuContextValues","assertSlots","isOverflowing","_jsx","AttachmentOverflowMenuProvider","value","attachmentOverflowMenu","renderMenu_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;4BAdb;iCAEiD;+CACF;AAWxC,MAAMA,wCAAwC,CACnDC,OACAC;IAKA,MAAM,EAAEC,iBAAiB,EAAEC,mCAAmC,EAAE,GAAGF;IACnEG,IAAAA,4BAAAA,EAAyCJ;IAEzC,OAAOA,MAAMK,aAAa,GAAA,WAAA,GACxBC,IAAAA,eAAA,EAACC,6DAAAA,EAAAA;QAA+BC,OAAOL,oCAAoCM,sBAAsB;kBAC9FC,IAAAA,oCAAAA,EAAoBV,OAAOE;SAE5B;AACN"}
1
+ {"version":3,"sources":["renderAttachmentOverflowMenu.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, renderMenu_unstable } from '@fluentui/react-components';\nimport { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuState,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuContextValues,\n} from './AttachmentOverflowMenu.types';\nimport type { MenuContextValues } from '@fluentui/react-components';\n\n/**\n * Render the final JSX of AttachmentOverflowMenu\n */\nexport const renderAttachmentOverflowMenu_unstable = (\n state: AttachmentOverflowMenuState,\n contextValues: {\n menuContextValues: MenuContextValues;\n attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;\n },\n) => {\n const { menuContextValues, attachmentOverflowMenuContextValues } = contextValues;\n assertSlots<AttachmentOverflowMenuSlots>(state);\n\n return state.isOverflowing ? (\n <AttachmentOverflowMenuProvider value={attachmentOverflowMenuContextValues.attachmentOverflowMenu}>\n {renderMenu_unstable(state, menuContextValues)}\n </AttachmentOverflowMenuProvider>\n ) : null;\n};\n"],"names":["menuContextValues","attachmentOverflowMenuContextValues","assertSlots","isOverflowing","state","_jsx","AttachmentOverflowMenuProvider"],"rangeMappings":";;;;;;;;;;;;;;;;","mappings":";;;;+BAsBUA;;;eAAAA;;;4BAtBgB;iCAGuB;+CACF;AAkB7C,MAAQA,wCAAmBC,CAAAA,OAAAA;UAC3BC,EAEAF,iBAAaG,qCAC4BF;oCAGrC,EAAAG;IACJ,OAAAA,MAAAD,aAAA,GAAA,WAAA,GAAAE,IAAAA,eAAA,EAAAC,6DAAA,EAAA"}
@@ -18,4 +18,4 @@ const useAttachmentOverflowMenu_unstable = (props)=>{
18
18
  overflowButtonRef,
19
19
  overflowCount
20
20
  };
21
- };
21
+ }; //# sourceMappingURL=useAttachmentOverflowMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentOverflowMenu.ts"],"sourcesContent":["import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenu.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,\n * before being passed to renderAttachmentOverflowMenu_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenu\n */\nexport const useAttachmentOverflowMenu_unstable = (props: AttachmentOverflowMenuProps): AttachmentOverflowMenuState => {\n const menuState = useMenu_unstable(props);\n const { isOverflowing, ref: overflowButtonRef, overflowCount } = useOverflowMenu<HTMLButtonElement>();\n\n return {\n ...menuState,\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n};\n"],"names":["useAttachmentOverflowMenu_unstable","props","menuState","useMenu_unstable","isOverflowing","ref","overflowButtonRef","overflowCount","useOverflowMenu"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;iCAXqC;AAW3C,MAAMA,qCAAqC,CAACC;IACjD,MAAMC,YAAYC,IAAAA,iCAAAA,EAAiBF;IACnC,MAAM,EAAEG,aAAa,EAAEC,KAAKC,iBAAiB,EAAEC,aAAa,EAAE,GAAGC,IAAAA,gCAAAA;IAEjE,OAAO;QACL,GAAGN,SAAS;QACZE;QACAE;QACAC;IACF;AACF"}
1
+ {"version":3,"sources":["useAttachmentOverflowMenu.ts"],"sourcesContent":["import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenu.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,\n * before being passed to renderAttachmentOverflowMenu_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenu\n */\nexport const useAttachmentOverflowMenu_unstable = (props: AttachmentOverflowMenuProps): AttachmentOverflowMenuState => {\n const menuState = useMenu_unstable(props);\n const { isOverflowing, ref: overflowButtonRef, overflowCount } = useOverflowMenu<HTMLButtonElement>();\n\n return {\n ...menuState,\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n};\n"],"names":["menuState","props","isOverflowing","overflowButtonRef","overflowCount"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAYQA;;;eAAAA;;;iCAZ0C;AAYhD,MAAMA,qCAA6BC,CAAAA;UACnCD,YAAQE,IAAAA,iCAAoBC,EAAAA;UAE5B,eACKH,OACHE,iBAAAA,eACAC,yCACAC;WACF;QACA,GAAAJ,SAAA"}
@@ -19,4 +19,4 @@ function useAttachmentOverflowMenuContextValues_unstable(state) {
19
19
  return {
20
20
  attachmentOverflowMenu
21
21
  };
22
- }
22
+ } //# sourceMappingURL=useAttachmentOverflowMenuContextValues.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentOverflowMenuContextValues.ts"],"sourcesContent":["import type { AttachmentOverflowMenuContextValues, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\nexport function useAttachmentOverflowMenuContextValues_unstable(\n state: AttachmentOverflowMenuState,\n): AttachmentOverflowMenuContextValues {\n const { isOverflowing, overflowButtonRef, overflowCount } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentOverflowMenu = {\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n\n return { attachmentOverflowMenu };\n}\n"],"names":["useAttachmentOverflowMenuContextValues_unstable","state","isOverflowing","overflowButtonRef","overflowCount","attachmentOverflowMenu"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,gDACdC,KAAkC;IAElC,MAAM,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,EAAE,GAAGH;IAE5D,mGAAmG;IACnG,MAAMI,yBAAyB;QAC7BH;QACAC;QACAC;IACF;IAEA,OAAO;QAAEC;IAAuB;AAClC"}
1
+ {"version":3,"sources":["useAttachmentOverflowMenuContextValues.ts"],"sourcesContent":["import type { AttachmentOverflowMenuContextValues, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\nexport function useAttachmentOverflowMenuContextValues_unstable(\n state: AttachmentOverflowMenuState,\n): AttachmentOverflowMenuContextValues {\n const { isOverflowing, overflowButtonRef, overflowCount } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentOverflowMenu = {\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n\n return { attachmentOverflowMenu };\n}\n"],"names":["useAttachmentOverflowMenuContextValues_unstable","state","isOverflowing","overflowButtonRef","attachmentOverflowMenu","overflowCount"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,gDACdC,KAAkC;UAElC,EAEAC,aAAA,EACAC,iBAAMC,eACJF;uGAEAG;UACFD,yBAAA;QAEAF;;QAAgCG;IAClC"}