@fluentui-copilot/react-attachments 0.9.3 → 0.9.5

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 (152) hide show
  1. package/CHANGELOG.json +49 -1
  2. package/CHANGELOG.md +23 -2
  3. package/dist/index.d.ts +22 -6
  4. package/lib/components/Attachment/Attachment.js +1 -1
  5. package/lib/components/Attachment/Attachment.js.map +1 -1
  6. package/lib/components/Attachment/Attachment.types.js.map +1 -1
  7. package/lib/components/Attachment/index.js +1 -1
  8. package/lib/components/Attachment/index.js.map +1 -1
  9. package/lib/components/Attachment/renderAttachment.js +10 -2
  10. package/lib/components/Attachment/renderAttachment.js.map +1 -1
  11. package/lib/components/Attachment/useAttachment.js +19 -7
  12. package/lib/components/Attachment/useAttachment.js.map +1 -1
  13. package/lib/components/Attachment/{useAttachmentStyles.js → useAttachmentStyles.styles.js} +15 -6
  14. package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -0
  15. package/lib/components/AttachmentList/AttachmentList.js +1 -1
  16. package/lib/components/AttachmentList/AttachmentList.js.map +1 -1
  17. package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -1
  18. package/lib/components/AttachmentList/index.js +1 -1
  19. package/lib/components/AttachmentList/index.js.map +1 -1
  20. package/lib/components/AttachmentList/renderAttachmentList.js +30 -3
  21. package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -1
  22. package/lib/components/AttachmentList/useAttachmentList.js +79 -11
  23. package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
  24. package/lib/components/AttachmentList/useAttachmentListContextValues.js +4 -2
  25. package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  26. package/lib/components/AttachmentList/{useAttachmentListStyles.js → useAttachmentListStyles.styles.js} +12 -2
  27. package/lib/components/AttachmentList/useAttachmentListStyles.styles.js.map +1 -0
  28. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
  29. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  30. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -1
  31. package/lib/components/AttachmentOverflowMenuButton/index.js +1 -1
  32. package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -1
  33. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
  34. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
  35. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +8 -0
  36. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
  37. package/lib/components/AttachmentOverflowMenuButton/{useAttachmentOverflowMenuButtonStyles.js → useAttachmentOverflowMenuButtonStyles.styles.js} +4 -2
  38. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -0
  39. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
  40. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  41. package/lib/components/AttachmentOverflowMenuItem/index.js +1 -1
  42. package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -1
  43. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +17 -8
  44. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  45. package/lib/components/AttachmentOverflowMenuItem/{useAttachmentOverflowMenuItemStyles.js → useAttachmentOverflowMenuItemStyles.styles.js} +4 -2
  46. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +1 -0
  47. package/lib/components/AttachmentTag/AttachmentTag.js +1 -1
  48. package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
  49. package/lib/components/AttachmentTag/index.js +1 -1
  50. package/lib/components/AttachmentTag/index.js.map +1 -1
  51. package/lib/components/AttachmentTag/{useAttachmentTagStyles.js → useAttachmentTagStyles.styles.js} +3 -1
  52. package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.js.map +1 -0
  53. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
  54. package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  55. package/lib/components/AttachmentTagItem/index.js +1 -1
  56. package/lib/components/AttachmentTagItem/index.js.map +1 -1
  57. package/lib/components/AttachmentTagItem/{useAttachmentTagItemStyles.js → useAttachmentTagItemStyles.styles.js} +4 -2
  58. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js.map +1 -0
  59. package/lib/components/AttachmentTagList/AttachmentTagList.js +1 -1
  60. package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  61. package/lib/components/AttachmentTagList/index.js +1 -1
  62. package/lib/components/AttachmentTagList/index.js.map +1 -1
  63. package/lib/components/AttachmentTagList/{useAttachmentTagListStyles.js → useAttachmentTagListStyles.styles.js} +3 -1
  64. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.js.map +1 -0
  65. package/lib/components/utils/{useProgressBarStyles.js → useProgressBarStyles.styles.js} +9 -9
  66. package/lib/components/utils/useProgressBarStyles.styles.js.map +1 -0
  67. package/lib/contexts/attachmentListContext.js +2 -1
  68. package/lib/contexts/attachmentListContext.js.map +1 -1
  69. package/lib/index.js.map +1 -1
  70. package/lib-commonjs/components/Attachment/Attachment.js +2 -2
  71. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  72. package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
  73. package/lib-commonjs/components/Attachment/index.js +1 -1
  74. package/lib-commonjs/components/Attachment/index.js.map +1 -1
  75. package/lib-commonjs/components/Attachment/renderAttachment.js +6 -1
  76. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  77. package/lib-commonjs/components/Attachment/useAttachment.js +15 -7
  78. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  79. package/lib-commonjs/components/Attachment/{useAttachmentStyles.js → useAttachmentStyles.styles.js} +20 -7
  80. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -0
  81. package/lib-commonjs/components/AttachmentList/AttachmentList.js +2 -2
  82. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  83. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -1
  84. package/lib-commonjs/components/AttachmentList/index.js +1 -1
  85. package/lib-commonjs/components/AttachmentList/index.js.map +1 -1
  86. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +29 -1
  87. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
  88. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +80 -10
  89. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  90. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +3 -2
  91. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  92. package/lib-commonjs/components/AttachmentList/{useAttachmentListStyles.js → useAttachmentListStyles.styles.js} +11 -2
  93. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js.map +1 -0
  94. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +2 -2
  95. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  96. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -1
  97. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +1 -1
  98. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -1
  99. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -2
  100. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
  101. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +5 -0
  102. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
  103. package/lib-commonjs/components/AttachmentOverflowMenuButton/{useAttachmentOverflowMenuButtonStyles.js → useAttachmentOverflowMenuButtonStyles.styles.js} +4 -3
  104. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -0
  105. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +2 -2
  106. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  107. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +1 -1
  108. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -1
  109. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +14 -7
  110. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  111. package/lib-commonjs/components/AttachmentOverflowMenuItem/{useAttachmentOverflowMenuItemStyles.js → useAttachmentOverflowMenuItemStyles.styles.js} +4 -3
  112. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +1 -0
  113. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +2 -2
  114. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
  115. package/lib-commonjs/components/AttachmentTag/index.js +1 -1
  116. package/lib-commonjs/components/AttachmentTag/index.js.map +1 -1
  117. package/lib-commonjs/components/AttachmentTag/{useAttachmentTagStyles.js → useAttachmentTagStyles.styles.js} +2 -1
  118. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.js.map +1 -0
  119. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +2 -2
  120. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  121. package/lib-commonjs/components/AttachmentTagItem/index.js +1 -1
  122. package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -1
  123. package/lib-commonjs/components/AttachmentTagItem/{useAttachmentTagItemStyles.js → useAttachmentTagItemStyles.styles.js} +6 -5
  124. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js.map +1 -0
  125. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +2 -2
  126. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  127. package/lib-commonjs/components/AttachmentTagList/index.js +1 -1
  128. package/lib-commonjs/components/AttachmentTagList/index.js.map +1 -1
  129. package/lib-commonjs/components/AttachmentTagList/{useAttachmentTagListStyles.js → useAttachmentTagListStyles.styles.js} +2 -1
  130. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.js.map +1 -0
  131. package/lib-commonjs/components/utils/{useProgressBarStyles.js → useProgressBarStyles.styles.js} +9 -9
  132. package/lib-commonjs/components/utils/useProgressBarStyles.styles.js.map +1 -0
  133. package/lib-commonjs/contexts/attachmentListContext.js +2 -1
  134. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
  135. package/lib-commonjs/index.js.map +1 -1
  136. package/package.json +8 -8
  137. package/lib/components/Attachment/useAttachmentStyles.js.map +0 -1
  138. package/lib/components/AttachmentList/useAttachmentListStyles.js.map +0 -1
  139. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +0 -1
  140. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +0 -1
  141. package/lib/components/AttachmentTag/useAttachmentTagStyles.js.map +0 -1
  142. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +0 -1
  143. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js.map +0 -1
  144. package/lib/components/utils/useProgressBarStyles.js.map +0 -1
  145. package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +0 -1
  146. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +0 -1
  147. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +0 -1
  148. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +0 -1
  149. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +0 -1
  150. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +0 -1
  151. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js.map +0 -1
  152. package/lib-commonjs/components/utils/useProgressBarStyles.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,55 @@
