@fluentui-copilot/react-attachments 0.12.5-hotfix.1 → 0.12.5-hotfix.2

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 (190) hide show
  1. package/CHANGELOG.json +4 -4
  2. package/CHANGELOG.md +5 -5
  3. package/lib/AgentTag.js +1 -0
  4. package/lib/Attachment.js +1 -0
  5. package/lib/AttachmentList.js +1 -0
  6. package/lib/AttachmentOverflowMenu.js +1 -0
  7. package/lib/AttachmentOverflowMenuButton.js +1 -0
  8. package/lib/AttachmentOverflowMenuItem.js +1 -0
  9. package/lib/AttachmentTag.js +1 -0
  10. package/lib/AttachmentTagItem.js +1 -0
  11. package/lib/AttachmentTagList.js +1 -0
  12. package/lib/components/AgentTag/AgentTag.js +5 -4
  13. package/lib/components/AgentTag/AgentTag.types.js +2 -1
  14. package/lib/components/AgentTag/index.js +1 -0
  15. package/lib/components/AgentTag/renderAgentTag.js +5 -3
  16. package/lib/components/AgentTag/useAgentTag.js +9 -7
  17. package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +57 -52
  18. package/lib/components/Attachment/Attachment.js +6 -5
  19. package/lib/components/Attachment/Attachment.types.js +2 -1
  20. package/lib/components/Attachment/index.js +1 -0
  21. package/lib/components/Attachment/renderAttachment.js +31 -36
  22. package/lib/components/Attachment/useAttachment.js +95 -85
  23. package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +268 -258
  24. package/lib/components/AttachmentList/AttachmentList.js +7 -6
  25. package/lib/components/AttachmentList/AttachmentList.types.js +2 -1
  26. package/lib/components/AttachmentList/index.js +1 -0
  27. package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
  28. package/lib/components/AttachmentList/useAttachmentList.js +124 -113
  29. package/lib/components/AttachmentList/useAttachmentListContextValues.js +15 -10
  30. package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +36 -31
  31. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +9 -8
  32. package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -1
  33. package/lib/components/AttachmentOverflowMenu/index.js +1 -0
  34. package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +13 -8
  35. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +15 -9
  36. package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +15 -10
  37. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +6 -5
  38. package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +2 -1
  39. package/lib/components/AttachmentOverflowMenuButton/index.js +1 -0
  40. package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +10 -11
  41. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +59 -51
  42. package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +89 -82
  43. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +5 -4
  44. package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +2 -1
  45. package/lib/components/AttachmentOverflowMenuItem/index.js +1 -0
  46. package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +8 -9
  47. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +49 -41
  48. package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +49 -43
  49. package/lib/components/AttachmentTag/AttachmentTag.js +7 -5
  50. package/lib/components/AttachmentTag/AttachmentTag.types.js +2 -1
  51. package/lib/components/AttachmentTag/index.js +1 -0
  52. package/lib/components/AttachmentTag/renderAttachmentTag.js +8 -10
  53. package/lib/components/AttachmentTag/useAttachmentTag.js +11 -9
  54. package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +83 -76
  55. package/lib/components/AttachmentTagItem/AttachmentTagItem.js +6 -4
  56. package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +2 -1
  57. package/lib/components/AttachmentTagItem/index.js +1 -0
  58. package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +8 -10
  59. package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +11 -9
  60. package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +27 -23
  61. package/lib/components/AttachmentTagList/AttachmentTagList.js +8 -6
  62. package/lib/components/AttachmentTagList/AttachmentTagList.types.js +2 -1
  63. package/lib/components/AttachmentTagList/index.js +1 -0
  64. package/lib/components/AttachmentTagList/renderAttachmentTagList.js +9 -7
  65. package/lib/components/AttachmentTagList/useAttachmentTagList.js +25 -21
  66. package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js +11 -8
  67. package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +15 -12
  68. package/lib/components/index.js +1 -0
  69. package/lib/components/utils/useAttachmentTagSlots.js +52 -45
  70. package/lib/components/utils/useProgressBarStyles.styles.raw.js +36 -34
  71. package/lib/contexts/attachmentListContext.js +5 -4
  72. package/lib/contexts/attachmentOverflowMenuContext.js +5 -4
  73. package/lib/contexts/attachmentTagListContext.js +3 -2
  74. package/lib/index.js +1 -0
  75. package/lib-commonjs/AgentTag.js +1 -0
  76. package/lib-commonjs/Attachment.js +1 -0
  77. package/lib-commonjs/AttachmentList.js +1 -0
  78. package/lib-commonjs/AttachmentOverflowMenu.js +1 -0
  79. package/lib-commonjs/AttachmentOverflowMenuButton.js +1 -0
  80. package/lib-commonjs/AttachmentOverflowMenuItem.js +1 -0
  81. package/lib-commonjs/AttachmentTag.js +1 -0
  82. package/lib-commonjs/AttachmentTagItem.js +1 -0
  83. package/lib-commonjs/AttachmentTagList.js +1 -0
  84. package/lib-commonjs/components/AgentTag/AgentTag.js +1 -1
  85. package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -1
  86. package/lib-commonjs/components/AgentTag/AgentTag.types.js +1 -0
  87. package/lib-commonjs/components/AgentTag/index.js +1 -0
  88. package/lib-commonjs/components/AgentTag/renderAgentTag.js +1 -1
  89. package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -1
  90. package/lib-commonjs/components/AgentTag/useAgentTag.js +1 -1
  91. package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -1
  92. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +1 -1
  93. package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -1
  94. package/lib-commonjs/components/Attachment/Attachment.js +1 -1
  95. package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
  96. package/lib-commonjs/components/Attachment/Attachment.types.js +1 -0
  97. package/lib-commonjs/components/Attachment/index.js +1 -0
  98. package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
  99. package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
  100. package/lib-commonjs/components/Attachment/useAttachment.js +1 -1
  101. package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
  102. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +1 -1
  103. package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -1
  104. package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
  105. package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
  106. package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +1 -0
  107. package/lib-commonjs/components/AttachmentList/index.js +1 -0
  108. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
  109. package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
  110. package/lib-commonjs/components/AttachmentList/useAttachmentList.js +1 -1
  111. package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
  112. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
  113. package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
  114. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +1 -1
  115. package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -1
  116. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
  117. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
  118. package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -0
  119. package/lib-commonjs/components/AttachmentOverflowMenu/index.js +1 -0
  120. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
  121. package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
  122. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
  123. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
  124. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
  125. package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
  126. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
  127. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
  128. package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -0
  129. package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +1 -0
  130. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
  131. package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
  132. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
  133. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
  134. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +1 -1
  135. package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -1
  136. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
  137. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
  138. package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -0
  139. package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +1 -0
  140. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
  141. package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
  142. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
  143. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
  144. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +1 -1
  145. package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -1
  146. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +1 -1
  147. package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
  148. package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +1 -0
  149. package/lib-commonjs/components/AttachmentTag/index.js +1 -0
  150. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js +1 -1
  151. package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
  152. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js +1 -1
  153. package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
  154. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +1 -1
  155. package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -1
  156. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
  157. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
  158. package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +1 -0
  159. package/lib-commonjs/components/AttachmentTagItem/index.js +1 -0
  160. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js +1 -1
  161. package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
  162. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js +1 -1
  163. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
  164. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +1 -1
  165. package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -1
  166. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +1 -1
  167. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
  168. package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js +1 -0
  169. package/lib-commonjs/components/AttachmentTagList/index.js +1 -0
  170. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js +1 -1
  171. package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
  172. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +1 -1
  173. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
  174. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js +1 -1
  175. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
  176. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +1 -1
  177. package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -1
  178. package/lib-commonjs/components/index.js +1 -0
  179. package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
  180. package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
  181. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +1 -1
  182. package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -1
  183. package/lib-commonjs/contexts/attachmentListContext.js +1 -1
  184. package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
  185. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
  186. package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
  187. package/lib-commonjs/contexts/attachmentTagListContext.js +1 -1
  188. package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
  189. package/lib-commonjs/index.js +1 -0
  190. package/package.json +4 -4
