@fluentui-copilot/react-reference 0.15.5 → 0.16.0
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 +30 -1
- package/CHANGELOG.md +16 -2
- package/dist/index.d.ts +88 -290
- package/lib/Reference.js.map +1 -1
- package/lib/ReferenceList.js +1 -1
- package/lib/ReferenceList.js.map +1 -1
- package/lib/ReferenceOverflowButton.js +1 -1
- package/lib/ReferenceOverflowButton.js.map +1 -1
- package/lib/components/Citation/useCitationStyles.styles.js +3 -3
- package/lib/components/Citation/useCitationStyles.styles.js.map +1 -1
- package/lib/components/Reference/Reference.js +0 -3
- package/lib/components/Reference/Reference.js.map +1 -1
- package/lib/components/Reference/Reference.types.js +1 -1
- package/lib/components/Reference/Reference.types.js.map +1 -1
- package/lib/components/Reference/index.js.map +1 -1
- package/lib/components/Reference/renderReference.js +13 -8
- package/lib/components/Reference/renderReference.js.map +1 -1
- package/lib/components/Reference/useReference.js +46 -166
- package/lib/components/Reference/useReference.js.map +1 -1
- package/lib/components/Reference/useReferenceStyles.styles.js +40 -220
- package/lib/components/Reference/useReferenceStyles.styles.js.map +1 -1
- package/lib/components/ReferenceList/ReferenceList.js +4 -5
- package/lib/components/ReferenceList/ReferenceList.js.map +1 -1
- package/lib/components/ReferenceList/ReferenceList.types.js +1 -1
- package/lib/components/ReferenceList/ReferenceList.types.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/renderReferenceList.js +19 -5
- package/lib/components/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib/components/ReferenceList/useReferenceList.js +76 -14
- package/lib/components/ReferenceList/useReferenceList.js.map +1 -1
- package/lib/components/ReferenceList/useReferenceListStyles.styles.js +31 -9
- package/lib/components/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
- package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/useReferenceOverflowButton.js +1 -1
- package/lib/components/ReferenceOverflowButton/useReferenceOverflowButton.js.map +1 -0
- package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/useReferenceOverflowButtonStyles.styles.js +2 -2
- package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/useReferenceOverflowButtonStyles.styles.js.map +1 -1
- package/lib/contexts/referenceListContext.js.map +1 -0
- package/lib/index.js +31 -8
- package/lib/index.js.map +1 -1
- package/lib/utilities/{reference-v2/generateReferenceCitationPreview.js → generateReferenceCitationPreview.js} +2 -2
- package/lib/utilities/generateReferenceCitationPreview.js.map +1 -0
- package/lib/utilities/index.js +1 -1
- package/lib/utilities/index.js.map +1 -1
- package/lib/utilities/useReferenceCitationPreview.js +12 -123
- package/lib/utilities/useReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/Reference.js.map +1 -1
- package/lib-commonjs/ReferenceList.js +0 -3
- package/lib-commonjs/ReferenceList.js.map +1 -1
- package/lib-commonjs/ReferenceOverflowButton.js +1 -1
- package/lib-commonjs/ReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/Citation/useCitationStyles.styles.js +7 -7
- package/lib-commonjs/components/Citation/useCitationStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Reference/Reference.js +0 -2
- package/lib-commonjs/components/Reference/Reference.js.map +1 -1
- package/lib-commonjs/components/Reference/Reference.types.js +1 -1
- package/lib-commonjs/components/Reference/Reference.types.js.map +1 -1
- package/lib-commonjs/components/Reference/index.js.map +1 -1
- package/lib-commonjs/components/Reference/renderReference.js +11 -18
- package/lib-commonjs/components/Reference/renderReference.js.map +1 -1
- package/lib-commonjs/components/Reference/useReference.js +42 -167
- package/lib-commonjs/components/Reference/useReference.js.map +1 -1
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.js +56 -324
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.js +4 -4
- package/lib-commonjs/components/ReferenceList/ReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.types.js +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.types.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/index.js +0 -3
- package/lib-commonjs/components/ReferenceList/index.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/renderReferenceList.js +16 -2
- package/lib-commonjs/components/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceList.js +67 -11
- package/lib-commonjs/components/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.js +34 -9
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/useReferenceOverflowButton.js +1 -1
- package/lib-commonjs/components/ReferenceOverflowButton/useReferenceOverflowButton.js.map +1 -0
- package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/useReferenceOverflowButtonStyles.styles.js.map +1 -1
- package/lib-commonjs/contexts/referenceListContext.js.map +1 -0
- package/lib-commonjs/index.js +33 -40
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/utilities/{reference-v2/generateReferenceCitationPreview.js → generateReferenceCitationPreview.js} +3 -3
- package/lib-commonjs/utilities/generateReferenceCitationPreview.js.map +1 -0
- package/lib-commonjs/utilities/index.js +4 -4
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/lib-commonjs/utilities/useReferenceCitationPreview.js +4 -129
- package/lib-commonjs/utilities/useReferenceCitationPreview.js.map +1 -1
- package/package.json +4 -4
- package/lib/ReferenceGroupToggle.js +0 -2
- package/lib/ReferenceGroupToggle.js.map +0 -1
- package/lib/ReferenceListV2.js +0 -2
- package/lib/ReferenceListV2.js.map +0 -1
- package/lib/ReferenceV2.js +0 -2
- package/lib/ReferenceV2.js.map +0 -1
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js +0 -12
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +0 -1
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js +0 -4
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js.map +0 -1
- package/lib/components/ReferenceGroupToggle/index.js +0 -5
- package/lib/components/ReferenceGroupToggle/index.js.map +0 -1
- package/lib/components/ReferenceGroupToggle/renderReferenceGroupToggle.js +0 -12
- package/lib/components/ReferenceGroupToggle/renderReferenceGroupToggle.js.map +0 -1
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggle.js +0 -43
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggle.js.map +0 -1
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js +0 -43
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js.map +0 -1
- package/lib/components/reference-v2/Reference/Reference.js +0 -11
- package/lib/components/reference-v2/Reference/Reference.js.map +0 -1
- package/lib/components/reference-v2/Reference/Reference.types.js +0 -2
- package/lib/components/reference-v2/Reference/Reference.types.js.map +0 -1
- package/lib/components/reference-v2/Reference/index.js +0 -5
- package/lib/components/reference-v2/Reference/index.js.map +0 -1
- package/lib/components/reference-v2/Reference/renderReference.js +0 -19
- package/lib/components/reference-v2/Reference/renderReference.js.map +0 -1
- package/lib/components/reference-v2/Reference/useReference.js +0 -74
- package/lib/components/reference-v2/Reference/useReference.js.map +0 -1
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.js +0 -70
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.js.map +0 -1
- package/lib/components/reference-v2/ReferenceList/ReferenceList.js +0 -13
- package/lib/components/reference-v2/ReferenceList/ReferenceList.js.map +0 -1
- package/lib/components/reference-v2/ReferenceList/ReferenceList.types.js +0 -2
- package/lib/components/reference-v2/ReferenceList/ReferenceList.types.js.map +0 -1
- package/lib/components/reference-v2/ReferenceList/index.js +0 -5
- package/lib/components/reference-v2/ReferenceList/index.js.map +0 -1
- package/lib/components/reference-v2/ReferenceList/renderReferenceList.js +0 -22
- package/lib/components/reference-v2/ReferenceList/renderReferenceList.js.map +0 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceList.js +0 -93
- package/lib/components/reference-v2/ReferenceList/useReferenceList.js.map +0 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js +0 -46
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js.map +0 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js.map +0 -1
- package/lib/components/reference-v2/index.js +0 -4
- package/lib/components/reference-v2/index.js.map +0 -1
- package/lib/contexts/ReferenceGroupContext.js +0 -11
- package/lib/contexts/ReferenceGroupContext.js.map +0 -1
- package/lib/contexts/reference-v2/referenceListContext.js.map +0 -1
- package/lib/utilities/reference-v2/generateReferenceCitationPreview.js.map +0 -1
- package/lib/utilities/reference-v2/index.js +0 -3
- package/lib/utilities/reference-v2/index.js.map +0 -1
- package/lib/utilities/reference-v2/useReferenceCitationPreview.js +0 -18
- package/lib/utilities/reference-v2/useReferenceCitationPreview.js.map +0 -1
- package/lib/utilities/useReferenceGroup.js +0 -40
- package/lib/utilities/useReferenceGroup.js.map +0 -1
- package/lib-commonjs/ReferenceGroupToggle.js +0 -29
- package/lib-commonjs/ReferenceGroupToggle.js.map +0 -1
- package/lib-commonjs/ReferenceListV2.js +0 -29
- package/lib-commonjs/ReferenceListV2.js.map +0 -1
- package/lib-commonjs/ReferenceV2.js +0 -32
- package/lib-commonjs/ReferenceV2.js.map +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js +0 -21
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js +0 -7
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js.map +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/index.js +0 -32
- package/lib-commonjs/components/ReferenceGroupToggle/index.js.map +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/renderReferenceGroupToggle.js +0 -21
- package/lib-commonjs/components/ReferenceGroupToggle/renderReferenceGroupToggle.js.map +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js +0 -42
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js.map +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js +0 -64
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js.map +0 -1
- package/lib-commonjs/components/reference-v2/Reference/Reference.js +0 -21
- package/lib-commonjs/components/reference-v2/Reference/Reference.js.map +0 -1
- package/lib-commonjs/components/reference-v2/Reference/Reference.types.js +0 -5
- package/lib-commonjs/components/reference-v2/Reference/Reference.types.js.map +0 -1
- package/lib-commonjs/components/reference-v2/Reference/index.js +0 -35
- package/lib-commonjs/components/reference-v2/Reference/index.js.map +0 -1
- package/lib-commonjs/components/reference-v2/Reference/renderReference.js +0 -32
- package/lib-commonjs/components/reference-v2/Reference/renderReference.js.map +0 -1
- package/lib-commonjs/components/reference-v2/Reference/useReference.js +0 -71
- package/lib-commonjs/components/reference-v2/Reference/useReference.js.map +0 -1
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.js +0 -109
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js +0 -23
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.types.js +0 -5
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.types.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/index.js +0 -32
- package/lib-commonjs/components/reference-v2/ReferenceList/index.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js +0 -30
- package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js +0 -86
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js +0 -62
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js.map +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js.map +0 -1
- package/lib-commonjs/components/reference-v2/index.js +0 -64
- package/lib-commonjs/components/reference-v2/index.js.map +0 -1
- package/lib-commonjs/contexts/ReferenceGroupContext.js +0 -29
- package/lib-commonjs/contexts/ReferenceGroupContext.js.map +0 -1
- package/lib-commonjs/contexts/reference-v2/referenceListContext.js.map +0 -1
- package/lib-commonjs/utilities/reference-v2/generateReferenceCitationPreview.js.map +0 -1
- package/lib-commonjs/utilities/reference-v2/index.js +0 -21
- package/lib-commonjs/utilities/reference-v2/index.js.map +0 -1
- package/lib-commonjs/utilities/reference-v2/useReferenceCitationPreview.js +0 -18
- package/lib-commonjs/utilities/reference-v2/useReferenceCitationPreview.js.map +0 -1
- package/lib-commonjs/utilities/useReferenceGroup.js +0 -49
- package/lib-commonjs/utilities/useReferenceGroup.js.map +0 -1
- /package/lib/components/{reference-v2/ReferenceList → ReferenceList}/useReferenceListContextValues.js +0 -0
- /package/lib/components/{reference-v2/ReferenceList → ReferenceList}/useReferenceListContextValues.js.map +0 -0
- /package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/ReferenceOverflowButton.js +0 -0
- /package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/ReferenceOverflowButton.js.map +0 -0
- /package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/ReferenceOverflowButton.types.js +0 -0
- /package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/ReferenceOverflowButton.types.js.map +0 -0
- /package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/index.js +0 -0
- /package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/index.js.map +0 -0
- /package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/renderReferenceOverflowButton.js +0 -0
- /package/lib/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/renderReferenceOverflowButton.js.map +0 -0
- /package/lib/contexts/{reference-v2/index.js → index.js} +0 -0
- /package/lib/contexts/{reference-v2/index.js.map → index.js.map} +0 -0
- /package/lib/contexts/{reference-v2/referenceListContext.js → referenceListContext.js} +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceList → ReferenceList}/useReferenceListContextValues.js +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceList → ReferenceList}/useReferenceListContextValues.js.map +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/ReferenceOverflowButton.js +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/ReferenceOverflowButton.js.map +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/ReferenceOverflowButton.types.js +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/ReferenceOverflowButton.types.js.map +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/index.js +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/index.js.map +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/renderReferenceOverflowButton.js +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/renderReferenceOverflowButton.js.map +0 -0
- /package/lib-commonjs/components/{reference-v2/ReferenceOverflowButton → ReferenceOverflowButton}/useReferenceOverflowButtonStyles.styles.js +0 -0
- /package/lib-commonjs/contexts/{reference-v2/index.js → index.js} +0 -0
- /package/lib-commonjs/contexts/{reference-v2/index.js.map → index.js.map} +0 -0
- /package/lib-commonjs/contexts/{reference-v2/referenceListContext.js → referenceListContext.js} +0 -0
|
@@ -1,249 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { tokens } from '@fluentui-copilot/tokens';
|
|
3
|
-
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
1
|
+
import { __resetStyles, __styles, mergeClasses } from '@fluentui/react-components';
|
|
2
|
+
import { tokens, typographyStyles } from '@fluentui-copilot/tokens';
|
|
4
3
|
export const referenceClassNames = {
|
|
5
4
|
root: 'fai-Reference',
|
|
6
5
|
citation: 'fai-Reference__citation',
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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'
|
|
6
|
+
divider: 'fai-Reference__divider',
|
|
7
|
+
graphic: 'fai-Reference__graphic',
|
|
8
|
+
content: 'fai-Reference__content'
|
|
18
9
|
};
|
|
19
|
-
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
20
10
|
export const referenceExtraClassNames = {
|
|
21
|
-
|
|
22
|
-
mediaChild: 'fai-Reference__mediaChild'
|
|
11
|
+
graphicChild: 'fai-Reference__graphicChild'
|
|
23
12
|
};
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
sidecar: {
|
|
31
|
-
wkccdc: "f2e0fxj",
|
|
32
|
-
Byoj8tv: 0,
|
|
33
|
-
uwmqm3: 0,
|
|
34
|
-
z189sj: 0,
|
|
35
|
-
z8tnut: 0,
|
|
36
|
-
B0ocmuz: "f1v65gcw"
|
|
37
|
-
},
|
|
38
|
-
inline: {},
|
|
39
|
-
popover: {
|
|
40
|
-
B4j52fo: "f1pit55b",
|
|
41
|
-
Bekrc4i: ["f1orqat1", "ffbvwxd"],
|
|
42
|
-
Bn0qgzm: "f136mcbi",
|
|
43
|
-
ibv6hh: ["ffbvwxd", "f1orqat1"],
|
|
44
|
-
a9b677: "f1uniyfe",
|
|
45
|
-
Byoj8tv: 0,
|
|
46
|
-
uwmqm3: 0,
|
|
47
|
-
z189sj: 0,
|
|
48
|
-
z8tnut: 0,
|
|
49
|
-
B0ocmuz: "f1c5fvqg"
|
|
50
|
-
},
|
|
51
|
-
closed: {
|
|
52
|
-
Belr9w4: "f1sff6ri"
|
|
53
|
-
},
|
|
54
|
-
citation: {
|
|
55
|
-
Bw0ie65: 0,
|
|
56
|
-
Br312pm: 0,
|
|
57
|
-
nk6f5a: 0,
|
|
58
|
-
Ijaq50: 0,
|
|
59
|
-
Bq1tomu: "f4z8xh6"
|
|
60
|
-
},
|
|
61
|
-
media: {
|
|
62
|
-
Bw0ie65: 0,
|
|
63
|
-
Br312pm: 0,
|
|
64
|
-
nk6f5a: 0,
|
|
65
|
-
Ijaq50: 0,
|
|
66
|
-
Bq1tomu: "fujjg13",
|
|
67
|
-
mc9l5x: "f22iagw",
|
|
68
|
-
Bt984gj: "f122n59",
|
|
69
|
-
Brf1p80: "f4d9j23"
|
|
70
|
-
},
|
|
71
|
-
mediaPopover: {
|
|
72
|
-
a9b677: "fjw5fx7",
|
|
73
|
-
Bqenvij: "fd461yt",
|
|
74
|
-
psn4ub: "fe9dio4",
|
|
75
|
-
vf399t: "f1ojxjpn"
|
|
76
|
-
},
|
|
77
|
-
actions: {
|
|
78
|
-
Bw0ie65: 0,
|
|
79
|
-
Br312pm: 0,
|
|
80
|
-
nk6f5a: 0,
|
|
81
|
-
Ijaq50: "f16hsg94",
|
|
82
|
-
Bq1tomu: "fceb517",
|
|
83
|
-
Bdqf98w: "f1a7i8kp",
|
|
84
|
-
mc9l5x: "f22iagw"
|
|
85
|
-
},
|
|
86
|
-
detailsButton: {
|
|
87
|
-
D5xksd: "fzmnlw3"
|
|
88
|
-
},
|
|
89
|
-
sensitivity: {
|
|
90
|
-
Bw0ie65: 0,
|
|
91
|
-
Br312pm: 0,
|
|
92
|
-
nk6f5a: 0,
|
|
93
|
-
Ijaq50: 0,
|
|
94
|
-
Bq1tomu: "fw0kx7a",
|
|
95
|
-
Bdqf98w: "fsxvdwy"
|
|
96
|
-
},
|
|
97
|
-
metadata: {
|
|
98
|
-
B6of3ja: "fww94b8",
|
|
99
|
-
Bw0ie65: 0,
|
|
100
|
-
Br312pm: 0,
|
|
101
|
-
nk6f5a: 0,
|
|
102
|
-
Ijaq50: 0,
|
|
103
|
-
Bq1tomu: "f14r5tnm",
|
|
104
|
-
Bahqtrf: "fk6fouc",
|
|
105
|
-
Be2twd7: "f13mqy1h",
|
|
106
|
-
Bhrd7zp: "figsok6",
|
|
107
|
-
Bg96gwp: "fcpl73t"
|
|
108
|
-
},
|
|
109
|
-
metadataSubsequentText: {
|
|
110
|
-
qhf8xq: "f10pi13n",
|
|
111
|
-
Frg6f3: ["foyynoy", "f1vcna3q"],
|
|
112
|
-
Ftih45: "f1wl9k8s",
|
|
113
|
-
Br0sdwz: "f1aocrix",
|
|
114
|
-
Brfgrao: "f1j7ml58",
|
|
115
|
-
Fbdkly: ["f1s1fjay", "f15a459s"],
|
|
116
|
-
Bciustq: "f1wl9tmt",
|
|
117
|
-
Baz25je: "f8pn7wt",
|
|
118
|
-
uvfttm: ["f1x8pvcy", "f9sc749"],
|
|
119
|
-
Bbv0w2i: ["f1jpmc5p", "f1yq6w5o"],
|
|
120
|
-
Bm6vgfq: ["fjml6kk", "f1geml7w"]
|
|
121
|
-
},
|
|
122
|
-
icon: {
|
|
123
|
-
Bahqtrf: "fk6fouc",
|
|
124
|
-
Be2twd7: "f13mqy1h",
|
|
125
|
-
Bhrd7zp: "figsok6",
|
|
126
|
-
Bg96gwp: "fcpl73t",
|
|
127
|
-
ha4doy: "fmrv4ls"
|
|
128
|
-
},
|
|
129
|
-
content: {
|
|
130
|
-
B6of3ja: "fww94b8",
|
|
131
|
-
Bw0ie65: 0,
|
|
132
|
-
Br312pm: 0,
|
|
133
|
-
nk6f5a: 0,
|
|
134
|
-
Ijaq50: 0,
|
|
135
|
-
Bq1tomu: "fqi5tbq",
|
|
136
|
-
mc9l5x: "f22iagw",
|
|
137
|
-
Beiy3e4: "f1vx9l62",
|
|
138
|
-
Belr9w4: "f1wn3y0l",
|
|
139
|
-
sj55zd: "f11d4kpn",
|
|
140
|
-
Biipf1f: "f9ijwd5"
|
|
141
|
-
},
|
|
142
|
-
hidden: {
|
|
143
|
-
mc9l5x: "fjseox"
|
|
13
|
+
const GRAPHIC_SIZE = '16px';
|
|
14
|
+
const useRootBaseClassName = __resetStyles("r5aus6y", null, [".r5aus6y{align-items:center;background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorNeutralStroke2);border-radius:var(--borderRadiusMedium);box-sizing:border-box;color:var(--colorNeutralForeground2);column-gap:var(--spacingHorizontalXXS);display:inline-flex;flex-shrink:0;justify-content:center;max-width:100%;min-height:24px;padding:var(--spacingVerticalXXS) var(--spacingHorizontalS);text-decoration:none;}", ".r5aus6y:hover{background-color:var(--colorNeutralBackground3Hover);border-color:var(--colorNeutralStroke1Hover);color:var(--colorNeutralForeground2Hover);}", ".r5aus6y:hover .fai-Reference__divider{background-color:var(--colorNeutralStroke1Hover);}", ".r5aus6y:hover:active{background-color:var(--colorNeutralBackground3Pressed);border-color:var(--colorNeutralStroke1Pressed);color:var(--colorNeutralForeground2Pressed);}", ".r5aus6y:hover:active .fai-Reference__divider{background-color:var(--colorNeutralStroke1Pressed);}"]);
|
|
15
|
+
export const useRootStyles = __styles({
|
|
16
|
+
overflow: {
|
|
17
|
+
B2u0y6b: "f6dzj5z",
|
|
18
|
+
a9b677: "fly5x3f"
|
|
144
19
|
}
|
|
145
20
|
}, {
|
|
146
|
-
d: [".
|
|
147
|
-
p: -1
|
|
148
|
-
}], ".f1pit55b{border-top-width:0px;}", ".f1orqat1{border-right-width:0px;}", ".ffbvwxd{border-left-width:0px;}", ".f136mcbi{border-bottom-width:0px;}", ".f1uniyfe{width:calc(256px - (var(--spacingHorizontalM) * 2));}", [".f1c5fvqg{padding:0px;}", {
|
|
149
|
-
p: -1
|
|
150
|
-
}], ".f1sff6ri{row-gap:0;}", [".f4z8xh6{grid-area:citation;}", {
|
|
151
|
-
p: -1
|
|
152
|
-
}], [".fujjg13{grid-area:media;}", {
|
|
153
|
-
p: -1
|
|
154
|
-
}], ".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".f4d9j23{justify-content:center;}", ".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".fe9dio4>.fai-Reference__mediaChild{width:16px;}", ".f1ojxjpn>.fai-Reference__mediaChild{height:16px;}", [".fceb517{grid-area:actions;}", {
|
|
155
|
-
p: -1
|
|
156
|
-
}], ".f1a7i8kp{justify-self:end;}", ".f16hsg94{grid-row-start:1;}", ".fzmnlw3>fui-Button__icon{color:var(--colorNeutralForeground3);}", [".fw0kx7a{grid-area:sensitivityLabel;}", {
|
|
157
|
-
p: -1
|
|
158
|
-
}], ".fsxvdwy{justify-self:start;}", ".fww94b8{margin-top:var(--spacingVerticalXS);}", [".f14r5tnm{grid-area:metadata;}", {
|
|
159
|
-
p: -1
|
|
160
|
-
}], ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".f10pi13n{position:relative;}", ".foyynoy{margin-left:var(--spacingHorizontalS);}", ".f1vcna3q{margin-right:var(--spacingHorizontalS);}", ".f1wl9k8s::before{content:\"\";}", ".f1aocrix::before{display:block;}", ".f1j7ml58::before{position:absolute;}", ".f1s1fjay::before{left:calc(var(--spacingHorizontalS) / -2);}", ".f15a459s::before{right:calc(var(--spacingHorizontalS) / -2);}", ".f1wl9tmt::before{top:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);}", ".f8pn7wt::before{height:var(--fontSizeBase100);}", ".f1x8pvcy::before{border-left-width:var(--strokeWidthThin);}", ".f9sc749::before{border-right-width:var(--strokeWidthThin);}", ".f1jpmc5p::before{border-left-style:solid;}", ".f1yq6w5o::before{border-right-style:solid;}", ".fjml6kk::before{border-left-color:var(--colorNeutralStroke2);}", ".f1geml7w::before{border-right-color:var(--colorNeutralStroke2);}", ".fmrv4ls{vertical-align:middle;}", [".fqi5tbq{grid-area:content;}", {
|
|
161
|
-
p: -1
|
|
162
|
-
}], ".f1vx9l62{flex-direction:column;}", ".f1wn3y0l{row-gap:var(--spacingVerticalS);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f9ijwd5{word-break:break-word;}", ".fjseox{display:none;}"]
|
|
21
|
+
d: [".f6dzj5z{max-width:100%;}", ".fly5x3f{width:100%;}"]
|
|
163
22
|
});
|
|
164
|
-
const
|
|
23
|
+
const useRootNextStyles = __styles({
|
|
165
24
|
root: {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
qb2dma: "f9h729m",
|
|
172
|
-
Bahqtrf: "fk6fouc",
|
|
173
|
-
Be2twd7: "fy9rknc",
|
|
174
|
-
Bhrd7zp: "fl43uef",
|
|
175
|
-
Bg96gwp: "fwrc4pm",
|
|
176
|
-
Biipf1f: "f9ijwd5",
|
|
177
|
-
Fd1uvx: "fpfc2by",
|
|
178
|
-
Bh9c35c: "f1lvsx7g",
|
|
179
|
-
mc9l5x: "f1rvi9lw",
|
|
180
|
-
Bmxbyg5: "f1sil6mw"
|
|
181
|
-
},
|
|
182
|
-
canvas: {
|
|
183
|
-
z8tnut: "f1vd4pcd"
|
|
184
|
-
},
|
|
185
|
-
sidecar: {
|
|
186
|
-
z8tnut: "f1u9e4k4"
|
|
187
|
-
},
|
|
188
|
-
closed: {
|
|
189
|
-
B2u0y6b: "f6dzj5z",
|
|
190
|
-
Bh9c35c: "fvvof4m"
|
|
25
|
+
Beyfa6y: 0,
|
|
26
|
+
Bbmb7ep: 0,
|
|
27
|
+
Btl43ni: 0,
|
|
28
|
+
B7oj6ja: 0,
|
|
29
|
+
Dimara: "f1kijzfu"
|
|
191
30
|
}
|
|
192
31
|
}, {
|
|
193
|
-
d: [[".
|
|
32
|
+
d: [[".f1kijzfu{border-radius:var(--borderRadiusXLarge);}", {
|
|
194
33
|
p: -1
|
|
195
|
-
}]
|
|
34
|
+
}]]
|
|
196
35
|
});
|
|
36
|
+
const useCitationBaseClassName = __resetStyles("r342rk1", null, [".r342rk1{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase100);font-weight:var(--fontWeightBold);line-height:var(--lineHeightBase200);}"]);
|
|
37
|
+
const useDividerBaseClassName = __resetStyles("r1eyqaw5", null, [".r1eyqaw5{background-color:var(--colorNeutralStroke2);height:16px;margin:var(--spacingVerticalNone) var(--spacingHorizontalXS);width:1px;}"]);
|
|
38
|
+
const useGraphicBaseClassName = __resetStyles("rpyrgl4", null, [".rpyrgl4{display:inline-flex;font-size:16px;height:16px;line-height:16px;width:16px;}", ".rpyrgl4>.fai-Reference__graphicChild{height:16px;width:16px;}"]);
|
|
39
|
+
const useContentBaseClassName = __resetStyles("r1ycou3l", null, [".r1ycou3l{align-items:center;column-gap:var(--spacingHorizontalSNudge);display:inline-flex;text-align:start;word-break:break-word;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);}"]);
|
|
197
40
|
/**
|
|
198
41
|
* Apply styling to the Reference slots based on the state
|
|
199
|
-
*
|
|
200
|
-
* deprecated Use ReferenceV2 component, hooks and types instead.
|
|
201
42
|
*/
|
|
202
43
|
export const useReferenceStyles_unstable = state => {
|
|
203
44
|
'use no memo';
|
|
204
45
|
|
|
205
46
|
const {
|
|
206
|
-
|
|
207
|
-
mode,
|
|
208
|
-
layout
|
|
47
|
+
designVersion
|
|
209
48
|
} = state;
|
|
210
|
-
const
|
|
211
|
-
const
|
|
212
|
-
const
|
|
213
|
-
|
|
49
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
50
|
+
const rootNextStyles = useRootNextStyles();
|
|
51
|
+
const citationBaseClassName = useCitationBaseClassName();
|
|
52
|
+
const dividerBaseClassName = useDividerBaseClassName();
|
|
53
|
+
const contentBaseClassName = useContentBaseClassName();
|
|
54
|
+
const graphicBaseClassName = useGraphicBaseClassName();
|
|
55
|
+
state.root.className = mergeClasses(referenceClassNames.root, rootBaseClassName, designVersion === 'next' && rootNextStyles.root, state.root.className);
|
|
214
56
|
if (state.citation) {
|
|
215
|
-
state.citation.className = mergeClasses(referenceClassNames.citation,
|
|
216
|
-
}
|
|
217
|
-
if (state.media) {
|
|
218
|
-
state.media.className = mergeClasses(referenceClassNames.media, styles.media, layout === 'popover' && styles.mediaPopover, state.media.className);
|
|
219
|
-
}
|
|
220
|
-
if (state.actions) {
|
|
221
|
-
state.actions.className = mergeClasses(referenceClassNames.actions, styles.actions, state.actions.className);
|
|
222
|
-
}
|
|
223
|
-
state.label.className = mergeClasses(referenceClassNames.label, labelStyles.root, labelStyles[mode], !isExpanded && labelStyles.closed, state.label.className);
|
|
224
|
-
if (state.sensitivity) {
|
|
225
|
-
state.sensitivity.className = mergeClasses(referenceClassNames.sensitivity, styles.sensitivity, !isExpanded && styles.hidden, state.sensitivity.className);
|
|
226
|
-
}
|
|
227
|
-
state.metadata.className = mergeClasses(referenceClassNames.metadata, styles.metadata, !isExpanded && styles.hidden, state.metadata.className);
|
|
228
|
-
let isSubsequentText = false;
|
|
229
|
-
if (state.primaryText) {
|
|
230
|
-
state.primaryText.className = mergeClasses(referenceClassNames.primaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.primaryText.className);
|
|
231
|
-
isSubsequentText = true;
|
|
232
|
-
}
|
|
233
|
-
if (state.secondaryText) {
|
|
234
|
-
state.secondaryText.className = mergeClasses(referenceClassNames.secondaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.secondaryText.className);
|
|
235
|
-
isSubsequentText = true;
|
|
57
|
+
state.citation.className = mergeClasses(referenceClassNames.citation, citationBaseClassName, state.citation.className);
|
|
236
58
|
}
|
|
237
|
-
if (state.
|
|
238
|
-
state.
|
|
239
|
-
isSubsequentText = true;
|
|
59
|
+
if (state.divider) {
|
|
60
|
+
state.divider.className = mergeClasses(referenceClassNames.divider, dividerBaseClassName, state.divider.className);
|
|
240
61
|
}
|
|
241
|
-
if (state.
|
|
242
|
-
state.
|
|
62
|
+
if (state.content) {
|
|
63
|
+
state.content.className = mergeClasses(referenceClassNames.content, contentBaseClassName, state.content.className);
|
|
243
64
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
state.detailsButton.className = mergeClasses(referenceClassNames.detailsButton, styles.detailsButton, state.detailsButton.className);
|
|
65
|
+
if (state.graphic) {
|
|
66
|
+
state.graphic.className = mergeClasses(referenceClassNames.graphic, graphicBaseClassName, state.graphic.className);
|
|
247
67
|
}
|
|
248
68
|
return state;
|
|
249
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReferenceStyles.styles.ts"],"sourcesContent":["import {\n buttonClassNames,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { ReferenceSlots, ReferenceState } from './Reference.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\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\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\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 padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n },\n inline: {},\n popover: {\n ...shorthands.borderWidth('0px'),\n width: `calc(${maxPopoverWidth} - (${tokens.spacingHorizontalM} * 2))`,\n padding: '0px',\n },\n closed: {\n rowGap: 0,\n },\n citation: {\n gridArea: 'citation',\n },\n media: {\n 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 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 gridArea: 'sensitivityLabel',\n justifySelf: 'start',\n },\n metadata: {\n marginTop: tokens.spacingVerticalXS,\n\n 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 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 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 *\n * deprecated Use ReferenceV2 component, hooks and types instead.\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","typographyStyles","tokens","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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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E,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
|
+
{"version":3,"sources":["useReferenceStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@fluentui/react-components';\nimport { tokens, typographyStyles } from '@fluentui-copilot/tokens';\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 divider: 'fai-Reference__divider',\n graphic: 'fai-Reference__graphic',\n content: 'fai-Reference__content',\n};\n\nexport const referenceExtraClassNames = {\n graphicChild: 'fai-Reference__graphicChild',\n};\n\nconst GRAPHIC_SIZE = '16px';\n\nconst useRootBaseClassName = makeResetStyles({\n alignItems: 'center',\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n borderRadius: tokens.borderRadiusMedium,\n boxSizing: 'border-box',\n color: tokens.colorNeutralForeground2,\n columnGap: tokens.spacingHorizontalXXS,\n display: 'inline-flex',\n flexShrink: 0,\n justifyContent: 'center',\n maxWidth: '100%',\n minHeight: '24px',\n padding: `${tokens.spacingVerticalXXS} ${tokens.spacingHorizontalS}`,\n textDecoration: 'none',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground3Hover,\n borderColor: tokens.colorNeutralStroke1Hover,\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${referenceClassNames.divider}`]: {\n backgroundColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground3Pressed,\n borderColor: tokens.colorNeutralStroke1Pressed,\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${referenceClassNames.divider}`]: {\n backgroundColor: tokens.colorNeutralStroke1Pressed,\n },\n },\n});\n\nexport const useRootStyles = makeStyles({\n overflow: {\n maxWidth: '100%',\n width: '100%',\n },\n});\n\nconst useRootNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\nconst useCitationBaseClassName = makeResetStyles({\n ...typographyStyles.caption2Strong,\n});\n\nconst useDividerBaseClassName = makeResetStyles({\n backgroundColor: tokens.colorNeutralStroke2,\n height: '16px',\n margin: `${tokens.spacingVerticalNone} ${tokens.spacingHorizontalXS}`,\n width: '1px',\n});\n\nconst useGraphicBaseClassName = makeResetStyles({\n display: 'inline-flex',\n fontSize: GRAPHIC_SIZE,\n height: GRAPHIC_SIZE,\n lineHeight: GRAPHIC_SIZE,\n width: GRAPHIC_SIZE,\n\n [`> .${referenceExtraClassNames.graphicChild}`]: {\n height: GRAPHIC_SIZE,\n width: GRAPHIC_SIZE,\n },\n});\n\nconst useContentBaseClassName = makeResetStyles({\n alignItems: 'center',\n columnGap: tokens.spacingHorizontalSNudge,\n display: 'inline-flex',\n textAlign: 'start',\n wordBreak: 'break-word',\n ...typographyStyles.caption1,\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 { designVersion } = state;\n\n const rootBaseClassName = useRootBaseClassName();\n const rootNextStyles = useRootNextStyles();\n const citationBaseClassName = useCitationBaseClassName();\n const dividerBaseClassName = useDividerBaseClassName();\n const contentBaseClassName = useContentBaseClassName();\n const graphicBaseClassName = useGraphicBaseClassName();\n\n state.root.className = mergeClasses(\n referenceClassNames.root,\n rootBaseClassName,\n designVersion === 'next' && rootNextStyles.root,\n state.root.className,\n );\n\n if (state.citation) {\n state.citation.className = mergeClasses(\n referenceClassNames.citation,\n citationBaseClassName,\n state.citation.className,\n );\n }\n\n if (state.divider) {\n state.divider.className = mergeClasses(referenceClassNames.divider, dividerBaseClassName, state.divider.className);\n }\n\n if (state.content) {\n state.content.className = mergeClasses(referenceClassNames.content, contentBaseClassName, state.content.className);\n }\n\n if (state.graphic) {\n state.graphic.className = mergeClasses(referenceClassNames.graphic, graphicBaseClassName, state.graphic.className);\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","typographyStyles","referenceClassNames","root","citation","divider","graphic","content","referenceExtraClassNames","graphicChild","GRAPHIC_SIZE","useRootBaseClassName","alignItems","backgroundColor","colorNeutralBackground3","border","strokeWidthThin","colorNeutralStroke2","borderRadius","borderRadiusMedium","boxSizing","color","colorNeutralForeground2","columnGap","spacingHorizontalXXS","display","flexShrink","justifyContent","maxWidth","minHeight","padding","spacingVerticalXXS","spacingHorizontalS","textDecoration","colorNeutralBackground3Hover","borderColor","colorNeutralStroke1Hover","colorNeutralForeground2Hover","colorNeutralBackground3Pressed","colorNeutralStroke1Pressed","colorNeutralForeground2Pressed","useRootStyles","overflow","width","useRootNextStyles","borderRadiusXLarge","useCitationBaseClassName","caption2Strong","useDividerBaseClassName","height","margin","spacingVerticalNone","spacingHorizontalXS","useGraphicBaseClassName","fontSize","lineHeight","useContentBaseClassName","spacingHorizontalSNudge","textAlign","wordBreak","caption1","useReferenceStyles_unstable","state","designVersion","rootBaseClassName","rootNextStyles","citationBaseClassName","dividerBaseClassName","contentBaseClassName","graphicBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,6BAA6B;AACvF,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,2BAA2B;AAIpE,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,UAAU;IACVC,SAAS;IACTC,SAAS;IACTC,SAAS;AACX,EAAE;AAEF,OAAO,MAAMC,2BAA2B;IACtCC,cAAc;AAChB,EAAE;AAEF,MAAMC,eAAe;AAErB,MAAMC,uBAAuBd,gBAAgB;IAC3Ce,YAAY;IACZC,iBAAiBb,OAAOc,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEf,OAAOgB,eAAe,CAAC,OAAO,EAAEhB,OAAOiB,mBAAmB,CAAC,CAAC;IACvEC,cAAclB,OAAOmB,kBAAkB;IACvCC,WAAW;IACXC,OAAOrB,OAAOsB,uBAAuB;IACrCC,WAAWvB,OAAOwB,oBAAoB;IACtCC,SAAS;IACTC,YAAY;IACZC,gBAAgB;IAChBC,UAAU;IACVC,WAAW;IACXC,SAAS,CAAC,EAAE9B,OAAO+B,kBAAkB,CAAC,CAAC,EAAE/B,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ferenceList';
|
|
3
2
|
import { renderReferenceList_unstable } from './renderReferenceList';
|
|
3
|
+
import { useReferenceList_unstable } from './useReferenceList';
|
|
4
4
|
import { useReferenceListStyles_unstable } from './useReferenceListStyles.styles';
|
|
5
|
-
import {
|
|
6
|
-
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
5
|
+
import { useReferenceListContextValues_unstable } from './useReferenceListContextValues';
|
|
7
6
|
export const ReferenceList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
7
|
const state = useReferenceList_unstable(props, ref);
|
|
8
|
+
const referenceListContextValues = useReferenceListContextValues_unstable(state);
|
|
9
9
|
useReferenceListStyles_unstable(state);
|
|
10
|
-
|
|
11
|
-
return renderReferenceList_unstable(state);
|
|
10
|
+
return renderReferenceList_unstable(state, referenceListContextValues);
|
|
12
11
|
});
|
|
13
12
|
ReferenceList.displayName = 'ReferenceList';
|
|
14
13
|
//# sourceMappingURL=ReferenceList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceList.tsx"],"sourcesContent":["import * as React from 'react';\nimport {
|
|
1
|
+
{"version":3,"sources":["ReferenceList.tsx"],"sourcesContent":["import * as React from 'react';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { renderReferenceList_unstable } from './renderReferenceList';\nimport { useReferenceList_unstable } from './useReferenceList';\nimport { useReferenceListStyles_unstable } from './useReferenceListStyles.styles';\nimport { useReferenceListContextValues_unstable } from './useReferenceListContextValues';\nimport type { ReferenceListProps } from './ReferenceList.types';\n\nexport const ReferenceList: ForwardRefComponent<ReferenceListProps> = React.forwardRef((props, ref) => {\n const state = useReferenceList_unstable(props, ref);\n const referenceListContextValues = useReferenceListContextValues_unstable(state);\n\n useReferenceListStyles_unstable(state);\n\n return renderReferenceList_unstable(state, referenceListContextValues);\n});\n\nReferenceList.displayName = 'ReferenceList';\n"],"names":["React","renderReferenceList_unstable","useReferenceList_unstable","useReferenceListStyles_unstable","useReferenceListContextValues_unstable","ReferenceList","forwardRef","props","ref","state","referenceListContextValues","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAE/B,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,+BAA+B,QAAQ,kCAAkC;AAClF,SAASC,sCAAsC,QAAQ,kCAAkC;AAGzF,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQP,0BAA0BK,OAAOC;IAC/C,MAAME,6BAA6BN,uCAAuCK;IAE1EN,gCAAgCM;IAEhC,OAAOR,6BAA6BQ,OAAOC;AAC7C,GAAG;AAEHL,cAAcM,WAAW,GAAG"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
2
2
|
//# sourceMappingURL=ReferenceList.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\n/**
|
|
1
|
+
{"version":3,"sources":["ReferenceList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { ReferenceListContextValue } from '../../contexts/referenceListContext';\n\nexport type ReferenceListSlots = {\n /** The root of the component that contains the list of references. */\n root: NonNullable<Slot<'div'>>;\n\n /** The region that contains the references and is used for arrow navigation. */\n arrowableRegion: NonNullable<Slot<'div'>>;\n\n /** A space containing a button that expands the list of references. This slot is only rendered when the list of references is collapsed. */\n showMoreButton?: Slot<'span'>;\n\n /** A space containing a button that collapses the list of references. This slot is only rendered when the list of references is expanded. */\n showLessButton?: Slot<'span'>;\n};\n\nexport type ReferenceListProps = ComponentProps<Partial<ReferenceListSlots>> & {\n /**\n * The maximum number of references to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * If this value is less than `minVisibleReferences`, then `minVisibleReferences` will take precedence.\n * @default undefined\n */\n maxVisibleReferences?: number;\n\n /**\n * The minimum number of references to always show before overflowing.\n * If this value exceeds the number of references, the overflow functionality will be disabled.\n * If this value is greater than `maxVisibleReferences`, then this will take precedence.\n * @default undefined\n */\n minVisibleReferences?: number;\n};\n\nexport type ReferenceListState = ComponentState<ReferenceListSlots> &\n Pick<ReferenceListProps, 'maxVisibleReferences' | 'minVisibleReferences'> & {\n areReferencesExpanded: boolean;\n overflowButtonTriggeredViaKeyboard: React.MutableRefObject<boolean>;\n referenceListRef: React.RefObject<HTMLDivElement>;\n shouldUseOverflow: boolean;\n totalReferencesCount: number;\n };\n\nexport type ReferenceListContextValues = {\n referenceList: ReferenceListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AA6CA,WAEE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { ReferenceList } from './ReferenceList';
|
|
2
2
|
export { renderReferenceList_unstable } from './renderReferenceList';
|
|
3
3
|
export { useReferenceList_unstable } from './useReferenceList';
|
|
4
|
-
export { referenceListClassNames,
|
|
4
|
+
export { referenceListClassNames, useReferenceListStyles_unstable } from './useReferenceListStyles.styles';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { ReferenceList } from './ReferenceList';\nexport type { ReferenceListProps, ReferenceListSlots, ReferenceListState } from './ReferenceList.types';\nexport { renderReferenceList_unstable } from './renderReferenceList';\nexport { useReferenceList_unstable } from './useReferenceList';\nexport { referenceListClassNames,
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { ReferenceList } from './ReferenceList';\nexport type { ReferenceListContextValues, ReferenceListProps, ReferenceListSlots, ReferenceListState } from './ReferenceList.types';\nexport { renderReferenceList_unstable } from './renderReferenceList';\nexport { useReferenceList_unstable } from './useReferenceList';\nexport { referenceListClassNames, useReferenceListStyles_unstable } from './useReferenceListStyles.styles';\n"],"names":["ReferenceList","renderReferenceList_unstable","useReferenceList_unstable","referenceListClassNames","useReferenceListStyles_unstable"],"rangeMappings":";;;","mappings":"AAAA,SAASA,aAAa,QAAQ,kBAAkB;AAEhD,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,uBAAuB,EAAEC,+BAA+B,QAAQ,kCAAkC"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
-
import { assertSlots } from '@fluentui/react-components';
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { Overflow, assertSlots } from '@fluentui/react-components';
|
|
3
|
+
import { ReferenceListContextProvider } from '../../contexts/referenceListContext';
|
|
4
|
+
/**
|
|
5
|
+
* Render the final JSX of ReferenceList
|
|
6
|
+
*/
|
|
7
|
+
export const renderReferenceList_unstable = (state, contextValues) => {
|
|
5
8
|
assertSlots(state);
|
|
6
|
-
|
|
9
|
+
const {
|
|
10
|
+
minVisibleReferences
|
|
11
|
+
} = state;
|
|
12
|
+
return /*#__PURE__*/_jsx(ReferenceListContextProvider, {
|
|
13
|
+
value: contextValues.referenceList,
|
|
14
|
+
children: /*#__PURE__*/_jsx(Overflow, {
|
|
15
|
+
minimumVisible: minVisibleReferences,
|
|
16
|
+
children: /*#__PURE__*/_jsxs(state.root, {
|
|
17
|
+
children: [/*#__PURE__*/_jsx(state.arrowableRegion, {}), state.showMoreButton && /*#__PURE__*/_jsx(state.showMoreButton, {}), state.showLessButton && /*#__PURE__*/_jsx(state.showLessButton, {})]
|
|
18
|
+
})
|
|
19
|
+
})
|
|
20
|
+
});
|
|
7
21
|
};
|
|
8
22
|
//# sourceMappingURL=renderReferenceList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderReferenceList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { ReferenceListState, ReferenceListSlots } from './ReferenceList.types';\n\n
|
|
1
|
+
{"version":3,"sources":["renderReferenceList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Overflow, assertSlots } from '@fluentui/react-components';\nimport type { ReferenceListState, ReferenceListSlots, ReferenceListContextValues } from './ReferenceList.types';\nimport { ReferenceListContextProvider } from '../../contexts/referenceListContext';\n\n/**\n * Render the final JSX of ReferenceList\n */\nexport const renderReferenceList_unstable = (state: ReferenceListState, contextValues: ReferenceListContextValues) => {\n assertSlots<ReferenceListSlots>(state);\n\n const { minVisibleReferences } = state;\n\n return (\n <ReferenceListContextProvider value={contextValues.referenceList}>\n <Overflow minimumVisible={minVisibleReferences}>\n <state.root>\n <state.arrowableRegion />\n {state.showMoreButton && <state.showMoreButton />}\n {state.showLessButton && <state.showLessButton />}\n </state.root>\n </Overflow>\n </ReferenceListContextProvider>\n );\n};\n"],"names":["Overflow","assertSlots","ReferenceListContextProvider","renderReferenceList_unstable","state","contextValues","minVisibleReferences","value","referenceList","minimumVisible","root","arrowableRegion","showMoreButton","showLessButton"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,QAAQ,EAAEC,WAAW,QAAQ,6BAA6B;AAEnE,SAASC,4BAA4B,QAAQ,sCAAsC;AAEnF;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,OAA2BC;IACtEJ,YAAgCG;IAEhC,MAAM,EAAEE,oBAAoB,EAAE,GAAGF;IAEjC,qBACE,KAACF;QAA6BK,OAAOF,cAAcG,aAAa;kBAC9D,cAAA,KAACR;YAASS,gBAAgBH;sBACxB,cAAA,MAACF,MAAMM,IAAI;;kCACT,KAACN,MAAMO,eAAe;oBACrBP,MAAMQ,cAAc,kBAAI,KAACR,MAAMQ,cAAc;oBAC7CR,MAAMS,cAAc,kBAAI,KAACT,MAAMS,cAAc;;;;;AAKxD,EAAE"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { getIntrinsicElementProps, slot } from '@fluentui/react-components';
|
|
3
|
-
import {
|
|
2
|
+
import { getIntrinsicElementProps, mergeCallbacks, slot, useArrowNavigationGroup, useMergedRefs } from '@fluentui/react-components';
|
|
3
|
+
import { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';
|
|
4
|
+
import { useRootStyles } from '../Reference/useReferenceStyles.styles';
|
|
4
5
|
/**
|
|
5
6
|
* Create the state required to render ReferenceList.
|
|
6
7
|
*
|
|
@@ -9,23 +10,84 @@ import { referenceListItemClassName } from './useReferenceListStyles.styles';
|
|
|
9
10
|
*
|
|
10
11
|
* @param props - props from this instance of ReferenceList
|
|
11
12
|
* @param ref - reference to root HTMLElement of ReferenceList
|
|
12
|
-
*
|
|
13
|
-
* deprecated Use ReferenceListV2 component, hooks and types instead.
|
|
14
13
|
*/
|
|
15
14
|
export const useReferenceList_unstable = (props, ref) => {
|
|
16
|
-
|
|
15
|
+
const {
|
|
16
|
+
arrowableRegion,
|
|
17
|
+
children,
|
|
18
|
+
maxVisibleReferences,
|
|
19
|
+
minVisibleReferences,
|
|
20
|
+
showLessButton,
|
|
21
|
+
showMoreButton,
|
|
22
|
+
...rest
|
|
23
|
+
} = props;
|
|
24
|
+
const [areReferencesExpanded, setAreReferencesExpanded] = React.useState(false);
|
|
25
|
+
const referenceListRef = React.useRef(null);
|
|
26
|
+
const totalReferencesCount = React.Children.count(children);
|
|
27
|
+
const styles = useRootStyles();
|
|
28
|
+
const resolvedChildren = useOverflowMaxVisibleItems({
|
|
29
|
+
additionalCondition: !areReferencesExpanded,
|
|
30
|
+
children,
|
|
31
|
+
maxVisibleItems: maxVisibleReferences,
|
|
32
|
+
minVisibleItems: minVisibleReferences,
|
|
33
|
+
overflowClassName: styles.overflow
|
|
34
|
+
});
|
|
35
|
+
// We keep track of whether we are interacting with the overflow button via keyboard or not.
|
|
36
|
+
const overflowButtonTriggeredViaKeyboard = React.useRef(false);
|
|
37
|
+
const focusAttributes = useArrowNavigationGroup({
|
|
38
|
+
axis: 'both',
|
|
39
|
+
circular: true,
|
|
40
|
+
memorizeCurrent: true
|
|
41
|
+
});
|
|
42
|
+
const onShowMoreButtonClick = React.useCallback(() => {
|
|
43
|
+
setAreReferencesExpanded(true);
|
|
44
|
+
}, []);
|
|
45
|
+
const onShowLessButtonClick = React.useCallback(() => {
|
|
46
|
+
setAreReferencesExpanded(false);
|
|
47
|
+
}, []);
|
|
48
|
+
const shouldUseOverflow = (minVisibleReferences === undefined || minVisibleReferences < totalReferencesCount) && maxVisibleReferences !== undefined && !areReferencesExpanded;
|
|
49
|
+
// Since the overflow button is an OverflowItem that's always visible, we need to account for it.
|
|
50
|
+
const minVisibleOverflowItems = minVisibleReferences ? minVisibleReferences + 1 : 1;
|
|
51
|
+
const state = {
|
|
52
|
+
areReferencesExpanded,
|
|
53
|
+
overflowButtonTriggeredViaKeyboard,
|
|
54
|
+
maxVisibleReferences,
|
|
55
|
+
minVisibleReferences: minVisibleOverflowItems,
|
|
56
|
+
referenceListRef,
|
|
57
|
+
shouldUseOverflow,
|
|
58
|
+
totalReferencesCount,
|
|
17
59
|
components: {
|
|
18
|
-
root: '
|
|
60
|
+
root: 'div',
|
|
61
|
+
arrowableRegion: 'div',
|
|
62
|
+
showMoreButton: 'span',
|
|
63
|
+
showLessButton: 'span'
|
|
19
64
|
},
|
|
20
|
-
root: slot.always(getIntrinsicElementProps('
|
|
21
|
-
ref,
|
|
22
|
-
...
|
|
23
|
-
children: React.Children.map(props.children, child => /*#__PURE__*/React.createElement("li", {
|
|
24
|
-
className: referenceListItemClassName
|
|
25
|
-
}, child))
|
|
65
|
+
root: slot.always(getIntrinsicElementProps('div', {
|
|
66
|
+
ref: useMergedRefs(ref, referenceListRef),
|
|
67
|
+
...rest
|
|
26
68
|
}), {
|
|
27
|
-
elementType: '
|
|
28
|
-
})
|
|
69
|
+
elementType: 'div'
|
|
70
|
+
}),
|
|
71
|
+
arrowableRegion: slot.always(arrowableRegion, {
|
|
72
|
+
defaultProps: {
|
|
73
|
+
...focusAttributes,
|
|
74
|
+
children: resolvedChildren
|
|
75
|
+
},
|
|
76
|
+
elementType: 'div'
|
|
77
|
+
}),
|
|
78
|
+
showMoreButton: shouldUseOverflow ? slot.optional(showMoreButton, {
|
|
79
|
+
elementType: 'span'
|
|
80
|
+
}) : undefined,
|
|
81
|
+
showLessButton: areReferencesExpanded ? slot.optional(showLessButton, {
|
|
82
|
+
elementType: 'span'
|
|
83
|
+
}) : undefined
|
|
29
84
|
};
|
|
85
|
+
if (state.showMoreButton) {
|
|
86
|
+
state.showMoreButton.onClick = mergeCallbacks(onShowMoreButtonClick, state.showMoreButton.onClick);
|
|
87
|
+
}
|
|
88
|
+
if (state.showLessButton) {
|
|
89
|
+
state.showLessButton.onClick = mergeCallbacks(onShowLessButtonClick, state.showLessButton.onClick);
|
|
90
|
+
}
|
|
91
|
+
return state;
|
|
30
92
|
};
|
|
31
93
|
//# sourceMappingURL=useReferenceList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReferenceList.
|
|
1
|
+
{"version":3,"sources":["useReferenceList.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n mergeCallbacks,\n slot,\n useArrowNavigationGroup,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';\nimport { useRootStyles } from '../Reference/useReferenceStyles.styles';\nimport type { ReferenceListProps, ReferenceListState } from './ReferenceList.types';\n\n/**\n * Create the state required to render ReferenceList.\n *\n * The returned state can be modified with hooks such as useReferenceListStyles_unstable,\n * before being passed to renderReferenceList_unstable.\n *\n * @param props - props from this instance of ReferenceList\n * @param ref - reference to root HTMLElement of ReferenceList\n */\nexport const useReferenceList_unstable = (\n props: ReferenceListProps,\n ref: React.Ref<HTMLDivElement>,\n): ReferenceListState => {\n const {\n arrowableRegion,\n children,\n maxVisibleReferences,\n minVisibleReferences,\n showLessButton,\n showMoreButton,\n ...rest\n } = props;\n\n const [areReferencesExpanded, setAreReferencesExpanded] = React.useState(false);\n const referenceListRef = React.useRef<HTMLDivElement>(null);\n\n const totalReferencesCount = React.Children.count(children);\n const styles = useRootStyles();\n const resolvedChildren = useOverflowMaxVisibleItems({\n additionalCondition: !areReferencesExpanded,\n children,\n maxVisibleItems: maxVisibleReferences,\n minVisibleItems: minVisibleReferences,\n overflowClassName: styles.overflow,\n });\n\n // We keep track of whether we are interacting with the overflow button via keyboard or not.\n const overflowButtonTriggeredViaKeyboard = React.useRef(false);\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n memorizeCurrent: true,\n });\n\n const onShowMoreButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(true);\n }, []);\n\n const onShowLessButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(false);\n }, []);\n\n const shouldUseOverflow =\n (minVisibleReferences === undefined || minVisibleReferences < totalReferencesCount) &&\n maxVisibleReferences !== undefined &&\n !areReferencesExpanded;\n\n // Since the overflow button is an OverflowItem that's always visible, we need to account for it.\n const minVisibleOverflowItems = minVisibleReferences ? minVisibleReferences + 1 : 1;\n\n const state: ReferenceListState = {\n areReferencesExpanded,\n overflowButtonTriggeredViaKeyboard,\n maxVisibleReferences,\n minVisibleReferences: minVisibleOverflowItems,\n referenceListRef,\n shouldUseOverflow,\n totalReferencesCount,\n\n components: {\n root: 'div',\n arrowableRegion: 'div',\n showMoreButton: 'span',\n showLessButton: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, referenceListRef),\n ...rest,\n }),\n { elementType: 'div' },\n ),\n arrowableRegion: slot.always(arrowableRegion, {\n defaultProps: { ...focusAttributes, children: resolvedChildren },\n elementType: 'div',\n }),\n showMoreButton: shouldUseOverflow ? slot.optional(showMoreButton, { elementType: 'span' }) : undefined,\n showLessButton: areReferencesExpanded ? slot.optional(showLessButton, { elementType: 'span' }) : undefined,\n };\n\n if (state.showMoreButton) {\n state.showMoreButton.onClick = mergeCallbacks(onShowMoreButtonClick, state.showMoreButton.onClick);\n }\n\n if (state.showLessButton) {\n state.showLessButton.onClick = mergeCallbacks(onShowLessButtonClick, state.showLessButton.onClick);\n }\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useArrowNavigationGroup","useMergedRefs","useOverflowMaxVisibleItems","useRootStyles","useReferenceList_unstable","props","ref","arrowableRegion","children","maxVisibleReferences","minVisibleReferences","showLessButton","showMoreButton","rest","areReferencesExpanded","setAreReferencesExpanded","useState","referenceListRef","useRef","totalReferencesCount","Children","count","styles","resolvedChildren","additionalCondition","maxVisibleItems","minVisibleItems","overflowClassName","overflow","overflowButtonTriggeredViaKeyboard","focusAttributes","axis","circular","memorizeCurrent","onShowMoreButtonClick","useCallback","onShowLessButtonClick","shouldUseOverflow","undefined","minVisibleOverflowItems","state","components","root","always","elementType","defaultProps","optional","onClick"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,cAAc,EACdC,IAAI,EACJC,uBAAuB,EACvBC,aAAa,QACR,6BAA6B;AACpC,SAASC,0BAA0B,QAAQ,oCAAoC;AAC/E,SAASC,aAAa,QAAQ,yCAAyC;AAGvE;;;;;;;;CAQC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EACJC,eAAe,EACfC,QAAQ,EACRC,oBAA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