@fluentui-copilot/react-attachments 0.0.0-nightly-20251006-0406-b5da4f6a.1 → 0.0.0-nightly-20251010-0406-7df7c6d1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +3 -3
- package/CHANGELOG.md +4 -4
- package/package.json +8 -8
- package/dist/index.d.ts +0 -379
- package/lib/AgentTag.js +0 -1
- package/lib/AgentTag.js.map +0 -1
- package/lib/Attachment.js +0 -1
- package/lib/Attachment.js.map +0 -1
- package/lib/AttachmentList.js +0 -1
- package/lib/AttachmentList.js.map +0 -1
- package/lib/AttachmentOverflowMenu.js +0 -1
- package/lib/AttachmentOverflowMenu.js.map +0 -1
- package/lib/AttachmentOverflowMenuButton.js +0 -1
- package/lib/AttachmentOverflowMenuButton.js.map +0 -1
- package/lib/AttachmentOverflowMenuItem.js +0 -1
- package/lib/AttachmentOverflowMenuItem.js.map +0 -1
- package/lib/components/AgentTag/AgentTag.js +0 -11
- package/lib/components/AgentTag/AgentTag.js.map +0 -1
- package/lib/components/AgentTag/AgentTag.types.js +0 -3
- package/lib/components/AgentTag/AgentTag.types.js.map +0 -1
- package/lib/components/AgentTag/index.js +0 -4
- package/lib/components/AgentTag/index.js.map +0 -1
- package/lib/components/AgentTag/renderAgentTag.js +0 -6
- package/lib/components/AgentTag/renderAgentTag.js.map +0 -1
- package/lib/components/AgentTag/useAgentTag.js +0 -18
- package/lib/components/AgentTag/useAgentTag.js.map +0 -1
- package/lib/components/AgentTag/useAgentTagStyles.styles.js +0 -95
- package/lib/components/AgentTag/useAgentTagStyles.styles.js.map +0 -1
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +0 -66
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +0 -1
- package/lib/components/Attachment/Attachment.js +0 -13
- package/lib/components/Attachment/Attachment.js.map +0 -1
- package/lib/components/Attachment/Attachment.types.js +0 -3
- package/lib/components/Attachment/Attachment.types.js.map +0 -1
- package/lib/components/Attachment/index.js +0 -4
- package/lib/components/Attachment/index.js.map +0 -1
- package/lib/components/Attachment/renderAttachment.js +0 -42
- package/lib/components/Attachment/renderAttachment.js.map +0 -1
- package/lib/components/Attachment/useAttachment.js +0 -103
- package/lib/components/Attachment/useAttachment.js.map +0 -1
- package/lib/components/Attachment/useAttachmentStyles.styles.js +0 -348
- package/lib/components/Attachment/useAttachmentStyles.styles.js.map +0 -1
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +0 -328
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +0 -1
- package/lib/components/AttachmentList/AttachmentList.js +0 -14
- package/lib/components/AttachmentList/AttachmentList.js.map +0 -1
- package/lib/components/AttachmentList/AttachmentList.types.js +0 -1
- package/lib/components/AttachmentList/AttachmentList.types.js.map +0 -1
- package/lib/components/AttachmentList/index.js +0 -4
- package/lib/components/AttachmentList/index.js.map +0 -1
- package/lib/components/AttachmentList/renderAttachmentList.js +0 -31
- package/lib/components/AttachmentList/renderAttachmentList.js.map +0 -1
- package/lib/components/AttachmentList/useAttachmentList.js +0 -134
- package/lib/components/AttachmentList/useAttachmentList.js.map +0 -1
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +0 -12
- package/lib/components/AttachmentList/useAttachmentListContextValues.js.map +0 -1
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.js +0 -48
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.js.map +0 -1
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +0 -44
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +0 -1
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +0 -14
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +0 -1
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -1
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +0 -1
- package/lib/components/AttachmentOverflowMenu/index.js +0 -4
- package/lib/components/AttachmentOverflowMenu/index.js.map +0 -1
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +0 -13
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +0 -1
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +0 -18
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +0 -1
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +0 -12
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +0 -12
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -3
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuButton/index.js +0 -4
- package/lib/components/AttachmentOverflowMenuButton/index.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +0 -15
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +0 -69
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js +0 -116
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +0 -102
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +0 -10
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -3
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuItem/index.js +0 -4
- package/lib/components/AttachmentOverflowMenuItem/index.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +0 -13
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +0 -56
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js +0 -84
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +0 -1
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +0 -59
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +0 -1
- package/lib/components/index.js +0 -5
- package/lib/components/index.js.map +0 -1
- package/lib/components/utils/useProgressBarStyles.styles.js +0 -54
- package/lib/components/utils/useProgressBarStyles.styles.js.map +0 -1
- package/lib/components/utils/useProgressBarStyles.styles.raw.js +0 -42
- package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +0 -1
- package/lib/contexts/attachmentListContext.js +0 -9
- package/lib/contexts/attachmentListContext.js.map +0 -1
- package/lib/contexts/attachmentOverflowMenuContext.js +0 -9
- package/lib/contexts/attachmentOverflowMenuContext.js.map +0 -1
- package/lib/index.js +0 -8
- package/lib/index.js.map +0 -1
- package/lib-commonjs/AgentTag.js +0 -28
- package/lib-commonjs/AgentTag.js.map +0 -1
- package/lib-commonjs/Attachment.js +0 -31
- package/lib-commonjs/Attachment.js.map +0 -1
- package/lib-commonjs/AttachmentList.js +0 -28
- package/lib-commonjs/AttachmentList.js.map +0 -1
- package/lib-commonjs/AttachmentOverflowMenu.js +0 -25
- package/lib-commonjs/AttachmentOverflowMenu.js.map +0 -1
- package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -28
- package/lib-commonjs/AttachmentOverflowMenuButton.js.map +0 -1
- package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -28
- package/lib-commonjs/AttachmentOverflowMenuItem.js.map +0 -1
- package/lib-commonjs/components/AgentTag/AgentTag.js +0 -21
- package/lib-commonjs/components/AgentTag/AgentTag.js.map +0 -1
- package/lib-commonjs/components/AgentTag/AgentTag.types.js +0 -6
- package/lib-commonjs/components/AgentTag/AgentTag.types.js.map +0 -1
- package/lib-commonjs/components/AgentTag/index.js +0 -31
- package/lib-commonjs/components/AgentTag/index.js.map +0 -1
- package/lib-commonjs/components/AgentTag/renderAgentTag.js +0 -14
- package/lib-commonjs/components/AgentTag/renderAgentTag.js.map +0 -1
- package/lib-commonjs/components/AgentTag/useAgentTag.js +0 -19
- package/lib-commonjs/components/AgentTag/useAgentTag.js.map +0 -1
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js +0 -145
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js +0 -82
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/Attachment/Attachment.js +0 -23
- package/lib-commonjs/components/Attachment/Attachment.js.map +0 -1
- package/lib-commonjs/components/Attachment/Attachment.types.js +0 -6
- package/lib-commonjs/components/Attachment/Attachment.types.js.map +0 -1
- package/lib-commonjs/components/Attachment/index.js +0 -34
- package/lib-commonjs/components/Attachment/index.js.map +0 -1
- package/lib-commonjs/components/Attachment/renderAttachment.js +0 -50
- package/lib-commonjs/components/Attachment/renderAttachment.js.map +0 -1
- package/lib-commonjs/components/Attachment/useAttachment.js +0 -105
- package/lib-commonjs/components/Attachment/useAttachment.js.map +0 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js +0 -550
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js +0 -347
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.js +0 -25
- package/lib-commonjs/components/AttachmentList/AttachmentList.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js +0 -4
- package/lib-commonjs/components/AttachmentList/AttachmentList.types.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/index.js +0 -31
- package/lib-commonjs/components/AttachmentList/index.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js +0 -39
- package/lib-commonjs/components/AttachmentList/renderAttachmentList.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js +0 -137
- package/lib-commonjs/components/AttachmentList/useAttachmentList.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js +0 -22
- package/lib-commonjs/components/AttachmentList/useAttachmentListContextValues.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js +0 -67
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js +0 -60
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +0 -24
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +0 -4
- package/lib-commonjs/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -28
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +0 -21
- package/lib-commonjs/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +0 -21
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +0 -22
- package/lib-commonjs/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +0 -23
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +0 -6
- package/lib-commonjs/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -31
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +0 -23
- package/lib-commonjs/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +0 -72
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js +0 -178
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +0 -118
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +0 -21
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +0 -6
- package/lib-commonjs/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -31
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +0 -21
- package/lib-commonjs/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +0 -59
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js +0 -109
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.js.map +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +0 -75
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/components/index.js +0 -92
- package/lib-commonjs/components/index.js.map +0 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.js +0 -103
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.js.map +0 -1
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js +0 -50
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +0 -1
- package/lib-commonjs/contexts/attachmentListContext.js +0 -30
- package/lib-commonjs/contexts/attachmentListContext.js.map +0 -1
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js +0 -30
- package/lib-commonjs/contexts/attachmentOverflowMenuContext.js.map +0 -1
- package/lib-commonjs/index.js +0 -122
- package/lib-commonjs/index.js.map +0 -1
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
function _export(target, all) {
|
|
6
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: all[name]
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
_export(exports, {
|
|
12
|
-
Attachment: function() {
|
|
13
|
-
return _Attachment.Attachment;
|
|
14
|
-
},
|
|
15
|
-
attachmentClassNames: function() {
|
|
16
|
-
return _useAttachmentStylesstyles.attachmentClassNames;
|
|
17
|
-
},
|
|
18
|
-
renderAttachment_unstable: function() {
|
|
19
|
-
return _renderAttachment.renderAttachment_unstable;
|
|
20
|
-
},
|
|
21
|
-
useAttachmentStyles_unstable: function() {
|
|
22
|
-
return _useAttachmentStylesstyles.useAttachmentStyles_unstable;
|
|
23
|
-
},
|
|
24
|
-
useAttachment_unstable: function() {
|
|
25
|
-
return _useAttachment.useAttachment_unstable;
|
|
26
|
-
},
|
|
27
|
-
useOverflowStyles: function() {
|
|
28
|
-
return _useAttachmentStylesstyles.useOverflowStyles;
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
const _Attachment = require("./Attachment");
|
|
32
|
-
const _renderAttachment = require("./renderAttachment");
|
|
33
|
-
const _useAttachment = require("./useAttachment");
|
|
34
|
-
const _useAttachmentStylesstyles = require("./useAttachmentStyles.styles");
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { Attachment } from './Attachment';\nexport type { AttachmentProps, AttachmentSlots, AttachmentState } from './Attachment.types';\nexport { renderAttachment_unstable } from './renderAttachment';\nexport { useAttachment_unstable } from './useAttachment';\nexport { attachmentClassNames, useAttachmentStyles_unstable, useOverflowStyles } from './useAttachmentStyles.styles';\n"],"names":["Attachment","attachmentClassNames","renderAttachment_unstable","useAttachmentStyles_unstable","useAttachment_unstable","useOverflowStyles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,UAAU;eAAVA,sBAAU;;IAIVC,oBAAoB;eAApBA,+CAAoB;;IAFpBC,yBAAyB;eAAzBA,2CAAyB;;IAEHC,4BAA4B;eAA5BA,uDAA4B;;IADlDC,sBAAsB;eAAtBA,qCAAsB;;IAC8BC,iBAAiB;eAAjBA,4CAAiB;;;4BAJnD;kCAEe;+BACH;2CAC+C"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "renderAttachment_unstable", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return renderAttachment_unstable;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
-
const renderAttachment_unstable = (state)=>{
|
|
14
|
-
const { id, shouldUseOverflow, designVersion, dismissOnly } = state;
|
|
15
|
-
const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);
|
|
16
|
-
return shouldUseOverflow ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcomponents.OverflowItem, {
|
|
17
|
-
id: id,
|
|
18
|
-
children: attachment
|
|
19
|
-
}, id) : attachment;
|
|
20
|
-
};
|
|
21
|
-
const renderAttachment = (state)=>{
|
|
22
|
-
(0, _reactcomponents.assertSlots)(state);
|
|
23
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
24
|
-
children: [
|
|
25
|
-
/*#__PURE__*/ (0, _jsxruntime.jsxs)(state.primaryAction, {
|
|
26
|
-
children: [
|
|
27
|
-
state.media && !state.imageOnly && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {}),
|
|
28
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
|
|
29
|
-
state.progress && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.progress, {})
|
|
30
|
-
]
|
|
31
|
-
}),
|
|
32
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(state.dismissButton, {
|
|
33
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(state.dismissIcon, {})
|
|
34
|
-
})
|
|
35
|
-
]
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
const renderDismissOnly = (state)=>{
|
|
39
|
-
(0, _reactcomponents.assertSlots)(state);
|
|
40
|
-
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {
|
|
41
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.dismissButton, {
|
|
42
|
-
children: [
|
|
43
|
-
state.media && !state.imageOnly && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.media, {}),
|
|
44
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(state.content, {}),
|
|
45
|
-
state.progress && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.progress, {}),
|
|
46
|
-
/*#__PURE__*/ (0, _jsxruntime.jsx)(state.dismissIcon, {})
|
|
47
|
-
]
|
|
48
|
-
})
|
|
49
|
-
});
|
|
50
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachment.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { OverflowItem, assertSlots } from '@fluentui/react-components';\nimport type { AttachmentState, AttachmentSlots } from './Attachment.types';\n\n/**\n * Render the final JSX of Attachment\n */\nexport const renderAttachment_unstable = (state: AttachmentState) => {\n const { id, shouldUseOverflow, designVersion, dismissOnly } = state;\n\n const attachment = designVersion === 'next' && dismissOnly ? renderDismissOnly(state) : renderAttachment(state);\n\n return shouldUseOverflow ? (\n <OverflowItem id={id} key={id}>\n {attachment}\n </OverflowItem>\n ) : (\n attachment\n );\n};\n\nconst renderAttachment = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n </state.primaryAction>\n <state.dismissButton>\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n\nconst renderDismissOnly = (state: AttachmentState) => {\n assertSlots<AttachmentSlots>(state);\n\n return (\n <state.root>\n <state.dismissButton>\n {state.media && !state.imageOnly && <state.media />}\n <state.content />\n {state.progress && <state.progress />}\n <state.dismissIcon />\n </state.dismissButton>\n </state.root>\n );\n};\n"],"names":["renderAttachment_unstable","state","id","shouldUseOverflow","designVersion","dismissOnly","attachment","renderDismissOnly","renderAttachment","_jsx","OverflowItem","assertSlots","_jsxs","root","primaryAction","media","imageOnly","content","progress","dismissButton","dismissIcon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;iCAE0C;AAMnC,MAAMA,4BAA4B,CAACC;IACxC,MAAM,EAAEC,EAAE,EAAEC,iBAAiB,EAAEC,aAAa,EAAEC,WAAW,EAAE,GAAGJ;IAE9D,MAAMK,aAAaF,kBAAkB,UAAUC,cAAcE,kBAAkBN,SAASO,iBAAiBP;IAEzG,OAAOE,oBAAAA,WAAAA,GACLM,IAAAA,eAAA,EAACC,6BAAAA,EAAAA;QAAaR,IAAIA;kBACfI;OADwBJ,MAI3BI;AAEJ;AAEA,MAAME,mBAAmB,CAACP;IACxBU,IAAAA,4BAAAA,EAA6BV;IAE7B,OAAA,WAAA,GACEW,IAAAA,gBAAA,EAACX,MAAMY,IAAI,EAAA;;0BACTD,IAAAA,gBAAA,EAACX,MAAMa,aAAa,EAAA;;oBACjBb,MAAMc,KAAK,IAAI,CAACd,MAAMe,SAAS,IAAA,WAAA,GAAIP,IAAAA,eAAA,EAACR,MAAMc,KAAK,EAAA,CAAA;kCAChDN,IAAAA,eAAA,EAACR,MAAMgB,OAAO,EAAA,CAAA;oBACbhB,MAAMiB,QAAQ,IAAA,WAAA,GAAIT,IAAAA,eAAA,EAACR,MAAMiB,QAAQ,EAAA,CAAA;;;0BAEpCT,IAAAA,eAAA,EAACR,MAAMkB,aAAa,EAAA;0BAClB,WAAA,GAAAV,IAAAA,eAAA,EAACR,MAAMmB,WAAW,EAAA,CAAA;;;;AAI1B;AAEA,MAAMb,oBAAoB,CAACN;IACzBU,IAAAA,4BAAAA,EAA6BV;IAE7B,OAAA,WAAA,GACEQ,IAAAA,eAAA,EAACR,MAAMY,IAAI,EAAA;kBACT,WAAA,GAAAD,IAAAA,gBAAA,EAACX,MAAMkB,aAAa,EAAA;;gBACjBlB,MAAMc,KAAK,IAAI,CAACd,MAAMe,SAAS,IAAA,WAAA,GAAIP,IAAAA,eAAA,EAACR,MAAMc,KAAK,EAAA,CAAA;8BAChDN,IAAAA,eAAA,EAACR,MAAMgB,OAAO,EAAA,CAAA;gBACbhB,MAAMiB,QAAQ,IAAA,WAAA,GAAIT,IAAAA,eAAA,EAACR,MAAMiB,QAAQ,EAAA,CAAA;8BAClCT,IAAAA,eAAA,EAACR,MAAMmB,WAAW,EAAA,CAAA;;;;AAI1B"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
5
|
-
Object.defineProperty(exports, "useAttachment_unstable", {
|
|
6
|
-
enumerable: true,
|
|
7
|
-
get: function() {
|
|
8
|
-
return useAttachment_unstable;
|
|
9
|
-
}
|
|
10
|
-
});
|
|
11
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
-
const _reactcomponents = require("@fluentui/react-components");
|
|
14
|
-
const _reacticons = require("@fluentui/react-icons");
|
|
15
|
-
const _attachmentListContext = require("../../contexts/attachmentListContext");
|
|
16
|
-
const _reactprovider = require("@fluentui-copilot/react-provider");
|
|
17
|
-
const useAttachment_unstable = (props, ref)=>{
|
|
18
|
-
const { children, imageOnly, size = 'medium', dismissOnly = false } = props;
|
|
19
|
-
const { onAttachmentDismiss, shouldUseOverflow } = (0, _attachmentListContext.useAttachmentListContext_unstable)((context)=>context);
|
|
20
|
-
const attachmentId = (0, _reactcomponents.useId)('attachment-', props.id);
|
|
21
|
-
const isLoading = !!props.progress;
|
|
22
|
-
const mode = (0, _reactprovider.useCopilotMode)(props.mode);
|
|
23
|
-
const designVersion = (0, _reactprovider.useDesignVersion)(props.designVersion);
|
|
24
|
-
const root = _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
|
|
25
|
-
ref,
|
|
26
|
-
...props,
|
|
27
|
-
id: attachmentId
|
|
28
|
-
}, [
|
|
29
|
-
'content'
|
|
30
|
-
]), {
|
|
31
|
-
elementType: 'div'
|
|
32
|
-
});
|
|
33
|
-
const primaryAction = _reactcomponents.slot.always(props.primaryAction, {
|
|
34
|
-
defaultProps: {
|
|
35
|
-
as: dismissOnly ? 'span' : undefined
|
|
36
|
-
},
|
|
37
|
-
elementType: 'button'
|
|
38
|
-
});
|
|
39
|
-
const dismissButton = _reactcomponents.slot.always(props.dismissButton, {
|
|
40
|
-
defaultProps: {
|
|
41
|
-
'aria-label': 'Remove attachment'
|
|
42
|
-
},
|
|
43
|
-
elementType: 'button'
|
|
44
|
-
});
|
|
45
|
-
dismissButton.onClick = (0, _reactcomponents.mergeCallbacks)(dismissButton.onClick, (ev)=>{
|
|
46
|
-
onAttachmentDismiss === null || onAttachmentDismiss === void 0 ? void 0 : onAttachmentDismiss(ev, {
|
|
47
|
-
content: children,
|
|
48
|
-
media,
|
|
49
|
-
id: attachmentId
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
|
-
const media = _reactcomponents.slot.optional(props.media, {
|
|
53
|
-
elementType: 'span'
|
|
54
|
-
});
|
|
55
|
-
const content = _reactcomponents.slot.always(props.content, {
|
|
56
|
-
defaultProps: {
|
|
57
|
-
children: props.children
|
|
58
|
-
},
|
|
59
|
-
elementType: 'span'
|
|
60
|
-
});
|
|
61
|
-
const dismissIcon = _reactcomponents.slot.always(props.dismissIcon, {
|
|
62
|
-
defaultProps: {
|
|
63
|
-
children: size === 'small' ? /*#__PURE__*/ _react.createElement(_reacticons.Dismiss12Regular, null) : /*#__PURE__*/ _react.createElement(_reacticons.Dismiss20Regular, null)
|
|
64
|
-
},
|
|
65
|
-
elementType: 'span'
|
|
66
|
-
});
|
|
67
|
-
const progress = _reactcomponents.slot.optional(props.progress, {
|
|
68
|
-
defaultProps: {
|
|
69
|
-
shape: 'square',
|
|
70
|
-
thickness: 'large',
|
|
71
|
-
'aria-labelledby': props.id
|
|
72
|
-
},
|
|
73
|
-
elementType: _reactcomponents.ProgressBar
|
|
74
|
-
});
|
|
75
|
-
const state = {
|
|
76
|
-
id: attachmentId,
|
|
77
|
-
size,
|
|
78
|
-
components: {
|
|
79
|
-
root: 'div',
|
|
80
|
-
primaryAction: 'button',
|
|
81
|
-
dismissButton: 'button',
|
|
82
|
-
media: 'span',
|
|
83
|
-
content: 'span',
|
|
84
|
-
dismissIcon: 'span',
|
|
85
|
-
progress: _reactcomponents.ProgressBar
|
|
86
|
-
},
|
|
87
|
-
root,
|
|
88
|
-
primaryAction,
|
|
89
|
-
dismissButton,
|
|
90
|
-
media,
|
|
91
|
-
content,
|
|
92
|
-
dismissIcon,
|
|
93
|
-
progress,
|
|
94
|
-
imageOnly,
|
|
95
|
-
isLoading,
|
|
96
|
-
shouldUseOverflow,
|
|
97
|
-
mode,
|
|
98
|
-
designVersion,
|
|
99
|
-
dismissOnly
|
|
100
|
-
};
|
|
101
|
-
if (state.primaryAction.as === 'span') {
|
|
102
|
-
state.components.primaryAction = 'span';
|
|
103
|
-
}
|
|
104
|
-
return state;
|
|
105
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachment.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ProgressBar, getIntrinsicElementProps, mergeCallbacks, slot, useId } from '@fluentui/react-components';\nimport { Dismiss12Regular, Dismiss20Regular } from '@fluentui/react-icons';\nimport { useAttachmentListContext_unstable } from '../../contexts/attachmentListContext';\nimport type { AttachmentProps, AttachmentState } from './Attachment.types';\nimport { useCopilotMode, useDesignVersion } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Attachment.\n *\n * The returned state can be modified with hooks such as useAttachmentStyles_unstable,\n * before being passed to renderAttachment_unstable.\n *\n * @param props - props from this instance of Attachment\n * @param ref - reference to root HTMLElement of Attachment\n */\nexport const useAttachment_unstable = (props: AttachmentProps, ref: React.Ref<HTMLDivElement>): AttachmentState => {\n const { children, imageOnly, size = 'medium', dismissOnly = false } = props;\n const { onAttachmentDismiss, shouldUseOverflow } = useAttachmentListContext_unstable(context => context);\n const attachmentId = useId('attachment-', props.id);\n const isLoading = !!props.progress;\n\n const mode = useCopilotMode(props.mode);\n const designVersion = useDesignVersion(props.designVersion);\n\n const root = slot.always(\n getIntrinsicElementProps(\n 'div',\n {\n ref,\n ...props,\n id: attachmentId,\n },\n // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n ['content'],\n ),\n { elementType: 'div' },\n );\n\n const primaryAction = slot.always(props.primaryAction, {\n defaultProps: { as: dismissOnly ? 'span' : undefined },\n elementType: 'button',\n });\n\n const dismissButton = slot.always(props.dismissButton, {\n defaultProps: { 'aria-label': 'Remove attachment' },\n elementType: 'button',\n });\n\n dismissButton.onClick = mergeCallbacks(\n dismissButton.onClick as React.MouseEventHandler<HTMLAnchorElement | HTMLButtonElement>,\n (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) => {\n onAttachmentDismiss?.(ev, { content: children, media, id: attachmentId });\n },\n );\n\n const media = slot.optional(props.media, { elementType: 'span' });\n\n const content = slot.always(props.content, {\n defaultProps: {\n children: props.children,\n },\n elementType: 'span',\n });\n\n const dismissIcon = slot.always(props.dismissIcon, {\n defaultProps: {\n children: size === 'small' ? <Dismiss12Regular /> : <Dismiss20Regular />,\n },\n elementType: 'span',\n });\n\n const progress = slot.optional(props.progress, {\n defaultProps: {\n shape: 'square',\n thickness: 'large',\n 'aria-labelledby': props.id,\n },\n elementType: ProgressBar,\n });\n\n const state: AttachmentState = {\n id: attachmentId,\n size,\n components: {\n root: 'div',\n primaryAction: 'button',\n dismissButton: 'button',\n media: 'span',\n content: 'span',\n dismissIcon: 'span',\n progress: ProgressBar,\n },\n\n root,\n primaryAction,\n dismissButton,\n media,\n content,\n dismissIcon,\n progress,\n imageOnly,\n isLoading,\n shouldUseOverflow,\n mode,\n designVersion,\n dismissOnly,\n };\n\n if (state.primaryAction.as === 'span') {\n state.components.primaryAction = 'span';\n }\n\n return state;\n};\n"],"names":["useAttachment_unstable","props","ref","children","imageOnly","size","dismissOnly","onAttachmentDismiss","shouldUseOverflow","useAttachmentListContext_unstable","context","attachmentId","useId","id","isLoading","progress","mode","useCopilotMode","designVersion","useDesignVersion","root","slot","always","getIntrinsicElementProps","elementType","primaryAction","defaultProps","as","undefined","dismissButton","onClick","mergeCallbacks","ev","content","media","optional","dismissIcon","React","createElement","Dismiss12Regular","Dismiss20Regular","shape","thickness","ProgressBar","state","components"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAgBaA;;;eAAAA;;;;iEAhBU;iCAC4D;4BAChC;uCACD;+BAED;AAW1C,MAAMA,yBAAyB,CAACC,OAAwBC;IAC7D,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,OAAO,QAAQ,EAAEC,cAAc,KAAK,EAAE,GAAGL;IACtE,MAAM,EAAEM,mBAAmB,EAAEC,iBAAiB,EAAE,GAAGC,IAAAA,wDAAAA,EAAkCC,CAAAA,UAAWA;IAChG,MAAMC,eAAeC,IAAAA,sBAAAA,EAAM,eAAeX,MAAMY,EAAE;IAClD,MAAMC,YAAY,CAAC,CAACb,MAAMc,QAAQ;IAElC,MAAMC,OAAOC,IAAAA,6BAAAA,EAAehB,MAAMe,IAAI;IACtC,MAAME,gBAAgBC,IAAAA,+BAAAA,EAAiBlB,MAAMiB,aAAa;IAE1D,MAAME,OAAOC,qBAAAA,CAAKC,MAAM,CACtBC,IAAAA,yCAAAA,EACE,OACA;QACErB;QACA,GAAGD,KAAK;QACRY,IAAIF;IACN,GAEA;QAAC;KAAU,GAEb;QAAEa,aAAa;IAAM;IAGvB,MAAMC,gBAAgBJ,qBAAAA,CAAKC,MAAM,CAACrB,MAAMwB,aAAa,EAAE;QACrDC,cAAc;YAAEC,IAAIrB,cAAc,SAASsB;QAAU;QACrDJ,aAAa;IACf;IAEA,MAAMK,gBAAgBR,qBAAAA,CAAKC,MAAM,CAACrB,MAAM4B,aAAa,EAAE;QACrDH,cAAc;YAAE,cAAc;QAAoB;QAClDF,aAAa;IACf;IAEAK,cAAcC,OAAO,GAAGC,IAAAA,+BAAAA,EACtBF,cAAcC,OAAO,EACrB,CAACE;QACCzB,wBAAAA,QAAAA,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAsByB,IAAI;YAAEC,SAAS9B;YAAU+B;YAAOrB,IAAIF;QAAa;IACzE;IAGF,MAAMuB,QAAQb,qBAAAA,CAAKc,QAAQ,CAAClC,MAAMiC,KAAK,EAAE;QAAEV,aAAa;IAAO;IAE/D,MAAMS,UAAUZ,qBAAAA,CAAKC,MAAM,CAACrB,MAAMgC,OAAO,EAAE;QACzCP,cAAc;YACZvB,UAAUF,MAAME,QAAQ;QAC1B;QACAqB,aAAa;IACf;IAEA,MAAMY,cAAcf,qBAAAA,CAAKC,MAAM,CAACrB,MAAMmC,WAAW,EAAE;QACjDV,cAAc;YACZvB,UAAUE,SAAS,UAAA,WAAA,GAAUgC,OAAAC,aAAA,CAACC,4BAAAA,EAAAA,QAAAA,WAAAA,GAAsBF,OAAAC,aAAA,CAACE,4BAAAA,EAAAA;QACvD;QACAhB,aAAa;IACf;IAEA,MAAMT,WAAWM,qBAAAA,CAAKc,QAAQ,CAAClC,MAAMc,QAAQ,EAAE;QAC7CW,cAAc;YACZe,OAAO;YACPC,WAAW;YACX,mBAAmBzC,MAAMY,EAAE;QAC7B;QACAW,aAAamB,4BAAAA;IACf;IAEA,MAAMC,QAAyB;QAC7B/B,IAAIF;QACJN;QACAwC,YAAY;YACVzB,MAAM;YACNK,eAAe;YACfI,eAAe;YACfK,OAAO;YACPD,SAAS;YACTG,aAAa;YACbrB,UAAU4B,4BAAAA;QACZ;QAEAvB;QACAK;QACAI;QACAK;QACAD;QACAG;QACArB;QACAX;QACAU;QACAN;QACAQ;QACAE;QACAZ;IACF;IAEA,IAAIsC,MAAMnB,aAAa,CAACE,EAAE,KAAK,QAAQ;QACrCiB,MAAMC,UAAU,CAACpB,aAAa,GAAG;IACnC;IAEA,OAAOmB;AACT"}
|