@fluentui-copilot/react-attachments 0.8.3 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/CHANGELOG.json +71 -1
  2. package/CHANGELOG.md +28 -2
  3. package/dist/index.d.ts +154 -5
  4. package/lib/Attachment.js.map +1 -1
  5. package/lib/AttachmentList.js.map +1 -1
  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/AttachmentTag.js.map +1 -1
  13. package/lib/AttachmentTagItem.js.map +1 -1
  14. package/lib/AttachmentTagList.js.map +1 -1
  15. package/lib/components/Attachment/Attachment.js.map +1 -1
  16. package/lib/components/Attachment/Attachment.types.js +3 -1
  17. package/lib/components/Attachment/Attachment.types.js.map +1 -1
  18. package/lib/components/Attachment/index.js.map +1 -1
  19. package/lib/components/Attachment/renderAttachment.js +1 -1
  20. package/lib/components/Attachment/renderAttachment.js.map +1 -1
  21. package/lib/components/Attachment/useAttachment.js +5 -1
  22. package/lib/components/Attachment/useAttachment.js.map +1 -1
  23. package/lib/components/Attachment/useAttachmentStyles.js +18 -3
  24. package/lib/components/Attachment/useAttachmentStyles.js.map +1 -1
  25. package/lib/components/AttachmentList/AttachmentList.js.map +1 -1
  26. package/lib/components/AttachmentList/AttachmentList.types.js.map +1 -1
  27. package/lib/components/AttachmentList/index.js.map +1 -1
  28. package/lib/components/AttachmentList/renderAttachmentList.js.map +1 -1
  29. package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
  30. package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  31. package/lib/components/AttachmentList/useAttachmentListStyles.js.map +1 -1
  32. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +15 -0
  33. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  34. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -0
  35. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  36. package/lib/components/AttachmentOverflowMenu/index.js +6 -0
  37. package/lib/components/AttachmentOverflowMenu/index.js.map +1 -0
  38. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +18 -0
  39. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  40. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +24 -0
  41. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  42. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +17 -0
  43. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  44. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +11 -0
  45. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
  46. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +4 -0
  47. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
  48. package/lib/components/AttachmentOverflowMenuButton/index.js +6 -0
  49. package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -0
  50. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +14 -0
  51. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
  52. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +32 -0
  53. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
  54. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +17 -0
  55. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
  56. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +11 -0
  57. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
  58. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +4 -0
  59. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
  60. package/lib/components/AttachmentOverflowMenuItem/index.js +6 -0
  61. package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -0
  62. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +10 -0
  63. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
  64. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +43 -0
  65. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
  66. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +25 -0
  67. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
  68. package/lib/components/AttachmentTag/AttachmentTag.js +4 -1
  69. package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
  70. package/lib/components/AttachmentTag/AttachmentTag.types.js +3 -1
  71. package/lib/components/AttachmentTag/AttachmentTag.types.js.map +1 -1
  72. package/lib/components/AttachmentTag/index.js.map +1 -1
  73. package/lib/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
  74. package/lib/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  75. package/lib/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
  76. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -0
  77. package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  78. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +3 -1
  79. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
  80. package/lib/components/AttachmentTagItem/index.js.map +1 -1
  81. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
  82. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  83. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
  84. package/lib/components/AttachmentTagList/AttachmentTagList.js +4 -1
  85. package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  86. package/lib/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -1
  87. package/lib/components/AttachmentTagList/index.js.map +1 -1
  88. package/lib/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
  89. package/lib/components/AttachmentTagList/useAttachmentTagList.js +2 -2
  90. package/lib/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
  91. package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
  92. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -1
  93. package/lib/components/index.js +3 -0
  94. package/lib/components/index.js.map +1 -1
  95. package/lib/components/utils/useAttachmentTagSlots.js +2 -2
  96. package/lib/components/utils/useAttachmentTagSlots.js.map +1 -1
  97. package/lib/contexts/attachmentListContext.js.map +1 -1
  98. package/lib/contexts/attachmentOverflowMenuContext.js +10 -0
  99. package/lib/contexts/attachmentOverflowMenuContext.js.map +1 -0
  100. package/lib/contexts/attachmentTagListContext.js.map +1 -1
  101. package/lib/index.js +4 -0
  102. package/lib/index.js.map +1 -1
  103. package/lib-commonjs/Attachment.js.map +1 -1
  104. package/lib-commonjs/AttachmentList.js.map +1 -1
  105. package/lib-commonjs/AttachmentOverflowMenu.js +7 -0
  106. package/lib-commonjs/AttachmentOverflowMenu.js.map +1 -0
  107. package/lib-commonjs/AttachmentOverflowMenuButton.js +7 -0
  108. package/lib-commonjs/AttachmentOverflowMenuButton.js.map +1 -0
  109. package/lib-commonjs/AttachmentOverflowMenuItem.js +7 -0
  110. package/lib-commonjs/AttachmentOverflowMenuItem.js.map +1 -0
  111. package/lib-commonjs/AttachmentTag.js.map +1 -1
  112. package/lib-commonjs/AttachmentTagItem.js.map +1 -1
  113. package/lib-commonjs/AttachmentTagList.js.map +1 -1
  114. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  115. package/lib-commonjs/components/Attachment/Attachment.types.js +3 -1
  116. package/lib-commonjs/components/Attachment/Attachment.types.js.map +1 -1
  117. package/lib-commonjs/components/Attachment/index.js.map +1 -1
  118. package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
  119. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  120. package/lib-commonjs/components/Attachment/useAttachment.js +3 -1
  121. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  122. package/lib-commonjs/components/Attachment/useAttachmentStyles.js +31 -5
  123. package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +1 -1
  124. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  125. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +1 -1
  126. package/lib-commonjs/components/AttachmentList/index.js.map +1 -1
  127. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
  128. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  129. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  130. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +1 -1
  131. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +24 -0
  132. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -0
  133. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +5 -0
  134. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +1 -0
  135. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +11 -0
  136. package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +1 -0
  137. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +21 -0
  138. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -0
  139. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +21 -0
  140. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -0
  141. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +22 -0
  142. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -0
  143. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +21 -0
  144. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -0
  145. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +7 -0
  146. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +1 -0
  147. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +11 -0
  148. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -0
  149. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +24 -0
  150. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -0
  151. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +28 -0
  152. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -0
  153. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js +37 -0
  154. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +1 -0
  155. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +21 -0
  156. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -0
  157. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +7 -0
  158. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +1 -0
  159. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +11 -0
  160. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -0
  161. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +16 -0
  162. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -0
  163. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +40 -0
  164. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -0
  165. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js +39 -0
  166. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +1 -0
  167. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
  168. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +3 -1
  169. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js.map +1 -1
  170. package/lib-commonjs/components/AttachmentTag/index.js.map +1 -1
  171. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
  172. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  173. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js +7 -7
  174. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +1 -1
  175. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  176. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +3 -1
  177. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js.map +1 -1
  178. package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -1
  179. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
  180. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  181. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +1 -1
  182. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  183. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js.map +1 -1
  184. package/lib-commonjs/components/AttachmentTagList/index.js.map +1 -1
  185. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
  186. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +1 -1
  187. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
  188. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
  189. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js.map +1 -1
  190. package/lib-commonjs/components/index.js +3 -0
  191. package/lib-commonjs/components/index.js.map +1 -1
  192. package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
  193. package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
  194. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
  195. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +30 -0
  196. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -0
  197. package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
  198. package/lib-commonjs/index.js +95 -43
  199. package/lib-commonjs/index.js.map +1 -1
  200. package/package.json +9 -9
