@fluentui-copilot/react-reference 0.15.4 → 0.15.5-hotfix.1

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.
Files changed (180) hide show
  1. package/CHANGELOG.json +31 -1
  2. package/CHANGELOG.md +19 -1
  3. package/lib/Citation.js +0 -1
  4. package/lib/Reference.js +0 -1
  5. package/lib/ReferenceGroupToggle.js +0 -1
  6. package/lib/ReferenceList.js +0 -1
  7. package/lib/ReferenceListV2.js +0 -1
  8. package/lib/ReferenceOverflowButton.js +0 -1
  9. package/lib/ReferenceV2.js +0 -1
  10. package/lib/components/Citation/Citation.js +5 -6
  11. package/lib/components/Citation/Citation.types.js +1 -2
  12. package/lib/components/Citation/index.js +0 -1
  13. package/lib/components/Citation/renderCitation.js +4 -6
  14. package/lib/components/Citation/useCitation.js +22 -28
  15. package/lib/components/Citation/useCitationStyles.styles.js +1 -1
  16. package/lib/components/Citation/useCitationStyles.styles.js.map +1 -1
  17. package/lib/components/Citation/useCitationStyles.styles.raw.js +69 -0
  18. package/lib/components/Citation/useCitationStyles.styles.raw.js.map +1 -0
  19. package/lib/components/Reference/Reference.js +5 -7
  20. package/lib/components/Reference/Reference.types.js +1 -2
  21. package/lib/components/Reference/index.js +0 -1
  22. package/lib/components/Reference/renderReference.js +27 -12
  23. package/lib/components/Reference/useReference.js +173 -172
  24. package/lib/components/Reference/useReferenceStyles.styles.raw.js +197 -0
  25. package/lib/components/Reference/useReferenceStyles.styles.raw.js.map +1 -0
  26. package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js +4 -6
  27. package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js +1 -2
  28. package/lib/components/ReferenceGroupToggle/index.js +0 -1
  29. package/lib/components/ReferenceGroupToggle/renderReferenceGroupToggle.js +9 -8
  30. package/lib/components/ReferenceGroupToggle/useReferenceGroupToggle.js +26 -30
  31. package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js +44 -0
  32. package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js.map +1 -0
  33. package/lib/components/ReferenceList/ReferenceList.js +5 -7
  34. package/lib/components/ReferenceList/ReferenceList.types.js +1 -2
  35. package/lib/components/ReferenceList/index.js +0 -1
  36. package/lib/components/ReferenceList/renderReferenceList.js +4 -6
  37. package/lib/components/ReferenceList/useReferenceList.js +15 -17
  38. package/lib/components/ReferenceList/useReferenceListStyles.styles.raw.js +27 -0
  39. package/lib/components/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -0
  40. package/lib/components/reference-v2/Reference/Reference.js +4 -5
  41. package/lib/components/reference-v2/Reference/Reference.types.js +1 -2
  42. package/lib/components/reference-v2/Reference/index.js +0 -1
  43. package/lib/components/reference-v2/Reference/renderReference.js +20 -17
  44. package/lib/components/reference-v2/Reference/useReference.js +53 -59
  45. package/lib/components/reference-v2/Reference/useReferenceStyles.styles.raw.js +110 -0
  46. package/lib/components/reference-v2/Reference/useReferenceStyles.styles.raw.js.map +1 -0
  47. package/lib/components/reference-v2/ReferenceList/ReferenceList.js +5 -6
  48. package/lib/components/reference-v2/ReferenceList/ReferenceList.types.js +1 -2
  49. package/lib/components/reference-v2/ReferenceList/index.js +0 -1
  50. package/lib/components/reference-v2/ReferenceList/renderReferenceList.js +17 -17
  51. package/lib/components/reference-v2/ReferenceList/useReferenceList.js +70 -80
  52. package/lib/components/reference-v2/ReferenceList/useReferenceListContextValues.js +13 -21
  53. package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js +47 -0
  54. package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -0
  55. package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js +4 -5
  56. package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js +1 -2
  57. package/lib/components/reference-v2/ReferenceOverflowButton/index.js +0 -1
  58. package/lib/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js +9 -14
  59. package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js +77 -77
  60. package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js +45 -0
  61. package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js.map +1 -0
  62. package/lib/components/reference-v2/index.js +0 -1
  63. package/lib/contexts/ReferenceGroupContext.js +5 -6
  64. package/lib/contexts/reference-v2/index.js +0 -1
  65. package/lib/contexts/reference-v2/referenceListContext.js +11 -12
  66. package/lib/index.js +0 -1
  67. package/lib/utilities/index.js +0 -1
  68. package/lib/utilities/reference-v2/generateReferenceCitationPreview.js +75 -86
  69. package/lib/utilities/reference-v2/index.js +0 -1
  70. package/lib/utilities/reference-v2/useReferenceCitationPreview.js +5 -5
  71. package/lib/utilities/useReferenceCitationPreview.js +123 -114
  72. package/lib/utilities/useReferenceGroup.js +28 -32
  73. package/lib/utilities/useReferenceGroup.js.map +1 -1
  74. package/lib/utilities/useReferenceGroup.styles.js +9 -0
  75. package/lib/utilities/useReferenceGroup.styles.js.map +1 -0
  76. package/lib/utilities/useReferenceGroup.styles.raw.js +6 -0
  77. package/lib/utilities/useReferenceGroup.styles.raw.js.map +1 -0
  78. package/lib-commonjs/Citation.js +0 -1
  79. package/lib-commonjs/Reference.js +0 -1
  80. package/lib-commonjs/ReferenceGroupToggle.js +0 -1
  81. package/lib-commonjs/ReferenceList.js +0 -1
  82. package/lib-commonjs/ReferenceListV2.js +0 -1
  83. package/lib-commonjs/ReferenceOverflowButton.js +0 -1
  84. package/lib-commonjs/ReferenceV2.js +0 -1
  85. package/lib-commonjs/components/Citation/Citation.js +1 -1
  86. package/lib-commonjs/components/Citation/Citation.js.map +1 -1
  87. package/lib-commonjs/components/Citation/Citation.types.js +0 -1
  88. package/lib-commonjs/components/Citation/index.js +0 -1
  89. package/lib-commonjs/components/Citation/renderCitation.js +1 -1
  90. package/lib-commonjs/components/Citation/renderCitation.js.map +1 -1
  91. package/lib-commonjs/components/Citation/useCitation.js +1 -1
  92. package/lib-commonjs/components/Citation/useCitation.js.map +1 -1
  93. package/lib-commonjs/components/Citation/useCitationStyles.styles.js +7 -7
  94. package/lib-commonjs/components/Citation/useCitationStyles.styles.js.map +1 -1
  95. package/lib-commonjs/components/Citation/useCitationStyles.styles.raw.js +85 -0
  96. package/lib-commonjs/components/Citation/useCitationStyles.styles.raw.js.map +1 -0
  97. package/lib-commonjs/components/Reference/Reference.js +1 -1
  98. package/lib-commonjs/components/Reference/Reference.js.map +1 -1
  99. package/lib-commonjs/components/Reference/Reference.types.js +0 -1
  100. package/lib-commonjs/components/Reference/index.js +0 -1
  101. package/lib-commonjs/components/Reference/renderReference.js +1 -1
  102. package/lib-commonjs/components/Reference/renderReference.js.map +1 -1
  103. package/lib-commonjs/components/Reference/useReference.js +1 -1
  104. package/lib-commonjs/components/Reference/useReference.js.map +1 -1
  105. package/lib-commonjs/components/Reference/useReferenceStyles.styles.raw.js +214 -0
  106. package/lib-commonjs/components/Reference/useReferenceStyles.styles.raw.js.map +1 -0
  107. package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js +1 -1
  108. package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
  109. package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js +0 -1
  110. package/lib-commonjs/components/ReferenceGroupToggle/index.js +0 -1
  111. package/lib-commonjs/components/ReferenceGroupToggle/renderReferenceGroupToggle.js +1 -1
  112. package/lib-commonjs/components/ReferenceGroupToggle/renderReferenceGroupToggle.js.map +1 -1
  113. package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js +1 -1
  114. package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js.map +1 -1
  115. package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js +60 -0
  116. package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js.map +1 -0
  117. package/lib-commonjs/components/ReferenceList/ReferenceList.js +1 -1
  118. package/lib-commonjs/components/ReferenceList/ReferenceList.js.map +1 -1
  119. package/lib-commonjs/components/ReferenceList/ReferenceList.types.js +0 -1
  120. package/lib-commonjs/components/ReferenceList/index.js +0 -1
  121. package/lib-commonjs/components/ReferenceList/renderReferenceList.js +1 -1
  122. package/lib-commonjs/components/ReferenceList/renderReferenceList.js.map +1 -1
  123. package/lib-commonjs/components/ReferenceList/useReferenceList.js +1 -1
  124. package/lib-commonjs/components/ReferenceList/useReferenceList.js.map +1 -1
  125. package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.raw.js +44 -0
  126. package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -0
  127. package/lib-commonjs/components/reference-v2/Reference/Reference.js +1 -1
  128. package/lib-commonjs/components/reference-v2/Reference/Reference.js.map +1 -1
  129. package/lib-commonjs/components/reference-v2/Reference/Reference.types.js +0 -1
  130. package/lib-commonjs/components/reference-v2/Reference/index.js +0 -1
  131. package/lib-commonjs/components/reference-v2/Reference/renderReference.js +1 -1
  132. package/lib-commonjs/components/reference-v2/Reference/renderReference.js.map +1 -1
  133. package/lib-commonjs/components/reference-v2/Reference/useReference.js +1 -1
  134. package/lib-commonjs/components/reference-v2/Reference/useReference.js.map +1 -1
  135. package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.raw.js +132 -0
  136. package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.raw.js.map +1 -0
  137. package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js +1 -1
  138. package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js.map +1 -1
  139. package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.types.js +0 -1
  140. package/lib-commonjs/components/reference-v2/ReferenceList/index.js +0 -1
  141. package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js +1 -1
  142. package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js.map +1 -1
  143. package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js +1 -1
  144. package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js.map +1 -1
  145. package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListContextValues.js +1 -1
  146. package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListContextValues.js.map +1 -1
  147. package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js +63 -0
  148. package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -0
  149. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js +1 -1
  150. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js.map +1 -1
  151. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js +0 -1
  152. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/index.js +0 -1
  153. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js +1 -1
  154. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js.map +1 -1
  155. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js +1 -1
  156. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js.map +1 -1
  157. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js +61 -0
  158. package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js.map +1 -0
  159. package/lib-commonjs/components/reference-v2/index.js +0 -1
  160. package/lib-commonjs/contexts/ReferenceGroupContext.js +1 -1
  161. package/lib-commonjs/contexts/ReferenceGroupContext.js.map +1 -1
  162. package/lib-commonjs/contexts/reference-v2/index.js +0 -1
  163. package/lib-commonjs/contexts/reference-v2/referenceListContext.js +1 -1
  164. package/lib-commonjs/contexts/reference-v2/referenceListContext.js.map +1 -1
  165. package/lib-commonjs/index.js +0 -1
  166. package/lib-commonjs/utilities/index.js +0 -1
  167. package/lib-commonjs/utilities/reference-v2/generateReferenceCitationPreview.js +1 -1
  168. package/lib-commonjs/utilities/reference-v2/generateReferenceCitationPreview.js.map +1 -1
  169. package/lib-commonjs/utilities/reference-v2/index.js +0 -1
  170. package/lib-commonjs/utilities/reference-v2/useReferenceCitationPreview.js +1 -1
  171. package/lib-commonjs/utilities/reference-v2/useReferenceCitationPreview.js.map +1 -1
  172. package/lib-commonjs/utilities/useReferenceCitationPreview.js +1 -1
  173. package/lib-commonjs/utilities/useReferenceCitationPreview.js.map +1 -1
  174. package/lib-commonjs/utilities/useReferenceGroup.js +3 -11
  175. package/lib-commonjs/utilities/useReferenceGroup.js.map +1 -1
  176. package/lib-commonjs/utilities/useReferenceGroup.styles.js +20 -0
  177. package/lib-commonjs/utilities/useReferenceGroup.styles.js.map +1 -0
  178. package/lib-commonjs/utilities/useReferenceGroup.styles.raw.js +16 -0
  179. package/lib-commonjs/utilities/useReferenceGroup.styles.raw.js.map +1 -0
  180. package/package.json +7 -11
