@fluentui-copilot/react-reference 0.15.5-hotfix.1 → 0.15.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/Citation.js +1 -0
- package/lib/Reference.js +1 -0
- package/lib/ReferenceGroupToggle.js +1 -0
- package/lib/ReferenceList.js +1 -0
- package/lib/ReferenceListV2.js +1 -0
- package/lib/ReferenceOverflowButton.js +1 -0
- package/lib/ReferenceV2.js +1 -0
- package/lib/components/Citation/Citation.js +6 -5
- package/lib/components/Citation/Citation.types.js +2 -1
- package/lib/components/Citation/index.js +1 -0
- package/lib/components/Citation/renderCitation.js +6 -4
- package/lib/components/Citation/useCitation.js +28 -22
- package/lib/components/Citation/useCitationStyles.styles.raw.js +59 -54
- package/lib/components/Reference/Reference.js +7 -5
- package/lib/components/Reference/Reference.types.js +2 -1
- package/lib/components/Reference/index.js +1 -0
- package/lib/components/Reference/renderReference.js +12 -27
- package/lib/components/Reference/useReference.js +172 -173
- package/lib/components/Reference/useReferenceStyles.styles.raw.js +181 -172
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js +6 -4
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js +2 -1
- package/lib/components/ReferenceGroupToggle/index.js +1 -0
- package/lib/components/ReferenceGroupToggle/renderReferenceGroupToggle.js +8 -9
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggle.js +30 -26
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js +36 -31
- package/lib/components/ReferenceList/ReferenceList.js +7 -5
- package/lib/components/ReferenceList/ReferenceList.types.js +2 -1
- package/lib/components/ReferenceList/index.js +1 -0
- package/lib/components/ReferenceList/renderReferenceList.js +6 -4
- package/lib/components/ReferenceList/useReferenceList.js +17 -15
- package/lib/components/ReferenceList/useReferenceListStyles.styles.raw.js +22 -16
- package/lib/components/reference-v2/Reference/Reference.js +5 -4
- package/lib/components/reference-v2/Reference/Reference.types.js +2 -1
- package/lib/components/reference-v2/Reference/index.js +1 -0
- package/lib/components/reference-v2/Reference/renderReference.js +17 -20
- package/lib/components/reference-v2/Reference/useReference.js +59 -53
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.raw.js +89 -84
- package/lib/components/reference-v2/ReferenceList/ReferenceList.js +6 -5
- package/lib/components/reference-v2/ReferenceList/ReferenceList.types.js +2 -1
- package/lib/components/reference-v2/ReferenceList/index.js +1 -0
- package/lib/components/reference-v2/ReferenceList/renderReferenceList.js +17 -17
- package/lib/components/reference-v2/ReferenceList/useReferenceList.js +80 -70
- package/lib/components/reference-v2/ReferenceList/useReferenceListContextValues.js +21 -13
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js +38 -31
- package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js +5 -4
- package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js +2 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/index.js +1 -0
- package/lib/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js +14 -9
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js +77 -77
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js +39 -33
- package/lib/components/reference-v2/index.js +1 -0
- package/lib/contexts/ReferenceGroupContext.js +6 -5
- package/lib/contexts/reference-v2/index.js +1 -0
- package/lib/contexts/reference-v2/referenceListContext.js +12 -11
- package/lib/index.js +1 -0
- package/lib/utilities/index.js +1 -0
- package/lib/utilities/reference-v2/generateReferenceCitationPreview.js +86 -75
- package/lib/utilities/reference-v2/index.js +1 -0
- package/lib/utilities/reference-v2/useReferenceCitationPreview.js +5 -5
- package/lib/utilities/useReferenceCitationPreview.js +114 -123
- package/lib/utilities/useReferenceGroup.js +24 -26
- package/lib/utilities/useReferenceGroup.styles.raw.js +4 -3
- package/lib-commonjs/Citation.js +1 -0
- package/lib-commonjs/Reference.js +1 -0
- package/lib-commonjs/ReferenceGroupToggle.js +1 -0
- package/lib-commonjs/ReferenceList.js +1 -0
- package/lib-commonjs/ReferenceListV2.js +1 -0
- package/lib-commonjs/ReferenceOverflowButton.js +1 -0
- package/lib-commonjs/ReferenceV2.js +1 -0
- package/lib-commonjs/components/Citation/Citation.js +1 -1
- package/lib-commonjs/components/Citation/Citation.js.map +1 -1
- package/lib-commonjs/components/Citation/Citation.types.js +1 -0
- package/lib-commonjs/components/Citation/index.js +1 -0
- package/lib-commonjs/components/Citation/renderCitation.js +1 -1
- package/lib-commonjs/components/Citation/renderCitation.js.map +1 -1
- package/lib-commonjs/components/Citation/useCitation.js +1 -1
- package/lib-commonjs/components/Citation/useCitation.js.map +1 -1
- package/lib-commonjs/components/Citation/useCitationStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/Citation/useCitationStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Reference/Reference.js +1 -1
- package/lib-commonjs/components/Reference/Reference.js.map +1 -1
- package/lib-commonjs/components/Reference/Reference.types.js +1 -0
- package/lib-commonjs/components/Reference/index.js +1 -0
- package/lib-commonjs/components/Reference/renderReference.js +1 -1
- package/lib-commonjs/components/Reference/renderReference.js.map +1 -1
- package/lib-commonjs/components/Reference/useReference.js +1 -1
- package/lib-commonjs/components/Reference/useReference.js.map +1 -1
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js +1 -0
- package/lib-commonjs/components/ReferenceGroupToggle/index.js +1 -0
- package/lib-commonjs/components/ReferenceGroupToggle/renderReferenceGroupToggle.js +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/renderReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.js +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.types.js +1 -0
- package/lib-commonjs/components/ReferenceList/index.js +1 -0
- package/lib-commonjs/components/ReferenceList/renderReferenceList.js +1 -1
- package/lib-commonjs/components/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceList.js +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/Reference.js +1 -1
- package/lib-commonjs/components/reference-v2/Reference/Reference.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/Reference.types.js +1 -0
- package/lib-commonjs/components/reference-v2/Reference/index.js +1 -0
- package/lib-commonjs/components/reference-v2/Reference/renderReference.js +1 -1
- package/lib-commonjs/components/reference-v2/Reference/renderReference.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReference.js +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReference.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.types.js +1 -0
- package/lib-commonjs/components/reference-v2/ReferenceList/index.js +1 -0
- package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListContextValues.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListContextValues.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js +1 -0
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/index.js +1 -0
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/reference-v2/index.js +1 -0
- package/lib-commonjs/contexts/ReferenceGroupContext.js +1 -1
- package/lib-commonjs/contexts/ReferenceGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/reference-v2/index.js +1 -0
- package/lib-commonjs/contexts/reference-v2/referenceListContext.js +1 -1
- package/lib-commonjs/contexts/reference-v2/referenceListContext.js.map +1 -1
- package/lib-commonjs/index.js +1 -0
- package/lib-commonjs/utilities/index.js +1 -0
- package/lib-commonjs/utilities/reference-v2/generateReferenceCitationPreview.js +1 -1
- package/lib-commonjs/utilities/reference-v2/generateReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/utilities/reference-v2/index.js +1 -0
- package/lib-commonjs/utilities/reference-v2/useReferenceCitationPreview.js +1 -1
- package/lib-commonjs/utilities/reference-v2/useReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/utilities/useReferenceCitationPreview.js +1 -1
- package/lib-commonjs/utilities/useReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/utilities/useReferenceGroup.js +1 -1
- package/lib-commonjs/utilities/useReferenceGroup.js.map +1 -1
- package/lib-commonjs/utilities/useReferenceGroup.styles.raw.js +1 -1
- package/lib-commonjs/utilities/useReferenceGroup.styles.raw.js.map +1 -1
- package/package.json +6 -6
|
@@ -1,197 +1,206 @@
|
|
|
1
1
|
import { buttonClassNames, makeResetStyles, makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';
|
|
2
2
|
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
-
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
4
|
+
export const referenceClassNames = {
|
|
5
|
+
root: 'fai-Reference',
|
|
6
|
+
citation: 'fai-Reference__citation',
|
|
7
|
+
media: 'fai-Reference__media',
|
|
8
|
+
actions: 'fai-Reference__actions',
|
|
9
|
+
sensitivity: 'fai-Reference__sensitivity',
|
|
10
|
+
metadata: 'fai-Reference__metadata',
|
|
11
|
+
primaryText: 'fai-Reference__primaryText',
|
|
12
|
+
secondaryText: 'fai-Reference__secondaryText',
|
|
13
|
+
tertiaryText: 'fai-Reference__tertiaryText',
|
|
14
|
+
icon: 'fai-Reference__icon',
|
|
15
|
+
label: 'fai-Reference__label',
|
|
16
|
+
content: 'fai-Reference__content',
|
|
17
|
+
detailsButton: 'fai-Reference__detailsButton'
|
|
17
18
|
};
|
|
18
|
-
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
20
|
+
export const referenceExtraClassNames = {
|
|
21
|
+
text: 'fai-Reference__text',
|
|
22
|
+
mediaChild: 'fai-Reference__mediaChild'
|
|
21
23
|
};
|
|
22
24
|
const labelFontSize = typographyStyles.caption1Strong.fontSize;
|
|
23
25
|
const labelLineHeight = typographyStyles.caption1Strong.lineHeight;
|
|
24
26
|
const maxPopoverWidth = '256px';
|
|
25
27
|
const useReferenceClassName = makeResetStyles({
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
boxSizing: 'border-box',
|
|
29
|
+
width: '100%',
|
|
30
|
+
display: 'grid',
|
|
31
|
+
gridTemplateAreas: `
|
|
30
32
|
"citation media title actions"
|
|
31
33
|
". . title ."
|
|
32
34
|
"sensitivityLabel sensitivityLabel sensitivityLabel sensitivityLabel"
|
|
33
35
|
"metadata metadata metadata metadata"
|
|
34
36
|
"content content content content"
|
|
35
37
|
`,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
gridTemplateColumns: 'min-content min-content 1fr min-content',
|
|
39
|
+
gridTemplateRows: '32px auto auto auto auto',
|
|
40
|
+
border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
|
|
41
|
+
borderRadius: tokens.borderRadiusMedium,
|
|
42
|
+
padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`,
|
|
43
|
+
boxShadow: 'none',
|
|
44
|
+
columnGap: tokens.spacingHorizontalXS,
|
|
45
|
+
alignItems: 'center'
|
|
44
46
|
});
|
|
45
47
|
const useStyles = makeStyles({
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
actions: {
|
|
78
|
-
gridArea: 'actions',
|
|
79
|
-
justifySelf: 'end',
|
|
80
|
-
display: 'flex',
|
|
81
|
-
gridRowStart: 1
|
|
82
|
-
},
|
|
83
|
-
detailsButton: {
|
|
84
|
-
[`> ${buttonClassNames.icon}`]: {
|
|
85
|
-
color: tokens.colorNeutralForeground3
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
sensitivity: {
|
|
89
|
-
gridArea: 'sensitivityLabel',
|
|
90
|
-
justifySelf: 'start'
|
|
91
|
-
},
|
|
92
|
-
metadata: {
|
|
93
|
-
marginTop: tokens.spacingVerticalXS,
|
|
94
|
-
gridArea: 'metadata',
|
|
95
|
-
...typographyStyles.caption2
|
|
96
|
-
},
|
|
97
|
-
metadataSubsequentText: {
|
|
98
|
-
position: 'relative',
|
|
99
|
-
marginLeft: tokens.spacingHorizontalS,
|
|
100
|
-
'&::before': {
|
|
101
|
-
content: '""',
|
|
102
|
-
display: 'block',
|
|
103
|
-
position: 'absolute',
|
|
104
|
-
left: `calc(${tokens.spacingHorizontalS} / -2)`,
|
|
105
|
-
top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,
|
|
106
|
-
height: typographyStyles.caption2.fontSize,
|
|
107
|
-
...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2)
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
icon: {
|
|
111
|
-
...typographyStyles.caption2,
|
|
112
|
-
verticalAlign: 'middle'
|
|
113
|
-
},
|
|
114
|
-
content: {
|
|
115
|
-
marginTop: tokens.spacingVerticalXS,
|
|
116
|
-
gridArea: 'content',
|
|
117
|
-
display: 'flex',
|
|
118
|
-
flexDirection: 'column',
|
|
119
|
-
rowGap: tokens.spacingVerticalS,
|
|
120
|
-
color: tokens.colorNeutralForeground3,
|
|
121
|
-
wordBreak: 'break-word'
|
|
122
|
-
},
|
|
123
|
-
hidden: {
|
|
124
|
-
display: 'none'
|
|
48
|
+
canvas: {},
|
|
49
|
+
sidecar: {
|
|
50
|
+
gridTemplateRows: '24px auto auto auto',
|
|
51
|
+
padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`
|
|
52
|
+
},
|
|
53
|
+
inline: {},
|
|
54
|
+
popover: {
|
|
55
|
+
...shorthands.borderWidth('0px'),
|
|
56
|
+
width: `calc(${maxPopoverWidth} - (${tokens.spacingHorizontalM} * 2))`,
|
|
57
|
+
padding: '0px'
|
|
58
|
+
},
|
|
59
|
+
closed: {
|
|
60
|
+
rowGap: 0
|
|
61
|
+
},
|
|
62
|
+
citation: {
|
|
63
|
+
gridArea: 'citation'
|
|
64
|
+
},
|
|
65
|
+
media: {
|
|
66
|
+
gridArea: 'media',
|
|
67
|
+
display: 'flex',
|
|
68
|
+
alignItems: 'center',
|
|
69
|
+
justifyContent: 'center'
|
|
70
|
+
},
|
|
71
|
+
mediaPopover: {
|
|
72
|
+
width: '16px',
|
|
73
|
+
height: '16px',
|
|
74
|
+
[`> .${referenceExtraClassNames.mediaChild}`]: {
|
|
75
|
+
width: '16px',
|
|
76
|
+
height: '16px'
|
|
125
77
|
}
|
|
78
|
+
},
|
|
79
|
+
actions: {
|
|
80
|
+
gridArea: 'actions',
|
|
81
|
+
justifySelf: 'end',
|
|
82
|
+
display: 'flex',
|
|
83
|
+
gridRowStart: 1
|
|
84
|
+
},
|
|
85
|
+
detailsButton: {
|
|
86
|
+
[`> ${buttonClassNames.icon}`]: {
|
|
87
|
+
color: tokens.colorNeutralForeground3
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
sensitivity: {
|
|
91
|
+
gridArea: 'sensitivityLabel',
|
|
92
|
+
justifySelf: 'start'
|
|
93
|
+
},
|
|
94
|
+
metadata: {
|
|
95
|
+
marginTop: tokens.spacingVerticalXS,
|
|
96
|
+
gridArea: 'metadata',
|
|
97
|
+
...typographyStyles.caption2
|
|
98
|
+
},
|
|
99
|
+
metadataSubsequentText: {
|
|
100
|
+
position: 'relative',
|
|
101
|
+
marginLeft: tokens.spacingHorizontalS,
|
|
102
|
+
'&::before': {
|
|
103
|
+
content: '""',
|
|
104
|
+
display: 'block',
|
|
105
|
+
position: 'absolute',
|
|
106
|
+
left: `calc(${tokens.spacingHorizontalS} / -2)`,
|
|
107
|
+
top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,
|
|
108
|
+
height: typographyStyles.caption2.fontSize,
|
|
109
|
+
...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2)
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
icon: {
|
|
113
|
+
...typographyStyles.caption2,
|
|
114
|
+
verticalAlign: 'middle'
|
|
115
|
+
},
|
|
116
|
+
content: {
|
|
117
|
+
marginTop: tokens.spacingVerticalXS,
|
|
118
|
+
gridArea: 'content',
|
|
119
|
+
display: 'flex',
|
|
120
|
+
flexDirection: 'column',
|
|
121
|
+
rowGap: tokens.spacingVerticalS,
|
|
122
|
+
color: tokens.colorNeutralForeground3,
|
|
123
|
+
wordBreak: 'break-word'
|
|
124
|
+
},
|
|
125
|
+
hidden: {
|
|
126
|
+
display: 'none'
|
|
127
|
+
}
|
|
126
128
|
});
|
|
127
129
|
const useLabelStyles = makeStyles({
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
130
|
+
root: {
|
|
131
|
+
gridArea: 'title',
|
|
132
|
+
alignSelf: 'start',
|
|
133
|
+
...typographyStyles.caption1Strong,
|
|
134
|
+
wordBreak: 'break-word',
|
|
135
|
+
'-webkit-box-orient': 'vertical',
|
|
136
|
+
'-webkit-line-clamp': '2',
|
|
137
|
+
display: '-webkit-box',
|
|
138
|
+
overflowY: 'hidden'
|
|
139
|
+
},
|
|
140
|
+
canvas: {
|
|
141
|
+
// 24px is the height of the tallest element within the reference
|
|
142
|
+
paddingTop: `calc((24px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`
|
|
143
|
+
},
|
|
144
|
+
sidecar: {
|
|
145
|
+
// 16px is the height of the tallest element within the reference
|
|
146
|
+
paddingTop: `calc((16px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`
|
|
147
|
+
},
|
|
148
|
+
closed: {
|
|
149
|
+
maxWidth: '100%',
|
|
150
|
+
'-webkit-line-clamp': '1'
|
|
151
|
+
}
|
|
150
152
|
});
|
|
151
153
|
/**
|
|
152
154
|
* Apply styling to the Reference slots based on the state
|
|
153
155
|
*
|
|
154
156
|
* deprecated Use ReferenceV2 component, hooks and types instead.
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
state.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
state.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
157
|
+
*/
|
|
158
|
+
export const useReferenceStyles_unstable = state => {
|
|
159
|
+
'use no memo';
|
|
160
|
+
|
|
161
|
+
const {
|
|
162
|
+
isExpanded,
|
|
163
|
+
mode,
|
|
164
|
+
layout
|
|
165
|
+
} = state;
|
|
166
|
+
const rootClassName = useReferenceClassName();
|
|
167
|
+
const styles = useStyles();
|
|
168
|
+
const labelStyles = useLabelStyles();
|
|
169
|
+
state.root.className = mergeClasses(referenceClassNames.root, rootClassName, styles[mode], styles[layout], !isExpanded && styles.closed, state.root.className);
|
|
170
|
+
if (state.citation) {
|
|
171
|
+
state.citation.className = mergeClasses(referenceClassNames.citation, styles.citation, state.citation.className);
|
|
172
|
+
}
|
|
173
|
+
if (state.media) {
|
|
174
|
+
state.media.className = mergeClasses(referenceClassNames.media, styles.media, layout === 'popover' && styles.mediaPopover, state.media.className);
|
|
175
|
+
}
|
|
176
|
+
if (state.actions) {
|
|
177
|
+
state.actions.className = mergeClasses(referenceClassNames.actions, styles.actions, state.actions.className);
|
|
178
|
+
}
|
|
179
|
+
state.label.className = mergeClasses(referenceClassNames.label, labelStyles.root, labelStyles[mode], !isExpanded && labelStyles.closed, state.label.className);
|
|
180
|
+
if (state.sensitivity) {
|
|
181
|
+
state.sensitivity.className = mergeClasses(referenceClassNames.sensitivity, styles.sensitivity, !isExpanded && styles.hidden, state.sensitivity.className);
|
|
182
|
+
}
|
|
183
|
+
state.metadata.className = mergeClasses(referenceClassNames.metadata, styles.metadata, !isExpanded && styles.hidden, state.metadata.className);
|
|
184
|
+
let isSubsequentText = false;
|
|
185
|
+
if (state.primaryText) {
|
|
186
|
+
state.primaryText.className = mergeClasses(referenceClassNames.primaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.primaryText.className);
|
|
187
|
+
isSubsequentText = true;
|
|
188
|
+
}
|
|
189
|
+
if (state.secondaryText) {
|
|
190
|
+
state.secondaryText.className = mergeClasses(referenceClassNames.secondaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.secondaryText.className);
|
|
191
|
+
isSubsequentText = true;
|
|
192
|
+
}
|
|
193
|
+
if (state.tertiaryText) {
|
|
194
|
+
state.tertiaryText.className = mergeClasses(referenceClassNames.tertiaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.tertiaryText.className);
|
|
195
|
+
isSubsequentText = true;
|
|
196
|
+
}
|
|
197
|
+
if (state.icon) {
|
|
198
|
+
state.icon.className = mergeClasses(referenceClassNames.icon, styles.icon, state.icon.className);
|
|
199
|
+
}
|
|
200
|
+
state.content.className = mergeClasses(referenceClassNames.content, styles.content, !isExpanded && styles.hidden, state.content.className);
|
|
201
|
+
if (state.detailsButton) {
|
|
202
|
+
state.detailsButton.className = mergeClasses(referenceClassNames.detailsButton, styles.detailsButton, state.detailsButton.className);
|
|
203
|
+
}
|
|
204
|
+
return state;
|
|
197
205
|
};
|
|
206
|
+
//# sourceMappingURL=useReferenceStyles.styles.raw.js.map
|
|
@@ -2,9 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { useReferenceGroupToggle_unstable } from './useReferenceGroupToggle';
|
|
3
3
|
import { renderReferenceGroupToggle_unstable } from './renderReferenceGroupToggle';
|
|
4
4
|
import { useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles.styles';
|
|
5
|
-
/** deprecated The ReferenceGroup pattern is deprecated and will be removed in a future release. */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/** deprecated The ReferenceGroup pattern is deprecated and will be removed in a future release. */
|
|
6
|
+
export const ReferenceGroupToggle = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
|
+
const state = useReferenceGroupToggle_unstable(props, ref);
|
|
8
|
+
useReferenceGroupToggleStyles_unstable(state);
|
|
9
|
+
return renderReferenceGroupToggle_unstable(state);
|
|
9
10
|
});
|
|
10
11
|
ReferenceGroupToggle.displayName = 'ReferenceGroupToggle';
|
|
12
|
+
//# sourceMappingURL=ReferenceGroupToggle.js.map
|
|
@@ -2,3 +2,4 @@ export { ReferenceGroupToggle } from './ReferenceGroupToggle';
|
|
|
2
2
|
export { renderReferenceGroupToggle_unstable } from './renderReferenceGroupToggle';
|
|
3
3
|
export { useReferenceGroupToggle_unstable } from './useReferenceGroupToggle';
|
|
4
4
|
export { referenceGroupToggleClassNames, useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,13 +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 ReferenceGroupToggle
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
]
|
|
12
|
-
});
|
|
5
|
+
*/
|
|
6
|
+
export const renderReferenceGroupToggle_unstable = state => {
|
|
7
|
+
assertSlots(state);
|
|
8
|
+
return /*#__PURE__*/_jsxs(state.root, {
|
|
9
|
+
children: [state.root.children, state.icon && /*#__PURE__*/_jsx(state.icon, {})]
|
|
10
|
+
});
|
|
13
11
|
};
|
|
12
|
+
//# sourceMappingURL=renderReferenceGroupToggle.js.map
|
|
@@ -10,30 +10,34 @@ import { useCopilotMode } from '@fluentui-copilot/react-provider';
|
|
|
10
10
|
*
|
|
11
11
|
* @param props - props from this instance of ReferenceGroupToggle
|
|
12
12
|
* @param ref - reference to root HTMLElement of ReferenceGroupToggle
|
|
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
|
-
|
|
13
|
+
*/
|
|
14
|
+
export const useReferenceGroupToggle_unstable = (props, ref) => {
|
|
15
|
+
const {
|
|
16
|
+
isOpen = false
|
|
17
|
+
} = props;
|
|
18
|
+
const mode = useCopilotMode(props.mode);
|
|
19
|
+
return {
|
|
20
|
+
mode,
|
|
21
|
+
isOpen,
|
|
22
|
+
components: {
|
|
23
|
+
root: 'button',
|
|
24
|
+
icon: 'span'
|
|
25
|
+
},
|
|
26
|
+
root: slot.always(getIntrinsicElementProps('button', {
|
|
27
|
+
ref,
|
|
28
|
+
'aria-expanded': isOpen,
|
|
29
|
+
type: 'button',
|
|
30
|
+
...props
|
|
31
|
+
}), {
|
|
32
|
+
elementType: 'button'
|
|
33
|
+
}),
|
|
34
|
+
icon: slot.optional(props.icon, {
|
|
35
|
+
defaultProps: {
|
|
36
|
+
children: isOpen ? /*#__PURE__*/React.createElement(ChevronUp16Regular, null) : /*#__PURE__*/React.createElement(ChevronDown16Regular, null)
|
|
37
|
+
},
|
|
38
|
+
renderByDefault: true,
|
|
39
|
+
elementType: 'span'
|
|
40
|
+
})
|
|
41
|
+
};
|
|
39
42
|
};
|
|
43
|
+
//# sourceMappingURL=useReferenceGroupToggle.js.map
|
|
@@ -1,44 +1,49 @@
|
|
|
1
1
|
import { makeResetStyles, makeStyles, mergeClasses, typographyStyles } from '@fluentui/react-components';
|
|
2
2
|
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
3
|
export const referenceGroupToggleClassNames = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
root: 'fai-ReferenceGroupToggle',
|
|
5
|
+
icon: 'fai-ReferenceGroupToggle__icon'
|
|
6
6
|
};
|
|
7
7
|
const useButtonBaseClassName = makeResetStyles({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
display: 'inline-flex',
|
|
9
|
+
columnGap: tokens.spacingHorizontalSNudge,
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
...typographyStyles.caption1,
|
|
12
|
+
border: 0,
|
|
13
|
+
backgroundColor: tokens.colorTransparentBackground,
|
|
14
|
+
color: tokens.colorNeutralForeground3,
|
|
15
|
+
cursor: 'pointer',
|
|
16
|
+
width: 'max-content',
|
|
17
|
+
padding: `${tokens.spacingVerticalXS} 0`
|
|
18
18
|
});
|
|
19
19
|
const useIconBaseClassName = makeResetStyles({
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
display: 'inline-flex',
|
|
21
|
+
alignItems: 'center'
|
|
22
22
|
});
|
|
23
23
|
const useStyles = makeStyles({
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
canvas: {
|
|
25
|
+
...typographyStyles.caption1
|
|
26
|
+
},
|
|
27
|
+
sidecar: {
|
|
28
|
+
...typographyStyles.caption2
|
|
29
|
+
}
|
|
30
30
|
});
|
|
31
31
|
/**
|
|
32
32
|
* Apply styling to the ReferenceGroupToggle slots based on the state
|
|
33
|
-
*/
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
*/
|
|
34
|
+
export const useReferenceGroupToggleStyles_unstable = state => {
|
|
35
|
+
'use no memo';
|
|
36
|
+
|
|
37
|
+
const {
|
|
38
|
+
mode
|
|
39
|
+
} = state;
|
|
40
|
+
const styles = useStyles();
|
|
41
|
+
const iconBaseClassName = useIconBaseClassName();
|
|
42
|
+
const buttonBaseClassName = useButtonBaseClassName();
|
|
43
|
+
state.root.className = mergeClasses(referenceGroupToggleClassNames.root, buttonBaseClassName, styles[mode], state.root.className);
|
|
44
|
+
if (state.icon) {
|
|
45
|
+
state.icon.className = mergeClasses(referenceGroupToggleClassNames.icon, iconBaseClassName, state.icon.className);
|
|
46
|
+
}
|
|
47
|
+
return state;
|
|
44
48
|
};
|
|
49
|
+
//# sourceMappingURL=useReferenceGroupToggleStyles.styles.raw.js.map
|
|
@@ -3,10 +3,12 @@ import { useReferenceList_unstable } from './useReferenceList';
|
|
|
3
3
|
import { renderReferenceList_unstable } from './renderReferenceList';
|
|
4
4
|
import { useReferenceListStyles_unstable } from './useReferenceListStyles.styles';
|
|
5
5
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
6
|
-
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
7
|
+
export const ReferenceList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
|
+
const state = useReferenceList_unstable(props, ref);
|
|
9
|
+
useReferenceListStyles_unstable(state);
|
|
10
|
+
useCustomStyleHook('useReferenceListStyles')(state);
|
|
11
|
+
return renderReferenceList_unstable(state);
|
|
11
12
|
});
|
|
12
13
|
ReferenceList.displayName = 'ReferenceList';
|
|
14
|
+
//# sourceMappingURL=ReferenceList.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
1
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */export {};
|
|
2
|
+
//# sourceMappingURL=ReferenceList.types.js.map
|
|
@@ -2,3 +2,4 @@ export { ReferenceList } from './ReferenceList';
|
|
|
2
2
|
export { renderReferenceList_unstable } from './renderReferenceList';
|
|
3
3
|
export { useReferenceList_unstable } from './useReferenceList';
|
|
4
4
|
export { referenceListClassNames, referenceListItemClassName, useReferenceListStyles_unstable } from './useReferenceListStyles.styles';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
|
-
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
4
|
+
export const renderReferenceList_unstable = state => {
|
|
5
|
+
assertSlots(state);
|
|
6
|
+
return /*#__PURE__*/_jsx(state.root, {});
|
|
6
7
|
};
|
|
8
|
+
//# sourceMappingURL=renderReferenceList.js.map
|