@fluentui-copilot/react-attachments 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/CHANGELOG.json +34 -1
  2. package/CHANGELOG.md +14 -2
  3. package/lib/components/Attachment/Attachment.js +1 -1
  4. package/lib/components/Attachment/Attachment.js.map +1 -1
  5. package/lib/components/Attachment/index.js +1 -1
  6. package/lib/components/Attachment/index.js.map +1 -1
  7. package/lib/components/Attachment/{useAttachmentStyles.js → useAttachmentStyles.styles.js} +8 -6
  8. package/lib/components/Attachment/useAttachmentStyles.styles.js.map +1 -0
  9. package/lib/components/AttachmentList/AttachmentList.js +1 -1
  10. package/lib/components/AttachmentList/AttachmentList.js.map +1 -1
  11. package/lib/components/AttachmentList/index.js +1 -1
  12. package/lib/components/AttachmentList/index.js.map +1 -1
  13. package/lib/components/AttachmentList/useAttachmentList.js +1 -1
  14. package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
  15. package/lib/components/AttachmentList/{useAttachmentListStyles.js → useAttachmentListStyles.styles.js} +3 -1
  16. package/lib/components/AttachmentList/useAttachmentListStyles.styles.js.map +1 -0
  17. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
  18. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  19. package/lib/components/AttachmentOverflowMenuButton/index.js +1 -1
  20. package/lib/components/AttachmentOverflowMenuButton/index.js.map +1 -1
  21. package/lib/components/AttachmentOverflowMenuButton/{useAttachmentOverflowMenuButtonStyles.js → useAttachmentOverflowMenuButtonStyles.styles.js} +4 -2
  22. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -0
  23. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
  24. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  25. package/lib/components/AttachmentOverflowMenuItem/index.js +1 -1
  26. package/lib/components/AttachmentOverflowMenuItem/index.js.map +1 -1
  27. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +3 -7
  28. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  29. package/lib/components/AttachmentOverflowMenuItem/{useAttachmentOverflowMenuItemStyles.js → useAttachmentOverflowMenuItemStyles.styles.js} +4 -2
  30. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +1 -0
  31. package/lib/components/AttachmentTag/AttachmentTag.js +1 -1
  32. package/lib/components/AttachmentTag/AttachmentTag.js.map +1 -1
  33. package/lib/components/AttachmentTag/index.js +1 -1
  34. package/lib/components/AttachmentTag/index.js.map +1 -1
  35. package/lib/components/AttachmentTag/{useAttachmentTagStyles.js → useAttachmentTagStyles.styles.js} +3 -1
  36. package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.js.map +1 -0
  37. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
  38. package/lib/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  39. package/lib/components/AttachmentTagItem/index.js +1 -1
  40. package/lib/components/AttachmentTagItem/index.js.map +1 -1
  41. package/lib/components/AttachmentTagItem/{useAttachmentTagItemStyles.js → useAttachmentTagItemStyles.styles.js} +4 -2
  42. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js.map +1 -0
  43. package/lib/components/AttachmentTagList/AttachmentTagList.js +1 -1
  44. package/lib/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  45. package/lib/components/AttachmentTagList/index.js +1 -1
  46. package/lib/components/AttachmentTagList/index.js.map +1 -1
  47. package/lib/components/AttachmentTagList/{useAttachmentTagListStyles.js → useAttachmentTagListStyles.styles.js} +3 -1
  48. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.js.map +1 -0
  49. package/lib/components/utils/{useProgressBarStyles.js → useProgressBarStyles.styles.js} +9 -9
  50. package/lib/components/utils/useProgressBarStyles.styles.js.map +1 -0
  51. package/lib-commonjs/components/Attachment/Attachment.js +2 -2
  52. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  53. package/lib-commonjs/components/Attachment/index.js +1 -1
  54. package/lib-commonjs/components/Attachment/index.js.map +1 -1
  55. package/lib-commonjs/components/Attachment/{useAttachmentStyles.js → useAttachmentStyles.styles.js} +8 -7
  56. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +1 -0
  57. package/lib-commonjs/components/AttachmentList/AttachmentList.js +2 -2
  58. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  59. package/lib-commonjs/components/AttachmentList/index.js +1 -1
  60. package/lib-commonjs/components/AttachmentList/index.js.map +1 -1
  61. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +2 -2
  62. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  63. package/lib-commonjs/components/AttachmentList/{useAttachmentListStyles.js → useAttachmentListStyles.styles.js} +2 -1
  64. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js.map +1 -0
  65. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +2 -2
  66. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  67. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +1 -1
  68. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +1 -1
  69. package/lib-commonjs/components/AttachmentOverflowMenuButton/{useAttachmentOverflowMenuButtonStyles.js → useAttachmentOverflowMenuButtonStyles.styles.js} +4 -3
  70. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +1 -0
  71. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +2 -2
  72. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  73. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +1 -1
  74. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +1 -1
  75. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +2 -6
  76. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  77. package/lib-commonjs/components/AttachmentOverflowMenuItem/{useAttachmentOverflowMenuItemStyles.js → useAttachmentOverflowMenuItemStyles.styles.js} +4 -3
  78. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +1 -0
  79. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +2 -2
  80. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
  81. package/lib-commonjs/components/AttachmentTag/index.js +1 -1
  82. package/lib-commonjs/components/AttachmentTag/index.js.map +1 -1
  83. package/lib-commonjs/components/AttachmentTag/{useAttachmentTagStyles.js → useAttachmentTagStyles.styles.js} +2 -1
  84. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.js.map +1 -0
  85. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +2 -2
  86. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  87. package/lib-commonjs/components/AttachmentTagItem/index.js +1 -1
  88. package/lib-commonjs/components/AttachmentTagItem/index.js.map +1 -1
  89. package/lib-commonjs/components/AttachmentTagItem/{useAttachmentTagItemStyles.js → useAttachmentTagItemStyles.styles.js} +6 -5
  90. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.js.map +1 -0
  91. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +2 -2
  92. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  93. package/lib-commonjs/components/AttachmentTagList/index.js +1 -1
  94. package/lib-commonjs/components/AttachmentTagList/index.js.map +1 -1
  95. package/lib-commonjs/components/AttachmentTagList/{useAttachmentTagListStyles.js → useAttachmentTagListStyles.styles.js} +2 -1
  96. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.js.map +1 -0
  97. package/lib-commonjs/components/utils/{useProgressBarStyles.js → useProgressBarStyles.styles.js} +9 -9
  98. package/lib-commonjs/components/utils/useProgressBarStyles.styles.js.map +1 -0
  99. package/package.json +8 -9
  100. package/lib/components/Attachment/useAttachmentStyles.js.map +0 -1
  101. package/lib/components/AttachmentList/useAttachmentListStyles.js.map +0 -1
  102. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +0 -1
  103. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +0 -1
  104. package/lib/components/AttachmentTag/useAttachmentTagStyles.js.map +0 -1
  105. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +0 -1
  106. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.js.map +0 -1
  107. package/lib/components/utils/useProgressBarStyles.js.map +0 -1
  108. package/lib-commonjs/components/Attachment/useAttachmentStyles.js.map +0 -1
  109. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.js.map +0 -1
  110. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.js.map +0 -1
  111. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.js.map +0 -1
  112. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.js.map +0 -1
  113. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.js.map +0 -1
  114. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.js.map +0 -1
  115. package/lib-commonjs/components/utils/useProgressBarStyles.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,40 @@
2
2
  "name": "@fluentui-copilot/react-attachments",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 15 May 2024 23:57:19 GMT",
