@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
@@ -7,13 +7,15 @@ import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';
7
7
  *
8
8
  * @param props - props from this instance of AttachmentTag
9
9
  * @param ref - reference to root HTMLElement of AttachmentTag
10
- */ export const useAttachmentTag_unstable = (props, ref)=>{
11
- return useAttachmentTagSlots(props, ref, {
12
- elementType: {
13
- root: 'button',
14
- media: 'span',
15
- content: 'span',
16
- icon: 'span'
17
- }
18
- });
10
+ */
11
+ export const useAttachmentTag_unstable = (props, ref) => {
12
+ return useAttachmentTagSlots(props, ref, {
13
+ elementType: {
14
+ root: 'button',
15
+ media: 'span',
16
+ content: 'span',
17
+ icon: 'span'
18
+ }
19
+ });
19
20
  };
21
+ //# sourceMappingURL=useAttachmentTag.js.map
@@ -1,98 +1,105 @@
1
1
  import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';
2
2
  import { tokens } from '@fluentui-copilot/tokens';
3
3
  export const attachmentTagClassNames = {
4
- root: 'fai-AttachmentTag',
5
- media: 'fai-AttachmentTag__media',
6
- content: 'fai-AttachmentTag__content',
7
- icon: 'fai-AttachmentTag__icon'
4
+ root: 'fai-AttachmentTag',
5
+ media: 'fai-AttachmentTag__media',
6
+ content: 'fai-AttachmentTag__content',
7
+ icon: 'fai-AttachmentTag__icon'
8
8
  };
9
9
  /**
10
10
  * @internal
11
- */ export const ATTACHMENTTAG_MAXWIDTH = '180px';
11
+ */
12
+ export const ATTACHMENTTAG_MAXWIDTH = '180px';
12
13
  const ATTACHMENTTAG_SIZE = '20px';
13
14
  const useRootBaseClassName = makeResetStyles({
14
- color: tokens.colorNeutralForeground1,
15
- alignItems: 'center',
16
- backgroundColor: tokens.colorNeutralBackground1,
17
- border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
18
- borderRadius: tokens.borderRadiusMedium,
19
- boxSizing: 'border-box',
20
- columnGap: tokens.spacingHorizontalSNudge,
21
- cursor: 'pointer',
22
- display: 'inline-flex',
23
- flexWrap: 'nowrap',
24
- justifyContent: 'center',
25
- maxWidth: ATTACHMENTTAG_MAXWIDTH,
26
- padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,
27
- verticalAlign: 'middle',
28
- ':hover': {
29
- borderColor: tokens.colorNeutralStroke1Hover,
30
- [`& .${attachmentTagClassNames.icon}`]: {
31
- color: tokens.colorBrandForegroundLinkHover
32
- }
33
- },
34
- ':hover:active': {
35
- borderColor: tokens.colorNeutralStroke1Pressed,
36
- [`& .${attachmentTagClassNames.icon}`]: {
37
- color: tokens.colorNeutralForeground2BrandPressed
38
- }
39
- },
40
- ':focus': {
41
- [`& .${attachmentTagClassNames.icon}`]: {
42
- color: tokens.colorNeutralForeground2BrandHover
43
- }
44
- },
45
- ':focus:active': {
46
- [`& .${attachmentTagClassNames.icon}`]: {
47
- color: tokens.colorNeutralForeground2BrandPressed
48
- }
15
+ color: tokens.colorNeutralForeground1,
16
+ alignItems: 'center',
17
+ backgroundColor: tokens.colorNeutralBackground1,
18
+ border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
19
+ borderRadius: tokens.borderRadiusMedium,
20
+ boxSizing: 'border-box',
21
+ columnGap: tokens.spacingHorizontalSNudge,
22
+ cursor: 'pointer',
23
+ display: 'inline-flex',
24
+ flexWrap: 'nowrap',
25
+ justifyContent: 'center',
26
+ maxWidth: ATTACHMENTTAG_MAXWIDTH,
27
+ padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,
28
+ verticalAlign: 'middle',
29
+ ':hover': {
30
+ borderColor: tokens.colorNeutralStroke1Hover,
31
+ [`& .${attachmentTagClassNames.icon}`]: {
32
+ color: tokens.colorBrandForegroundLinkHover
49
33
  }
34
+ },
35
+ ':hover:active': {
36
+ borderColor: tokens.colorNeutralStroke1Pressed,
37
+ [`& .${attachmentTagClassNames.icon}`]: {
38
+ color: tokens.colorNeutralForeground2BrandPressed
39
+ }
40
+ },
41
+ ':focus': {
42
+ [`& .${attachmentTagClassNames.icon}`]: {
43
+ color: tokens.colorNeutralForeground2BrandHover
44
+ }
45
+ },
46
+ ':focus:active': {
47
+ [`& .${attachmentTagClassNames.icon}`]: {
48
+ color: tokens.colorNeutralForeground2BrandPressed
49
+ }
50
+ }
50
51
  });
51
52
  /**
52
53
  * @internal
53
- */ export const useMediaBaseClassName = makeResetStyles({
54
- fontSize: ATTACHMENTTAG_SIZE,
55
- height: ATTACHMENTTAG_SIZE,
56
- lineHeight: ATTACHMENTTAG_SIZE,
57
- width: ATTACHMENTTAG_SIZE
54
+ */
55
+ export const useMediaBaseClassName = makeResetStyles({
56
+ fontSize: ATTACHMENTTAG_SIZE,
57
+ height: ATTACHMENTTAG_SIZE,
58
+ lineHeight: ATTACHMENTTAG_SIZE,
59
+ width: ATTACHMENTTAG_SIZE
58
60
  });
59
61
  /**
60
62
  * @internal
61
- */ export const useContentBaseClassName = makeResetStyles({
62
- overflowX: 'hidden',
63
- textOverflow: 'ellipsis',
64
- whiteSpace: 'nowrap',
65
- ...typographyStyles.body1
63
+ */
64
+ export const useContentBaseClassName = makeResetStyles({
65
+ overflowX: 'hidden',
66
+ textOverflow: 'ellipsis',
67
+ whiteSpace: 'nowrap',
68
+ ...typographyStyles.body1
66
69
  });
67
70
  /**
68
71
  * @internal
69
- */ export const useIconBaseClassName = makeResetStyles({
70
- alignItems: 'center',
71
- borderRadius: tokens.borderRadiusCircular,
72
- border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,
73
- boxSizing: 'border-box',
74
- color: tokens.colorNeutralForeground1,
75
- display: 'inline-flex',
76
- fontSize: ATTACHMENTTAG_SIZE,
77
- height: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,
78
- justifyContent: 'center',
79
- maxWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,
80
- minWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,
81
- padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`
72
+ */
73
+ export const useIconBaseClassName = makeResetStyles({
74
+ alignItems: 'center',
75
+ borderRadius: tokens.borderRadiusCircular,
76
+ border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,
77
+ boxSizing: 'border-box',
78
+ color: tokens.colorNeutralForeground1,
79
+ display: 'inline-flex',
80
+ fontSize: ATTACHMENTTAG_SIZE,
81
+ height: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,
82
+ justifyContent: 'center',
83
+ maxWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,
84
+ minWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,
85
+ padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`
82
86
  });
83
87
  /**
84
88
  * Apply styling to the AttachmentTag slots based on the state
85
- */ export const useAttachmentTagStyles_unstable = (state)=>{
86
- 'use no memo';
87
- const rootBaseClassName = useRootBaseClassName();
88
- const mediaBaseClassName = useMediaBaseClassName();
89
- const contentBaseClassName = useContentBaseClassName();
90
- const iconBaseClassName = useIconBaseClassName();
91
- state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);
92
- if (state.media) {
93
- state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);
94
- }
95
- state.content.className = mergeClasses(attachmentTagClassNames.content, contentBaseClassName, state.content.className);
96
- state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);
97
- return state;
89
+ */
90
+ export const useAttachmentTagStyles_unstable = state => {
91
+ 'use no memo';
92
+
93
+ const rootBaseClassName = useRootBaseClassName();
94
+ const mediaBaseClassName = useMediaBaseClassName();
95
+ const contentBaseClassName = useContentBaseClassName();
96
+ const iconBaseClassName = useIconBaseClassName();
97
+ state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);
98
+ if (state.media) {
99
+ state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);
100
+ }
101
+ state.content.className = mergeClasses(attachmentTagClassNames.content, contentBaseClassName, state.content.className);
102
+ state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);
103
+ return state;
98
104
  };
105
+ //# sourceMappingURL=useAttachmentTagStyles.styles.raw.js.map
@@ -5,9 +5,11 @@ import { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyle
5
5
  /**
6
6
  * @deprecated use new AttachmentOverflowMenuItem component exported from \@fluentui-copilot/react-attachments package instead.
7
7
  * Deprecated on 4/9/2024.
8
- */ export const AttachmentTagItem = /*#__PURE__*/ React.forwardRef((props, ref)=>{
9
- const state = useAttachmentTagItem_unstable(props, ref);
10
- useAttachmentTagItemStyles_unstable(state);
11
- return renderAttachmentTagItem_unstable(state);
8
+ */
9
+ export const AttachmentTagItem = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useAttachmentTagItem_unstable(props, ref);
11
+ useAttachmentTagItemStyles_unstable(state);
12
+ return renderAttachmentTagItem_unstable(state);
12
13
  });
13
14
  AttachmentTagItem.displayName = 'AttachmentTagItem';
15
+ //# sourceMappingURL=AttachmentTagItem.js.map
@@ -1,3 +1,4 @@
1
1
  /**
2
2
  * State used in rendering AttachmentTagItem
3
- */ export { };
3
+ */export {};
4
+ //# sourceMappingURL=AttachmentTagItem.types.js.map
@@ -2,3 +2,4 @@ export { AttachmentTagItem } from './AttachmentTagItem';
2
2
  export { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';
3
3
  export { useAttachmentTagItem_unstable } from './useAttachmentTagItem';
4
4
  export { attachmentTagItemClassNames, useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles.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 AttachmentTagItem
5
- */ export const renderAttachmentTagItem_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 renderAttachmentTagItem_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=renderAttachmentTagItem.js.map
@@ -7,13 +7,15 @@ import { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';
7
7
  *
8
8
  * @param props - props from this instance of AttachmentTagItem
9
9
  * @param ref - reference to root HTMLElement of AttachmentTagItem
10
- */ export const useAttachmentTagItem_unstable = (props, ref)=>{
11
- return useAttachmentTagSlots(props, ref, {
12
- elementType: {
13
- root: 'div',
14
- media: 'span',
15
- content: 'span',
16
- icon: 'span'
17
- }
18
- });
10
+ */
11
+ export const useAttachmentTagItem_unstable = (props, ref) => {
12
+ return useAttachmentTagSlots(props, ref, {
13
+ elementType: {
14
+ root: 'div',
15
+ media: 'span',
16
+ content: 'span',
17
+ icon: 'span'
18
+ }
19
+ });
19
20
  };
21
+ //# sourceMappingURL=useAttachmentTagItem.js.map
@@ -2,33 +2,37 @@ import { makeResetStyles, mergeClasses } from '@fluentui/react-components';
2
2
  import { tokens } from '@fluentui-copilot/tokens';
3
3
  import { ATTACHMENTTAG_MAXWIDTH, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from '../AttachmentTag/useAttachmentTagStyles.styles';
4
4
  export const attachmentTagItemClassNames = {
5
- root: 'fai-AttachmentTagItem',
6
- media: 'fai-AttachmentTagItem__media',
7
- content: 'fai-AttachmentTagItem__content',
8
- icon: 'fai-AttachmentTagItem__icon'
5
+ root: 'fai-AttachmentTagItem',
6
+ media: 'fai-AttachmentTagItem__media',
7
+ content: 'fai-AttachmentTagItem__content',
8
+ icon: 'fai-AttachmentTagItem__icon'
9
9
  };
10
10
  /**
11
11
  * Styles for the root slot
12
- */ const useRootBaseClassName = makeResetStyles({
13
- display: 'inline-flex',
14
- flexWrap: 'nowrap',
15
- columnGap: tokens.spacingHorizontalSNudge,
16
- maxWidth: ATTACHMENTTAG_MAXWIDTH,
17
- alignItems: 'center'
12
+ */
13
+ const useRootBaseClassName = makeResetStyles({
14
+ display: 'inline-flex',
15
+ flexWrap: 'nowrap',
16
+ columnGap: tokens.spacingHorizontalSNudge,
17
+ maxWidth: ATTACHMENTTAG_MAXWIDTH,
18
+ alignItems: 'center'
18
19
  });
19
20
  /**
20
21
  * Apply styling to the AttachmentTagItem slots based on the state
21
- */ export const useAttachmentTagItemStyles_unstable = (state)=>{
22
- 'use no memo';
23
- const rootBaseClassName = useRootBaseClassName();
24
- const mediaBaseClassName = useMediaBaseClassName();
25
- const contentBaseClassName = useContentBaseClassName();
26
- const iconBaseClassName = useIconBaseClassName();
27
- state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);
28
- if (state.media) {
29
- state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);
30
- }
31
- state.content.className = mergeClasses(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);
32
- state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);
33
- return state;
22
+ */
23
+ export const useAttachmentTagItemStyles_unstable = state => {
24
+ 'use no memo';
25
+
26
+ const rootBaseClassName = useRootBaseClassName();
27
+ const mediaBaseClassName = useMediaBaseClassName();
28
+ const contentBaseClassName = useContentBaseClassName();
29
+ const iconBaseClassName = useIconBaseClassName();
30
+ state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);
31
+ if (state.media) {
32
+ state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);
33
+ }
34
+ state.content.className = mergeClasses(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);
35
+ state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);
36
+ return state;
34
37
  };
38
+ //# sourceMappingURL=useAttachmentTagItemStyles.styles.raw.js.map
@@ -7,11 +7,13 @@ import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
7
7
  /**
8
8
  * @deprecated use new AttachmentList component exported from \@fluentui-copilot/react-attachments package instead.
9
9
  * Deprecated on 4/9/2024.
10
- */ export const AttachmentTagList = /*#__PURE__*/ React.forwardRef((props, ref)=>{
11
- const state = useAttachmentTagList_unstable(props, ref);
12
- const contextValues = useAttachmentTagListContextValues_unstable(state);
13
- useAttachmentTagListStyles_unstable(state);
14
- useCustomStyleHook('useAttachmentTagListStyles')(state);
15
- return renderAttachmentTagList_unstable(state, contextValues);
10
+ */
11
+ export const AttachmentTagList = /*#__PURE__*/React.forwardRef((props, ref) => {
12
+ const state = useAttachmentTagList_unstable(props, ref);
13
+ const contextValues = useAttachmentTagListContextValues_unstable(state);
14
+ useAttachmentTagListStyles_unstable(state);
15
+ useCustomStyleHook('useAttachmentTagListStyles')(state);
16
+ return renderAttachmentTagList_unstable(state, contextValues);
16
17
  });
17
18
  AttachmentTagList.displayName = 'AttachmentTagList';
19
+ //# sourceMappingURL=AttachmentTagList.js.map
@@ -1 +1,2 @@
1
- export { };
1
+ export {};
2
+ //# sourceMappingURL=AttachmentTagList.types.js.map
@@ -2,3 +2,4 @@ export { AttachmentTagList } from './AttachmentTagList';
2
2
  export { renderAttachmentTagList_unstable } from './renderAttachmentTagList';
3
3
  export { useAttachmentTagList_unstable } from './useAttachmentTagList';
4
4
  export { attachmentTagListClassNames, useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';
5
+ //# sourceMappingURL=index.js.map
@@ -1,12 +1,14 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-components';
3
3
  import { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';
4
4
  /**
5
5
  * Render the final JSX of AttachmentTagList
6
- */ export const renderAttachmentTagList_unstable = (state, contextValues)=>{
7
- assertSlots(state);
8
- return /*#__PURE__*/ _jsx(AttachmentTagListProvider, {
9
- value: contextValues.tagList,
10
- children: /*#__PURE__*/ _jsx(state.root, {})
11
- });
6
+ */
7
+ export const renderAttachmentTagList_unstable = (state, contextValues) => {
8
+ assertSlots(state);
9
+ return /*#__PURE__*/_jsx(AttachmentTagListProvider, {
10
+ value: contextValues.tagList,
11
+ children: /*#__PURE__*/_jsx(state.root, {})
12
+ });
12
13
  };
14
+ //# sourceMappingURL=renderAttachmentTagList.js.map
@@ -7,25 +7,29 @@ import { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluent
7
7
  *
8
8
  * @param props - props from this instance of AttachmentTagList
9
9
  * @param ref - reference to root HTMLElement of AttachmentTagList
10
- */ export const useAttachmentTagList_unstable = (props, ref)=>{
11
- const { onAttachmentTagDismiss } = props;
12
- const focusAttributes = useArrowNavigationGroup({
13
- axis: 'both',
14
- circular: true
15
- });
16
- return {
17
- onAttachmentTagDismiss,
18
- components: {
19
- root: 'div'
20
- },
21
- root: slot.always(getIntrinsicElementProps('div', {
22
- 'aria-label': 'Attachments',
23
- ref,
24
- role: 'menu',
25
- ...focusAttributes,
26
- ...props
27
- }), {
28
- elementType: 'div'
29
- })
30
- };
10
+ */
11
+ export const useAttachmentTagList_unstable = (props, ref) => {
12
+ const {
13
+ onAttachmentTagDismiss
14
+ } = props;
15
+ const focusAttributes = useArrowNavigationGroup({
16
+ axis: 'both',
17
+ circular: true
18
+ });
19
+ return {
20
+ onAttachmentTagDismiss,
21
+ components: {
22
+ root: 'div'
23
+ },
24
+ root: slot.always(getIntrinsicElementProps('div', {
25
+ 'aria-label': 'Attachments',
26
+ ref,
27
+ role: 'menu',
28
+ ...focusAttributes,
29
+ ...props
30
+ }), {
31
+ elementType: 'div'
32
+ })
33
+ };
31
34
  };
35
+ //# sourceMappingURL=useAttachmentTagList.js.map
@@ -1,10 +1,13 @@
1
1
  export function useAttachmentTagListContextValues_unstable(state) {
2
- const { onAttachmentTagDismiss } = state;
3
- // This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
4
- const tagList = {
5
- onAttachmentTagDismiss
6
- };
7
- return {
8
- tagList
9
- };
2
+ const {
3
+ onAttachmentTagDismiss
4
+ } = state;
5
+ // This context is created with "@fluentui/react-context-selector", there is no sense to memoize it
6
+ const tagList = {
7
+ onAttachmentTagDismiss
8
+ };
9
+ return {
10
+ tagList
11
+ };
10
12
  }
13
+ //# sourceMappingURL=useAttachmentTagListContextValues.js.map
@@ -1,21 +1,24 @@
1
1
  import { makeResetStyles, mergeClasses } from '@fluentui/react-components';
2
2
  import { tokens } from '@fluentui-copilot/tokens';
3
3
  export const attachmentTagListClassNames = {
4
- root: 'fai-AttachmentTagList'
4
+ root: 'fai-AttachmentTagList'
5
5
  };
6
6
  const useRootBaseClassName = makeResetStyles({
7
- columnGap: tokens.spacingHorizontalSNudge,
8
- display: 'flex',
9
- flexDirection: 'row',
10
- flexShrink: 0,
11
- flexWrap: 'wrap',
12
- rowGap: tokens.spacingVerticalXS
7
+ columnGap: tokens.spacingHorizontalSNudge,
8
+ display: 'flex',
9
+ flexDirection: 'row',
10
+ flexShrink: 0,
11
+ flexWrap: 'wrap',
12
+ rowGap: tokens.spacingVerticalXS
13
13
  });
14
14
  /**
15
15
  * Apply styling to the AttachmentTagList slots based on the state
16
- */ export const useAttachmentTagListStyles_unstable = (state)=>{
17
- 'use no memo';
18
- const rootBaseClassName = useRootBaseClassName();
19
- state.root.className = mergeClasses(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);
20
- return state;
16
+ */
17
+ export const useAttachmentTagListStyles_unstable = state => {
18
+ 'use no memo';
19
+
20
+ const rootBaseClassName = useRootBaseClassName();
21
+ state.root.className = mergeClasses(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);
22
+ return state;
21
23
  };
24
+ //# sourceMappingURL=useAttachmentTagListStyles.styles.raw.js.map
@@ -6,3 +6,4 @@ export { AttachmentList, attachmentListClassNames, renderAttachmentList_unstable
6
6
  export { AttachmentOverflowMenu, renderAttachmentOverflowMenu_unstable, useAttachmentOverflowMenuContextValues_unstable, useAttachmentOverflowMenu_unstable } from './AttachmentOverflowMenu';
7
7
  export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './AttachmentOverflowMenuButton';
8
8
  export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './AttachmentOverflowMenuItem';
9
+ //# sourceMappingURL=index.js.map
@@ -7,49 +7,56 @@ import { AttachmentTagListContext } from '../../contexts/attachmentTagListContex
7
7
  /**
8
8
  * @internal
9
9
  * Create the slots required to render AttachmentTag or AttachmentTagItem.
10
- */ export function useAttachmentTagSlots(props, ref, options) {
11
- const onAttachmentTagDismiss = useAttachmentTagListContext_unstable((context)=>context.onAttachmentTagDismiss);
12
- const { children, role } = props;
13
- const { elementType } = options;
14
- const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
15
- const hasParentContext = useHasParentContext(AttachmentTagListContext);
16
- const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
17
- const root = slot.always(getIntrinsicElementProps(elementType.root, {
18
- ref,
19
- ...props,
20
- role: rootRole
21
- }), {
22
- elementType: elementType.root
23
- });
24
- root.onClick = mergeCallbacks(root.onClick, (ev)=>onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {
25
- content: children,
26
- media
27
- }));
28
- const media = slot.optional(props.media, {
29
- elementType: elementType.media
30
- });
31
- const content = slot.always(props.content, {
32
- defaultProps: {
33
- children
34
- },
35
- elementType: elementType.content
36
- });
37
- const icon = slot.always(props.icon, {
38
- defaultProps: {
39
- children: /*#__PURE__*/ React.createElement(DismissIcon, null)
40
- },
41
- elementType: elementType.icon
42
- });
43
- return {
44
- components: {
45
- root: elementType.root,
46
- media: elementType.media,
47
- content: elementType.content,
48
- icon: elementType.icon
49
- },
50
- root,
51
- media,
52
- content,
53
- icon
54
- };
10
+ */
11
+ export function useAttachmentTagSlots(props, ref, options) {
12
+ const onAttachmentTagDismiss = useAttachmentTagListContext_unstable(context => context.onAttachmentTagDismiss);
13
+ const {
14
+ children,
15
+ role
16
+ } = props;
17
+ const {
18
+ elementType
19
+ } = options;
20
+ const DismissIcon = bundleIcon(Dismiss20Filled, Dismiss20Regular);
21
+ const hasParentContext = useHasParentContext(AttachmentTagListContext);
22
+ const rootRole = role !== null && role !== void 0 ? role : hasParentContext ? 'menuitem' : undefined;
23
+ const root = slot.always(getIntrinsicElementProps(elementType.root, {
24
+ ref,
25
+ ...props,
26
+ role: rootRole
27
+ }), {
28
+ elementType: elementType.root
29
+ });
30
+ root.onClick = mergeCallbacks(root.onClick, ev => onAttachmentTagDismiss === null || onAttachmentTagDismiss === void 0 ? void 0 : onAttachmentTagDismiss(ev, {
31
+ content: children,
32
+ media
33
+ }));
34
+ const media = slot.optional(props.media, {
35
+ elementType: elementType.media
36
+ });
37
+ const content = slot.always(props.content, {
38
+ defaultProps: {
39
+ children
40
+ },
41
+ elementType: elementType.content
42
+ });
43
+ const icon = slot.always(props.icon, {
44
+ defaultProps: {
45
+ children: /*#__PURE__*/React.createElement(DismissIcon, null)
46
+ },
47
+ elementType: elementType.icon
48
+ });
49
+ return {
50
+ components: {
51
+ root: elementType.root,
52
+ media: elementType.media,
53
+ content: elementType.content,
54
+ icon: elementType.icon
55
+ },
56
+ root,
57
+ media,
58
+ content,
59
+ icon
60
+ };
55
61
  }
62
+ //# sourceMappingURL=useAttachmentTagSlots.js.map