@@ -12,58 +12,66 @@ import { useAttachmentListContext_unstable } from '../../contexts/attachmentList
12
12
  *
13
13
  * @param props - props from this instance of AttachmentOverflowMenuButton
14
14
  * @param ref - reference to root HTMLElement of AttachmentOverflowMenuButton
15
- */ export const useAttachmentOverflowMenuButton_unstable = (props, ref)=>{
16
- const { isOverflowing, overflowCount, overflowButtonRef } = useAttachmentOverflowMenuContext_unstable((context)=>context);
17
- const { numberOfAttachments } = useAttachmentListContext_unstable((context)=>context);
18
- const fullyOverflowed = overflowCount >= numberOfAttachments;
19
- const isLoading = !!props.isLoading;
20
- const designVersion = useDesignVersion(props.designVersion);
21
- const mode = useCopilotMode(props.mode);
22
- const buttonText = defaultButtonText(props, overflowCount, designVersion, mode, fullyOverflowed);
23
- return {
24
- components: {
25
- root: 'button',
26
- progress: ProgressBar
27
- },
28
- root: slot.always(getIntrinsicElementProps('button', {
29
- ref: useMergedRefs(ref, overflowButtonRef),
30
- ...props
31
- }), {
32
- defaultProps: {
33
- children: buttonText
34
- },
35
- elementType: 'button'
36
- }),
37
- progress: slot.always(props.progress, {
38
- defaultProps: {
39
- value: undefined,
40
- shape: 'square',
41
- thickness: 'large',
42
- 'aria-label': 'Loading'
43
- },
44
- elementType: ProgressBar
45
- }),
46
- fullyOverflowed,
47
- isOverflowing,
48
- overflowCount,
49
- isLoading,
50
- designVersion,
51
- mode
52
- };
15
+ */
16
+ export const useAttachmentOverflowMenuButton_unstable = (props, ref) => {
17
+ const {
18
+ isOverflowing,
19
+ overflowCount,
20
+ overflowButtonRef
21
+ } = useAttachmentOverflowMenuContext_unstable(context => context);
22
+ const {
23
+ numberOfAttachments
24
+ } = useAttachmentListContext_unstable(context => context);
25
+ const fullyOverflowed = overflowCount >= numberOfAttachments;
26
+ const isLoading = !!props.isLoading;
27
+ const designVersion = useDesignVersion(props.designVersion);
28
+ const mode = useCopilotMode(props.mode);
29
+ const buttonText = defaultButtonText(props, overflowCount, designVersion, mode, fullyOverflowed);
30
+ return {
31
+ components: {
32
+ root: 'button',
33
+ progress: ProgressBar
34
+ },
35
+ root: slot.always(getIntrinsicElementProps('button', {
36
+ ref: useMergedRefs(ref, overflowButtonRef),
37
+ ...props
38
+ }), {
39
+ defaultProps: {
40
+ children: buttonText
41
+ },
42
+ elementType: 'button'
43
+ }),
44
+ progress: slot.always(props.progress, {
45
+ defaultProps: {
46
+ value: undefined,
47
+ shape: 'square',
48
+ thickness: 'large',
49
+ 'aria-label': 'Loading'
50
+ },
51
+ elementType: ProgressBar
52
+ }),
53
+ fullyOverflowed,
54
+ isOverflowing,
55
+ overflowCount,
56
+ isLoading,
57
+ designVersion,
58
+ mode
59
+ };
53
60
  };
54
61
  function defaultButtonText(props, overflowCount, designVersion, copilotMode, fullyOverflowed) {
55
- if (props.children) {
56
- return props.children;
62
+ if (props.children) {
63
+ return props.children;
64
+ }
65
+ if (props.text) {
66
+ if (typeof props.text === 'function') {
67
+ return props.text(overflowCount);
68
+ } else {
69
+ return props.text;
57
70
  }
58
- if (props.text) {
59
- if (typeof props.text === 'function') {
60
- return props.text(overflowCount);
61
- } else {
62
- return props.text;
63
- }
64
- }
65
- if (designVersion === 'next' && fullyOverflowed) {
66
- return /*#__PURE__*/ React.createElement(React.Fragment, null, copilotMode === 'canvas' ? /*#__PURE__*/ React.createElement(Attach24Regular, null) : /*#__PURE__*/ React.createElement(Attach20Regular, null), overflowCount);
67
- }
68
- return `+${overflowCount}`;
71
+ }
72
+ if (designVersion === 'next' && fullyOverflowed) {
73
+ return /*#__PURE__*/React.createElement(React.Fragment, null, copilotMode === 'canvas' ? /*#__PURE__*/React.createElement(Attach24Regular, null) : /*#__PURE__*/React.createElement(Attach20Regular, null), overflowCount);
74
+ }
75
+ return `+${overflowCount}`;
69
76
  }
77
+ //# sourceMappingURL=useAttachmentOverflowMenuButton.js.map
@@ -2,101 +2,108 @@ import { makeResetStyles, makeStyles, mergeClasses, shorthands, slot } from '@fl
2
2
  import { tokens, typographyStyles } from '@fluentui-copilot/tokens';
3
3
  import { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';
4
4
  export const attachmentOverflowMenuButtonClassNames = {
5
- root: 'fai-AttachmentOverflowMenuButton',
6
- progress: 'fai-AttachmentOverflowMenuButton__progress'
5
+ root: 'fai-AttachmentOverflowMenuButton',
6
+ progress: 'fai-AttachmentOverflowMenuButton__progress'
7
7
  };
8
8
  const useRootBaseClassName = makeResetStyles({
9
- color: tokens.colorNeutralForeground1,
10
- alignItems: 'center',
11
- backgroundColor: tokens.colorSubtleBackground,
12
- border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
13
- borderRadius: tokens.borderRadiusMedium,
14
- boxSizing: 'border-box',
15
- columnGap: tokens.spacingHorizontalSNudge,
9
+ color: tokens.colorNeutralForeground1,
10
+ alignItems: 'center',
11
+ backgroundColor: tokens.colorSubtleBackground,
12
+ border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
13
+ borderRadius: tokens.borderRadiusMedium,
14
+ boxSizing: 'border-box',
15
+ columnGap: tokens.spacingHorizontalSNudge,
16
+ cursor: 'pointer',
17
+ display: 'inline-flex',
18
+ flexWrap: 'nowrap',
19
+ fontFamily: typographyStyles.body1.fontFamily,
20
+ fontSize: typographyStyles.body1.fontSize,
21
+ fontWeight: typographyStyles.body1.fontWeight,
22
+ justifyContent: 'center',
23
+ padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,
24
+ verticalAlign: 'middle',
25
+ position: 'relative',
26
+ ':hover': {
16
27
  cursor: 'pointer',
17
- display: 'inline-flex',
18
- flexWrap: 'nowrap',
19
- fontFamily: typographyStyles.body1.fontFamily,
20
- fontSize: typographyStyles.body1.fontSize,
21
- fontWeight: typographyStyles.body1.fontWeight,
22
- justifyContent: 'center',
23
- padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,
24
- verticalAlign: 'middle',
25
- position: 'relative',
28
+ backgroundColor: tokens.colorSubtleBackgroundHover,
29
+ color: tokens.colorNeutralForeground2Hover
30
+ },
31
+ ':active': {
32
+ backgroundColor: tokens.colorSubtleBackgroundPressed,
33
+ color: tokens.colorNeutralForeground2Pressed
34
+ },
35
+ '@media (forced-colors: active)': {
26
36
  ':hover': {
27
- cursor: 'pointer',
28
- backgroundColor: tokens.colorSubtleBackgroundHover,
29
- color: tokens.colorNeutralForeground2Hover
37
+ backgroundColor: 'HighlightText'
30
38
  },
31
39
  ':active': {
32
- backgroundColor: tokens.colorSubtleBackgroundPressed,
33
- color: tokens.colorNeutralForeground2Pressed
34
- },
35
- '@media (forced-colors: active)': {
36
- ':hover': {
37
- backgroundColor: 'HighlightText'
38
- },
39
- ':active': {
40
- backgroundColor: 'HighlightText'
41
- }
40
+ backgroundColor: 'HighlightText'
42
41
  }
42
+ }
43
43
  });
44
44
  const useNextStyles = makeStyles({
45
- root: {
46
- borderRadius: tokens.borderRadiusXLarge,
47
- ...shorthands.borderColor(tokens.colorTransparentStroke),
48
- color: tokens.colorNeutralForeground2,
49
- backgroundColor: tokens.colorNeutralBackground3,
50
- ':hover': {
51
- cursor: 'pointer',
52
- color: tokens.colorNeutralForeground2Hover,
53
- backgroundColor: tokens.colorNeutralBackground3Hover
54
- },
55
- ':active': {
56
- color: tokens.colorNeutralForeground2Pressed,
57
- backgroundColor: tokens.colorNeutralBackground3Pressed
58
- }
59
- },
60
- canvas: {
61
- minHeight: '40px',
62
- padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`
63
- },
64
- sidecar: {
65
- minHeight: '32px',
66
- padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`
67
- },
68
- fullyOverflowed_canvas: {
69
- padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalL}`,
70
- ...typographyStyles.subtitle2
45
+ root: {
46
+ borderRadius: tokens.borderRadiusXLarge,
47
+ ...shorthands.borderColor(tokens.colorTransparentStroke),
48
+ color: tokens.colorNeutralForeground2,
49
+ backgroundColor: tokens.colorNeutralBackground3,
50
+ ':hover': {
51
+ cursor: 'pointer',
52
+ color: tokens.colorNeutralForeground2Hover,
53
+ backgroundColor: tokens.colorNeutralBackground3Hover
71
54
  },
72
- fullyOverflowed_sidecar: {
73
- padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalM}`,
74
- ...typographyStyles.body1Strong
55
+ ':active': {
56
+ color: tokens.colorNeutralForeground2Pressed,
57
+ backgroundColor: tokens.colorNeutralBackground3Pressed
75
58
  }
59
+ },
60
+ canvas: {
61
+ minHeight: '40px',
62
+ padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`
63
+ },
64
+ sidecar: {
65
+ minHeight: '32px',
66
+ padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`
67
+ },
68
+ fullyOverflowed_canvas: {
69
+ padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalL}`,
70
+ ...typographyStyles.subtitle2
71
+ },
72
+ fullyOverflowed_sidecar: {
73
+ padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalM}`,
74
+ ...typographyStyles.body1Strong
75
+ }
76
76
  });
77
77
  /**
78
78
  * Apply styling to the AttachmentOverflowMenuButton slots based on the state
79
- */ export const useAttachmentOverflowMenuButtonStyles_unstable = (state)=>{
80
- 'use no memo';
81
- const { designVersion, mode, fullyOverflowed } = state;
82
- const rootBaseClassName = useRootBaseClassName();
83
- const progressBarStyles = useProgressBarStyles();
84
- const nextStyles = useNextStyles();
85
- state.root.className = mergeClasses(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, designVersion === 'next' && nextStyles.root, designVersion === 'next' && nextStyles[mode], designVersion === 'next' && fullyOverflowed && nextStyles[`fullyOverflowed_${mode}`], state.root.className);
86
- if (state.progress) {
87
- state.progress.className = mergeClasses(attachmentOverflowMenuButtonClassNames.progress, progressBarStyles.progress, state.progress.className);
88
- const bar = slot.optional(state.progress.bar, {
89
- elementType: 'div',
90
- renderByDefault: true
91
- });
92
- if (bar) {
93
- if (state.progress.value === undefined) {
94
- bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);
95
- } else {
96
- bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);
97
- }
98
- state.progress.bar = bar;
99
- }
79
+ */
80
+ export const useAttachmentOverflowMenuButtonStyles_unstable = state => {
81
+ 'use no memo';
82
+
83
+ const {
84
+ designVersion,
85
+ mode,
86
+ fullyOverflowed
87
+ } = state;
88
+ const rootBaseClassName = useRootBaseClassName();
89
+ const progressBarStyles = useProgressBarStyles();
90
+ const nextStyles = useNextStyles();
91
+ state.root.className = mergeClasses(attachmentOverflowMenuButtonClassNames.root, rootBaseClassName, designVersion === 'next' && nextStyles.root, designVersion === 'next' && nextStyles[mode], designVersion === 'next' && fullyOverflowed && nextStyles[`fullyOverflowed_${mode}`], state.root.className);
92
+ if (state.progress) {
93
+ state.progress.className = mergeClasses(attachmentOverflowMenuButtonClassNames.progress, progressBarStyles.progress, state.progress.className);
94
+ const bar = slot.optional(state.progress.bar, {
95
+ elementType: 'div',
96
+ renderByDefault: true
97
+ });
98
+ if (bar) {
99
+ if (state.progress.value === undefined) {
100
+ bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);
101
+ } else {
102
+ bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);
103
+ }
104
+ state.progress.bar = bar;
100
105
  }
101
- return state;
106
+ }
107
+ return state;
102
108
  };
