@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.
- package/CHANGELOG.json +4 -4
- package/CHANGELOG.md +5 -5
- package/lib/AgentTag.js +1 -0
- package/lib/Attachment.js +1 -0
- package/lib/AttachmentList.js +1 -0
- package/lib/AttachmentOverflowMenu.js +1 -0
- package/lib/AttachmentOverflowMenuButton.js +1 -0
- package/lib/AttachmentOverflowMenuItem.js +1 -0
- package/lib/AttachmentTag.js +1 -0
- package/lib/AttachmentTagItem.js +1 -0
- package/lib/AttachmentTagList.js +1 -0
- package/lib/components/AgentTag/AgentTag.js +5 -4
- package/lib/components/AgentTag/AgentTag.types.js +2 -1
- package/lib/components/AgentTag/index.js +1 -0
- package/lib/components/AgentTag/renderAgentTag.js +5 -3
- package/lib/components/AgentTag/useAgentTag.js +9 -7
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +57 -52
- package/lib/components/Attachment/Attachment.js +6 -5
- package/lib/components/Attachment/Attachment.types.js +2 -1
- package/lib/components/Attachment/index.js +1 -0
- package/lib/components/Attachment/renderAttachment.js +31 -36
- package/lib/components/Attachment/useAttachment.js +95 -85
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +268 -258
- package/lib/components/AttachmentList/AttachmentList.js +7 -6
- package/lib/components/AttachmentList/AttachmentList.types.js +2 -1
- package/lib/components/AttachmentList/index.js +1 -0
- package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
- package/lib/components/AttachmentList/useAttachmentList.js +124 -113
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +15 -10
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +36 -31
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +9 -8
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +2 -1
- package/lib/components/AttachmentOverflowMenu/index.js +1 -0
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +13 -8
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +15 -9
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +15 -10
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +6 -5
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +2 -1
- package/lib/components/AttachmentOverflowMenuButton/index.js +1 -0
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +10 -11
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +59 -51
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +89 -82
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +5 -4
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +2 -1
- package/lib/components/AttachmentOverflowMenuItem/index.js +1 -0
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +8 -9
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +49 -41
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +49 -43
- package/lib/components/AttachmentTag/AttachmentTag.js +7 -5
- package/lib/components/AttachmentTag/AttachmentTag.types.js +2 -1
- package/lib/components/AttachmentTag/index.js +1 -0
- package/lib/components/AttachmentTag/renderAttachmentTag.js +8 -10
- package/lib/components/AttachmentTag/useAttachmentTag.js +11 -9
- package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +83 -76
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +6 -4
- package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +2 -1
- package/lib/components/AttachmentTagItem/index.js +1 -0
- package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +8 -10
- package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +11 -9
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +27 -23
- package/lib/components/AttachmentTagList/AttachmentTagList.js +8 -6
- package/lib/components/AttachmentTagList/AttachmentTagList.types.js +2 -1
- package/lib/components/AttachmentTagList/index.js +1 -0
- package/lib/components/AttachmentTagList/renderAttachmentTagList.js +9 -7
- package/lib/components/AttachmentTagList/useAttachmentTagList.js +25 -21
- package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js +11 -8
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +15 -12
- package/lib/components/index.js +1 -0
- package/lib/components/utils/useAttachmentTagSlots.js +52 -45
- package/lib/components/utils/useProgressBarStyles.styles.raw.js +36 -34
- package/lib/contexts/attachmentListContext.js +5 -4
- package/lib/contexts/attachmentOverflowMenuContext.js +5 -4
- package/lib/contexts/attachmentTagListContext.js +3 -2
- package/lib/index.js +1 -0
- package/lib-commonjs/AgentTag.js +1 -0
- package/lib-commonjs/Attachment.js +1 -0
- package/lib-commonjs/AttachmentList.js +1 -0
- package/lib-commonjs/AttachmentOverflowMenu.js +1 -0
- package/lib-commonjs/AttachmentOverflowMenuButton.js +1 -0
- package/lib-commonjs/AttachmentOverflowMenuItem.js +1 -0
- package/lib-commonjs/AttachmentTag.js +1 -0
- package/lib-commonjs/AttachmentTagItem.js +1 -0
- package/lib-commonjs/AttachmentTagList.js +1 -0
- package/lib-commonjs/components/AgentTag/AgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/AgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/AgentTag.types.js +1 -0
- package/lib-commonjs/components/AgentTag/index.js +1 -0
- package/lib-commonjs/components/AgentTag/renderAgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js.map +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.js +1 -1
- package/lib-commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js +1 -0
- package/lib-commonjs/components/Attachment/index.js +1 -0
- package/lib-commonjs/components/Attachment/renderAttachment.js +1 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js +1 -1
- package/lib-commonjs/components/Attachment/useAttachment.js.map +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +1 -0
- package/lib-commonjs/components/AttachmentList/index.js +1 -0
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +1 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/AttachmentTag.types.js +1 -0
- package/lib-commonjs/components/AttachmentTag/index.js +1 -0
- package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/renderAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTag.js.map +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/AttachmentTagItem.types.js +1 -0
- package/lib-commonjs/components/AttachmentTagItem/index.js +1 -0
- package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/renderAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItem.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/AttachmentTagList.types.js +1 -0
- package/lib-commonjs/components/AttachmentTagList/index.js +1 -0
- package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/renderAttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagList.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListContextValues.js.map +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/index.js +1 -0
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js +1 -1
- package/lib-commonjs/components/utils/useAttachmentTagSlots.js.map +1 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js +1 -1
- package/lib-commonjs/contexts/attachmentListContext.js.map +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +1 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +1 -1
- package/lib-commonjs/contexts/attachmentTagListContext.js +1 -1
- package/lib-commonjs/contexts/attachmentTagListContext.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/package.json +4 -4
package/CHANGELOG.json
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-attachments",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
6
|
-
"tag": "@fluentui-copilot/react-attachments_v0.12.5-hotfix.
|
|
7
|
-
"version": "0.12.5-hotfix.
|
|
5
|
+
"date": "Fri, 19 Sep 2025 15:10:19 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-attachments_v0.12.5-hotfix.2",
|
|
7
|
+
"version": "0.12.5-hotfix.2",
|
|
8
8
|
"comments": {
|
|
9
9
|
"prerelease": [
|
|
10
10
|
{
|
|
11
11
|
"author": "hochelmartin@gmail.com",
|
|
12
12
|
"package": "@fluentui-copilot/react-attachments",
|
|
13
13
|
"commit": "3e4ebe676646c4c4346dbbab83511f963ffefd85",
|
|
14
|
-
"comment": "release: prepare hotfix 0.26.2-hotfix.
|
|
14
|
+
"comment": "release: prepare hotfix 0.26.2-hotfix.2"
|
|
15
15
|
}
|
|
16
16
|
]
|
|
17
17
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-attachments
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 19 Sep 2025 15:10:19 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [0.12.5-hotfix.
|
|
7
|
+
## [0.12.5-hotfix.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.12.5-hotfix.2)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.12.5..@fluentui-copilot/react-attachments_v0.12.5-hotfix.
|
|
9
|
+
Fri, 19 Sep 2025 15:10:19 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-attachments_v0.12.5..@fluentui-copilot/react-attachments_v0.12.5-hotfix.2)
|
|
11
11
|
|
|
12
12
|
### Changes
|
|
13
13
|
|
|
14
|
-
- release: prepare hotfix 0.26.2-hotfix.
|
|
14
|
+
- release: prepare hotfix 0.26.2-hotfix.2 ([PR #3284](https://github.com/microsoft/fluentai/pull/3284) by hochelmartin@gmail.com)
|
|
15
15
|
|
|
16
16
|
## [0.12.5](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-attachments_v0.12.5)
|
|
17
17
|
|
package/lib/AgentTag.js
CHANGED
package/lib/Attachment.js
CHANGED
package/lib/AttachmentList.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { AttachmentOverflowMenuButton, attachmentOverflowMenuButtonClassNames, renderAttachmentOverflowMenuButton_unstable, useAttachmentOverflowMenuButtonStyles_unstable, useAttachmentOverflowMenuButton_unstable } from './components/AttachmentOverflowMenuButton/index';
|
|
2
|
+
//# sourceMappingURL=AttachmentOverflowMenuButton.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { AttachmentOverflowMenuItem, attachmentOverflowMenuItemClassNames, renderAttachmentOverflowMenuItem_unstable, useAttachmentOverflowMenuItemStyles_unstable, useAttachmentOverflowMenuItem_unstable } from './components/AttachmentOverflowMenuItem/index';
|
|
2
|
+
//# sourceMappingURL=AttachmentOverflowMenuItem.js.map
|
package/lib/AttachmentTag.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export { ATTACHMENTTAG_MAXWIDTH, AttachmentTag, attachmentTagClassNames, renderAttachmentTag_unstable, useAttachmentTagStyles_unstable, useAttachmentTag_unstable, useContentBaseClassName, useIconBaseClassName, useMediaBaseClassName } from './components/AttachmentTag/index';
|
|
2
|
+
//# sourceMappingURL=AttachmentTag.js.map
|
package/lib/AttachmentTagItem.js
CHANGED
package/lib/AttachmentTagList.js
CHANGED
|
@@ -3,9 +3,10 @@ import { useAgentTag_unstable } from './useAgentTag';
|
|
|
3
3
|
import { renderAgentTag_unstable } from './renderAgentTag';
|
|
4
4
|
import { useAgentTagStyles_unstable } from './useAgentTagStyles.styles';
|
|
5
5
|
// AgentTag component - TODO: add more docs
|
|
6
|
-
export const AgentTag = /*#__PURE__*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
export const AgentTag = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const state = useAgentTag_unstable(props, ref);
|
|
8
|
+
useAgentTagStyles_unstable(state);
|
|
9
|
+
return renderAgentTag_unstable(state);
|
|
10
10
|
});
|
|
11
11
|
AgentTag.displayName = 'AgentTag';
|
|
12
|
+
//# sourceMappingURL=AgentTag.js.map
|
|
@@ -2,3 +2,4 @@ export { AgentTag } from './AgentTag';
|
|
|
2
2
|
export { renderAgentTag_unstable } from './renderAgentTag';
|
|
3
3
|
export { useAgentTag_unstable } from './useAgentTag';
|
|
4
4
|
export { agentTagClassNames, useAgentTagStyles_unstable } from './useAgentTagStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { renderAttachment_unstable } from '../Attachment';
|
|
2
2
|
/**
|
|
3
3
|
* Render the final JSX of AgentTag
|
|
4
|
-
*/
|
|
5
|
-
|
|
4
|
+
*/
|
|
5
|
+
export const renderAgentTag_unstable = state => {
|
|
6
|
+
return renderAttachment_unstable(state);
|
|
6
7
|
};
|
|
8
|
+
//# sourceMappingURL=renderAgentTag.js.map
|
|
@@ -8,11 +8,13 @@ import { useAttachment_unstable } from '..';
|
|
|
8
8
|
*
|
|
9
9
|
* @param props - props from this instance of AgentTag
|
|
10
10
|
* @param ref - reference to root HTMLElement of AgentTag
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
*/
|
|
12
|
+
export const useAgentTag_unstable = (props, ref) => {
|
|
13
|
+
const state = useAttachment_unstable({
|
|
14
|
+
...props,
|
|
15
|
+
dismissOnly: true,
|
|
16
|
+
designVersion: 'next'
|
|
17
|
+
}, ref);
|
|
18
|
+
return state;
|
|
18
19
|
};
|
|
20
|
+
//# sourceMappingURL=useAgentTag.js.map
|
|
@@ -2,65 +2,70 @@ import { makeStyles, mergeClasses, typographyStyles } from '@fluentui/react-comp
|
|
|
2
2
|
import { useAttachmentStyles_unstable } from '..';
|
|
3
3
|
import { tokens } from '@fluentui-copilot/tokens';
|
|
4
4
|
export const agentTagClassNames = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
root: 'fai-AgentTag',
|
|
6
|
+
primaryAction: 'fai-AgentTag__primaryAction',
|
|
7
|
+
dismissIcon: 'fai-AgentTag__dismissIcon',
|
|
8
|
+
dismissButton: 'fai-AgentTag__dismissButton',
|
|
9
|
+
media: 'fai-AgentTag__media',
|
|
10
|
+
content: 'fai-AgentTag__content',
|
|
11
|
+
progress: 'fai-AgentTag__progress'
|
|
12
12
|
};
|
|
13
13
|
const useMediaStyles = makeStyles({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
canvas: {
|
|
15
|
+
width: '24px',
|
|
16
|
+
height: '24px'
|
|
17
|
+
},
|
|
18
|
+
sidecar: {
|
|
19
|
+
width: '20px',
|
|
20
|
+
height: '20px'
|
|
21
|
+
}
|
|
22
22
|
});
|
|
23
23
|
const useContentStyles = makeStyles({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
canvas: {
|
|
25
|
+
...typographyStyles.subtitle2,
|
|
26
|
+
color: tokens.colorNeutralForeground2
|
|
27
|
+
},
|
|
28
|
+
sidecar: {
|
|
29
|
+
...typographyStyles.body1Strong,
|
|
30
|
+
color: tokens.colorNeutralForeground2
|
|
31
|
+
}
|
|
32
32
|
});
|
|
33
33
|
const useDismissButtonStyles = makeStyles({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
34
|
+
canvas: {
|
|
35
|
+
borderRadius: tokens.borderRadius2XL,
|
|
36
|
+
paddingLeft: tokens.spacingHorizontalL,
|
|
37
|
+
paddingRight: tokens.spacingHorizontalM
|
|
38
|
+
},
|
|
39
|
+
sidecar: {
|
|
40
|
+
paddingLeft: tokens.spacingHorizontalM,
|
|
41
|
+
paddingRight: tokens.spacingHorizontalS,
|
|
42
|
+
borderRadius: tokens.borderRadiusXLarge
|
|
43
|
+
}
|
|
44
44
|
});
|
|
45
45
|
/**
|
|
46
46
|
* Apply styling to the AgentTag slots based on the state
|
|
47
|
-
*/
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
*/
|
|
48
|
+
export const useAgentTagStyles_unstable = state => {
|
|
49
|
+
'use no memo';
|
|
50
|
+
|
|
51
|
+
const {
|
|
52
|
+
mode
|
|
53
|
+
} = state;
|
|
54
|
+
const contentStyles = useContentStyles();
|
|
55
|
+
const dismissButtonStyles = useDismissButtonStyles();
|
|
56
|
+
const mediaStyles = useMediaStyles();
|
|
57
|
+
state.root.className = mergeClasses(agentTagClassNames.root, state.root.className);
|
|
58
|
+
state.primaryAction.className = mergeClasses(agentTagClassNames.primaryAction, state.primaryAction.className);
|
|
59
|
+
state.dismissIcon.className = mergeClasses(agentTagClassNames.dismissIcon, state.dismissIcon.className);
|
|
60
|
+
state.dismissButton.className = mergeClasses(agentTagClassNames.dismissButton, dismissButtonStyles[mode], state.dismissButton.className);
|
|
61
|
+
if (state.media) {
|
|
62
|
+
state.media.className = mergeClasses(agentTagClassNames.media, mediaStyles[mode], state.media.className);
|
|
63
|
+
}
|
|
64
|
+
state.content.className = mergeClasses(agentTagClassNames.content, contentStyles[mode], state.content.className);
|
|
65
|
+
if (state.progress) {
|
|
66
|
+
state.progress.className = mergeClasses(agentTagClassNames.progress, state.progress.className);
|
|
67
|
+
}
|
|
68
|
+
useAttachmentStyles_unstable(state);
|
|
69
|
+
return state;
|
|
66
70
|
};
|
|
71
|
+
//# sourceMappingURL=useAgentTagStyles.styles.raw.js.map
|
|
@@ -4,10 +4,11 @@ import { renderAttachment_unstable } from './renderAttachment';
|
|
|
4
4
|
import { useAttachmentStyles_unstable } from './useAttachmentStyles.styles';
|
|
5
5
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
6
6
|
// Attachment component - TODO: add more docs
|
|
7
|
-
export const Attachment = /*#__PURE__*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
export const Attachment = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
|
+
const state = useAttachment_unstable(props, ref);
|
|
9
|
+
useAttachmentStyles_unstable(state);
|
|
10
|
+
useCustomStyleHook('useAttachmentStyles')(state);
|
|
11
|
+
return renderAttachment_unstable(state);
|
|
12
12
|
});
|
|
13
13
|
Attachment.displayName = 'Attachment';
|
|
14
|
+
//# sourceMappingURL=Attachment.js.map
|
|
@@ -2,3 +2,4 @@ export { Attachment } from './Attachment';
|
|
|
2
2
|
export { renderAttachment_unstable } from './renderAttachment';
|
|
3
3
|
export { useAttachment_unstable } from './useAttachment';
|
|
4
4
|
export { attachmentClassNames, useAttachmentStyles_unstable, useOverflowStyles } from './useAttachmentStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { OverflowItem, assertSlots } from '@fluentui/react-components';
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of Attachment
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
*/
|
|
6
|
+
export const renderAttachment_unstable = state => {
|
|
7
|
+
const {
|
|
8
|
+
id,
|
|
9
|
+
shouldUseOverflow,
|
|
10
|
+
designVersion,
|
|
11
|
+
dismissOnly
|
|
12
|
+
} = state;
|
|
13
|
+
const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);
|
|
14
|
+
return shouldUseOverflow ? /*#__PURE__*/_jsx(OverflowItem, {
|
|
15
|
+
id: id,
|
|
16
|
+
children: attachment
|
|
17
|
+
}, id) : attachment;
|
|
12
18
|
};
|
|
13
|
-
const renderAttachment =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
]
|
|
23
|
-
}),
|
|
24
|
-
/*#__PURE__*/ _jsx(state.dismissButton, {
|
|
25
|
-
children: /*#__PURE__*/ _jsx(state.dismissIcon, {})
|
|
26
|
-
})
|
|
27
|
-
]
|
|
28
|
-
});
|
|
19
|
+
const renderAttachment = state => {
|
|
20
|
+
assertSlots(state);
|
|
21
|
+
return /*#__PURE__*/_jsxs(state.root, {
|
|
22
|
+
children: [/*#__PURE__*/_jsxs(state.primaryAction, {
|
|
23
|
+
children: [state.media && !state.imageOnly && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), state.progress && /*#__PURE__*/_jsx(state.progress, {})]
|
|
24
|
+
}), /*#__PURE__*/_jsx(state.dismissButton, {
|
|
25
|
+
children: /*#__PURE__*/_jsx(state.dismissIcon, {})
|
|
26
|
+
})]
|
|
27
|
+
});
|
|
29
28
|
};
|
|
30
|
-
const renderDismissOnly =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
state.progress && /*#__PURE__*/ _jsx(state.progress, {}),
|
|
38
|
-
/*#__PURE__*/ _jsx(state.dismissIcon, {})
|
|
39
|
-
]
|
|
40
|
-
})
|
|
41
|
-
});
|
|
29
|
+
const renderDismissOnly = state => {
|
|
30
|
+
assertSlots(state);
|
|
31
|
+
return /*#__PURE__*/_jsx(state.root, {
|
|
32
|
+
children: /*#__PURE__*/_jsxs(state.dismissButton, {
|
|
33
|
+
children: [state.media && !state.imageOnly && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.content, {}), state.progress && /*#__PURE__*/_jsx(state.progress, {}), /*#__PURE__*/_jsx(state.dismissIcon, {})]
|
|
34
|
+
})
|
|
35
|
+
});
|
|
42
36
|
};
|
|
37
|
+
//# sourceMappingURL=renderAttachment.js.map
|
|
@@ -11,90 +11,100 @@ import { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provid
|
|
|
11
11
|
*
|
|
12
12
|
* @param props - props from this instance of Attachment
|
|
13
13
|
* @param ref - reference to root HTMLElement of Attachment
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
*/
|
|
15
|
+
export const useAttachment_unstable = (props, ref) => {
|
|
16
|
+
const {
|
|
17
|
+
children,
|
|
18
|
+
imageOnly,
|
|
19
|
+
size = 'medium',
|
|
20
|
+
dismissOnly = false
|
|
21
|
+
} = props;
|
|
22
|
+
const {
|
|
23
|
+
onAttachmentDismiss,
|
|
24
|
+
shouldUseOverflow
|
|
25
|
+
} = useAttachmentListContext_unstable(context => context);
|
|
26
|
+
const attachmentId = useId('attachment-', props.id);
|
|
27
|
+
const isLoading = !!props.progress;
|
|
28
|
+
const mode = useCopilotMode(props.mode);
|
|
29
|
+
const designVersion = useDesignVersion(props.designVersion);
|
|
30
|
+
const root = slot.always(getIntrinsicElementProps('div', {
|
|
31
|
+
ref,
|
|
32
|
+
...props,
|
|
33
|
+
id: attachmentId
|
|
34
|
+
}), {
|
|
35
|
+
elementType: 'div'
|
|
36
|
+
});
|
|
37
|
+
const primaryAction = slot.always(props.primaryAction, {
|
|
38
|
+
defaultProps: {
|
|
39
|
+
as: dismissOnly ? 'span' : undefined
|
|
40
|
+
},
|
|
41
|
+
elementType: 'button'
|
|
42
|
+
});
|
|
43
|
+
const dismissButton = slot.always(props.dismissButton, {
|
|
44
|
+
defaultProps: {
|
|
45
|
+
'aria-label': 'Remove attachment'
|
|
46
|
+
},
|
|
47
|
+
elementType: 'button'
|
|
48
|
+
});
|
|
49
|
+
dismissButton.onClick = mergeCallbacks(dismissButton.onClick, ev => {
|
|
50
|
+
onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
|
|
51
|
+
content: children,
|
|
52
|
+
media,
|
|
53
|
+
id: attachmentId
|
|
27
54
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
root,
|
|
83
|
-
primaryAction,
|
|
84
|
-
dismissButton,
|
|
85
|
-
media,
|
|
86
|
-
content,
|
|
87
|
-
dismissIcon,
|
|
88
|
-
progress,
|
|
89
|
-
imageOnly,
|
|
90
|
-
isLoading,
|
|
91
|
-
shouldUseOverflow,
|
|
92
|
-
mode,
|
|
93
|
-
designVersion,
|
|
94
|
-
dismissOnly
|
|
95
|
-
};
|
|
96
|
-
if (state.primaryAction.as === 'span') {
|
|
97
|
-
state.components.primaryAction = 'span';
|
|
98
|
-
}
|
|
99
|
-
return state;
|
|
55
|
+
});
|
|
56
|
+
const media = slot.optional(props.media, {
|
|
57
|
+
elementType: 'span'
|
|
58
|
+
});
|
|
59
|
+
const content = slot.always(props.content, {
|
|
60
|
+
defaultProps: {
|
|
61
|
+
children: props.children
|
|
62
|
+
},
|
|
63
|
+
elementType: 'span'
|
|
64
|
+
});
|
|
65
|
+
const dismissIcon = slot.always(props.dismissIcon, {
|
|
66
|
+
defaultProps: {
|
|
67
|
+
children: size === 'small' ? /*#__PURE__*/React.createElement(Dismiss12Regular, null) : /*#__PURE__*/React.createElement(Dismiss20Regular, null)
|
|
68
|
+
},
|
|
69
|
+
elementType: 'span'
|
|
70
|
+
});
|
|
71
|
+
const progress = slot.optional(props.progress, {
|
|
72
|
+
defaultProps: {
|
|
73
|
+
shape: 'square',
|
|
74
|
+
thickness: 'large',
|
|
75
|
+
'aria-labelledby': props.id
|
|
76
|
+
},
|
|
77
|
+
elementType: ProgressBar
|
|
78
|
+
});
|
|
79
|
+
const state = {
|
|
80
|
+
id: attachmentId,
|
|
81
|
+
size,
|
|
82
|
+
components: {
|
|
83
|
+
root: 'div',
|
|
84
|
+
primaryAction: 'button',
|
|
85
|
+
dismissButton: 'button',
|
|
86
|
+
media: 'span',
|
|
87
|
+
content: 'span',
|
|
88
|
+
dismissIcon: 'span',
|
|
89
|
+
progress: ProgressBar
|
|
90
|
+
},
|
|
91
|
+
root,
|
|
92
|
+
primaryAction,
|
|
93
|
+
dismissButton,
|
|
94
|
+
media,
|
|
95
|
+
content,
|
|
96
|
+
dismissIcon,
|
|
97
|
+
progress,
|
|
98
|
+
imageOnly,
|
|
99
|
+
isLoading,
|
|
100
|
+
shouldUseOverflow,
|
|
101
|
+
mode,
|
|
102
|
+
designVersion,
|
|
103
|
+
dismissOnly
|
|
104
|
+
};
|
|
105
|
+
if (state.primaryAction.as === 'span') {
|
|
106
|
+
state.components.primaryAction = 'span';
|
|
107
|
+
}
|
|
108
|
+
return state;
|
|
100
109
|
};
|
|
110
|
+
//# sourceMappingURL=useAttachment.js.map
|