@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
|
@@ -2,316 +2,326 @@ import { createCustomFocusIndicatorStyle, makeResetStyles, makeStyles, mergeClas
|
|
|
2
2
|
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
3
|
import { useProgressBarStyles } from '../utils/useProgressBarStyles.styles';
|
|
4
4
|
export const attachmentClassNames = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
root: 'fai-Attachment',
|
|
6
|
+
primaryAction: 'fai-Attachment__primaryAction',
|
|
7
|
+
dismissButton: 'fai-Attachment__dismissButton',
|
|
8
|
+
media: 'fai-Attachment__media',
|
|
9
|
+
content: 'fai-Attachment__content',
|
|
10
|
+
dismissIcon: 'fai-Attachment__dismissIcon',
|
|
11
|
+
progress: 'fai-Attachment__progress'
|
|
12
12
|
};
|
|
13
13
|
const ATTACHMENT_MAXWIDTH = '180px';
|
|
14
14
|
const SMALL_ATTACHMENT_SIZE = '16px';
|
|
15
15
|
const ATTACHMENT_SIZE = '20px';
|
|
16
16
|
const useRootBaseClassName = makeResetStyles({
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
display: 'inline-flex',
|
|
18
|
+
flexWrap: 'nowrap',
|
|
19
|
+
verticalAlign: 'middle',
|
|
20
|
+
boxSizing: 'border-box',
|
|
21
|
+
width: 'fit-content',
|
|
22
|
+
alignSelf: 'end',
|
|
23
|
+
position: 'relative'
|
|
24
24
|
});
|
|
25
25
|
const buttonBaseStyles = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
backgroundColor: tokens.colorSubtleBackground,
|
|
28
|
+
border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
|
|
29
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
30
|
+
boxSizing: 'border-box',
|
|
31
|
+
columnGap: tokens.spacingHorizontalSNudge,
|
|
32
|
+
color: tokens.colorNeutralForeground1,
|
|
33
|
+
cursor: 'pointer',
|
|
34
|
+
display: 'inline-flex',
|
|
35
|
+
flexWrap: 'nowrap',
|
|
36
|
+
justifyContent: 'center',
|
|
37
|
+
...createCustomFocusIndicatorStyle({
|
|
38
|
+
outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,
|
|
39
|
+
zIndex: 1
|
|
40
|
+
}),
|
|
41
|
+
verticalAlign: 'middle'
|
|
42
42
|
};
|
|
43
43
|
const usePrimaryActionBaseClassName = makeResetStyles({
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
...buttonBaseStyles,
|
|
45
|
+
borderTopRightRadius: tokens.borderRadiusNone,
|
|
46
|
+
borderBottomRightRadius: tokens.borderRadiusNone,
|
|
47
|
+
borderRightStyle: 'none',
|
|
48
|
+
maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,
|
|
49
|
+
padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`
|
|
50
50
|
});
|
|
51
51
|
const usePrimaryActionStyles = makeStyles({
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
52
|
+
button: {
|
|
53
|
+
':hover': {
|
|
54
|
+
cursor: 'pointer',
|
|
55
|
+
backgroundColor: tokens.colorSubtleBackgroundHover,
|
|
56
|
+
color: tokens.colorNeutralForeground2Hover
|
|
57
|
+
},
|
|
58
|
+
':active': {
|
|
59
|
+
backgroundColor: tokens.colorSubtleBackgroundPressed,
|
|
60
|
+
color: tokens.colorNeutralForeground2Pressed
|
|
61
|
+
},
|
|
62
|
+
'@media (forced-colors: active)': {
|
|
63
|
+
':hover': {
|
|
64
|
+
backgroundColor: 'HighlightText'
|
|
65
|
+
},
|
|
66
|
+
':active': {
|
|
67
|
+
backgroundColor: 'HighlightText'
|
|
68
|
+
}
|
|
70
69
|
}
|
|
70
|
+
}
|
|
71
71
|
});
|
|
72
72
|
const useDismissButtonBaseClassName = makeResetStyles({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
...buttonBaseStyles,
|
|
74
|
+
padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS} ${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`,
|
|
75
|
+
maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,
|
|
76
|
+
minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,
|
|
77
|
+
// divider:
|
|
78
|
+
borderLeftColor: tokens.colorNeutralStroke1,
|
|
79
|
+
borderTopLeftRadius: tokens.borderRadiusNone,
|
|
80
|
+
borderBottomLeftRadius: tokens.borderRadiusNone,
|
|
81
|
+
borderTopRightRadius: tokens.borderRadiusMedium,
|
|
82
|
+
borderBottomRightRadius: tokens.borderRadiusMedium,
|
|
83
|
+
':hover': {
|
|
84
|
+
cursor: 'pointer',
|
|
85
|
+
backgroundColor: tokens.colorSubtleBackgroundHover,
|
|
86
|
+
color: tokens.colorNeutralForeground2BrandHover
|
|
87
|
+
},
|
|
88
|
+
':active': {
|
|
89
|
+
backgroundColor: tokens.colorSubtleBackgroundPressed,
|
|
90
|
+
color: tokens.colorNeutralForeground2BrandPressed
|
|
91
|
+
},
|
|
92
|
+
'@media (forced-colors: active)': {
|
|
83
93
|
':hover': {
|
|
84
|
-
|
|
85
|
-
backgroundColor: tokens.colorSubtleBackgroundHover,
|
|
86
|
-
color: tokens.colorNeutralForeground2BrandHover
|
|
94
|
+
backgroundColor: 'HighlightText'
|
|
87
95
|
},
|
|
88
96
|
':active': {
|
|
89
|
-
|
|
90
|
-
color: tokens.colorNeutralForeground2BrandPressed
|
|
91
|
-
},
|
|
92
|
-
'@media (forced-colors: active)': {
|
|
93
|
-
':hover': {
|
|
94
|
-
backgroundColor: 'HighlightText'
|
|
95
|
-
},
|
|
96
|
-
':active': {
|
|
97
|
-
backgroundColor: 'HighlightText'
|
|
98
|
-
}
|
|
97
|
+
backgroundColor: 'HighlightText'
|
|
99
98
|
}
|
|
99
|
+
}
|
|
100
100
|
});
|
|
101
101
|
const useDismissButtonCurrentStyles = makeStyles({
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
102
|
+
root: {
|
|
103
|
+
':hover': {
|
|
104
|
+
[`& .${attachmentClassNames.dismissIcon}`]: {
|
|
105
|
+
color: tokens.colorBrandForegroundLinkHover
|
|
106
|
+
}
|
|
108
107
|
}
|
|
108
|
+
}
|
|
109
109
|
});
|
|
110
110
|
const useMediaBaseClassName = makeResetStyles({
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
alignItems: 'center',
|
|
112
|
+
display: 'inline-flex',
|
|
113
|
+
fontSize: ATTACHMENT_SIZE,
|
|
114
|
+
height: ATTACHMENT_SIZE,
|
|
115
|
+
lineHeight: ATTACHMENT_SIZE,
|
|
116
|
+
width: ATTACHMENT_SIZE
|
|
117
117
|
});
|
|
118
118
|
const useContentBaseClassName = makeResetStyles({
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
overflowX: 'hidden',
|
|
120
|
+
textOverflow: 'ellipsis',
|
|
121
|
+
whiteSpace: 'nowrap',
|
|
122
|
+
...typographyStyles.body1
|
|
123
123
|
});
|
|
124
124
|
const useDismissIconBaseClassName = makeResetStyles({
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
125
|
+
alignItems: 'center',
|
|
126
|
+
borderRadius: tokens.borderRadiusCircular,
|
|
127
|
+
border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,
|
|
128
|
+
boxSizing: 'border-box',
|
|
129
|
+
color: tokens.colorNeutralForeground1,
|
|
130
|
+
display: 'inline-flex',
|
|
131
|
+
fontSize: ATTACHMENT_SIZE,
|
|
132
|
+
height: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,
|
|
133
|
+
justifyContent: 'center',
|
|
134
|
+
maxWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,
|
|
135
|
+
minWidth: `calc(${ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,
|
|
136
|
+
padding: `calc(${tokens.spacingVerticalXXS} / 2) calc(${tokens.spacingHorizontalXXS} / 2)`
|
|
137
137
|
});
|
|
138
138
|
const useDismissIconNextStyles = makeStyles({
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
139
|
+
dismissOnly: {
|
|
140
|
+
':hover': {
|
|
141
|
+
color: tokens.colorNeutralForeground2BrandHover
|
|
142
|
+
},
|
|
143
|
+
':active': {
|
|
144
|
+
color: tokens.colorNeutralForeground2BrandPressed
|
|
146
145
|
}
|
|
146
|
+
}
|
|
147
147
|
});
|
|
148
148
|
const useImageOnlyStyles = makeStyles({
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
primaryAction: {
|
|
150
|
+
padding: 0
|
|
151
|
+
},
|
|
152
|
+
content: {
|
|
153
|
+
lineHeight: 0
|
|
154
|
+
}
|
|
155
155
|
});
|
|
156
156
|
export const useOverflowStyles = makeStyles({
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
overflow: {
|
|
158
|
+
maxWidth: '100%',
|
|
159
|
+
width: '100%'
|
|
160
|
+
}
|
|
161
161
|
});
|
|
162
162
|
const useSmallStyles = makeStyles({
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
163
|
+
primaryAction: {
|
|
164
|
+
maxWidth: `calc(${ATTACHMENT_MAXWIDTH} - ${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS} - ${tokens.spacingHorizontalXS})`,
|
|
165
|
+
padding: `${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalSNudge} ${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalSNudge}`
|
|
166
|
+
},
|
|
167
|
+
media: {
|
|
168
|
+
fontSize: SMALL_ATTACHMENT_SIZE,
|
|
169
|
+
height: SMALL_ATTACHMENT_SIZE,
|
|
170
|
+
lineHeight: SMALL_ATTACHMENT_SIZE,
|
|
171
|
+
width: SMALL_ATTACHMENT_SIZE
|
|
172
|
+
},
|
|
173
|
+
content: {
|
|
174
|
+
...typographyStyles.caption1
|
|
175
|
+
},
|
|
176
|
+
dismissButton: {
|
|
177
|
+
padding: `${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalXXS}`,
|
|
178
|
+
maxWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`,
|
|
179
|
+
minWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS}) + ${tokens.spacingHorizontalXS}`
|
|
180
|
+
},
|
|
181
|
+
dismissIcon: {
|
|
182
|
+
fontSize: SMALL_ATTACHMENT_SIZE,
|
|
183
|
+
height: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingVerticalXXS})`,
|
|
184
|
+
maxWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`,
|
|
185
|
+
minWidth: `calc(${SMALL_ATTACHMENT_SIZE} + ${tokens.strokeWidthThin} * 2 + ${tokens.spacingHorizontalXXS})`
|
|
186
|
+
}
|
|
187
187
|
});
|
|
188
188
|
const usePrimaryActionNextStyles = makeStyles({
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
189
|
+
root: {
|
|
190
|
+
borderTopLeftRadius: tokens.borderRadiusXLarge,
|
|
191
|
+
borderBottomLeftRadius: tokens.borderRadiusXLarge
|
|
192
|
+
},
|
|
193
|
+
canvas: {
|
|
194
|
+
padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,
|
|
195
|
+
minHeight: '40px'
|
|
196
|
+
},
|
|
197
|
+
sidecar: {
|
|
198
|
+
padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,
|
|
199
|
+
minHeight: '32px'
|
|
200
|
+
}
|
|
201
201
|
});
|
|
202
202
|
const useDismissButtonNextStyles = makeStyles({
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
},
|
|
209
|
-
':active': {
|
|
210
|
-
color: tokens.colorNeutralForeground2Pressed
|
|
211
|
-
},
|
|
212
|
-
borderLeftColor: tokens.colorNeutralStroke1,
|
|
213
|
-
borderLeftWidth: tokens.strokeWidthThin,
|
|
214
|
-
borderLeftStyle: 'solid'
|
|
203
|
+
root: {
|
|
204
|
+
borderTopRightRadius: tokens.borderRadiusXLarge,
|
|
205
|
+
borderBottomRightRadius: tokens.borderRadiusXLarge,
|
|
206
|
+
':hover': {
|
|
207
|
+
color: tokens.colorNeutralForeground2
|
|
215
208
|
},
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
[`& .${attachmentClassNames.dismissIcon}`]: {
|
|
219
|
-
color: tokens.colorNeutralForeground2
|
|
220
|
-
}
|
|
221
|
-
},
|
|
222
|
-
':active': {
|
|
223
|
-
[`& .${attachmentClassNames.dismissIcon}`]: {
|
|
224
|
-
color: tokens.colorNeutralForeground2Pressed
|
|
225
|
-
}
|
|
226
|
-
}
|
|
209
|
+
':active': {
|
|
210
|
+
color: tokens.colorNeutralForeground2Pressed
|
|
227
211
|
},
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
212
|
+
borderLeftColor: tokens.colorNeutralStroke1,
|
|
213
|
+
borderLeftWidth: tokens.strokeWidthThin,
|
|
214
|
+
borderLeftStyle: 'solid'
|
|
215
|
+
},
|
|
216
|
+
withPrimary: {
|
|
217
|
+
':hover': {
|
|
218
|
+
[`& .${attachmentClassNames.dismissIcon}`]: {
|
|
219
|
+
color: tokens.colorNeutralForeground2
|
|
220
|
+
}
|
|
232
221
|
},
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
222
|
+
':active': {
|
|
223
|
+
[`& .${attachmentClassNames.dismissIcon}`]: {
|
|
224
|
+
color: tokens.colorNeutralForeground2Pressed
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
canvas: {
|
|
229
|
+
padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalS}`,
|
|
230
|
+
minHeight: '40px',
|
|
231
|
+
width: '40px'
|
|
232
|
+
},
|
|
233
|
+
sidecar: {
|
|
234
|
+
padding: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalMNudge}`,
|
|
235
|
+
minHeight: '32px',
|
|
236
|
+
width: '32px'
|
|
237
|
+
},
|
|
238
|
+
dismissOnly: {
|
|
239
|
+
borderRadius: tokens.borderRadiusXLarge,
|
|
240
|
+
width: 'unset',
|
|
241
|
+
borderLeftColor: tokens.colorTransparentStroke,
|
|
242
|
+
backgroundColor: tokens.colorNeutralBackground3,
|
|
243
|
+
':hover': {
|
|
244
|
+
backgroundColor: tokens.colorNeutralBackground3
|
|
237
245
|
},
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
width: 'unset',
|
|
241
|
-
borderLeftColor: tokens.colorTransparentStroke,
|
|
242
|
-
backgroundColor: tokens.colorNeutralBackground3,
|
|
243
|
-
':hover': {
|
|
244
|
-
backgroundColor: tokens.colorNeutralBackground3
|
|
245
|
-
},
|
|
246
|
-
':active': {
|
|
247
|
-
backgroundColor: tokens.colorNeutralBackground3
|
|
248
|
-
}
|
|
246
|
+
':active': {
|
|
247
|
+
backgroundColor: tokens.colorNeutralBackground3
|
|
249
248
|
}
|
|
249
|
+
}
|
|
250
250
|
});
|
|
251
251
|
const usePrimaryDismissNextStyles = makeStyles({
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
252
|
+
sharedStyles: {
|
|
253
|
+
border: 'none',
|
|
254
|
+
backgroundColor: tokens.colorNeutralBackground3,
|
|
255
|
+
':hover': {
|
|
256
|
+
backgroundColor: tokens.colorNeutralBackground3Hover
|
|
257
|
+
},
|
|
258
|
+
':active': {
|
|
259
|
+
backgroundColor: tokens.colorNeutralBackground3Pressed
|
|
260
|
+
},
|
|
261
|
+
':focus-visible': {
|
|
262
|
+
borderRadius: tokens.borderRadiusLarge
|
|
264
263
|
}
|
|
264
|
+
}
|
|
265
265
|
});
|
|
266
266
|
const useRootNextStyles = makeStyles({
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
267
|
+
root: {
|
|
268
|
+
outline: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,
|
|
269
|
+
borderRadius: tokens.borderRadiusXLarge
|
|
270
|
+
}
|
|
271
271
|
});
|
|
272
272
|
/**
|
|
273
273
|
* Apply styling to the Attachment slots based on the state
|
|
274
|
-
*/
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
274
|
+
*/
|
|
275
|
+
export const useAttachmentStyles_unstable = state => {
|
|
276
|
+
'use no memo';
|
|
277
|
+
|
|
278
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
279
|
+
const primaryActionBaseClassName = usePrimaryActionBaseClassName();
|
|
280
|
+
const dismissButtonBaseClassName = useDismissButtonBaseClassName();
|
|
281
|
+
const dismissButtonCurrentStyles = useDismissButtonCurrentStyles();
|
|
282
|
+
const mediaBaseClassName = useMediaBaseClassName();
|
|
283
|
+
const contentBaseClassName = useContentBaseClassName();
|
|
284
|
+
const dismissIconBaseClassName = useDismissIconBaseClassName();
|
|
285
|
+
const dismissIconNextStyles = useDismissIconNextStyles();
|
|
286
|
+
const progressBarStyles = useProgressBarStyles();
|
|
287
|
+
const primaryActionStyles = usePrimaryActionStyles();
|
|
288
|
+
const imageOnlyStyles = useImageOnlyStyles();
|
|
289
|
+
const smallStyles = useSmallStyles();
|
|
290
|
+
const primaryActionNextStyles = usePrimaryActionNextStyles();
|
|
291
|
+
const dismissButtonNextStyles = useDismissButtonNextStyles();
|
|
292
|
+
const primaryDismissNextStyles = usePrimaryDismissNextStyles();
|
|
293
|
+
const rootNextStyles = useRootNextStyles();
|
|
294
|
+
const {
|
|
295
|
+
imageOnly,
|
|
296
|
+
primaryAction,
|
|
297
|
+
size,
|
|
298
|
+
mode,
|
|
299
|
+
designVersion,
|
|
300
|
+
dismissOnly
|
|
301
|
+
} = state;
|
|
302
|
+
state.root.className = mergeClasses(attachmentClassNames.root, rootBaseClassName, designVersion === 'next' && rootNextStyles.root, state.root.className);
|
|
303
|
+
state.primaryAction.className = mergeClasses(attachmentClassNames.primaryAction, primaryActionBaseClassName, size === 'small' && smallStyles.primaryAction, primaryAction.as !== 'span' && !state.isLoading && primaryActionStyles.button, imageOnly && imageOnlyStyles.primaryAction, designVersion === 'next' && primaryDismissNextStyles.sharedStyles, designVersion === 'next' && primaryActionNextStyles.root, designVersion === 'next' && primaryActionNextStyles[mode], state.primaryAction.className);
|
|
304
|
+
state.dismissButton.className = mergeClasses(attachmentClassNames.dismissButton, dismissButtonBaseClassName, designVersion === 'current' && dismissButtonCurrentStyles.root, size === 'small' && smallStyles.dismissButton, designVersion === 'next' && primaryDismissNextStyles.sharedStyles, designVersion === 'next' && dismissButtonNextStyles.root, designVersion === 'next' && dismissButtonNextStyles[mode], designVersion === 'next' && dismissOnly && dismissButtonNextStyles.dismissOnly, designVersion === 'next' && !dismissOnly && dismissButtonNextStyles.withPrimary, state.dismissButton.className);
|
|
305
|
+
if (state.media) {
|
|
306
|
+
state.media.className = mergeClasses(attachmentClassNames.media, mediaBaseClassName, size === 'small' && smallStyles.media, state.media.className);
|
|
307
|
+
}
|
|
308
|
+
state.content.className = mergeClasses(attachmentClassNames.content, contentBaseClassName, size === 'small' && smallStyles.content, imageOnly && imageOnlyStyles.content, state.content.className);
|
|
309
|
+
state.dismissIcon.className = mergeClasses(attachmentClassNames.dismissIcon, dismissIconBaseClassName, size === 'small' && smallStyles.dismissIcon, designVersion === 'next' && dismissOnly && dismissIconNextStyles.dismissOnly, state.dismissIcon.className);
|
|
310
|
+
if (state.progress) {
|
|
311
|
+
state.progress.className = mergeClasses(attachmentClassNames.progress, progressBarStyles.progress, state.progress.className);
|
|
312
|
+
const bar = slot.optional(state.progress.bar, {
|
|
313
|
+
elementType: 'div',
|
|
314
|
+
renderByDefault: true
|
|
315
|
+
});
|
|
316
|
+
if (bar) {
|
|
317
|
+
if (state.progress.value === undefined) {
|
|
318
|
+
bar.className = mergeClasses(progressBarStyles.indeterminateProgressBar, bar.className);
|
|
319
|
+
} else {
|
|
320
|
+
bar.className = mergeClasses(progressBarStyles.regularProgressBar, bar.className);
|
|
321
|
+
}
|
|
322
|
+
state.progress.bar = bar;
|
|
315
323
|
}
|
|
316
|
-
|
|
324
|
+
}
|
|
325
|
+
return state;
|
|
317
326
|
};
|
|
327
|
+
//# sourceMappingURL=useAttachmentStyles.styles.raw.js.map
|
|
@@ -4,11 +4,12 @@ import { renderAttachmentList_unstable } from './renderAttachmentList';
|
|
|
4
4
|
import { useAttachmentListStyles_unstable } from './useAttachmentListStyles.styles';
|
|
5
5
|
import { useAttachmentListContextValues_unstable } from './useAttachmentListContextValues';
|
|
6
6
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
7
|
-
export const AttachmentList = /*#__PURE__*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
export const AttachmentList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
|
+
const state = useAttachmentList_unstable(props, ref);
|
|
9
|
+
const contextValues = useAttachmentListContextValues_unstable(state);
|
|
10
|
+
useAttachmentListStyles_unstable(state);
|
|
11
|
+
useCustomStyleHook('useAttachmentListStyles')(state);
|
|
12
|
+
return renderAttachmentList_unstable(state, contextValues);
|
|
13
13
|
});
|
|
14
14
|
AttachmentList.displayName = 'AttachmentList';
|
|
15
|
+
//# sourceMappingURL=AttachmentList.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=AttachmentList.types.js.map
|
|
@@ -2,3 +2,4 @@ export { AttachmentList } from './AttachmentList';
|
|
|
2
2
|
export { renderAttachmentList_unstable } from './renderAttachmentList';
|
|
3
3
|
export { useAttachmentList_unstable } from './useAttachmentList';
|
|
4
4
|
export { attachmentListClassNames, useAttachmentListStyles_unstable } from './useAttachmentListStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|