109
+ //# sourceMappingURL=useAttachmentOverflowMenuButtonStyles.styles.raw.js.map
@@ -2,9 +2,10 @@ import * as React from 'react';
2
2
  import { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';
3
3
  import { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';
4
4
  import { useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles.styles';
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);
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
9
  });
10
10
  AttachmentOverflowMenuItem.displayName = 'AttachmentOverflowMenuItem';
11
+ //# sourceMappingURL=AttachmentOverflowMenuItem.js.map
@@ -1,3 +1,4 @@
1
1
  /**
2
2
  * State used in rendering AttachmentOverflowMenuItem
3
- */ export { };
3
+ */export {};
4
+ //# sourceMappingURL=AttachmentOverflowMenuItem.types.js.map
@@ -2,3 +2,4 @@ export { AttachmentOverflowMenuItem } from './AttachmentOverflowMenuItem';
2
2
  export { renderAttachmentOverflowMenuItem_unstable } from './renderAttachmentOverflowMenuItem';
3
3
  export { useAttachmentOverflowMenuItem_unstable } from './useAttachmentOverflowMenuItem';
4
4
  export { attachmentOverflowMenuItemClassNames, useAttachmentOverflowMenuItemStyles_unstable } from './useAttachmentOverflowMenuItemStyles.styles';
