@fluentui-copilot/react-attachments 0.8.2 → 0.9.0

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 (164) hide show
  1. package/CHANGELOG.json +63 -1
  2. package/CHANGELOG.md +28 -2
  3. package/dist/index.d.ts +220 -5
  4. package/lib/AttachmentList.js +2 -0
  5. package/lib/AttachmentList.js.map +1 -0
  6. package/lib/AttachmentOverflowMenu.js +2 -0
  7. package/lib/AttachmentOverflowMenu.js.map +1 -0
  8. package/lib/AttachmentOverflowMenuButton.js +2 -0
  9. package/lib/AttachmentOverflowMenuButton.js.map +1 -0
  10. package/lib/AttachmentOverflowMenuItem.js +2 -0
  11. package/lib/AttachmentOverflowMenuItem.js.map +1 -0
  12. package/lib/components/Attachment/Attachment.types.js.map +1 -1
  13. package/lib/components/Attachment/useAttachment.js +6 -8
  14. package/lib/components/Attachment/useAttachment.js.map +1 -1
  15. package/lib/components/Attachment/useAttachmentStyles.js +2 -2
  16. package/lib/components/Attachment/useAttachmentStyles.js.map +1 -1
  17. package/lib/components/AttachmentList/AttachmentList.js +13 -0
  18. package/lib/components/AttachmentList/AttachmentList.js.map +1 -0
  19. package/lib/components/AttachmentList/AttachmentList.types.js +2 -0
  20. package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -0
  21. package/lib/components/AttachmentList/index.js +6 -0
  22. package/lib/components/AttachmentList/index.js.map +1 -0
  23. package/lib/components/AttachmentList/renderAttachmentList.js +14 -0
  24. package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -0
  25. package/lib/components/AttachmentList/useAttachmentList.js +74 -0
  26. package/lib/components/AttachmentList/useAttachmentList.js.map +1 -0
  27. package/lib/components/AttachmentList/useAttachmentListContextValues.js +13 -0
  28. package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -0
  29. package/lib/components/AttachmentList/useAttachmentListStyles.js +14 -0
  30. package/lib/components/AttachmentList/useAttachmentListStyles.js.map +1 -0
  31. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +15 -0
  32. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  33. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -0
  34. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  35. package/lib/components/AttachmentOverflowMenu/index.js +6 -0
  36. package/lib/components/AttachmentOverflowMenu/index.js.map +1 -0
  37. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +18 -0
  38. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  39. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +24 -0
  40. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  41. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +17 -0
  42. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  43. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +11 -0
  44. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
  45. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +2 -0
  46. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
  47. package/lib/components/AttachmentOverflowMenuButton/index.js +6 -0
  48. package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -0
  49. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +14 -0
  50. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
  51. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +32 -0
  52. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
  53. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +17 -0
  54. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
  55. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +11 -0
  56. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
  57. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +2 -0
  58. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
  59. package/lib/components/AttachmentOverflowMenuItem/index.js +6 -0
  60. package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -0
  61. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +10 -0
  62. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
  63. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -0
  64. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
  65. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +14 -0
  66. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
  67. package/lib/components/AttachmentTag/AttachmentTag.js +4 -1
  68. package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
  69. package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  70. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -0
  71. package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  72. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  73. package/lib/components/AttachmentTagList/AttachmentTagList.js +4 -1
  74. package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  75. package/lib/components/AttachmentTagList/useAttachmentTagList.js +2 -2
  76. package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
  77. package/lib/components/index.js +5 -0
  78. package/lib/components/index.js.map +1 -1
  79. package/lib/components/utils/useAttachmentTagSlots.js +2 -2
  80. package/lib/components/utils/useAttachmentTagSlots.js.map +1 -1
  81. package/lib/contexts/attachmentListContext.js +8 -0
  82. package/lib/contexts/attachmentListContext.js.map +1 -0
  83. package/lib/contexts/attachmentOverflowMenuContext.js +10 -0
  84. package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
  85. package/lib/index.js +6 -0
  86. package/lib/index.js.map +1 -1
  87. package/lib-commonjs/AttachmentList.js +7 -0
  88. package/lib-commonjs/AttachmentList.js.map +1 -0
  89. package/lib-commonjs/AttachmentOverflowMenu.js +7 -0
  90. package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -0
  91. package/lib-commonjs/AttachmentOverflowMenuButton.js +7 -0
  92. package/lib-commonjs/AttachmentOverflowMenuButton.js.map +1 -0
  93. package/lib-commonjs/AttachmentOverflowMenuItem.js +7 -0
  94. package/lib-commonjs/AttachmentOverflowMenuItem.js.map +1 -0
  95. package/lib-commonjs/components/Attachment/useAttachment.js +5 -7
  96. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  97. package/lib-commonjs/components/Attachment/useAttachmentStyles.js +4 -4
  98. package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -1
  99. package/lib-commonjs/components/AttachmentList/AttachmentList.js +23 -0
  100. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -0
  101. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +5 -0
  102. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -0
  103. package/lib-commonjs/components/AttachmentList/index.js +11 -0
  104. package/lib-commonjs/components/AttachmentList/index.js.map +1 -0
  105. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +20 -0
  106. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -0
  107. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +68 -0
  108. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -0
  109. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +20 -0
  110. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -0
  111. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js +30 -0
  112. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +1 -0
  113. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +24 -0
  114. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  115. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +5 -0
  116. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  117. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +11 -0
  118. package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -0
  119. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +21 -0
  120. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  121. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +21 -0
  122. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  123. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +22 -0
  124. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  125. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +21 -0
  126. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
  127. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +5 -0
  128. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
  129. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +11 -0
  130. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -0
  131. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +24 -0
  132. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
  133. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +28 -0
  134. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
  135. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +37 -0
  136. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
  137. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +21 -0
  138. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
  139. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +5 -0
  140. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
  141. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +11 -0
  142. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -0
  143. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +16 -0
  144. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
  145. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +39 -0
  146. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
  147. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +28 -0
  148. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
  149. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
  150. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  151. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  152. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +1 -1
  153. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
  154. package/lib-commonjs/components/index.js +5 -0
  155. package/lib-commonjs/components/index.js.map +1 -1
  156. package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
  157. package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
  158. package/lib-commonjs/contexts/attachmentListContext.js +28 -0
  159. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -0
  160. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
  161. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
  162. package/lib-commonjs/index.js +78 -0
  163. package/lib-commonjs/index.js.map +1 -1
  164. package/package.json +2 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,69 @@
2
2
  "name": "@fluentui-copilot/react-attachments",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 03 Apr 2024 00:23:26 GMT",