@@ -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"],"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';\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 +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>,\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"}
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 +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":[],"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';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,4BAA4B"}
@@ -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"],"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 { 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 +1 @@
1
- {"version":3,"sources":["useAttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n slot,\n useArrowNavigationGroup,\n useEventCallback,\n useFocusFinders,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useOverflowContext } from '@fluentui/react-overflow';\nimport type { AttachmentListProps, AttachmentListState } from './AttachmentList.types';\n\n/**\n * Create the state required to render AttachmentList.\n *\n * The returned state can be modified with hooks such as useAttachmentListStyles_unstable,\n * before being passed to renderAttachmentList_unstable.\n *\n * @param props - props from this instance of AttachmentList\n * @param ref - reference to root HTMLElement of AttachmentList\n */\nexport const useAttachmentList_unstable = (\n props: AttachmentListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentListState => {\n const { onAttachmentDismiss } = props;\n\n const attachmentsVisibilityStatus: Record<string, boolean> = useOverflowContext(context => context.itemVisibility);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { targetDocument } = useFluent();\n const { findNextFocusable, findPrevFocusable } = useFocusFinders();\n\n const handleAttachmentDismiss: AttachmentListState['onAttachmentDismiss'] = useEventCallback((e, data) => {\n if (!onAttachmentDismiss) {\n return;\n }\n\n onAttachmentDismiss(e, data);\n\n // Remove attachment from overflow context\n delete attachmentsVisibilityStatus?.[data.id];\n\n // set focus after attachment dismiss\n const activeElement = targetDocument?.activeElement;\n if (innerRef.current?.contains(activeElement as HTMLElement)) {\n // focus on next attachment only if the active element is within the current attachment list\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n\n if (next) {\n next.focus();\n return;\n } else {\n const prev = findPrevFocusable(activeElement?.parentElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n }\n });\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n memorizeCurrent: true,\n });\n\n return {\n onAttachmentDismiss: handleAttachmentDismiss,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref: useMergedRefs(ref, innerRef),\n role: 'toolbar',\n ...arrowNavigationProps,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useArrowNavigationGroup","useEventCallback","useFocusFinders","useMergedRefs","useFluent_unstable","useFluent","useOverflowContext","useAttachmentList_unstable","props","ref","onAttachmentDismiss","attachmentsVisibilityStatus","context","itemVisibility","innerRef","useRef","targetDocument","findNextFocusable","findPrevFocusable","handleAttachmentDismiss","e","data","id","activeElement","current","contains","next","container","focus","prev","parentElement","arrowNavigationProps","circular","axis","memorizeCurrent","components","root","always","role","elementType"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,IAAI,EACJC,uBAAuB,EACvBC,gBAAgB,EAChBC,eAAe,EACfC,aAAa,QACR,6BAA6B;AACpC,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,kBAAkB,QAAQ,2BAA2B;AAG9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAM,EAAEC,mBAAmB,EAAE,GAAGF;IAEhC,MAAMG,8BAAuDL,mBAAmBM,CAAAA,UAAWA,QAAQC,cAAc;IAEjH,MAAMC,WAAWjB,MAAMkB,MAAM,CAAiB;IAC9C,MAAM,EAAEC,cAAc,EAAE,GAAGX;IAC3B,MAAM,EAAEY,iBAAiB,EAAEC,iBAAiB,EAAE,GAAGhB;IAEjD,MAAMiB,0BAAsElB,iBAAiB,CAACmB,GAAGC;YAY3FP;QAXJ,IAAI,CAACJ,qBAAqB;YACxB;QACF;QAEAA,oBAAoBU,GAAGC;QAEvB,0CAA0C;QACnCV,wCAAAA,uDAAAA,2BAA6B,CAACU,KAAKC,EAAE,CAAC;QAE7C,qCAAqC;QACrC,MAAMC,gBAAgBP,2BAAAA,qCAAAA,eAAgBO,aAAa;QACnD,KAAIT,oBAAAA,SAASU,OAAO,cAAhBV,wCAAAA,kBAAkBW,QAAQ,CAACF,gBAA+B;YAC5D,4FAA4F;YAC5F,MAAMG,OAAOT,kBAAkBM,eAA8B;gBAAEI,WAAWb,SAASU,OAAO;YAAC;YAE3F,IAAIE,MAAM;gBACRA,KAAKE,KAAK;gBACV;YACF,OAAO;gBACL,MAAMC,OAAOX,kBAAkBK,0BAAAA,oCAAAA,cAAeO,aAAa,EAAiB;oBAAEH,WAAWb,SAASU,OAAO;gBAAC;gBAC1GK,iBAAAA,2BAAAA,KAAMD,KAAK;YACb;QACF;IACF;IAEA,MAAMG,uBAAuB/B,wBAAwB;QACnDgC,UAAU;QACVC,MAAM;QACNC,iBAAiB;IACnB;IAEA,OAAO;QACLxB,qBAAqBS;QACrBgB,YAAY;YACVC,MAAM;QACR;QACAA,MAAMrC,KAAKsC,MAAM,CACfvC,yBAAyB,OAAO;YAC9B,cAAc;YACdW,KAAKN,cAAcM,KAAKK;YACxBwB,MAAM;YACN,GAAGP,oBAAoB;YACvB,GAAGvB,KAAK;QACV,IACA;YAAE+B,aAAa;QAAM;IAEzB;AACF,EAAE"}
1
+ {"version":3,"sources":["useAttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n slot,\n useArrowNavigationGroup,\n useEventCallback,\n useFocusFinders,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useOverflowContext } from '@fluentui/react-overflow';\nimport type { AttachmentListProps, AttachmentListState } from './AttachmentList.types';\n\n/**\n * Create the state required to render AttachmentList.\n *\n * The returned state can be modified with hooks such as useAttachmentListStyles_unstable,\n * before being passed to renderAttachmentList_unstable.\n *\n * @param props - props from this instance of AttachmentList\n * @param ref - reference to root HTMLElement of AttachmentList\n */\nexport const useAttachmentList_unstable = (\n props: AttachmentListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentListState => {\n const { onAttachmentDismiss } = props;\n\n const attachmentsVisibilityStatus: Record<string, boolean> = useOverflowContext(context => context.itemVisibility);\n\n const innerRef = React.useRef<HTMLDivElement>(null);\n const { targetDocument } = useFluent();\n const { findNextFocusable, findPrevFocusable } = useFocusFinders();\n\n const handleAttachmentDismiss: AttachmentListState['onAttachmentDismiss'] = useEventCallback((e, data) => {\n if (!onAttachmentDismiss) {\n return;\n }\n\n onAttachmentDismiss(e, data);\n\n // Remove attachment from overflow context\n delete attachmentsVisibilityStatus?.[data.id];\n\n // set focus after attachment dismiss\n const activeElement = targetDocument?.activeElement;\n if (innerRef.current?.contains(activeElement as HTMLElement)) {\n // focus on next attachment only if the active element is within the current attachment list\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n\n if (next) {\n next.focus();\n return;\n } else {\n const prev = findPrevFocusable(activeElement?.parentElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n }\n });\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n memorizeCurrent: true,\n });\n\n return {\n onAttachmentDismiss: handleAttachmentDismiss,\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref: useMergedRefs(ref, innerRef),\n role: 'toolbar',\n ...arrowNavigationProps,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useArrowNavigationGroup","useEventCallback","useFocusFinders","useMergedRefs","useFluent_unstable","useFluent","useOverflowContext","useAttachmentList_unstable","props","ref","onAttachmentDismiss","attachmentsVisibilityStatus","context","itemVisibility","innerRef","useRef","targetDocument","findNextFocusable","findPrevFocusable","handleAttachmentDismiss","e","data","id","activeElement","current","contains","next","container","focus","prev","parentElement","arrowNavigationProps","circular","axis","memorizeCurrent","components","root","always","role","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,IAAI,EACJC,uBAAuB,EACvBC,gBAAgB,EAChBC,eAAe,EACfC,aAAa,QACR,6BAA6B;AACpC,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,kBAAkB,QAAQ,2BAA2B;AAG9D;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAM,EAAEC,mBAAmB,EAAE,GAAGF;IAEhC,MAAMG,8BAAuDL,mBAAmBM,CAAAA,UAAWA,QAAQC,cAAc;IAEjH,MAAMC,WAAWjB,MAAMkB,MAAM,CAAiB;IAC9C,MAAM,EAAEC,cAAc,EAAE,GAAGX;IAC3B,MAAM,EAAEY,iBAAiB,EAAEC,iBAAiB,EAAE,GAAGhB;IAEjD,MAAMiB,0BAAsElB,iBAAiB,CAACmB,GAAGC;YAY3FP;QAXJ,IAAI,CAACJ,qBAAqB;YACxB;QACF;QAEAA,oBAAoBU,GAAGC;QAEvB,0CAA0C;QACnCV,wCAAAA,uDAAAA,2BAA6B,CAACU,KAAKC,EAAE,CAAC;QAE7C,qCAAqC;QACrC,MAAMC,gBAAgBP,2BAAAA,qCAAAA,eAAgBO,aAAa;QACnD,KAAIT,oBAAAA,SAASU,OAAO,cAAhBV,wCAAAA,kBAAkBW,QAAQ,CAACF,gBAA+B;YAC5D,4FAA4F;YAC5F,MAAMG,OAAOT,kBAAkBM,eAA8B;gBAAEI,WAAWb,SAASU,OAAO;YAAC;YAE3F,IAAIE,MAAM;gBACRA,KAAKE,KAAK;gBACV;YACF,OAAO;gBACL,MAAMC,OAAOX,kBAAkBK,0BAAAA,oCAAAA,cAAeO,aAAa,EAAiB;oBAAEH,WAAWb,SAASU,OAAO;gBAAC;gBAC1GK,iBAAAA,2BAAAA,KAAMD,KAAK;YACb;QACF;IACF;IAEA,MAAMG,uBAAuB/B,wBAAwB;QACnDgC,UAAU;QACVC,MAAM;QACNC,iBAAiB;IACnB;IAEA,OAAO;QACLxB,qBAAqBS;QACrBgB,YAAY;YACVC,MAAM;QACR;QACAA,MAAMrC,KAAKsC,MAAM,CACfvC,yBAAyB,OAAO;YAC9B,cAAc;YACdW,KAAKN,cAAcM,KAAKK;YACxBwB,MAAM;YACN,GAAGP,oBAAoB;YACvB,GAAGvB,KAAK;QACV,IACA;YAAE+B,aAAa;QAAM;IAEzB;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentListContextValues.ts"],"sourcesContent":["import type { AttachmentListContextValues, AttachmentListState } from './AttachmentList.types';\n\nexport function useAttachmentListContextValues_unstable(state: AttachmentListState): AttachmentListContextValues {\n const { onAttachmentDismiss } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentList = {\n onAttachmentDismiss,\n };\n\n return { attachmentList };\n}\n"],"names":["useAttachmentListContextValues_unstable","state","onAttachmentDismiss","attachmentList"],"mappings":"AAEA,OAAO,SAASA,wCAAwCC,KAA0B;IAChF,MAAM,EAAEC,mBAAmB,EAAE,GAAGD;IAEhC,mGAAmG;IACnG,MAAME,iBAAiB;QACrBD;IACF;IAEA,OAAO;QAAEC;IAAe;AAC1B"}
1
+ {"version":3,"sources":["useAttachmentListContextValues.ts"],"sourcesContent":["import type { AttachmentListContextValues, AttachmentListState } from './AttachmentList.types';\n\nexport function useAttachmentListContextValues_unstable(state: AttachmentListState): AttachmentListContextValues {\n const { onAttachmentDismiss } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentList = {\n onAttachmentDismiss,\n };\n\n return { attachmentList };\n}\n"],"names":["useAttachmentListContextValues_unstable","state","onAttachmentDismiss","attachmentList"],"rangeMappings":";;;;;;;;;","mappings":"AAEA,OAAO,SAASA,wCAAwCC,KAA0B;IAChF,MAAM,EAAEC,mBAAmB,EAAE,GAAGD;IAEhC,mGAAmG;IACnG,MAAME,iBAAiB;QACrBD;IACF;IAEA,OAAO;QAAEC;IAAe;AAC1B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentListStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { AttachmentListSlots, AttachmentListState } from './AttachmentList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentListClassNames: SlotClassNames<AttachmentListSlots> = {\n root: 'fai-AttachmentList',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n columnGap: tokens.spacingHorizontalSNudge,\n display: 'flex',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n rowGap: tokens.spacingVerticalXS,\n});\n\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentListStyles_unstable = (state: AttachmentListState): AttachmentListState => {\n const rootBaseClassName = useRootBaseClassName();\n\n state.root.className = mergeClasses(attachmentListClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","attachmentListClassNames","root","useRootBaseClassName","columnGap","spacingHorizontalSNudge","display","flexDirection","flexShrink","flexWrap","rowGap","spacingVerticalXS","useAttachmentListStyles_unstable","state","rootBaseClassName","className"],"mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AAInF,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBL,gBAAgB;IAC3CM,WAAWJ,OAAOK,uBAAuB;IACzCC,SAAS;IACTC,eAAe;IACfC,YAAY;IACZC,UAAU;IACVC,QAAQV,OAAOW,iBAAiB;AAClC;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C,MAAMC,oBAAoBX;IAE1BU,MAAMX,IAAI,CAACa,SAAS,GAAGhB,aAAaE,yBAAyBC,IAAI,EAAEY,mBAAmBD,MAAMX,IAAI,CAACa,SAAS;IAE1G,OAAOF;AACT,EAAE"}
1
+ {"version":3,"sources":["useAttachmentListStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens } from '@fluentui/react-components';\nimport type { AttachmentListSlots, AttachmentListState } from './AttachmentList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentListClassNames: SlotClassNames<AttachmentListSlots> = {\n root: 'fai-AttachmentList',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n columnGap: tokens.spacingHorizontalSNudge,\n display: 'flex',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n rowGap: tokens.spacingVerticalXS,\n});\n\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentListStyles_unstable = (state: AttachmentListState): AttachmentListState => {\n const rootBaseClassName = useRootBaseClassName();\n\n state.root.className = mergeClasses(attachmentListClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","attachmentListClassNames","root","useRootBaseClassName","columnGap","spacingHorizontalSNudge","display","flexDirection","flexShrink","flexWrap","rowGap","spacingVerticalXS","useAttachmentListStyles_unstable","state","rootBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,MAAM,QAAQ,6BAA6B;AAInF,OAAO,MAAMC,2BAAgE;IAC3EC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBL,gBAAgB;IAC3CM,WAAWJ,OAAOK,uBAAuB;IACzCC,SAAS;IACTC,eAAe;IACfC,YAAY;IACZC,UAAU;IACVC,QAAQV,OAAOW,iBAAiB;AAClC;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C,MAAMC,oBAAoBX;IAE1BU,MAAMX,IAAI,CAACa,SAAS,GAAGhB,aAAaE,yBAAyBC,IAAI,EAAEY,mBAAmBD,MAAMX,IAAI,CAACa,SAAS;IAE1G,OAAOF;AACT,EAAE"}
@@ -0,0 +1,15 @@
1
+ import { useAttachmentOverflowMenu_unstable } from './useAttachmentOverflowMenu';
2
+ import { renderAttachmentOverflowMenu_unstable } from './renderAttachmentOverflowMenu';
3
+ import { useAttachmentOverflowMenuContextValues_unstable } from './useAttachmentOverflowMenuContextValues';
4
+ import { useMenuContextValues_unstable } from '@fluentui/react-components';
5
+ export const AttachmentOverflowMenu = props => {
6
+ const state = useAttachmentOverflowMenu_unstable(props);
7
+ const menuContextValues = useMenuContextValues_unstable(state);
8
+ const attachmentOverflowMenuContextValues = useAttachmentOverflowMenuContextValues_unstable(state);
9
+ return renderAttachmentOverflowMenu_unstable(state, {
10
+ menuContextValues,
11
+ attachmentOverflowMenuContextValues
12
+ });
13
+ };
14
+ AttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';
15
+ //# sourceMappingURL=AttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentOverflowMenu_unstable } from './useAttachmentOverflowMenu';\nimport { renderAttachmentOverflowMenu_unstable } from './renderAttachmentOverflowMenu';\nimport { useAttachmentOverflowMenuContextValues_unstable } from './useAttachmentOverflowMenuContextValues';\nimport { useMenuContextValues_unstable } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps } from './AttachmentOverflowMenu.types';\n\nexport const AttachmentOverflowMenu: React.FC<AttachmentOverflowMenuProps> = props => {\n const state = useAttachmentOverflowMenu_unstable(props);\n const menuContextValues = useMenuContextValues_unstable(state);\n const attachmentOverflowMenuContextValues = useAttachmentOverflowMenuContextValues_unstable(state);\n\n return renderAttachmentOverflowMenu_unstable(state, { menuContextValues, attachmentOverflowMenuContextValues });\n};\n\nAttachmentOverflowMenu.displayName = 'AttachmentOverflowMenu';\n"],"names":["useAttachmentOverflowMenu_unstable","renderAttachmentOverflowMenu_unstable","useAttachmentOverflowMenuContextValues_unstable","useMenuContextValues_unstable","AttachmentOverflowMenu","props","state","menuContextValues","attachmentOverflowMenuContextValues","displayName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AACA,SAASA,kCAAkC,QAAQ,8BAA8B;AACjF,SAASC,qCAAqC,QAAQ,iCAAiC;AACvF,SAASC,+CAA+C,QAAQ,2CAA2C;AAC3G,SAASC,6BAA6B,QAAQ,6BAA6B;AAG3E,OAAO,MAAMC,yBAAgEC,CAAAA;IAC3E,MAAMC,QAAQN,mCAAmCK;IACjD,MAAME,oBAAoBJ,8BAA8BG;IACxD,MAAME,sCAAsCN,gDAAgDI;IAE5F,OAAOL,sCAAsCK,OAAO;QAAEC;QAAmBC;IAAoC;AAC/G,EAAE;AAEFJ,uBAAuBK,WAAW,GAAG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AttachmentOverflowMenu.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenu.types.ts"],"sourcesContent":["import type { MenuProps, MenuSlots, MenuState } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuContextValue } from '../../contexts/attachmentOverflowMenuContext';\n\nexport type AttachmentOverflowMenuSlots = MenuSlots;\n\n/**\n * AttachmentOverflowMenu Props\n */\nexport type AttachmentOverflowMenuProps = MenuProps;\n\n/**\n * State used in rendering AttachmentOverflowMenu\n */\nexport type AttachmentOverflowMenuState = MenuState & {\n isOverflowing: boolean;\n overflowButtonRef?: React.RefObject<HTMLButtonElement>;\n overflowCount: number;\n};\n\nexport type AttachmentOverflowMenuContextValues = {\n attachmentOverflowMenu: AttachmentOverflowMenuContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AAmBA,WAEE"}
@@ -0,0 +1,6 @@
1
+ export * from './AttachmentOverflowMenu';
2
+ export * from './AttachmentOverflowMenu.types';
3
+ export * from './renderAttachmentOverflowMenu';
4
+ export * from './useAttachmentOverflowMenu';
5
+ export * from './useAttachmentOverflowMenuContextValues';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenu';\nexport * from './AttachmentOverflowMenu.types';\nexport * from './renderAttachmentOverflowMenu';\nexport * from './useAttachmentOverflowMenu';\nexport * from './useAttachmentOverflowMenuContextValues';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,2BAA2B;AACzC,cAAc,iCAAiC;AAC/C,cAAc,iCAAiC;AAC/C,cAAc,8BAA8B;AAC5C,cAAc,2CAA2C"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots, renderMenu_unstable } from '@fluentui/react-components';
3
+ import { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';
4
+ /**
5
+ * Render the final JSX of AttachmentOverflowMenu
6
+ */
7
+ export const renderAttachmentOverflowMenu_unstable = (state, contextValues) => {
8
+ const {
9
+ menuContextValues,
10
+ attachmentOverflowMenuContextValues
11
+ } = contextValues;
12
+ assertSlots(state);
13
+ return state.isOverflowing ? /*#__PURE__*/_jsx(AttachmentOverflowMenuProvider, {
14
+ value: attachmentOverflowMenuContextValues.attachmentOverflowMenu,
15
+ children: renderMenu_unstable(state, menuContextValues)
16
+ }) : null;
17
+ };
18
+ //# sourceMappingURL=renderAttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderAttachmentOverflowMenu.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots, renderMenu_unstable } from '@fluentui/react-components';\nimport { AttachmentOverflowMenuProvider } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuState,\n AttachmentOverflowMenuSlots,\n AttachmentOverflowMenuContextValues,\n} from './AttachmentOverflowMenu.types';\nimport type { MenuContextValues } from '@fluentui/react-components';\n\n/**\n * Render the final JSX of AttachmentOverflowMenu\n */\nexport const renderAttachmentOverflowMenu_unstable = (\n state: AttachmentOverflowMenuState,\n contextValues: {\n menuContextValues: MenuContextValues;\n attachmentOverflowMenuContextValues: AttachmentOverflowMenuContextValues;\n },\n) => {\n const { menuContextValues, attachmentOverflowMenuContextValues } = contextValues;\n assertSlots<AttachmentOverflowMenuSlots>(state);\n\n return state.isOverflowing ? (\n <AttachmentOverflowMenuProvider value={attachmentOverflowMenuContextValues.attachmentOverflowMenu}>\n {renderMenu_unstable(state, menuContextValues)}\n </AttachmentOverflowMenuProvider>\n ) : null;\n};\n"],"names":["assertSlots","renderMenu_unstable","AttachmentOverflowMenuProvider","renderAttachmentOverflowMenu_unstable","state","contextValues","menuContextValues","attachmentOverflowMenuContextValues","isOverflowing","value","attachmentOverflowMenu"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,EAAEC,mBAAmB,QAAQ,6BAA6B;AAC9E,SAASC,8BAA8B,QAAQ,+CAA+C;AAQ9F;;CAEC,GACD,OAAO,MAAMC,wCAAwC,CACnDC,OACAC;IAKA,MAAM,EAAEC,iBAAiB,EAAEC,mCAAmC,EAAE,GAAGF;IACnEL,YAAyCI;IAEzC,OAAOA,MAAMI,aAAa,iBACxB,KAACN;QAA+BO,OAAOF,oCAAoCG,sBAAsB;kBAC9FT,oBAAoBG,OAAOE;SAE5B;AACN,EAAE"}
@@ -0,0 +1,24 @@
1
+ import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';
2
+ /**
3
+ * Create the state required to render AttachmentOverflowMenu.
4
+ *
5
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,
6
+ * before being passed to renderAttachmentOverflowMenu_unstable.
7
+ *
8
+ * @param props - props from this instance of AttachmentOverflowMenu
9
+ */
10
+ export const useAttachmentOverflowMenu_unstable = props => {
11
+ const menuState = useMenu_unstable(props);
12
+ const {
13
+ isOverflowing,
14
+ ref: overflowButtonRef,
15
+ overflowCount
16
+ } = useOverflowMenu();
17
+ return {
18
+ ...menuState,
19
+ isOverflowing,
20
+ overflowButtonRef,
21
+ overflowCount
22
+ };
23
+ };
24
+ //# sourceMappingURL=useAttachmentOverflowMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenu.ts"],"sourcesContent":["import { useMenu_unstable, useOverflowMenu } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuProps, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenu.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuStyles_unstable,\n * before being passed to renderAttachmentOverflowMenu_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenu\n */\nexport const useAttachmentOverflowMenu_unstable = (props: AttachmentOverflowMenuProps): AttachmentOverflowMenuState => {\n const menuState = useMenu_unstable(props);\n const { isOverflowing, ref: overflowButtonRef, overflowCount } = useOverflowMenu<HTMLButtonElement>();\n\n return {\n ...menuState,\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n};\n"],"names":["useMenu_unstable","useOverflowMenu","useAttachmentOverflowMenu_unstable","props","menuState","isOverflowing","ref","overflowButtonRef","overflowCount"],"rangeMappings":";;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,gBAAgB,EAAEC,eAAe,QAAQ,6BAA6B;AAG/E;;;;;;;CAOC,GACD,OAAO,MAAMC,qCAAqC,CAACC;IACjD,MAAMC,YAAYJ,iBAAiBG;IACnC,MAAM,EAAEE,aAAa,EAAEC,KAAKC,iBAAiB,EAAEC,aAAa,EAAE,GAAGP;IAEjE,OAAO;QACL,GAAGG,SAAS;QACZC;QACAE;QACAC;IACF;AACF,EAAE"}
@@ -0,0 +1,17 @@
1
+ export function useAttachmentOverflowMenuContextValues_unstable(state) {
2
+ const {
3
+ isOverflowing,
4
+ overflowButtonRef,
5
+ overflowCount
6
+ } = state;
7
+ // This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
8
+ const attachmentOverflowMenu = {
9
+ isOverflowing,
10
+ overflowButtonRef,
11
+ overflowCount
12
+ };
13
+ return {
14
+ attachmentOverflowMenu
15
+ };
16
+ }
17
+ //# sourceMappingURL=useAttachmentOverflowMenuContextValues.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuContextValues.ts"],"sourcesContent":["import type { AttachmentOverflowMenuContextValues, AttachmentOverflowMenuState } from './AttachmentOverflowMenu.types';\n\nexport function useAttachmentOverflowMenuContextValues_unstable(\n state: AttachmentOverflowMenuState,\n): AttachmentOverflowMenuContextValues {\n const { isOverflowing, overflowButtonRef, overflowCount } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const attachmentOverflowMenu = {\n isOverflowing,\n overflowButtonRef,\n overflowCount,\n };\n\n return { attachmentOverflowMenu };\n}\n"],"names":["useAttachmentOverflowMenuContextValues_unstable","state","isOverflowing","overflowButtonRef","overflowCount","attachmentOverflowMenu"],"rangeMappings":";;;;;;;;;;;","mappings":"AAEA,OAAO,SAASA,gDACdC,KAAkC;IAElC,MAAM,EAAEC,aAAa,EAAEC,iBAAiB,EAAEC,aAAa,EAAE,GAAGH;IAE5D,mGAAmG;IACnG,MAAMI,yBAAyB;QAC7BH;QACAC;QACAC;IACF;IAEA,OAAO;QAAEC;IAAuB;AAClC"}
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';
3
+ import { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';
4
+ import { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles';
5
+ export const AttachmentOverflowMenuButton = /*#__PURE__*/React.forwardRef((props, ref) => {
6
+ const state = useAttachmentOverflowMenuButton_unstable(props, ref);
7
+ useAttachmentOverflowMenuButtonStyles_unstable(state);
8
+ return renderAttachmentOverflowMenuButton_unstable(state);
9
+ });
10
+ AttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';
11
+ //# sourceMappingURL=AttachmentOverflowMenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenuButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';\nimport { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';\nimport { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles';\nimport type { AttachmentOverflowMenuButtonProps } from './AttachmentOverflowMenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AttachmentOverflowMenuButton: ForwardRefComponent<AttachmentOverflowMenuButtonProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuButton_unstable(props, ref);\n\n useAttachmentOverflowMenuButtonStyles_unstable(state);\n return renderAttachmentOverflowMenuButton_unstable(state);\n },\n);\n\nAttachmentOverflowMenuButton.displayName = 'AttachmentOverflowMenuButton';\n"],"names":["React","useAttachmentOverflowMenuButton_unstable","renderAttachmentOverflowMenuButton_unstable","useAttachmentOverflowMenuButtonStyles_unstable","AttachmentOverflowMenuButton","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wCAAwC,QAAQ,oCAAoC;AAC7F,SAASC,2CAA2C,QAAQ,uCAAuC;AACnG,SAASC,8CAA8C,QAAQ,0CAA0C;AAIzG,OAAO,MAAMC,6CAAuFJ,MAAMK,UAAU,CAClH,CAACC,OAAOC;IACN,MAAMC,QAAQP,yCAAyCK,OAAOC;IAE9DJ,+CAA+CK;IAC/C,OAAON,4CAA4CM;AACrD,GACA;AAEFJ,6BAA6BK,WAAW,GAAG"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * State used in rendering AttachmentOverflowMenuButton
3
+ */export {};
4
+ //# sourceMappingURL=AttachmentOverflowMenuButton.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenuButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { AttachmentOverflowMenuState } from '../AttachmentOverflowMenu';\n\nexport type AttachmentOverflowMenuButtonSlots = {\n root: NonNullable<Slot<'button'>>;\n};\n\n/**\n * AttachmentOverflowMenuButton Props\n */\nexport type AttachmentOverflowMenuButtonProps = ComponentProps<Partial<AttachmentOverflowMenuButtonSlots>>;\n\n/**\n * State used in rendering AttachmentOverflowMenuButton\n */\nexport type AttachmentOverflowMenuButtonState = ComponentState<AttachmentOverflowMenuButtonSlots> &\n Pick<AttachmentOverflowMenuState, 'isOverflowing' | 'overflowCount'>;\n"],"names":[],"rangeMappings":";;","mappings":"AAYA;;CAEC,GACD,WACuE"}
@@ -0,0 +1,6 @@
1
+ export * from './AttachmentOverflowMenuButton';
2
+ export * from './AttachmentOverflowMenuButton.types';
3
+ export * from './renderAttachmentOverflowMenuButton';
4
+ export * from './useAttachmentOverflowMenuButton';
5
+ export * from './useAttachmentOverflowMenuButtonStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenuButton';\nexport * from './AttachmentOverflowMenuButton.types';\nexport * from './renderAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButtonStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,iCAAiC;AAC/C,cAAc,uCAAuC;AACrD,cAAc,uCAAuC;AACrD,cAAc,oCAAoC;AAClD,cAAc,0CAA0C"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { MenuTrigger, assertSlots } from '@fluentui/react-components';
3
+ /**
4
+ * Render the final JSX of AttachmentOverflowMenuButton
5
+ */
6
+ export const renderAttachmentOverflowMenuButton_unstable = state => {
7
+ assertSlots(state);
8
+ return state.isOverflowing ? /*#__PURE__*/_jsx(MenuTrigger, {
9
+ children: /*#__PURE__*/_jsxs(state.root, {
10
+ children: [" +", state.overflowCount, " "]
11
+ })
12
+ }) : null;
13
+ };
14
+ //# sourceMappingURL=renderAttachmentOverflowMenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderAttachmentOverflowMenuButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { MenuTrigger, assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuButtonState,\n AttachmentOverflowMenuButtonSlots,\n} from './AttachmentOverflowMenuButton.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuButton\n */\nexport const renderAttachmentOverflowMenuButton_unstable = (state: AttachmentOverflowMenuButtonState) => {\n assertSlots<AttachmentOverflowMenuButtonSlots>(state);\n\n return state.isOverflowing ? (\n <MenuTrigger>\n <state.root> +{state.overflowCount} </state.root>\n </MenuTrigger>\n ) : null;\n};\n"],"names":["MenuTrigger","assertSlots","renderAttachmentOverflowMenuButton_unstable","state","isOverflowing","root","overflowCount"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,EAAEC,WAAW,QAAQ,6BAA6B;AAMtE;;CAEC,GACD,OAAO,MAAMC,8CAA8C,CAACC;IAC1DF,YAA+CE;IAE/C,OAAOA,MAAMC,aAAa,iBACxB,KAACJ;kBACC,cAAA,MAACG,MAAME,IAAI;;gBAAC;gBAAGF,MAAMG,aAAa;gBAAC;;;SAEnC;AACN,EAAE"}
@@ -0,0 +1,32 @@
1
+ import { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-components';
2
+ import { useAttachmentOverflowMenuContext_unstable } from '../../contexts/attachmentOverflowMenuContext';
3
+ /**
4
+ * Create the state required to render AttachmentOverflowMenuButton.
5
+ *
6
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,
7
+ * before being passed to renderAttachmentOverflowMenuButton_unstable.
8
+ *
9
+ * @param props - props from this instance of AttachmentOverflowMenuButton
10
+ * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton
11
+ */
12
+ export const useAttachmentOverflowMenuButton_unstable = (props, ref) => {
13
+ const {
14
+ isOverflowing,
15
+ overflowCount,
16
+ overflowButtonRef
17
+ } = useAttachmentOverflowMenuContext_unstable(context => context);
18
+ return {
19
+ components: {
20
+ root: 'button'
21
+ },
22
+ root: slot.always(getIntrinsicElementProps('button', {
23
+ ref: useMergedRefs(ref, overflowButtonRef),
24
+ ...props
25
+ }), {
26
+ elementType: 'button'
27
+ }),
28
+ isOverflowing,
29
+ overflowCount
30
+ };
31
+ };
32
+ //# sourceMappingURL=useAttachmentOverflowMenuButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuButton.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot, useMergedRefs } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuContext_unstable } from '../../contexts/attachmentOverflowMenuContext';\nimport type {\n AttachmentOverflowMenuButtonProps,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenuButton.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuButtonStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuButton_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuButton\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton\n */\nexport const useAttachmentOverflowMenuButton_unstable = (\n props: AttachmentOverflowMenuButtonProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentOverflowMenuButtonState => {\n const { isOverflowing, overflowCount, overflowButtonRef } = useAttachmentOverflowMenuContext_unstable(\n context => context,\n );\n\n return {\n components: {\n root: 'button',\n },\n root: slot.always(\n getIntrinsicElementProps('button', {\n ref: useMergedRefs(ref, overflowButtonRef),\n ...props,\n }),\n { elementType: 'button' },\n ),\n isOverflowing,\n overflowCount,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useMergedRefs","useAttachmentOverflowMenuContext_unstable","useAttachmentOverflowMenuButton_unstable","props","ref","isOverflowing","overflowCount","overflowButtonRef","context","components","root","always","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,wBAAwB,EAAEC,IAAI,EAAEC,aAAa,QAAQ,6BAA6B;AAC3F,SAASC,yCAAyC,QAAQ,+CAA+C;AAMzG;;;;;;;;CAQC,GACD,OAAO,MAAMC,2CAA2C,CACtDC,OACAC;IAEA,MAAM,EAAEC,aAAa,EAAEC,aAAa,EAAEC,iBAAiB,EAAE,GAAGN,0CAC1DO,CAAAA,UAAWA;IAGb,OAAO;QACLC,YAAY;YACVC,MAAM;QACR;QACAA,MAAMX,KAAKY,MAAM,CACfb,yBAAyB,UAAU;YACjCM,KAAKJ,cAAcI,KAAKG;YACxB,GAAGJ,KAAK;QACV,IACA;YAAES,aAAa;QAAS;QAE1BP;QACAC;IACF;AACF,EAAE"}
@@ -0,0 +1,17 @@
1
+ import { __resetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';
2
+ export const attachmentOverflowMenuButtonClassNames = {
3
+ root: 'fai-AttachmentOverflowMenuButton'
4
+ };
5
+ const useRootBaseClassName = __resetStyles("rkv09vy", null, {
6
+ r: [".rkv09vy{color:var(--colorNeutralForeground1);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);cursor:pointer;display:inline-flex;flex-wrap:nowrap;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightRegular);justify-content:center;padding:var(--spacingVerticalS);vertical-align:middle;align-self:end;}", ".rkv09vy:hover{cursor:pointer;background-color:var(--colorNeutralBackground3Hover);color:var(--colorNeutralForeground2Hover);}", ".rkv09vy:active{background-color:var(--colorNeutralBackground3Pressed);color:var(--colorNeutralForeground2Pressed);}"],
7
+ s: ["@media (forced-colors: active){.rkv09vy:hover{background-color:HighlightText;}.rkv09vy:active{background-color:HighlightText;}}"]
8
+ });
9
+ /**
10
+ * Apply styling to the AttachmentOverflowMenuButton slots based on the state
11
+ */
12
+ export const useAttachmentOverflowMenuButtonStyles_unstable = state => {
13
+ const rootBaseClassName = useRootBaseClassName();
14
+ state.root.className = mergeClasses(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, state.root.className);
15
+ return state;
16
+ };
17
+ //# sourceMappingURL=useAttachmentOverflowMenuButtonStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuButtonStyles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuButtonSlots,\n AttachmentOverflowMenuButtonState,\n} from './AttachmentOverflowMenuButton.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentOverflowMenuButtonClassNames: SlotClassNames<AttachmentOverflowMenuButtonSlots> = {\n root: 'fai-AttachmentOverflowMenuButton',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground1,\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 cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n fontFamily: typographyStyles.body1.fontFamily,\n fontSize: typographyStyles.body1.fontSize,\n fontWeight: typographyStyles.body1.fontWeight,\n justifyContent: 'center',\n padding: tokens.spacingVerticalS,\n verticalAlign: 'middle',\n alignSelf: 'end',\n\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 * Apply styling to the AttachmentOverflowMenuButton slots based on the state\n */\nexport const useAttachmentOverflowMenuButtonStyles_unstable = (\n state: AttachmentOverflowMenuButtonState,\n): AttachmentOverflowMenuButtonState => {\n const rootBaseClassName = useRootBaseClassName();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuButtonClassNames.root,\n rootBaseClassName,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","typographyStyles","attachmentOverflowMenuButtonClassNames","root","useRootBaseClassName","color","colorNeutralForeground1","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","boxSizing","columnGap","spacingHorizontalSNudge","cursor","display","flexWrap","fontFamily","body1","fontSize","fontWeight","justifyContent","padding","spacingVerticalS","verticalAlign","alignSelf","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","useAttachmentOverflowMenuButtonStyles_unstable","state","rootBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAOrG,OAAO,MAAMC,yCAA4F;IACvGC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBN,gBAAgB;IAC3CO,OAAOL,OAAOM,uBAAuB;IACrCC,YAAY;IACZC,iBAAiBR,OAAOS,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEV,OAAOW,eAAe,CAAC,OAAO,EAAEX,OAAOY,mBAAmB,CAAC,CAAC;IACvEC,cAAcb,OAAOc,kBAAkB;IACvCC,WAAW;IACXC,WAAWhB,OAAOiB,uBAAuB;IACzCC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,YAAYpB,iBAAiBqB,KAAK,CAACD,UAAU;IAC7CE,UAAUtB,iBAAiBqB,KAAK,CAACC,QAAQ;IACzCC,YAAYvB,iBAAiBqB,KAAK,CAACE,UAAU;IAC7CC,gBAAgB;IAChBC,SAAS1B,OAAO2B,gBAAgB;IAChCC,eAAe;IACfC,WAAW;IAEX,UAAU;QACRX,QAAQ;QACRV,iBAAiBR,OAAO8B,4BAA4B;QACpDzB,OAAOL,OAAO+B,4BAA4B;IAC5C;IACA,WAAW;QACTvB,iBAAiBR,OAAOgC,8BAA8B;QACtD3B,OAAOL,OAAOiC,8BAA8B;IAC9C;IACA,kCAAkC;QAChC,UAAU;YACRzB,iBAAiB;QACnB;QACA,WAAW;YACTA,iBAAiB;QACnB;IACF;AACF;AACA;;CAEC,GACD,OAAO,MAAM0B,iDAAiD,CAC5DC;IAEA,MAAMC,oBAAoBhC;IAE1B+B,MAAMhC,IAAI,CAACkC,SAAS,GAAGtC,aACrBG,uCAAuCC,IAAI,EAC3CiC,mBACAD,MAAMhC,IAAI,CAACkC,SAAS;IAGtB,OAAOF;AACT,EAAE"}
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+ import { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';
3
+ import { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';
4
+ import { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles';
5
+ export const AttachmentOverflowMenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {
6
+ const state = useAttachmentOverflowMenuItem_unstable(props, ref);
7
+ useAttachmentOverflowMenuItemStyles_unstable(state);
8
+ return renderAttachmentOverflowMenuItem_unstable(state);
9
+ });
10
+ AttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';
11
+ //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';\nimport { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';\nimport type { AttachmentOverflowMenuItemProps } from './AttachmentOverflowMenuItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles';\nexport const AttachmentOverflowMenuItem: ForwardRefComponent<AttachmentOverflowMenuItemProps> = React.forwardRef(\n (props, ref) => {\n const state = useAttachmentOverflowMenuItem_unstable(props, ref);\n useAttachmentOverflowMenuItemStyles_unstable(state);\n\n return renderAttachmentOverflowMenuItem_unstable(state);\n },\n);\n\nAttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';\n"],"names":["React","useAttachmentOverflowMenuItem_unstable","renderAttachmentOverflowMenuItem_unstable","useAttachmentOverflowMenuItemStyles_unstable","AttachmentOverflowMenuItem","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sCAAsC,QAAQ,kCAAkC;AACzF,SAASC,yCAAyC,QAAQ,qCAAqC;AAG/F,SAASC,4CAA4C,QAAQ,wCAAwC;AACrG,OAAO,MAAMC,2CAAmFJ,MAAMK,UAAU,CAC9G,CAACC,OAAOC;IACN,MAAMC,QAAQP,uCAAuCK,OAAOC;IAC5DJ,6CAA6CK;IAE7C,OAAON,0CAA0CM;AACnD,GACA;AAEFJ,2BAA2BK,WAAW,GAAG"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * State used in rendering AttachmentOverflowMenuItem
3
+ */export {};
4
+ //# sourceMappingURL=AttachmentOverflowMenuItem.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["AttachmentOverflowMenuItem.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, MenuItem, Slot } from '@fluentui/react-components';\nimport type { AttachmentProps } from '../Attachment';\n\nexport type AttachmentOverflowMenuItemSlots = {\n root: NonNullable<Slot<typeof MenuItem>>;\n};\n\n/**\n * AttachmentOverflowMenuItem Props\n */\nexport type AttachmentOverflowMenuItemProps = ComponentProps<Partial<AttachmentOverflowMenuItemSlots>> &\n Pick<AttachmentProps, 'id' | 'media' | 'imageOnly'>;\n\n/**\n * State used in rendering AttachmentOverflowMenuItem\n */\nexport type AttachmentOverflowMenuItemState = ComponentState<AttachmentOverflowMenuItemSlots> &\n Pick<AttachmentOverflowMenuItemProps, 'imageOnly'> & {\n isVisible: boolean;\n };\n"],"names":[],"rangeMappings":";;","mappings":"AAaA;;CAEC,GACD,WAGI"}
@@ -0,0 +1,6 @@
1
+ export * from './AttachmentOverflowMenuItem';
2
+ export * from './AttachmentOverflowMenuItem.types';
3
+ export * from './renderAttachmentOverflowMenuItem';
4
+ export * from './useAttachmentOverflowMenuItem';
5
+ export * from './useAttachmentOverflowMenuItemStyles';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenuItem';\nexport * from './AttachmentOverflowMenuItem.types';\nexport * from './renderAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItemStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,+BAA+B;AAC7C,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,kCAAkC;AAChD,cAAc,wCAAwC"}
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
+ import { assertSlots } from '@fluentui/react-components';
3
+ /**
4
+ * Render the final JSX of AttachmentOverflowMenuItem
5
+ */
6
+ export const renderAttachmentOverflowMenuItem_unstable = state => {
7
+ assertSlots(state);
8
+ return !state.isVisible ? /*#__PURE__*/_jsx(state.root, {}) : null;
9
+ };
10
+ //# sourceMappingURL=renderAttachmentOverflowMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderAttachmentOverflowMenuItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemState,\n AttachmentOverflowMenuItemSlots,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Render the final JSX of AttachmentOverflowMenuItem\n */\nexport const renderAttachmentOverflowMenuItem_unstable = (state: AttachmentOverflowMenuItemState) => {\n assertSlots<AttachmentOverflowMenuItemSlots>(state);\n\n return !state.isVisible ? <state.root /> : null;\n};\n"],"names":["assertSlots","renderAttachmentOverflowMenuItem_unstable","state","isVisible","root"],"rangeMappings":";;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAMzD;;CAEC,GACD,OAAO,MAAMC,4CAA4C,CAACC;IACxDF,YAA6CE;IAE7C,OAAO,CAACA,MAAMC,SAAS,iBAAG,KAACD,MAAME,IAAI,QAAM;AAC7C,EAAE"}
@@ -0,0 +1,43 @@
1
+ import * as React from 'react';
2
+ import { MenuItem, mergeCallbacks, slot, useIsOverflowItemVisible } from '@fluentui/react-components';
3
+ import { Dismiss20Filled, Dismiss20Regular, bundleIcon } from '@fluentui/react-icons';
4
+ import { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';
5
+ /**
6
+ * Create the state required to render AttachmentOverflowMenuItem.
7
+ *
8
+ * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,
9
+ * before being passed to renderAttachmentOverflowMenuItem_unstable.
10
+ *
11
+ * @param props - props from this instance of AttachmentOverflowMenuItem
12
+ * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem
13
+ */
14
+ export const useAttachmentOverflowMenuItem_unstable = (props, ref) => {
15
+ const {
16
+ id,
17
+ imageOnly,
18
+ media
19
+ } = props;
20
+ const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
21
+ const isVisible = useIsOverflowItemVisible(id);
22
+ const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);
23
+ const root = slot.always({
24
+ ref,
25
+ icon: media,
26
+ secondaryContent: /*#__PURE__*/React.createElement(DismissIcon, null),
27
+ ...props
28
+ }, {
29
+ elementType: MenuItem
30
+ });
31
+ root.onClick = mergeCallbacks(root.onClick, ev => onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
32
+ id
33
+ }));
34
+ return {
35
+ components: {
36
+ root: MenuItem
37
+ },
38
+ root,
39
+ isVisible,
40
+ imageOnly
41
+ };
42
+ };
43
+ //# sourceMappingURL=useAttachmentOverflowMenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { MenuItem, mergeCallbacks, slot, useIsOverflowItemVisible } from '@fluentui/react-components';\nimport { Dismiss20Filled, Dismiss20Regular, bundleIcon } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type {\n AttachmentOverflowMenuItemProps,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\n\n/**\n * Create the state required to render AttachmentOverflowMenuItem.\n *\n * The returned state can be modified with hooks such as useAttachmentOverflowMenuItemStyles_unstable,\n * before being passed to renderAttachmentOverflowMenuItem_unstable.\n *\n * @param props - props from this instance of AttachmentOverflowMenuItem\n * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem\n */\nexport const useAttachmentOverflowMenuItem_unstable = (\n props: AttachmentOverflowMenuItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentOverflowMenuItemState => {\n const { id, imageOnly, media } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const isVisible = useIsOverflowItemVisible(id);\n\n const onAttachmentDismiss = useAttachmentListContext_unstable(context => context.onAttachmentDismiss);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <DismissIcon />, ...props },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev =>\n onAttachmentDismiss?.(ev, {\n id,\n }),\n );\n\n return {\n components: {\n root: MenuItem,\n },\n root,\n isVisible,\n imageOnly,\n };\n};\n"],"names":["React","MenuItem","mergeCallbacks","slot","useIsOverflowItemVisible","Dismiss20Filled","Dismiss20Regular","bundleIcon","useAttachmentListContext_unstable","useAttachmentOverflowMenuItem_unstable","props","ref","id","imageOnly","media","DismissIcon","isVisible","onAttachmentDismiss","context","root","always","icon","secondaryContent","elementType","onClick","ev","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,QAAQ,EAAEC,cAAc,EAAEC,IAAI,EAAEC,wBAAwB,QAAQ,6BAA6B;AACtG,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,wBAAwB;AACtF,SAASC,iCAAiC,QAAQ,uCAAuC;AAMzF;;;;;;;;CAQC,GACD,OAAO,MAAMC,yCAAyC,CACpDC,OACAC;IAEA,MAAM,EAAEC,EAAE,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGJ;IACjC,MAAMK,cAAcR,WAAWF,iBAAiBC;IAChD,MAAMU,YAAYZ,yBAAyBQ;IAE3C,MAAMK,sBAAsBT,kCAAkCU,CAAAA,UAAWA,QAAQD,mBAAmB;IAEpG,MAAME,OAAOhB,KAAKiB,MAAM,CACtB;QAAET;QAAKU,MAAMP;QAAOQ,gCAAkB,oBAACP;QAAgB,GAAGL,KAAK;IAAC,GAChE;QAAEa,aAAatB;IAAS;IAE1BkB,KAAKK,OAAO,GAAGtB,eAAeiB,KAAKK,OAAO,EAAEC,CAAAA,KAC1CR,gCAAAA,0CAAAA,oBAAsBQ,IAAI;YACxBb;QACF;IAGF,OAAO;QACLc,YAAY;YACVP,MAAMlB;QACR;QACAkB;QACAH;QACAH;IACF;AACF,EAAE"}
@@ -0,0 +1,25 @@
1
+ import { __resetStyles, __styles, mergeClasses } from '@fluentui/react-components';
2
+ export const attachmentOverflowMenuItemClassNames = {
3
+ root: 'fai-AttachmentOverflowMenuItem'
4
+ };
5
+ const useRootBaseClassName = __resetStyles("r0", null, []);
6
+ const useStyles = __styles({
7
+ imageOnly: {
8
+ Bt984gj: "f122n59"
9
+ }
10
+ }, {
11
+ d: [".f122n59{align-items:center;}"]
12
+ });
13
+ /**
14
+ * Apply styling to the AttachmentList slots based on the state
15
+ */
16
+ export const useAttachmentOverflowMenuItemStyles_unstable = state => {
17
+ const {
18
+ imageOnly
19
+ } = state;
20
+ const rootBaseClassName = useRootBaseClassName();
21
+ const styles = useStyles();
22
+ state.root.className = mergeClasses(attachmentOverflowMenuItemClassNames.root, rootBaseClassName, imageOnly && styles.imageOnly, state.root.className);
23
+ return state;
24
+ };
25
+ //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuItemStyles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport type {\n AttachmentOverflowMenuItemSlots,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentOverflowMenuItemClassNames: SlotClassNames<AttachmentOverflowMenuItemSlots> = {\n root: 'fai-AttachmentOverflowMenuItem',\n};\n\nconst useRootBaseClassName = makeResetStyles({});\nconst useStyles = makeStyles({\n imageOnly: {\n alignItems: 'center',\n },\n});\n\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentOverflowMenuItemStyles_unstable = (\n state: AttachmentOverflowMenuItemState,\n): AttachmentOverflowMenuItemState => {\n const { imageOnly } = state;\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.root,\n rootBaseClassName,\n imageOnly && styles.imageOnly,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","attachmentOverflowMenuItemClassNames","root","useRootBaseClassName","useStyles","imageOnly","alignItems","useAttachmentOverflowMenuItemStyles_unstable","state","rootBaseClassName","styles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AAOvF,OAAO,MAAMC,uCAAwF;IACnGC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBL,gBAAgB,CAAC;AAC9C,MAAMM,YAAYL,WAAW;IAC3BM,WAAW;QACTC,YAAY;IACd;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,+CAA+C,CAC1DC;IAEA,MAAM,EAAEH,SAAS,EAAE,GAAGG;IACtB,MAAMC,oBAAoBN;IAC1B,MAAMO,SAASN;IAEfI,MAAMN,IAAI,CAACS,SAAS,GAAGX,aACrBC,qCAAqCC,IAAI,EACzCO,mBACAJ,aAAaK,OAAOL,SAAS,EAC7BG,MAAMN,IAAI,CAACS,SAAS;IAGtB,OAAOH;AACT,EAAE"}
@@ -3,7 +3,10 @@ import { useAttachmentTag_unstable } from './useAttachmentTag';
3
3
  import { renderAttachmentTag_unstable } from './renderAttachmentTag';
4
4
  import { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';
5
5
  import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
- // AttachmentTag component - TODO: add more docs
6
+ /**
7
+ * @deprecated use new Attachment component exported from \@fluentui-copilot/react-attachments package instead.
8
+ * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).
9
+ */
7
10
  export const AttachmentTag = /*#__PURE__*/React.forwardRef((props, ref) => {
8
11
  const state = useAttachmentTag_unstable(props, ref);
9
12
  useAttachmentTagStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// AttachmentTag component - TODO: add more docs\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["React","useAttachmentTag_unstable","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useCustomStyleHook","AttachmentTag","forwardRef","props","ref","state","displayName"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAG3E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,gDAAgD;AAChD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CL,gCAAgCM;IAChCL,mBAAmB,0BAA0BK;IAE7C,OAAOP,6BAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
1
+ {"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024. Will be removed in the next minor release (0.15.0).\n */\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["React","useAttachmentTag_unstable","renderAttachmentTag_unstable","useAttachmentTagStyles_unstable","useCustomStyleHook","AttachmentTag","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,2BAA2B;AAG3E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE;;;CAGC,GACD,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CL,gCAAgCM;IAChCL,mBAAmB,0BAA0BK;IAE7C,OAAOP,6BAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
@@ -1,2 +1,4 @@
1
- export {};
1
+ /**
2
+ * State used in rendering AttachmentTag
3
+ */export {};
2
4
  //# sourceMappingURL=AttachmentTag.types.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentTag.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagSlots = {\n root: NonNullable<Slot<'button'>>;\n\n media?: Slot<'span'>;\n\n content: NonNullable<Slot<'span'>>;\n\n icon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * AttachmentTag Props\n */\nexport type AttachmentTagProps = ComponentProps<Partial<AttachmentTagSlots>>;\n\n/**\n * State used in rendering AttachmentTag\n */\nexport type AttachmentTagState = ComponentState<AttachmentTagSlots>;\n"],"names":[],"mappings":"AAAA,WAoBoE"}
1
+ {"version":3,"sources":["AttachmentTag.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type AttachmentTagSlots = {\n root: NonNullable<Slot<'button'>>;\n\n media?: Slot<'span'>;\n\n content: NonNullable<Slot<'span'>>;\n\n icon: NonNullable<Slot<'span'>>;\n};\n\n/**\n * AttachmentTag Props\n */\nexport type AttachmentTagProps = ComponentProps<Partial<AttachmentTagSlots>>;\n\n/**\n * State used in rendering AttachmentTag\n */\nexport type AttachmentTagState = ComponentState<AttachmentTagSlots>;\n"],"names":[],"rangeMappings":";;","mappings":"AAiBA;;CAEC,GACD,WAAoE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTag.types';\nexport * from './renderAttachmentTag';\nexport * from './useAttachmentTag';\nexport * from './useAttachmentTagStyles';\n"],"names":[],"mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,2BAA2B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentTag';\nexport * from './AttachmentTag.types';\nexport * from './renderAttachmentTag';\nexport * from './useAttachmentTag';\nexport * from './useAttachmentTagStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,2BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"sources":["renderAttachmentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagState, AttachmentTagSlots } from './AttachmentTag.types';\n\n/**\n * Render the final JSX of AttachmentTag\n */\nexport const renderAttachmentTag_unstable = (state: AttachmentTagState) => {\n assertSlots<AttachmentTagSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAttachmentTag_unstable","state","root","media","content","icon"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAAgCE;IAEhC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,KAAK,kBAAI,KAACF,MAAME,KAAK;0BAC5B,KAACF,MAAMG,OAAO;0BACd,KAACH,MAAMI,IAAI;;;AAGjB,EAAE"}
1
+ {"version":3,"sources":["renderAttachmentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagState, AttachmentTagSlots } from './AttachmentTag.types';\n\n/**\n * Render the final JSX of AttachmentTag\n */\nexport const renderAttachmentTag_unstable = (state: AttachmentTagState) => {\n assertSlots<AttachmentTagSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderAttachmentTag_unstable","state","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAAgCE;IAEhC,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,KAAK,kBAAI,KAACF,MAAME,KAAK;0BAC5B,KAACF,MAAMG,OAAO;0BACd,KAACH,MAAMI,IAAI;;;AAGjB,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentTag.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagProps, AttachmentTagState } from './AttachmentTag.types';\n\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (\n props: AttachmentTagProps,\n ref: React.Ref<HTMLElement>,\n): AttachmentTagState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'button', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagSlots","useAttachmentTag_unstable","props","ref","elementType","root","media","content","icon"],"mappings":"AACA,SAASA,qBAAqB,QAAQ,iCAAiC;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,OAAOH,sBAAsBE,OAAOC,KAAK;QACvCC,aAAa;YAAEC,MAAM;YAAUC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC9E;AACF,EAAE"}
1
+ {"version":3,"sources":["useAttachmentTag.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagProps, AttachmentTagState } from './AttachmentTag.types';\n\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (\n props: AttachmentTagProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentTagState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'button', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagSlots","useAttachmentTag_unstable","props","ref","elementType","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;","mappings":"AACA,SAASA,qBAAqB,QAAQ,iCAAiC;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,OAAOH,sBAAsBE,OAAOC,KAAK;QACvCC,aAAa;YAAEC,MAAM;YAAUC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC9E;AACF,EAAE"}