5
+ //# sourceMappingURL=index.js.map
@@ -1,13 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-components';
3
3
  /**
4
4
  * Render the final JSX of AttachmentOverflowMenuItem
5
- */ export const renderAttachmentOverflowMenuItem_unstable = (state)=>{
6
- assertSlots(state);
7
- return !state.isVisible ? /*#__PURE__*/ _jsxs(state.root, {
8
- children: [
9
- state.root.children,
10
- state.progress && /*#__PURE__*/ _jsx(state.progress, {})
11
- ]
12
- }) : null;
5
+ */
6
+ export const renderAttachmentOverflowMenuItem_unstable = state => {
7
+ assertSlots(state);
8
+ return !state.isVisible ? /*#__PURE__*/_jsxs(state.root, {
9
+ children: [state.root.children, state.progress && /*#__PURE__*/_jsx(state.progress, {})]
10
+ }) : null;
13
11
  };
12
+ //# sourceMappingURL=renderAttachmentOverflowMenuItem.js.map
@@ -11,46 +11,54 @@ import { useDesignVersion } from '@fluentui-copilot/react-provider';
11
11
  *
12
12
  * @param props - props from this instance of AttachmentOverflowMenuItem
13
13
  * @param ref - reference to root HTMLElement of AttachmentOverflowMenuItem
14
- */ export const useAttachmentOverflowMenuItem_unstable = (props, ref)=>{
15
- 'use no memo';
16
- const { imageOnly, media } = props;
17
- const menuItemId = useId('attachment-', props.id);
18
- const isVisible = useIsOverflowItemVisible(menuItemId);
19
- const { onAttachmentDismiss } = useAttachmentListContext_unstable((context)=>context);
20
- const designVersion = useDesignVersion(props.designVersion);
21
- const root = slot.always({
22
- ref,
23
- icon: media,
24
- secondaryContent: /*#__PURE__*/ React.createElement(Dismiss20Regular, null),
25
- ...props,
26
- id: menuItemId
27
- }, {
28
- elementType: MenuItem
14
+ */
15
+ export const useAttachmentOverflowMenuItem_unstable = (props, ref) => {
16
+ 'use no memo';
17
+
18
+ const {
19
+ imageOnly,
20
+ media
21
+ } = props;
22
+ const menuItemId = useId('attachment-', props.id);
23
+ const isVisible = useIsOverflowItemVisible(menuItemId);
24
+ const {
25
+ onAttachmentDismiss
26
+ } = useAttachmentListContext_unstable(context => context);
27
+ const designVersion = useDesignVersion(props.designVersion);
28
+ const root = slot.always({
29
+ ref,
30
+ icon: media,
31
+ secondaryContent: /*#__PURE__*/React.createElement(Dismiss20Regular, null),
32
+ ...props,
33
+ id: menuItemId
34
+ }, {
35
+ elementType: MenuItem
36
+ });
37
+ root.onClick = mergeCallbacks(root.onClick, ev => {
38
+ onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
39
+ content: props.children,
40
+ media,
41
+ id: menuItemId
29
42
  });
30
- root.onClick = mergeCallbacks(root.onClick, (ev)=>{
31
- onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
32
- content: props.children,
33
- media,
34
- id: menuItemId
35
- });
36
- });
37
- const progress = slot.optional(props.progress, {
38
- defaultProps: {
39
- shape: 'square',
40
- thickness: 'large',
41
- 'aria-labelledby': props.id
42
- },
43
- elementType: ProgressBar
44
- });
45
- return {
46
- components: {
47
- root: MenuItem,
48
- progress: ProgressBar
49
- },
50
- root,
51
- progress,
52
- isVisible,
53
- imageOnly,
54
- designVersion
55
- };
43
+ });
44
+ const progress = slot.optional(props.progress, {
45
+ defaultProps: {
46
+ shape: 'square',
47
+ thickness: 'large',
48
+ 'aria-labelledby': props.id
49
+ },
50
+ elementType: ProgressBar
51
+ });
52
+ return {
53
+ components: {
54
+ root: MenuItem,
55
+ progress: ProgressBar
56
+ },
57
+ root,
58
+ progress,
59
+ isVisible,
60
+ imageOnly,
61
+ designVersion
62
+ };
56
63
  };
