@fluentui-copilot/react-attachments 0.12.2 → 0.12.3-hotfix.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 +45 -1
- package/CHANGELOG.md +21 -2
- package/lib/AgentTag.js +0 -1
- package/lib/Attachment.js +0 -1
- package/lib/AttachmentList.js +0 -1
- package/lib/AttachmentOverflowMenu.js +0 -1
- package/lib/AttachmentOverflowMenuButton.js +0 -1
- package/lib/AttachmentOverflowMenuItem.js +0 -1
- package/lib/AttachmentTag.js +0 -1
- package/lib/AttachmentTagItem.js +0 -1
- package/lib/AttachmentTagList.js +0 -1
- package/lib/components/AgentTag/AgentTag.js +4 -5
- package/lib/components/AgentTag/AgentTag.types.js +1 -2
- package/lib/components/AgentTag/index.js +0 -1
- package/lib/components/AgentTag/renderAgentTag.js +3 -5
- package/lib/components/AgentTag/useAgentTag.js +7 -9
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js +66 -0
- package/lib/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
- package/lib/components/Attachment/Attachment.js +5 -6
- package/lib/components/Attachment/Attachment.types.js +1 -2
- package/lib/components/Attachment/index.js +0 -1
- package/lib/components/Attachment/renderAttachment.js +36 -31
- package/lib/components/Attachment/useAttachment.js +85 -95
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js +293 -0
- package/lib/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentList/AttachmentList.js +6 -7
- package/lib/components/AttachmentList/AttachmentList.types.js +1 -2
- package/lib/components/AttachmentList/index.js +0 -1
- package/lib/components/AttachmentList/renderAttachmentList.js +25 -25
- package/lib/components/AttachmentList/useAttachmentList.js +112 -119
- package/lib/components/AttachmentList/useAttachmentList.js.map +1 -1
- package/lib/components/AttachmentList/useAttachmentListContextValues.js +9 -13
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js +44 -0
- package/lib/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.js +8 -9
- package/lib/components/AttachmentOverflowMenu/AttachmentOverflowMenu.types.js +1 -2
- package/lib/components/AttachmentOverflowMenu/index.js +0 -1
- package/lib/components/AttachmentOverflowMenu/renderAttachmentOverflowMenu.js +8 -13
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenu.js +9 -15
- package/lib/components/AttachmentOverflowMenu/useAttachmentOverflowMenuContextValues.js +10 -15
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.js +5 -6
- package/lib/components/AttachmentOverflowMenuButton/AttachmentOverflowMenuButton.types.js +1 -2
- package/lib/components/AttachmentOverflowMenuButton/index.js +0 -1
- package/lib/components/AttachmentOverflowMenuButton/renderAttachmentOverflowMenuButton.js +11 -10
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButton.js +36 -45
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js +94 -0
- package/lib/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.js +4 -5
- package/lib/components/AttachmentOverflowMenuItem/AttachmentOverflowMenuItem.types.js +1 -2
- package/lib/components/AttachmentOverflowMenuItem/index.js +0 -1
- package/lib/components/AttachmentOverflowMenuItem/renderAttachmentOverflowMenuItem.js +9 -8
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItem.js +41 -49
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js +57 -0
- package/lib/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTag/AttachmentTag.js +5 -7
- package/lib/components/AttachmentTag/AttachmentTag.types.js +1 -2
- package/lib/components/AttachmentTag/index.js +0 -1
- package/lib/components/AttachmentTag/renderAttachmentTag.js +10 -8
- package/lib/components/AttachmentTag/useAttachmentTag.js +9 -11
- package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js +98 -0
- package/lib/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTagItem/AttachmentTagItem.js +4 -6
- package/lib/components/AttachmentTagItem/AttachmentTagItem.types.js +1 -2
- package/lib/components/AttachmentTagItem/index.js +0 -1
- package/lib/components/AttachmentTagItem/renderAttachmentTagItem.js +10 -8
- package/lib/components/AttachmentTagItem/useAttachmentTagItem.js +9 -11
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js +34 -0
- package/lib/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -0
- package/lib/components/AttachmentTagList/AttachmentTagList.js +6 -8
- package/lib/components/AttachmentTagList/AttachmentTagList.types.js +1 -2
- package/lib/components/AttachmentTagList/index.js +0 -1
- package/lib/components/AttachmentTagList/renderAttachmentTagList.js +7 -9
- package/lib/components/AttachmentTagList/useAttachmentTagList.js +21 -25
- package/lib/components/AttachmentTagList/useAttachmentTagListContextValues.js +8 -11
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js +21 -0
- package/lib/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -0
- package/lib/components/index.js +0 -1
- package/lib/components/utils/useAttachmentTagSlots.js +45 -52
- package/lib/components/utils/useProgressBarStyles.styles.raw.js +42 -0
- package/lib/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
- package/lib/contexts/attachmentListContext.js +3 -4
- package/lib/contexts/attachmentOverflowMenuContext.js +4 -5
- package/lib/contexts/attachmentTagListContext.js +2 -3
- package/lib/index.js +0 -1
- package/lib-commonjs/AgentTag.js +0 -1
- package/lib-commonjs/Attachment.js +0 -1
- package/lib-commonjs/AttachmentList.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenu.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenuButton.js +0 -1
- package/lib-commonjs/AttachmentOverflowMenuItem.js +0 -1
- package/lib-commonjs/AttachmentTag.js +0 -1
- package/lib-commonjs/AttachmentTagItem.js +0 -1
- package/lib-commonjs/AttachmentTagList.js +0 -1
- 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 +0 -1
- package/lib-commonjs/components/AgentTag/index.js +0 -1
- 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 +82 -0
- package/lib-commonjs/components/AgentTag/useAgentTagStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/Attachment/index.js +0 -1
- 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 +312 -0
- package/lib-commonjs/components/Attachment/useAttachmentStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/AttachmentList/index.js +0 -1
- 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 +6 -2
- 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 +60 -0
- package/lib-commonjs/components/AttachmentList/useAttachmentListStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenu/index.js +0 -1
- 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 +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuButton/index.js +0 -1
- 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 +110 -0
- package/lib-commonjs/components/AttachmentOverflowMenuButton/useAttachmentOverflowMenuButtonStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/AttachmentOverflowMenuItem/index.js +0 -1
- 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 +73 -0
- package/lib-commonjs/components/AttachmentOverflowMenuItem/useAttachmentOverflowMenuItemStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/AttachmentTag/index.js +0 -1
- 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 +118 -0
- package/lib-commonjs/components/AttachmentTag/useAttachmentTagStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/AttachmentTagItem/index.js +0 -1
- 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 +50 -0
- package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/lib-commonjs/components/AttachmentTagList/index.js +0 -1
- 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 +37 -0
- package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/index.js +0 -1
- 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 +50 -0
- package/lib-commonjs/components/utils/useProgressBarStyles.styles.raw.js.map +1 -0
- 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 +0 -1
- package/package.json +11 -15
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
attachmentOverflowMenuItemClassNames: function() {
|
|
13
|
+
return attachmentOverflowMenuItemClassNames;
|
|
14
|
+
},
|
|
15
|
+
useAttachmentOverflowMenuItemStyles_unstable: function() {
|
|
16
|
+
return useAttachmentOverflowMenuItemStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _useProgressBarStylesstyles = require("../utils/useProgressBarStyles.styles");
|
|
21
|
+
const attachmentOverflowMenuItemClassNames = {
|
|
22
|
+
root: 'fai-AttachmentOverflowMenuItem',
|
|
23
|
+
progress: 'fai-AttachmentOverflowMenuItem__progress'
|
|
24
|
+
};
|
|
25
|
+
const FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';
|
|
26
|
+
const useStyles = (0, _reactcomponents.makeStyles)({
|
|
27
|
+
imageOnly: {
|
|
28
|
+
alignItems: 'center'
|
|
29
|
+
},
|
|
30
|
+
secondaryContent: {
|
|
31
|
+
display: 'flex',
|
|
32
|
+
alignItems: 'center'
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
const useNextStyles = (0, _reactcomponents.makeStyles)({
|
|
36
|
+
nextStyles: {
|
|
37
|
+
[`[${FOCUS_VISIBLE_ATTR}]::after`]: {
|
|
38
|
+
borderRadius: _reactcomponents.tokens.borderRadiusXLarge
|
|
39
|
+
},
|
|
40
|
+
outline: `${_reactcomponents.tokens.strokeWidthThin} solid ${_reactcomponents.tokens.colorTransparentStroke}`
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const useAttachmentOverflowMenuItemStyles_unstable = (state)=>{
|
|
44
|
+
'use no memo';
|
|
45
|
+
const { imageOnly, designVersion } = state;
|
|
46
|
+
const styles = useStyles();
|
|
47
|
+
const nextStyles = useNextStyles();
|
|
48
|
+
const progressBarStyles = (0, _useProgressBarStylesstyles.useProgressBarStyles)();
|
|
49
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.root, imageOnly && styles.imageOnly, designVersion === 'next' && nextStyles.nextStyles, state.root.className);
|
|
50
|
+
const secondaryContent = _reactcomponents.slot.optional(state.root.secondaryContent, {
|
|
51
|
+
elementType: 'span'
|
|
52
|
+
});
|
|
53
|
+
if (secondaryContent) {
|
|
54
|
+
secondaryContent.className = (0, _reactcomponents.mergeClasses)(styles.secondaryContent, secondaryContent.className);
|
|
55
|
+
state.root.secondaryContent = secondaryContent;
|
|
56
|
+
}
|
|
57
|
+
if (state.progress) {
|
|
58
|
+
state.progress.className = (0, _reactcomponents.mergeClasses)(attachmentOverflowMenuItemClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
59
|
+
const bar = _reactcomponents.slot.optional(state.progress.bar, {
|
|
60
|
+
elementType: 'div',
|
|
61
|
+
renderByDefault: true
|
|
62
|
+
});
|
|
63
|
+
if (bar) {
|
|
64
|
+
if (state.progress.value === undefined) {
|
|
65
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.indeterminateProgressBar, bar.className);
|
|
66
|
+
} else {
|
|
67
|
+
bar.className = (0, _reactcomponents.mergeClasses)(progressBarStyles.regularProgressBar, bar.className);
|
|
68
|
+
}
|
|
69
|
+
state.progress.bar = bar;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return state;
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentOverflowMenuItemStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, slot, tokens } from '@fluentui/react-components';\nimport { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';\nimport type {\n AttachmentOverflowMenuItemSlots,\n AttachmentOverflowMenuItemState,\n} from './AttachmentOverflowMenuItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentOverflowMenuItemClassNames: SlotClassNames<AttachmentOverflowMenuItemSlots> = {\n root: 'fai-AttachmentOverflowMenuItem',\n progress: 'fai-AttachmentOverflowMenuItem__progress',\n};\n\nconst FOCUS_VISIBLE_ATTR = 'data-fui-focus-visible';\n\nconst useStyles = makeStyles({\n imageOnly: {\n alignItems: 'center',\n },\n secondaryContent: {\n display: 'flex',\n alignItems: 'center',\n },\n});\n\nconst useNextStyles = makeStyles({\n nextStyles: {\n [`[${FOCUS_VISIBLE_ATTR}]::after`]: {\n borderRadius: tokens.borderRadiusXLarge,\n },\n outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n },\n});\n\n/**\n * Apply styling to the AttachmentList slots based on the state\n */\nexport const useAttachmentOverflowMenuItemStyles_unstable = (\n state: AttachmentOverflowMenuItemState,\n): AttachmentOverflowMenuItemState => {\n 'use no memo';\n\n const { imageOnly, designVersion } = state;\n const styles = useStyles();\n const nextStyles = useNextStyles();\n const progressBarStyles = useProgressBarStyles();\n\n state.root.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.root,\n imageOnly && styles.imageOnly,\n designVersion === 'next' && nextStyles.nextStyles,\n state.root.className,\n );\n\n const secondaryContent = slot.optional(state.root.secondaryContent, {\n elementType: 'span',\n });\n if (secondaryContent) {\n secondaryContent.className = mergeClasses(styles.secondaryContent, secondaryContent.className);\n state.root.secondaryContent = secondaryContent;\n }\n\n if (state.progress) {\n state.progress.className = mergeClasses(\n attachmentOverflowMenuItemClassNames.progress,\n progressBarStyles.progress,\n state.progress.className,\n );\n\n const bar = slot.optional(state.progress.bar, { elementType: 'div', renderByDefault: true });\n if (bar) {\n if (state.progress.value === undefined) {\n bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);\n } else {\n bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);\n }\n state.progress.bar = bar;\n }\n }\n\n return state;\n};\n"],"names":["attachmentOverflowMenuItemClassNames","useAttachmentOverflowMenuItemStyles_unstable","root","progress","FOCUS_VISIBLE_ATTR","useStyles","makeStyles","imageOnly","alignItems","secondaryContent","display","useNextStyles","nextStyles","borderRadius","tokens","borderRadiusXLarge","outline","strokeWidthThin","colorTransparentStroke","state","designVersion","styles","progressBarStyles","useProgressBarStyles","className","mergeClasses","slot","optional","elementType","bar","renderByDefault","value","undefined","indeterminateProgressBar","regularProgressBar"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAQaA,oCAAAA;eAAAA;;IA6BAC,4CAAAA;eAAAA;;;iCArC0C;4CAClB;AAO9B,MAAMD,uCAAwF;IACnGE,MAAM;IACNC,UAAU;AACZ;AAEA,MAAMC,qBAAqB;AAE3B,MAAMC,YAAYC,IAAAA,2BAAAA,EAAW;IAC3BC,WAAW;QACTC,YAAY;IACd;IACAC,kBAAkB;QAChBC,SAAS;QACTF,YAAY;IACd;AACF;AAEA,MAAMG,gBAAgBL,IAAAA,2BAAAA,EAAW;IAC/BM,YAAY;QACV,CAAC,CAAC,CAAC,EAAER,mBAAmB,QAAQ,CAAC,CAAC,EAAE;YAClCS,cAAcC,uBAAAA,CAAOC,kBAAkB;QACzC;QACAC,SAAS,CAAC,EAAEF,uBAAAA,CAAOG,eAAe,CAAC,OAAO,EAAEH,uBAAAA,CAAOI,sBAAsB,CAAC,CAAC;IAC7E;AACF;AAKO,MAAMjB,+CAA+C,CAC1DkB;IAEA;IAEA,MAAM,EAAEZ,SAAS,EAAEa,aAAa,EAAE,GAAGD;IACrC,MAAME,SAAShB;IACf,MAAMO,aAAaD;IACnB,MAAMW,oBAAoBC,IAAAA,gDAAAA;IAE1BJ,MAAMjB,IAAI,CAACsB,SAAS,GAAGC,IAAAA,6BAAAA,EACrBzB,qCAAqCE,IAAI,EACzCK,aAAac,OAAOd,SAAS,EAC7Ba,kBAAkB,UAAUR,WAAWA,UAAU,EACjDO,MAAMjB,IAAI,CAACsB,SAAS;IAGtB,MAAMf,mBAAmBiB,qBAAAA,CAAKC,QAAQ,CAACR,MAAMjB,IAAI,CAACO,gBAAgB,EAAE;QAClEmB,aAAa;IACf;IACA,IAAInB,kBAAkB;QACpBA,iBAAiBe,SAAS,GAAGC,IAAAA,6BAAAA,EAAaJ,OAAOZ,gBAAgB,EAAEA,iBAAiBe,SAAS;QAC7FL,MAAMjB,IAAI,CAACO,gBAAgB,GAAGA;IAChC;IAEA,IAAIU,MAAMhB,QAAQ,EAAE;QAClBgB,MAAMhB,QAAQ,CAACqB,SAAS,GAAGC,IAAAA,6BAAAA,EACzBzB,qCAAqCG,QAAQ,EAC7CmB,kBAAkBnB,QAAQ,EAC1BgB,MAAMhB,QAAQ,CAACqB,SAAS;QAG1B,MAAMK,MAAMH,qBAAAA,CAAKC,QAAQ,CAACR,MAAMhB,QAAQ,CAAC0B,GAAG,EAAE;YAAED,aAAa;YAAOE,iBAAiB;QAAK;QAC1F,IAAID,KAAK;YACP,IAAIV,MAAMhB,QAAQ,CAAC4B,KAAK,KAAKC,WAAW;gBACtCH,IAAIL,SAAS,GAAGC,IAAAA,6BAAAA,EAAaH,kBAAkBW,wBAAwB,EAAEJ,IAAIL,SAAS;YACxF,OAAO;gBACLK,IAAIL,SAAS,GAAGC,IAAAA,6BAAAA,EAAaH,kBAAkBY,kBAAkB,EAAEL,IAAIL,SAAS;YAClF;YACAL,MAAMhB,QAAQ,CAAC0B,GAAG,GAAGA;QACvB;IACF;IAEA,OAAOV;AACT"}
|
|
@@ -20,4 +20,4 @@ const AttachmentTag = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
20
20
|
(0, _reactprovider.useCustomStyleHook)('useAttachmentTagStyles')(state);
|
|
21
21
|
return (0, _renderAttachmentTag.renderAttachmentTag_unstable)(state);
|
|
22
22
|
});
|
|
23
|
-
AttachmentTag.displayName = 'AttachmentTag';
|
|
23
|
+
AttachmentTag.displayName = 'AttachmentTag';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles.styles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["AttachmentTag.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTag_unstable } from './useAttachmentTag';\nimport { renderAttachmentTag_unstable } from './renderAttachmentTag';\nimport { useAttachmentTagStyles_unstable } from './useAttachmentTagStyles.styles';\nimport type { AttachmentTagProps } from './AttachmentTag.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new Attachment component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTag: ForwardRefComponent<AttachmentTagProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTag_unstable(props, ref);\n\n useAttachmentTagStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagStyles')(state);\n\n return renderAttachmentTag_unstable(state);\n});\n\nAttachmentTag.displayName = 'AttachmentTag';\n"],"names":["AttachmentTag","React","forwardRef","props","ref","state","useAttachmentTag_unstable","useAttachmentTagStyles_unstable","useCustomStyleHook","renderAttachmentTag_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAYaA;;;eAAAA;;;;iEAZU;kCACmB;qCACG;8CACG;+BAGb;AAM5B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChCG,IAAAA,iCAAAA,EAAmB,0BAA0BH;IAE7C,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
|
|
@@ -41,4 +41,3 @@ const _AttachmentTag = require("./AttachmentTag");
|
|
|
41
41
|
const _renderAttachmentTag = require("./renderAttachmentTag");
|
|
42
42
|
const _useAttachmentTag = require("./useAttachmentTag");
|
|
43
43
|
const _useAttachmentTagStylesstyles = require("./useAttachmentTagStyles.styles");
|
|
44
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagState, AttachmentTagSlots } from './AttachmentTag.types';\n\n/**\n * Render the final JSX of AttachmentTag\n */\nexport const renderAttachmentTag_unstable = (state: AttachmentTagState) => {\n assertSlots<AttachmentTagSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderAttachmentTag.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagState, AttachmentTagSlots } from './AttachmentTag.types';\n\n/**\n * Render the final JSX of AttachmentTag\n */\nexport const renderAttachmentTag_unstable = (state: AttachmentTagState) => {\n assertSlots<AttachmentTagSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["renderAttachmentTag_unstable","state","assertSlots","_jsxs","root","media","_jsx","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;iCAE4B;AAMrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,KAAK,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,KAAK,EAAA,CAAA;0BAC5BC,IAAAA,eAAA,EAACL,MAAMM,OAAO,EAAA,CAAA;0BACdD,IAAAA,eAAA,EAACL,MAAMO,IAAI,EAAA,CAAA;;;AAGjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTag.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagProps, AttachmentTagState } from './AttachmentTag.types';\n\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (\n props: AttachmentTagProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentTagState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'button', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useAttachmentTag.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagProps, AttachmentTagState } from './AttachmentTag.types';\n\n/**\n * Create the state required to render AttachmentTag.\n *\n * The returned state can be modified with hooks such as useAttachmentTagStyles_unstable,\n * before being passed to renderAttachmentTag_unstable.\n *\n * @param props - props from this instance of AttachmentTag\n * @param ref - reference to root HTMLElement of AttachmentTag\n */\nexport const useAttachmentTag_unstable = (\n props: AttachmentTagProps,\n ref: React.Ref<HTMLButtonElement>,\n): AttachmentTagState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'button', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTag_unstable","props","ref","useAttachmentTagSlots","elementType","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;uCAZyB;AAY/B,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,OAAOC,IAAAA,4CAAAA,EAAsBF,OAAOC,KAAK;QACvCE,aAAa;YAAEC,MAAM;YAAUC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC9E;AACF"}
|
|
@@ -0,0 +1,118 @@
|
|
|
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
|
+
ATTACHMENTTAG_MAXWIDTH: function() {
|
|
13
|
+
return ATTACHMENTTAG_MAXWIDTH;
|
|
14
|
+
},
|
|
15
|
+
attachmentTagClassNames: function() {
|
|
16
|
+
return attachmentTagClassNames;
|
|
17
|
+
},
|
|
18
|
+
useAttachmentTagStyles_unstable: function() {
|
|
19
|
+
return useAttachmentTagStyles_unstable;
|
|
20
|
+
},
|
|
21
|
+
useContentBaseClassName: function() {
|
|
22
|
+
return useContentBaseClassName;
|
|
23
|
+
},
|
|
24
|
+
useIconBaseClassName: function() {
|
|
25
|
+
return useIconBaseClassName;
|
|
26
|
+
},
|
|
27
|
+
useMediaBaseClassName: function() {
|
|
28
|
+
return useMediaBaseClassName;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
32
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
33
|
+
const attachmentTagClassNames = {
|
|
34
|
+
root: 'fai-AttachmentTag',
|
|
35
|
+
media: 'fai-AttachmentTag__media',
|
|
36
|
+
content: 'fai-AttachmentTag__content',
|
|
37
|
+
icon: 'fai-AttachmentTag__icon'
|
|
38
|
+
};
|
|
39
|
+
const ATTACHMENTTAG_MAXWIDTH = '180px';
|
|
40
|
+
const ATTACHMENTTAG_SIZE = '20px';
|
|
41
|
+
const useRootBaseClassName = (0, _reactcomponents.makeResetStyles)({
|
|
42
|
+
color: _tokens.tokens.colorNeutralForeground1,
|
|
43
|
+
alignItems: 'center',
|
|
44
|
+
backgroundColor: _tokens.tokens.colorNeutralBackground1,
|
|
45
|
+
border: `${_tokens.tokens.strokeWidthThin} solid ${_tokens.tokens.colorNeutralStroke1}`,
|
|
46
|
+
borderRadius: _tokens.tokens.borderRadiusMedium,
|
|
47
|
+
boxSizing: 'border-box',
|
|
48
|
+
columnGap: _tokens.tokens.spacingHorizontalSNudge,
|
|
49
|
+
cursor: 'pointer',
|
|
50
|
+
display: 'inline-flex',
|
|
51
|
+
flexWrap: 'nowrap',
|
|
52
|
+
justifyContent: 'center',
|
|
53
|
+
maxWidth: ATTACHMENTTAG_MAXWIDTH,
|
|
54
|
+
padding: `${_tokens.tokens.spacingVerticalXS} ${_tokens.tokens.spacingHorizontalXS} ${_tokens.tokens.spacingVerticalXS} ${_tokens.tokens.spacingHorizontalS}`,
|
|
55
|
+
verticalAlign: 'middle',
|
|
56
|
+
':hover': {
|
|
57
|
+
borderColor: _tokens.tokens.colorNeutralStroke1Hover,
|
|
58
|
+
[`& .${attachmentTagClassNames.icon}`]: {
|
|
59
|
+
color: _tokens.tokens.colorBrandForegroundLinkHover
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
':hover:active': {
|
|
63
|
+
borderColor: _tokens.tokens.colorNeutralStroke1Pressed,
|
|
64
|
+
[`& .${attachmentTagClassNames.icon}`]: {
|
|
65
|
+
color: _tokens.tokens.colorNeutralForeground2BrandPressed
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
':focus': {
|
|
69
|
+
[`& .${attachmentTagClassNames.icon}`]: {
|
|
70
|
+
color: _tokens.tokens.colorNeutralForeground2BrandHover
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
':focus:active': {
|
|
74
|
+
[`& .${attachmentTagClassNames.icon}`]: {
|
|
75
|
+
color: _tokens.tokens.colorNeutralForeground2BrandPressed
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
const useMediaBaseClassName = (0, _reactcomponents.makeResetStyles)({
|
|
80
|
+
fontSize: ATTACHMENTTAG_SIZE,
|
|
81
|
+
height: ATTACHMENTTAG_SIZE,
|
|
82
|
+
lineHeight: ATTACHMENTTAG_SIZE,
|
|
83
|
+
width: ATTACHMENTTAG_SIZE
|
|
84
|
+
});
|
|
85
|
+
const useContentBaseClassName = (0, _reactcomponents.makeResetStyles)({
|
|
86
|
+
overflowX: 'hidden',
|
|
87
|
+
textOverflow: 'ellipsis',
|
|
88
|
+
whiteSpace: 'nowrap',
|
|
89
|
+
..._reactcomponents.typographyStyles.body1
|
|
90
|
+
});
|
|
91
|
+
const useIconBaseClassName = (0, _reactcomponents.makeResetStyles)({
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
borderRadius: _tokens.tokens.borderRadiusCircular,
|
|
94
|
+
border: `${_tokens.tokens.strokeWidthThin} solid ${_tokens.tokens.colorTransparentStroke}`,
|
|
95
|
+
boxSizing: 'border-box',
|
|
96
|
+
color: _tokens.tokens.colorNeutralForeground1,
|
|
97
|
+
display: 'inline-flex',
|
|
98
|
+
fontSize: ATTACHMENTTAG_SIZE,
|
|
99
|
+
height: `calc(${ATTACHMENTTAG_SIZE} + ${_tokens.tokens.strokeWidthThin} * 2 + ${_tokens.tokens.spacingVerticalXXS})`,
|
|
100
|
+
justifyContent: 'center',
|
|
101
|
+
maxWidth: `calc(${ATTACHMENTTAG_SIZE} + ${_tokens.tokens.strokeWidthThin} * 2 + ${_tokens.tokens.spacingHorizontalXXS})`,
|
|
102
|
+
minWidth: `calc(${ATTACHMENTTAG_SIZE} + ${_tokens.tokens.strokeWidthThin} * 2 + ${_tokens.tokens.spacingHorizontalXXS})`,
|
|
103
|
+
padding: `calc(${_tokens.tokens.spacingVerticalXXS} / 2) calc(${_tokens.tokens.spacingHorizontalXXS} / 2)`
|
|
104
|
+
});
|
|
105
|
+
const useAttachmentTagStyles_unstable = (state)=>{
|
|
106
|
+
'use no memo';
|
|
107
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
108
|
+
const mediaBaseClassName = useMediaBaseClassName();
|
|
109
|
+
const contentBaseClassName = useContentBaseClassName();
|
|
110
|
+
const iconBaseClassName = useIconBaseClassName();
|
|
111
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentTagClassNames.root, rootBaseClassName, state.root.className);
|
|
112
|
+
if (state.media) {
|
|
113
|
+
state.media.className = (0, _reactcomponents.mergeClasses)(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);
|
|
114
|
+
}
|
|
115
|
+
state.content.className = (0, _reactcomponents.mergeClasses)(attachmentTagClassNames.content, contentBaseClassName, state.content.className);
|
|
116
|
+
state.icon.className = (0, _reactcomponents.mergeClasses)(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);
|
|
117
|
+
return state;
|
|
118
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { AttachmentTagSlots, AttachmentTagState } from './AttachmentTag.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagClassNames: SlotClassNames<AttachmentTagSlots> = {\n root: 'fai-AttachmentTag',\n media: 'fai-AttachmentTag__media',\n content: 'fai-AttachmentTag__content',\n icon: 'fai-AttachmentTag__icon',\n};\n\n/**\n * @internal\n */\nexport const ATTACHMENTTAG_MAXWIDTH = '180px';\nconst ATTACHMENTTAG_SIZE = '20px';\n\nconst useRootBaseClassName = makeResetStyles({\n color: tokens.colorNeutralForeground1,\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n columnGap: tokens.spacingHorizontalSNudge,\n cursor: 'pointer',\n display: 'inline-flex',\n flexWrap: 'nowrap',\n justifyContent: 'center',\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n verticalAlign: 'middle',\n\n ':hover': {\n borderColor: tokens.colorNeutralStroke1Hover,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorBrandForegroundLinkHover,\n },\n },\n\n ':hover:active': {\n borderColor: tokens.colorNeutralStroke1Pressed,\n\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n\n ':focus': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':focus:active': {\n [`& .${attachmentTagClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n});\n\n/**\n * @internal\n */\nexport const useMediaBaseClassName = makeResetStyles({\n fontSize: ATTACHMENTTAG_SIZE,\n height: ATTACHMENTTAG_SIZE,\n lineHeight: ATTACHMENTTAG_SIZE,\n width: ATTACHMENTTAG_SIZE,\n});\n\n/**\n * @internal\n */\nexport const useContentBaseClassName = makeResetStyles({\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n ...typographyStyles.body1,\n});\n\n/**\n * @internal\n */\nexport const useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n borderRadius: tokens.borderRadiusCircular,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground1,\n display: 'inline-flex',\n fontSize: ATTACHMENTTAG_SIZE,\n height: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,\n justifyContent: 'center',\n maxWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n minWidth: `calc(${ATTACHMENTTAG_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,\n padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`,\n});\n\n/**\n * Apply styling to the AttachmentTag slots based on the state\n */\nexport const useAttachmentTagStyles_unstable = (state: AttachmentTagState): AttachmentTagState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n state.root.className = mergeClasses(attachmentTagClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["ATTACHMENTTAG_MAXWIDTH","attachmentTagClassNames","useAttachmentTagStyles_unstable","useContentBaseClassName","useIconBaseClassName","useMediaBaseClassName","root","media","content","icon","ATTACHMENTTAG_SIZE","useRootBaseClassName","makeResetStyles","color","tokens","colorNeutralForeground1","alignItems","backgroundColor","colorNeutralBackground1","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","boxSizing","columnGap","spacingHorizontalSNudge","cursor","display","flexWrap","justifyContent","maxWidth","padding","spacingVerticalXS","spacingHorizontalXS","spacingHorizontalS","verticalAlign","borderColor","colorNeutralStroke1Hover","colorBrandForegroundLinkHover","colorNeutralStroke1Pressed","colorNeutralForeground2BrandPressed","colorNeutralForeground2BrandHover","fontSize","height","lineHeight","width","overflowX","textOverflow","whiteSpace","typographyStyles","body1","borderRadiusCircular","colorTransparentStroke","spacingVerticalXXS","spacingHorizontalXXS","minWidth","state","rootBaseClassName","mediaBaseClassName","contentBaseClassName","iconBaseClassName","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAeaA,sBAAAA;eAAAA;;IAVAC,uBAAAA;eAAAA;;IAmGAC,+BAAAA;eAAAA;;IA5BAC,uBAAAA;eAAAA;;IAUAC,oBAAAA;eAAAA;;IApBAC,qBAAAA;eAAAA;;;iCAlEmD;wBACzC;AAIhB,MAAMJ,0BAA8D;IACzEK,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR;AAKO,MAAMT,yBAAyB;AACtC,MAAMU,qBAAqB;AAE3B,MAAMC,uBAAuBC,IAAAA,gCAAAA,EAAgB;IAC3CC,OAAOC,cAAAA,CAAOC,uBAAuB;IACrCC,YAAY;IACZC,iBAAiBH,cAAAA,CAAOI,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEL,cAAAA,CAAOM,eAAe,CAAC,OAAO,EAAEN,cAAAA,CAAOO,mBAAmB,CAAC,CAAC;IACvEC,cAAcR,cAAAA,CAAOS,kBAAkB;IACvCC,WAAW;IACXC,WAAWX,cAAAA,CAAOY,uBAAuB;IACzCC,QAAQ;IACRC,SAAS;IACTC,UAAU;IACVC,gBAAgB;IAChBC,UAAU/B;IACVgC,SAAS,CAAC,EAAElB,cAAAA,CAAOmB,iBAAiB,CAAC,CAAC,EAAEnB,cAAAA,CAAOoB,mBAAmB,CAAC,CAAC,EAAEpB,cAAAA,CAAOmB,iBAAiB,CAAC,CAAC,EAAEnB,cAAAA,CAAOqB,kBAAkB,CAAC,CAAC;IAC7HC,eAAe;IAEf,UAAU;QACRC,aAAavB,cAAAA,CAAOwB,wBAAwB;QAE5C,CAAC,CAAC,GAAG,EAAErC,wBAAwBQ,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOC,cAAAA,CAAOyB,6BAA6B;QAC7C;IACF;IAEA,iBAAiB;QACfF,aAAavB,cAAAA,CAAO0B,0BAA0B;QAE9C,CAAC,CAAC,GAAG,EAAEvC,wBAAwBQ,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOC,cAAAA,CAAO2B,mCAAmC;QACnD;IACF;IAEA,UAAU;QACR,CAAC,CAAC,GAAG,EAAExC,wBAAwBQ,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOC,cAAAA,CAAO4B,iCAAiC;QACjD;IACF;IAEA,iBAAiB;QACf,CAAC,CAAC,GAAG,EAAEzC,wBAAwBQ,IAAI,CAAC,CAAC,CAAC,EAAE;YACtCI,OAAOC,cAAAA,CAAO2B,mCAAmC;QACnD;IACF;AACF;AAKO,MAAMpC,wBAAwBO,IAAAA,gCAAAA,EAAgB;IACnD+B,UAAUjC;IACVkC,QAAQlC;IACRmC,YAAYnC;IACZoC,OAAOpC;AACT;AAKO,MAAMP,0BAA0BS,IAAAA,gCAAAA,EAAgB;IACrDmC,WAAW;IACXC,cAAc;IACdC,YAAY;IACZ,GAAGC,iCAAAA,CAAiBC,KAAK;AAC3B;AAKO,MAAM/C,uBAAuBQ,IAAAA,gCAAAA,EAAgB;IAClDI,YAAY;IACZM,cAAcR,cAAAA,CAAOsC,oBAAoB;IACzCjC,QAAQ,CAAC,EAAEL,cAAAA,CAAOM,eAAe,CAAC,OAAO,EAAEN,cAAAA,CAAOuC,sBAAsB,CAAC,CAAC;IAC1E7B,WAAW;IACXX,OAAOC,cAAAA,CAAOC,uBAAuB;IACrCa,SAAS;IACTe,UAAUjC;IACVkC,QAAQ,CAAC,KAAK,EAAElC,mBAAmB,GAAG,EAAEI,cAAAA,CAAOM,eAAe,CAAC,OAAO,EAAEN,cAAAA,CAAOwC,kBAAkB,CAAC,CAAC,CAAC;IACpGxB,gBAAgB;IAChBC,UAAU,CAAC,KAAK,EAAErB,mBAAmB,GAAG,EAAEI,cAAAA,CAAOM,eAAe,CAAC,OAAO,EAAEN,cAAAA,CAAOyC,oBAAoB,CAAC,CAAC,CAAC;IACxGC,UAAU,CAAC,KAAK,EAAE9C,mBAAmB,GAAG,EAAEI,cAAAA,CAAOM,eAAe,CAAC,OAAO,EAAEN,cAAAA,CAAOyC,oBAAoB,CAAC,CAAC,CAAC;IACxGvB,SAAS,CAAC,KAAK,EAAElB,cAAAA,CAAOwC,kBAAkB,CAAC,WAAW,EAAExC,cAAAA,CAAOyC,oBAAoB,CAAC,KAAK,CAAC;AAC5F;AAKO,MAAMrD,kCAAkC,CAACuD;IAC9C;IAEA,MAAMC,oBAAoB/C;IAC1B,MAAMgD,qBAAqBtD;IAC3B,MAAMuD,uBAAuBzD;IAC7B,MAAM0D,oBAAoBzD;IAE1BqD,MAAMnD,IAAI,CAACwD,SAAS,GAAGC,IAAAA,6BAAAA,EAAa9D,wBAAwBK,IAAI,EAAEoD,mBAAmBD,MAAMnD,IAAI,CAACwD,SAAS;IAEzG,IAAIL,MAAMlD,KAAK,EAAE;QACfkD,MAAMlD,KAAK,CAACuD,SAAS,GAAGC,IAAAA,6BAAAA,EAAa9D,wBAAwBM,KAAK,EAAEoD,oBAAoBF,MAAMlD,KAAK,CAACuD,SAAS;IAC/G;IAEAL,MAAMjD,OAAO,CAACsD,SAAS,GAAGC,IAAAA,6BAAAA,EACxB9D,wBAAwBO,OAAO,EAC/BoD,sBACAH,MAAMjD,OAAO,CAACsD,SAAS;IAGzBL,MAAMhD,IAAI,CAACqD,SAAS,GAAGC,IAAAA,6BAAAA,EAAa9D,wBAAwBQ,IAAI,EAAEoD,mBAAmBJ,MAAMhD,IAAI,CAACqD,SAAS;IAEzG,OAAOL;AACT"}
|
|
@@ -18,4 +18,4 @@ const AttachmentTagItem = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
18
18
|
(0, _useAttachmentTagItemStylesstyles.useAttachmentTagItemStyles_unstable)(state);
|
|
19
19
|
return (0, _renderAttachmentTagItem.renderAttachmentTagItem_unstable)(state);
|
|
20
20
|
});
|
|
21
|
-
AttachmentTagItem.displayName = 'AttachmentTagItem';
|
|
21
|
+
AttachmentTagItem.displayName = 'AttachmentTagItem';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles.styles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/**\n * @deprecated use new AttachmentOverflowMenuItem component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["AttachmentTagItem.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAttachmentTagItem_unstable } from './useAttachmentTagItem';\nimport { renderAttachmentTagItem_unstable } from './renderAttachmentTagItem';\nimport { useAttachmentTagItemStyles_unstable } from './useAttachmentTagItemStyles.styles';\nimport type { AttachmentTagItemProps } from './AttachmentTagItem.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/**\n * @deprecated use new AttachmentOverflowMenuItem component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTagItem: ForwardRefComponent<AttachmentTagItemProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagItem_unstable(props, ref);\n\n useAttachmentTagItemStyles_unstable(state);\n return renderAttachmentTagItem_unstable(state);\n});\n\nAttachmentTagItem.displayName = 'AttachmentTagItem';\n"],"names":["AttachmentTagItem","React","forwardRef","props","ref","state","useAttachmentTagItem_unstable","useAttachmentTagItemStyles_unstable","renderAttachmentTagItem_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWaA;;;eAAAA;;;;iEAXU;sCACuB;yCACG;kDACG;AAQ7C,MAAMA,oBAAAA,WAAAA,GAAiEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQC,IAAAA,mDAAAA,EAA8BH,OAAOC;IAEnDG,IAAAA,qEAAAA,EAAoCF;IACpC,OAAOG,IAAAA,yDAAAA,EAAiCH;AAC1C;AAEAL,kBAAkBS,WAAW,GAAG"}
|
|
@@ -29,4 +29,3 @@ const _AttachmentTagItem = require("./AttachmentTagItem");
|
|
|
29
29
|
const _renderAttachmentTagItem = require("./renderAttachmentTagItem");
|
|
30
30
|
const _useAttachmentTagItem = require("./useAttachmentTagItem");
|
|
31
31
|
const _useAttachmentTagItemStylesstyles = require("./useAttachmentTagItemStyles.styles");
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentTagItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagItemState, AttachmentTagItemSlots } from './AttachmentTagItem.types';\n\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = (state: AttachmentTagItemState) => {\n assertSlots<AttachmentTagItemSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderAttachmentTagItem.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { AttachmentTagItemState, AttachmentTagItemSlots } from './AttachmentTagItem.types';\n\n/**\n * Render the final JSX of AttachmentTagItem\n */\nexport const renderAttachmentTagItem_unstable = (state: AttachmentTagItemState) => {\n assertSlots<AttachmentTagItemSlots>(state);\n\n return (\n <state.root>\n {state.media && <state.media />}\n <state.content />\n <state.icon />\n </state.root>\n );\n};\n"],"names":["renderAttachmentTagItem_unstable","state","assertSlots","_jsxs","root","media","_jsx","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;4BARb;iCAE4B;AAMrB,MAAMA,mCAAmC,CAACC;IAC/CC,IAAAA,4BAAAA,EAAoCD;IAEpC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,KAAK,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,KAAK,EAAA,CAAA;0BAC5BC,IAAAA,eAAA,EAACL,MAAMM,OAAO,EAAA,CAAA;0BACdD,IAAAA,eAAA,EAACL,MAAMO,IAAI,EAAA,CAAA;;;AAGjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagItemState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'div', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItem.ts"],"sourcesContent":["import type * as React from 'react';\nimport { useAttachmentTagSlots } from '../utils/useAttachmentTagSlots';\nimport type { AttachmentTagItemProps, AttachmentTagItemState } from './AttachmentTagItem.types';\n\n/**\n * Create the state required to render AttachmentTagItem.\n *\n * The returned state can be modified with hooks such as useAttachmentTagItemStyles_unstable,\n * before being passed to renderAttachmentTagItem_unstable.\n *\n * @param props - props from this instance of AttachmentTagItem\n * @param ref - reference to root HTMLElement of AttachmentTagItem\n */\nexport const useAttachmentTagItem_unstable = (\n props: AttachmentTagItemProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagItemState => {\n return useAttachmentTagSlots(props, ref, {\n elementType: { root: 'div', media: 'span', content: 'span', icon: 'span' },\n });\n};\n"],"names":["useAttachmentTagItem_unstable","props","ref","useAttachmentTagSlots","elementType","root","media","content","icon"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;uCAZyB;AAY/B,MAAMA,gCAAgC,CAC3CC,OACAC;IAEA,OAAOC,IAAAA,4CAAAA,EAAsBF,OAAOC,KAAK;QACvCE,aAAa;YAAEC,MAAM;YAAOC,OAAO;YAAQC,SAAS;YAAQC,MAAM;QAAO;IAC3E;AACF"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
attachmentTagItemClassNames: function() {
|
|
13
|
+
return attachmentTagItemClassNames;
|
|
14
|
+
},
|
|
15
|
+
useAttachmentTagItemStyles_unstable: function() {
|
|
16
|
+
return useAttachmentTagItemStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
+
const _useAttachmentTagStylesstyles = require("../AttachmentTag/useAttachmentTagStyles.styles");
|
|
22
|
+
const attachmentTagItemClassNames = {
|
|
23
|
+
root: 'fai-AttachmentTagItem',
|
|
24
|
+
media: 'fai-AttachmentTagItem__media',
|
|
25
|
+
content: 'fai-AttachmentTagItem__content',
|
|
26
|
+
icon: 'fai-AttachmentTagItem__icon'
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Styles for the root slot
|
|
30
|
+
*/ const useRootBaseClassName = (0, _reactcomponents.makeResetStyles)({
|
|
31
|
+
display: 'inline-flex',
|
|
32
|
+
flexWrap: 'nowrap',
|
|
33
|
+
columnGap: _tokens.tokens.spacingHorizontalSNudge,
|
|
34
|
+
maxWidth: _useAttachmentTagStylesstyles.ATTACHMENTTAG_MAXWIDTH,
|
|
35
|
+
alignItems: 'center'
|
|
36
|
+
});
|
|
37
|
+
const useAttachmentTagItemStyles_unstable = (state)=>{
|
|
38
|
+
'use no memo';
|
|
39
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
40
|
+
const mediaBaseClassName = (0, _useAttachmentTagStylesstyles.useMediaBaseClassName)();
|
|
41
|
+
const contentBaseClassName = (0, _useAttachmentTagStylesstyles.useContentBaseClassName)();
|
|
42
|
+
const iconBaseClassName = (0, _useAttachmentTagStylesstyles.useIconBaseClassName)();
|
|
43
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);
|
|
44
|
+
if (state.media) {
|
|
45
|
+
state.media.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);
|
|
46
|
+
}
|
|
47
|
+
state.content.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.content, contentBaseClassName, state.content.className);
|
|
48
|
+
state.icon.className = (0, _reactcomponents.mergeClasses)(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);
|
|
49
|
+
return state;
|
|
50
|
+
};
|
package/lib-commonjs/components/AttachmentTagItem/useAttachmentTagItemStyles.styles.raw.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagItemStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport {\n ATTACHMENTTAG_MAXWIDTH,\n useContentBaseClassName,\n useIconBaseClassName,\n useMediaBaseClassName,\n} from '../AttachmentTag/useAttachmentTagStyles.styles';\nimport type { AttachmentTagItemSlots, AttachmentTagItemState } from './AttachmentTagItem.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagItemClassNames: SlotClassNames<AttachmentTagItemSlots> = {\n root: 'fai-AttachmentTagItem',\n media: 'fai-AttachmentTagItem__media',\n content: 'fai-AttachmentTagItem__content',\n icon: 'fai-AttachmentTagItem__icon',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n display: 'inline-flex',\n flexWrap: 'nowrap',\n columnGap: tokens.spacingHorizontalSNudge,\n maxWidth: ATTACHMENTTAG_MAXWIDTH,\n alignItems: 'center',\n});\n\n/**\n * Apply styling to the AttachmentTagItem slots based on the state\n */\nexport const useAttachmentTagItemStyles_unstable = (state: AttachmentTagItemState): AttachmentTagItemState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n state.root.className = mergeClasses(attachmentTagItemClassNames.root, rootBaseClassName, state.root.className);\n\n if (state.media) {\n state.media.className = mergeClasses(attachmentTagItemClassNames.media, mediaBaseClassName, state.media.className);\n }\n\n state.content.className = mergeClasses(\n attachmentTagItemClassNames.content,\n contentBaseClassName,\n state.content.className,\n );\n\n state.icon.className = mergeClasses(attachmentTagItemClassNames.icon, iconBaseClassName, state.icon.className);\n\n return state;\n};\n"],"names":["attachmentTagItemClassNames","useAttachmentTagItemStyles_unstable","root","media","content","icon","useRootBaseClassName","makeResetStyles","display","flexWrap","columnGap","tokens","spacingHorizontalSNudge","maxWidth","ATTACHMENTTAG_MAXWIDTH","alignItems","state","rootBaseClassName","mediaBaseClassName","useMediaBaseClassName","contentBaseClassName","useContentBaseClassName","iconBaseClassName","useIconBaseClassName","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAWaA,2BAAAA;eAAAA;;IAqBAC,mCAAAA;eAAAA;;;iCAhCiC;wBACvB;8CAMhB;AAIA,MAAMD,8BAAsE;IACjFE,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,MAAM;AACR;AAEA;;CAEC,GACD,MAAMC,uBAAuBC,IAAAA,gCAAAA,EAAgB;IAC3CC,SAAS;IACTC,UAAU;IACVC,WAAWC,cAAAA,CAAOC,uBAAuB;IACzCC,UAAUC,oDAAAA;IACVC,YAAY;AACd;AAKO,MAAMd,sCAAsC,CAACe;IAClD;IAEA,MAAMC,oBAAoBX;IAC1B,MAAMY,qBAAqBC,IAAAA,mDAAAA;IAC3B,MAAMC,uBAAuBC,IAAAA,qDAAAA;IAC7B,MAAMC,oBAAoBC,IAAAA,kDAAAA;IAE1BP,MAAMd,IAAI,CAACsB,SAAS,GAAGC,IAAAA,6BAAAA,EAAazB,4BAA4BE,IAAI,EAAEe,mBAAmBD,MAAMd,IAAI,CAACsB,SAAS;IAE7G,IAAIR,MAAMb,KAAK,EAAE;QACfa,MAAMb,KAAK,CAACqB,SAAS,GAAGC,IAAAA,6BAAAA,EAAazB,4BAA4BG,KAAK,EAAEe,oBAAoBF,MAAMb,KAAK,CAACqB,SAAS;IACnH;IAEAR,MAAMZ,OAAO,CAACoB,SAAS,GAAGC,IAAAA,6BAAAA,EACxBzB,4BAA4BI,OAAO,EACnCgB,sBACAJ,MAAMZ,OAAO,CAACoB,SAAS;IAGzBR,MAAMX,IAAI,CAACmB,SAAS,GAAGC,IAAAA,6BAAAA,EAAazB,4BAA4BK,IAAI,EAAEiB,mBAAmBN,MAAMX,IAAI,CAACmB,SAAS;IAE7G,OAAOR;AACT"}
|
|
@@ -22,4 +22,4 @@ const AttachmentTagList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
22
22
|
(0, _reactprovider.useCustomStyleHook)('useAttachmentTagListStyles')(state);
|
|
23
23
|
return (0, _renderAttachmentTagList.renderAttachmentTagList_unstable)(state, contextValues);
|
|
24
24
|
});
|
|
25
|
-
AttachmentTagList.displayName = 'AttachmentTagList';
|
|
25
|
+
AttachmentTagList.displayName = 'AttachmentTagList';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new AttachmentList component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagList_unstable(props, ref);\n const contextValues = useAttachmentTagListContextValues_unstable(state);\n\n useAttachmentTagListStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagListStyles')(state);\n\n return renderAttachmentTagList_unstable(state, contextValues);\n});\n\nAttachmentTagList.displayName = 'AttachmentTagList';\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["AttachmentTagList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAttachmentTagList_unstable } from './renderAttachmentTagList';\nimport { useAttachmentTagList_unstable } from './useAttachmentTagList';\nimport { useAttachmentTagListContextValues_unstable } from './useAttachmentTagListContextValues';\nimport { useAttachmentTagListStyles_unstable } from './useAttachmentTagListStyles.styles';\nimport type { AttachmentTagListProps } from './AttachmentTagList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/**\n * @deprecated use new AttachmentList component exported from \\@fluentui-copilot/react-attachments package instead.\n * Deprecated on 4/9/2024.\n */\nexport const AttachmentTagList: ForwardRefComponent<AttachmentTagListProps> = React.forwardRef((props, ref) => {\n const state = useAttachmentTagList_unstable(props, ref);\n const contextValues = useAttachmentTagListContextValues_unstable(state);\n\n useAttachmentTagListStyles_unstable(state);\n useCustomStyleHook('useAttachmentTagListStyles')(state);\n\n return renderAttachmentTagList_unstable(state, contextValues);\n});\n\nAttachmentTagList.displayName = 'AttachmentTagList';\n"],"names":["AttachmentTagList","React","forwardRef","props","ref","state","useAttachmentTagList_unstable","contextValues","useAttachmentTagListContextValues_unstable","useAttachmentTagListStyles_unstable","useCustomStyleHook","renderAttachmentTagList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;;iEAbU;yCAC0B;sCACH;mDACa;kDACP;+BAGjB;AAM5B,MAAMA,oBAAAA,WAAAA,GAAiEC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrG,MAAMC,QAAQC,IAAAA,mDAAAA,EAA8BH,OAAOC;IACnD,MAAMG,gBAAgBC,IAAAA,6EAAAA,EAA2CH;IAEjEI,IAAAA,qEAAAA,EAAoCJ;IACpCK,IAAAA,iCAAAA,EAAmB,8BAA8BL;IAEjD,OAAOM,IAAAA,yDAAAA,EAAiCN,OAAOE;AACjD;AAEAP,kBAAkBY,WAAW,GAAG"}
|
|
@@ -29,4 +29,3 @@ const _AttachmentTagList = require("./AttachmentTagList");
|
|
|
29
29
|
const _renderAttachmentTagList = require("./renderAttachmentTagList");
|
|
30
30
|
const _useAttachmentTagList = require("./useAttachmentTagList");
|
|
31
31
|
const _useAttachmentTagListStylesstyles = require("./useAttachmentTagListStyles.styles");
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderAttachmentTagList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';\nimport type {\n AttachmentTagListContextValues,\n AttachmentTagListState,\n AttachmentTagListSlots,\n} from './AttachmentTagList.types';\n\n/**\n * Render the final JSX of AttachmentTagList\n */\nexport const renderAttachmentTagList_unstable = (\n state: AttachmentTagListState,\n contextValues: AttachmentTagListContextValues,\n) => {\n assertSlots<AttachmentTagListSlots>(state);\n\n return (\n <AttachmentTagListProvider value={contextValues.tagList}>\n <state.root />\n </AttachmentTagListProvider>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderAttachmentTagList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport { AttachmentTagListProvider } from '../../contexts/attachmentTagListContext';\nimport type {\n AttachmentTagListContextValues,\n AttachmentTagListState,\n AttachmentTagListSlots,\n} from './AttachmentTagList.types';\n\n/**\n * Render the final JSX of AttachmentTagList\n */\nexport const renderAttachmentTagList_unstable = (\n state: AttachmentTagListState,\n contextValues: AttachmentTagListContextValues,\n) => {\n assertSlots<AttachmentTagListSlots>(state);\n\n return (\n <AttachmentTagListProvider value={contextValues.tagList}>\n <state.root />\n </AttachmentTagListProvider>\n );\n};\n"],"names":["renderAttachmentTagList_unstable","state","contextValues","assertSlots","_jsx","AttachmentTagListProvider","value","tagList","root"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAeaA;;;eAAAA;;;4BAdb;iCAE4B;0CAEc;AAUnC,MAAMA,mCAAmC,CAC9CC,OACAC;IAEAC,IAAAA,4BAAAA,EAAoCF;IAEpC,OAAA,WAAA,GACEG,IAAAA,eAAA,EAACC,mDAAAA,EAAAA;QAA0BC,OAAOJ,cAAcK,OAAO;kBACrD,WAAA,GAAAH,IAAAA,eAAA,EAACH,MAAMO,IAAI,EAAA,CAAA;;AAGjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagList.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { AttachmentTagListProps, AttachmentTagListState } from './AttachmentTagList.types';\n\n/**\n * Create the state required to render AttachmentTagList.\n *\n * The returned state can be modified with hooks such as useAttachmentTagListStyles_unstable,\n * before being passed to renderAttachmentTagList_unstable.\n *\n * @param props - props from this instance of AttachmentTagList\n * @param ref - reference to root HTMLElement of AttachmentTagList\n */\nexport const useAttachmentTagList_unstable = (\n props: AttachmentTagListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagListState => {\n const { onAttachmentTagDismiss } = props;\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n });\n\n return {\n onAttachmentTagDismiss,\n\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref,\n role: 'menu',\n ...focusAttributes,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagList.ts"],"sourcesContent":["import type * as React from 'react';\n\nimport { getIntrinsicElementProps, slot, useArrowNavigationGroup } from '@fluentui/react-components';\nimport type { AttachmentTagListProps, AttachmentTagListState } from './AttachmentTagList.types';\n\n/**\n * Create the state required to render AttachmentTagList.\n *\n * The returned state can be modified with hooks such as useAttachmentTagListStyles_unstable,\n * before being passed to renderAttachmentTagList_unstable.\n *\n * @param props - props from this instance of AttachmentTagList\n * @param ref - reference to root HTMLElement of AttachmentTagList\n */\nexport const useAttachmentTagList_unstable = (\n props: AttachmentTagListProps,\n ref: React.Ref<HTMLDivElement>,\n): AttachmentTagListState => {\n const { onAttachmentTagDismiss } = props;\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n });\n\n return {\n onAttachmentTagDismiss,\n\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n 'aria-label': 'Attachments',\n ref,\n role: 'menu',\n ...focusAttributes,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n"],"names":["useAttachmentTagList_unstable","props","ref","onAttachmentTagDismiss","focusAttributes","useArrowNavigationGroup","axis","circular","components","root","slot","always","getIntrinsicElementProps","role","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAcaA;;;eAAAA;;;iCAZ2D;AAYjE,MAAMA,gCAAgC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,sBAAsB,EAAE,GAAGF;IAEnC,MAAMG,kBAAkBC,IAAAA,wCAAAA,EAAwB;QAC9CC,MAAM;QACNC,UAAU;IACZ;IAEA,OAAO;QACLJ;QAEAK,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,OAAO;YAC9B,cAAc;YACdV;YACAW,MAAM;YACN,GAAGT,eAAe;YAClB,GAAGH,KAAK;QACV,IACA;YAAEa,aAAa;QAAM;IAEzB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAttachmentTagListContextValues.ts"],"sourcesContent":["import type { AttachmentTagListContextValues, AttachmentTagListState } from './AttachmentTagList.types';\n\nexport function useAttachmentTagListContextValues_unstable(\n state: AttachmentTagListState,\n): AttachmentTagListContextValues {\n const { onAttachmentTagDismiss } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const tagList = {\n onAttachmentTagDismiss,\n };\n\n return { tagList };\n}\n"],"names":["useAttachmentTagListContextValues_unstable","state","onAttachmentTagDismiss","tagList"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagListContextValues.ts"],"sourcesContent":["import type { AttachmentTagListContextValues, AttachmentTagListState } from './AttachmentTagList.types';\n\nexport function useAttachmentTagListContextValues_unstable(\n state: AttachmentTagListState,\n): AttachmentTagListContextValues {\n const { onAttachmentTagDismiss } = state;\n\n // This context is created with \"@fluentui/react-context-selector\", there is no sense to memoize it\n const tagList = {\n onAttachmentTagDismiss,\n };\n\n return { tagList };\n}\n"],"names":["useAttachmentTagListContextValues_unstable","state","onAttachmentTagDismiss","tagList"],"rangeMappings":";;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAEgBA;;;eAAAA;;;AAAT,SAASA,2CACdC,KAA6B;IAE7B,MAAM,EAAEC,sBAAsB,EAAE,GAAGD;IAEnC,mGAAmG;IACnG,MAAME,UAAU;QACdD;IACF;IAEA,OAAO;QAAEC;IAAQ;AACnB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
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
|
+
attachmentTagListClassNames: function() {
|
|
13
|
+
return attachmentTagListClassNames;
|
|
14
|
+
},
|
|
15
|
+
useAttachmentTagListStyles_unstable: function() {
|
|
16
|
+
return useAttachmentTagListStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
+
const attachmentTagListClassNames = {
|
|
22
|
+
root: 'fai-AttachmentTagList'
|
|
23
|
+
};
|
|
24
|
+
const useRootBaseClassName = (0, _reactcomponents.makeResetStyles)({
|
|
25
|
+
columnGap: _tokens.tokens.spacingHorizontalSNudge,
|
|
26
|
+
display: 'flex',
|
|
27
|
+
flexDirection: 'row',
|
|
28
|
+
flexShrink: 0,
|
|
29
|
+
flexWrap: 'wrap',
|
|
30
|
+
rowGap: _tokens.tokens.spacingVerticalXS
|
|
31
|
+
});
|
|
32
|
+
const useAttachmentTagListStyles_unstable = (state)=>{
|
|
33
|
+
'use no memo';
|
|
34
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
35
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);
|
|
36
|
+
return state;
|
|
37
|
+
};
|
package/lib-commonjs/components/AttachmentTagList/useAttachmentTagListStyles.styles.raw.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useAttachmentTagListStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { AttachmentTagListSlots, AttachmentTagListState } from './AttachmentTagList.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const attachmentTagListClassNames: SlotClassNames<AttachmentTagListSlots> = {\n root: 'fai-AttachmentTagList',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n columnGap: tokens.spacingHorizontalSNudge,\n display: 'flex',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'wrap',\n rowGap: tokens.spacingVerticalXS,\n});\n\n/**\n * Apply styling to the AttachmentTagList slots based on the state\n */\nexport const useAttachmentTagListStyles_unstable = (state: AttachmentTagListState): AttachmentTagListState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(attachmentTagListClassNames.root, rootBaseClassName, state.root.className);\n\n return state;\n};\n"],"names":["attachmentTagListClassNames","useAttachmentTagListStyles_unstable","root","useRootBaseClassName","makeResetStyles","columnGap","tokens","spacingHorizontalSNudge","display","flexDirection","flexShrink","flexWrap","rowGap","spacingVerticalXS","state","rootBaseClassName","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,2BAAAA;eAAAA;;IAgBAC,mCAAAA;eAAAA;;;iCArBiC;wBACvB;AAIhB,MAAMD,8BAAsE;IACjFE,MAAM;AACR;AAEA,MAAMC,uBAAuBC,IAAAA,gCAAAA,EAAgB;IAC3CC,WAAWC,cAAAA,CAAOC,uBAAuB;IACzCC,SAAS;IACTC,eAAe;IACfC,YAAY;IACZC,UAAU;IACVC,QAAQN,cAAAA,CAAOO,iBAAiB;AAClC;AAKO,MAAMZ,sCAAsC,CAACa;IAClD;IAEA,MAAMC,oBAAoBZ;IAC1BW,MAAMZ,IAAI,CAACc,SAAS,GAAGC,IAAAA,6BAAAA,EAAajB,4BAA4BE,IAAI,EAAEa,mBAAmBD,MAAMZ,IAAI,CAACc,SAAS;IAE7G,OAAOF;AACT"}
|
|
@@ -150,4 +150,3 @@ const _AttachmentList = require("./AttachmentList");
|
|
|
150
150
|
const _AttachmentOverflowMenu = require("./AttachmentOverflowMenu");
|
|
151
151
|
const _AttachmentOverflowMenuButton = require("./AttachmentOverflowMenuButton");
|
|
152
152
|
const _AttachmentOverflowMenuItem = require("./AttachmentOverflowMenuItem");
|
|
153
|
-
//# sourceMappingURL=index.js.map
|