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