64
+ //# sourceMappingURL=useAttachmentOverflowMenuItem.js.map
@@ -1,57 +1,63 @@
1
1
  import { makeStyles, mergeClasses, slot, tokens } from '@fluentui/react-components';
2
2
  import { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';
3
3
  export const attachmentOverflowMenuItemClassNames = {
4
- root: 'fai-AttachmentOverflowMenuItem',
5
- progress: 'fai-AttachmentOverflowMenuItem__progress'
4
+ root: 'fai-AttachmentOverflowMenuItem',
5
+ progress: 'fai-AttachmentOverflowMenuItem__progress'
6
6
  };
7
7
  const FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';
8
8
  const useStyles = makeStyles({
9
- imageOnly: {
10
- alignItems: 'center'
11
- },
12
- secondaryContent: {
13
- display: 'flex',
14
- alignItems: 'center'
15
- }
9
+ imageOnly: {
10
+ alignItems: 'center'
11
+ },
12
+ secondaryContent: {
13
+ display: 'flex',
14
+ alignItems: 'center'
15
+ }
16
16
  });
17
17
  const useNextStyles = makeStyles({
18
- nextStyles: {
19
- [`[${FOCUS_VISIBLE_ATTR}]::after`]: {
20
- borderRadius: tokens.borderRadiusXLarge
21
- },
22
- outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`
23
- }
18
+ nextStyles: {
19
+ [`[${FOCUS_VISIBLE_ATTR}]::after`]: {
20
+ borderRadius: tokens.borderRadiusXLarge
21
+ },
22
+ outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`
23
+ }
24
24
  });
25
25
  /**
26
26
  * Apply styling to the AttachmentList slots based on the state
27
- */ export const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
28
- 'use no memo';
29
- const { imageOnly, designVersion } = state;
30
- const styles = useStyles();
31
- const nextStyles = useNextStyles();
32
- const progressBarStyles = useProgressBarStyles();
33
- state.root.className = mergeClasses(attachmentOverflowMenuItemClassNames.root, imageOnly && styles.imageOnly, designVersion === 'next' && nextStyles.nextStyles, state.root.className);
34
- const secondaryContent = slot.optional(state.root.secondaryContent, {
35
- elementType: 'span'
27
+ */
28
+ export const useAttachmentOverflowMenuItemStyles_unstable = state => {
29
+ 'use no memo';
30
+
31
+ const {
32
+ imageOnly,
33
+ designVersion
34
+ } = state;
35
+ const styles = useStyles();
36
+ const nextStyles = useNextStyles();
37
+ const progressBarStyles = useProgressBarStyles();
38
+ state.root.className = mergeClasses(attachmentOverflowMenuItemClassNames.root, imageOnly && styles.imageOnly, designVersion === 'next' && nextStyles.nextStyles, state.root.className);
39
+ const secondaryContent = slot.optional(state.root.secondaryContent, {
40
+ elementType: 'span'
41
+ });
42
+ if (secondaryContent) {
43
+ secondaryContent.className = mergeClasses(styles.secondaryContent, secondaryContent.className);
44
+ state.root.secondaryContent = secondaryContent;
45
+ }
46
+ if (state.progress) {
47
+ state.progress.className = mergeClasses(attachmentOverflowMenuItemClassNames.progress, progressBarStyles.progress, state.progress.className);
48
+ const bar = slot.optional(state.progress.bar, {
49
+ elementType: 'div',
50
+ renderByDefault: true
36
51
  });
37
- if (secondaryContent) {
38
- secondaryContent.className = mergeClasses(styles.secondaryContent, secondaryContent.className);
39
- state.root.secondaryContent = secondaryContent;
40
- }
41
- if (state.progress) {
42
- state.progress.className = mergeClasses(attachmentOverflowMenuItemClassNames.progress, progressBarStyles.progress, state.progress.className);
43
- const bar = slot.optional(state.progress.bar, {
44
- elementType: 'div',
45
- renderByDefault: true
46
- });
47
- if (bar) {
48
- if (state.progress.value === undefined) {
49
- bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);
50
- } else {
51
- bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);
52
- }
53
- state.progress.bar = bar;
54
- }
52
+ if (bar) {
53
+ if (state.progress.value === undefined) {
54
+ bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);
55
+ } else {
56
+ bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);
57
+ }
58
+ state.progress.bar = bar;
55
59
  }
56
- return state;
60
+ }
61
+ return state;
57
62
  };