2
2
  "name": "@fluentui-copilot/react-attachments",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 14 May 2024 00:38:44 GMT",
5
+ "date": "Fri, 31 May 2024 18:42:05 GMT",
6
+ "tag": "@fluentui-copilot/react-attachments_v0.9.5",
7
+ "version": "0.9.5",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "tristan.watanabe@gmail.com",
12
+ "package": "@fluentui-copilot/react-attachments",
13
+ "commit": "6df44dbcd267772e1b62426d14abe54a0b35bb97",
14
+ "comment": "chore: useStyle hook files now properly contain .styles. within filename."
15
+ },
16
+ {
17
+ "author": "tristan.watanabe@gmail.com",
18
+ "package": "@fluentui-copilot/react-attachments",
19
+ "commit": "0f9673a1e159796ce013783a883516b393f633c4",
20
+ "comment": "fix: overflow button count no longer updates when AttachmentList handleDismiss callback isn't correctly removing items."
21
+ },
22
+ {
23
+ "author": "tristan.watanabe@gmail.com",
24
+ "package": "@fluentui-copilot/react-attachments",
25
+ "commit": "7583464747aec7a8a79a8c79eaeff85d749025e4",
26
+ "comment": "chore: bump @fluentui dependencies to latest 9.52.0."
27
+ },
28
+ {
29
+ "author": "seanmonahan@microsoft.com",
30
+ "package": "@fluentui-copilot/react-attachments",
31
+ "commit": "c2e14c44cafafbdc10f52b9855384748a7524a63",
32
+ "comment": "chore: add eslint-plugin-react-compiler"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "date": "Wed, 15 May 2024 23:57:34 GMT",
39
+ "tag": "@fluentui-copilot/react-attachments_v0.9.4",
40
+ "version": "0.9.4",
41
+ "comments": {
42
+ "patch": [
43
+ {
44
+ "author": "tristan.watanabe@gmail.com",
45
+ "package": "@fluentui-copilot/react-attachments",
46
+ "commit": "719196b7226ff5fae1136731498443024039da0a",
47
+ "comment": "refactor: AttachmentList now has overflow built in."
48
+ }
49
+ ]
50
+ }
51
+ },
52
+ {
53
+ "date": "Tue, 14 May 2024 00:38:55 GMT",
6
54
  "tag": "@fluentui-copilot/react-attachments_v0.9.3",
7
55
  "version": "0.9.3",
8
56
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,33 @@
1
1
  # Change Log - @fluentui-copilot/react-attachments
2
2
 
3
- This log was last generated on Tue, 14 May 2024 00:38:44 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 31 May 2024 18:42:05 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.9.5](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.9.5)
8
+
9
+ Fri, 31 May 2024 18:42:05 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.9.4..@fluentui-copilot/react-attachments_v0.9.5)
11
+
12
+ ### Patches
13
+
14
+ - chore: useStyle hook files now properly contain .styles. within filename. ([PR #1671](https://github.com/microsoft/fluentai/pull/1671) by tristan.watanabe@gmail.com)
15
+ - fix: overflow button count no longer updates when AttachmentList handleDismiss callback isn't correctly removing items. ([PR #1666](https://github.com/microsoft/fluentai/pull/1666) by tristan.watanabe@gmail.com)
16
+ - chore: bump @fluentui dependencies to latest 9.52.0. ([PR #1657](https://github.com/microsoft/fluentai/pull/1657) by tristan.watanabe@gmail.com)
17
+ - chore: add eslint-plugin-react-compiler ([PR #1642](https://github.com/microsoft/fluentai/pull/1642) by seanmonahan@microsoft.com)
18
+
19
+ ## [0.9.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.9.4)
20
+
21
+ Wed, 15 May 2024 23:57:34 GMT
22
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.9.3..@fluentui-copilot/react-attachments_v0.9.4)
23
+
24
+ ### Patches
25
+
26
+ - refactor: AttachmentList now has overflow built in. ([PR #1616](https://github.com/microsoft/fluentai/pull/1616) by tristan.watanabe@gmail.com)
27
+
7
28
  ## [0.9.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.9.3)
8
29
 
9
- Tue, 14 May 2024 00:38:44 GMT
30
+ Tue, 14 May 2024 00:38:55 GMT
10
31
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.9.2..@fluentui-copilot/react-attachments_v0.9.3)
11
32
 
12
33
  ### Patches
package/dist/index.d.ts CHANGED
@@ -22,8 +22,10 @@ export declare const Attachment: ForwardRefComponent<AttachmentProps>;
22
22
 
23
23
  export declare const attachmentClassNames: SlotClassNames<AttachmentSlots>;
24
24
 
25
- declare type AttachmentDismissedData = {
26
- id: string;
25
+ export declare type AttachmentDismissedData = {
26
+ content?: AttachmentProps['children'];
27
+ media?: AttachmentProps['media'];
28
+ id?: string;
27
29
  };
28
30
 
29
31
  export declare const AttachmentList: ForwardRefComponent<AttachmentListProps>;
@@ -35,7 +37,7 @@ export declare const AttachmentListContext: Context<AttachmentListContextValue>;
35
37
  /**
36
38
  * Context shared between AttachmentList and its children components
37
39
  */
38
- export declare type AttachmentListContextValue = Pick<AttachmentListProps, 'onAttachmentDismiss'>;
40
+ export declare type AttachmentListContextValue = Pick<AttachmentListState, 'onAttachmentDismiss' | 'shouldUseOverflow'>;
39
41
 
40
42
  declare type AttachmentListContextValues = {
41
43
  attachmentList: AttachmentListContextValue;
@@ -46,18 +48,31 @@ declare type AttachmentListContextValues = {
46
48
  */
47
49
  export declare type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {
48
50
  onAttachmentDismiss?: (e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>, data: AttachmentDismissedData) => void;
51
+ overflowMenuProps?: Omit<AttachmentOverflowMenuProps, 'children'>;
52
+ /**
53
+ * The maximum number of attachments to display before the overflow button is shown even if there is
54
+ * enough space available to show more.
55
+ * If not set, the overflow functionality will be disabled.
56
+ * @default undefined
57
+ */
58
+ maxVisibleAttachments?: number;
49
59
  };
50
60
 
51
61
  export declare const AttachmentListProvider: Provider<AttachmentListContextValue> & FC<ProviderProps<AttachmentListContextValue>>;
52
62
 
53
63
  export declare type AttachmentListSlots = {
54
64
  root: Slot<'div'>;
65
+ overflowMenuButton: Slot<'span'>;
66
+ overflowMenuItem: Slot<'span'>;
55
67
  };
56
68
 
57
69
  /**
58
70
  * State used in rendering AttachmentList
59
71
  */
60
- export declare type AttachmentListState = ComponentState<AttachmentListSlots> & Pick<AttachmentListProps, 'onAttachmentDismiss'>;
72
+ export declare type AttachmentListState = ComponentState<AttachmentListSlots> & Pick<AttachmentListProps, 'onAttachmentDismiss' | 'overflowMenuProps'> & {
73
+ attachments: AttachmentProps[];
74
+ shouldUseOverflow: boolean;
75
+ };
61
76
 
62
77
  export declare const AttachmentOverflowMenu: React_2.FC<AttachmentOverflowMenuProps>;
63
78
 
@@ -75,6 +90,7 @@ export declare type AttachmentOverflowMenuButtonProps = ComponentProps<Partial<A
75
90
  * @default false
76
91
  */
77
92
  isLoading?: boolean;
93
+ text?: string | ((overflowCount: number) => React.ReactNode);
78
94
  };
79
95
 
80
96
  export declare type AttachmentOverflowMenuButtonSlots = {
@@ -141,7 +157,6 @@ export declare type AttachmentOverflowMenuState = MenuState & {
141
157
  * Attachment Props
142
158
  */
143
159
  export declare type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {
144
- id: string;
145
160
  imageOnly?: boolean;
146
161
  };
147
162
 
@@ -158,8 +173,9 @@ export declare type AttachmentSlots = {
158
173
  /**
159
174
  * State used in rendering Attachment
160
175
  */
161
- export declare type AttachmentState = ComponentState<AttachmentSlots> & Pick<AttachmentProps, 'imageOnly'> & {
176
+ export declare type AttachmentState = ComponentState<AttachmentSlots> & Required<Pick<AttachmentProps, 'id'>> & Pick<AttachmentProps, 'imageOnly'> & {
162
177
  isLoading: boolean;
178
+ shouldUseOverflow: boolean;
163
179
  };
164
180
 
165
181
  /**
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useAttachment_unstable } from './useAttachment';
3
3
  import { renderAttachment_unstable } from './renderAttachment';
4
- import { useAttachmentStyles_unstable } from './useAttachmentStyles';
4
+ import { useAttachmentStyles_unstable } from './useAttachmentStyles.styles';
5
5
  // Attachment component - TODO: add more docs
6
6
  export const Attachment = /*#__PURE__*/React.forwardRef((props, ref) => {
7
7
  const state = useAttachment_unstable(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachment_unstable } from './useAttachment';\nimport { renderAttachment_unstable } from './renderAttachment';\nimport { useAttachmentStyles_unstable } from './useAttachmentStyles';\nimport type { AttachmentProps } from './Attachment.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// Attachment component - TODO: add more docs\nexport const Attachment: ForwardRefComponent<AttachmentProps> = React.forwardRef((props, ref) => {\n const state = useAttachment_unstable(props, ref);\n\n useAttachmentStyles_unstable(state);\n return renderAttachment_unstable(state);\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["React","useAttachment_unstable","renderAttachment_unstable","useAttachmentStyles_unstable","Attachment","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AAIrE,6CAA6C;AAC7C,OAAO,MAAMC,2BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7B,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"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';\n\n// Attachment component - TODO: add more docs\nexport const Attachment: ForwardRefComponent<AttachmentProps> = React.forwardRef((props, ref) => {\n const state = useAttachment_unstable(props, ref);\n\n useAttachmentStyles_unstable(state);\n return renderAttachment_unstable(state);\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["React","useAttachment_unstable","renderAttachment_unstable","useAttachmentStyles_unstable","Attachment","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,+BAA+B;AAI5E,6CAA6C;AAC7C,OAAO,MAAMC,2BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7B,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ProgressBar, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n dismissButton: NonNullable<Slot<'button'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n dismissIcon: NonNullable<Slot<'span'>>;\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n id: string;\n imageOnly?: boolean;\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAoBA;;CAEC,GACD,WAGI"}
1
+ {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, ProgressBar, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n dismissButton: NonNullable<Slot<'button'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n dismissIcon: NonNullable<Slot<'span'>>;\n progress?: Slot<typeof ProgressBar>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n imageOnly?: boolean;\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots> &\n Required<Pick<AttachmentProps, 'id'>> &\n Pick<AttachmentProps, 'imageOnly'> & {\n isLoading: boolean;\n shouldUseOverflow: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAmBA;;CAEC,GACD,WAKI"}
@@ -2,5 +2,5 @@ export * from './Attachment';
2
2
  export * from './Attachment.types';
3
3
  export * from './renderAttachment';
4
4
  export * from './useAttachment';
5
- export * from './useAttachmentStyles';
5
+ export * from './useAttachmentStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Attachment';\nexport * from './Attachment.types';\nexport * from './renderAttachment';\nexport * from './useAttachment';\nexport * from './useAttachmentStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,wBAAwB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Attachment';\nexport * from './Attachment.types';\nexport * from './renderAttachment';\nexport * from './useAttachment';\nexport * from './useAttachmentStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,+BAA+B"}
@@ -1,16 +1,24 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from '@fluentui/react-components';
2
+ import { OverflowItem, assertSlots } from '@fluentui/react-components';
3
3
  /**
4
4
  * Render the final JSX of Attachment
5
5
  */
6
6
  export const renderAttachment_unstable = state => {
7
7
  assertSlots(state);
8
- return /*#__PURE__*/_jsxs(state.root, {
8
+ const {
9
+ id,
10
+ shouldUseOverflow
11
+ } = state;
12
+ const attachment = /*#__PURE__*/_jsxs(state.root, {
9
13
  children: [/*#__PURE__*/_jsxs(state.primaryAction, {
10
14
  children: [state.media && !state.imageOnly && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), state.progress && /*#__PURE__*/_jsx(state.progress, {})]
11
15
  }), /*#__PURE__*/_jsx(state.dismissButton, {
12
16
  children: /*#__PURE__*/_jsx(state.dismissIcon, {})
13
17
  })]
14
18
  });
19
+ return shouldUseOverflow ? /*#__PURE__*/_jsx(OverflowItem, {
20
+ id: id,
21
+ children: attachment
22
+ }, id) : attachment;
15
23
  };
16
24
  //# sourceMappingURL=renderAttachment.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n {state.media && !state.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"],"names":["assertSlots","renderAttachment_unstable","state","root","primaryAction","media","imageOnly","content","progress","dismissButton","dismissIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAE7B,qBACE,MAACA,MAAMC,IAAI;;0BACT,MAACD,MAAME,aAAa;;oBACjBF,MAAMG,KAAK,IAAI,CAACH,MAAMI,SAAS,kBAAI,KAACJ,MAAMG,KAAK;kCAChD,KAACH,MAAMK,OAAO;oBACbL,MAAMM,QAAQ,kBAAI,KAACN,MAAMM,QAAQ;;;0BAEpC,KAACN,MAAMO,aAAa;0BAClB,cAAA,KAACP,MAAMQ,WAAW;;;;AAI1B,EAAE"}
1
+ {"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { OverflowItem, assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n const { id, shouldUseOverflow } = state;\n\n const attachment = (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n return shouldUseOverflow ? (\n <OverflowItem id={id} key={id}>\n {attachment}\n </OverflowItem>\n ) : (\n attachment\n );\n};\n"],"names":["OverflowItem","assertSlots","renderAttachment_unstable","state","id","shouldUseOverflow","attachment","root","primaryAction","media","imageOnly","content","progress","dismissButton","dismissIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,YAAY,EAAEC,WAAW,QAAQ,6BAA6B;AAGvE;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAC7B,MAAM,EAAEC,EAAE,EAAEC,iBAAiB,EAAE,GAAGF;IAElC,MAAMG,2BACJ,MAACH,MAAMI,IAAI;;0BACT,MAACJ,MAAMK,aAAa;;oBACjBL,MAAMM,KAAK,IAAI,CAACN,MAAMO,SAAS,kBAAI,KAACP,MAAMM,KAAK;kCAChD,KAACN,MAAMQ,OAAO;oBACbR,MAAMS,QAAQ,kBAAI,KAACT,MAAMS,QAAQ;;;0BAEpC,KAACT,MAAMU,aAAa;0BAClB,cAAA,KAACV,MAAMW,WAAW;;;;IAIxB,OAAOT,kCACL,KAACL;QAAaI,IAAIA;kBACfE;OADwBF,MAI3BE;AAEJ,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';
2
+ import { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot, useId } from '@fluentui/react-components';
3
3
  import { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';
4
4
  import { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';
5
5
  /**
@@ -13,14 +13,20 @@ import { useAttachmentListContext_unstable } from '../../contexts/attachmentList
13
13
  */
14
14
  export const useAttachment_unstable = (props, ref) => {
15
15
  const {
16
+ children,
16
17
  imageOnly
17
18
  } = props;
18
19
  const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
19
- const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);
20
+ const {
21
+ onAttachmentDismiss,
22
+ shouldUseOverflow
23
+ } = useAttachmentListContext_unstable(context => context);
24
+ const attachmentId = useId('attachment-', props.id);
20
25
  const isLoading = !!props.progress;
21
26
  const root = slot.always(getIntrinsicElementProps('div', {
22
27
  ref,
23
- ...props
28
+ ...props,
29
+ id: attachmentId
24
30
  }), {
25
31
  elementType: 'div'
26
32
  });
@@ -33,9 +39,13 @@ export const useAttachment_unstable = (props, ref) => {
33
39
  },
34
40
  elementType: 'button'
35
41
  });
36
- dismissButton.onClick = mergeCallbacks(dismissButton.onClick, ev => onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
37
- id: props.id
38
- }));
42
+ dismissButton.onClick = mergeCallbacks(dismissButton.onClick, ev => {
43
+ onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
44
+ content: children,
45
+ media,
46
+ id: attachmentId
47
+ });
48
+ });
39
49
  const media = slot.optional(props.media, {
40
50
  elementType: 'span'
41
51
  });
@@ -60,6 +70,7 @@ export const useAttachment_unstable = (props, ref) => {
60
70
  elementType: ProgressBar
61
71
  });
62
72
  const state = {
73
+ id: attachmentId,
63
74
  components: {
64
75
  root: 'div',
65
76
  primaryAction: 'button',
@@ -77,7 +88,8 @@ export const useAttachment_unstable = (props, ref) => {
77
88
  dismissIcon,
78
89
  progress,
79
90
  imageOnly,
80
- isLoading
91
+ isLoading,
92
+ shouldUseOverflow
81
93
  };
82
94
  if (state.primaryAction.as === 'span') {
83
95
  state.components.primaryAction = 'span';
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps, AttachmentState } from './Attachment.types';\n\n/**\n * Create the state required to render Attachment.\n *\n * The returned state can be modified with hooks such as useAttachmentStyles_unstable,\n * before being passed to renderAttachment_unstable.\n *\n * @param props - props from this instance of Attachment\n * @param ref - reference to root HTMLElement of Attachment\n */\nexport const useAttachment_unstable = (props: AttachmentProps, ref: React.Ref<HTMLDivElement>): AttachmentState => {\n const { imageOnly } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n const isLoading = !!props.progress;\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n );\n\n const primaryAction = slot.always(props.primaryAction, {\n elementType: 'button',\n });\n\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: { 'aria-label': 'Dismiss' },\n elementType: 'button',\n });\n\n dismissButton.onClick = mergeCallbacks(\n dismissButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => onAttachmentDismiss?.(ev, { id: props.id }),\n );\n\n const media = slot.optional(props.media, { elementType: 'span' });\n\n const content = slot.always(props.content, {\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n });\n\n const dismissIcon = slot.always(props.dismissIcon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: 'span',\n });\n\n const 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 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 };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["React","ProgressBar","getIntrinsicElementProps","mergeCallbacks","slot","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentListContext_unstable","useAttachment_unstable","props","ref","imageOnly","DismissIcon","onAttachmentDismiss","context","isLoading","progress","root","always","elementType","primaryAction","dismissButton","defaultProps","onClick","ev","id","media","optional","content","children","dismissIcon","shape","thickness","state","components","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,WAAW,EAAEC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AACzG,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AACtF,SAASC,iCAAiC,QAAQ,uCAAuC;AAGzF;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,MAAM,EAAEC,SAAS,EAAE,GAAGF;IACtB,MAAMG,cAAcN,WAAWD,iBAAiBD;IAChD,MAAMS,sBAAsBN,kCAAkCO,CAAAA,UAAWA,QAAQD,mBAAmB;IACpG,MAAME,YAAY,CAAC,CAACN,MAAMO,QAAQ;IAElC,MAAMC,OAAOd,KAAKe,MAAM,CACtBjB,yBAAyB,OAAO;QAC9BS;QACA,GAAGD,KAAK;IACV,IACA;QAAEU,aAAa;IAAM;IAGvB,MAAMC,gBAAgBjB,KAAKe,MAAM,CAACT,MAAMW,aAAa,EAAE;QACrDD,aAAa;IACf;IAEA,MAAME,gBAAgBlB,KAAKe,MAAM,CAACT,MAAMY,aAAa,EAAE;QACrDC,cAAc;YAAE,cAAc;QAAU;QACxCH,aAAa;IACf;IAEAE,cAAcE,OAAO,GAAGrB,eACtBmB,cAAcE,OAAO,EACrB,CAACC,KAAgEX,gCAAAA,0CAAAA,oBAAsBW,IAAI;YAAEC,IAAIhB,MAAMgB,EAAE;QAAC;IAG5G,MAAMC,QAAQvB,KAAKwB,QAAQ,CAAClB,MAAMiB,KAAK,EAAE;QAAEP,aAAa;IAAO;IAE/D,MAAMS,UAAUzB,KAAKe,MAAM,CAACT,MAAMmB,OAAO,EAAE;QACzCN,cAAc;YACZO,UAAUpB,MAAMoB,QAAQ;QAC1B;QACAV,aAAa;IACf;IAEA,MAAMW,cAAc3B,KAAKe,MAAM,CAACT,MAAMqB,WAAW,EAAE;QACjDR,cAAc;YACZO,wBAAU,oBAACjB;QACb;QACAO,aAAa;IACf;IAEA,MAAMH,WAAWb,KAAKwB,QAAQ,CAAClB,MAAMO,QAAQ,EAAE;QAC7CM,cAAc;YACZS,OAAO;YACPC,WAAW;YACX,mBAAmBvB,MAAMgB,EAAE;QAC7B;QACAN,aAAanB;IACf;IAEA,MAAMiC,QAAyB;QAC7BC,YAAY;YACVjB,MAAM;YACNG,eAAe;YACfC,eAAe;YACfK,OAAO;YACPE,SAAS;YACTE,aAAa;YACbd,UAAUhB;QACZ;QAEAiB;QACAG;QACAC;QACAK;QACAE;QACAE;QACAd;QACAL;QACAI;IACF;IAEA,IAAIkB,MAAMb,aAAa,CAACe,EAAE,KAAK,QAAQ;QACrCF,MAAMC,UAAU,CAACd,aAAa,GAAG;IACnC;IAEA,OAAOa;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot, useId } from '@fluentui/react-components';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps, AttachmentState } from './Attachment.types';\n\n/**\n * Create the state required to render Attachment.\n *\n * The returned state can be modified with hooks such as useAttachmentStyles_unstable,\n * before being passed to renderAttachment_unstable.\n *\n * @param props - props from this instance of Attachment\n * @param ref - reference to root HTMLElement of Attachment\n */\nexport const useAttachment_unstable = (props: AttachmentProps, ref: React.Ref<HTMLDivElement>): AttachmentState => {\n const { children, imageOnly } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const { onAttachmentDismiss, shouldUseOverflow } = useAttachmentListContext_unstable(context => context);\n const attachmentId = useId('attachment-', props.id);\n const isLoading = !!props.progress;\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 elementType: 'button',\n });\n\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: { 'aria-label': 'Dismiss' },\n elementType: 'button',\n });\n\n dismissButton.onClick = mergeCallbacks(\n dismissButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => {\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: <DismissIcon />,\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 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 };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["React","ProgressBar","getIntrinsicElementProps","mergeCallbacks","slot","useId","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentListContext_unstable","useAttachment_unstable","props","ref","children","imageOnly","DismissIcon","onAttachmentDismiss","shouldUseOverflow","context","attachmentId","id","isLoading","progress","root","always","elementType","primaryAction","dismissButton","defaultProps","onClick","ev","content","media","optional","dismissIcon","shape","thickness","state","components","as"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,WAAW,EAAEC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,EAAEC,KAAK,QAAQ,6BAA6B;AAChH,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AACtF,SAASC,iCAAiC,QAAQ,uCAAuC;AAGzF;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAE,GAAGH;IAChC,MAAMI,cAAcP,WAAWD,iBAAiBD;IAChD,MAAM,EAAEU,mBAAmB,EAAEC,iBAAiB,EAAE,GAAGR,kCAAkCS,CAAAA,UAAWA;IAChG,MAAMC,eAAed,MAAM,eAAeM,MAAMS,EAAE;IAClD,MAAMC,YAAY,CAAC,CAACV,MAAMW,QAAQ;IAElC,MAAMC,OAAOnB,KAAKoB,MAAM,CACtBtB,yBAAyB,OAAO;QAC9BU;QACA,GAAGD,KAAK;QACRS,IAAID;IACN,IACA;QAAEM,aAAa;IAAM;IAGvB,MAAMC,gBAAgBtB,KAAKoB,MAAM,CAACb,MAAMe,aAAa,EAAE;QACrDD,aAAa;IACf;IAEA,MAAME,gBAAgBvB,KAAKoB,MAAM,CAACb,MAAMgB,aAAa,EAAE;QACrDC,cAAc;YAAE,cAAc;QAAU;QACxCH,aAAa;IACf;IAEAE,cAAcE,OAAO,GAAG1B,eACtBwB,cAAcE,OAAO,EACrB,CAACC;QACCd,gCAAAA,0CAAAA,oBAAsBc,IAAI;YAAEC,SAASlB;YAAUmB;YAAOZ,IAAID;QAAa;IACzE;IAGF,MAAMa,QAAQ5B,KAAK6B,QAAQ,CAACtB,MAAMqB,KAAK,EAAE;QAAEP,aAAa;IAAO;IAE/D,MAAMM,UAAU3B,KAAKoB,MAAM,CAACb,MAAMoB,OAAO,EAAE;QACzCH,cAAc;YACZf,UAAUF,MAAME,QAAQ;QAC1B;QACAY,aAAa;IACf;IAEA,MAAMS,cAAc9B,KAAKoB,MAAM,CAACb,MAAMuB,WAAW,EAAE;QACjDN,cAAc;YACZf,wBAAU,oBAACE;QACb;QACAU,aAAa;IACf;IAEA,MAAMH,WAAWlB,KAAK6B,QAAQ,CAACtB,MAAMW,QAAQ,EAAE;QAC7CM,cAAc;YACZO,OAAO;YACPC,WAAW;YACX,mBAAmBzB,MAAMS,EAAE;QAC7B;QACAK,aAAaxB;IACf;IAEA,MAAMoC,QAAyB;QAC7BjB,IAAID;QACJmB,YAAY;YACVf,MAAM;YACNG,eAAe;YACfC,eAAe;YACfK,OAAO;YACPD,SAAS;YACTG,aAAa;YACbZ,UAAUrB;QACZ;QAEAsB;QACAG;QACAC;QACAK;QACAD;QACAG;QACAZ;QACAR;QACAO;QACAJ;IACF;IAEA,IAAIoB,MAAMX,aAAa,CAACa,EAAE,KAAK,QAAQ;QACrCF,MAAMC,UAAU,CAACZ,aAAa,GAAG;IACnC;IAEA,OAAOW;AACT,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import { createCustomFocusIndicatorStyle, __resetStyles, __styles, mergeClasses, shorthands, slot, tokens, typographyStyles } from '@fluentui/react-components';
2
- import { useProgressBarStyles } from '../utils/useProgressBarStyles';
2
+ import { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';
3
3
  export const attachmentClassNames = {
4
4
  root: 'fai-Attachment',
5
5
  primaryAction: 'fai-Attachment__primaryAction',
@@ -38,15 +38,15 @@ const usePrimaryActionStyles = __styles({
38
38
  Bi91k9c: "fnwyq0v",
39
39
  ecr2s2: "fwdzr64",
40
40
  lj723h: "flvvhsy",
41
- Bqrx1nm: "fq7113v",
42
- kx9iu6: "fp3oj7s"
41
+ Bbkh6qg: "fkiggi6",
42
+ Cnge2b: "f8zknr1"
43
43
  }
44
44
  }, {
45
45
  h: [".f8491dx:hover{cursor:pointer;}", ".f1h648pw:hover{background-color:var(--colorNeutralBackground3Hover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}"],
46
46
  a: [".fwdzr64:active{background-color:var(--colorNeutralBackground3Pressed);}", ".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}"],
47
- m: [["@media (forced-colors: active){.fq7113v:hover{background-color:HighlightText;}}", {
47
+ m: [["@media (forced-colors: active){.fkiggi6:hover{background-color:HighlightText;}}", {
48
48
  m: "(forced-colors: active)"
49
- }], ["@media (forced-colors: active){.fp3oj7s:active{background-color:HighlightText;}}", {
49
+ }], ["@media (forced-colors: active){.f8zknr1:active{background-color:HighlightText;}}", {
50
50
  m: "(forced-colors: active)"
51
51
  }]]
52
52
  });
@@ -70,10 +70,19 @@ const useImageOnlyStyles = __styles({
70
70
  }, {
71
71
  d: [".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".fez10in{line-height:0;}"]
72
72
  });
73
+ export const useOverflowStyles = __styles({
74
+ overflow: {
75
+ a9b677: "fly5x3f"
76
+ }
77
+ }, {
78
+ d: [".fly5x3f{width:100%;}"]
79
+ });
73
80
  /**
74
81
  * Apply styling to the Attachment slots based on the state
75
82
  */
76
83
  export const useAttachmentStyles_unstable = state => {
84
+ 'use no memo';
85
+
77
86
  const rootBaseClassName = useRootBaseClassName();
78
87
  const primaryActionBaseClassName = usePrimaryActionBaseClassName();
79
88
  const dismissButtonBaseClassName = useDismissButtonBaseClassName();
@@ -112,4 +121,4 @@ export const useAttachmentStyles_unstable = state => {
112
121
  }
113
122
  return state;
114
123
  };
115
- //# sourceMappingURL=useAttachmentStyles.js.map
124
+ //# sourceMappingURL=useAttachmentStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentStyles.styles.ts"],"sourcesContent":["import {\n createCustomFocusIndicatorStyle,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n slot,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\nimport type { AttachmentSlots, AttachmentState } from './Attachment.types';\nimport type { GriffelResetStyle, SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentClassNames: SlotClassNames<AttachmentSlots> = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon',\n progress: 'fai-Attachment__progress',\n};\n\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst ATTACHMENT_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n width: 'fit-content',\n alignSelf: 'end',\n position: 'relative',\n});\n\nconst buttonBaseStyles: GriffelResetStyle = {\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n ...shorthands.outline(tokens.strokeWidthThick, 'solid', tokens.colorStrokeFocus2),\n zIndex: 1,\n }),\n verticalAlign: 'middle',\n};\n\nconst usePrimaryActionBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n});\n\nconst usePrimaryActionStyles = makeStyles({\n button: {\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n});\n\nconst useDismissButtonBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2BrandHover,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: ATTACHMENT_SIZE,\n lineHeight: ATTACHMENT_SIZE,\n width: ATTACHMENT_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useDismissIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\nconst useImageOnlyStyles = makeStyles({\n primaryAction: {\n ...shorthands.padding(0),\n },\n content: {\n lineHeight: 0,\n },\n});\n\nexport const useOverflowStyles = makeStyles({\n overflow: {\n width: '100%',\n },\n});\n\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = (state: AttachmentState): AttachmentState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const progressBarStyles = useProgressBarStyles();\n const primaryActionStyles = usePrimaryActionStyles();\n const imageOnlyStyles = useImageOnlyStyles();\n const { imageOnly, primaryAction } = state;\n\n state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);\n state.primaryAction.className = mergeClasses(\n attachmentClassNames.primaryAction,\n primaryActionBaseClassName,\n primaryAction.as !== 'span' && !state.isLoading && primaryActionStyles.button,\n imageOnly && imageOnlyStyles.primaryAction,\n state.primaryAction.className,\n );\n state.dismissButton.className = mergeClasses(\n attachmentClassNames.dismissButton,\n dismissButtonBaseClassName,\n state.dismissButton.className,\n );\n if (state.media) {\n state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(\n attachmentClassNames.content,\n contentBaseClassName,\n imageOnly && imageOnlyStyles.content,\n state.content.className,\n );\n state.dismissIcon.className = mergeClasses(\n attachmentClassNames.dismissIcon,\n dismissIconBaseClassName,\n state.dismissIcon.className,\n );\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["createCustomFocusIndicatorStyle","makeResetStyles","makeStyles","mergeClasses","shorthands","slot","tokens","typographyStyles","useProgressBarStyles","attachmentClassNames","root","primaryAction","dismissButton","media","content","dismissIcon","progress","ATTACHMENT_MAXWIDTH","ATTACHMENT_SIZE","useRootBaseClassName","display","flexWrap","verticalAlign","boxSizing","width","alignSelf","position","buttonBaseStyles","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","zIndex","usePrimaryActionBaseClassName","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","maxWidth","spacingHorizontalXXS","spacingHorizontalXS","padding","spacingVerticalXS","spacingHorizontalS","usePrimaryActionStyles","button","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","useDismissButtonBaseClassName","minWidth","borderLeftColor","borderTopLeftRadius","borderBottomLeftRadius","colorNeutralForeground2BrandHover","colorBrandForegroundLinkHover","colorNeutralForeground2BrandPressed","useMediaBaseClassName","fontSize","height","lineHeight","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useDismissIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","useImageOnlyStyles","useOverflowStyles","overflow","useAttachmentStyles_unstable","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","progressBarStyles","primaryActionStyles","imageOnlyStyles","imageOnly","className","as","isLoading","bar","optional","elementType","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,+BAA+B,EAC/BC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,IAAI,EACJC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AACpC,SAASC,oBAAoB,QAAQ,uCAAuC;AAI5E,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,aAAa;IACbC,UAAU;AACZ,EAAE;AAEF,MAAMC,sBAAsB;AAC5B,MAAMC,kBAAkB;AAExB,MAAMC,uBAAuBlB,gBAAgB;IAC3CmB,SAAS;IACTC,UAAU;IACVC,eAAe;IACfC,WAAW;IACXC,OAAO;IACPC,WAAW;IACXC,UAAU;AACZ;AAEA,MAAMC,mBAAsC;IAC1CC,YAAY;IACZC,iBAAiBvB,OAAOwB,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEzB,OAAO0B,eAAe,CAAC,OAAO,EAAE1B,OAAO2B,mBAAmB,CAAC,CAAC;IACvEC,cAAc5B,OAAO6B,kBAAkB;IACvCZ,WAAW;IACXa,WAAW9B,OAAO+B,uBAAuB;IACzCC,OAAOhC,OAAOiC,uBAAuB;IACrCC,QAAQ;IACRpB,SAAS;IACTC,UAAU;IACVoB,gBAAgB;IAChB,GAAGzC,gCAAgC;QACjC,GAAGI,WAAWsC,OAAO,CAACpC,OAAOqC,gBAAgB,EAAE,SAASrC,OAAOsC,iBAAiB,CAAC;QACjFC,QAAQ;IACV,EAAE;IACFvB,eAAe;AACjB;AAEA,MAAMwB,gCAAgC7C,gBAAgB;IACpD,GAAG0B,gBAAgB;IACnBoB,sBAAsBzC,OAAO0C,gBAAgB;IAC7CC,yBAAyB3C,OAAO0C,gBAAgB;IAChDE,kBAAkB;IAClBC,UAAU,CAAC,KAAK,EAAElC,oBAAoB,GAAG,EAAEC,gBAAgB,GAAG,EAAEZ,OAAO0B,eAAe,CAAC,OAAO,EAAE1B,OAAO8C,oBAAoB,CAAC,GAAG,EAAE9C,OAAO+C,mBAAmB,CAAC,CAAC,CAAC;IAC9JC,SAAS,CAAC,EAAEhD,OAAOiD,iBAAiB,CAAC,CAAC,EAAEjD,OAAOkD,kBAAkB,CAAC,CAAC,EAAElD,OAAOiD,iBAAiB,CAAC,CAAC,EAAEjD,OAAOkD,kBAAkB,CAAC,CAAC;AAC9H;AAEA,MAAMC,yBAAyBvD,WAAW;IACxCwD,QAAQ;QACN,UAAU;YACRlB,QAAQ;YACRX,iBAAiBvB,OAAOqD,4BAA4B;YACpDrB,OAAOhC,OAAOsD,4BAA4B;QAC5C;QACA,WAAW;YACT/B,iBAAiBvB,OAAOuD,8BAA8B;YACtDvB,OAAOhC,OAAOwD,8BAA8B;QAC9C;QACA,kCAAkC;YAChC,UAAU;gBACRjC,iBAAiB;YACnB;YACA,WAAW;gBACTA,iBAAiB;YACnB;QACF;IACF;AACF;AAEA,MAAMkC,gCAAgC9D,gBAAgB;IACpD,GAAG0B,gBAAgB;IAEnB2B,SAAS,CAAC,EAAEhD,OAAOiD,iBAAiB,CAAC,CAAC,EAAEjD,OAAO+C,mBAAmB,CAAC,CAAC,EAAE/C,OAAOiD,iBAAiB,CAAC,CAAC,EAAEjD,OAAO+C,mBAAmB,CAAC,CAAC;IAC9HF,UAAU,CAAC,KAAK,EAAEjC,gBAAgB,GAAG,EAAEZ,OAAO0B,eAAe,CAAC,OAAO,EAAE1B,OAAO8C,oBAAoB,CAAC,IAAI,EAAE9C,OAAO+C,mBAAmB,CAAC,CAAC;IACrIW,UAAU,CAAC,KAAK,EAAE9C,gBAAgB,GAAG,EAAEZ,OAAO0B,eAAe,CAAC,OAAO,EAAE1B,OAAO8C,oBAAoB,CAAC,IAAI,EAAE9C,OAAO+C,mBAAmB,CAAC,CAAC;IAErI,WAAW;IACXY,iBAAiB3D,OAAO2B,mBAAmB;IAC3CiC,qBAAqB5D,OAAO0C,gBAAgB;IAC5CmB,wBAAwB7D,OAAO0C,gBAAgB;IAE/CD,sBAAsBzC,OAAO6B,kBAAkB;IAC/Cc,yBAAyB3C,OAAO6B,kBAAkB;IAElD,UAAU;QACRK,QAAQ;QACRX,iBAAiBvB,OAAOqD,4BAA4B;QACpDrB,OAAOhC,OAAO8D,iCAAiC;QAC/C,CAAC,CAAC,GAAG,EAAE3D,qBAAqBM,WAAW,CAAC,CAAC,CAAC,EAAE;YAC1CuB,OAAOhC,OAAO+D,6BAA6B;QAC7C;IACF;IACA,WAAW;QACTxC,iBAAiBvB,OAAOuD,8BAA8B;QACtDvB,OAAOhC,OAAOgE,mCAAmC;IACnD;IACA,UAAU;QACR,CAAC,CAAC,GAAG,EAAE7D,qBAAqBM,WAAW,CAAC,CAAC,CAAC,EAAE;YAC1CuB,OAAOhC,OAAO8D,iCAAiC;QACjD;IACF;IACA,kCAAkC;QAChC,UAAU;YACRvC,iBAAiB;QACnB;QACA,WAAW;YACTA,iBAAiB;QACnB;IACF;AACF;AAEA,MAAM0C,wBAAwBtE,gBAAgB;IAC5CmB,SAAS;IACToD,UAAUtD;IACVuD,QAAQvD;IACRwD,YAAYxD;IACZM,OAAON;AACT;AAEA,MAAMyD,0BAA0B1E,gBAAgB;IAC9C2E,WAAW;IACXC,cAAc;IACdC,YAAY;IACZ,GAAGvE,iBAAiBwE,KAAK;AAC3B;AAEA,MAAMC,8BAA8B/E,gBAAgB;IAClD2B,YAAY;IACZM,cAAc5B,OAAO2E,oBAAoB;IACzClD,QAAQ,CAAC,EAAEzB,OAAO0B,eAAe,CAAC,OAAO,EAAE1B,OAAO4E,sBAAsB,CAAC,CAAC;IAC1E3D,WAAW;IACXe,OAAOhC,OAAOiC,uBAAuB;IACrCnB,SAAS;IACToD,UAAUtD;IACVuD,QAAQ,CAAC,KAAK,EAAEvD,gBAAgB,GAAG,EAAEZ,OAAO0B,eAAe,CAAC,OAAO,EAAE1B,OAAO6E,kBAAkB,CAAC,CAAC,CAAC;IACjG1C,gBAAgB;IAChBU,UAAU,CAAC,KAAK,EAAEjC,gBAAgB,GAAG,EAAEZ,OAAO0B,eAAe,CAAC,OAAO,EAAE1B,OAAO8C,oBAAoB,CAAC,CAAC,CAAC;IACrGY,UAAU,CAAC,KAAK,EAAE9C,gBAAgB,GAAG,EAAEZ,OAAO0B,eAAe,CAAC,OAAO,EAAE1B,OAAO8C,oBAAoB,CAAC,CAAC,CAAC;IACrGE,SAAS,CAAC,KAAK,EAAEhD,OAAO6E,kBAAkB,CAAC,WAAW,EAAE7E,OAAO8C,oBAAoB,CAAC,KAAK,CAAC;AAC5F;AAEA,MAAMgC,qBAAqBlF,WAAW;IACpCS,eAAe;QACb,GAAGP,WAAWkD,OAAO,CAAC,EAAE;IAC1B;IACAxC,SAAS;QACP4D,YAAY;IACd;AACF;AAEA,OAAO,MAAMW,oBAAoBnF,WAAW;IAC1CoF,UAAU;QACR9D,OAAO;IACT;AACF,GAAG;AAEH;;CAEC,GACD,OAAO,MAAM+D,+BAA+B,CAACC;IAC3C;IAEA,MAAMC,oBAAoBtE;IAC1B,MAAMuE,6BAA6B5C;IACnC,MAAM6C,6BAA6B5B;IACnC,MAAM6B,qBAAqBrB;IAC3B,MAAMsB,uBAAuBlB;IAC7B,MAAMmB,2BAA2Bd;IACjC,MAAMe,oBAAoBvF;IAC1B,MAAMwF,sBAAsBvC;IAC5B,MAAMwC,kBAAkBb;IACxB,MAAM,EAAEc,SAAS,EAAEvF,aAAa,EAAE,GAAG6E;IAErCA,MAAM9E,IAAI,CAACyF,SAAS,GAAGhG,aAAaM,qBAAqBC,IAAI,EAAE+E,mBAAmBD,MAAM9E,IAAI,CAACyF,SAAS;IACtGX,MAAM7E,aAAa,CAACwF,SAAS,GAAGhG,aAC9BM,qBAAqBE,aAAa,EAClC+E,4BACA/E,cAAcyF,EAAE,KAAK,UAAU,CAACZ,MAAMa,SAAS,IAAIL,oBAAoBtC,MAAM,EAC7EwC,aAAaD,gBAAgBtF,aAAa,EAC1C6E,MAAM7E,aAAa,CAACwF,SAAS;IAE/BX,MAAM5E,aAAa,CAACuF,SAAS,GAAGhG,aAC9BM,qBAAqBG,aAAa,EAClC+E,4BACAH,MAAM5E,aAAa,CAACuF,SAAS;IAE/B,IAAIX,MAAM3E,KAAK,EAAE;QACf2E,MAAM3E,KAAK,CAACsF,SAAS,GAAGhG,aAAaM,qBAAqBI,KAAK,EAAE+E,oBAAoBJ,MAAM3E,KAAK,CAACsF,SAAS;IAC5G;IACAX,MAAM1E,OAAO,CAACqF,SAAS,GAAGhG,aACxBM,qBAAqBK,OAAO,EAC5B+E,sBACAK,aAAaD,gBAAgBnF,OAAO,EACpC0E,MAAM1E,OAAO,CAACqF,SAAS;IAEzBX,MAAMzE,WAAW,CAACoF,SAAS,GAAGhG,aAC5BM,qBAAqBM,WAAW,EAChC+E,0BACAN,MAAMzE,WAAW,CAACoF,SAAS;IAG7B,IAAIX,MAAMxE,QAAQ,EAAE;QAClBwE,MAAMxE,QAAQ,CAACmF,SAAS,GAAGhG,aACzBM,qBAAqBO,QAAQ,EAC7B+E,kBAAkB/E,QAAQ,EAC1BwE,MAAMxE,QAAQ,CAACmF,SAAS;QAG1B,MAAMG,MAAMjG,KAAKkG,QAAQ,CAACf,MAAMxE,QAAQ,CAACsF,GAAG,EAAE;YAAEE,aAAa;YAAOC,iBAAiB;QAAK;QAC1F,IAAIH,KAAK;YACP,IAAId,MAAMxE,QAAQ,CAAC0F,KAAK,KAAKC,WAAW;gBACtCL,IAAIH,SAAS,GAAGhG,aAAa4F,kBAAkBa,wBAAwB,EAAEN,IAAIH,SAAS;YACxF,OAAO;gBACLG,IAAIH,SAAS,GAAGhG,aAAa4F,kBAAkBc,kBAAkB,EAAEP,IAAIH,SAAS;YAClF;YACAX,MAAMxE,QAAQ,CAACsF,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOd;AACT,EAAE"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useAttachmentList_unstable } from './useAttachmentList';
3
3
  import { renderAttachmentList_unstable } from './renderAttachmentList';
4
- import { useAttachmentListStyles_unstable } from './useAttachmentListStyles';
4
+ import { useAttachmentListStyles_unstable } from './useAttachmentListStyles.styles';
5
5
  import { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';
6
6
  export const AttachmentList = /*#__PURE__*/React.forwardRef((props, ref) => {
7
7
  const state = useAttachmentList_unstable(props, ref);
@@ -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';\nimport { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';\nimport type { AttachmentListProps } from './AttachmentList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\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\n return renderAttachmentList_unstable(state, contextValues);\n});\n\nAttachmentList.displayName = 'AttachmentList';\n"],"names":["React","useAttachmentList_unstable","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentListContextValues_unstable","AttachmentList","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,uCAAuC,QAAQ,mCAAmC;AAI3F,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAChD,MAAME,gBAAgBN,wCAAwCK;IAE9DN,iCAAiCM;IAEjC,OAAOP,8BAA8BO,OAAOC;AAC9C,GAAG;AAEHL,eAAeM,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';\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\n return renderAttachmentList_unstable(state, contextValues);\n});\n\nAttachmentList.displayName = 'AttachmentList';\n"],"names":["React","useAttachmentList_unstable","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentListContextValues_unstable","AttachmentList","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AACpF,SAASC,uCAAuC,QAAQ,mCAAmC;AAI3F,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAChD,MAAME,gBAAgBN,wCAAwCK;IAE9DN,iCAAiCM;IAEjC,OAAOP,8BAA8BO,OAAOC;AAC9C,GAAG;AAEHL,eAAeM,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentListContextValue } from '../../contexts/attachmentListContext';\n\nexport type AttachmentListSlots = {\n root: Slot<'div'>;\n};\n\nexport type AttachmentDismissedData = {\n id: string;\n};\n\n/**\n * AttachmentList Props\n */\nexport type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {\n onAttachmentDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>,\n data: AttachmentDismissedData,\n ) => void;\n};\n\n/**\n * State used in rendering AttachmentList\n */\nexport type AttachmentListState = ComponentState<AttachmentListSlots> &\n Pick<AttachmentListProps, 'onAttachmentDismiss'>;\n\nexport type AttachmentListContextValues = {\n attachmentList: AttachmentListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AA2BA,WAEE"}
1
+ {"version":3,"sources":["AttachmentList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentListContextValue } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps } from '../Attachment';\nimport type { AttachmentOverflowMenuProps } from '../AttachmentOverflowMenu';\n\nexport type AttachmentListSlots = {\n root: Slot<'div'>;\n overflowMenuButton: Slot<'span'>;\n overflowMenuItem: Slot<'span'>;\n};\n\nexport type AttachmentDismissedData = {\n content?: AttachmentProps['children'];\n media?: AttachmentProps['media'];\n id?: string;\n};\n\n/**\n * AttachmentList Props\n */\nexport type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {\n onAttachmentDismiss?: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>,\n data: AttachmentDismissedData,\n ) => void;\n overflowMenuProps?: Omit<AttachmentOverflowMenuProps, 'children'>;\n /**\n * The maximum number of attachments to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * @default undefined\n */\n maxVisibleAttachments?: number;\n};\n\n/**\n * State used in rendering AttachmentList\n */\nexport type AttachmentListState = ComponentState<AttachmentListSlots> &\n Pick<AttachmentListProps, 'onAttachmentDismiss' | 'overflowMenuProps'> & {\n attachments: AttachmentProps[];\n shouldUseOverflow: boolean;\n };\n\nexport type AttachmentListContextValues = {\n attachmentList: AttachmentListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AA4CA,WAEE"}
@@ -2,5 +2,5 @@ export * from './AttachmentList';
2
2
  export * from './AttachmentList.types';
3
3
  export * from './renderAttachmentList';
4
4
  export * from './useAttachmentList';
5
- export * from './useAttachmentListStyles';
5
+ export * from './useAttachmentListStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentList';\nexport * from './AttachmentList.types';\nexport * from './renderAttachmentList';\nexport * from './useAttachmentList';\nexport * from './useAttachmentListStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,4BAA4B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentList';\nexport * from './AttachmentList.types';\nexport * from './renderAttachmentList';\nexport * from './useAttachmentList';\nexport * from './useAttachmentListStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,mCAAmC"}
@@ -1,14 +1,41 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
- import { assertSlots } from '@fluentui/react-components';
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { createElement as _createElement } from "@fluentui/react-jsx-runtime";
3
+ import { MenuList, MenuPopover, Overflow, assertSlots } from '@fluentui/react-components';
3
4
  import { AttachmentListProvider } from '../../contexts/attachmentListContext';
5
+ import { AttachmentOverflowMenu } from '../AttachmentOverflowMenu';
6
+ import { AttachmentOverflowMenuItem } from '../AttachmentOverflowMenuItem';
4
7
  /**
5
8
  * Render the final JSX of AttachmentList
6
9
  */
7
10
  export const renderAttachmentList_unstable = (state, contextValues) => {
8
11
  assertSlots(state);
12
+ const {
13
+ attachments,
14
+ overflowMenuProps,
15
+ root,
16
+ shouldUseOverflow
17
+ } = state;
9
18
  return /*#__PURE__*/_jsx(AttachmentListProvider, {
10
19
  value: contextValues.attachmentList,
11
- children: /*#__PURE__*/_jsx(state.root, {})
20
+ children: shouldUseOverflow ? /*#__PURE__*/_jsx(Overflow, {
21
+ ref: root.ref,
22
+ children: /*#__PURE__*/_jsxs(state.root, {
23
+ children: [root.children, /*#__PURE__*/_jsxs(AttachmentOverflowMenu, {
24
+ positioning: 'above',
25
+ ...overflowMenuProps,
26
+ children: [/*#__PURE__*/_jsx(state.overflowMenuButton, {}), /*#__PURE__*/_jsx(MenuPopover, {
27
+ children: /*#__PURE__*/_jsx(MenuList, {
28
+ children: attachments.map(attachment => {
29
+ return /*#__PURE__*/_createElement(AttachmentOverflowMenuItem, {
30
+ ...attachment,
31
+ key: attachment.id
32
+ });
33
+ })
34
+ })
35
+ })]
36
+ })]
37
+ })
38
+ }) : /*#__PURE__*/_jsx(state.root, {})
12
39
  });
13
40
  };
14
41
  //# sourceMappingURL=renderAttachmentList.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachmentList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport { AttachmentListProvider } from '../../contexts/attachmentListContext';\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\n return (\n <AttachmentListProvider value={contextValues.attachmentList}>\n <state.root />\n </AttachmentListProvider>\n );\n};\n"],"names":["assertSlots","AttachmentListProvider","renderAttachmentList_unstable","state","contextValues","value","attachmentList","root"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AACzD,SAASC,sBAAsB,QAAQ,uCAAuC;AAG9E;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEAJ,YAAiCG;IAEjC,qBACE,KAACF;QAAuBI,OAAOD,cAAcE,cAAc;kBACzD,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["renderAttachmentList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { MenuList, MenuPopover, Overflow, assertSlots } from '@fluentui/react-components';\nimport { AttachmentListProvider } from '../../contexts/attachmentListContext';\nimport { AttachmentOverflowMenu } from '../AttachmentOverflowMenu';\nimport { AttachmentOverflowMenuItem } from '../AttachmentOverflowMenuItem';\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 { attachments, overflowMenuProps, root, shouldUseOverflow } = state;\n\n return (\n <AttachmentListProvider value={contextValues.attachmentList}>\n {shouldUseOverflow ? (\n <Overflow ref={root.ref}>\n <state.root>\n {root.children}\n <AttachmentOverflowMenu positioning={'above'} {...overflowMenuProps}>\n <state.overflowMenuButton />\n <MenuPopover>\n <MenuList>\n {attachments.map(attachment => {\n return <AttachmentOverflowMenuItem {...attachment} key={attachment.id} />;\n })}\n </MenuList>\n </MenuPopover>\n </AttachmentOverflowMenu>\n </state.root>\n </Overflow>\n ) : (\n <state.root />\n )}\n </AttachmentListProvider>\n );\n};\n"],"names":["MenuList","MenuPopover","Overflow","assertSlots","AttachmentListProvider","AttachmentOverflowMenu","AttachmentOverflowMenuItem","renderAttachmentList_unstable","state","contextValues","attachments","overflowMenuProps","root","shouldUseOverflow","value","attachmentList","ref","children","positioning","overflowMenuButton","map","attachment","key","id"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;;AAEjD,SAASA,QAAQ,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,WAAW,QAAQ,6BAA6B;AAC1F,SAASC,sBAAsB,QAAQ,uCAAuC;AAC9E,SAASC,sBAAsB,QAAQ,4BAA4B;AACnE,SAASC,0BAA0B,QAAQ,gCAAgC;AAG3E;;CAEC,GACD,OAAO,MAAMC,gCAAgC,CAC3CC,OACAC;IAEAN,YAAiCK;IACjC,MAAM,EAAEE,WAAW,EAAEC,iBAAiB,EAAEC,IAAI,EAAEC,iBAAiB,EAAE,GAAGL;IAEpE,qBACE,KAACJ;QAAuBU,OAAOL,cAAcM,cAAc;kBACxDF,kCACC,KAACX;YAASc,KAAKJ,KAAKI,GAAG;sBACrB,cAAA,MAACR,MAAMI,IAAI;;oBACRA,KAAKK,QAAQ;kCACd,MAACZ;wBAAuBa,aAAa;wBAAU,GAAGP,iBAAiB;;0CACjE,KAACH,MAAMW,kBAAkB;0CACzB,KAAClB;0CACC,cAAA,KAACD;8CACEU,YAAYU,GAAG,CAACC,CAAAA;wCACf,qBAAO,eAACf;4CAA4B,GAAGe,UAAU;4CAAEC,KAAKD,WAAWE,EAAE;;oCACvE;;;;;;;2BAOV,KAACf,MAAMI,IAAI;;AAInB,EAAE"}