5
+ "date": "Wed, 10 Apr 2024 23:06:59 GMT",
6
+ "tag": "@fluentui-copilot/react-attachments_v0.9.0",
7
+ "version": "0.9.0",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "tristan.watanabe@gmail.com",
12
+ "package": "@fluentui-copilot/react-attachments",
13
+ "commit": "4e6e2a4e710f03067f5b3e5cac0137c42d35bf2f",
14
+ "comment": "feat: Implement AttachmentOverflowMenuButton."
15
+ },
16
+ {
17
+ "author": "tristan.watanabe@gmail.com",
18
+ "package": "@fluentui-copilot/react-attachments",
19
+ "commit": "7fb364f96cb69368bcbeeb961f088885f064be80",
20
+ "comment": "feat: Implement AttachmentOverflowMenuItem."
21
+ },
22
+ {
23
+ "author": "tristan.watanabe@gmail.com",
24
+ "package": "@fluentui-copilot/react-attachments",
25
+ "commit": "9453a2398ba32118a85c358b6de13799cf7d9949",
26
+ "comment": "feat: Implement AttachmentOverflowMenu."
27
+ },
28
+ {
29
+ "author": "tristan.watanabe@gmail.com",
30
+ "package": "@fluentui-copilot/react-attachments",
31
+ "commit": "4fc60898effc3b41c3642f1dda4b93ade0280dd0",
32
+ "comment": "chore: deprecate AttachmentTag, AttachmentTagList and AttachmentTagItem."
33
+ }
34
+ ],
35
+ "minor": [
36
+ {
37
+ "author": "Humberto.Morimoto@microsoft.com",
38
+ "package": "@fluentui-copilot/react-attachments",
39
+ "commit": "2afa98912cd99ed6f604c582caee4d49d1ba895d",
40
+ "comment": "fix: Replace usage of deprecated getNativeElementProps with getIntrinsicElementProps."
41
+ }
42
+ ]
43
+ }
44
+ },
45
+ {
46
+ "date": "Wed, 03 Apr 2024 22:27:34 GMT",
47
+ "tag": "@fluentui-copilot/react-attachments_v0.8.3",
48
+ "version": "0.8.3",
49
+ "comments": {
50
+ "patch": [
51
+ {
52
+ "author": "tristan.watanabe@gmail.com",
53
+ "package": "@fluentui-copilot/react-attachments",
54
+ "commit": "db2c9191dc03bf477de894b8fb8a6c349147157b",
55
+ "comment": "fix: use getIntrinsicElementProps to replace deprecated getNativeElementProps."
56
+ },
57
+ {
58
+ "author": "tristan.watanabe@gmail.com",
59
+ "package": "@fluentui-copilot/react-attachments",
60
+ "commit": "6b759badcb2260ef4901988973ec37e9bed35a1f",
61
+ "comment": "feat: Implement AttachmentList component."
62
+ }
63
+ ]
64
+ }
65
+ },
66
+ {
67
+ "date": "Wed, 03 Apr 2024 00:23:41 GMT",
6
68
  "tag": "@fluentui-copilot/react-attachments_v0.8.2",
7
69
  "version": "0.8.2",
8
70
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,38 @@
1
1
  # Change Log - @fluentui-copilot/react-attachments
2
2
 
3
- This log was last generated on Wed, 03 Apr 2024 00:23:26 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 10 Apr 2024 23:06:59 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.9.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.9.0)
8
+
9
+ Wed, 10 Apr 2024 23:06:59 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.3..@fluentui-copilot/react-attachments_v0.9.0)
11
+
12
+ ### Minor changes
13
+
14
+ - fix: Replace usage of deprecated getNativeElementProps with getIntrinsicElementProps. ([PR #1512](https://github.com/microsoft/fluentai/pull/1512) by Humberto.Morimoto@microsoft.com)
15
+
16
+ ### Patches
17
+
18
+ - feat: Implement AttachmentOverflowMenuButton. ([PR #1515](https://github.com/microsoft/fluentai/pull/1515) by tristan.watanabe@gmail.com)
19
+ - feat: Implement AttachmentOverflowMenuItem. ([PR #1517](https://github.com/microsoft/fluentai/pull/1517) by tristan.watanabe@gmail.com)
20
+ - feat: Implement AttachmentOverflowMenu. ([PR #1504](https://github.com/microsoft/fluentai/pull/1504) by tristan.watanabe@gmail.com)
21
+ - chore: deprecate AttachmentTag, AttachmentTagList and AttachmentTagItem. ([PR #1529](https://github.com/microsoft/fluentai/pull/1529) by tristan.watanabe@gmail.com)
22
+
23
+ ## [0.8.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.8.3)
24
+
25
+ Wed, 03 Apr 2024 22:27:34 GMT
26
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.2..@fluentui-copilot/react-attachments_v0.8.3)
27
+
28
+ ### Patches
29
+
30
+ - fix: use getIntrinsicElementProps to replace deprecated getNativeElementProps. ([PR #1509](https://github.com/microsoft/fluentai/pull/1509) by tristan.watanabe@gmail.com)
31
+ - feat: Implement AttachmentList component. ([PR #1488](https://github.com/microsoft/fluentai/pull/1488) by tristan.watanabe@gmail.com)
32
+
7
33
  ## [0.8.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.8.2)
8
34
 
9
- Wed, 03 Apr 2024 00:23:26 GMT
35
+ Wed, 03 Apr 2024 00:23:41 GMT
10
36
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.8.1..@fluentui-copilot/react-attachments_v0.8.2)
11
37
 
12
38
  ### Patches
package/dist/index.d.ts CHANGED
@@ -2,7 +2,17 @@
2
2
 
3
3
  import type { ComponentProps } from '@fluentui/react-components';
4
4
  import type { ComponentState } from '@fluentui/react-components';
5
+ import type { Context } from '@fluentui/react-context-selector';
6
+ import type { ContextSelector } from '@fluentui/react-context-selector';
7
+ import { FC } from 'react';
5
8
  import type { ForwardRefComponent } from '@fluentui/react-components';
9
+ import type { MenuContextValues } from '@fluentui/react-components';
10
+ import type { MenuItem } from '@fluentui/react-components';
11
+ import type { MenuProps } from '@fluentui/react-components';
12
+ import type { MenuSlots } from '@fluentui/react-components';
13
+ import type { MenuState } from '@fluentui/react-components';
14
+ import { Provider } from 'react';
15
+ import { ProviderProps } from 'react';
6
16
  import * as React_2 from 'react';
7
17
  import type { Slot } from '@fluentui/react-components';
8
18
  import type { SlotClassNames } from '@fluentui/react-components';
@@ -11,10 +21,118 @@ export declare const Attachment: ForwardRefComponent<AttachmentProps>;
11
21
 
12
22
  export declare const attachmentClassNames: SlotClassNames<AttachmentSlots>;
13
23
 
24
+ declare type AttachmentDismissedData = {
25
+ id: string;
26
+ };
27
+
28
+ export declare const AttachmentList: ForwardRefComponent<AttachmentListProps>;
29
+
30
+ export declare const attachmentListClassNames: SlotClassNames<AttachmentListSlots>;
31
+
32
+ export declare const AttachmentListContext: Context<AttachmentListContextValue>;
33
+
34
+ /**
35
+ * Context shared between AttachmentList and its children components
36
+ */
37
+ export declare type AttachmentListContextValue = Pick<AttachmentListProps, 'onAttachmentDismiss'>;
38
+
39
+ declare type AttachmentListContextValues = {
40
+ attachmentList: AttachmentListContextValue;
41
+ };
42
+
43
+ /**
44
+ * AttachmentList Props
45
+ */
46
+ export declare type AttachmentListProps = ComponentProps<Partial<AttachmentListSlots>> & {
47
+ onAttachmentDismiss?: (e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>, data: AttachmentDismissedData) => void;
48
+ };
49
+
50
+ export declare const AttachmentListProvider: Provider<AttachmentListContextValue> & FC<ProviderProps<AttachmentListContextValue>>;
51
+
52
+ export declare type AttachmentListSlots = {
53
+ root: Slot<'div'>;
54
+ };
55
+
56
+ /**
57
+ * State used in rendering AttachmentList
58
+ */
59
+ export declare type AttachmentListState = ComponentState<AttachmentListSlots> & Pick<AttachmentListProps, 'onAttachmentDismiss'>;
60
+
61
+ export declare const AttachmentOverflowMenu: React_2.FC<AttachmentOverflowMenuProps>;
62
+
63
+ export declare const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps>;
64
+
65
+ export declare const attachmentOverflowMenuButtonClassNames: SlotClassNames<AttachmentOverflowMenuButtonSlots>;
66
+
67
+ /**
68
+ * AttachmentOverflowMenuButton Props
69
+ */
70
+ export declare type AttachmentOverflowMenuButtonProps = ComponentProps<Partial<AttachmentOverflowMenuButtonSlots>>;
71
+
72
+ export declare type AttachmentOverflowMenuButtonSlots = {
73
+ root: NonNullable<Slot<'button'>>;
74
+ };
75
+
76
+ /**
77
+ * State used in rendering AttachmentOverflowMenuButton
78
+ */
79
+ export declare type AttachmentOverflowMenuButtonState = ComponentState<AttachmentOverflowMenuButtonSlots> & Pick<AttachmentOverflowMenuState, 'isOverflowing' | 'overflowCount'>;
80
+
81
+ export declare const AttachmentOverflowMenuContext: Context<AttachmentOverflowMenuContextValue>;
82
+
83
+ /**
84
+ * Context shared between AttachmentOverflowMenu and its children components
85
+ */
86
+ export declare type AttachmentOverflowMenuContextValue = Pick<AttachmentOverflowMenuState, 'isOverflowing' | 'overflowButtonRef' | 'overflowCount'>;
87
+
88
+ declare type AttachmentOverflowMenuContextValues = {
89
+ attachmentOverflowMenu: AttachmentOverflowMenuContextValue;
90
+ };
91
+
92
+ export declare const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps>;
93
+
94
+ export declare const attachmentOverflowMenuItemClassNames: SlotClassNames<AttachmentOverflowMenuItemSlots>;
95
+
96
+ /**
97
+ * AttachmentOverflowMenuItem Props
98
+ */
99
+ export declare type AttachmentOverflowMenuItemProps = ComponentProps<Partial<AttachmentOverflowMenuItemSlots>> & Pick<AttachmentProps, 'id' | 'media'>;
100
+
101
+ export declare type AttachmentOverflowMenuItemSlots = {
102
+ root: NonNullable<Slot<typeof MenuItem>>;
103
+ };
104
+
105
+ /**
106
+ * State used in rendering AttachmentOverflowMenuItem
107
+ */
108
+ export declare type AttachmentOverflowMenuItemState = ComponentState<AttachmentOverflowMenuItemSlots> & {
109
+ isVisible: boolean;
110
+ };
111
+
112
+ /**
113
+ * AttachmentOverflowMenu Props
114
+ */
115
+ export declare type AttachmentOverflowMenuProps = MenuProps;
116
+
117
+ export declare const AttachmentOverflowMenuProvider: Provider<AttachmentOverflowMenuContextValue> & FC<ProviderProps<AttachmentOverflowMenuContextValue>>;
118
+
119
+ export declare type AttachmentOverflowMenuSlots = MenuSlots;
120
+
121
+ /**
122
+ * State used in rendering AttachmentOverflowMenu
123
+ */
124
+ export declare type AttachmentOverflowMenuState = MenuState & {
125
+ isOverflowing: boolean;
126
+ overflowButtonRef?: React.RefObject<HTMLButtonElement>;
127
+ overflowCount: number;
128
+ };
129
+
14
130
  /**
15
131
  * Attachment Props
16
132
  */
17
- export declare type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {};
133
+ export declare type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {
134
+ id: string;
135
+ };
18
136
 
19
137
  export declare type AttachmentSlots = {
20
138
  root: NonNullable<Slot<'div'>>;
@@ -30,6 +148,10 @@ export declare type AttachmentSlots = {
30
148
  */
31
149
  export declare type AttachmentState = ComponentState<AttachmentSlots>;
32
150
 
151
+ /**
152
+ * @deprecated use new Attachment component exported from @fluentui-copilot/react-attachments package instead.
153
+ * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
154
+ */
33
155
  export declare const AttachmentTag: ForwardRefComponent<AttachmentTagProps>;
34
156
 
35
157
  export declare const attachmentTagClassNames: SlotClassNames<AttachmentTagSlots>;
@@ -39,6 +161,10 @@ export declare type AttachmentTagDismissedData = {
39
161
  media?: AttachmentTagProps['media'];
40
162
  };
41
163
 
164
+ /**
165
+ * @deprecated use new AttachmentOverflowMenuItem component exported from @fluentui-copilot/react-attachments package instead.
166
+ * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
167
+ */
42
168
  export declare const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps>;
43
169
 
44
170
  export declare const attachmentTagItemClassNames: SlotClassNames<AttachmentTagItemSlots>;
@@ -60,6 +186,10 @@ export declare type AttachmentTagItemSlots = {
60
186
  */
61
187
  export declare type AttachmentTagItemState = ComponentState<AttachmentTagItemSlots>;
62
188
 
189
+ /**
190
+ * @deprecated use new AttachmentList component exported from @fluentui-copilot/react-attachments package instead.
191
+ * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
192
+ */
63
193
  export declare const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps>;
64
194
 
65
195
  export declare const attachmentTagListClassNames: SlotClassNames<AttachmentTagListSlots>;
@@ -111,6 +241,29 @@ export declare type AttachmentTagState = ComponentState<AttachmentTagSlots>;
111
241
  */
112
242
  export declare const renderAttachment_unstable: (state: AttachmentState) => JSX.Element;
113
243
 
244
+ /**
245
+ * Render the final JSX of AttachmentList
246
+ */
247
+ export declare const renderAttachmentList_unstable: (state: AttachmentListState, contextValues: AttachmentListContextValues) => JSX.Element;
248
+
249
+ /**
250
+ * Render the final JSX of AttachmentOverflowMenu
251
+ */
252
+ export declare const renderAttachmentOverflowMenu_unstable: (state: AttachmentOverflowMenuState, contextValues: {
253
+ menuContextValues: MenuContextValues;
254
+ attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;
255
+ }) => JSX.Element | null;
256
+
257
+ /**
258
+ * Render the final JSX of AttachmentOverflowMenuButton
259
+ */
260
+ export declare const renderAttachmentOverflowMenuButton_unstable: (state: AttachmentOverflowMenuButtonState) => JSX.Element | null;
261
+
262
+ /**
263
+ * Render the final JSX of AttachmentOverflowMenuItem
264
+ */
265
+ export declare const renderAttachmentOverflowMenuItem_unstable: (state: AttachmentOverflowMenuItemState) => JSX.Element | null;
266
+
114
267
  /**
115
268
  * Render the final JSX of AttachmentTag
116
269
  */
@@ -135,7 +288,69 @@ export declare const renderAttachmentTagList_unstable: (state: AttachmentTagList
135
288
  * @param props - props from this instance of Attachment
136
289
  * @param ref - reference to root HTMLElement of Attachment
137
290
  */
138
- export declare const useAttachment_unstable: (props: AttachmentProps, ref: React_2.Ref<HTMLElement>) => AttachmentState;
291
+ export declare const useAttachment_unstable: (props: AttachmentProps, ref: React_2.Ref<HTMLDivElement>) => AttachmentState;
292
+
293
+ /**
294
+ * Create the state required to render AttachmentList.
295
+ *
296
+ * The returned state can be modified with hooks such as useAttachmentListStyles_unstable,
297
+ * before being passed to renderAttachmentList_unstable.
298
+ *
299
+ * @param props - props from this instance of AttachmentList
300
+ * @param ref - reference to root HTMLElement of AttachmentList
301
+ */
302
+ export declare const useAttachmentList_unstable: (props: AttachmentListProps, ref: React_2.Ref<HTMLDivElement>) => AttachmentListState;
303
+
304
+ export declare const useAttachmentListContext_unstable: <T>(selector: ContextSelector<AttachmentListContextValue, T>) => T;
305
+
306
+ /**
307
+ * Apply styling to the AttachmentList slots based on the state
308
+ */
309
+ export declare const useAttachmentListStyles_unstable: (state: AttachmentListState) => AttachmentListState;
310
+
311
+ /**
312
+ * Create the state required to render AttachmentOverflowMenu.
313
+ *
314
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,
315
+ * before being passed to renderAttachmentOverflowMenu_unstable.
316
+ *
317
+ * @param props - props from this instance of AttachmentOverflowMenu
318
+ */
319
+ export declare const useAttachmentOverflowMenu_unstable: (props: AttachmentOverflowMenuProps) => AttachmentOverflowMenuState;
320
+
321
+ /**
322
+ * Create the state required to render AttachmentOverflowMenuButton.
323
+ *
324
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,
325
+ * before being passed to renderAttachmentOverflowMenuButton_unstable.
326
+ *
327
+ * @param props - props from this instance of AttachmentOverflowMenuButton
328
+ * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton
329
+ */
330
+ export declare const useAttachmentOverflowMenuButton_unstable: (props: AttachmentOverflowMenuButtonProps, ref: React.Ref<HTMLButtonElement>) => AttachmentOverflowMenuButtonState;
331
+
332
+ /**
333
+ * Apply styling to the AttachmentOverflowMenuButton slots based on the state
334
+ */
335
+ export declare const useAttachmentOverflowMenuButtonStyles_unstable: (state: AttachmentOverflowMenuButtonState) => AttachmentOverflowMenuButtonState;
336
+
337
+ export declare const useAttachmentOverflowMenuContext_unstable: <T>(selector: ContextSelector<AttachmentOverflowMenuContextValue, T>) => T;
338
+
339
+ /**
340
+ * Create the state required to render AttachmentOverflowMenuItem.
341
+ *
342
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,
343
+ * before being passed to renderAttachmentOverflowMenuItem_unstable.
344
+ *
345
+ * @param props - props from this instance of AttachmentOverflowMenuItem
346
+ * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem
347
+ */
348
+ export declare const useAttachmentOverflowMenuItem_unstable: (props: AttachmentOverflowMenuItemProps, ref: React_2.Ref<HTMLDivElement>) => AttachmentOverflowMenuItemState;
349
+
350
+ /**
351
+ * Apply styling to the AttachmentList slots based on the state
352
+ */
353
+ export declare const useAttachmentOverflowMenuItemStyles_unstable: (state: AttachmentOverflowMenuItemState) => AttachmentOverflowMenuItemState;
139
354
 
140
355
  /**
141
356
  * Apply styling to the Attachment slots based on the state
@@ -151,7 +366,7 @@ export declare const useAttachmentStyles_unstable: (state: AttachmentState) => A
151
366
  * @param props - props from this instance of AttachmentTag
152
367
  * @param ref - reference to root HTMLElement of AttachmentTag
153
368
  */
154
- export declare const useAttachmentTag_unstable: (props: AttachmentTagProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagState;
369
+ export declare const useAttachmentTag_unstable: (props: AttachmentTagProps, ref: React_2.Ref<HTMLButtonElement>) => AttachmentTagState;
155
370
 
156
371
  /**
157
372
  * Create the state required to render AttachmentTagItem.
@@ -162,7 +377,7 @@ export declare const useAttachmentTag_unstable: (props: AttachmentTagProps, ref:
162
377
  * @param props - props from this instance of AttachmentTagItem
163
378
  * @param ref - reference to root HTMLElement of AttachmentTagItem
164
379
  */
165
- export declare const useAttachmentTagItem_unstable: (props: AttachmentTagItemProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagItemState;
380
+ export declare const useAttachmentTagItem_unstable: (props: AttachmentTagItemProps, ref: React_2.Ref<HTMLDivElement>) => AttachmentTagItemState;
166
381
 
167
382
  /**
168
383
  * Apply styling to the AttachmentTagItem slots based on the state
@@ -178,7 +393,7 @@ export declare const useAttachmentTagItemStyles_unstable: (state: AttachmentTagI
178
393
  * @param props - props from this instance of AttachmentTagList
179
394
  * @param ref - reference to root HTMLElement of AttachmentTagList
180
395
  */
181
- export declare const useAttachmentTagList_unstable: (props: AttachmentTagListProps, ref: React_2.Ref<HTMLElement>) => AttachmentTagListState;
396
+ export declare const useAttachmentTagList_unstable: (props: AttachmentTagListProps, ref: React_2.Ref<HTMLDivElement>) => AttachmentTagListState;
182
397
 
183
398
  /**
184
399
  * Apply styling to the AttachmentTagList slots based on the state
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentList/index';
2
+ //# sourceMappingURL=AttachmentList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentList.ts"],"sourcesContent":["export * from './components/AttachmentList/index';\n"],"names":[],"mappings":"AAAA,cAAc,oCAAoC"}
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentOverflowMenu/index';
2
+ //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenu/index';\n"],"names":[],"mappings":"AAAA,cAAc,4CAA4C"}
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentOverflowMenuButton/index';
2
+ //# sourceMappingURL=AttachmentOverflowMenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenuButton.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenuButton/index';\n"],"names":[],"mappings":"AAAA,cAAc,kDAAkD"}
@@ -0,0 +1,2 @@
1
+ export * from './components/AttachmentOverflowMenuItem/index';
2
+ //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenuItem.ts"],"sourcesContent":["export * from './components/AttachmentOverflowMenuItem/index';\n"],"names":[],"mappings":"AAAA,cAAc,gDAAgD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n dismissButton: NonNullable<Slot<'button'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n dismissIcon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots>;\n"],"names":[],"mappings":"AAAA,WAmB8D"}
1
+ {"version":3,"sources":["Attachment.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button', 'span'>>;\n dismissButton: NonNullable<Slot<'button'>>;\n media?: Slot<'span'>;\n content: NonNullable<Slot<'span'>>;\n dismissIcon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * Attachment Props\n */\nexport type AttachmentProps = ComponentProps<Partial<AttachmentSlots>> & {\n id: string;\n};\n\n/**\n * State used in rendering Attachment\n */\nexport type AttachmentState = ComponentState<AttachmentSlots>;\n"],"names":[],"mappings":"AAAA,WAqB8D"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, mergeCallbacks, slot } from '@fluentui/react-components';
2
+ import { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';
3
3
  import { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';
4
- import { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';
4
+ import { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';
5
5
  /**
6
6
  * Create the state required to render Attachment.
7
7
  *
@@ -13,9 +13,8 @@ import { useAttachmentTagListContext_unstable } from '../../contexts/attachmentT
13
13
  */
14
14
  export const useAttachment_unstable = (props, ref) => {
15
15
  const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
16
- //TODO: replace with context from to be created AttachmentList component
17
- const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);
18
- const root = slot.always(getNativeElementProps('div', {
16
+ const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);
17
+ const root = slot.always(getIntrinsicElementProps('div', {
19
18
  ref,
20
19
  ...props
21
20
  }), {
@@ -30,9 +29,8 @@ export const useAttachment_unstable = (props, ref) => {
30
29
  },
31
30
  elementType: 'button'
32
31
  });
33
- dismissButton.onClick = mergeCallbacks(dismissButton.onClick, ev => onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {
34
- content: props.children,
35
- media: props.media
32
+ dismissButton.onClick = mergeCallbacks(dismissButton.onClick, ev => onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
33
+ id: props.id
36
34
  }));
37
35
  const media = slot.optional(props.media, {
38
36
  elementType: 'span'
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentTagListContext_unstable } from '../../contexts/attachmentTagListContext';\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<HTMLElement>): AttachmentState => {\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n //TODO: replace with context from to be created AttachmentList component\n const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);\n\n const root = slot.always(\n getNativeElementProps('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>) =>\n onAttachmentTagDismiss?.(ev, { content: props.children, media: props.media }),\n );\n\n const media = slot.optional(props.media, { elementType: 'span' });\n\n const content = slot.always(props.content, {\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n });\n\n const dismissIcon = slot.always(props.dismissIcon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: 'span',\n });\n\n const state: AttachmentState = {\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["React","getNativeElementProps","mergeCallbacks","slot","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentTagListContext_unstable","useAttachment_unstable","props","ref","DismissIcon","onAttachmentTagDismiss","context","root","always","elementType","primaryAction","dismissButton","defaultProps","onClick","ev","content","children","media","optional","dismissIcon","state","components","as"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AACzF,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AACtF,SAASC,oCAAoC,QAAQ,0CAA0C;AAG/F;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,MAAMC,cAAcL,WAAWD,iBAAiBD;IAChD,wEAAwE;IACxE,MAAMQ,yBAAyBL,qCAAqCM,CAAAA,UAAWA,QAAQD,sBAAsB;IAE7G,MAAME,OAAOX,KAAKY,MAAM,CACtBd,sBAAsB,OAAO;QAC3BS;QACA,GAAGD,KAAK;IACV,IACA;QAAEO,aAAa;IAAM;IAGvB,MAAMC,gBAAgBd,KAAKY,MAAM,CAACN,MAAMQ,aAAa,EAAE;QACrDD,aAAa;IACf;IAEA,MAAME,gBAAgBf,KAAKY,MAAM,CAACN,MAAMS,aAAa,EAAE;QACrDC,cAAc;YAAE,cAAc;QAAU;QACxCH,aAAa;IACf;IAEAE,cAAcE,OAAO,GAAGlB,eACtBgB,cAAcE,OAAO,EACrB,CAACC,KACCT,mCAAAA,6CAAAA,uBAAyBS,IAAI;YAAEC,SAASb,MAAMc,QAAQ;YAAEC,OAAOf,MAAMe,KAAK;QAAC;IAG/E,MAAMA,QAAQrB,KAAKsB,QAAQ,CAAChB,MAAMe,KAAK,EAAE;QAAER,aAAa;IAAO;IAE/D,MAAMM,UAAUnB,KAAKY,MAAM,CAACN,MAAMa,OAAO,EAAE;QACzCH,cAAc;YACZI,UAAUd,MAAMc,QAAQ;QAC1B;QACAP,aAAa;IACf;IAEA,MAAMU,cAAcvB,KAAKY,MAAM,CAACN,MAAMiB,WAAW,EAAE;QACjDP,cAAc;YACZI,wBAAU,oBAACZ;QACb;QACAK,aAAa;IACf;IAEA,MAAMW,QAAyB;QAC7BC,YAAY;YACVd,MAAM;YACNG,eAAe;YACfC,eAAe;YACfM,OAAO;YACPF,SAAS;YACTI,aAAa;QACf;QAEAZ;QACAG;QACAC;QACAM;QACAF;QACAI;IACF;IAEA,IAAIC,MAAMV,aAAa,CAACY,EAAE,KAAK,QAAQ;QACrCF,MAAMC,UAAU,CAACX,aAAa,GAAG;IACnC;IAEA,OAAOU;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, mergeCallbacks, slot } from '@fluentui/react-components';\nimport { Dismiss20Regular, Dismiss20Filled, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps, AttachmentState } from './Attachment.types';\n\n/**\n * Create the state required to render Attachment.\n *\n * The returned state can be modified with hooks such as useAttachmentStyles_unstable,\n * before being passed to renderAttachment_unstable.\n *\n * @param props - props from this instance of Attachment\n * @param ref - reference to root HTMLElement of Attachment\n */\nexport const useAttachment_unstable = (props: AttachmentProps, ref: React.Ref<HTMLDivElement>): AttachmentState => {\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n\n const root = slot.always(\n getIntrinsicElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n );\n\n const primaryAction = slot.always(props.primaryAction, {\n elementType: 'button',\n });\n\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: { 'aria-label': 'Dismiss' },\n elementType: 'button',\n });\n\n dismissButton.onClick = mergeCallbacks(\n dismissButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => onAttachmentDismiss?.(ev, { id: props.id }),\n );\n\n const media = slot.optional(props.media, { elementType: 'span' });\n\n const content = slot.always(props.content, {\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n });\n\n const dismissIcon = slot.always(props.dismissIcon, {\n defaultProps: {\n children: <DismissIcon />,\n },\n elementType: 'span',\n });\n\n const state: AttachmentState = {\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","Dismiss20Regular","Dismiss20Filled","bundleIcon","useAttachmentListContext_unstable","useAttachment_unstable","props","ref","DismissIcon","onAttachmentDismiss","context","root","always","elementType","primaryAction","dismissButton","defaultProps","onClick","ev","id","media","optional","content","children","dismissIcon","state","components","as"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,cAAc,EAAEC,IAAI,QAAQ,6BAA6B;AAC5F,SAASC,gBAAgB,EAAEC,eAAe,EAAEC,UAAU,QAAQ,wBAAwB;AACtF,SAASC,iCAAiC,QAAQ,uCAAuC;AAGzF;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,MAAMC,cAAcL,WAAWD,iBAAiBD;IAEhD,MAAMQ,sBAAsBL,kCAAkCM,CAAAA,UAAWA,QAAQD,mBAAmB;IAEpG,MAAME,OAAOX,KAAKY,MAAM,CACtBd,yBAAyB,OAAO;QAC9BS;QACA,GAAGD,KAAK;IACV,IACA;QAAEO,aAAa;IAAM;IAGvB,MAAMC,gBAAgBd,KAAKY,MAAM,CAACN,MAAMQ,aAAa,EAAE;QACrDD,aAAa;IACf;IAEA,MAAME,gBAAgBf,KAAKY,MAAM,CAACN,MAAMS,aAAa,EAAE;QACrDC,cAAc;YAAE,cAAc;QAAU;QACxCH,aAAa;IACf;IAEAE,cAAcE,OAAO,GAAGlB,eACtBgB,cAAcE,OAAO,EACrB,CAACC,KAAgET,gCAAAA,0CAAAA,oBAAsBS,IAAI;YAAEC,IAAIb,MAAMa,EAAE;QAAC;IAG5G,MAAMC,QAAQpB,KAAKqB,QAAQ,CAACf,MAAMc,KAAK,EAAE;QAAEP,aAAa;IAAO;IAE/D,MAAMS,UAAUtB,KAAKY,MAAM,CAACN,MAAMgB,OAAO,EAAE;QACzCN,cAAc;YACZO,UAAUjB,MAAMiB,QAAQ;QAC1B;QACAV,aAAa;IACf;IAEA,MAAMW,cAAcxB,KAAKY,MAAM,CAACN,MAAMkB,WAAW,EAAE;QACjDR,cAAc;YACZO,wBAAU,oBAACf;QACb;QACAK,aAAa;IACf;IAEA,MAAMY,QAAyB;QAC7BC,YAAY;YACVf,MAAM;YACNG,eAAe;YACfC,eAAe;YACfK,OAAO;YACPE,SAAS;YACTE,aAAa;QACf;QAEAb;QACAG;QACAC;QACAK;QACAE;QACAE;IACF;IAEA,IAAIC,MAAMX,aAAa,CAACa,EAAE,KAAK,QAAQ;QACrCF,MAAMC,UAAU,CAACZ,aAAa,GAAG;IACnC;IAEA,OAAOW;AACT,EAAE"}
@@ -9,7 +9,7 @@ export const attachmentClassNames = {
9
9
  };
10
10
  const ATTACHMENT_MAXWIDTH = '180px';
11
11
  const ATTACHMENT_SIZE = '20px';
12
- const useRootBaseClassName = __resetStyles("r1u26nio", null, [".r1u26nio{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;max-width:180px;}"]);
12
+ const useRootBaseClassName = __resetStyles("rj3sqpg", null, [".rj3sqpg{display:inline-flex;flex-wrap:nowrap;vertical-align:middle;box-sizing:border-box;width:fit-content;}"]);
13
13
  const buttonBaseStyles = {
14
14
  alignItems: 'center',
15
15
  backgroundColor: tokens.colorNeutralBackground1,
@@ -52,7 +52,7 @@ const useDismissButtonBaseClassName = __resetStyles("r1cf2ehf", "rhq1520", {
52
52
  r: [".r1cf2ehf{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalXS);max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);border-left-color:var(--colorNeutralStroke1);border-top-left-radius:var(--borderRadiusNone);border-bottom-left-radius:var(--borderRadiusNone);border-top-right-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);}", ".r1cf2ehf[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}", ".r1cf2ehf:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2BrandHover);}", ".r1cf2ehf:hover .fai-Attachment__dismissIcon{color:var(--colorBrandForegroundLinkHover);}", ".r1cf2ehf:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2BrandPressed);}", ".r1cf2ehf:focus .fai-Attachment__dismissIcon{color:var(--colorNeutralForeground2BrandHover);}", ".rhq1520{align-items:center;background-color:var(--colorNeutralBackground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);border-radius:var(--borderRadiusMedium);box-sizing:border-box;column-gap:var(--spacingHorizontalSNudge);color:var(--colorNeutralForeground1);cursor:pointer;display:inline-flex;flex-wrap:nowrap;justify-content:center;vertical-align:middle;padding:var(--spacingVerticalXS) var(--spacingHorizontalXS) var(--spacingVerticalXS) var(--spacingHorizontalXS);max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS))+var(--spacingHorizontalXS);border-right-color:var(--colorNeutralStroke1);border-top-right-radius:var(--borderRadiusNone);border-bottom-right-radius:var(--borderRadiusNone);border-top-left-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);}", ".rhq1520[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);z-index:1;}", ".rhq1520:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2BrandHover);}", ".rhq1520:hover .fai-Attachment__dismissIcon{color:var(--colorBrandForegroundLinkHover);}", ".rhq1520:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2BrandPressed);}", ".rhq1520:focus .fai-Attachment__dismissIcon{color:var(--colorNeutralForeground2BrandHover);}"],
53
53
  s: ["@media (forced-colors: active){.r1cf2ehf:hover{background-color:HighlightText;}.r1cf2ehf:active{background-color:HighlightText;}}", "@media (forced-colors: active){.rhq1520:hover{background-color:HighlightText;}.rhq1520:active{background-color:HighlightText;}}"]
54
54
  });
55
- const useMediaBaseClassName = __resetStyles("r19jnv3a", null, [".r19jnv3a{font-size:20px;height:20px;line-height:20px;width:20px;}"]);
55
+ const useMediaBaseClassName = __resetStyles("rz1lum2", null, [".rz1lum2{display:inline-flex;font-size:20px;height:20px;line-height:20px;width:20px;}"]);
56
56
  const useContentBaseClassName = __resetStyles("rmt99gk", null, [".rmt99gk{overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase300);}"]);
57
57
  const useDismissIconBaseClassName = __resetStyles("r176grtk", null, [".r176grtk{align-items:center;border-radius:var(--borderRadiusCircular);border:var(--strokeWidthThin) solid var(--colorTransparentStroke);box-sizing:border-box;color:var(--colorNeutralForeground1);display:inline-flex;font-size:20px;height:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingVerticalXXS));justify-content:center;max-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));min-width:calc(20px + var(--strokeWidthThin) * 2 + var(--spacingHorizontalXXS));padding:calc(var(--spacingVerticalXXS) / 2) calc(var(--spacingHorizontalXXS) / 2);}"]);
58
58
  /**
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentStyles.ts"],"sourcesContent":["import {\n createCustomFocusIndicatorStyle,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport type { AttachmentSlots, AttachmentState } from './Attachment.types';\nimport type { GriffelResetStyle, SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentClassNames: SlotClassNames<AttachmentSlots> = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon',\n};\n\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst ATTACHMENT_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n width: 'fit-content',\n maxWidth: ATTACHMENT_MAXWIDTH,\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 fontSize: ATTACHMENT_SIZE,\n height: ATTACHMENT_SIZE,\n lineHeight: ATTACHMENT_SIZE,\n width: ATTACHMENT_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useDismissIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = (state: AttachmentState): AttachmentState => {\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const primaryActionStyles = usePrimaryActionStyles();\n const { primaryAction } = state;\n\n state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);\n state.primaryAction.className = mergeClasses(\n attachmentClassNames.primaryAction,\n primaryActionBaseClassName,\n primaryAction.as !== 'span' && primaryActionStyles.button,\n state.primaryAction.className,\n );\n state.dismissButton.className = mergeClasses(\n attachmentClassNames.dismissButton,\n dismissButtonBaseClassName,\n state.dismissButton.className,\n );\n if (state.media) {\n state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, state.content.className);\n state.dismissIcon.className = mergeClasses(\n attachmentClassNames.dismissIcon,\n dismissIconBaseClassName,\n state.dismissIcon.className,\n );\n\n return state;\n};\n"],"names":["createCustomFocusIndicatorStyle","makeResetStyles","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","attachmentClassNames","root","primaryAction","dismissButton","media","content","dismissIcon","ATTACHMENT_MAXWIDTH","ATTACHMENT_SIZE","useRootBaseClassName","display","flexWrap","verticalAlign","boxSizing","width","maxWidth","buttonBaseStyles","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","zIndex","usePrimaryActionBaseClassName","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","spacingHorizontalXXS","spacingHorizontalXS","padding","spacingVerticalXS","spacingHorizontalS","usePrimaryActionStyles","button","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","useDismissButtonBaseClassName","minWidth","borderLeftColor","borderTopLeftRadius","borderBottomLeftRadius","colorNeutralForeground2BrandHover","colorBrandForegroundLinkHover","colorNeutralForeground2BrandPressed","useMediaBaseClassName","fontSize","height","lineHeight","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useDismissIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","useAttachmentStyles_unstable","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","primaryActionStyles","className","as"],"mappings":"AAAA,SACEA,+BAA+B,EAC/BC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AAIpC,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,aAAa;AACf,EAAE;AAEF,MAAMC,sBAAsB;AAC5B,MAAMC,kBAAkB;AAExB,MAAMC,uBAAuBf,gBAAgB;IAC3CgB,SAAS;IACTC,UAAU;IACVC,eAAe;IACfC,WAAW;IACXC,OAAO;IACPC,UAAUR;AACZ;AAEA,MAAMS,mBAAsC;IAC1CC,YAAY;IACZC,iBAAiBpB,OAAOqB,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEtB,OAAOuB,eAAe,CAAC,OAAO,EAAEvB,OAAOwB,mBAAmB,CAAC,CAAC;IACvEC,cAAczB,OAAO0B,kBAAkB;IACvCX,WAAW;IACXY,WAAW3B,O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AAa,CAAC+E,SAAS,GAAGrF,aAC9BI,qBAAqBE,aAAa,EAClCyE,4BACAzE,cAAcgF,EAAE,KAAK,UAAUF,oBAAoBlC,MAAM,EACzD2B,MAAMvE,aAAa,CAAC+E,SAAS;IAE/BR,MAAMtE,aAAa,CAAC8E,SAAS,GAAGrF,aAC9BI,qBAAqBG,aAAa,EAClCyE,4BACAH,MAAMtE,aAAa,CAAC8E,SAAS;IAE/B,IAAIR,MAAMrE,KAAK,EAAE;QACfqE,MAAMrE,KAAK,CAAC6E,SAAS,GAAGrF,aAAaI,qBAAqBI,KAAK,EAAEyE,oBAAoBJ,MAAMrE,KAAK,CAAC6E,SAAS;IAC5G;IACAR,MAAMpE,OAAO,CAAC4E,SAAS,GAAGrF,aAAaI,qBAAqBK,OAAO,EAAEyE,sBAAsBL,MAAMpE,OAAO,CAAC4E,SAAS;IAClHR,MAAMnE,WAAW,CAAC2E,SAAS,GAAGrF,aAC5BI,qBAAqBM,WAAW,EAChCyE,0BACAN,MAAMnE,WAAW,CAAC2E,SAAS;IAG7B,OAAOR;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachmentStyles.ts"],"sourcesContent":["import {\n createCustomFocusIndicatorStyle,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport type { AttachmentSlots, AttachmentState } from './Attachment.types';\nimport type { GriffelResetStyle, SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentClassNames: SlotClassNames<AttachmentSlots> = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon',\n};\n\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst ATTACHMENT_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n width: 'fit-content',\n});\n\nconst buttonBaseStyles: GriffelResetStyle = {\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n ...shorthands.outline(tokens.strokeWidthThick, 'solid', tokens.colorStrokeFocus2),\n zIndex: 1,\n }),\n verticalAlign: 'middle',\n};\n\nconst usePrimaryActionBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n});\n\nconst usePrimaryActionStyles = makeStyles({\n button: {\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n});\n\nconst useDismissButtonBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2BrandHover,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: ATTACHMENT_SIZE,\n lineHeight: ATTACHMENT_SIZE,\n width: ATTACHMENT_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useDismissIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = (state: AttachmentState): AttachmentState => {\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const primaryActionStyles = usePrimaryActionStyles();\n const { primaryAction } = state;\n\n state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);\n state.primaryAction.className = mergeClasses(\n attachmentClassNames.primaryAction,\n primaryActionBaseClassName,\n primaryAction.as !== 'span' && primaryActionStyles.button,\n state.primaryAction.className,\n );\n state.dismissButton.className = mergeClasses(\n attachmentClassNames.dismissButton,\n dismissButtonBaseClassName,\n state.dismissButton.className,\n );\n if (state.media) {\n state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, state.content.className);\n state.dismissIcon.className = mergeClasses(\n attachmentClassNames.dismissIcon,\n dismissIconBaseClassName,\n state.dismissIcon.className,\n );\n\n return state;\n};\n"],"names":["createCustomFocusIndicatorStyle","makeResetStyles","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","attachmentClassNames","root","primaryAction","dismissButton","media","content","dismissIcon","ATTACHMENT_MAXWIDTH","ATTACHMENT_SIZE","useRootBaseClassName","display","flexWrap","verticalAlign","boxSizing","width","buttonBaseStyles","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","zIndex","usePrimaryActionBaseClassName","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","maxWidth","spacingHorizontalXXS","spacingHorizontalXS","padding","spacingVerticalXS","spacingHorizontalS","usePrimaryActionStyles","button","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","useDismissButtonBaseClassName","minWidth","borderLeftColor","borderTopLeftRadius","borderBottomLeftRadius","colorNeutralForeground2BrandHover","colorBrandForegroundLinkHover","colorNeutralForeground2BrandPressed","useMediaBaseClassName","fontSize","height","lineHeight","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useDismissIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","useAttachmentStyles_unstable","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","primaryActionStyles","className","as"],"mappings":"AAAA,SACEA,+BAA+B,EAC/BC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AAIpC,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,aAAa;AACf,EAAE;AAEF,MAAMC,sBAAsB;AAC5B,MAAMC,kBAAkB;AAExB,MAAMC,uBAAuBf,gBAAgB;IAC3CgB,SAAS;IACTC,UAAU;IACVC,eAAe;IACfC,WAAW;IACXC,OAAO;AACT;AAEA,MAAMC,mBAAsC;IAC1CC,YAAY;IACZC,iBAAiBnB,OAAOoB,uBAAuB;IAC/CC,QAAQ,CAAC,EAAErB,OAAOsB,eAA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AE1BA,MAAMxE,IAAI,CAACgF,SAAS,GAAGrF,aAAaI,qBAAqBC,IAAI,EAAEyE,mBAAmBD,MAAMxE,IAAI,CAACgF,SAAS;IACtGR,MAAMvE,aAAa,CAAC+E,SAAS,GAAGrF,aAC9BI,qBAAqBE,aAAa,EAClCyE,4BACAzE,cAAcgF,EAAE,KAAK,UAAUF,oBAAoBlC,MAAM,EACzD2B,MAAMvE,aAAa,CAAC+E,SAAS;IAE/BR,MAAMtE,aAAa,CAAC8E,SAAS,GAAGrF,aAC9BI,qBAAqBG,aAAa,EAClCyE,4BACAH,MAAMtE,aAAa,CAAC8E,SAAS;IAE/B,IAAIR,MAAMrE,KAAK,EAAE;QACfqE,MAAMrE,KAAK,CAAC6E,SAAS,GAAGrF,aAAaI,qBAAqBI,KAAK,EAAEyE,oBAAoBJ,MAAMrE,KAAK,CAAC6E,SAAS;IAC5G;IACAR,MAAMpE,OAAO,CAAC4E,SAAS,GAAGrF,aAAaI,qBAAqBK,OAAO,EAAEyE,sBAAsBL,MAAMpE,OAAO,CAAC4E,SAAS;IAClHR,MAAMnE,WAAW,CAAC2E,SAAS,GAAGrF,aAC5BI,qBAAqBM,WAAW,EAChCyE,0BACAN,MAAMnE,WAAW,CAAC2E,SAAS;IAG7B,OAAOR;AACT,EAAE"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { useAttachmentList_unstable } from './useAttachmentList';
3
+ import { renderAttachmentList_unstable } from './renderAttachmentList';
4
+ import { useAttachmentListStyles_unstable } from './useAttachmentListStyles';
5
+ import { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';
6
+ export const AttachmentList = /*#__PURE__*/React.forwardRef((props, ref) => {
7
+ const state = useAttachmentList_unstable(props, ref);
8
+ const contextValues = useAttachmentListContextValues_unstable(state);
9
+ useAttachmentListStyles_unstable(state);
10
+ return renderAttachmentList_unstable(state, contextValues);
11
+ });
12
+ AttachmentList.displayName = 'AttachmentList';
13
+ //# sourceMappingURL=AttachmentList.js.map
@@ -0,0 +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"],"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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentList.types.js.map
@@ -0,0 +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":[],"mappings":"AAAA,WA6BE"}