@fluentui-copilot/react-reference 0.11.2 → 0.11.4
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 +93 -1
- package/CHANGELOG.md +28 -2
- package/dist/index.d.ts +52 -26
- package/lib/ReferenceListV2.js +1 -1
- package/lib/ReferenceListV2.js.map +1 -1
- package/lib/ReferenceOverflowButton.js +1 -1
- package/lib/ReferenceOverflowButton.js.map +1 -1
- package/lib/ReferenceV2.js +1 -1
- package/lib/ReferenceV2.js.map +1 -1
- package/lib/components/Citation/Citation.js +1 -1
- package/lib/components/Citation/Citation.js.map +1 -1
- package/lib/components/Citation/index.js +1 -1
- package/lib/components/Citation/index.js.map +1 -1
- package/lib/components/Citation/{useCitationStyles.js → useCitationStyles.styles.js} +3 -1
- package/lib/components/Citation/useCitationStyles.styles.js.map +1 -0
- package/lib/components/Reference/Reference.js +1 -1
- package/lib/components/Reference/Reference.js.map +1 -1
- package/lib/components/Reference/index.js +1 -1
- package/lib/components/Reference/index.js.map +1 -1
- package/lib/components/Reference/useReference.js +1 -1
- package/lib/components/Reference/useReference.js.map +1 -1
- package/lib/components/Reference/{useReferenceStyles.js → useReferenceStyles.styles.js} +3 -1
- package/lib/components/Reference/useReferenceStyles.styles.js.map +1 -0
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js +1 -1
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js.map +1 -1
- package/lib/components/ReferenceGroupToggle/index.js +1 -1
- package/lib/components/ReferenceGroupToggle/index.js.map +1 -1
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggle.js +3 -0
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggle.js.map +1 -1
- package/lib/components/ReferenceGroupToggle/{useReferenceGroupToggleStyles.js → useReferenceGroupToggleStyles.styles.js} +25 -3
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js.map +1 -0
- package/lib/components/ReferenceList/ReferenceList.js +1 -1
- package/lib/components/ReferenceList/ReferenceList.js.map +1 -1
- package/lib/components/ReferenceList/index.js +1 -1
- package/lib/components/ReferenceList/index.js.map +1 -1
- package/lib/components/ReferenceList/useReferenceList.js +1 -1
- package/lib/components/ReferenceList/useReferenceList.js.map +1 -1
- package/lib/components/ReferenceList/{useReferenceListStyles.js → useReferenceListStyles.styles.js} +3 -1
- package/lib/components/ReferenceList/useReferenceListStyles.styles.js.map +1 -0
- package/lib/components/reference-v2/Reference/Reference.js +1 -1
- package/lib/components/reference-v2/Reference/Reference.js.map +1 -1
- package/lib/components/reference-v2/Reference/Reference.types.js.map +1 -1
- package/lib/components/reference-v2/Reference/index.js +1 -1
- package/lib/components/reference-v2/Reference/index.js.map +1 -1
- package/lib/components/reference-v2/Reference/renderReference.js +1 -1
- package/lib/components/reference-v2/Reference/renderReference.js.map +1 -1
- package/lib/components/reference-v2/Reference/useReference.js +20 -21
- package/lib/components/reference-v2/Reference/useReference.js.map +1 -1
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.js +51 -0
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.js.map +1 -0
- package/lib/components/reference-v2/ReferenceList/ReferenceList.js +1 -1
- package/lib/components/reference-v2/ReferenceList/ReferenceList.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/ReferenceList.types.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/index.js +1 -1
- package/lib/components/reference-v2/ReferenceList/index.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceList.js +10 -10
- package/lib/components/reference-v2/ReferenceList/useReferenceList.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceListContextValues.js +8 -6
- package/lib/components/reference-v2/ReferenceList/useReferenceListContextValues.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/{useReferenceListStyles.js → useReferenceListStyles.styles.js} +3 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js.map +1 -0
- package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js +1 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js.map +1 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js.map +1 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/index.js +1 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/index.js.map +1 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js +23 -19
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js.map +1 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/{useReferenceOverflowButtonStyles.js → useReferenceOverflowButtonStyles.styles.js} +5 -21
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js.map +1 -0
- package/lib/contexts/reference-v2/referenceListContext.js +5 -4
- package/lib/contexts/reference-v2/referenceListContext.js.map +1 -1
- package/lib/hooks/reference-v2/useReferenceCitationPreview.js +17 -12
- package/lib/hooks/reference-v2/useReferenceCitationPreview.js.map +1 -1
- package/lib/hooks/useReferenceCitationPreview.js +6 -4
- package/lib/hooks/useReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/ReferenceListV2.js +1 -1
- package/lib-commonjs/ReferenceListV2.js.map +1 -1
- package/lib-commonjs/ReferenceOverflowButton.js +1 -1
- package/lib-commonjs/ReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/ReferenceV2.js +1 -1
- package/lib-commonjs/ReferenceV2.js.map +1 -1
- package/lib-commonjs/components/Citation/Citation.js +2 -2
- package/lib-commonjs/components/Citation/Citation.js.map +1 -1
- package/lib-commonjs/components/Citation/index.js +1 -1
- package/lib-commonjs/components/Citation/index.js.map +1 -1
- package/lib-commonjs/components/Citation/{useCitationStyles.js → useCitationStyles.styles.js} +2 -1
- package/lib-commonjs/components/Citation/useCitationStyles.styles.js.map +1 -0
- package/lib-commonjs/components/Reference/Reference.js +2 -2
- package/lib-commonjs/components/Reference/Reference.js.map +1 -1
- package/lib-commonjs/components/Reference/index.js +1 -1
- package/lib-commonjs/components/Reference/index.js.map +1 -1
- package/lib-commonjs/components/Reference/useReference.js +2 -2
- package/lib-commonjs/components/Reference/useReference.js.map +1 -1
- package/lib-commonjs/components/Reference/{useReferenceStyles.js → useReferenceStyles.styles.js} +2 -1
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js +2 -2
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/index.js +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/index.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js +3 -0
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/{useReferenceGroupToggleStyles.js → useReferenceGroupToggleStyles.styles.js} +28 -2
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js.map +1 -0
- package/lib-commonjs/components/ReferenceList/ReferenceList.js +2 -2
- package/lib-commonjs/components/ReferenceList/ReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/index.js +1 -1
- package/lib-commonjs/components/ReferenceList/index.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceList.js +2 -2
- package/lib-commonjs/components/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/{useReferenceListStyles.js → useReferenceListStyles.styles.js} +2 -1
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.js.map +1 -0
- package/lib-commonjs/components/reference-v2/Reference/Reference.js +2 -2
- package/lib-commonjs/components/reference-v2/Reference/Reference.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/Reference.types.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/index.js +4 -4
- package/lib-commonjs/components/reference-v2/Reference/index.js.map +1 -1
- 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 +20 -19
- package/lib-commonjs/components/reference-v2/Reference/useReference.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.js +87 -0
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.js.map +1 -0
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js +2 -2
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.types.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/index.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/index.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js +11 -9
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListContextValues.js +5 -4
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListContextValues.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/{useReferenceListStyles.js → useReferenceListStyles.styles.js} +2 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js.map +1 -0
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js +2 -2
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/index.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/index.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js +26 -17
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/{useReferenceOverflowButtonStyles.js → useReferenceOverflowButtonStyles.styles.js} +3 -33
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js.map +1 -0
- package/lib-commonjs/contexts/reference-v2/referenceListContext.js +5 -4
- package/lib-commonjs/contexts/reference-v2/referenceListContext.js.map +1 -1
- package/lib-commonjs/hooks/reference-v2/useReferenceCitationPreview.js +17 -12
- package/lib-commonjs/hooks/reference-v2/useReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/hooks/useReferenceCitationPreview.js +6 -4
- package/lib-commonjs/hooks/useReferenceCitationPreview.js.map +1 -1
- package/package.json +10 -10
- package/lib/components/Citation/useCitationStyles.js.map +0 -1
- package/lib/components/Reference/useReferenceStyles.js.map +0 -1
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.js.map +0 -1
- package/lib/components/ReferenceList/useReferenceListStyles.js.map +0 -1
- package/lib/components/reference-v2/Reference/useReferenceStyles.js +0 -71
- package/lib/components/reference-v2/Reference/useReferenceStyles.js.map +0 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.js.map +0 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.js.map +0 -1
- package/lib-commonjs/components/Citation/useCitationStyles.js.map +0 -1
- package/lib-commonjs/components/Reference/useReferenceStyles.js.map +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.js.map +0 -1
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.js.map +0 -1
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.js +0 -122
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.js.map +0 -1
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,99 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-reference",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 13 Jun 2024 21:00:14 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-reference_v0.11.4",
|
|
7
|
+
"version": "0.11.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "estebanmu@microsoft.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-reference",
|
|
13
|
+
"commit": "f17f78e440c2dc6b0cd7ac5ac998ccf7f5c475d0",
|
|
14
|
+
"comment": "chore: Disable typecheck for ssr-tests."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "humbertomakotomorimoto@gmail.com",
|
|
18
|
+
"package": "@fluentui-copilot/react-reference",
|
|
19
|
+
"commit": "17abeb1551c78c1c6cabce04f8482172a4b1b667",
|
|
20
|
+
"comment": "chore: Path cleanup on exports and docs."
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"patch": [
|
|
24
|
+
{
|
|
25
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
26
|
+
"package": "@fluentui-copilot/react-reference",
|
|
27
|
+
"commit": "74388025459a4141f03e1053e377509df397f4b0",
|
|
28
|
+
"comment": "fix: Fixing Reference anchor behavior and improving reference-v2 docs."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"author": "humbertomakotomorimoto@gmail.com",
|
|
32
|
+
"package": "@fluentui-copilot/react-reference",
|
|
33
|
+
"commit": "eff11b64e31fb776ddf9d7941da7c7bcd7bea170",
|
|
34
|
+
"comment": "chore: Allow PreviewHeader props to be modified in useReferenceCitationPreview hooks."
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
38
|
+
"package": "@fluentui-copilot/react-reference",
|
|
39
|
+
"commit": "c8d54cf5a0b9f000a1b90fd647c4559d76153f32",
|
|
40
|
+
"comment": "fix: Fixing PreviewHeader styles, taking previewSurfaceProps.children into account in hook, and improving docs."
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"date": "Fri, 31 May 2024 18:42:53 GMT",
|
|
47
|
+
"tag": "@fluentui-copilot/react-reference_v0.11.3",
|
|
48
|
+
"version": "0.11.3",
|
|
49
|
+
"comments": {
|
|
50
|
+
"patch": [
|
|
51
|
+
{
|
|
52
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
53
|
+
"package": "@fluentui-copilot/react-reference",
|
|
54
|
+
"commit": "49d6b52e7778cac38b533448eda8d7441e1b43b1",
|
|
55
|
+
"comment": "chore: Removing tint API from Reference v2 components until we come up with a more robust approach."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
59
|
+
"package": "@fluentui-copilot/react-reference",
|
|
60
|
+
"commit": "dbd9212bded202a2b958699fdaacf75e864b3dbb",
|
|
61
|
+
"comment": "feat: Adding anchor semantics to Reference v2."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"author": "tristan.watanabe@gmail.com",
|
|
65
|
+
"package": "@fluentui-copilot/react-reference",
|
|
66
|
+
"commit": "7583464747aec7a8a79a8c79eaeff85d749025e4",
|
|
67
|
+
"comment": "chore: bump @fluentui dependencies to latest 9.52.0."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
71
|
+
"package": "@fluentui-copilot/react-reference",
|
|
72
|
+
"commit": "d77b903b7d6979cf9fdd91bd6b858c1f228ca3af",
|
|
73
|
+
"comment": "fix(react-reference): Fixing focus behavior when expanding/contracting references."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"author": "owcampbe@microsoft.com",
|
|
77
|
+
"package": "@fluentui-copilot/react-reference",
|
|
78
|
+
"commit": "037f6425eb2ec38ccf1c4f967b3b9db20759fc02",
|
|
79
|
+
"comment": "fix: Restore ReferenceToggle size differences based on CopilotMode."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"author": "seanmonahan@microsoft.com",
|
|
83
|
+
"package": "@fluentui-copilot/react-reference",
|
|
84
|
+
"commit": "c2e14c44cafafbdc10f52b9855384748a7524a63",
|
|
85
|
+
"comment": "chore: add eslint-plugin-react-compiler"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"author": "tristan.watanabe@gmail.com",
|
|
89
|
+
"package": "@fluentui-copilot/react-reference",
|
|
90
|
+
"commit": "6df44dbcd267772e1b62426d14abe54a0b35bb97",
|
|
91
|
+
"comment": "chore: useStyle hook files now properly contain .styles. within filename."
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"date": "Wed, 08 May 2024 22:10:20 GMT",
|
|
6
98
|
"tag": "@fluentui-copilot/react-reference_v0.11.2",
|
|
7
99
|
"version": "0.11.2",
|
|
8
100
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,38 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-reference
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 13 Jun 2024 21:00:14 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.11.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.11.4)
|
|
8
|
+
|
|
9
|
+
Thu, 13 Jun 2024 21:00:14 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.11.3..@fluentui-copilot/react-reference_v0.11.4)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: Fixing Reference anchor behavior and improving reference-v2 docs. ([PR #1698](https://github.com/microsoft/fluentai/pull/1698) by Humberto.Morimoto@microsoft.com)
|
|
15
|
+
- chore: Allow PreviewHeader props to be modified in useReferenceCitationPreview hooks. ([PR #1727](https://github.com/microsoft/fluentai/pull/1727) by humbertomakotomorimoto@gmail.com)
|
|
16
|
+
- fix: Fixing PreviewHeader styles, taking previewSurfaceProps.children into account in hook, and improving docs. ([PR #1702](https://github.com/microsoft/fluentai/pull/1702) by Humberto.Morimoto@microsoft.com)
|
|
17
|
+
|
|
18
|
+
## [0.11.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.11.3)
|
|
19
|
+
|
|
20
|
+
Fri, 31 May 2024 18:42:53 GMT
|
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.11.2..@fluentui-copilot/react-reference_v0.11.3)
|
|
22
|
+
|
|
23
|
+
### Patches
|
|
24
|
+
|
|
25
|
+
- chore: Removing tint API from Reference v2 components until we come up with a more robust approach. ([PR #1688](https://github.com/microsoft/fluentai/pull/1688) by Humberto.Morimoto@microsoft.com)
|
|
26
|
+
- feat: Adding anchor semantics to Reference v2. ([PR #1645](https://github.com/microsoft/fluentai/pull/1645) by Humberto.Morimoto@microsoft.com)
|
|
27
|
+
- chore: bump @fluentui dependencies to latest 9.52.0. ([PR #1657](https://github.com/microsoft/fluentai/pull/1657) by tristan.watanabe@gmail.com)
|
|
28
|
+
- fix(react-reference): Fixing focus behavior when expanding/contracting references. ([PR #1682](https://github.com/microsoft/fluentai/pull/1682) by Humberto.Morimoto@microsoft.com)
|
|
29
|
+
- fix: Restore ReferenceToggle size differences based on CopilotMode. ([PR #1684](https://github.com/microsoft/fluentai/pull/1684) by owcampbe@microsoft.com)
|
|
30
|
+
- chore: add eslint-plugin-react-compiler ([PR #1642](https://github.com/microsoft/fluentai/pull/1642) by seanmonahan@microsoft.com)
|
|
31
|
+
- chore: useStyle hook files now properly contain .styles. within filename. ([PR #1671](https://github.com/microsoft/fluentai/pull/1671) by tristan.watanabe@gmail.com)
|
|
32
|
+
|
|
7
33
|
## [0.11.2](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.11.2)
|
|
8
34
|
|
|
9
|
-
Wed, 08 May 2024 22:
|
|
35
|
+
Wed, 08 May 2024 22:10:20 GMT
|
|
10
36
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.11.1..@fluentui-copilot/react-reference_v0.11.2)
|
|
11
37
|
|
|
12
38
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -88,6 +88,31 @@ export declare type PackagedReferenceV2 = React_2.FC<ReferenceV2Props>;
|
|
|
88
88
|
|
|
89
89
|
declare type PartialReferenceProps = 'citationHref' | 'index' | 'referenceId';
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* PreviewHeader Props
|
|
93
|
+
*/
|
|
94
|
+
declare type PreviewHeaderProps = ComponentProps<Partial<PreviewHeaderSlots>>;
|
|
95
|
+
|
|
96
|
+
declare type PreviewHeaderSlots = {
|
|
97
|
+
root: NonNullable<Slot<'div'>>;
|
|
98
|
+
/**
|
|
99
|
+
* Actions slot.
|
|
100
|
+
*/
|
|
101
|
+
actions: Slot<'div'>;
|
|
102
|
+
/**
|
|
103
|
+
* Citation slot. Displays a `Citation`. Set to `null` to hide the citation.
|
|
104
|
+
*/
|
|
105
|
+
citation: Slot<'span'>;
|
|
106
|
+
/**
|
|
107
|
+
* Label slot. Primary description of the preview.
|
|
108
|
+
*/
|
|
109
|
+
label: NonNullable<Slot<'span'>>;
|
|
110
|
+
/**
|
|
111
|
+
* Media slot. Used to display Avatars, Icons, etc.
|
|
112
|
+
*/
|
|
113
|
+
media: Slot<'div'>;
|
|
114
|
+
};
|
|
115
|
+
|
|
91
116
|
/**
|
|
92
117
|
* PreviewMetadata Props
|
|
93
118
|
*/
|
|
@@ -139,6 +164,7 @@ export declare type ReferenceCitationData = {
|
|
|
139
164
|
citationId?: string;
|
|
140
165
|
citationProps?: PackagedCitationProps;
|
|
141
166
|
referenceProps?: PackagedReferenceProps;
|
|
167
|
+
previewHeaderProps?: PreviewHeaderProps;
|
|
142
168
|
previewProps?: PreviewProps;
|
|
143
169
|
previewSurfaceProps?: PreviewSurfaceProps;
|
|
144
170
|
sensitivityLabelProps?: SensitivityLabelProps;
|
|
@@ -153,7 +179,7 @@ export declare const referenceGroupToggleClassNames: SlotClassNames<ReferenceGro
|
|
|
153
179
|
/**
|
|
154
180
|
* ReferenceGroupToggle Props
|
|
155
181
|
*/
|
|
156
|
-
export declare type ReferenceGroupToggleProps = ComponentProps<ReferenceGroupToggleSlots> & {
|
|
182
|
+
export declare type ReferenceGroupToggleProps = ComponentProps<ReferenceGroupToggleSlots> & CopilotMode & {
|
|
157
183
|
isOpen?: boolean;
|
|
158
184
|
};
|
|
159
185
|
|
|
@@ -165,7 +191,7 @@ export declare type ReferenceGroupToggleSlots = {
|
|
|
165
191
|
/**
|
|
166
192
|
* State used in rendering ReferenceGroupToggle
|
|
167
193
|
*/
|
|
168
|
-
export declare type ReferenceGroupToggleState = ComponentState<ReferenceGroupToggleSlots> & Required<Pick<ReferenceGroupToggleProps, 'isOpen'>>;
|
|
194
|
+
export declare type ReferenceGroupToggleState = ComponentState<ReferenceGroupToggleSlots> & Required<Pick<ReferenceGroupToggleProps, 'isOpen' | 'mode'>>;
|
|
169
195
|
|
|
170
196
|
export declare const ReferenceList: ForwardRefComponent<ReferenceListProps>;
|
|
171
197
|
|
|
@@ -178,7 +204,7 @@ export declare const ReferenceListContextProvider: Provider<ReferenceListContext
|
|
|
178
204
|
/**
|
|
179
205
|
* Context shared between ReferenceList and its children components
|
|
180
206
|
*/
|
|
181
|
-
export declare type ReferenceListContextValue = Pick<ReferenceListV2State, '
|
|
207
|
+
export declare type ReferenceListContextValue = Pick<ReferenceListV2State, 'areReferencesExpanded' | 'maxVisibleReferences' | 'overflowButtonTriggeredViaKeyboard' | 'referenceListRef' | 'shouldUseOverflow' | 'totalReferencesCount'>;
|
|
182
208
|
|
|
183
209
|
/**
|
|
184
210
|
* ReferenceList Props
|
|
@@ -206,11 +232,6 @@ export declare type ReferenceListV2ContextValues = {
|
|
|
206
232
|
};
|
|
207
233
|
|
|
208
234
|
export declare type ReferenceListV2Props = ComponentProps<ReferenceListV2Slots> & {
|
|
209
|
-
/**
|
|
210
|
-
* The appearance of the reference.
|
|
211
|
-
* @default 'lighter'
|
|
212
|
-
*/
|
|
213
|
-
appearance?: 'lighter' | 'darker';
|
|
214
235
|
/**
|
|
215
236
|
* The maximum number of references to display before the overflow button is shown even if there is
|
|
216
237
|
* enough space available to show more.
|
|
@@ -221,16 +242,20 @@ export declare type ReferenceListV2Props = ComponentProps<ReferenceListV2Slots>
|
|
|
221
242
|
};
|
|
222
243
|
|
|
223
244
|
export declare type ReferenceListV2Slots = {
|
|
245
|
+
/** The root of the component that contains the list of references. */
|
|
224
246
|
root: NonNullable<Slot<'div'>>;
|
|
247
|
+
/** A space containing a button that expands the list of references. This slot is only rendered when the list of references is collapsed. */
|
|
225
248
|
showMoreButton?: Slot<'span'>;
|
|
249
|
+
/** A space containing a button that collapses the list of references. This slot is only rendered when the list of references is expanded. */
|
|
226
250
|
showLessButton?: Slot<'span'>;
|
|
227
251
|
};
|
|
228
252
|
|
|
229
|
-
export declare type ReferenceListV2State = ComponentState<ReferenceListV2Slots> &
|
|
253
|
+
export declare type ReferenceListV2State = ComponentState<ReferenceListV2Slots> & Pick<ReferenceListV2Props, 'maxVisibleReferences'> & {
|
|
230
254
|
areReferencesExpanded: boolean;
|
|
231
255
|
overflowButtonTriggeredViaKeyboard: React.MutableRefObject<boolean>;
|
|
232
|
-
|
|
256
|
+
referenceListRef: React.RefObject<HTMLDivElement>;
|
|
233
257
|
shouldUseOverflow: boolean;
|
|
258
|
+
totalReferencesCount: number;
|
|
234
259
|
};
|
|
235
260
|
|
|
236
261
|
export declare const ReferenceOverflowButton: ForwardRefComponent<ReferenceOverflowButtonProps>;
|
|
@@ -242,21 +267,22 @@ export declare const referenceOverflowButtonClassNames: SlotClassNames<Reference
|
|
|
242
267
|
*/
|
|
243
268
|
export declare type ReferenceOverflowButtonProps = ComponentProps<ReferenceOverflowButtonSlots> & {
|
|
244
269
|
/**
|
|
245
|
-
* The
|
|
246
|
-
*
|
|
270
|
+
* The text that is displayed inside of the overflow button. This text is only displayed when `children` has not been passed to the component.
|
|
271
|
+
* If a string is passed, that is what is rendered verbatim.
|
|
272
|
+
* If a callback is passed, the callback is called with the number of items that are overflowing, and the result of the callback is rendered.
|
|
247
273
|
*/
|
|
248
|
-
appearance?: 'lighter' | 'darker';
|
|
249
274
|
text?: string | ((overflowCount: number) => React.ReactNode);
|
|
250
275
|
};
|
|
251
276
|
|
|
252
277
|
export declare type ReferenceOverflowButtonSlots = {
|
|
278
|
+
/** The root of the component that renders the overflow button. */
|
|
253
279
|
root: Slot<'button'>;
|
|
254
280
|
};
|
|
255
281
|
|
|
256
282
|
/**
|
|
257
283
|
* State used in rendering ReferenceOverflowButton
|
|
258
284
|
*/
|
|
259
|
-
export declare type ReferenceOverflowButtonState = ComponentState<ReferenceOverflowButtonSlots> &
|
|
285
|
+
export declare type ReferenceOverflowButtonState = ComponentState<ReferenceOverflowButtonSlots> & {
|
|
260
286
|
shouldRenderOverflowButton: boolean;
|
|
261
287
|
};
|
|
262
288
|
|
|
@@ -356,26 +382,25 @@ export declare const ReferenceV2: ForwardRefComponent<ReferenceV2Props>;
|
|
|
356
382
|
export declare const referenceV2ClassNames: SlotClassNames<ReferenceV2Slots>;
|
|
357
383
|
|
|
358
384
|
export declare const referenceV2ExtraClassNames: {
|
|
359
|
-
|
|
385
|
+
graphicChild: string;
|
|
360
386
|
};
|
|
361
387
|
|
|
362
|
-
export declare type ReferenceV2Props = ComponentProps<Partial<ReferenceV2Slots>> & {
|
|
363
|
-
/**
|
|
364
|
-
* The appearance of the reference.
|
|
365
|
-
* @default 'lighter'
|
|
366
|
-
*/
|
|
367
|
-
appearance?: 'lighter' | 'darker';
|
|
368
|
-
};
|
|
388
|
+
export declare type ReferenceV2Props = ComponentProps<Partial<ReferenceV2Slots>> & {};
|
|
369
389
|
|
|
370
390
|
export declare type ReferenceV2Slots = {
|
|
371
|
-
root
|
|
391
|
+
/** The root of the component that renders the reference as either a button or an anchor element. */
|
|
392
|
+
root: NonNullable<Slot<'button', 'a'>>;
|
|
393
|
+
/** The number of the citation this reference corresponds to. */
|
|
372
394
|
citation?: Slot<'span'>;
|
|
395
|
+
/** A divider that visually separates the citation from the content of the reference. */
|
|
373
396
|
divider?: Slot<'span'>;
|
|
397
|
+
/** A space containing the content of the reference, which goes into an ellipsis if it overflows. */
|
|
374
398
|
content?: Slot<'span'>;
|
|
375
|
-
|
|
399
|
+
/** A space within the content slot where a graphic such as an icon or an image can be displayed before the rest of the content. */
|
|
400
|
+
graphic?: Slot<'span'>;
|
|
376
401
|
};
|
|
377
402
|
|
|
378
|
-
export declare type ReferenceV2State = ComponentState<ReferenceV2Slots> & Required<Pick<ReferenceV2Props, '
|
|
403
|
+
export declare type ReferenceV2State = ComponentState<ReferenceV2Slots> & Required<Pick<ReferenceV2Props, 'id'>> & Pick<ReferenceListV2State, 'shouldUseOverflow'>;
|
|
379
404
|
|
|
380
405
|
/**
|
|
381
406
|
* Render the final JSX of Citation
|
|
@@ -493,6 +518,7 @@ export declare type UseReferenceCitationPreviewV2Props = {
|
|
|
493
518
|
citationProps?: CitationProps;
|
|
494
519
|
index: number;
|
|
495
520
|
previewContentProps?: PackagedPreviewContentV2Props;
|
|
521
|
+
previewHeaderProps?: PreviewHeaderProps;
|
|
496
522
|
referencePreviewProps?: PreviewProps;
|
|
497
523
|
referencePreviewSurfaceProps?: PreviewSurfaceProps;
|
|
498
524
|
referenceProps?: ReferenceV2Props;
|
|
@@ -602,6 +628,6 @@ export declare const useReferenceStylesV2_unstable: (state: ReferenceV2State) =>
|
|
|
602
628
|
* @param props - props from this instance of Reference
|
|
603
629
|
* @param ref - reference to root HTMLElement of Reference
|
|
604
630
|
*/
|
|
605
|
-
export declare const useReferenceV2_unstable: (props: ReferenceV2Props, ref: React_2.Ref<HTMLButtonElement>) => ReferenceV2State;
|
|
631
|
+
export declare const useReferenceV2_unstable: (props: ReferenceV2Props, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => ReferenceV2State;
|
|
606
632
|
|
|
607
633
|
export { }
|
package/lib/ReferenceListV2.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components/reference-v2/ReferenceList';
|
|
1
|
+
export * from './components/reference-v2/ReferenceList/index';
|
|
2
2
|
//# sourceMappingURL=ReferenceListV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceListV2.ts"],"sourcesContent":["export * from './components/reference-v2/ReferenceList';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"sources":["ReferenceListV2.ts"],"sourcesContent":["export * from './components/reference-v2/ReferenceList/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,gDAAgD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components/reference-v2/ReferenceOverflowButton';
|
|
1
|
+
export * from './components/reference-v2/ReferenceOverflowButton/index';
|
|
2
2
|
//# sourceMappingURL=ReferenceOverflowButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceOverflowButton.ts"],"sourcesContent":["export * from './components/reference-v2/ReferenceOverflowButton';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"sources":["ReferenceOverflowButton.ts"],"sourcesContent":["export * from './components/reference-v2/ReferenceOverflowButton/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,0DAA0D"}
|
package/lib/ReferenceV2.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './components/reference-v2/Reference';
|
|
1
|
+
export * from './components/reference-v2/Reference/index';
|
|
2
2
|
//# sourceMappingURL=ReferenceV2.js.map
|
package/lib/ReferenceV2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceV2.ts"],"sourcesContent":["export * from './components/reference-v2/Reference';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"sources":["ReferenceV2.ts"],"sourcesContent":["export * from './components/reference-v2/Reference/index';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,4CAA4C"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useCitation_unstable } from './useCitation';
|
|
3
3
|
import { renderCitation_unstable } from './renderCitation';
|
|
4
|
-
import { useCitationStyles_unstable } from './useCitationStyles';
|
|
4
|
+
import { useCitationStyles_unstable } from './useCitationStyles.styles';
|
|
5
5
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
6
6
|
// Citation component - TODO: add more docs
|
|
7
7
|
export const Citation = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Citation.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCitation_unstable } from './useCitation';\nimport { renderCitation_unstable } from './renderCitation';\nimport { useCitationStyles_unstable } from './useCitationStyles';\nimport type { CitationProps } from './Citation.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Citation component - TODO: add more docs\nexport const Citation: ForwardRefComponent<CitationProps> = React.forwardRef((props, ref) => {\n const state = useCitation_unstable(props, ref);\n\n useCitationStyles_unstable(state);\n useCustomStyleHook('useCitationStyles')(state);\n\n return renderCitation_unstable(state);\n});\n\nCitation.displayName = 'Citation';\n"],"names":["React","useCitation_unstable","renderCitation_unstable","useCitationStyles_unstable","useCustomStyleHook","Citation","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,
|
|
1
|
+
{"version":3,"sources":["Citation.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCitation_unstable } from './useCitation';\nimport { renderCitation_unstable } from './renderCitation';\nimport { useCitationStyles_unstable } from './useCitationStyles.styles';\nimport type { CitationProps } from './Citation.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Citation component - TODO: add more docs\nexport const Citation: ForwardRefComponent<CitationProps> = React.forwardRef((props, ref) => {\n const state = useCitation_unstable(props, ref);\n\n useCitationStyles_unstable(state);\n useCustomStyleHook('useCitationStyles')(state);\n\n return renderCitation_unstable(state);\n});\n\nCitation.displayName = 'Citation';\n"],"names":["React","useCitation_unstable","renderCitation_unstable","useCitationStyles_unstable","useCustomStyleHook","Citation","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,oBAAoB,QAAQ,gBAAgB;AACrD,SAASC,uBAAuB,QAAQ,mBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,6BAA6B;AAGxE,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,2CAA2C;AAC3C,OAAO,MAAMC,yBAA+CL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQR,qBAAqBM,OAAOC;IAE1CL,2BAA2BM;IAC3BL,mBAAmB,qBAAqBK;IAExC,OAAOP,wBAAwBO;AACjC,GAAG;AAEHJ,SAASK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Citation';\nexport * from './Citation.types';\nexport * from './renderCitation';\nexport * from './useCitation';\nexport * from './useCitationStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Citation';\nexport * from './Citation.types';\nexport * from './renderCitation';\nexport * from './useCitation';\nexport * from './useCitationStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,mBAAmB;AACjC,cAAc,gBAAgB;AAC9B,cAAc,6BAA6B"}
|
|
@@ -31,9 +31,11 @@ const useCitationRootStyles = __styles({
|
|
|
31
31
|
* Apply styling to the Citation slots based on the state
|
|
32
32
|
*/
|
|
33
33
|
export const useCitationStyles_unstable = state => {
|
|
34
|
+
'use no memo';
|
|
35
|
+
|
|
34
36
|
const rootBaseClassName = useCitationBaseClassName();
|
|
35
37
|
const rootStyles = useCitationRootStyles();
|
|
36
38
|
state.root.className = mergeClasses(citationClassNames.root, state.isPopoverLocked && rootStyles.isPopoverLocked, state.block && rootStyles.isBlock, rootBaseClassName, state.root.className);
|
|
37
39
|
return state;
|
|
38
40
|
};
|
|
39
|
-
//# sourceMappingURL=useCitationStyles.js.map
|
|
41
|
+
//# sourceMappingURL=useCitationStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useCitationStyles.styles.ts"],"sourcesContent":["import {\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport type { CitationSlots, CitationState } from './Citation.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const citationClassNames: SlotClassNames<CitationSlots> = {\n root: 'fai-Citation',\n};\n\nconst useCitationBaseClassName = makeResetStyles({\n display: 'inline-flex',\n justifyContent: 'center',\n boxSizing: 'border-box',\n alignItems: 'center',\n ...typographyStyles.caption2Strong,\n\n color: tokens.colorNeutralForeground2,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n\n minWidth: '14px',\n height: '14px',\n verticalAlign: `calc((${typographyStyles.caption2Strong.lineHeight} - ${typographyStyles.caption2Strong.fontSize}) / 2)`,\n\n borderRadius: tokens.borderRadiusMedium,\n\n textDecoration: 'none',\n\n marginLeft: tokens.spacingHorizontalXXS,\n marginRight: tokens.spacingHorizontalXXS,\n\n ':hover': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Hover,\n borderColor: tokens.colorBrandStroke2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n\n ':hover:active': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Pressed,\n borderColor: tokens.colorBrandStroke2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n});\n\nconst useCitationRootStyles = makeStyles({\n isBlock: {\n display: 'flex',\n marginLeft: 0,\n marginRight: 0,\n },\n isPopoverLocked: {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n ':hover': {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n },\n },\n});\n\n/**\n * Apply styling to the Citation slots based on the state\n */\nexport const useCitationStyles_unstable = (state: CitationState): CitationState => {\n 'use no memo';\n\n const rootBaseClassName = useCitationBaseClassName();\n const rootStyles = useCitationRootStyles();\n\n state.root.className = mergeClasses(\n citationClassNames.root,\n state.isPopoverLocked && rootStyles.isPopoverLocked,\n state.block && rootStyles.isBlock,\n rootBaseClassName,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","citationClassNames","root","useCitationBaseClassName","display","justifyContent","boxSizing","alignItems","caption2Strong","color","colorNeutralForeground2","border","strokeWidthThin","colorNeutralStroke2","minWidth","height","verticalAlign","lineHeight","fontSize","borderRadius","borderRadiusMedium","textDecoration","marginLeft","spacingHorizontalXXS","marginRight","cursor","colorBrandForeground2Hover","borderColor","colorBrandStroke2Hover","backgroundColor","colorBrandBackground2Hover","colorBrandForeground2Pressed","colorBrandStroke2Pressed","colorBrandBackground2Pressed","useCitationRootStyles","isBlock","isPopoverLocked","colorBrandBackground2","useCitationStyles_unstable","state","rootBaseClassName","rootStyles","className","block"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AAIpC,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,MAAMC,2BAA2BR,gBAAgB;IAC/CS,SAAS;IACTC,gBAAgB;IAChBC,WAAW;IACXC,YAAY;IACZ,GAAGP,iBAAiBQ,cAAc;IAElCC,OAAOV,OAAOW,uBAAuB;IACrCC,QAAQ,CAAC,EAAEZ,OAAOa,eAAe,CAAC,OAAO,EAAEb,OAAOc,mBAAmB,CAAC,CAAC;IAEvEC,UAAU;IACVC,QAAQ;IACRC,eAAe,CAAC,MAAM,EAAEhB,iBAAiBQ,cAAc,CAACS,UAAU,CAAC,GAAG,EAAEjB,iBAAiBQ,cAAc,CAACU,QAAQ,CAAC,MAAM,CAAC;IAExHC,cAAcpB,OAAOqB,kBAAkB;IAEvCC,gBAAgB;IAEhBC,YAAYvB,OAAOwB,oBAAoB;IACvCC,aAAazB,OAAOwB,oBAAoB;IAExC,UAAU;QACRE,QAAQ;QACRhB,OAAOV,OAAO2B,0BAA0B;QACxCC,aAAa5B,OAAO6B,sBAAsB;QAC1CC,iBAAiB9B,OAAO+B,0BAA0B;IACpD;IAEA,iBAAiB;QACfL,QAAQ;QACRhB,OAAOV,OAAOgC,4BAA4B;QAC1CJ,aAAa5B,OAAOiC,wBAAwB;QAC5CH,iBAAiB9B,OAAOkC,4BAA4B;IACtD;AACF;AAEA,MAAMC,wBAAwBtC,WAAW;IACvCuC,SAAS;QACP/B,SAAS;QACTkB,YAAY;QACZE,aAAa;IACf;IACAY,iBAAiB;QACf3B,OAAOV,OAAOgC,4BAA4B;QAC1C,GAAGjC,WAAW6B,WAAW,CAAC5B,OAAOiC,wBAAwB,CAAC;QAC1DH,iBAAiB9B,OAAOsC,qBAAqB;QAC7C,UAAU;YACR5B,OAAOV,OAAOgC,4BAA4B;YAC1C,GAAGjC,WAAW6B,WAAW,CAAC5B,OAAOiC,wBAAwB,CAAC;YAC1DH,iBAAiB9B,OAAOsC,qBAAqB;QAC/C;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC;IAEA,MAAMC,oBAAoBrC;IAC1B,MAAMsC,aAAaP;IAEnBK,MAAMrC,IAAI,CAACwC,SAAS,GAAG7C,aACrBI,mBAAmBC,IAAI,EACvBqC,MAAMH,eAAe,IAAIK,WAAWL,eAAe,EACnDG,MAAMI,KAAK,IAAIF,WAAWN,OAAO,EACjCK,mBACAD,MAAMrC,IAAI,CAACwC,SAAS;IAGtB,OAAOH;AACT,EAAE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useReference_unstable } from './useReference';
|
|
3
3
|
import { renderReference_unstable } from './renderReference';
|
|
4
|
-
import { useReferenceStyles_unstable } from './useReferenceStyles';
|
|
4
|
+
import { useReferenceStyles_unstable } from './useReferenceStyles.styles';
|
|
5
5
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
6
6
|
// Reference component - TODO: add more docs
|
|
7
7
|
export const Reference = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Reference.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReference_unstable } from './useReference';\nimport { renderReference_unstable } from './renderReference';\nimport { useReferenceStyles_unstable } from './useReferenceStyles';\nimport type { ReferenceProps } from './Reference.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Reference component - TODO: add more docs\nexport const Reference: ForwardRefComponent<ReferenceProps> = React.forwardRef((props, ref) => {\n const state = useReference_unstable(props, ref);\n\n useReferenceStyles_unstable(state);\n useCustomStyleHook('useReferenceStyles')(state);\n\n return renderReference_unstable(state);\n});\n\nReference.displayName = 'Reference';\n"],"names":["React","useReference_unstable","renderReference_unstable","useReferenceStyles_unstable","useCustomStyleHook","Reference","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,
|
|
1
|
+
{"version":3,"sources":["Reference.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReference_unstable } from './useReference';\nimport { renderReference_unstable } from './renderReference';\nimport { useReferenceStyles_unstable } from './useReferenceStyles.styles';\nimport type { ReferenceProps } from './Reference.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Reference component - TODO: add more docs\nexport const Reference: ForwardRefComponent<ReferenceProps> = React.forwardRef((props, ref) => {\n const state = useReference_unstable(props, ref);\n\n useReferenceStyles_unstable(state);\n useCustomStyleHook('useReferenceStyles')(state);\n\n return renderReference_unstable(state);\n});\n\nReference.displayName = 'Reference';\n"],"names":["React","useReference_unstable","renderReference_unstable","useReferenceStyles_unstable","useCustomStyleHook","Reference","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,8BAA8B;AAG1E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,4CAA4C;AAC5C,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAC5BL,mBAAmB,sBAAsBK;IAEzC,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Reference';\nexport * from './Reference.types';\nexport * from './renderReference';\nexport * from './useReference';\nexport * from './useReferenceStyles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,iBAAiB;AAC/B,cAAc,
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Reference';\nexport * from './Reference.types';\nexport * from './renderReference';\nexport * from './useReference';\nexport * from './useReferenceStyles.styles';\n"],"names":[],"rangeMappings":";;;;","mappings":"AAAA,cAAc,cAAc;AAC5B,cAAc,oBAAoB;AAClC,cAAc,oBAAoB;AAClC,cAAc,iBAAiB;AAC/B,cAAc,8BAA8B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Button, Caption1, getIntrinsicElementProps, mergeCallbacks, mergeClasses, slot, useId, usePopoverContext_unstable as usePopoverContext } from '@fluentui/react-components';
|
|
3
3
|
import { ChevronDown24Regular, ChevronUp24Regular, ChevronDown16Regular, ChevronUp16Regular } from '@fluentui/react-icons';
|
|
4
|
-
import { referenceExtraClassNames } from './useReferenceStyles';
|
|
4
|
+
import { referenceExtraClassNames } from './useReferenceStyles.styles';
|
|
5
5
|
import { Citation } from '../Citation';
|
|
6
6
|
import { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';
|
|
7
7
|
import { useCopilotMode } from '@fluentui-copilot/react-provider';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReference.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Button,\n Caption1,\n getIntrinsicElementProps,\n mergeCallbacks,\n mergeClasses,\n slot,\n useId,\n usePopoverContext_unstable as usePopoverContext,\n} from '@fluentui/react-components';\nimport {\n ChevronDown24Regular,\n ChevronUp24Regular,\n ChevronDown16Regular,\n ChevronUp16Regular,\n} from '@fluentui/react-icons';\nimport { referenceExtraClassNames } from './useReferenceStyles';\nimport { Citation } from '../Citation';\nimport type { ReferenceProps, ReferenceState } from './Reference.types';\nimport { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Reference.\n *\n * The returned state can be modified with hooks such as useReferenceStyles_unstable,\n * before being passed to renderReference_unstable.\n *\n * @param props - props from this instance of Reference\n * @param ref - reference to root HTMLElement of Reference\n */\nexport const useReference_unstable = (props: ReferenceProps, ref: React.Ref<HTMLDivElement>): ReferenceState => {\n const { index, referenceId, citationHref, excerpt, layout = 'inline' } = props;\n\n const mode = useCopilotMode(props.mode);\n\n const labelId = useId();\n const mediaId = useId();\n const [isExpanded, setIsExpanded] = React.useState(layout === 'popover' ? true : false);\n\n const setPopoverOpen = usePopoverContext(context => context.setOpen);\n\n const onExpandClick: React.MouseEventHandler<HTMLButtonElement> = _e => {\n setIsExpanded(!isExpanded);\n };\n\n const label = slot.always(props.label, {\n defaultProps: { id: labelId },\n elementType: 'div',\n });\n const media = slot.optional(props.media, { defaultProps: { id: mediaId }, elementType: 'div' });\n if (media && React.isValidElement<HTMLElement>(media.children)) {\n media.children = React.cloneElement(media.children, {\n className: mergeClasses(media.children.props.className, referenceExtraClassNames.mediaChild),\n });\n }\n\n if (media?.id) {\n label['aria-describedby'] = label['aria-describedby']?.concat(media.id) ?? media.id;\n }\n\n const ariaLabelledByProp = props['aria-labelledby'];\n const groupSemantics = React.useMemo(() => {\n return layout === 'inline'\n ? {\n role: 'group',\n 'aria-labelledby': `${ariaLabelledByProp ?? ''} ${label.id}`,\n tabIndex: -1,\n }\n : {};\n }, [layout, ariaLabelledByProp, label.id]);\n\n // Within a popup, a citation should function as a close button\n const citationProps = React.useMemo(() => {\n const onPopoverCloseClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n setPopoverOpen(e, false);\n\n // don't navigate\n e.preventDefault();\n };\n\n return layout === 'popover'\n ? {\n referenceHref: '#',\n tabIndex: -1,\n 'aria-label': `Reference ${index}, close`,\n onClick: onPopoverCloseClick,\n }\n : {\n referenceHref: citationHref,\n };\n }, [layout, citationHref, index, setPopoverOpen]);\n\n const state: ReferenceState = {\n isExpanded,\n mode: layout === 'popover' ? 'sidecar' : mode,\n layout,\n index,\n components: {\n root: 'div',\n citation: 'div',\n media: 'div',\n actions: 'div',\n label: 'div',\n sensitivity: 'span',\n metadata: 'div',\n content: 'div',\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n icon: 'span',\n detailsButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n id: referenceId,\n ...groupSemantics,\n ...props,\n }),\n { elementType: 'div' },\n ),\n citation: slot.optional(props.citation, {\n defaultProps: {\n children: (\n <Citation block {...citationProps}>\n {index}\n </Citation>\n ),\n },\n renderByDefault: true,\n elementType: 'div',\n }),\n media,\n actions: slot.optional(layout === 'inline' ? props.actions : null, {\n renderByDefault: true,\n elementType: 'div',\n }),\n label,\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n metadata: slot.always(props.metadata, { elementType: 'div' }),\n primaryText: slot.optional(props.primaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n tertiaryText: slot.optional(props.tertiaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n content: slot.always(props.content, {\n defaultProps: {\n children: excerpt && <Caption1>{excerpt}</Caption1>,\n },\n elementType: 'div',\n }),\n detailsButton: slot.optional(layout === 'inline' ? props.detailsButton : null, {\n defaultProps: {\n appearance: 'transparent',\n 'aria-expanded': isExpanded,\n 'aria-label': 'show details',\n size: mode === 'sidecar' ? 'small' : 'medium',\n icon: {\n children: getIcon(isExpanded, mode),\n },\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n if (state.detailsButton) {\n const onClick = state.detailsButton.onClick as React.MouseEventHandler<HTMLButtonElement>;\n state.detailsButton.onClick = mergeCallbacks(onClick, onExpandClick);\n }\n\n const referenceGroupSetOpen = useReferenceGroupSetOpen();\n const onTargettedByCitation = (e: React.FocusEvent<HTMLElement>) => {\n const relatedTargetHash: string | undefined = (e.relatedTarget as HTMLAnchorElement)?.hash;\n if (relatedTargetHash && relatedTargetHash.substring(1) === referenceId) {\n referenceGroupSetOpen();\n setIsExpanded(true);\n }\n };\n state.root.onFocus = mergeCallbacks(state.root.onFocus, onTargettedByCitation);\n\n return state;\n};\n\nconst getIcon = (isExpanded: boolean, mode: ReferenceProps['mode']): JSX.Element => {\n if (mode === 'sidecar') {\n return !isExpanded ? <ChevronDown16Regular /> : <ChevronUp16Regular />;\n }\n\n return !isExpanded ? <ChevronDown24Regular /> : <ChevronUp24Regular />;\n};\n"],"names":["React","Button","Caption1","getIntrinsicElementProps","mergeCallbacks","mergeClasses","slot","useId","usePopoverContext_unstable","usePopoverContext","ChevronDown24Regular","ChevronUp24Regular","ChevronDown16Regular","ChevronUp16Regular","referenceExtraClassNames","Citation","useReferenceGroupSetOpen","useCopilotMode","useReference_unstable","props","ref","index","referenceId","citationHref","excerpt","layout","mode","labelId","mediaId","isExpanded","setIsExpanded","useState","setPopoverOpen","context","setOpen","onExpandClick","_e","label","always","defaultProps","id","elementType","media","optional","isValidElement","children","cloneElement","className","mediaChild","concat","ariaLabelledByProp","groupSemantics","useMemo","role","tabIndex","citationProps","onPopoverCloseClick","e","preventDefault","referenceHref","onClick","state","components","root","citation","actions","sensitivity","metadata","content","primaryText","secondaryText","tertiaryText","icon","detailsButton","block","renderByDefault","hidden","appearance","size","getIcon","referenceGroupSetOpen","onTargettedByCitation","relatedTargetHash","relatedTarget","hash","substring","onFocus"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,MAAM,EACNC,QAAQ,EACRC,wBAAwB,EACxBC,cAAc,EACdC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,8BAA8BC,iBAAiB,QAC1C,6BAA6B;AACpC,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,QACb,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,uBAAuB;AAChE,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,wBAAwB,QAAQ,uCAAuC;AAChF,SAASC,cAAc,QAAQ,mCAAmC;AAElE;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,KAAK,EAAEC,WAAW,EAAEC,YAAY,EAAEC,OAAO,EAAEC,SAAS,QAAQ,EAAE,GAAGN;IAEzE,MAAMO,OAAOT,eAAeE,MAAMO,IAAI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BA,kBAAkBG,SAAS,CAAC,OAAO/D,aAAa;YACvE0D;YACAlD,cAAc;QAChB;IACF;IACA+B,MAAME,IAAI,CAACuB,OAAO,GAAGlF,eAAeyD,MAAME,IAAI,CAACuB,OAAO,EAAEL;IAExD,OAAOpB;AACT,EAAE;AAEF,MAAMkB,UAAU,CAAClD,YAAqBH;IACpC,IAAIA,SAAS,WAAW;QACtB,OAAO,CAACG,2BAAa,oBAACjB,4CAA0B,oBAACC;IACnD;IAEA,OAAO,CAACgB,2BAAa,oBAACnB,4CAA0B,oBAACC;AACnD"}
|
|
1
|
+
{"version":3,"sources":["useReference.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Button,\n Caption1,\n getIntrinsicElementProps,\n mergeCallbacks,\n mergeClasses,\n slot,\n useId,\n usePopoverContext_unstable as usePopoverContext,\n} from '@fluentui/react-components';\nimport {\n ChevronDown24Regular,\n ChevronUp24Regular,\n ChevronDown16Regular,\n ChevronUp16Regular,\n} from '@fluentui/react-icons';\nimport { referenceExtraClassNames } from './useReferenceStyles.styles';\nimport { Citation } from '../Citation';\nimport type { ReferenceProps, ReferenceState } from './Reference.types';\nimport { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Reference.\n *\n * The returned state can be modified with hooks such as useReferenceStyles_unstable,\n * before being passed to renderReference_unstable.\n *\n * @param props - props from this instance of Reference\n * @param ref - reference to root HTMLElement of Reference\n */\nexport const useReference_unstable = (props: ReferenceProps, ref: React.Ref<HTMLDivElement>): ReferenceState => {\n const { index, referenceId, citationHref, excerpt, layout = 'inline' } = props;\n\n const mode = useCopilotMode(props.mode);\n\n const labelId = useId();\n const mediaId = useId();\n const [isExpanded, setIsExpanded] = React.useState(layout === 'popover' ? true : false);\n\n const setPopoverOpen = usePopoverContext(context => context.setOpen);\n\n const onExpandClick: React.MouseEventHandler<HTMLButtonElement> = _e => {\n setIsExpanded(!isExpanded);\n };\n\n const label = slot.always(props.label, {\n defaultProps: { id: labelId },\n elementType: 'div',\n });\n const media = slot.optional(props.media, { defaultProps: { id: mediaId }, elementType: 'div' });\n if (media && React.isValidElement<HTMLElement>(media.children)) {\n media.children = React.cloneElement(media.children, {\n className: mergeClasses(media.children.props.className, referenceExtraClassNames.mediaChild),\n });\n }\n\n if (media?.id) {\n label['aria-describedby'] = label['aria-describedby']?.concat(media.id) ?? media.id;\n }\n\n const ariaLabelledByProp = props['aria-labelledby'];\n const groupSemantics = React.useMemo(() => {\n return layout === 'inline'\n ? {\n role: 'group',\n 'aria-labelledby': `${ariaLabelledByProp ?? ''} ${label.id}`,\n tabIndex: -1,\n }\n : {};\n }, [layout, ariaLabelledByProp, label.id]);\n\n // Within a popup, a citation should function as a close button\n const citationProps = React.useMemo(() => {\n const onPopoverCloseClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n setPopoverOpen(e, false);\n\n // don't navigate\n e.preventDefault();\n };\n\n return layout === 'popover'\n ? {\n referenceHref: '#',\n tabIndex: -1,\n 'aria-label': `Reference ${index}, close`,\n onClick: onPopoverCloseClick,\n }\n : {\n referenceHref: citationHref,\n };\n }, [layout, citationHref, index, setPopoverOpen]);\n\n const state: ReferenceState = {\n isExpanded,\n mode: layout === 'popover' ? 'sidecar' : mode,\n layout,\n index,\n components: {\n root: 'div',\n citation: 'div',\n media: 'div',\n actions: 'div',\n label: 'div',\n sensitivity: 'span',\n metadata: 'div',\n content: 'div',\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n icon: 'span',\n detailsButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n id: referenceId,\n ...groupSemantics,\n ...props,\n }),\n { elementType: 'div' },\n ),\n citation: slot.optional(props.citation, {\n defaultProps: {\n children: (\n <Citation block {...citationProps}>\n {index}\n </Citation>\n ),\n },\n renderByDefault: true,\n elementType: 'div',\n }),\n media,\n actions: slot.optional(layout === 'inline' ? props.actions : null, {\n renderByDefault: true,\n elementType: 'div',\n }),\n label,\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n metadata: slot.always(props.metadata, { elementType: 'div' }),\n primaryText: slot.optional(props.primaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n tertiaryText: slot.optional(props.tertiaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n content: slot.always(props.content, {\n defaultProps: {\n children: excerpt && <Caption1>{excerpt}</Caption1>,\n },\n elementType: 'div',\n }),\n detailsButton: slot.optional(layout === 'inline' ? props.detailsButton : null, {\n defaultProps: {\n appearance: 'transparent',\n 'aria-expanded': isExpanded,\n 'aria-label': 'show details',\n size: mode === 'sidecar' ? 'small' : 'medium',\n icon: {\n children: getIcon(isExpanded, mode),\n },\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n if (state.detailsButton) {\n const onClick = state.detailsButton.onClick as React.MouseEventHandler<HTMLButtonElement>;\n state.detailsButton.onClick = mergeCallbacks(onClick, onExpandClick);\n }\n\n const referenceGroupSetOpen = useReferenceGroupSetOpen();\n const onTargettedByCitation = (e: React.FocusEvent<HTMLElement>) => {\n const relatedTargetHash: string | undefined = (e.relatedTarget as HTMLAnchorElement)?.hash;\n if (relatedTargetHash && relatedTargetHash.substring(1) === referenceId) {\n referenceGroupSetOpen();\n setIsExpanded(true);\n }\n };\n state.root.onFocus = mergeCallbacks(state.root.onFocus, onTargettedByCitation);\n\n return state;\n};\n\nconst getIcon = (isExpanded: boolean, mode: ReferenceProps['mode']): JSX.Element => {\n if (mode === 'sidecar') {\n return !isExpanded ? <ChevronDown16Regular /> : <ChevronUp16Regular />;\n }\n\n return !isExpanded ? <ChevronDown24Regular /> : <ChevronUp24Regular />;\n};\n"],"names":["React","Button","Caption1","getIntrinsicElementProps","mergeCallbacks","mergeClasses","slot","useId","usePopoverContext_unstable","usePopoverContext","ChevronDown24Regular","ChevronUp24Regular","ChevronDown16Regular","ChevronUp16Regular","referenceExtraClassNames","Citation","useReferenceGroupSetOpen","useCopilotMode","useReference_unstable","props","ref","index","referenceId","citationHref","excerpt","layout","mode","labelId","mediaId","isExpanded","setIsExpanded","useState","setPopoverOpen","context","setOpen","onExpandClick","_e","label","always","defaultProps","id","elementType","media","optional","isValidElement","children","cloneElement","className","mediaChild","concat","ariaLabelledByProp","groupSemantics","useMemo","role","tabIndex","citationProps","onPopoverCloseClick","e","preventDefault","referenceHref","onClick","state","components","root","citation","actions","sensitivity","metadata","content","primaryText","secondaryText","tertiaryText","icon","detailsButton","block","renderByDefault","hidden","appearance","size","getIcon","referenceGroupSetOpen","onTargettedByCitation","relatedTargetHash","relatedTarget","hash","substring","onFocus"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,MAAM,EACNC,QAAQ,EACRC,wBAAwB,EACxBC,cAAc,EACdC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,8BAA8BC,iBAAiB,QAC1C,6BAA6B;AACpC,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,QACb,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,8BAA8B;AACvE,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,wBAAwB,QAAQ,uCAAuC;AAChF,SAASC,cAAc,QAAQ,mCAAmC;AAElE;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC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B,MAAMiE,wBAAwB,CAACxB;YACkBA;QAA/C,MAAMyB,qBAAyCzB,mBAAAA,EAAE0B,aAAa,cAAf1B,uCAAD,AAACA,iBAAuC2B,IAAI;QAC1F,IAAIF,qBAAqBA,kBAAkBG,SAAS,CAAC,OAAO/D,aAAa;YACvE0D;YACAlD,cAAc;QAChB;IACF;IACA+B,MAAME,IAAI,CAACuB,OAAO,GAAGlF,eAAeyD,MAAME,IAAI,CAACuB,OAAO,EAAEL;IAExD,OAAOpB;AACT,EAAE;AAEF,MAAMkB,UAAU,CAAClD,YAAqBH;IACpC,IAAIA,SAAS,WAAW;QACtB,OAAO,CAACG,2BAAa,oBAACjB,4CAA0B,oBAACC;IACnD;IAEA,OAAO,CAACgB,2BAAa,oBAACnB,4CAA0B,oBAACC;AACnD"}
|
|
@@ -168,6 +168,8 @@ const useLabelStyles = __styles({
|
|
|
168
168
|
* Apply styling to the Reference slots based on the state
|
|
169
169
|
*/
|
|
170
170
|
export const useReferenceStyles_unstable = state => {
|
|
171
|
+
'use no memo';
|
|
172
|
+
|
|
171
173
|
const {
|
|
172
174
|
isExpanded,
|
|
173
175
|
mode,
|
|
@@ -213,4 +215,4 @@ export const useReferenceStyles_unstable = state => {
|
|
|
213
215
|
}
|
|
214
216
|
return state;
|
|
215
217
|
};
|
|
216
|
-
//# sourceMappingURL=useReferenceStyles.js.map
|
|
218
|
+
//# sourceMappingURL=useReferenceStyles.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useReferenceStyles.styles.ts"],"sourcesContent":["import {\n buttonClassNames,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport type { ReferenceSlots, ReferenceState } from './Reference.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const referenceClassNames: SlotClassNames<ReferenceSlots> = {\n root: 'fai-Reference',\n citation: 'fai-Reference__citation',\n media: 'fai-Reference__media',\n actions: 'fai-Reference__actions',\n sensitivity: 'fai-Reference__sensitivity',\n metadata: 'fai-Reference__metadata',\n primaryText: 'fai-Reference__primaryText',\n secondaryText: 'fai-Reference__secondaryText',\n tertiaryText: 'fai-Reference__tertiaryText',\n icon: 'fai-Reference__icon',\n label: 'fai-Reference__label',\n content: 'fai-Reference__content',\n detailsButton: 'fai-Reference__detailsButton',\n};\n\nexport const referenceExtraClassNames = {\n text: 'fai-Reference__text',\n mediaChild: 'fai-Reference__mediaChild',\n};\n\nconst labelFontSize = typographyStyles.caption1Strong.fontSize;\nconst labelLineHeight = typographyStyles.caption1Strong.lineHeight;\n\nconst maxPopoverWidth = '256px';\n\nconst useReferenceClassName = makeResetStyles({\n boxSizing: 'border-box',\n width: '100%',\n display: 'grid',\n gridTemplateAreas: `\n \"citation media title actions\"\n \". . title .\"\n \"sensitivityLabel sensitivityLabel sensitivityLabel sensitivityLabel\"\n \"metadata metadata metadata metadata\"\n \"content content content content\"\n `,\n gridTemplateColumns: 'min-content min-content 1fr min-content',\n gridTemplateRows: '32px auto auto auto auto',\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`,\n boxShadow: 'none',\n columnGap: tokens.spacingHorizontalXS,\n alignItems: 'center',\n});\n\nconst useStyles = makeStyles({\n canvas: {},\n sidecar: {\n gridTemplateRows: '24px auto auto auto',\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalS),\n },\n inline: {},\n popover: {\n ...shorthands.borderWidth('0px'),\n width: `calc(${maxPopoverWidth} - (${tokens.spacingHorizontalM} * 2))`,\n ...shorthands.padding('0px'),\n },\n closed: {\n rowGap: 0,\n },\n citation: {\n ...shorthands.gridArea('citation'),\n },\n media: {\n ...shorthands.gridArea('media'),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mediaPopover: {\n width: '16px',\n height: '16px',\n\n [`> .${referenceExtraClassNames.mediaChild}`]: {\n width: '16px',\n height: '16px',\n },\n },\n actions: {\n ...shorthands.gridArea('actions'),\n justifySelf: 'end',\n display: 'flex',\n gridRowStart: 1,\n },\n detailsButton: {\n [`> ${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground3,\n },\n },\n sensitivity: {\n ...shorthands.gridArea('sensitivityLabel'),\n justifySelf: 'start',\n },\n metadata: {\n marginTop: tokens.spacingVerticalXS,\n\n ...shorthands.gridArea('metadata'),\n ...typographyStyles.caption2,\n },\n metadataSubsequentText: {\n position: 'relative',\n marginLeft: tokens.spacingHorizontalS,\n\n '&::before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n left: `calc(${tokens.spacingHorizontalS} / -2)`,\n top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,\n height: typographyStyles.caption2.fontSize,\n ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n },\n icon: {\n ...typographyStyles.caption2,\n verticalAlign: 'middle',\n },\n content: {\n marginTop: tokens.spacingVerticalXS,\n ...shorthands.gridArea('content'),\n display: 'flex',\n flexDirection: 'column',\n rowGap: tokens.spacingVerticalS,\n color: tokens.colorNeutralForeground3,\n wordBreak: 'break-word',\n },\n hidden: {\n display: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n root: {\n ...shorthands.gridArea('title'),\n alignSelf: 'start',\n ...typographyStyles.caption1Strong,\n wordBreak: 'break-word',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n display: '-webkit-box',\n overflowY: 'hidden',\n },\n\n canvas: {\n // 24px is the height of the tallest element within the reference\n paddingTop: `calc((24px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n sidecar: {\n // 16px is the height of the tallest element within the reference\n paddingTop: `calc((16px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n closed: {\n maxWidth: '100%',\n '-webkit-line-clamp': '1',\n },\n});\n\n/**\n * Apply styling to the Reference slots based on the state\n */\nexport const useReferenceStyles_unstable = (state: ReferenceState): ReferenceState => {\n 'use no memo';\n\n const { isExpanded, mode, layout } = state;\n\n const rootClassName = useReferenceClassName();\n const styles = useStyles();\n const labelStyles = useLabelStyles();\n state.root.className = mergeClasses(\n referenceClassNames.root,\n rootClassName,\n styles[mode],\n styles[layout],\n !isExpanded && styles.closed,\n state.root.className,\n );\n\n if (state.citation) {\n state.citation.className = mergeClasses(referenceClassNames.citation, styles.citation, state.citation.className);\n }\n\n if (state.media) {\n state.media.className = mergeClasses(\n referenceClassNames.media,\n styles.media,\n layout === 'popover' && styles.mediaPopover,\n state.media.className,\n );\n }\n\n if (state.actions) {\n state.actions.className = mergeClasses(referenceClassNames.actions, styles.actions, state.actions.className);\n }\n\n state.label.className = mergeClasses(\n referenceClassNames.label,\n labelStyles.root,\n labelStyles[mode],\n !isExpanded && labelStyles.closed,\n state.label.className,\n );\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n referenceClassNames.sensitivity,\n styles.sensitivity,\n !isExpanded && styles.hidden,\n state.sensitivity.className,\n );\n }\n\n state.metadata.className = mergeClasses(\n referenceClassNames.metadata,\n styles.metadata,\n !isExpanded && styles.hidden,\n state.metadata.className,\n );\n\n let isSubsequentText = false;\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(\n referenceClassNames.primaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.primaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n referenceClassNames.secondaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.secondaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n referenceClassNames.tertiaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.tertiaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(referenceClassNames.icon, styles.icon, state.icon.className);\n }\n state.content.className = mergeClasses(\n referenceClassNames.content,\n styles.content,\n !isExpanded && styles.hidden,\n state.content.className,\n );\n\n if (state.detailsButton) {\n state.detailsButton.className = mergeClasses(\n referenceClassNames.detailsButton,\n styles.detailsButton,\n state.detailsButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","referenceClassNames","root","citation","media","actions","sensitivity","metadata","primaryText","secondaryText","tertiaryText","icon","label","content","detailsButton","referenceExtraClassNames","text","mediaChild","labelFontSize","caption1Strong","fontSize","labelLineHeight","lineHeight","maxPopoverWidth","useReferenceClassName","boxSizing","width","display","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","padding","spacingVerticalS","spacingHorizontalS","boxShadow","columnGap","spacingHorizontalXS","alignItems","useStyles","canvas","sidecar","spacingVerticalXS","inline","popover","borderWidth","spacingHorizontalM","closed","rowGap","gridArea","justifyContent","mediaPopover","height","justifySelf","gridRowStart","color","colorNeutralForeground3","marginTop","caption2","metadataSubsequentText","position","marginLeft","left","top","borderLeft","colorNeutralStroke2","verticalAlign","flexDirection","wordBreak","hidden","useLabelStyles","alignSelf","overflowY","paddingTop","maxWidth","useReferenceStyles_unstable","state","isExpanded","mode","layout","rootClassName","styles","labelStyles","className","isSubsequentText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,gBAAgB,EAChBC,eAAe,EACfC,UAAU,EACVC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AoBH,OAAOtB,sBAAsB,EACjDiB,MAAMxE,WAAW,CAAC+E,SAAS;QAE7BC,mBAAmB;IACrB;IAEA,IAAIR,MAAMvE,aAAa,EAAE;QACvBuE,MAAMvE,aAAa,CAAC8E,SAAS,GAAG1F,aAC9BI,oBAAoBQ,aAAa,EACjCM,yBAAyBC,IAAI,EAC7BwE,oBAAoBH,OAAOtB,sBAAsB,EACjDiB,MAAMvE,aAAa,CAAC8E,SAAS;QAE/BC,mBAAmB;IACrB;IAEA,IAAIR,MAAMtE,YAAY,EAAE;QACtBsE,MAAMtE,YAAY,CAAC6E,SAAS,GAAG1F,aAC7BI,oBAAoBS,YAAY,EAChCK,yBAAyBC,IAAI,EAC7BwE,oBAAoBH,OAAOtB,sBAAsB,EACjDiB,MAAMtE,YAAY,CAAC6E,SAAS;QAE9BC,mBAAmB;IACrB;IAEA,IAAIR,MAAMrE,IAAI,EAAE;QACdqE,MAAMrE,IAAI,CAAC4E,SAAS,GAAG1F,aAAaI,oBAAoBU,IAAI,EAAE0E,OAAO1E,IAAI,EAAEqE,MAAMrE,IAAI,CAAC4E,SAAS;IACjG;IACAP,MAAMnE,OAAO,CAAC0E,SAAS,GAAG1F,aACxBI,oBAAoBY,OAAO,EAC3BwE,OAAOxE,OAAO,EACd,CAACoE,cAAcI,OAAOZ,MAAM,EAC5BO,MAAMnE,OAAO,CAAC0E,SAAS;IAGzB,IAAIP,MAAMlE,aAAa,EAAE;QACvBkE,MAAMlE,aAAa,CAACyE,SAAS,GAAG1F,aAC9BI,oBAAoBa,aAAa,EACjCuE,OAAOvE,aAAa,EACpBkE,MAAMlE,aAAa,CAACyE,SAAS;IAEjC;IAEA,OAAOP;AACT,EAAE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useReferenceGroupToggle_unstable } from './useReferenceGroupToggle';
|
|
3
3
|
import { renderReferenceGroupToggle_unstable } from './renderReferenceGroupToggle';
|
|
4
|
-
import { useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles';
|
|
4
|
+
import { useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles.styles';
|
|
5
5
|
// ReferenceGroupToggle component - TODO: add more docs
|
|
6
6
|
export const ReferenceGroupToggle = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
7
|
const state = useReferenceGroupToggle_unstable(props, ref);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceGroupToggle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReferenceGroupToggle_unstable } from './useReferenceGroupToggle';\nimport { renderReferenceGroupToggle_unstable } from './renderReferenceGroupToggle';\nimport { useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles';\nimport type { ReferenceGroupToggleProps } from './ReferenceGroupToggle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ReferenceGroupToggle component - TODO: add more docs\nexport const ReferenceGroupToggle: ForwardRefComponent<ReferenceGroupToggleProps> = React.forwardRef((props, ref) => {\n const state = useReferenceGroupToggle_unstable(props, ref);\n\n useReferenceGroupToggleStyles_unstable(state);\n return renderReferenceGroupToggle_unstable(state);\n});\n\nReferenceGroupToggle.displayName = 'ReferenceGroupToggle';\n"],"names":["React","useReferenceGroupToggle_unstable","renderReferenceGroupToggle_unstable","useReferenceGroupToggleStyles_unstable","ReferenceGroupToggle","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AACnF,SAASC,sCAAsC,QAAQ,
|
|
1
|
+
{"version":3,"sources":["ReferenceGroupToggle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReferenceGroupToggle_unstable } from './useReferenceGroupToggle';\nimport { renderReferenceGroupToggle_unstable } from './renderReferenceGroupToggle';\nimport { useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles.styles';\nimport type { ReferenceGroupToggleProps } from './ReferenceGroupToggle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n// ReferenceGroupToggle component - TODO: add more docs\nexport const ReferenceGroupToggle: ForwardRefComponent<ReferenceGroupToggleProps> = React.forwardRef((props, ref) => {\n const state = useReferenceGroupToggle_unstable(props, ref);\n\n useReferenceGroupToggleStyles_unstable(state);\n return renderReferenceGroupToggle_unstable(state);\n});\n\nReferenceGroupToggle.displayName = 'ReferenceGroupToggle';\n"],"names":["React","useReferenceGroupToggle_unstable","renderReferenceGroupToggle_unstable","useReferenceGroupToggleStyles_unstable","ReferenceGroupToggle","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AACnF,SAASC,sCAAsC,QAAQ,yCAAyC;AAIhG,uDAAuD;AACvD,OAAO,MAAMC,qCAAuEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC3G,MAAMC,QAAQP,iCAAiCK,OAAOC;IAEtDJ,uCAAuCK;IACvC,OAAON,oCAAoCM;AAC7C,GAAG;AAEHJ,qBAAqBK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceGroupToggle.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ReferenceGroupToggleSlots = {\n root: NonNullable<Slot<'button'>>;\n icon?: Slot<'span'>;\n};\n\n/**\n * ReferenceGroupToggle Props\n */\nexport type ReferenceGroupToggleProps = ComponentProps<ReferenceGroupToggleSlots> & {\n
|
|
1
|
+
{"version":3,"sources":["ReferenceGroupToggle.types.ts"],"sourcesContent":["import type { CopilotMode } from '@fluentui-copilot/react-provider';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ReferenceGroupToggleSlots = {\n root: NonNullable<Slot<'button'>>;\n icon?: Slot<'span'>;\n};\n\n/**\n * ReferenceGroupToggle Props\n */\nexport type ReferenceGroupToggleProps = ComponentProps<ReferenceGroupToggleSlots> &\n CopilotMode & {\n isOpen?: boolean;\n };\n\n/**\n * State used in rendering ReferenceGroupToggle\n */\nexport type ReferenceGroupToggleState = ComponentState<ReferenceGroupToggleSlots> &\n Required<Pick<ReferenceGroupToggleProps, 'isOpen' | 'mode'>>;\n"],"names":[],"rangeMappings":";;","mappings":"AAgBA;;CAEC,GACD,WAC+D"}
|