@fluentui-copilot/react-reference 0.15.4 → 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 +45 -1
- package/CHANGELOG.md +24 -1
- 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
|
@@ -17,361 +17,93 @@ _export(exports, {
|
|
|
17
17
|
},
|
|
18
18
|
useReferenceStyles_unstable: function() {
|
|
19
19
|
return useReferenceStyles_unstable;
|
|
20
|
+
},
|
|
21
|
+
useRootStyles: function() {
|
|
22
|
+
return useRootStyles;
|
|
20
23
|
}
|
|
21
24
|
});
|
|
22
25
|
const _reactcomponents = require("@fluentui/react-components");
|
|
23
26
|
const referenceClassNames = {
|
|
24
27
|
root: 'fai-Reference',
|
|
25
28
|
citation: 'fai-Reference__citation',
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
metadata: 'fai-Reference__metadata',
|
|
30
|
-
primaryText: 'fai-Reference__primaryText',
|
|
31
|
-
secondaryText: 'fai-Reference__secondaryText',
|
|
32
|
-
tertiaryText: 'fai-Reference__tertiaryText',
|
|
33
|
-
icon: 'fai-Reference__icon',
|
|
34
|
-
label: 'fai-Reference__label',
|
|
35
|
-
content: 'fai-Reference__content',
|
|
36
|
-
detailsButton: 'fai-Reference__detailsButton'
|
|
29
|
+
divider: 'fai-Reference__divider',
|
|
30
|
+
graphic: 'fai-Reference__graphic',
|
|
31
|
+
content: 'fai-Reference__content'
|
|
37
32
|
};
|
|
38
33
|
const referenceExtraClassNames = {
|
|
39
|
-
|
|
40
|
-
mediaChild: 'fai-Reference__mediaChild'
|
|
34
|
+
graphicChild: 'fai-Reference__graphicChild'
|
|
41
35
|
};
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
".
|
|
36
|
+
const GRAPHIC_SIZE = '16px';
|
|
37
|
+
const useRootBaseClassName = (0, _reactcomponents.__resetStyles)("r5aus6y", null, [
|
|
38
|
+
".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;}",
|
|
39
|
+
".r5aus6y:hover{background-color:var(--colorNeutralBackground3Hover);border-color:var(--colorNeutralStroke1Hover);color:var(--colorNeutralForeground2Hover);}",
|
|
40
|
+
".r5aus6y:hover .fai-Reference__divider{background-color:var(--colorNeutralStroke1Hover);}",
|
|
41
|
+
".r5aus6y:hover:active{background-color:var(--colorNeutralBackground3Pressed);border-color:var(--colorNeutralStroke1Pressed);color:var(--colorNeutralForeground2Pressed);}",
|
|
42
|
+
".r5aus6y:hover:active .fai-Reference__divider{background-color:var(--colorNeutralStroke1Pressed);}"
|
|
47
43
|
]);
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Byoj8tv: 0,
|
|
53
|
-
uwmqm3: 0,
|
|
54
|
-
z189sj: 0,
|
|
55
|
-
z8tnut: 0,
|
|
56
|
-
B0ocmuz: "f1v65gcw"
|
|
57
|
-
},
|
|
58
|
-
inline: {},
|
|
59
|
-
popover: {
|
|
60
|
-
B4j52fo: "f1pit55b",
|
|
61
|
-
Bekrc4i: [
|
|
62
|
-
"f1orqat1",
|
|
63
|
-
"ffbvwxd"
|
|
64
|
-
],
|
|
65
|
-
Bn0qgzm: "f136mcbi",
|
|
66
|
-
ibv6hh: [
|
|
67
|
-
"ffbvwxd",
|
|
68
|
-
"f1orqat1"
|
|
69
|
-
],
|
|
70
|
-
a9b677: "f1uniyfe",
|
|
71
|
-
Byoj8tv: 0,
|
|
72
|
-
uwmqm3: 0,
|
|
73
|
-
z189sj: 0,
|
|
74
|
-
z8tnut: 0,
|
|
75
|
-
B0ocmuz: "f1c5fvqg"
|
|
76
|
-
},
|
|
77
|
-
closed: {
|
|
78
|
-
Belr9w4: "f1sff6ri"
|
|
79
|
-
},
|
|
80
|
-
citation: {
|
|
81
|
-
Bw0ie65: 0,
|
|
82
|
-
Br312pm: 0,
|
|
83
|
-
nk6f5a: 0,
|
|
84
|
-
Ijaq50: 0,
|
|
85
|
-
Bq1tomu: "f4z8xh6"
|
|
86
|
-
},
|
|
87
|
-
media: {
|
|
88
|
-
Bw0ie65: 0,
|
|
89
|
-
Br312pm: 0,
|
|
90
|
-
nk6f5a: 0,
|
|
91
|
-
Ijaq50: 0,
|
|
92
|
-
Bq1tomu: "fujjg13",
|
|
93
|
-
mc9l5x: "f22iagw",
|
|
94
|
-
Bt984gj: "f122n59",
|
|
95
|
-
Brf1p80: "f4d9j23"
|
|
96
|
-
},
|
|
97
|
-
mediaPopover: {
|
|
98
|
-
a9b677: "fjw5fx7",
|
|
99
|
-
Bqenvij: "fd461yt",
|
|
100
|
-
psn4ub: "fe9dio4",
|
|
101
|
-
vf399t: "f1ojxjpn"
|
|
102
|
-
},
|
|
103
|
-
actions: {
|
|
104
|
-
Bw0ie65: 0,
|
|
105
|
-
Br312pm: 0,
|
|
106
|
-
nk6f5a: 0,
|
|
107
|
-
Ijaq50: "f16hsg94",
|
|
108
|
-
Bq1tomu: "fceb517",
|
|
109
|
-
Bdqf98w: "f1a7i8kp",
|
|
110
|
-
mc9l5x: "f22iagw"
|
|
111
|
-
},
|
|
112
|
-
detailsButton: {
|
|
113
|
-
D5xksd: "fzmnlw3"
|
|
114
|
-
},
|
|
115
|
-
sensitivity: {
|
|
116
|
-
Bw0ie65: 0,
|
|
117
|
-
Br312pm: 0,
|
|
118
|
-
nk6f5a: 0,
|
|
119
|
-
Ijaq50: 0,
|
|
120
|
-
Bq1tomu: "fw0kx7a",
|
|
121
|
-
Bdqf98w: "fsxvdwy"
|
|
122
|
-
},
|
|
123
|
-
metadata: {
|
|
124
|
-
B6of3ja: "fww94b8",
|
|
125
|
-
Bw0ie65: 0,
|
|
126
|
-
Br312pm: 0,
|
|
127
|
-
nk6f5a: 0,
|
|
128
|
-
Ijaq50: 0,
|
|
129
|
-
Bq1tomu: "f14r5tnm",
|
|
130
|
-
Bahqtrf: "fk6fouc",
|
|
131
|
-
Be2twd7: "f13mqy1h",
|
|
132
|
-
Bhrd7zp: "figsok6",
|
|
133
|
-
Bg96gwp: "fcpl73t"
|
|
134
|
-
},
|
|
135
|
-
metadataSubsequentText: {
|
|
136
|
-
qhf8xq: "f10pi13n",
|
|
137
|
-
Frg6f3: [
|
|
138
|
-
"foyynoy",
|
|
139
|
-
"f1vcna3q"
|
|
140
|
-
],
|
|
141
|
-
Ftih45: "f1wl9k8s",
|
|
142
|
-
Br0sdwz: "f1aocrix",
|
|
143
|
-
Brfgrao: "f1j7ml58",
|
|
144
|
-
Fbdkly: [
|
|
145
|
-
"f1s1fjay",
|
|
146
|
-
"f15a459s"
|
|
147
|
-
],
|
|
148
|
-
Bciustq: "f1wl9tmt",
|
|
149
|
-
Baz25je: "f8pn7wt",
|
|
150
|
-
uvfttm: [
|
|
151
|
-
"f1x8pvcy",
|
|
152
|
-
"f9sc749"
|
|
153
|
-
],
|
|
154
|
-
Bbv0w2i: [
|
|
155
|
-
"f1jpmc5p",
|
|
156
|
-
"f1yq6w5o"
|
|
157
|
-
],
|
|
158
|
-
Bm6vgfq: [
|
|
159
|
-
"fjml6kk",
|
|
160
|
-
"f1geml7w"
|
|
161
|
-
]
|
|
162
|
-
},
|
|
163
|
-
icon: {
|
|
164
|
-
Bahqtrf: "fk6fouc",
|
|
165
|
-
Be2twd7: "f13mqy1h",
|
|
166
|
-
Bhrd7zp: "figsok6",
|
|
167
|
-
Bg96gwp: "fcpl73t",
|
|
168
|
-
ha4doy: "fmrv4ls"
|
|
169
|
-
},
|
|
170
|
-
content: {
|
|
171
|
-
B6of3ja: "fww94b8",
|
|
172
|
-
Bw0ie65: 0,
|
|
173
|
-
Br312pm: 0,
|
|
174
|
-
nk6f5a: 0,
|
|
175
|
-
Ijaq50: 0,
|
|
176
|
-
Bq1tomu: "fqi5tbq",
|
|
177
|
-
mc9l5x: "f22iagw",
|
|
178
|
-
Beiy3e4: "f1vx9l62",
|
|
179
|
-
Belr9w4: "f1wn3y0l",
|
|
180
|
-
sj55zd: "f11d4kpn",
|
|
181
|
-
Biipf1f: "f9ijwd5"
|
|
182
|
-
},
|
|
183
|
-
hidden: {
|
|
184
|
-
mc9l5x: "fjseox"
|
|
44
|
+
const useRootStyles = (0, _reactcomponents.__styles)({
|
|
45
|
+
overflow: {
|
|
46
|
+
B2u0y6b: "f6dzj5z",
|
|
47
|
+
a9b677: "fly5x3f"
|
|
185
48
|
}
|
|
186
49
|
}, {
|
|
187
50
|
d: [
|
|
188
|
-
".
|
|
189
|
-
|
|
190
|
-
".f1v65gcw{padding:var(--spacingVerticalXS) var(--spacingHorizontalS);}",
|
|
191
|
-
{
|
|
192
|
-
p: -1
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
".f1pit55b{border-top-width:0px;}",
|
|
196
|
-
".f1orqat1{border-right-width:0px;}",
|
|
197
|
-
".ffbvwxd{border-left-width:0px;}",
|
|
198
|
-
".f136mcbi{border-bottom-width:0px;}",
|
|
199
|
-
".f1uniyfe{width:calc(256px - (var(--spacingHorizontalM) * 2));}",
|
|
200
|
-
[
|
|
201
|
-
".f1c5fvqg{padding:0px;}",
|
|
202
|
-
{
|
|
203
|
-
p: -1
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
".f1sff6ri{row-gap:0;}",
|
|
207
|
-
[
|
|
208
|
-
".f4z8xh6{grid-area:citation;}",
|
|
209
|
-
{
|
|
210
|
-
p: -1
|
|
211
|
-
}
|
|
212
|
-
],
|
|
213
|
-
[
|
|
214
|
-
".fujjg13{grid-area:media;}",
|
|
215
|
-
{
|
|
216
|
-
p: -1
|
|
217
|
-
}
|
|
218
|
-
],
|
|
219
|
-
".f22iagw{display:flex;}",
|
|
220
|
-
".f122n59{align-items:center;}",
|
|
221
|
-
".f4d9j23{justify-content:center;}",
|
|
222
|
-
".fjw5fx7{width:16px;}",
|
|
223
|
-
".fd461yt{height:16px;}",
|
|
224
|
-
".fe9dio4>.fai-Reference__mediaChild{width:16px;}",
|
|
225
|
-
".f1ojxjpn>.fai-Reference__mediaChild{height:16px;}",
|
|
226
|
-
[
|
|
227
|
-
".fceb517{grid-area:actions;}",
|
|
228
|
-
{
|
|
229
|
-
p: -1
|
|
230
|
-
}
|
|
231
|
-
],
|
|
232
|
-
".f1a7i8kp{justify-self:end;}",
|
|
233
|
-
".f16hsg94{grid-row-start:1;}",
|
|
234
|
-
".fzmnlw3>fui-Button__icon{color:var(--colorNeutralForeground3);}",
|
|
235
|
-
[
|
|
236
|
-
".fw0kx7a{grid-area:sensitivityLabel;}",
|
|
237
|
-
{
|
|
238
|
-
p: -1
|
|
239
|
-
}
|
|
240
|
-
],
|
|
241
|
-
".fsxvdwy{justify-self:start;}",
|
|
242
|
-
".fww94b8{margin-top:var(--spacingVerticalXS);}",
|
|
243
|
-
[
|
|
244
|
-
".f14r5tnm{grid-area:metadata;}",
|
|
245
|
-
{
|
|
246
|
-
p: -1
|
|
247
|
-
}
|
|
248
|
-
],
|
|
249
|
-
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
250
|
-
".f13mqy1h{font-size:var(--fontSizeBase100);}",
|
|
251
|
-
".figsok6{font-weight:var(--fontWeightRegular);}",
|
|
252
|
-
".fcpl73t{line-height:var(--lineHeightBase100);}",
|
|
253
|
-
".f10pi13n{position:relative;}",
|
|
254
|
-
".foyynoy{margin-left:var(--spacingHorizontalS);}",
|
|
255
|
-
".f1vcna3q{margin-right:var(--spacingHorizontalS);}",
|
|
256
|
-
".f1wl9k8s::before{content:\"\";}",
|
|
257
|
-
".f1aocrix::before{display:block;}",
|
|
258
|
-
".f1j7ml58::before{position:absolute;}",
|
|
259
|
-
".f1s1fjay::before{left:calc(var(--spacingHorizontalS) / -2);}",
|
|
260
|
-
".f15a459s::before{right:calc(var(--spacingHorizontalS) / -2);}",
|
|
261
|
-
".f1wl9tmt::before{top:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);}",
|
|
262
|
-
".f8pn7wt::before{height:var(--fontSizeBase100);}",
|
|
263
|
-
".f1x8pvcy::before{border-left-width:var(--strokeWidthThin);}",
|
|
264
|
-
".f9sc749::before{border-right-width:var(--strokeWidthThin);}",
|
|
265
|
-
".f1jpmc5p::before{border-left-style:solid;}",
|
|
266
|
-
".f1yq6w5o::before{border-right-style:solid;}",
|
|
267
|
-
".fjml6kk::before{border-left-color:var(--colorNeutralStroke2);}",
|
|
268
|
-
".f1geml7w::before{border-right-color:var(--colorNeutralStroke2);}",
|
|
269
|
-
".fmrv4ls{vertical-align:middle;}",
|
|
270
|
-
[
|
|
271
|
-
".fqi5tbq{grid-area:content;}",
|
|
272
|
-
{
|
|
273
|
-
p: -1
|
|
274
|
-
}
|
|
275
|
-
],
|
|
276
|
-
".f1vx9l62{flex-direction:column;}",
|
|
277
|
-
".f1wn3y0l{row-gap:var(--spacingVerticalS);}",
|
|
278
|
-
".f11d4kpn{color:var(--colorNeutralForeground3);}",
|
|
279
|
-
".f9ijwd5{word-break:break-word;}",
|
|
280
|
-
".fjseox{display:none;}"
|
|
51
|
+
".f6dzj5z{max-width:100%;}",
|
|
52
|
+
".fly5x3f{width:100%;}"
|
|
281
53
|
]
|
|
282
54
|
});
|
|
283
|
-
const
|
|
55
|
+
const useRootNextStyles = (0, _reactcomponents.__styles)({
|
|
284
56
|
root: {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
qb2dma: "f9h729m",
|
|
291
|
-
Bahqtrf: "fk6fouc",
|
|
292
|
-
Be2twd7: "fy9rknc",
|
|
293
|
-
Bhrd7zp: "fl43uef",
|
|
294
|
-
Bg96gwp: "fwrc4pm",
|
|
295
|
-
Biipf1f: "f9ijwd5",
|
|
296
|
-
Fd1uvx: "fpfc2by",
|
|
297
|
-
Bh9c35c: "f1lvsx7g",
|
|
298
|
-
mc9l5x: "f1rvi9lw",
|
|
299
|
-
Bmxbyg5: "f1sil6mw"
|
|
300
|
-
},
|
|
301
|
-
canvas: {
|
|
302
|
-
z8tnut: "f1vd4pcd"
|
|
303
|
-
},
|
|
304
|
-
sidecar: {
|
|
305
|
-
z8tnut: "f1u9e4k4"
|
|
306
|
-
},
|
|
307
|
-
closed: {
|
|
308
|
-
B2u0y6b: "f6dzj5z",
|
|
309
|
-
Bh9c35c: "fvvof4m"
|
|
57
|
+
Beyfa6y: 0,
|
|
58
|
+
Bbmb7ep: 0,
|
|
59
|
+
Btl43ni: 0,
|
|
60
|
+
B7oj6ja: 0,
|
|
61
|
+
Dimara: "f1kijzfu"
|
|
310
62
|
}
|
|
311
63
|
}, {
|
|
312
64
|
d: [
|
|
313
65
|
[
|
|
314
|
-
".
|
|
66
|
+
".f1kijzfu{border-radius:var(--borderRadiusXLarge);}",
|
|
315
67
|
{
|
|
316
68
|
p: -1
|
|
317
69
|
}
|
|
318
|
-
]
|
|
319
|
-
".f9h729m{align-self:start;}",
|
|
320
|
-
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
321
|
-
".fy9rknc{font-size:var(--fontSizeBase200);}",
|
|
322
|
-
".fl43uef{font-weight:var(--fontWeightSemibold);}",
|
|
323
|
-
".fwrc4pm{line-height:var(--lineHeightBase200);}",
|
|
324
|
-
".f9ijwd5{word-break:break-word;}",
|
|
325
|
-
".fpfc2by{-webkit-box-orient:vertical;}",
|
|
326
|
-
".f1lvsx7g{-webkit-line-clamp:2;}",
|
|
327
|
-
".f1rvi9lw{display:-webkit-box;}",
|
|
328
|
-
".f1sil6mw{overflow-y:hidden;}",
|
|
329
|
-
".f1vd4pcd{padding-top:calc((24px / 2 ) - (var(--lineHeightBase200) - var(--fontSizeBase200)));}",
|
|
330
|
-
".f1u9e4k4{padding-top:calc((16px / 2 ) - (var(--lineHeightBase200) - var(--fontSizeBase200)));}",
|
|
331
|
-
".f6dzj5z{max-width:100%;}",
|
|
332
|
-
".fvvof4m{-webkit-line-clamp:1;}"
|
|
70
|
+
]
|
|
333
71
|
]
|
|
334
72
|
});
|
|
73
|
+
const useCitationBaseClassName = (0, _reactcomponents.__resetStyles)("r342rk1", null, [
|
|
74
|
+
".r342rk1{font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase100);font-weight:var(--fontWeightBold);line-height:var(--lineHeightBase200);}"
|
|
75
|
+
]);
|
|
76
|
+
const useDividerBaseClassName = (0, _reactcomponents.__resetStyles)("r1eyqaw5", null, [
|
|
77
|
+
".r1eyqaw5{background-color:var(--colorNeutralStroke2);height:16px;margin:var(--spacingVerticalNone) var(--spacingHorizontalXS);width:1px;}"
|
|
78
|
+
]);
|
|
79
|
+
const useGraphicBaseClassName = (0, _reactcomponents.__resetStyles)("rpyrgl4", null, [
|
|
80
|
+
".rpyrgl4{display:inline-flex;font-size:16px;height:16px;line-height:16px;width:16px;}",
|
|
81
|
+
".rpyrgl4>.fai-Reference__graphicChild{height:16px;width:16px;}"
|
|
82
|
+
]);
|
|
83
|
+
const useContentBaseClassName = (0, _reactcomponents.__resetStyles)("r1ycou3l", null, [
|
|
84
|
+
".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);}"
|
|
85
|
+
]);
|
|
335
86
|
const useReferenceStyles_unstable = (state)=>{
|
|
336
87
|
'use no memo';
|
|
337
|
-
const {
|
|
338
|
-
const
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
|
|
88
|
+
const { designVersion } = state;
|
|
89
|
+
const rootBaseClassName = useRootBaseClassName();
|
|
90
|
+
const rootNextStyles = useRootNextStyles();
|
|
91
|
+
const citationBaseClassName = useCitationBaseClassName();
|
|
92
|
+
const dividerBaseClassName = useDividerBaseClassName();
|
|
93
|
+
const contentBaseClassName = useContentBaseClassName();
|
|
94
|
+
const graphicBaseClassName = useGraphicBaseClassName();
|
|
95
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.root, rootBaseClassName, designVersion === 'next' && rootNextStyles.root, state.root.className);
|
|
342
96
|
if (state.citation) {
|
|
343
|
-
state.citation.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.citation,
|
|
344
|
-
}
|
|
345
|
-
if (state.media) {
|
|
346
|
-
state.media.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.media, styles.media, layout === 'popover' && styles.mediaPopover, state.media.className);
|
|
347
|
-
}
|
|
348
|
-
if (state.actions) {
|
|
349
|
-
state.actions.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.actions, styles.actions, state.actions.className);
|
|
350
|
-
}
|
|
351
|
-
state.label.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.label, labelStyles.root, labelStyles[mode], !isExpanded && labelStyles.closed, state.label.className);
|
|
352
|
-
if (state.sensitivity) {
|
|
353
|
-
state.sensitivity.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.sensitivity, styles.sensitivity, !isExpanded && styles.hidden, state.sensitivity.className);
|
|
354
|
-
}
|
|
355
|
-
state.metadata.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.metadata, styles.metadata, !isExpanded && styles.hidden, state.metadata.className);
|
|
356
|
-
let isSubsequentText = false;
|
|
357
|
-
if (state.primaryText) {
|
|
358
|
-
state.primaryText.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.primaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.primaryText.className);
|
|
359
|
-
isSubsequentText = true;
|
|
360
|
-
}
|
|
361
|
-
if (state.secondaryText) {
|
|
362
|
-
state.secondaryText.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.secondaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.secondaryText.className);
|
|
363
|
-
isSubsequentText = true;
|
|
97
|
+
state.citation.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.citation, citationBaseClassName, state.citation.className);
|
|
364
98
|
}
|
|
365
|
-
if (state.
|
|
366
|
-
state.
|
|
367
|
-
isSubsequentText = true;
|
|
99
|
+
if (state.divider) {
|
|
100
|
+
state.divider.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.divider, dividerBaseClassName, state.divider.className);
|
|
368
101
|
}
|
|
369
|
-
if (state.
|
|
370
|
-
state.
|
|
102
|
+
if (state.content) {
|
|
103
|
+
state.content.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.content, contentBaseClassName, state.content.className);
|
|
371
104
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
state.detailsButton.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.detailsButton, styles.detailsButton, state.detailsButton.className);
|
|
105
|
+
if (state.graphic) {
|
|
106
|
+
state.graphic.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.graphic, graphicBaseClassName, state.graphic.className);
|
|
375
107
|
}
|
|
376
108
|
return state;
|
|
377
109
|
}; //# sourceMappingURL=useReferenceStyles.styles.js.map
|
|
@@ -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":["referenceClassNames","mediaChild","root","citation","actions","sensitivity","primaryText","secondaryText","tertiaryText","label","content","detailsButton","text","labelFontSize","maxPopoverWidth","caption1Strong","fontSize","useReferenceClassName","makeResetStyles","lineHeight","boxSizing","width","__resetStyles","display","__styles","gridTemplateAreas","z8tnut","gridTemplateColumns","border","borderRadius","padding","boxShadow","columnGap","alignItems","a9b677","Byoj8tv","useStyles","canvas","sidecar","gridTemplateRows","inline","popover","Br312pm","closed","rowGap","Bq1tomu","gridArea","Bw0ie65","media","justifyContent","Bt984gj","mediaPopover","height","justifySelf","gridRowStart","D5xksd","metadata","marginTop","typographyStyles","metadataSubsequentText","position","marginLeft","left","top","icon","caption2","verticalAlign","Br0sdwz","tokens","spacingVerticalXS","flexDirection","spacingVerticalS","color","colorNeutralForeground3","hidden","Bhrd7zp","Bg96gwp","ha4doy","useLabelStyles","alignSelf","wordBreak","overflowY","Beiy3e4","paddingTop","maxWidth","p","state","nk6f5a","Bahqtrf","Biipf1f","isSubsequentText","Fd1uvx","Bmxbyg5","B2u0y6b"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAcQA,mBAAA;eAAAA;;IAkBNC,wBAAY;eAAZA;;;;;;iCA1BgB;AAQhBC,MAAMF,sBAAA;UACNG;cACO;WACPC;aACAC;iBACU;cACVC;iBACAC;mBACAC;kBACM;UACNC;WACAC;aACAC;IACAA,eAAA;AAEF;AAGEV,MAAAA,2BAAY;IACZW,MAAA;IAEFX,YAAMY;AACN;AAEA,MAAMC,gBAAAA,iCAAkB,CAAAC,cAAA,CAAAC,QAAA;AAExB,MAAMC,kBAAAA,iCAAwBC,CAAAA,cAAgB,CAAAC,UAAA;MAC5CC,kBAAW;MACXC,wBAAOC,IAAAA,8BAAA,EAAA,WAAA,MAAA;IAAA;CAAA;MACPC,YAASC,IAAAA,yBAAA,EAAA;YACTC,CAAAA;;;;;;QAMEC,QAAC;QACHC,SAAAA;;YAEAC,CAAAA;aACAC;QACAC,SAAS;QACTC,SAAAA;YAAAA;YAAW;SAAA;QACXC,SAAAA;QACAC,QAAAA;YAAAA;YAAY;SAAA;QACdC,QAAA;QAEAC,SAAMC;QACJC,QAAQ;QACRC,QAAAA;gBACEC;iBACAT;;YAEFU;QACAC,SAAS;;cAEPpB;iBACAS;QACFY,SAAA;QACAC,QAAQ;gBACNC;QACFC,SAAA;;WAEEC;QACFC,SAAA;QACAC,SAAO;gBACLF;gBACAvB;iBACAU;gBACAgB;QACFC,SAAA;QACAC,SAAAA;;kBAEU;gBAEN;iBACA9B;gBACA+B;gBACF;;aAEFhD;iBACE0C;iBACAO;gBACA9B;gBACA+B;QACFT,SAAA;QACAlC,SAAAA;gBACM;;mBAEJ;QACF4C,QAAA;;iBAEET;iBACAO;QACFX,SAAA;QACAc,QAAAA;gBACEC;iBAEAX;iBACGY;;cAELC;iBACEC;iBACAC;iBAEA;gBACEnD;gBACAa;iBACAqC;iBACAE;iBACAC;iBACAX;iBACA;;4BAEJ;QACAY,QAAM;gBACDN;YAAAA;YAAAA;SAAiBO;gBACpBC;QACFC,SAAA;QACAzD,SAAS;gBACP+C;YAAAA;YAAWW;SAAOC;iBAClBvB;iBACAvB;gBACA+C;YAAAA;YAAe;SAAA;iBACf1B;YAAAA;YAAe2B;SAAAA;iBACfC;YAAAA;YAAcC;SAAAA;;UAEhB;QACAC,SAAQ;iBACNnD;QACFoD,SAAA;QACFC,SAAA;QAEAC,QAAMC;;aAEFhC;iBACAiC;iBACGrB;iBACHsB;gBACA;gBACA;iBACAzD;gBACA0D;QACFC,SAAA;QAEA7C,SAAQ;gBACN;iBACA8C;;YAGF7C;gBACE;;;OAIFK;QAAAA;QAAQ;YAAA;YAAA;oBACNyC;;;;QACsB;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBACxBC,GAAA,CAAA;YACF;SAAA;QAAA;QAAA;YAAA;YAAA;gBAEAA,GAAA,CAAA;;;;;;;;;;;;;;;;;;;gBAKAA,GAAA,CAAA;;SACE;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAEAA,GAAA,CAAA;;SAEA;QAAA;QAAsBpE;QAAAA;YAAAA;YAAAA;gBACtBoE,GAAA,CAAA;;SACA;QAAA;QAAoBP;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;QAAAA;YAAAA;YAAAA;gBACpBQ,GAAAA,CAAAA;;SASA;QAAA;QAAoB;QAAA;QAAA;QAAA;KAAA;;MAEpBR,iBAAAtD,IAAAA,yBAAA,EAAA;UAEI8D;iBACFA;QAMF5C,SAAA;QAEA6C,QAAID;gBACFA;QACFzC,SAAA;QAEAyC,QAAM7E;QAQN+E,SAAIF;iBACFA;QAMFX,SAAA;QAEAW,SAAM9B;QAONiC,SAAIC;QACJC,QAAIL;iBACFA;gBAMAI;QACFE,SAAA;;YAGEN;gBAMAI;;aAGEJ;gBACFA;;YAOF;QAEAO,SAAIP;iBACFA;;;OASF;QAAA;YAAA;YAAyB;oBACvBA;;SAKF;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA"}
|
|
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":["referenceClassNames","referenceExtraClassNames","useReferenceStyles_unstable","alignItems","root","citation","divider","graphic","content","graphicChild","GRAPHIC_SIZE","useRootBaseClassName","makeResetStyles","__styles","backgroundColor","border","borderRadius","columnGap","spacingHorizontalXXS","flexShrink","justifyContent","maxWidth","minHeight","padding","textDecoration","Dimara","useCitationBaseClassName","__resetStyles","useDividerBaseClassName","colorNeutralBackground3Pressed","colorNeutralStroke1Pressed","state","overflow","width","rootNextStyles","useRootNextStyles","citationBaseClassName","makeStyles","useContentBaseClassName","borderRadiusXLarge","className","mergeClasses","rootBaseClassName","designVersion","dividerBaseClassName","height","margin","tokens","spacingVerticalNone","spacingHorizontalXS","contentBaseClassName","useGraphicBaseClassName","graphicBaseClassName","fontSize"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,mBAAAA;eAAAA;;IAQAC,wBAAAA;eAAAA;;IAuCTC,2BAAA;eAAAA;;IAhCFC,aAAY;eAAZA;;;iCApBgD;AAK3C,MAAMH,sBAAsD;UACjEI;cACAC;aACAC;aACAC;aACAC;AACF;AAEO,MAAMP,2BAA2B;kBACtCQ;AACF;AAEA,MAAMC,eAAe;AAErB,MAAMC,uBAAuBC,IAAAA,8BAAAA,EAAAA,WAAgB,MAAA;IAAA;IAAA;IAAA;IAAA;IAAA;CAAA;AAC3CT,MAAAA,gBAAYU,IAAAA,yBAAA,EAAA;cACZC;QACAC,SAAS;QACTC,QAAAA;;;OAGAC;QAAAA;QAAkBC;KAAoB;;MAEtCC,oBAAYN,IAAAA,yBAAA,EAAA;UACZO;QACAC,SAAAA;QACAC,SAAAA;QACAC,SAAS;QACTC,SAAAA;QAEAC,QAAA;;;;;;YAG4C;oBAE1C;;;;;MAGFC,2BAAAC,IAAAA,8BAAA,EAAA,WAAA,MAAA;IAAA;CAAA;MAEAC,0BAAiBD,IAAAA,8BAAA,EAAA,YAAA,MAAA;IAAA;CAAA;gCACSE,IAAAA,8BAAAA,EAAAA,WAAAA,MAA8B;IAAA;IAAA;CAAA;gCAClCC,IAAAA,8BAAAA,EAAAA,YAA0B,MAAA;IAAA;CAAA;MAK9C5B,8BAAA6B,CAAAA;;IAIJ,MAAO,EACLC,aAAU;UAERC,oBAAOtB;UACTuB,iBAAAC;IACF,MAAGC,wBAAAV;IAEH,MAAMS,uBAAoBE;UAAajC,uBAAMkC;UAAEtB,uBAAqBuB;UAAmBnC,IAAA,CAAAoC,SAAA,GAAAC,IAAAA,6BAAA,EAAAzC,oBAAAI,IAAA,EAAAsC,mBAAAC,kBAAA,UAAAT,eAAA9B,IAAA,EAAA2B,MAAA3B,IAAA,CAAAoC,SAAA;IAAE,IAAAT,MAAA1B,QAAA,EAAA;QAEzF0B,MAAML,QAAAA,CAAAA,SAAAA,GAAAA,IAAAA,6BAA2Bd,EAAAA,oBAAgBP,QAAA,EAAA+B,uBAAAL,MAAA1B,QAAA,CAAAmC,SAAA;;IAEjD,IAAAT,MAAAzB,OAAA,EAAA;QAEAyB,MAAMH,OAAAA,CAAAA,SAAAA,GAAAA,IAAAA,6BAA0BhB,EAAAA,oBAAgBN,OAAA,EAAAsC,sBAAAb,MAAAzB,OAAA,CAAAkC,SAAA;;QAE9CK,MAAQrC,OAAA,EAAA;QACRsC,MAAAA,OAAWC,CAAAA,SAAOC,GAAAA,IAAAA,6BAAoB,EAAChD,oBAASiD,OAAAA,EAAoBC,sBAACnB,MAAAvB,OAAA,CAAAgC,SAAA;;IAEvE,IAAAT,MAAAxB,OAAA,EAAA;QAEAwB,MAAMoB,OAAAA,CAAAA,SAAAA,GAAAA,IAAAA,6BAA0BvC,EAAAA,oBAAgBL,OAAA,EAAA6C,sBAAArB,MAAAxB,OAAA,CAAAiC,SAAA;;WAE9Ca;wDAEY3C"}
|
|
@@ -10,14 +10,14 @@ Object.defineProperty(exports, "ReferenceList", {
|
|
|
10
10
|
});
|
|
11
11
|
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
12
12
|
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
13
|
-
const _useReferenceList = require("./useReferenceList");
|
|
14
13
|
const _renderReferenceList = require("./renderReferenceList");
|
|
14
|
+
const _useReferenceList = require("./useReferenceList");
|
|
15
15
|
const _useReferenceListStylesstyles = require("./useReferenceListStyles.styles");
|
|
16
|
-
const
|
|
16
|
+
const _useReferenceListContextValues = require("./useReferenceListContextValues");
|
|
17
17
|
const ReferenceList = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
18
18
|
const state = (0, _useReferenceList.useReferenceList_unstable)(props, ref);
|
|
19
|
+
const referenceListContextValues = (0, _useReferenceListContextValues.useReferenceListContextValues_unstable)(state);
|
|
19
20
|
(0, _useReferenceListStylesstyles.useReferenceListStyles_unstable)(state);
|
|
20
|
-
(0,
|
|
21
|
-
return (0, _renderReferenceList.renderReferenceList_unstable)(state);
|
|
21
|
+
return (0, _renderReferenceList.renderReferenceList_unstable)(state, referenceListContextValues);
|
|
22
22
|
});
|
|
23
23
|
ReferenceList.displayName = 'ReferenceList'; //# 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":["ReferenceList","React","forwardRef","props","state","useReferenceList_unstable","referenceListContextValues","useReferenceListContextValues_unstable","useReferenceListStyles_unstable","renderReferenceList_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;qCAEsB;kCACH;8CACM;+CACO;AAGhD,MAAMA,gBAAAA,WAAAA,GAAAA,OAAyDC,UAAMC,CAAU,CAACC,OAACA;UACtFC,QAAMA,IAAAA,2CAAQC,EAAAA,OAA0BF;UACxCG,6BAAMA,IAAAA,qEAA6BC,EAAAA;qEAEnCC,EAAAA;WAEAC,IAAAA,iDAAOA,EAAAA,OAA6BL;AACtC;AAEAJ,cAAcU,WAAW,GAAG"}
|
|
@@ -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":""}
|
|
@@ -15,9 +15,6 @@ _export(exports, {
|
|
|
15
15
|
referenceListClassNames: function() {
|
|
16
16
|
return _useReferenceListStylesstyles.referenceListClassNames;
|
|
17
17
|
},
|
|
18
|
-
referenceListItemClassName: function() {
|
|
19
|
-
return _useReferenceListStylesstyles.referenceListItemClassName;
|
|
20
|
-
},
|
|
21
18
|
renderReferenceList_unstable: function() {
|
|
22
19
|
return _renderReferenceList.renderReferenceList_unstable;
|
|
23
20
|
},
|
|
@@ -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","referenceListClassNames","renderReferenceList_unstable","useReferenceListStyles_unstable","useReferenceList_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAIbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAEHC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BAHJ;qCAEe;kCACH;8CAC+B"}
|
|
@@ -10,7 +10,21 @@ Object.defineProperty(exports, "renderReferenceList_unstable", {
|
|
|
10
10
|
});
|
|
11
11
|
const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
12
12
|
const _reactcomponents = require("@fluentui/react-components");
|
|
13
|
-
const
|
|
13
|
+
const _referenceListContext = require("../../contexts/referenceListContext");
|
|
14
|
+
const renderReferenceList_unstable = (state, contextValues)=>{
|
|
14
15
|
(0, _reactcomponents.assertSlots)(state);
|
|
15
|
-
|
|
16
|
+
const { minVisibleReferences } = state;
|
|
17
|
+
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_referenceListContext.ReferenceListContextProvider, {
|
|
18
|
+
value: contextValues.referenceList,
|
|
19
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcomponents.Overflow, {
|
|
20
|
+
minimumVisible: minVisibleReferences,
|
|
21
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ (0, _jsxruntime.jsx)(state.arrowableRegion, {}),
|
|
24
|
+
state.showMoreButton && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.showMoreButton, {}),
|
|
25
|
+
state.showLessButton && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.showLessButton, {})
|
|
26
|
+
]
|
|
27
|
+
})
|
|
28
|
+
})
|
|
29
|
+
});
|
|
16
30
|
}; //# 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":["assertSlots","state","minVisibleReferences","contextValues","minimumVisible","referenceList","showMoreButton","root","showLessButton","arrowableRegion","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWEA;;;eAAAA;;;4BAVF;iCAEsC;sCAEO;AAM3CA,MAAAA,+BAAgCC,CAAAA,OAAAA;oCAExBC,EAAAA;UAER,sBACuCC;sBACzBC,GAAAA,IAAAA,eAAAA,EAAAA,kDAAgBF,EAAAA;6BACxBG,aAAA;;;iCAESC,GAAAA,IAAAA,gBAAAA,EAAAA,MAAcC,IAAA,EAAA;;+BACdC,GAAAA,IAAAA,eAAAA,EAAAA,MAAcC,eAAI,EAAA,CAAA;oBAACR,MAAMO,cAAc,IAAA,WAAA,GAAAE,IAAAA,eAAA,EAAAT,MAAAK,cAAA,EAAA,CAAA;oBAAAL,MAAAO,cAAA,IAAA,WAAA,GAAAE,IAAAA,eAAA,EAAAT,MAAAO,cAAA,EAAA,CAAA;iBAAA;;;;GAKxD,+CAAE"}
|