5
+ "date": "Fri, 31 May 2024 18:42:05 GMT",
6
+ "tag": "@fluentui-copilot/react-attachments_v0.9.5",
7
+ "version": "0.9.5",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "tristan.watanabe@gmail.com",
12
+ "package": "@fluentui-copilot/react-attachments",
13
+ "commit": "6df44dbcd267772e1b62426d14abe54a0b35bb97",
14
+ "comment": "chore: useStyle hook files now properly contain .styles. within filename."
15
+ },
16
+ {
17
+ "author": "tristan.watanabe@gmail.com",
18
+ "package": "@fluentui-copilot/react-attachments",
19
+ "commit": "0f9673a1e159796ce013783a883516b393f633c4",
20
+ "comment": "fix: overflow button count no longer updates when AttachmentList handleDismiss callback isn't correctly removing items."
21
+ },
22
+ {
23
+ "author": "tristan.watanabe@gmail.com",
24
+ "package": "@fluentui-copilot/react-attachments",
25
+ "commit": "7583464747aec7a8a79a8c79eaeff85d749025e4",
26
+ "comment": "chore: bump @fluentui dependencies to latest 9.52.0."
27
+ },
28
+ {
29
+ "author": "seanmonahan@microsoft.com",
30
+ "package": "@fluentui-copilot/react-attachments",
31
+ "commit": "c2e14c44cafafbdc10f52b9855384748a7524a63",
32
+ "comment": "chore: add eslint-plugin-react-compiler"
33
+ }
34
+ ]
35
+ }
36
+ },
37
+ {
38
+ "date": "Wed, 15 May 2024 23:57:34 GMT",
6
39
  "tag": "@fluentui-copilot/react-attachments_v0.9.4",
7
40
  "version": "0.9.4",
8
41
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,24 @@
1
1
  # Change Log - @fluentui-copilot/react-attachments
2
2
 
3
- This log was last generated on Wed, 15 May 2024 23:57:19 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 31 May 2024 18:42:05 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.9.5](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.9.5)
8
+
9
+ Fri, 31 May 2024 18:42:05 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.9.4..@fluentui-copilot/react-attachments_v0.9.5)
11
+
12
+ ### Patches
13
+
14
+ - chore: useStyle hook files now properly contain .styles. within filename. ([PR #1671](https://github.com/microsoft/fluentai/pull/1671) by tristan.watanabe@gmail.com)
15
+ - fix: overflow button count no longer updates when AttachmentList handleDismiss callback isn't correctly removing items. ([PR #1666](https://github.com/microsoft/fluentai/pull/1666) by tristan.watanabe@gmail.com)
16
+ - chore: bump @fluentui dependencies to latest 9.52.0. ([PR #1657](https://github.com/microsoft/fluentai/pull/1657) by tristan.watanabe@gmail.com)
17
+ - chore: add eslint-plugin-react-compiler ([PR #1642](https://github.com/microsoft/fluentai/pull/1642) by seanmonahan@microsoft.com)
18
+
7
19
  ## [0.9.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.9.4)
8
20
 
9
- Wed, 15 May 2024 23:57:19 GMT
21
+ Wed, 15 May 2024 23:57:34 GMT
10
22
  [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.9.3..@fluentui-copilot/react-attachments_v0.9.4)
11
23
 
12
24
  ### Patches
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useAttachment_unstable } from './useAttachment';
3
3
  import { renderAttachment_unstable } from './renderAttachment';
4
- import { useAttachmentStyles_unstable } from './useAttachmentStyles';
4
+ import { useAttachmentStyles_unstable } from './useAttachmentStyles.styles';
5
5
  // Attachment component - TODO: add more docs
6
6
  export const Attachment = /*#__PURE__*/React.forwardRef((props, ref) => {
7
7
  const state = useAttachment_unstable(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["Attachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachment_unstable } from './useAttachment';\nimport { renderAttachment_unstable } from './renderAttachment';\nimport { useAttachmentStyles_unstable } from './useAttachmentStyles';\nimport type { AttachmentProps } from './Attachment.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// Attachment component - TODO: add more docs\nexport const Attachment: ForwardRefComponent<AttachmentProps> = React.forwardRef((props, ref) => {\n const state = useAttachment_unstable(props, ref);\n\n useAttachmentStyles_unstable(state);\n return renderAttachment_unstable(state);\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["React","useAttachment_unstable","renderAttachment_unstable","useAttachmentStyles_unstable","Attachment","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AAIrE,6CAA6C;AAC7C,OAAO,MAAMC,2BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7B,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["Attachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachment_unstable } from './useAttachment';\nimport { renderAttachment_unstable } from './renderAttachment';\nimport { useAttachmentStyles_unstable } from './useAttachmentStyles.styles';\nimport type { AttachmentProps } from './Attachment.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// Attachment component - TODO: add more docs\nexport const Attachment: ForwardRefComponent<AttachmentProps> = React.forwardRef((props, ref) => {\n const state = useAttachment_unstable(props, ref);\n\n useAttachmentStyles_unstable(state);\n return renderAttachment_unstable(state);\n});\n\nAttachment.displayName = 'Attachment';\n"],"names":["React","useAttachment_unstable","renderAttachment_unstable","useAttachmentStyles_unstable","Attachment","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,kBAAkB;AACzD,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,+BAA+B;AAI5E,6CAA6C;AAC7C,OAAO,MAAMC,2BAAmDJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,QAAQP,uBAAuBK,OAAOC;IAE5CJ,6BAA6BK;IAC7B,OAAON,0BAA0BM;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
@@ -2,5 +2,5 @@ export * from './Attachment';
2
2
  export * from './Attachment.types';
3
3
  export * from './renderAttachment';
4
4
  export * from './useAttachment';
5
- export * from './useAttachmentStyles';
5
+ export * from './useAttachmentStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Attachment';\nexport * from './Attachment.types';\nexport * from './renderAttachment';\nexport * from './useAttachment';\nexport * from './useAttachmentStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,wBAAwB"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Attachment';\nexport * from './Attachment.types';\nexport * from './renderAttachment';\nexport * from './useAttachment';\nexport * from './useAttachmentStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,+BAA+B"}
@@ -1,5 +1,5 @@
1
1
  import { createCustomFocusIndicatorStyle, __resetStyles, __styles, mergeClasses, shorthands, slot, tokens, typographyStyles } from '@fluentui/react-components';
2
- import { useProgressBarStyles } from '../utils/useProgressBarStyles';
2
+ import { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';
3
3
  export const attachmentClassNames = {
4
4
  root: 'fai-Attachment',
5
5
  primaryAction: 'fai-Attachment__primaryAction',
@@ -38,15 +38,15 @@ const usePrimaryActionStyles = __styles({
38
38
  Bi91k9c: "fnwyq0v",
39
39
  ecr2s2: "fwdzr64",
40
40
  lj723h: "flvvhsy",
41
- Bqrx1nm: "fq7113v",
42
- kx9iu6: "fp3oj7s"
41
+ Bbkh6qg: "fkiggi6",
42
+ Cnge2b: "f8zknr1"
43
43
  }
44
44
  }, {
45
45
  h: [".f8491dx:hover{cursor:pointer;}", ".f1h648pw:hover{background-color:var(--colorNeutralBackground3Hover);}", ".fnwyq0v:hover{color:var(--colorNeutralForeground2Hover);}"],
46
46
  a: [".fwdzr64:active{background-color:var(--colorNeutralBackground3Pressed);}", ".flvvhsy:active{color:var(--colorNeutralForeground2Pressed);}"],
47
- m: [["@media (forced-colors: active){.fq7113v:hover{background-color:HighlightText;}}", {
47
+ m: [["@media (forced-colors: active){.fkiggi6:hover{background-color:HighlightText;}}", {
48
48
  m: "(forced-colors: active)"
49
- }], ["@media (forced-colors: active){.fp3oj7s:active{background-color:HighlightText;}}", {
49
+ }], ["@media (forced-colors: active){.f8zknr1:active{background-color:HighlightText;}}", {
50
50
  m: "(forced-colors: active)"
51
51
  }]]
52
52
  });
@@ -81,6 +81,8 @@ export const useOverflowStyles = __styles({
81
81
  * Apply styling to the Attachment slots based on the state
82
82
  */
83
83
  export const useAttachmentStyles_unstable = state => {
84
+ 'use no memo';
85
+
84
86
  const rootBaseClassName = useRootBaseClassName();
85
87
  const primaryActionBaseClassName = usePrimaryActionBaseClassName();
86
88
  const dismissButtonBaseClassName = useDismissButtonBaseClassName();
@@ -119,4 +121,4 @@ export const useAttachmentStyles_unstable = state => {
119
121
  }
120
122
  return state;
121
123
  };
122
- //# sourceMappingURL=useAttachmentStyles.js.map
124
+ //# sourceMappingURL=useAttachmentStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentStyles.styles.ts"],"sourcesContent":["import {\n createCustomFocusIndicatorStyle,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n slot,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\nimport type { AttachmentSlots, AttachmentState } from './Attachment.types';\nimport type { GriffelResetStyle, SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentClassNames: SlotClassNames<AttachmentSlots> = {\n root: 'fai-Attachment',\n primaryAction: 'fai-Attachment__primaryAction',\n dismissButton: 'fai-Attachment__dismissButton',\n media: 'fai-Attachment__media',\n content: 'fai-Attachment__content',\n dismissIcon: 'fai-Attachment__dismissIcon',\n progress: 'fai-Attachment__progress',\n};\n\nconst ATTACHMENT_MAXWIDTH = '180px';\nconst ATTACHMENT_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n width: 'fit-content',\n alignSelf: 'end',\n position: 'relative',\n});\n\nconst buttonBaseStyles: GriffelResetStyle = {\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n color: tokens.colorNeutralForeground1,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n ...createCustomFocusIndicatorStyle({\n ...shorthands.outline(tokens.strokeWidthThick, 'solid', tokens.colorStrokeFocus2),\n zIndex: 1,\n }),\n verticalAlign: 'middle',\n};\n\nconst usePrimaryActionBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n borderTopRightRadius: tokens.borderRadiusNone,\n borderBottomRightRadius: tokens.borderRadiusNone,\n borderRightStyle: 'none',\n maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n});\n\nconst usePrimaryActionStyles = makeStyles({\n button: {\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n },\n});\n\nconst useDismissButtonBaseClassName = makeResetStyles({\n ...buttonBaseStyles,\n\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,\n\n // divider:\n borderLeftColor: tokens.colorNeutralStroke1,\n borderTopLeftRadius: tokens.borderRadiusNone,\n borderBottomLeftRadius: tokens.borderRadiusNone,\n\n borderTopRightRadius: tokens.borderRadiusMedium,\n borderBottomRightRadius: tokens.borderRadiusMedium,\n\n ':hover': {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground3Hover,\n color: tokens.colorNeutralForeground2BrandHover,\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n ':focus': {\n [`& .${attachmentClassNames.dismissIcon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n '@media (forced-colors: active)': {\n ':hover': {\n backgroundColor: 'HighlightText',\n },\n ':active': {\n backgroundColor: 'HighlightText',\n },\n },\n});\n\nconst useMediaBaseClassName = makeResetStyles({\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: ATTACHMENT_SIZE,\n lineHeight: ATTACHMENT_SIZE,\n width: ATTACHMENT_SIZE,\n});\n\nconst useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\nconst useDismissIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENT_SIZE,\n height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\nconst useImageOnlyStyles = makeStyles({\n primaryAction: {\n ...shorthands.padding(0),\n },\n content: {\n lineHeight: 0,\n },\n});\n\nexport const useOverflowStyles = makeStyles({\n overflow: {\n width: '100%',\n },\n});\n\n/**\n * Apply styling to the Attachment slots based on the state\n */\nexport const useAttachmentStyles_unstable = (state: AttachmentState): AttachmentState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const primaryActionBaseClassName = usePrimaryActionBaseClassName();\n const dismissButtonBaseClassName = useDismissButtonBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const dismissIconBaseClassName = useDismissIconBaseClassName();\n const progressBarStyles = useProgressBarStyles();\n const primaryActionStyles = usePrimaryActionStyles();\n const imageOnlyStyles = useImageOnlyStyles();\n const { imageOnly, primaryAction } = state;\n\n state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, state.root.className);\n state.primaryAction.className = mergeClasses(\n attachmentClassNames.primaryAction,\n primaryActionBaseClassName,\n primaryAction.as !== 'span' && !state.isLoading && primaryActionStyles.button,\n imageOnly && imageOnlyStyles.primaryAction,\n state.primaryAction.className,\n );\n state.dismissButton.className = mergeClasses(\n attachmentClassNames.dismissButton,\n dismissButtonBaseClassName,\n state.dismissButton.className,\n );\n if (state.media) {\n state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, state.media.className);\n }\n state.content.className = mergeClasses(\n attachmentClassNames.content,\n contentBaseClassName,\n imageOnly && imageOnlyStyles.content,\n state.content.className,\n );\n state.dismissIcon.className = mergeClasses(\n attachmentClassNames.dismissIcon,\n dismissIconBaseClassName,\n state.dismissIcon.className,\n );\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["createCustomFocusIndicatorStyle","makeResetStyles","makeStyles","mergeClasses","shorthands","slot","tokens","typographyStyles","useProgressBarStyles","attachmentClassNames","root","primaryAction","dismissButton","media","content","dismissIcon","progress","ATTACHMENT_MAXWIDTH","ATTACHMENT_SIZE","useRootBaseClassName","display","flexWrap","verticalAlign","boxSizing","width","alignSelf","position","buttonBaseStyles","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","columnGap","spacingHorizontalSNudge","color","colorNeutralForeground1","cursor","justifyContent","outline","strokeWidthThick","colorStrokeFocus2","zIndex","usePrimaryActionBaseClassName","borderTopRightRadius","borderRadiusNone","borderBottomRightRadius","borderRightStyle","maxWidth","spacingHorizontalXXS","spacingHorizontalXS","padding","spacingVerticalXS","spacingHorizontalS","usePrimaryActionStyles","button","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","useDismissButtonBaseClassName","minWidth","borderLeftColor","borderTopLeftRadius","borderBottomLeftRadius","colorNeutralForeground2BrandHover","colorBrandForegroundLinkHover","colorNeutralForeground2BrandPressed","useMediaBaseClassName","fontSize","height","lineHeight","useContentBaseClassName","overflowX","textOverflow","whiteSpace","body1","useDismissIconBaseClassName","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","useImageOnlyStyles","useOverflowStyles","overflow","useAttachmentStyles_unstable","state","rootBaseClassName","primaryActionBaseClassName","dismissButtonBaseClassName","mediaBaseClassName","contentBaseClassName","dismissIconBaseClassName","progressBarStyles","primaryActionStyles","imageOnlyStyles","imageOnly","className","as","isLoading","bar","optional","elementType","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,+BAA+B,EAC/BC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,IAAI,EACJC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AACpC,SAASC,oBAAoB,QAAQ,uCAAuC;AAI5E,OAAO,MAAMC,uBAAwD;IACnEC,MAAM;IACNC,eAAe;IACfC,eAAe;IACfC,OAAO;IACPC,SAAS;IACTC,aAAa;IACbC,UAAU;AACZ,EAAE;AAEF,MAAMC,sBA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BACAK,aAAaD,gBAAgBnF,OAAO,EACpC0E,MAAM1E,OAAO,CAACqF,SAAS;IAEzBX,MAAMzE,WAAW,CAACoF,SAAS,GAAGhG,aAC5BM,qBAAqBM,WAAW,EAChC+E,0BACAN,MAAMzE,WAAW,CAACoF,SAAS;IAG7B,IAAIX,MAAMxE,QAAQ,EAAE;QAClBwE,MAAMxE,QAAQ,CAACmF,SAAS,GAAGhG,aACzBM,qBAAqBO,QAAQ,EAC7B+E,kBAAkB/E,QAAQ,EAC1BwE,MAAMxE,QAAQ,CAACmF,SAAS;QAG1B,MAAMG,MAAMjG,KAAKkG,QAAQ,CAACf,MAAMxE,QAAQ,CAACsF,GAAG,EAAE;YAAEE,aAAa;YAAOC,iBAAiB;QAAK;QAC1F,IAAIH,KAAK;YACP,IAAId,MAAMxE,QAAQ,CAAC0F,KAAK,KAAKC,WAAW;gBACtCL,IAAIH,SAAS,GAAGhG,aAAa4F,kBAAkBa,wBAAwB,EAAEN,IAAIH,SAAS;YACxF,OAAO;gBACLG,IAAIH,SAAS,GAAGhG,aAAa4F,kBAAkBc,kBAAkB,EAAEP,IAAIH,SAAS;YAClF;YACAX,MAAMxE,QAAQ,CAACsF,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOd;AACT,EAAE"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useAttachmentList_unstable } from './useAttachmentList';
3
3
  import { renderAttachmentList_unstable } from './renderAttachmentList';
4
- import { useAttachmentListStyles_unstable } from './useAttachmentListStyles';
4
+ import { useAttachmentListStyles_unstable } from './useAttachmentListStyles.styles';
5
5
  import { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';
6
6
  export const AttachmentList = /*#__PURE__*/React.forwardRef((props, ref) => {
7
7
  const state = useAttachmentList_unstable(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["AttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentList_unstable } from './useAttachmentList';\nimport { renderAttachmentList_unstable } from './renderAttachmentList';\nimport { useAttachmentListStyles_unstable } from './useAttachmentListStyles';\nimport { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';\nimport type { AttachmentListProps } from './AttachmentList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AttachmentList: ForwardRefComponent<AttachmentListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentList_unstable(props, ref);\n const contextValues = useAttachmentListContextValues_unstable(state);\n\n useAttachmentListStyles_unstable(state);\n\n return renderAttachmentList_unstable(state, contextValues);\n});\n\nAttachmentList.displayName = 'AttachmentList';\n"],"names":["React","useAttachmentList_unstable","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentListContextValues_unstable","AttachmentList","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,uCAAuC,QAAQ,mCAAmC;AAI3F,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAChD,MAAME,gBAAgBN,wCAAwCK;IAE9DN,iCAAiCM;IAEjC,OAAOP,8BAA8BO,OAAOC;AAC9C,GAAG;AAEHL,eAAeM,WAAW,GAAG"}
1
+ {"version":3,"sources":["AttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentList_unstable } from './useAttachmentList';\nimport { renderAttachmentList_unstable } from './renderAttachmentList';\nimport { useAttachmentListStyles_unstable } from './useAttachmentListStyles.styles';\nimport { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';\nimport type { AttachmentListProps } from './AttachmentList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const AttachmentList: ForwardRefComponent<AttachmentListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentList_unstable(props, ref);\n const contextValues = useAttachmentListContextValues_unstable(state);\n\n useAttachmentListStyles_unstable(state);\n\n return renderAttachmentList_unstable(state, contextValues);\n});\n\nAttachmentList.displayName = 'AttachmentList';\n"],"names":["React","useAttachmentList_unstable","renderAttachmentList_unstable","useAttachmentListStyles_unstable","useAttachmentListContextValues_unstable","AttachmentList","forwardRef","props","ref","state","contextValues","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,0BAA0B,QAAQ,sBAAsB;AACjE,SAASC,6BAA6B,QAAQ,yBAAyB;AACvE,SAASC,gCAAgC,QAAQ,mCAAmC;AACpF,SAASC,uCAAuC,QAAQ,mCAAmC;AAI3F,OAAO,MAAMC,+BAA2DL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,QAAQR,2BAA2BM,OAAOC;IAChD,MAAME,gBAAgBN,wCAAwCK;IAE9DN,iCAAiCM;IAEjC,OAAOP,8BAA8BO,OAAOC;AAC9C,GAAG;AAEHL,eAAeM,WAAW,GAAG"}
@@ -2,5 +2,5 @@ export * from './AttachmentList';
2
2
  export * from './AttachmentList.types';
3
3
  export * from './renderAttachmentList';
4
4
  export * from './useAttachmentList';
5
- export * from './useAttachmentListStyles';
5
+ export * from './useAttachmentListStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentList';\nexport * from './AttachmentList.types';\nexport * from './renderAttachmentList';\nexport * from './useAttachmentList';\nexport * from './useAttachmentListStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,4BAA4B"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentList';\nexport * from './AttachmentList.types';\nexport * from './renderAttachmentList';\nexport * from './useAttachmentList';\nexport * from './useAttachmentListStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,yBAAyB;AACvC,cAAc,yBAAyB;AACvC,cAAc,sBAAsB;AACpC,cAAc,mCAAmC"}
@@ -5,7 +5,7 @@ import { useTimeout } from '@fluentui/react-utilities';
5
5
  import { useOverflowStyles as useAttachmentOverflowStyles } from '../Attachment';
6
6
  import { AttachmentOverflowMenuButton } from '../AttachmentOverflowMenuButton';
7
7
  import { AttachmentOverflowMenuItem } from '../AttachmentOverflowMenuItem';
8
- import { attachmentOverflowMenuButtonClassNames } from '../AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles';
8
+ import { attachmentOverflowMenuButtonClassNames } from '../AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles';
9
9
  /**
10
10
  * Create the state required to render AttachmentList.
11
11
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n mergeClasses,\n slot,\n useArrowNavigationGroup,\n useEventCallback,\n useFocusFinders,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useTimeout } from '@fluentui/react-utilities';\nimport { useOverflowStyles as useAttachmentOverflowStyles } from '../Attachment';\nimport { AttachmentOverflowMenuButton } from '../AttachmentOverflowMenuButton';\nimport { AttachmentOverflowMenuItem } from '../AttachmentOverflowMenuItem';\nimport { attachmentOverflowMenuButtonClassNames } from '../AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles';\nimport type { AttachmentListProps, AttachmentListState } from './AttachmentList.types';\nimport type { AttachmentProps } from '../Attachment';\n\n/**\n * Create the state required to render AttachmentList.\n *\n * The returned state can be modified with hooks such as useAttachmentListStyles_unstable,\n * before being passed to renderAttachmentList_unstable.\n *\n * @param props - props from this instance of AttachmentList\n * @param ref - reference to root HTMLElement of AttachmentList\n */\nexport const useAttachmentList_unstable = (\n props: AttachmentListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentListState => {\n const { children, maxVisibleAttachments, onAttachmentDismiss, overflowMenuProps } = props;\n const innerRef = React.useRef<HTMLDivElement>(null);\n const [setTimeout] = useTimeout();\n const { targetDocument } = useFluent();\n const { findNextFocusable, findPrevFocusable, findLastFocusable } = useFocusFinders();\n const [attachments, setAttachments] = React.useState<AttachmentProps[]>([]);\n const handleAttachmentDismiss: AttachmentListState['onAttachmentDismiss'] = useEventCallback((e, data) => {\n if (!onAttachmentDismiss) {\n return;\n }\n\n onAttachmentDismiss(e, data);\n\n // set focus after attachment dismiss\n const activeElement = targetDocument?.activeElement;\n if (innerRef.current?.contains(activeElement as HTMLElement)) {\n // focus on next attachment only if the active element is within the current attachment list\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n if (next) {\n // focus on the overflow button if the next focusable element is the overflow button.\n // if overflow button is removed from the DOM, focus on the last focusable element in the attachment list.\n if (next.classList.contains(attachmentOverflowMenuButtonClassNames.root)) {\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n } else {\n next.focus();\n }\n } else {\n const prev = findPrevFocusable(activeElement?.parentElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n } else {\n // Handles keyboard focus when attachment removed is in the overflow menu. Also handles focus when the overflow button is removed from the DOM.\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n }\n });\n\n const attachmentOverflowClassName = useAttachmentOverflowStyles().overflow;\n const resolvedChildren = React.useMemo(() => {\n if (maxVisibleAttachments !== undefined) {\n const results = [];\n const childrenArray = React.Children.toArray(children);\n for (let index = 0; index < childrenArray.length; index++) {\n const child = childrenArray[index] as React.ReactElement;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (index >= maxVisibleAttachments && React.isValidElement<any>(child)) {\n results.push(\n React.cloneElement(child, {\n ...child.props,\n className: mergeClasses(child.props.className, attachmentOverflowClassName),\n }),\n );\n } else {\n results.push(child);\n }\n }\n\n return results;\n }\n return children;\n }, [attachmentOverflowClassName, children, maxVisibleAttachments]);\n\n React.useEffect(() => {\n if (resolvedChildren && Array.isArray(resolvedChildren)) {\n setAttachments(resolvedChildren.map(child => child.props));\n }\n }, [resolvedChildren]);\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n memorizeCurrent: true,\n });\n\n const shouldUseOverflow = maxVisibleAttachments !== undefined;\n\n return {\n attachments,\n onAttachmentDismiss: handleAttachmentDismiss,\n shouldUseOverflow,\n overflowMenuProps,\n components: {\n root: 'div',\n overflowMenuButton: 'span',\n overflowMenuItem: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref: useMergedRefs(ref, innerRef),\n role: 'toolbar',\n ...arrowNavigationProps,\n ...props,\n children: resolvedChildren,\n }),\n { elementType: 'div' },\n ),\n overflowMenuButton: slot.optional(props.overflowMenuButton, {\n defaultProps: { children: <AttachmentOverflowMenuButton /> },\n elementType: 'span',\n renderByDefault: true,\n }),\n overflowMenuItem: slot.optional(props.overflowMenuItem, {\n defaultProps: { children: <AttachmentOverflowMenuItem /> },\n elementType: 'span',\n renderByDefault: true,\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeClasses","slot","useArrowNavigationGroup","useEventCallback","useFocusFinders","useMergedRefs","useFluent_unstable","useFluent","useTimeout","useOverflowStyles","useAttachmentOverflowStyles","AttachmentOverflowMenuButton","AttachmentOverflowMenuItem","attachmentOverflowMenuButtonClassNames","useAttachmentList_unstable","props","ref","children","maxVisibleAttachments","onAttachmentDismiss","overflowMenuProps","innerRef","useRef","setTimeout","targetDocument","findNextFocusable","findPrevFocusable","findLastFocusable","attachments","setAttachments","useState","handleAttachmentDismiss","e","data","activeElement","current","contains","next","container","classList","root","focus","prev","parentElement","attachmentOverflowClassName","overflow","resolvedChildren","useMemo","undefined","results","childrenArray","Children","toArray","index","length","child","isValidElement","push","cloneElement","className","useEffect","Array","isArray","map","arrowNavigationProps","circular","axis","memorizeCurrent","shouldUseOverflow","components","overflowMenuButton","overflowMenuItem","always","role","elementType","optional","defaultProps","renderByDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,YAAY,EACZC,IAAI,EACJC,uBAAuB,EACvBC,gBAAgB,EAChBC,eAAe,EACfC,aAAa,QACR,6BAA6B;AACpC,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,UAAU,QAAQ,4BAA4B;AACvD,SAASC,qBAAqBC,2BAA2B,QAAQ,gBAAgB;AACjF,SAASC,4BAA4B,QAAQ,kCAAkC;AAC/E,SAASC,0BAA0B,QAAQ,gCAAgC;AAC3E,SAASC,sCAAsC,QAAQ,wEAAwE;AAI/H;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAM,EAAEC,QAAQ,EAAEC,qBAAqB,EAAEC,mBAAmB,EAAEC,iBAAiB,EAAE,GAAGL;IACpF,MAAMM,WAAWvB,MAAMwB,MAAM,CAAiB;IAC9C,MAAM,CAACC,WAAW,GAAGf;IACrB,MAAM,EAAEgB,cAAc,EAAE,GAAGjB;IAC3B,MAAM,EAAEkB,iBAAiB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAE,GAAGvB;IACpE,MAAM,CAACwB,aAAaC,eAAe,GAAG/B,MAAMgC,QAAQ,CAAoB,EAAE;IAC1E,MAAMC,0BAAsE5B,iBAAiB,CAAC6B,GAAGC;YAS3FZ;QARJ,IAAI,CAACF,qBAAqB;Y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x"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n mergeClasses,\n slot,\n useArrowNavigationGroup,\n useEventCallback,\n useFocusFinders,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useTimeout } from '@fluentui/react-utilities';\nimport { useOverflowStyles as useAttachmentOverflowStyles } from '../Attachment';\nimport { AttachmentOverflowMenuButton } from '../AttachmentOverflowMenuButton';\nimport { AttachmentOverflowMenuItem } from '../AttachmentOverflowMenuItem';\nimport { attachmentOverflowMenuButtonClassNames } from '../AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles';\nimport type { AttachmentListProps, AttachmentListState } from './AttachmentList.types';\nimport type { AttachmentProps } from '../Attachment';\n\n/**\n * Create the state required to render AttachmentList.\n *\n * The returned state can be modified with hooks such as useAttachmentListStyles_unstable,\n * before being passed to renderAttachmentList_unstable.\n *\n * @param props - props from this instance of AttachmentList\n * @param ref - reference to root HTMLElement of AttachmentList\n */\nexport const useAttachmentList_unstable = (\n props: AttachmentListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentListState => {\n const { children, maxVisibleAttachments, onAttachmentDismiss, overflowMenuProps } = props;\n const innerRef = React.useRef<HTMLDivElement>(null);\n const [setTimeout] = useTimeout();\n const { targetDocument } = useFluent();\n const { findNextFocusable, findPrevFocusable, findLastFocusable } = useFocusFinders();\n const [attachments, setAttachments] = React.useState<AttachmentProps[]>([]);\n const handleAttachmentDismiss: AttachmentListState['onAttachmentDismiss'] = useEventCallback((e, data) => {\n if (!onAttachmentDismiss) {\n return;\n }\n\n onAttachmentDismiss(e, data);\n\n // set focus after attachment dismiss\n const activeElement = targetDocument?.activeElement;\n if (innerRef.current?.contains(activeElement as HTMLElement)) {\n // focus on next attachment only if the active element is within the current attachment list\n const next = findNextFocusable(activeElement as HTMLElement, { container: innerRef.current });\n if (next) {\n // focus on the overflow button if the next focusable element is the overflow button.\n // if overflow button is removed from the DOM, focus on the last focusable element in the attachment list.\n if (next.classList.contains(attachmentOverflowMenuButtonClassNames.root)) {\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n } else {\n next.focus();\n }\n } else {\n const prev = findPrevFocusable(activeElement?.parentElement as HTMLElement, { container: innerRef.current });\n prev?.focus();\n }\n } else {\n // Handles keyboard focus when attachment removed is in the overflow menu. Also handles focus when the overflow button is removed from the DOM.\n setTimeout(() => {\n findLastFocusable(innerRef.current as HTMLElement)?.focus();\n }, 0);\n }\n });\n\n const attachmentOverflowClassName = useAttachmentOverflowStyles().overflow;\n const resolvedChildren = React.useMemo(() => {\n if (maxVisibleAttachments !== undefined) {\n const results = [];\n const childrenArray = React.Children.toArray(children);\n for (let index = 0; index < childrenArray.length; index++) {\n const child = childrenArray[index] as React.ReactElement;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (index >= maxVisibleAttachments && React.isValidElement<any>(child)) {\n results.push(\n React.cloneElement(child, {\n ...child.props,\n className: mergeClasses(child.props.className, attachmentOverflowClassName),\n }),\n );\n } else {\n results.push(child);\n }\n }\n\n return results;\n }\n return children;\n }, [attachmentOverflowClassName, children, maxVisibleAttachments]);\n\n React.useEffect(() => {\n if (resolvedChildren && Array.isArray(resolvedChildren)) {\n setAttachments(resolvedChildren.map(child => child.props));\n }\n }, [resolvedChildren]);\n\n const arrowNavigationProps = useArrowNavigationGroup({\n circular: true,\n axis: 'both',\n memorizeCurrent: true,\n });\n\n const shouldUseOverflow = maxVisibleAttachments !== undefined;\n\n return {\n attachments,\n onAttachmentDismiss: handleAttachmentDismiss,\n shouldUseOverflow,\n overflowMenuProps,\n components: {\n root: 'div',\n overflowMenuButton: 'span',\n overflowMenuItem: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref: useMergedRefs(ref, innerRef),\n role: 'toolbar',\n ...arrowNavigationProps,\n ...props,\n children: resolvedChildren,\n }),\n { elementType: 'div' },\n ),\n overflowMenuButton: slot.optional(props.overflowMenuButton, {\n defaultProps: { children: <AttachmentOverflowMenuButton /> },\n elementType: 'span',\n renderByDefault: true,\n }),\n overflowMenuItem: slot.optional(props.overflowMenuItem, {\n defaultProps: { children: <AttachmentOverflowMenuItem /> },\n elementType: 'span',\n renderByDefault: true,\n }),\n };\n};\n"],"names":["React","getIntrinsicElementProps","mergeClasses","slot","useArrowNavigationGroup","useEventCallback","useFocusFinders","useMergedRefs","useFluent_unstable","useFluent","useTimeout","useOverflowStyles","useAttachmentOverflowStyles","AttachmentOverflowMenuButton","AttachmentOverflowMenuItem","attachmentOverflowMenuButtonClassNames","useAttachmentList_unstable","props","ref","children","maxVisibleAttachments","onAttachmentDismiss","overflowMenuProps","innerRef","useRef","setTimeout","targetDocument","findNextFocusable","findPrevFocusable","findLastFocusable","attachments","setAttachments","useState","handleAttachmentDismiss","e","data","activeElement","current","contains","next","container","classList","root","focus","prev","parentElement","attachmentOverflowClassName","overflow","resolvedChildren","useMemo","undefined","results","childrenArray","Children","toArray","index","length","child","isValidElement","push","cloneElement","className","useEffect","Array","isArray","map","arrowNavigationProps","circular","axis","memorizeCurrent","shouldUseOverflow","components","overflowMenuButton","overflowMenuItem","always","role","elementType","optional","defaultProps","renderByDefault"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,YAAY,EACZC,IAAI,EACJC,uBAAuB,EACvBC,gBAAgB,EAChBC,eAAe,EACfC,aAAa,QACR,6BAA6B;AACpC,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAClF,SAASC,UAAU,QAAQ,4BAA4B;AACvD,SAASC,qBAAqBC,2BAA2B,QAAQ,gBA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BqC;QACAhD;QACAiD,YAAY;YACV7B,MAAM;YACN8B,oBAAoB;YACpBC,kBAAkB;QACpB;QACA/B,MAAMvC,KAAKuE,MAAM,CACfzE,yBAAyB,OAAO;YAC9B,cAAc;YACdiB,KAAKX,cAAcW,KAAKK;YACxBoD,MAAM;YACN,GAAGT,oBAAoB;YACvB,GAAGjD,KAAK;YACRE,UAAU6B;QACZ,IACA;YAAE4B,aAAa;QAAM;QAEvBJ,oBAAoBrE,KAAK0E,QAAQ,CAAC5D,MAAMuD,kBAAkB,EAAE;YAC1DM,cAAc;gBAAE3D,wBAAU,oBAACN;YAAgC;YAC3D+D,aAAa;YACbG,iBAAiB;QACnB;QACAN,kBAAkBtE,KAAK0E,QAAQ,CAAC5D,MAAMwD,gBAAgB,EAAE;YACtDK,cAAc;gBAAE3D,wBAAU,oBAACL;YAA8B;YACzD8D,aAAa;YACbG,iBAAiB;QACnB;IACF;AACF,EAAE"}
@@ -9,6 +9,8 @@ const useRootBaseClassName = __resetStyles("r168fwfa", null, [".r168fwfa{column-
9
9
  * Apply styling to the AttachmentList slots based on the state
10
10
  */
11
11
  export const useAttachmentListStyles_unstable = state => {
12
+ 'use no memo';
13
+
12
14
  const rootBaseClassName = useRootBaseClassName();
13
15
  state.root.className = mergeClasses(attachmentListClassNames.root, rootBaseClassName, state.root.className);
14
16
  if (state.overflowMenuButton) {
@@ -19,4 +21,4 @@ export const useAttachmentListStyles_unstable = state => {
19
21
  }
20
22
  return state;
21
23
  };
22
- //# sourceMappingURL=useAttachmentListStyles.js.map
24
+ //# sourceMappingURL=useAttachmentListStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentListStyles.styles.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 overflowMenuButton: 'fai-AttachmentList__overflowMenuButton',\n overflowMenuItem: 'fai-AttachmentList__overflowMenuItem',\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 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(attachmentListClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.overflowMenuButton) {\n state.overflowMenuButton.className = mergeClasses(\n attachmentListClassNames.overflowMenuButton,\n state.overflowMenuButton.className,\n );\n }\n\n if (state.overflowMenuItem) {\n state.overflowMenuItem.className = mergeClasses(\n attachmentListClassNames.overflowMenuItem,\n state.overflowMenuItem.className,\n );\n }\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","tokens","attachmentListClassNames","root","overflowMenuButton","overflowMenuItem","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;IACNC,oBAAoB;IACpBC,kBAAkB;AACpB,EAAE;AAEF,MAAMC,uBAAuBP,gBAAgB;IAC3CQ,WAAWN,OAAOO,uBAAuB;IACzCC,SAAS;IACTC,eAAe;IACfC,YAAY;IACZC,UAAU;IACVC,QAAQZ,OAAOa,iBAAiB;AAClC;AAEA;;CAEC,GACD,OAAO,MAAMC,mCAAmC,CAACC;IAC/C;IAEA,MAAMC,oBAAoBX;IAC1BU,MAAMb,IAAI,CAACe,SAAS,GAAGlB,aAAaE,yBAAyBC,IAAI,EAAEc,mBAAmBD,MAAMb,IAAI,CAACe,SAAS;IAE1G,IAAIF,MAAMZ,kBAAkB,EAAE;QAC5BY,MAAMZ,kBAAkB,CAACc,SAAS,GAAGlB,aACnCE,yBAAyBE,kBAAkB,EAC3CY,MAAMZ,kBAAkB,CAACc,SAAS;IAEtC;IAEA,IAAIF,MAAMX,gBAAgB,EAAE;QAC1BW,MAAMX,gBAAgB,CAACa,SAAS,GAAGlB,aACjCE,yBAAyBG,gBAAgB,EACzCW,MAAMX,gBAAgB,CAACa,SAAS;IAEpC;IACA,OAAOF;AACT,EAAE"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useAttachmentOverflowMenuButton_unstable } from './useAttachmentOverflowMenuButton';
3
3
  import { renderAttachmentOverflowMenuButton_unstable } from './renderAttachmentOverflowMenuButton';
4
- import { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles';
4
+ import { useAttachmentOverflowMenuButtonStyles_unstable } from './useAttachmentOverflowMenuButtonStyles.styles';
5
5
  export const AttachmentOverflowMenuButton = /*#__PURE__*/React.forwardRef((props, ref) => {
6
6
  const state = useAttachmentOverflowMenuButton_unstable(props, ref);
7
7
  useAttachmentOverflowMenuButtonStyles_unstable(state);
@@ -1 +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"}
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.styles';\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,iDAAiD;AAIhH,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"}
@@ -2,5 +2,5 @@ export * from './AttachmentOverflowMenuButton';
2
2
  export * from './AttachmentOverflowMenuButton.types';
3
3
  export * from './renderAttachmentOverflowMenuButton';
4
4
  export * from './useAttachmentOverflowMenuButton';
5
- export * from './useAttachmentOverflowMenuButtonStyles';
5
+ export * from './useAttachmentOverflowMenuButtonStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenuButton';\nexport * from './AttachmentOverflowMenuButton.types';\nexport * from './renderAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButton';\nexport * from './useAttachmentOverflowMenuButtonStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,iCAAiC;AAC/C,cAAc,uCAAuC;AACrD,cAAc,uCAAuC;AACrD,cAAc,oCAAoC;AAClD,cAAc,iDAAiD"}
@@ -1,5 +1,5 @@
1
1
  import { __resetStyles, mergeClasses, slot, tokens, typographyStyles } from '@fluentui/react-components';
2
- import { useProgressBarStyles } from '../utils/useProgressBarStyles';
2
+ import { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';
3
3
  export const attachmentOverflowMenuButtonClassNames = {
4
4
  root: 'fai-AttachmentOverflowMenuButton',
5
5
  progress: 'fai-AttachmentOverflowMenuButton__progress'
@@ -12,6 +12,8 @@ const useRootBaseClassName = __resetStyles("r1opa2g9", null, {
12
12
  * Apply styling to the AttachmentOverflowMenuButton slots based on the state
13
13
  */
14
14
  export const useAttachmentOverflowMenuButtonStyles_unstable = state => {
15
+ 'use no memo';
16
+
15
17
  const rootBaseClassName = useRootBaseClassName();
16
18
  const progressBarStyles = useProgressBarStyles();
17
19
  state.root.className = mergeClasses(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, state.root.className);
@@ -32,4 +34,4 @@ export const useAttachmentOverflowMenuButtonStyles_unstable = state => {
32
34
  }
33
35
  return state;
34
36
  };
35
- //# sourceMappingURL=useAttachmentOverflowMenuButtonStyles.js.map
37
+ //# sourceMappingURL=useAttachmentOverflowMenuButtonStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuButtonStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, slot, tokens, typographyStyles } from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\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 progress: 'fai-AttachmentOverflowMenuButton__progress',\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 position: 'relative',\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/**\n * Apply styling to the AttachmentOverflowMenuButton slots based on the state\n */\nexport const useAttachmentOverflowMenuButtonStyles_unstable = (\n state: AttachmentOverflowMenuButtonState,\n): AttachmentOverflowMenuButtonState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const progressBarStyles = useProgressBarStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuButtonClassNames.root,\n rootBaseClassName,\n state.root.className,\n );\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentOverflowMenuButtonClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["makeResetStyles","mergeClasses","slot","tokens","typographyStyles","useProgressBarStyles","attachmentOverflowMenuButtonClassNames","root","progress","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","position","colorNeutralBackground3Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralForeground2Pressed","useAttachmentOverflowMenuButtonStyles_unstable","state","rootBaseClassName","progressBarStyles","className","bar","optional","elementType","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,YAAY,EAAEC,IAAI,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAC3G,SAASC,oBAAoB,QAAQ,uCAAuC;AAO5E,OAAO,MAAMC,yCAA4F;IACvGC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,MAAMC,uBAAuBT,gBAAgB;IAC3CU,OAAOP,OAAOQ,uBAAuB;IACrCC,YAAY;IACZC,iBAAiBV,OAAOW,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEZ,OAAOa,eAAe,CAAC,OAAO,EAAEb,OAAOc,mBAAmB,CAAC,CAAC;IACvEC,cAAcf,OAAOgB,kBAAkB;IACvCC,WAAW;IACXC,WAAWlB,OAAOmB,uBAAuB;IACzCC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,YAAYtB,iBAAiBuB,KAAK,CAACD,UAAU;IAC7CE,UAAUxB,iBAAiBuB,KAAK,CAACC,QAAQ;IACzCC,YAAYzB,i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
1
1
  import * as React from 'react';
2
2
  import { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';
3
3
  import { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';
4
- import { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles';
4
+ import { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles.styles';
5
5
  export const AttachmentOverflowMenuItem = /*#__PURE__*/React.forwardRef((props, ref) => {
6
6
  const state = useAttachmentOverflowMenuItem_unstable(props, ref);
7
7
  useAttachmentOverflowMenuItemStyles_unstable(state);
@@ -1 +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"}
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.styles';\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,+CAA+C;AAC5G,OAAO,MAAMC,2CAAmFJ,MAAMK,UAAU,CAC9G,CAACC,OAAOC;IACN,MAAMC,QAAQP,uCAAuCK,OAAOC;IAC5DJ,6CAA6CK;IAE7C,OAAON,0CAA0CM;AACnD,GACA;AAEFJ,2BAA2BK,WAAW,GAAG"}
@@ -2,5 +2,5 @@ export * from './AttachmentOverflowMenuItem';
2
2
  export * from './AttachmentOverflowMenuItem.types';
3
3
  export * from './renderAttachmentOverflowMenuItem';
4
4
  export * from './useAttachmentOverflowMenuItem';
5
- export * from './useAttachmentOverflowMenuItemStyles';
5
+ export * from './useAttachmentOverflowMenuItemStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +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"}
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './AttachmentOverflowMenuItem';\nexport * from './AttachmentOverflowMenuItem.types';\nexport * from './renderAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItem';\nexport * from './useAttachmentOverflowMenuItemStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,+BAA+B;AAC7C,cAAc,qCAAqC;AACnD,cAAc,qCAAqC;AACnD,cAAc,kCAAkC;AAChD,cAAc,+CAA+C"}
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { MenuItem, ProgressBar, mergeCallbacks, slot, useId, useIsOverflowItemVisible } from '@fluentui/react-components';
3
3
  import { Dismiss20Filled, Dismiss20Regular, bundleIcon } from '@fluentui/react-icons';
4
- import { useOverflowContext } from '@fluentui/react-overflow';
5
4
  import { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';
6
5
  /**
7
6
  * Create the state required to render AttachmentOverflowMenuItem.
@@ -13,6 +12,8 @@ import { useAttachmentListContext_unstable } from '../../contexts/attachmentList
13
12
  * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem
14
13
  */
15
14
  export const useAttachmentOverflowMenuItem_unstable = (props, ref) => {
15
+ 'use no memo';
16
+
16
17
  const {
17
18
  imageOnly,
18
19
  media
@@ -21,10 +22,8 @@ export const useAttachmentOverflowMenuItem_unstable = (props, ref) => {
21
22
  const menuItemId = useId('attachment-', props.id);
22
23
  const isVisible = useIsOverflowItemVisible(menuItemId);
23
24
  const {
24
- onAttachmentDismiss,
25
- shouldUseOverflow
25
+ onAttachmentDismiss
26
26
  } = useAttachmentListContext_unstable(context => context);
27
- const attachmentsVisibilityStatus = useOverflowContext(context => context.itemVisibility);
28
27
  const root = slot.always({
29
28
  ref,
30
29
  icon: media,
@@ -40,9 +39,6 @@ export const useAttachmentOverflowMenuItem_unstable = (props, ref) => {
40
39
  media,
41
40
  id: menuItemId
42
41
  });
43
- if (shouldUseOverflow) {
44
- delete attachmentsVisibilityStatus[menuItemId];
45
- }
46
42
  });
47
43
  const progress = slot.optional(props.progress, {
48
44
  defaultProps: {
@@ -1 +1 @@
1
- {"version":3,"sources":["useAttachmentOverflowMenuItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n MenuItem,\n ProgressBar,\n mergeCallbacks,\n slot,\n useId,\n useIsOverflowItemVisible,\n} from '@fluentui/react-components';\nimport { Dismiss20Filled, Dismiss20Regular, bundleIcon } from '@fluentui/react-icons';\nimport { useOverflowContext } from '@fluentui/react-overflow';\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 { imageOnly, media } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const menuItemId = useId('attachment-', props.id);\n const isVisible = useIsOverflowItemVisible(menuItemId);\n const { onAttachmentDismiss, shouldUseOverflow } = useAttachmentListContext_unstable(context => context);\n\n const attachmentsVisibilityStatus: Record<string, boolean> = useOverflowContext(context => context.itemVisibility);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <DismissIcon />, ...props, id: menuItemId },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev => {\n onAttachmentDismiss?.(ev, { content: props.children, media, id: menuItemId });\n if (shouldUseOverflow) {\n delete attachmentsVisibilityStatus[menuItemId];\n }\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n return {\n components: {\n root: MenuItem,\n progress: ProgressBar,\n },\n root,\n progress,\n isVisible,\n imageOnly,\n };\n};\n"],"names":["React","MenuItem","ProgressBar","mergeCallbacks","slot","useId","useIsOverflowItemVisible","Dismiss20Filled","Dismiss20Regular","bundleIcon","useOverflowContext","useAttachmentListContext_unstable","useAttachmentOverflowMenuItem_unstable","props","ref","imageOnly","media","DismissIcon","menuItemId","id","isVisible","onAttachmentDismiss","shouldUseOverflow","context","attachmentsVisibilityStatus","itemVisibility","root","always","icon","secondaryContent","elementType","onClick","ev","content","children","progress","optional","defaultProps","shape","thickness","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,QAAQ,EACRC,WAAW,EACXC,cAAc,EACdC,IAAI,EACJC,KAAK,EACLC,wBAAwB,QACnB,6BAA6B;AACp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n MenuItem,\n ProgressBar,\n mergeCallbacks,\n slot,\n useId,\n useIsOverflowItemVisible,\n} 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 'use no memo';\n\n const { imageOnly, media } = props;\n const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);\n const menuItemId = useId('attachment-', props.id);\n const isVisible = useIsOverflowItemVisible(menuItemId);\n const { onAttachmentDismiss } = useAttachmentListContext_unstable(context => context);\n\n const root = slot.always(\n { ref, icon: media, secondaryContent: <DismissIcon />, ...props, id: menuItemId },\n { elementType: MenuItem },\n );\n root.onClick = mergeCallbacks(root.onClick, ev => {\n onAttachmentDismiss?.(ev, { content: props.children, media, id: menuItemId });\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n return {\n components: {\n root: MenuItem,\n progress: ProgressBar,\n },\n root,\n progress,\n isVisible,\n imageOnly,\n };\n};\n"],"names":["React","MenuItem","ProgressBar","mergeCallbacks","slot","useId","useIsOverflowItemVisible","Dismiss20Filled","Dismiss20Regular","bundleIcon","useAttachmentListContext_unstable","useAttachmentOverflowMenuItem_unstable","props","ref","imageOnly","media","DismissIcon","menuItemId","id","isVisible","onAttachmentDismiss","context","root","always","icon","secondaryContent","elementType","onClick","ev","content","children","progress","optional","defaultProps","shape","thickness","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,QAAQ,EACRC,WAAW,EACXC,cAAc,EACdC,IAAI,EACJC,KAAK,EACLC,wBAAwB,QACnB,6BAA6B;AACpC,SAASC,eAAe,EAAEC,gBAAgB,EAAEC,UAAU,QAAQ,wBAAwB;AACtF,SAASC,iCAAiC,QAAQ,uCAAuC;AAMzF;;;;;;;;CAQC,GACD,OAAO,MAAMC,yCAAyC,CACpDC,OACAC;IAEA;IAEA,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGH;IAC7B,MAAMI,cAAcP,WAAWF,iBAAiBC;IAChD,MAAMS,aAAaZ,MAAM,eAAeO,MAAMM,EAAE;IAChD,MAAMC,YAAYb,yBAAyBW;IAC3C,MAAM,EAAEG,mBAAmB,EAAE,GAAGV,kCAAkCW,CAAAA,UAAWA;IAE7E,MAAMC,OAAOlB,KAAKmB,MAAM,CACtB;QAAEV;QAAKW,MAAMT;QAAOU,gCAAkB,oBAACT;QAAgB,GAAGJ,KAAK;QAAEM,IAAID;IAAW,GAChF;QAAES,aAAazB;IAAS;IAE1BqB,KAAKK,OAAO,GAAGxB,eAAemB,KAAKK,OAAO,EAAEC,CAAAA;QAC1CR,gCAAAA,0CAAAA,oBAAsBQ,IAAI;YAAEC,SAASjB,MAAMkB,QAAQ;YAAEf;YAAOG,IAAID;QAAW;IAC7E;IAEA,MAAMc,WAAW3B,KAAK4B,QAAQ,CAACpB,MAAMmB,QAAQ,EAAE;QAC7CE,cAAc;YACZC,OAAO;YACPC,WAAW;YACX,mBAAmBvB,MAAMM,EAAE;QAC7B;QACAQ,aAAaxB;IACf;IAEA,OAAO;QACLkC,YAAY;YACVd,MAAMrB;YACN8B,UAAU7B;QACZ;QACAoB;QACAS;QACAZ;QACAL;IACF;AACF,EAAE"}
@@ -1,5 +1,5 @@
1
1
  import { __styles, mergeClasses, slot } from '@fluentui/react-components';
2
- import { useProgressBarStyles } from '../utils/useProgressBarStyles';
2
+ import { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';
3
3
  export const attachmentOverflowMenuItemClassNames = {
4
4
  root: 'fai-AttachmentOverflowMenuItem',
5
5
  progress: 'fai-AttachmentOverflowMenuItem__progress'
@@ -15,6 +15,8 @@ const useStyles = __styles({
15
15
  * Apply styling to the AttachmentList slots based on the state
16
16
  */
17
17
  export const useAttachmentOverflowMenuItemStyles_unstable = state => {
18
+ 'use no memo';
19
+
18
20
  const {
19
21
  imageOnly
20
22
  } = state;
@@ -38,4 +40,4 @@ export const useAttachmentOverflowMenuItemStyles_unstable = state => {
38
40
  }
39
41
  return state;
40
42
  };
41
- //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.js.map
43
+ //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAttachmentOverflowMenuItemStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, slot } from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\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 progress: 'fai-AttachmentOverflowMenuItem__progress',\n};\n\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 'use no memo';\n\n const { imageOnly } = state;\n const styles = useStyles();\n const progressBarStyles = useProgressBarStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.root,\n imageOnly && styles.imageOnly,\n state.root.className,\n );\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","slot","useProgressBarStyles","attachmentOverflowMenuItemClassNames","root","progress","useStyles","imageOnly","alignItems","useAttachmentOverflowMenuItemStyles_unstable","state","styles","progressBarStyles","className","bar","optional","elementType","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,EAAEC,IAAI,QAAQ,6BAA6B;AAC5E,SAASC,oBAAoB,QAAQ,uCAAuC;AAO5E,OAAO,MAAMC,uCAAwF;IACnGC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,MAAMC,YAAYP,WAAW;IAC3BQ,WAAW;QACTC,YAAY;IACd;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,+CAA+C,CAC1DC;IAEA;IAEA,MAAM,EAAEH,SAAS,EAAE,GAAGG;IACtB,MAAMC,SAASL;IACf,MAAMM,oBAAoBV;IAE1BQ,MAAMN,IAAI,CAACS,SAAS,GAAGb,aACrBG,qCAAqCC,IAAI,EACzCG,aAAaI,OAAOJ,SAAS,EAC7BG,MAAMN,IAAI,CAACS,SAAS;IAGtB,IAAIH,MAAML,QAAQ,EAAE;QAClBK,MAAML,QAAQ,CAACQ,SAAS,GAAGb,aACzBG,qCAAqCE,QAAQ,EAC7CO,kBAAkBP,QAAQ,EAC1BK,MAAML,QAAQ,CAACQ,SAAS;QAG1B,MAAMC,MAAMb,KAAKc,QAAQ,CAACL,MAAML,QAAQ,CAACS,GAAG,EAAE;YAAEE,aAAa;YAAOC,iBAAiB;QAAK;QAC1F,IAAIH,KAAK;YACP,IAAIJ,MAAML,QAAQ,CAACa,KAAK,KAAKC,WAAW;gBACtCL,IAAID,SAAS,GAAGb,aAAaY,kBAAkBQ,wBAAwB,EAAEN,IAAID,SAAS;YACxF,OAAO;gBACLC,IAAID,SAAS,GAAGb,aAAaY,kBAAkBS,kBAAkB,EAAEP,IAAID,SAAS;YAClF;YACAH,MAAML,QAAQ,CAACS,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOJ;AACT,EAAE"}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { useAttachmentTag_unstable } from './useAttachmentTag';
3
3
  import { renderAttachmentTag_unstable } from './renderAttachmentTag';
4
- import { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles';
4
+ import { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles.styles';
5
5
  import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
6
  /**
7
7
  * @deprecated use new Attachment component exported from \@fluentui-copilot/react-attachments package instead.
@@ -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/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\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
+ {"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.styles';\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.\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,kCAAkC;AAGlF,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"}
@@ -2,5 +2,5 @@ export * from './AttachmentTag';
2
2
  export * from './AttachmentTag.types';
3
3
  export * from './renderAttachmentTag';
4
4
  export * from './useAttachmentTag';
5
- export * from './useAttachmentTagStyles';
5
+ export * from './useAttachmentTagStyles.styles';
6
6
  //# sourceMappingURL=index.js.map
@@ -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":[],"rangeMappings":";;;;","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.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,kBAAkB;AAChC,cAAc,wBAAwB;AACtC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB;AACnC,cAAc,kCAAkC"}
@@ -27,6 +27,8 @@ export const useIconBaseClassName = __resetStyles("r176grtk", null, [".r176grtk{
27
27
  * Apply styling to the AttachmentTag slots based on the state
28
28
  */
29
29
  export const useAttachmentTagStyles_unstable = state => {
30
+ 'use no memo';
31
+
30
32
  const rootBaseClassName = useRootBaseClassName();
31
33
  const mediaBaseClassName = useMediaBaseClassName();
32
34
  const contentBaseClassName = useContentBaseClassName();
@@ -39,4 +41,4 @@ export const useAttachmentTagStyles_unstable = state => {
39
41
  state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);
40
42
  return state;
41
43
  };
42
- //# sourceMappingURL=useAttachmentTagStyles.js.map
44
+ //# sourceMappingURL=useAttachmentTagStyles.styles.js.map