63
+ //# sourceMappingURL=useAttachmentOverflowMenuItemStyles.styles.raw.js.map
@@ -6,10 +6,12 @@ import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
6
  /**
7
7
  * @deprecated use new Attachment component exported from \@fluentui-copilot/react-attachments package instead.
8
8
  * Deprecated on 4/9/2024.
9
- */ export const AttachmentTag = /*#__PURE__*/ React.forwardRef((props, ref)=>{
10
- const state = useAttachmentTag_unstable(props, ref);
11
- useAttachmentTagStyles_unstable(state);
12
- useCustomStyleHook('useAttachmentTagStyles')(state);
13
- return renderAttachmentTag_unstable(state);
9
+ */
10
+ export const AttachmentTag = /*#__PURE__*/React.forwardRef((props, ref) => {
11
+ const state = useAttachmentTag_unstable(props, ref);
12
+ useAttachmentTagStyles_unstable(state);
13
+ useCustomStyleHook('useAttachmentTagStyles')(state);
14
+ return renderAttachmentTag_unstable(state);
14
15
  });
15
16
  AttachmentTag.displayName = 'AttachmentTag';
17
+ //# sourceMappingURL=AttachmentTag.js.map
@@ -1,3 +1,4 @@
1
1
  /**
2
2
  * State used in rendering AttachmentTag
3
- */ export { };
3
+ */export {};
4
+ //# sourceMappingURL=AttachmentTag.types.js.map
@@ -2,3 +2,4 @@ export { AttachmentTag } from './AttachmentTag';
2
2
  export { renderAttachmentTag_unstable } from './renderAttachmentTag';
3
3
  export { useAttachmentTag_unstable } from './useAttachmentTag';
4
4
  export { ATTACHMENTTAG_MAXWIDTH, attachmentTagClassNames, useAttachmentTagStyles_unstable, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from './useAttachmentTagStyles.styles';
5
+ //# sourceMappingURL=index.js.map
@@ -1,14 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-components';
3
3
  /**
4
4
  * Render the final JSX of AttachmentTag
5
- */ export const renderAttachmentTag_unstable = (state)=>{
6
- assertSlots(state);
7
- return /*#__PURE__*/ _jsxs(state.root, {
8
- children: [
9
- state.media && /*#__PURE__*/ _jsx(state.media, {}),
10
- /*#__PURE__*/ _jsx(state.content, {}),
11
- /*#__PURE__*/ _jsx(state.icon, {})
12
- ]
13
- });
5
+ */
6
+ export const renderAttachmentTag_unstable = state => {
7
+ assertSlots(state);
8
+ return /*#__PURE__*/_jsxs(state.root, {
9
+ children: [state.media && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), /*#__PURE__*/_jsx(state.icon, {})]
10
+ });
14
11
  };
12
+ //# sourceMappingURL=renderAttachmentTag.js.map