package/CHANGELOG.json CHANGED
@@ -2,7 +2,37 @@
2
2
  "name": "@fluentui-copilot/react-reference",
3
3
  "entries": [
4
4
  {
5
- "date": "Mon, 19 May 2025 18:03:24 GMT",
5
+ "date": "Tue, 12 Aug 2025 16:09:22 GMT",
6
+ "tag": "@fluentui-copilot/react-reference_v0.15.5-hotfix.1",
7
+ "version": "0.15.5-hotfix.1",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "hochelmartin@gmail.com",
12
+ "package": "@fluentui-copilot/react-reference",
13
+ "commit": "3e4ebe676646c4c4346dbbab83511f963ffefd85",
14
+ "comment": "release: prepare hotfix 0.26.2-hotfix.1"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Wed, 28 May 2025 16:45:32 GMT",
21
+ "tag": "@fluentui-copilot/react-reference_v0.15.5",
22
+ "version": "0.15.5",
23
+ "comments": {
24
+ "patch": [
25
+ {
26
+ "author": "mgodbolt@microsoft.com",
27
+ "package": "@fluentui-copilot/react-reference",
28
+ "commit": "5f0ad3bf1731d25041cfd0b24d690201799162a5",
29
+ "comment": "Citation: Add padding to prevent numbers from touching the border"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Mon, 19 May 2025 18:04:28 GMT",
6
36
  "tag": "@fluentui-copilot/react-reference_v0.15.4",
7
37
  "version": "0.15.4",
8
38
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,9 +1,27 @@
1
1
  # Change Log - @fluentui-copilot/react-reference
2
2
 
3
- This log was last generated on Sat, 03 May 2025 01:27:44 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 12 Aug 2025 16:09:22 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.15.5-hotfix.1](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.15.5-hotfix.1)
8
+
9
+ Tue, 12 Aug 2025 16:09:22 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.15.5..@fluentui-copilot/react-reference_v0.15.5-hotfix.1)
11
+
12
+ ### Changes
13
+
14
+ - release: prepare hotfix 0.26.2-hotfix.1 ([PR #3284](https://github.com/microsoft/fluentai/pull/3284) by hochelmartin@gmail.com)
15
+
16
+ ## [0.15.5](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.15.5)
17
+
18
+ Wed, 28 May 2025 16:45:32 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.15.4..@fluentui-copilot/react-reference_v0.15.5)
20
+
21
+ ### Patches
22
+
23
+ - Citation: Add padding to prevent numbers from touching the border ([PR #3054](https://github.com/microsoft/fluentai/pull/3054) by mgodbolt@microsoft.com)
24
+
7
25
  ## [0.15.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.15.3)
8
26
 
9
27
  Sat, 03 May 2025 01:27:44 GMT
package/lib/Citation.js CHANGED
@@ -1,2 +1 @@
1
1
  export { Citation, citationClassNames, renderCitation_unstable, useCitationStyles_unstable, useCitation_unstable } from './components/Citation/index';
2
- //# sourceMappingURL=Citation.js.map
package/lib/Reference.js CHANGED
@@ -1,2 +1 @@
1
1
  export { Reference, referenceClassNames, referenceExtraClassNames, renderReference_unstable, useReferenceStyles_unstable, useReference_unstable } from './components/Reference/index';
2
- //# sourceMappingURL=Reference.js.map
@@ -1,2 +1 @@
1
1
  export { ReferenceGroupToggle, referenceGroupToggleClassNames, renderReferenceGroupToggle_unstable, useReferenceGroupToggleStyles_unstable, useReferenceGroupToggle_unstable } from './components/ReferenceGroupToggle/index';
2
- //# sourceMappingURL=ReferenceGroupToggle.js.map
@@ -1,2 +1 @@
1
1
  export { ReferenceList, referenceListClassNames, referenceListItemClassName, renderReferenceList_unstable, useReferenceListStyles_unstable, useReferenceList_unstable } from './components/ReferenceList/index';
2
- //# sourceMappingURL=ReferenceList.js.map
@@ -1,2 +1 @@
1
1
  export { ReferenceList, referenceListClassNames, renderReferenceList_unstable, useReferenceListStyles_unstable, useReferenceList_unstable } from './components/reference-v2/ReferenceList/index';
2
- //# sourceMappingURL=ReferenceListV2.js.map
@@ -1,2 +1 @@
1
1
  export { ReferenceOverflowButton, referenceOverflowButtonClassNames, renderReferenceOverflowButton_unstable, useReferenceOverflowButtonStyles_unstable, useReferenceOverflowButton_unstable } from './components/reference-v2/ReferenceOverflowButton/index';
2
- //# sourceMappingURL=ReferenceOverflowButton.js.map
@@ -1,2 +1 @@
1
1
  export { Reference, referenceClassNames, referenceExtraClassNames, renderReference_unstable, useReferenceStyles_unstable, useReference_unstable } from './components/reference-v2/Reference/index';
2
- //# sourceMappingURL=ReferenceV2.js.map
@@ -4,11 +4,10 @@ import { renderCitation_unstable } from './renderCitation';
4
4
  import { useCitationStyles_unstable } from './useCitationStyles.styles';
5
5
  import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
6
  // Citation component - TODO: add more docs
7
- export const Citation = /*#__PURE__*/React.forwardRef((props, ref) => {
8
- const state = useCitation_unstable(props, ref);
9
- useCitationStyles_unstable(state);
10
- useCustomStyleHook('useCitationStyles')(state);
11
- return renderCitation_unstable(state);
7
+ export const Citation = /*#__PURE__*/ React.forwardRef((props, ref)=>{
8
+ const state = useCitation_unstable(props, ref);
9
+ useCitationStyles_unstable(state);
10
+ useCustomStyleHook('useCitationStyles')(state);
11
+ return renderCitation_unstable(state);
12
12
  });
13
13
  Citation.displayName = 'Citation';
14
- //# sourceMappingURL=Citation.js.map
@@ -1,4 +1,3 @@
1
1
  /**
2
2
  * State used in rendering Citation
3
- */export {};
4
- //# sourceMappingURL=Citation.types.js.map
3
+ */ export { };
@@ -2,4 +2,3 @@ export { Citation } from './Citation';
2
2
  export { renderCitation_unstable } from './renderCitation';
3
3
  export { useCitation_unstable } from './useCitation';
4
4
  export { citationClassNames, useCitationStyles_unstable } from './useCitationStyles.styles';
5
- //# sourceMappingURL=index.js.map
@@ -1,10 +1,8 @@
1
- import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
1
+ import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-components';
3
3
  /**
4
4
  * Render the final JSX of Citation
5
- */
6
- export const renderCitation_unstable = state => {
7
- assertSlots(state);
8
- return /*#__PURE__*/_jsx(state.root, {});
5
+ */ export const renderCitation_unstable = (state)=>{
6
+ assertSlots(state);
7
+ return /*#__PURE__*/ _jsx(state.root, {});
9
8
  };
10
- //# sourceMappingURL=renderCitation.js.map
@@ -9,32 +9,26 @@ import { useDesignVersion } from '@fluentui-copilot/react-provider';
9
9
  *
10
10
  * @param props - props from this instance of Citation
11
11
  * @param ref - reference to root HTMLElement of Citation
12
- */
13
- export const useCitation_unstable = (props, ref) => {
14
- const {
15
- referenceHref,
16
- block = false,
17
- ...otherProps
18
- } = props;
19
- const designVersion = useDesignVersion(props.designVersion);
20
- const isPopoverLocked = usePreviewContext_unstable(ctx => ctx.isPreviewLocked) && props['aria-expanded'];
21
- const state = {
22
- block,
23
- designVersion,
24
- isPopoverLocked,
25
- components: {
26
- root: 'a'
27
- },
28
- root: slot.always(getIntrinsicElementProps('a', {
29
- ref,
30
- href: referenceHref,
31
- role: undefined,
32
- 'aria-expanded': undefined,
33
- ...otherProps
34
- }), {
35
- elementType: 'a'
36
- })
37
- };
38
- return state;
12
+ */ export const useCitation_unstable = (props, ref)=>{
13
+ const { referenceHref, block = false, ...otherProps } = props;
14
+ const designVersion = useDesignVersion(props.designVersion);
15
+ const isPopoverLocked = usePreviewContext_unstable((ctx)=>ctx.isPreviewLocked) && props['aria-expanded'];
16
+ const state = {
17
+ block,
18
+ designVersion,
19
+ isPopoverLocked,
20
+ components: {
21
+ root: 'a'
22
+ },
23
+ root: slot.always(getIntrinsicElementProps('a', {
24
+ ref,
25
+ href: referenceHref,
26
+ role: undefined,
27
+ 'aria-expanded': undefined,
28
+ ...otherProps
29
+ }), {
30
+ elementType: 'a'
31
+ })
32
+ };
33
+ return state;
39
34
  };
40
- //# sourceMappingURL=useCitation.js.map
@@ -3,7 +3,7 @@ import { tokens } from '@fluentui-copilot/tokens';
3
3
  export const citationClassNames = {
4
4
  root: 'fai-Citation'
5
5
  };
6
- const useCitationBaseClassName = __resetStyles("rm97deu", "r1tpe5pt", [".rm97deu{display:inline-flex;justify-content:center;box-sizing:border-box;align-items:center;cursor:pointer;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase100);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase100);background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorNeutralStroke2);color:var(--colorNeutralForeground2);min-width:14px;height:14px;vertical-align:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);border-radius:var(--borderRadiusMedium);text-decoration:none;margin-left:var(--spacingHorizontalXXS);margin-right:var(--spacingHorizontalXXS);}", ".rm97deu:hover{cursor:pointer;color:var(--colorBrandForeground2Hover);border-color:var(--colorBrandStroke2Hover);background-color:var(--colorBrandBackground2Hover);}", ".rm97deu:hover:active{cursor:pointer;color:var(--colorBrandForeground2Pressed);border-color:var(--colorBrandStroke2Pressed);background-color:var(--colorBrandBackground2Pressed);}", ".r1tpe5pt{display:inline-flex;justify-content:center;box-sizing:border-box;align-items:center;cursor:pointer;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase100);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase100);background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorNeutralStroke2);color:var(--colorNeutralForeground2);min-width:14px;height:14px;vertical-align:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);border-radius:var(--borderRadiusMedium);text-decoration:none;margin-right:var(--spacingHorizontalXXS);margin-left:var(--spacingHorizontalXXS);}", ".r1tpe5pt:hover{cursor:pointer;color:var(--colorBrandForeground2Hover);border-color:var(--colorBrandStroke2Hover);background-color:var(--colorBrandBackground2Hover);}", ".r1tpe5pt:hover:active{cursor:pointer;color:var(--colorBrandForeground2Pressed);border-color:var(--colorBrandStroke2Pressed);background-color:var(--colorBrandBackground2Pressed);}"]);
6
+ const useCitationBaseClassName = __resetStyles("rf7wmfm", "r9ecysy", [".rf7wmfm{display:inline-flex;justify-content:center;box-sizing:border-box;align-items:center;cursor:pointer;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase100);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase100);background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorNeutralStroke2);color:var(--colorNeutralForeground2);min-width:14px;height:14px;vertical-align:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);padding-inline:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);text-decoration:none;margin-left:var(--spacingHorizontalXXS);margin-right:var(--spacingHorizontalXXS);}", ".rf7wmfm:hover{cursor:pointer;color:var(--colorBrandForeground2Hover);border-color:var(--colorBrandStroke2Hover);background-color:var(--colorBrandBackground2Hover);}", ".rf7wmfm:hover:active{cursor:pointer;color:var(--colorBrandForeground2Pressed);border-color:var(--colorBrandStroke2Pressed);background-color:var(--colorBrandBackground2Pressed);}", ".r9ecysy{display:inline-flex;justify-content:center;box-sizing:border-box;align-items:center;cursor:pointer;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase100);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase100);background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorNeutralStroke2);color:var(--colorNeutralForeground2);min-width:14px;height:14px;vertical-align:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);padding-inline:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);text-decoration:none;margin-right:var(--spacingHorizontalXXS);margin-left:var(--spacingHorizontalXXS);}", ".r9ecysy:hover{cursor:pointer;color:var(--colorBrandForeground2Hover);border-color:var(--colorBrandStroke2Hover);background-color:var(--colorBrandBackground2Hover);}", ".r9ecysy:hover:active{cursor:pointer;color:var(--colorBrandForeground2Pressed);border-color:var(--colorBrandStroke2Pressed);background-color:var(--colorBrandBackground2Pressed);}"]);
7
7
  const useCitationRootStyles = __styles({
8
8
  isBlock: {
9
9
  mc9l5x: "f22iagw",
@@ -1 +1 @@
1
- {"version":3,"sources":["useCitationStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { CitationSlots, CitationState } from './Citation.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const citationClassNames: SlotClassNames<CitationSlots> = {\n root: 'fai-Citation',\n};\n\nconst useCitationBaseClassName = makeResetStyles({\n display: 'inline-flex',\n justifyContent: 'center',\n boxSizing: 'border-box',\n alignItems: 'center',\n cursor: 'pointer',\n ...typographyStyles.caption2Strong,\n\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n color: tokens.colorNeutralForeground2,\n\n minWidth: '14px',\n height: '14px',\n verticalAlign: `calc((${typographyStyles.caption2Strong.lineHeight} - ${typographyStyles.caption2Strong.fontSize}) / 2)`,\n\n borderRadius: tokens.borderRadiusMedium,\n\n textDecoration: 'none',\n\n marginLeft: tokens.spacingHorizontalXXS,\n marginRight: tokens.spacingHorizontalXXS,\n\n ':hover': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Hover,\n borderColor: tokens.colorBrandStroke2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n\n ':hover:active': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Pressed,\n borderColor: tokens.colorBrandStroke2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n});\n\nconst useCitationRootStyles = makeStyles({\n isBlock: {\n display: 'flex',\n marginLeft: 0,\n marginRight: 0,\n },\n isPopoverLocked: {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n ':hover': {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n },\n },\n});\n\nconst useNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\n/**\n * Apply styling to the Citation slots based on the state\n */\nexport const useCitationStyles_unstable = (state: CitationState): CitationState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const rootBaseClassName = useCitationBaseClassName();\n const rootStyles = useCitationRootStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n citationClassNames.root,\n state.isPopoverLocked && rootStyles.isPopoverLocked,\n state.block && rootStyles.isBlock,\n rootBaseClassName,\n designVersion === 'next' && nextStyles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","typographyStyles","tokens","citationClassNames","root","useCitationBaseClassName","display","justifyContent","boxSizing","alignItems","cursor","caption2Strong","backgroundColor","colorNeutralBackground3","border","strokeWidthThin","colorNeutralStroke2","color","colorNeutralForeground2","minWidth","height","verticalAlign","lineHeight","fontSize","borderRadius","borderRadiusMedium","textDecoration","marginLeft","spacingHorizontalXXS","marginRight","colorBrandForeground2Hover","borderColor","colorBrandStroke2Hover","colorBrandBackground2Hover","colorBrandForeground2Pressed","colorBrandStroke2Pressed","colorBrandBackground2Pressed","useCitationRootStyles","isBlock","isPopoverLocked","colorBrandBackground2","useNextStyles","borderRadiusXLarge","useCitationStyles_unstable","state","designVersion","rootBaseClassName","rootStyles","nextStyles","className","block"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,6BAA6B;AACrH,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,MAAMC,2BAA2BR,gBAAgB;IAC/CS,SAAS;IACTC,gBAAgB;IAChBC,WAAW;IACXC,YAAY;IACZC,QAAQ;IACR,GAAGT,iBAAiBU,cAAc;IAElCC,iBAAiBV,OAAOW,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEZ,OAAOa,eAAe,CAAC,OAAO,EAAEb,OAAOc,mBAAmB,CAAC,CAAC;IACvEC,OAAOf,OAAOgB,uBAAuB;IAErCC,UAAU;IACVC,QAAQ;IACRC,eAAe,CAAC,MAAM,EAAEpB,iBAAiBU,cAAc,CAACW,UAAU,CAAC,GAAG,EAAErB,iBAAiBU,cAAc,CAACY,QAAQ,CAAC,MAAM,CAAC;IAExHC,cAActB,OAAOuB,kBAAkB;IAEvCC,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,EAAE"}
1
+ {"version":3,"sources":["useCitationStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { CitationSlots, CitationState } from './Citation.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const citationClassNames: SlotClassNames<CitationSlots> = {\n root: 'fai-Citation',\n};\n\nconst useCitationBaseClassName = makeResetStyles({\n display: 'inline-flex',\n justifyContent: 'center',\n boxSizing: 'border-box',\n alignItems: 'center',\n cursor: 'pointer',\n ...typographyStyles.caption2Strong,\n\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n color: tokens.colorNeutralForeground2,\n\n minWidth: '14px',\n height: '14px',\n verticalAlign: `calc((${typographyStyles.caption2Strong.lineHeight} - ${typographyStyles.caption2Strong.fontSize}) / 2)`,\n paddingInline: tokens.spacingHorizontalXXS,\n\n borderRadius: tokens.borderRadiusMedium,\n\n textDecoration: 'none',\n\n marginLeft: tokens.spacingHorizontalXXS,\n marginRight: tokens.spacingHorizontalXXS,\n\n ':hover': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Hover,\n borderColor: tokens.colorBrandStroke2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n\n ':hover:active': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Pressed,\n borderColor: tokens.colorBrandStroke2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n});\n\nconst useCitationRootStyles = makeStyles({\n isBlock: {\n display: 'flex',\n marginLeft: 0,\n marginRight: 0,\n },\n isPopoverLocked: {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n ':hover': {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n },\n },\n});\n\nconst useNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\n/**\n * Apply styling to the Citation slots based on the state\n */\nexport const useCitationStyles_unstable = (state: CitationState): CitationState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const rootBaseClassName = useCitationBaseClassName();\n const rootStyles = useCitationRootStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n citationClassNames.root,\n state.isPopoverLocked && rootStyles.isPopoverLocked,\n state.block && rootStyles.isBlock,\n rootBaseClassName,\n designVersion === 'next' && nextStyles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","typographyStyles","tokens","citationClassNames","root","useCitationBaseClassName","display","justifyContent","boxSizing","alignItems","cursor","caption2Strong","backgroundColor","colorNeutralBackground3","border","strokeWidthThin","colorNeutralStroke2","color","colorNeutralForeground2","minWidth","height","verticalAlign","lineHeight","fontSize","paddingInline","spacingHorizontalXXS","borderRadius","borderRadiusMedium","textDecoration","marginLeft","marginRight","colorBrandForeground2Hover","borderColor","colorBrandStroke2Hover","colorBrandBackground2Hover","colorBrandForeground2Pressed","colorBrandStroke2Pressed","colorBrandBackground2Pressed","useCitationRootStyles","isBlock","isPopoverLocked","colorBrandBackground2","useNextStyles","borderRadiusXLarge","useCitationStyles_unstable","state","designVersion","rootBaseClassName","rootStyles","nextStyles","className","block"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,6BAA6B;AACrH,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,MAAMC,2BAA2BR,gBAAgB;IAC/CS,SAAS;IACTC,gBAAgB;IA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AcxB,OAAOyC,kBAAkB;IAAC;AAAE;AAErF;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC;IAEA,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAE1B,MAAME,oBAAoB1C;IAC1B,MAAM2C,aAAaV;IACnB,MAAMW,aAAaP;IAEnBG,MAAMzC,IAAI,CAAC8C,SAAS,GAAGnD,aACrBI,mBAAmBC,IAAI,EACvByC,MAAML,eAAe,IAAIQ,WAAWR,eAAe,EACnDK,MAAMM,KAAK,IAAIH,WAAWT,OAAO,EACjCQ,mBACAD,kBAAkB,UAAUG,WAAW7C,IAAI,EAC3CyC,MAAMzC,IAAI,CAAC8C,SAAS;IAGtB,OAAOL;AACT,EAAE"}
@@ -0,0 +1,69 @@
1
+ import { makeResetStyles, makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';
2
+ import { tokens } from '@fluentui-copilot/tokens';
3
+ export const citationClassNames = {
4
+ root: 'fai-Citation'
5
+ };
6
+ const useCitationBaseClassName = makeResetStyles({
7
+ display: 'inline-flex',
8
+ justifyContent: 'center',
9
+ boxSizing: 'border-box',
10
+ alignItems: 'center',
11
+ cursor: 'pointer',
12
+ ...typographyStyles.caption2Strong,
13
+ backgroundColor: tokens.colorNeutralBackground3,
14
+ border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,
15
+ color: tokens.colorNeutralForeground2,
16
+ minWidth: '14px',
17
+ height: '14px',
18
+ verticalAlign: `calc((${typographyStyles.caption2Strong.lineHeight} - ${typographyStyles.caption2Strong.fontSize}) / 2)`,
19
+ paddingInline: tokens.spacingHorizontalXXS,
20
+ borderRadius: tokens.borderRadiusMedium,
21
+ textDecoration: 'none',
22
+ marginLeft: tokens.spacingHorizontalXXS,
23
+ marginRight: tokens.spacingHorizontalXXS,
24
+ ':hover': {
25
+ cursor: 'pointer',
26
+ color: tokens.colorBrandForeground2Hover,
27
+ borderColor: tokens.colorBrandStroke2Hover,
28
+ backgroundColor: tokens.colorBrandBackground2Hover
29
+ },
30
+ ':hover:active': {
31
+ cursor: 'pointer',
32
+ color: tokens.colorBrandForeground2Pressed,
33
+ borderColor: tokens.colorBrandStroke2Pressed,
34
+ backgroundColor: tokens.colorBrandBackground2Pressed
35
+ }
36
+ });
37
+ const useCitationRootStyles = makeStyles({
38
+ isBlock: {
39
+ display: 'flex',
40
+ marginLeft: 0,
41
+ marginRight: 0
42
+ },
43
+ isPopoverLocked: {
44
+ color: tokens.colorBrandForeground2Pressed,
45
+ ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),
46
+ backgroundColor: tokens.colorBrandBackground2,
47
+ ':hover': {
48
+ color: tokens.colorBrandForeground2Pressed,
49
+ ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),
50
+ backgroundColor: tokens.colorBrandBackground2
51
+ }
52
+ }
53
+ });
54
+ const useNextStyles = makeStyles({
55
+ root: {
56
+ borderRadius: tokens.borderRadiusXLarge
57
+ }
58
+ });
59
+ /**
60
+ * Apply styling to the Citation slots based on the state
61
+ */ export const useCitationStyles_unstable = (state)=>{
62
+ 'use no memo';
63
+ const { designVersion } = state;
64
+ const rootBaseClassName = useCitationBaseClassName();
65
+ const rootStyles = useCitationRootStyles();
66
+ const nextStyles = useNextStyles();
67
+ state.root.className = mergeClasses(citationClassNames.root, state.isPopoverLocked && rootStyles.isPopoverLocked, state.block && rootStyles.isBlock, rootBaseClassName, designVersion === 'next' && nextStyles.root, state.root.className);
68
+ return state;
69
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useCitationStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { CitationSlots, CitationState } from './Citation.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const citationClassNames: SlotClassNames<CitationSlots> = {\n root: 'fai-Citation',\n};\n\nconst useCitationBaseClassName = makeResetStyles({\n display: 'inline-flex',\n justifyContent: 'center',\n boxSizing: 'border-box',\n alignItems: 'center',\n cursor: 'pointer',\n ...typographyStyles.caption2Strong,\n\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n color: tokens.colorNeutralForeground2,\n\n minWidth: '14px',\n height: '14px',\n verticalAlign: `calc((${typographyStyles.caption2Strong.lineHeight} - ${typographyStyles.caption2Strong.fontSize}) / 2)`,\n paddingInline: tokens.spacingHorizontalXXS,\n\n borderRadius: tokens.borderRadiusMedium,\n\n textDecoration: 'none',\n\n marginLeft: tokens.spacingHorizontalXXS,\n marginRight: tokens.spacingHorizontalXXS,\n\n ':hover': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Hover,\n borderColor: tokens.colorBrandStroke2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n\n ':hover:active': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Pressed,\n borderColor: tokens.colorBrandStroke2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n});\n\nconst useCitationRootStyles = makeStyles({\n isBlock: {\n display: 'flex',\n marginLeft: 0,\n marginRight: 0,\n },\n isPopoverLocked: {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n ':hover': {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n },\n },\n});\n\nconst useNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\n/**\n * Apply styling to the Citation slots based on the state\n */\nexport const useCitationStyles_unstable = (state: CitationState): CitationState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const rootBaseClassName = useCitationBaseClassName();\n const rootStyles = useCitationRootStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n citationClassNames.root,\n state.isPopoverLocked && rootStyles.isPopoverLocked,\n state.block && rootStyles.isBlock,\n rootBaseClassName,\n designVersion === 'next' && nextStyles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","shorthands","typographyStyles","tokens","citationClassNames","root","useCitationBaseClassName","display","justifyContent","boxSizing","alignItems","cursor","caption2Strong","backgroundColor","colorNeutralBackground3","border","strokeWidthThin","colorNeutralStroke2","color","colorNeutralForeground2","minWidth","height","verticalAlign","lineHeight","fontSize","paddingInline","spacingHorizontalXXS","borderRadius","borderRadiusMedium","textDecoration","marginLeft","marginRight","colorBrandForeground2Hover","borderColor","colorBrandStroke2Hover","colorBrandBackground2Hover","colorBrandForeground2Pressed","colorBrandStroke2Pressed","colorBrandBackground2Pressed","useCitationRootStyles","isBlock","isPopoverLocked","colorBrandBackground2","useNextStyles","borderRadiusXLarge","useCitationStyles_unstable","state","designVersion","rootBaseClassName","rootStyles","nextStyles","className","block"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,6BAA6B;AACrH,SAASC,MAAM,QAAQ,2BAA2B;AAIlD,OAAO,MAAMC,qBAAoD;IAC/DC,MAAM;AACR,EAAE;AAEF,MAAMC,2BAA2BR,gBAAgB;IAC/CS,SAAS;IACTC,gBAAgB;IAChBC,WAAW;IACXC,YAAY;IACZC,QAAQ;IACR,GAAGT,iBAAiBU,cAAc;IAElCC,iBAAiBV,OAAOW,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEZ,OAAOa,eAAe,CAAC,OAAO,EAAEb,OAAOc,mBAAmB,CAAC,CAAC;IACvEC,OAAOf,OAAOgB,uBAAuB;IAErCC,UAAU;IACVC,QAAQ;IACRC,eAAe,CAAC,MAAM,EAAEpB,iBAAiBU,cAAc,CAACW,UAAU,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nDK,MAAMM,KAAK,IAAIH,WAAWT,OAAO,EACjCQ,mBACAD,kBAAkB,UAAUG,WAAW7C,IAAI,EAC3CyC,MAAMzC,IAAI,CAAC8C,SAAS;IAGtB,OAAOL;AACT,EAAE"}
@@ -3,12 +3,10 @@ import { useReference_unstable } from './useReference';
3
3
  import { renderReference_unstable } from './renderReference';
4
4
  import { useReferenceStyles_unstable } from './useReferenceStyles.styles';
5
5
  import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
6
- /** deprecated Use ReferenceV2 component, hooks and types instead. */
7
- export const Reference = /*#__PURE__*/React.forwardRef((props, ref) => {
8
- const state = useReference_unstable(props, ref);
9
- useReferenceStyles_unstable(state);
10
- useCustomStyleHook('useReferenceStyles')(state);
11
- return renderReference_unstable(state);
6
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */ export const Reference = /*#__PURE__*/ React.forwardRef((props, ref)=>{
7
+ const state = useReference_unstable(props, ref);
8
+ useReferenceStyles_unstable(state);
9
+ useCustomStyleHook('useReferenceStyles')(state);
10
+ return renderReference_unstable(state);
12
11
  });
13
12
  Reference.displayName = 'Reference';
14
- //# sourceMappingURL=Reference.js.map
@@ -1,2 +1 @@
1
- /** deprecated Use ReferenceV2 component, hooks and types instead. */export {};
2
- //# sourceMappingURL=Reference.types.js.map
1
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */ export { };
@@ -2,4 +2,3 @@ export { Reference } from './Reference';
2
2
  export { renderReference_unstable } from './renderReference';
3
3
  export { useReference_unstable } from './useReference';
4
4
  export { referenceClassNames, referenceExtraClassNames, useReferenceStyles_unstable } from './useReferenceStyles.styles';
5
- //# sourceMappingURL=index.js.map
@@ -1,14 +1,29 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
2
2
  import { assertSlots } from '@fluentui/react-components';
3
- /** deprecated Use ReferenceV2 component, hooks and types instead. */
4
- export const renderReference_unstable = state => {
5
- assertSlots(state);
6
- return /*#__PURE__*/_jsxs(state.root, {
7
- children: [state.citation && /*#__PURE__*/_jsx(state.citation, {}), state.media && /*#__PURE__*/_jsx(state.media, {}), /*#__PURE__*/_jsx(state.label, {}), state.actions && /*#__PURE__*/_jsxs(state.actions, {
8
- children: [state.actions.children, state.detailsButton && /*#__PURE__*/_jsx(state.detailsButton, {})]
9
- }), state.sensitivity && /*#__PURE__*/_jsx(state.sensitivity, {}), /*#__PURE__*/_jsxs(state.metadata, {
10
- children: [state.primaryText && /*#__PURE__*/_jsx(state.primaryText, {}), state.secondaryText && /*#__PURE__*/_jsx(state.secondaryText, {}), state.tertiaryText && /*#__PURE__*/_jsx(state.tertiaryText, {}), state.icon && /*#__PURE__*/_jsx(state.icon, {}), state.metadata.children]
11
- }), /*#__PURE__*/_jsx(state.content, {})]
12
- });
3
+ /** deprecated Use ReferenceV2 component, hooks and types instead. */ export const renderReference_unstable = (state)=>{
4
+ assertSlots(state);
5
+ return /*#__PURE__*/ _jsxs(state.root, {
6
+ children: [
7
+ state.citation && /*#__PURE__*/ _jsx(state.citation, {}),
8
+ state.media && /*#__PURE__*/ _jsx(state.media, {}),
9
+ /*#__PURE__*/ _jsx(state.label, {}),
10
+ state.actions && /*#__PURE__*/ _jsxs(state.actions, {
11
+ children: [
12
+ state.actions.children,
13
+ state.detailsButton && /*#__PURE__*/ _jsx(state.detailsButton, {})
14
+ ]
15
+ }),
16
+ state.sensitivity && /*#__PURE__*/ _jsx(state.sensitivity, {}),
17
+ /*#__PURE__*/ _jsxs(state.metadata, {
18
+ children: [
19
+ state.primaryText && /*#__PURE__*/ _jsx(state.primaryText, {}),
20
+ state.secondaryText && /*#__PURE__*/ _jsx(state.secondaryText, {}),
21
+ state.tertiaryText && /*#__PURE__*/ _jsx(state.tertiaryText, {}),
22
+ state.icon && /*#__PURE__*/ _jsx(state.icon, {}),
23
+ state.metadata.children
24
+ ]
25
+ }),
26
+ /*#__PURE__*/ _jsx(state.content, {})
27
+ ]
28
+ });
13
29
  };
14
- //# sourceMappingURL=renderReference.js.map