@fluentui-copilot/react-reference 0.11.4 → 0.12.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 +32 -1
- package/CHANGELOG.md +15 -2
- package/dist/index.d.ts +36 -29
- package/lib/components/Reference/Reference.js +1 -1
- package/lib/components/Reference/Reference.js.map +1 -1
- package/lib/components/Reference/Reference.types.js +1 -3
- package/lib/components/Reference/Reference.types.js.map +1 -1
- package/lib/components/Reference/renderReference.js +1 -3
- package/lib/components/Reference/renderReference.js.map +1 -1
- package/lib/components/Reference/useReference.js +2 -0
- package/lib/components/Reference/useReference.js.map +1 -1
- package/lib/components/Reference/useReferenceStyles.styles.js +4 -0
- package/lib/components/Reference/useReferenceStyles.styles.js.map +1 -1
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js +1 -1
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
- package/lib/components/ReferenceList/ReferenceList.js +1 -1
- package/lib/components/ReferenceList/ReferenceList.js.map +1 -1
- package/lib/components/ReferenceList/ReferenceList.types.js +1 -3
- package/lib/components/ReferenceList/ReferenceList.types.js.map +1 -1
- package/lib/components/ReferenceList/renderReferenceList.js +1 -3
- package/lib/components/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib/components/ReferenceList/useReferenceList.js +2 -1
- package/lib/components/ReferenceList/useReferenceList.js.map +1 -1
- package/lib/components/ReferenceList/useReferenceListStyles.styles.js +4 -0
- package/lib/components/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.js +1 -1
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js +1 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js +1 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Reference/Reference.js.map +1 -1
- package/lib-commonjs/components/Reference/Reference.types.js +1 -3
- package/lib-commonjs/components/Reference/Reference.types.js.map +1 -1
- package/lib-commonjs/components/Reference/renderReference.js.map +1 -1
- package/lib-commonjs/components/Reference/useReference.js.map +1 -1
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.types.js +1 -3
- package/lib-commonjs/components/ReferenceList/ReferenceList.types.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.js +6 -6
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js +2 -2
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js +4 -4
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.js.map +1 -1
- package/lib-commonjs/index.js +6 -6
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,38 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-reference",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Thu,
|
|
5
|
+
"date": "Thu, 20 Jun 2024 23:05:26 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-reference_v0.12.0",
|
|
7
|
+
"version": "0.12.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "tristan.watanabe@gmail.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-reference",
|
|
13
|
+
"commit": "b8a46e43b66fa17ed3cbb98a57171f9805ca5801",
|
|
14
|
+
"comment": "fix: failing e2e tests after playwright/test dependency update to v1.44.0."
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"minor": [
|
|
18
|
+
{
|
|
19
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
20
|
+
"package": "@fluentui-copilot/react-reference",
|
|
21
|
+
"commit": "fc6c01300d29e17aa4bd56305a0f4fd2d9f7b94c",
|
|
22
|
+
"comment": "chore: Deprecating Reference v1 pattern, and consolidating Citation, Reference v1 and Reference v2 docs."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"patch": [
|
|
26
|
+
{
|
|
27
|
+
"author": "humbertomakotomorimoto@gmail.com",
|
|
28
|
+
"package": "@fluentui-copilot/react-reference",
|
|
29
|
+
"commit": "8556966a4bc720f393d1c00b6befb857cc757877",
|
|
30
|
+
"comment": "fix: Making some fit-and-finish styling changes to better match design specs."
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"date": "Thu, 13 Jun 2024 21:00:45 GMT",
|
|
6
37
|
"tag": "@fluentui-copilot/react-reference_v0.11.4",
|
|
7
38
|
"version": "0.11.4",
|
|
8
39
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,25 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-reference
|
|
2
2
|
|
|
3
|
-
This log was last generated on Thu,
|
|
3
|
+
This log was last generated on Thu, 20 Jun 2024 23:05:26 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.12.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.12.0)
|
|
8
|
+
|
|
9
|
+
Thu, 20 Jun 2024 23:05:26 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.11.4..@fluentui-copilot/react-reference_v0.12.0)
|
|
11
|
+
|
|
12
|
+
### Minor changes
|
|
13
|
+
|
|
14
|
+
- chore: Deprecating Reference v1 pattern, and consolidating Citation, Reference v1 and Reference v2 docs. ([PR #1731](https://github.com/microsoft/fluentai/pull/1731) by Humberto.Morimoto@microsoft.com)
|
|
15
|
+
|
|
16
|
+
### Patches
|
|
17
|
+
|
|
18
|
+
- fix: Making some fit-and-finish styling changes to better match design specs. ([PR #1748](https://github.com/microsoft/fluentai/pull/1748) by humbertomakotomorimoto@gmail.com)
|
|
19
|
+
|
|
7
20
|
## [0.11.4](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.11.4)
|
|
8
21
|
|
|
9
|
-
Thu, 13 Jun 2024 21:00:
|
|
22
|
+
Thu, 13 Jun 2024 21:00:45 GMT
|
|
10
23
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.11.3..@fluentui-copilot/react-reference_v0.11.4)
|
|
11
24
|
|
|
12
25
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -141,7 +141,7 @@ declare type PreviewMetadataSlots = {
|
|
|
141
141
|
/**
|
|
142
142
|
* Preview Props
|
|
143
143
|
*/
|
|
144
|
-
declare type PreviewProps = PopoverProps
|
|
144
|
+
declare type PreviewProps = Omit<PopoverProps, 'mouseLeaveDelay' | 'openOnHover'>;
|
|
145
145
|
|
|
146
146
|
declare const PreviewSurface: ForwardRefComponent<PreviewSurfaceProps>;
|
|
147
147
|
|
|
@@ -152,6 +152,7 @@ declare type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & Popover
|
|
|
152
152
|
|
|
153
153
|
declare type PreviewSurfaceSlots = PopoverSurfaceSlots & {};
|
|
154
154
|
|
|
155
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
155
156
|
export declare const Reference: ForwardRefComponent<ReferenceProps>;
|
|
156
157
|
|
|
157
158
|
/**
|
|
@@ -170,8 +171,10 @@ export declare type ReferenceCitationData = {
|
|
|
170
171
|
sensitivityLabelProps?: SensitivityLabelProps;
|
|
171
172
|
};
|
|
172
173
|
|
|
174
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
173
175
|
export declare const referenceClassNames: SlotClassNames<ReferenceSlots>;
|
|
174
176
|
|
|
177
|
+
/** deprecated The ReferenceGroup pattern is deprecated and will be removed in a future release. */
|
|
175
178
|
export declare const ReferenceGroupToggle: ForwardRefComponent<ReferenceGroupToggleProps>;
|
|
176
179
|
|
|
177
180
|
export declare const referenceGroupToggleClassNames: SlotClassNames<ReferenceGroupToggleSlots>;
|
|
@@ -193,8 +196,10 @@ export declare type ReferenceGroupToggleSlots = {
|
|
|
193
196
|
*/
|
|
194
197
|
export declare type ReferenceGroupToggleState = ComponentState<ReferenceGroupToggleSlots> & Required<Pick<ReferenceGroupToggleProps, 'isOpen' | 'mode'>>;
|
|
195
198
|
|
|
199
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
196
200
|
export declare const ReferenceList: ForwardRefComponent<ReferenceListProps>;
|
|
197
201
|
|
|
202
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
198
203
|
export declare const referenceListClassNames: SlotClassNames<ReferenceListSlots>;
|
|
199
204
|
|
|
200
205
|
export declare const ReferenceListContext: Context<ReferenceListContextValue>;
|
|
@@ -206,11 +211,10 @@ export declare const ReferenceListContextProvider: Provider<ReferenceListContext
|
|
|
206
211
|
*/
|
|
207
212
|
export declare type ReferenceListContextValue = Pick<ReferenceListV2State, 'areReferencesExpanded' | 'maxVisibleReferences' | 'overflowButtonTriggeredViaKeyboard' | 'referenceListRef' | 'shouldUseOverflow' | 'totalReferencesCount'>;
|
|
208
213
|
|
|
209
|
-
/**
|
|
210
|
-
* ReferenceList Props
|
|
211
|
-
*/
|
|
214
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
212
215
|
export declare type ReferenceListProps = ComponentProps<ReferenceListSlots>;
|
|
213
216
|
|
|
217
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
214
218
|
export declare type ReferenceListSlots = {
|
|
215
219
|
/**
|
|
216
220
|
* The root slot.
|
|
@@ -218,9 +222,7 @@ export declare type ReferenceListSlots = {
|
|
|
218
222
|
root: Slot<'ol'>;
|
|
219
223
|
};
|
|
220
224
|
|
|
221
|
-
/**
|
|
222
|
-
* State used in rendering ReferenceList
|
|
223
|
-
*/
|
|
225
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
224
226
|
export declare type ReferenceListState = ComponentState<ReferenceListSlots>;
|
|
225
227
|
|
|
226
228
|
export declare const ReferenceListV2: ForwardRefComponent<ReferenceListV2Props>;
|
|
@@ -286,9 +288,7 @@ export declare type ReferenceOverflowButtonState = ComponentState<ReferenceOverf
|
|
|
286
288
|
shouldRenderOverflowButton: boolean;
|
|
287
289
|
};
|
|
288
290
|
|
|
289
|
-
/**
|
|
290
|
-
* Reference Props
|
|
291
|
-
*/
|
|
291
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
292
292
|
export declare type ReferenceProps = ComponentProps<Partial<ReferenceSlots>> & CopilotMode & {
|
|
293
293
|
/**
|
|
294
294
|
* Numeric index associated with `Citation`.
|
|
@@ -312,6 +312,7 @@ export declare type ReferenceProps = ComponentProps<Partial<ReferenceSlots>> & C
|
|
|
312
312
|
layout?: 'inline' | 'popover';
|
|
313
313
|
};
|
|
314
314
|
|
|
315
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
315
316
|
export declare type ReferenceSlots = {
|
|
316
317
|
/**
|
|
317
318
|
* The root slot.
|
|
@@ -367,9 +368,7 @@ export declare type ReferenceSlots = {
|
|
|
367
368
|
detailsButton: Slot<typeof Button>;
|
|
368
369
|
};
|
|
369
370
|
|
|
370
|
-
/**
|
|
371
|
-
* State used in rendering Reference
|
|
372
|
-
*/
|
|
371
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
373
372
|
export declare type ReferenceState = ComponentState<ReferenceSlots> & Required<Pick<ReferenceProps, 'mode' | 'layout' | 'index'>> & {
|
|
374
373
|
/**
|
|
375
374
|
* State used to renderer the `Reference` in an expanded state.
|
|
@@ -407,9 +406,7 @@ export declare type ReferenceV2State = ComponentState<ReferenceV2Slots> & Requir
|
|
|
407
406
|
*/
|
|
408
407
|
export declare const renderCitation_unstable: (state: CitationState) => JSX.Element;
|
|
409
408
|
|
|
410
|
-
/**
|
|
411
|
-
* Render the final JSX of Reference
|
|
412
|
-
*/
|
|
409
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
413
410
|
export declare const renderReference_unstable: (state: ReferenceState) => JSX.Element;
|
|
414
411
|
|
|
415
412
|
/**
|
|
@@ -417,9 +414,7 @@ export declare const renderReference_unstable: (state: ReferenceState) => JSX.El
|
|
|
417
414
|
*/
|
|
418
415
|
export declare const renderReferenceGroupToggle_unstable: (state: ReferenceGroupToggleState) => JSX.Element;
|
|
419
416
|
|
|
420
|
-
/**
|
|
421
|
-
* Render the final JSX of ReferenceList
|
|
422
|
-
*/
|
|
417
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
423
418
|
export declare const renderReferenceList_unstable: (state: ReferenceListState) => JSX.Element;
|
|
424
419
|
|
|
425
420
|
/**
|
|
@@ -454,6 +449,10 @@ declare const SensitivityTooltip: ForwardRefComponent<SensitivityTooltipProps>;
|
|
|
454
449
|
*/
|
|
455
450
|
declare type SensitivityTooltipProps = ComponentProps<SensitivityTooltipSlots> & {
|
|
456
451
|
positioning?: PositioningShorthand;
|
|
452
|
+
/**
|
|
453
|
+
* Prop to display a backplate behind the tooltip
|
|
454
|
+
*/
|
|
455
|
+
withBackplate?: boolean;
|
|
457
456
|
};
|
|
458
457
|
|
|
459
458
|
declare type SensitivityTooltipSlots = {
|
|
@@ -488,6 +487,8 @@ export declare const useCitationStyles_unstable: (state: CitationState) => Citat
|
|
|
488
487
|
*
|
|
489
488
|
* @param props - props from this instance of Reference
|
|
490
489
|
* @param ref - reference to root HTMLElement of Reference
|
|
490
|
+
*
|
|
491
|
+
* deprecated Use ReferenceV2 component, hooks and types instead.
|
|
491
492
|
*/
|
|
492
493
|
export declare const useReference_unstable: (props: ReferenceProps, ref: React_2.Ref<HTMLDivElement>) => ReferenceState;
|
|
493
494
|
|
|
@@ -567,6 +568,8 @@ export declare const useReferenceGroupToggleStyles_unstable: (state: ReferenceGr
|
|
|
567
568
|
*
|
|
568
569
|
* @param props - props from this instance of ReferenceList
|
|
569
570
|
* @param ref - reference to root HTMLElement of ReferenceList
|
|
571
|
+
*
|
|
572
|
+
* deprecated Use ReferenceListV2 component, hooks and types instead.
|
|
570
573
|
*/
|
|
571
574
|
export declare const useReferenceList_unstable: (props: ReferenceListProps, ref: React_2.Ref<HTMLOListElement>) => ReferenceListState;
|
|
572
575
|
|
|
@@ -574,14 +577,11 @@ export declare const useReferenceListContext_unstable: <T>(selector: ContextSele
|
|
|
574
577
|
|
|
575
578
|
/**
|
|
576
579
|
* Apply styling to the ReferenceList slots based on the state
|
|
580
|
+
*
|
|
581
|
+
* deprecated Use ReferenceListV2 component, hooks and types instead.
|
|
577
582
|
*/
|
|
578
583
|
export declare const useReferenceListStyles_unstable: (state: ReferenceListState) => ReferenceListState;
|
|
579
584
|
|
|
580
|
-
/**
|
|
581
|
-
* Apply styling to the ReferenceList slots based on the state
|
|
582
|
-
*/
|
|
583
|
-
export declare const useReferenceListStylesV2_unstable: (state: ReferenceListV2State) => ReferenceListV2State;
|
|
584
|
-
|
|
585
585
|
/**
|
|
586
586
|
* Create the state required to render ReferenceList.
|
|
587
587
|
*
|
|
@@ -593,6 +593,11 @@ export declare const useReferenceListStylesV2_unstable: (state: ReferenceListV2S
|
|
|
593
593
|
*/
|
|
594
594
|
export declare const useReferenceListV2_unstable: (props: ReferenceListV2Props, ref: React_2.Ref<HTMLDivElement>) => ReferenceListV2State;
|
|
595
595
|
|
|
596
|
+
/**
|
|
597
|
+
* Apply styling to the ReferenceList slots based on the state
|
|
598
|
+
*/
|
|
599
|
+
export declare const useReferenceListV2Styles_unstable: (state: ReferenceListV2State) => ReferenceListV2State;
|
|
600
|
+
|
|
596
601
|
/**
|
|
597
602
|
* Create the state required to render ReferenceOverflowButton.
|
|
598
603
|
*
|
|
@@ -611,14 +616,11 @@ export declare const useReferenceOverflowButtonStyles_unstable: (state: Referenc
|
|
|
611
616
|
|
|
612
617
|
/**
|
|
613
618
|
* Apply styling to the Reference slots based on the state
|
|
619
|
+
*
|
|
620
|
+
* deprecated Use ReferenceV2 component, hooks and types instead.
|
|
614
621
|
*/
|
|
615
622
|
export declare const useReferenceStyles_unstable: (state: ReferenceState) => ReferenceState;
|
|
616
623
|
|
|
617
|
-
/**
|
|
618
|
-
* Apply styling to the Reference slots based on the state
|
|
619
|
-
*/
|
|
620
|
-
export declare const useReferenceStylesV2_unstable: (state: ReferenceV2State) => ReferenceV2State;
|
|
621
|
-
|
|
622
624
|
/**
|
|
623
625
|
* Create the state required to render Reference.
|
|
624
626
|
*
|
|
@@ -630,4 +632,9 @@ export declare const useReferenceStylesV2_unstable: (state: ReferenceV2State) =>
|
|
|
630
632
|
*/
|
|
631
633
|
export declare const useReferenceV2_unstable: (props: ReferenceV2Props, ref: React_2.Ref<HTMLButtonElement | HTMLAnchorElement>) => ReferenceV2State;
|
|
632
634
|
|
|
635
|
+
/**
|
|
636
|
+
* Apply styling to the Reference slots based on the state
|
|
637
|
+
*/
|
|
638
|
+
export declare const useReferenceV2Styles_unstable: (state: ReferenceV2State) => ReferenceV2State;
|
|
639
|
+
|
|
633
640
|
export { }
|
|
@@ -3,7 +3,7 @@ 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
|
-
|
|
6
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
7
7
|
export const Reference = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
8
|
const state = useReference_unstable(props, ref);
|
|
9
9
|
useReferenceStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Reference.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReference_unstable } from './useReference';\nimport { renderReference_unstable } from './renderReference';\nimport { useReferenceStyles_unstable } from './useReferenceStyles.styles';\nimport type { ReferenceProps } from './Reference.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n
|
|
1
|
+
{"version":3,"sources":["Reference.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReference_unstable } from './useReference';\nimport { renderReference_unstable } from './renderReference';\nimport { useReferenceStyles_unstable } from './useReferenceStyles.styles';\nimport type { ReferenceProps } from './Reference.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const Reference: ForwardRefComponent<ReferenceProps> = React.forwardRef((props, ref) => {\n const state = useReference_unstable(props, ref);\n\n useReferenceStyles_unstable(state);\n useCustomStyleHook('useReferenceStyles')(state);\n\n return renderReference_unstable(state);\n});\n\nReference.displayName = 'Reference';\n"],"names":["React","useReference_unstable","renderReference_unstable","useReferenceStyles_unstable","useCustomStyleHook","Reference","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,iBAAiB;AACvD,SAASC,wBAAwB,QAAQ,oBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,8BAA8B;AAG1E,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,mEAAmE,GACnE,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAC5BL,mBAAmB,sBAAsBK;IAEzC,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Reference.types.ts"],"sourcesContent":["import type { CopilotMode } from '@fluentui-copilot/react-provider';\nimport type { Button, ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ReferenceSlots = {\n /**\n * The root slot.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Citation slot. Displays a `Citation`. Set the `null` to hide the citation.\n */\n citation: Slot<'div'>;\n\n /**\n * Media slot. Used to display Avatars, Icons, etc.\n */\n media: Slot<'div'>;\n\n /**\n * Actions slot.\n */\n actions: Slot<'div'>;\n\n /**\n * Label slot. Primary description of the reference.\n */\n label: NonNullable<Slot<'div'>>;\n\n /**\n * Sensitivity slot. Used to display a `SensitivityLabel`.\n */\n sensitivity: Slot<'span'>;\n\n /**\n * Metadata slot. Container for `primaryText`, `secondaryText`, `tertiaryText` and `icon`.\n */\n metadata: NonNullable<Slot<'div'>>;\n\n /**\n * Primary text slot. First displayed metadata text.\n */\n primaryText: Slot<'span'>;\n\n /**\n * Secondary text slot. Second displayed metadata text.\n */\n secondaryText: Slot<'span'>;\n\n /**\n * Tertiary text slot. Third displayed metadata text.\n */\n tertiaryText: Slot<'span'>;\n\n /**\n * Icon slot. Icon displayed in metadata area.\n */\n icon: Slot<'span'>;\n\n /**\n * Content slot.\n */\n content: NonNullable<Slot<'div'>>;\n\n /**\n * Details button slot. Used to expand/collapse the reference.\n */\n detailsButton: Slot<typeof Button>;\n};\n\n
|
|
1
|
+
{"version":3,"sources":["Reference.types.ts"],"sourcesContent":["import type { CopilotMode } from '@fluentui-copilot/react-provider';\nimport type { Button, ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport type ReferenceSlots = {\n /**\n * The root slot.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Citation slot. Displays a `Citation`. Set the `null` to hide the citation.\n */\n citation: Slot<'div'>;\n\n /**\n * Media slot. Used to display Avatars, Icons, etc.\n */\n media: Slot<'div'>;\n\n /**\n * Actions slot.\n */\n actions: Slot<'div'>;\n\n /**\n * Label slot. Primary description of the reference.\n */\n label: NonNullable<Slot<'div'>>;\n\n /**\n * Sensitivity slot. Used to display a `SensitivityLabel`.\n */\n sensitivity: Slot<'span'>;\n\n /**\n * Metadata slot. Container for `primaryText`, `secondaryText`, `tertiaryText` and `icon`.\n */\n metadata: NonNullable<Slot<'div'>>;\n\n /**\n * Primary text slot. First displayed metadata text.\n */\n primaryText: Slot<'span'>;\n\n /**\n * Secondary text slot. Second displayed metadata text.\n */\n secondaryText: Slot<'span'>;\n\n /**\n * Tertiary text slot. Third displayed metadata text.\n */\n tertiaryText: Slot<'span'>;\n\n /**\n * Icon slot. Icon displayed in metadata area.\n */\n icon: Slot<'span'>;\n\n /**\n * Content slot.\n */\n content: NonNullable<Slot<'div'>>;\n\n /**\n * Details button slot. Used to expand/collapse the reference.\n */\n detailsButton: Slot<typeof Button>;\n};\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport type ReferenceProps = ComponentProps<Partial<ReferenceSlots>> &\n CopilotMode & {\n /**\n * Numeric index associated with `Citation`.\n */\n index: number;\n\n /**\n * HREF back to the `Citation` this `Reference` is associated with.\n */\n citationHref?: string;\n\n /**\n * Unique ID associated with this `Reference`.\n */\n referenceId?: string;\n\n /**\n * Text snippet from the reference source.\n */\n excerpt?: string;\n\n /**\n * @deprecated Inline layout is the only one that is available, use `Preview` component instead for an equivalent to a `Reference` with a popover layout inside of a `Popover`.\n */\n layout?: 'inline' | 'popover';\n };\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport type ReferenceState = ComponentState<ReferenceSlots> &\n Required<Pick<ReferenceProps, 'mode' | 'layout' | 'index'>> & {\n /**\n * State used to renderer the `Reference` in an expanded state.\n */\n isExpanded: boolean;\n };\n"],"names":[],"rangeMappings":"","mappings":"AAoGA,mEAAmE,GACnE,WAMI"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
|
-
/**
|
|
4
|
-
* Render the final JSX of Reference
|
|
5
|
-
*/
|
|
3
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
6
4
|
export const renderReference_unstable = state => {
|
|
7
5
|
assertSlots(state);
|
|
8
6
|
return /*#__PURE__*/_jsxs(state.root, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderReference.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport type { ReferenceState, ReferenceSlots } from './Reference.types';\n\n
|
|
1
|
+
{"version":3,"sources":["renderReference.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport type { ReferenceState, ReferenceSlots } from './Reference.types';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const renderReference_unstable = (state: ReferenceState) => {\n assertSlots<ReferenceSlots>(state);\n\n return (\n <state.root>\n {state.citation && <state.citation />}\n {state.media && <state.media />}\n <state.label />\n {state.actions && (\n <state.actions>\n {state.actions.children}\n {state.detailsButton && <state.detailsButton />}\n </state.actions>\n )}\n {state.sensitivity && <state.sensitivity />}\n <state.metadata>\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.tertiaryText && <state.tertiaryText />}\n {state.icon && <state.icon />}\n {state.metadata.children}\n </state.metadata>\n <state.content />\n </state.root>\n );\n};\n"],"names":["assertSlots","renderReference_unstable","state","root","citation","media","label","actions","children","detailsButton","sensitivity","metadata","primaryText","secondaryText","tertiaryText","icon","content"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAIzD,mEAAmE,GACnE,OAAO,MAAMC,2BAA2B,CAACC;IACvCF,YAA4BE;IAE5B,qBACE,MAACA,MAAMC,IAAI;;YACRD,MAAME,QAAQ,kBAAI,KAACF,MAAME,QAAQ;YACjCF,MAAMG,KAAK,kBAAI,KAACH,MAAMG,KAAK;0BAC5B,KAACH,MAAMI,KAAK;YACXJ,MAAMK,OAAO,kBACZ,MAACL,MAAMK,OAAO;;oBACXL,MAAMK,OAAO,CAACC,QAAQ;oBACtBN,MAAMO,aAAa,kBAAI,KAACP,MAAMO,aAAa;;;YAG/CP,MAAMQ,WAAW,kBAAI,KAACR,MAAMQ,WAAW;0BACxC,MAACR,MAAMS,QAAQ;;oBACZT,MAAMU,WAAW,kBAAI,KAACV,MAAMU,WAAW;oBACvCV,MAAMW,aAAa,kBAAI,KAACX,MAAMW,aAAa;oBAC3CX,MAAMY,YAAY,kBAAI,KAACZ,MAAMY,YAAY;oBACzCZ,MAAMa,IAAI,kBAAI,KAACb,MAAMa,IAAI;oBACzBb,MAAMS,QAAQ,CAACH,QAAQ;;;0BAE1B,KAACN,MAAMc,OAAO;;;AAGpB,EAAE"}
|
|
@@ -13,6 +13,8 @@ import { useCopilotMode } from '@fluentui-copilot/react-provider';
|
|
|
13
13
|
*
|
|
14
14
|
* @param props - props from this instance of Reference
|
|
15
15
|
* @param ref - reference to root HTMLElement of Reference
|
|
16
|
+
*
|
|
17
|
+
* deprecated Use ReferenceV2 component, hooks and types instead.
|
|
16
18
|
*/
|
|
17
19
|
export const useReference_unstable = (props, ref) => {
|
|
18
20
|
const {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReference.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Button,\n Caption1,\n getIntrinsicElementProps,\n mergeCallbacks,\n mergeClasses,\n slot,\n useId,\n usePopoverContext_unstable as usePopoverContext,\n} from '@fluentui/react-components';\nimport {\n ChevronDown24Regular,\n ChevronUp24Regular,\n ChevronDown16Regular,\n ChevronUp16Regular,\n} from '@fluentui/react-icons';\nimport { referenceExtraClassNames } from './useReferenceStyles.styles';\nimport { Citation } from '../Citation';\nimport type { ReferenceProps, ReferenceState } from './Reference.types';\nimport { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Reference.\n *\n * The returned state can be modified with hooks such as useReferenceStyles_unstable,\n * before being passed to renderReference_unstable.\n *\n * @param props - props from this instance of Reference\n * @param ref - reference to root HTMLElement of Reference\n */\nexport const useReference_unstable = (props: ReferenceProps, ref: React.Ref<HTMLDivElement>): ReferenceState => {\n const { index, referenceId, citationHref, excerpt, layout = 'inline' } = props;\n\n const mode = useCopilotMode(props.mode);\n\n const labelId = useId();\n const mediaId = useId();\n const [isExpanded, setIsExpanded] = React.useState(layout === 'popover' ? true : false);\n\n const setPopoverOpen = usePopoverContext(context => context.setOpen);\n\n const onExpandClick: React.MouseEventHandler<HTMLButtonElement> = _e => {\n setIsExpanded(!isExpanded);\n };\n\n const label = slot.always(props.label, {\n defaultProps: { id: labelId },\n elementType: 'div',\n });\n const media = slot.optional(props.media, { defaultProps: { id: mediaId }, elementType: 'div' });\n if (media && React.isValidElement<HTMLElement>(media.children)) {\n media.children = React.cloneElement(media.children, {\n className: mergeClasses(media.children.props.className, referenceExtraClassNames.mediaChild),\n });\n }\n\n if (media?.id) {\n label['aria-describedby'] = label['aria-describedby']?.concat(media.id) ?? media.id;\n }\n\n const ariaLabelledByProp = props['aria-labelledby'];\n const groupSemantics = React.useMemo(() => {\n return layout === 'inline'\n ? {\n role: 'group',\n 'aria-labelledby': `${ariaLabelledByProp ?? ''} ${label.id}`,\n tabIndex: -1,\n }\n : {};\n }, [layout, ariaLabelledByProp, label.id]);\n\n // Within a popup, a citation should function as a close button\n const citationProps = React.useMemo(() => {\n const onPopoverCloseClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n setPopoverOpen(e, false);\n\n // don't navigate\n e.preventDefault();\n };\n\n return layout === 'popover'\n ? {\n referenceHref: '#',\n tabIndex: -1,\n 'aria-label': `Reference ${index}, close`,\n onClick: onPopoverCloseClick,\n }\n : {\n referenceHref: citationHref,\n };\n }, [layout, citationHref, index, setPopoverOpen]);\n\n const state: ReferenceState = {\n isExpanded,\n mode: layout === 'popover' ? 'sidecar' : mode,\n layout,\n index,\n components: {\n root: 'div',\n citation: 'div',\n media: 'div',\n actions: 'div',\n label: 'div',\n sensitivity: 'span',\n metadata: 'div',\n content: 'div',\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n icon: 'span',\n detailsButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n id: referenceId,\n ...groupSemantics,\n ...props,\n }),\n { elementType: 'div' },\n ),\n citation: slot.optional(props.citation, {\n defaultProps: {\n children: (\n <Citation block {...citationProps}>\n {index}\n </Citation>\n ),\n },\n renderByDefault: true,\n elementType: 'div',\n }),\n media,\n actions: slot.optional(layout === 'inline' ? props.actions : null, {\n renderByDefault: true,\n elementType: 'div',\n }),\n label,\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n metadata: slot.always(props.metadata, { elementType: 'div' }),\n primaryText: slot.optional(props.primaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n tertiaryText: slot.optional(props.tertiaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n content: slot.always(props.content, {\n defaultProps: {\n children: excerpt && <Caption1>{excerpt}</Caption1>,\n },\n elementType: 'div',\n }),\n detailsButton: slot.optional(layout === 'inline' ? props.detailsButton : null, {\n defaultProps: {\n appearance: 'transparent',\n 'aria-expanded': isExpanded,\n 'aria-label': 'show details',\n size: mode === 'sidecar' ? 'small' : 'medium',\n icon: {\n children: getIcon(isExpanded, mode),\n },\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n if (state.detailsButton) {\n const onClick = state.detailsButton.onClick as React.MouseEventHandler<HTMLButtonElement>;\n state.detailsButton.onClick = mergeCallbacks(onClick, onExpandClick);\n }\n\n const referenceGroupSetOpen = useReferenceGroupSetOpen();\n const onTargettedByCitation = (e: React.FocusEvent<HTMLElement>) => {\n const relatedTargetHash: string | undefined = (e.relatedTarget as HTMLAnchorElement)?.hash;\n if (relatedTargetHash && relatedTargetHash.substring(1) === referenceId) {\n referenceGroupSetOpen();\n setIsExpanded(true);\n }\n };\n state.root.onFocus = mergeCallbacks(state.root.onFocus, onTargettedByCitation);\n\n return state;\n};\n\nconst getIcon = (isExpanded: boolean, mode: ReferenceProps['mode']): JSX.Element => {\n if (mode === 'sidecar') {\n return !isExpanded ? <ChevronDown16Regular /> : <ChevronUp16Regular />;\n }\n\n return !isExpanded ? <ChevronDown24Regular /> : <ChevronUp24Regular />;\n};\n"],"names":["React","Button","Caption1","getIntrinsicElementProps","mergeCallbacks","mergeClasses","slot","useId","usePopoverContext_unstable","usePopoverContext","ChevronDown24Regular","ChevronUp24Regular","ChevronDown16Regular","ChevronUp16Regular","referenceExtraClassNames","Citation","useReferenceGroupSetOpen","useCopilotMode","useReference_unstable","props","ref","index","referenceId","citationHref","excerpt","layout","mode","labelId","mediaId","isExpanded","setIsExpanded","useState","setPopoverOpen","context","setOpen","onExpandClick","_e","label","always","defaultProps","id","elementType","media","optional","isValidElement","children","cloneElement","className","mediaChild","concat","ariaLabelledByProp","groupSemantics","useMemo","role","tabIndex","citationProps","onPopoverCloseClick","e","preventDefault","referenceHref","onClick","state","components","root","citation","actions","sensitivity","metadata","content","primaryText","secondaryText","tertiaryText","icon","detailsButton","block","renderByDefault","hidden","appearance","size","getIcon","referenceGroupSetOpen","onTargettedByCitation","relatedTargetHash","relatedTarget","hash","substring","onFocus"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,MAAM,EACNC,QAAQ,EACRC,wBAAwB,EACxBC,cAAc,EACdC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,8BAA8BC,iBAAiB,QAC1C,6BAA6B;AACpC,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,QACb,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,8BAA8B;AACvE,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,wBAAwB,QAAQ,uCAAuC;AAChF,SAASC,cAAc,QAAQ,mCAAmC;AAElE;;;;;;;;CAQC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,KAAK,EAAEC,WAAW,EAAEC,YAAY,EAAEC,OAAO,EAAEC,SAAS,QAAQ,EAAE,GAAGN;IAEzE,MAAMO,OAAOT,eAAeE,MAAMO,IAAI;IAEtC,MAAMC,UAAUpB;IAChB,MAAMqB,U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YACvE0D;YACAlD,cAAc;QAChB;IACF;IACA+B,MAAME,IAAI,CAACuB,OAAO,GAAGlF,eAAeyD,MAAME,IAAI,CAACuB,OAAO,EAAEL;IAExD,OAAOpB;AACT,EAAE;AAEF,MAAMkB,UAAU,CAAClD,YAAqBH;IACpC,IAAIA,SAAS,WAAW;QACtB,OAAO,CAACG,2BAAa,oBAACjB,4CAA0B,oBAACC;IACnD;IAEA,OAAO,CAACgB,2BAAa,oBAACnB,4CAA0B,oBAACC;AACnD"}
|
|
1
|
+
{"version":3,"sources":["useReference.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Button,\n Caption1,\n getIntrinsicElementProps,\n mergeCallbacks,\n mergeClasses,\n slot,\n useId,\n usePopoverContext_unstable as usePopoverContext,\n} from '@fluentui/react-components';\nimport {\n ChevronDown24Regular,\n ChevronUp24Regular,\n ChevronDown16Regular,\n ChevronUp16Regular,\n} from '@fluentui/react-icons';\nimport { referenceExtraClassNames } from './useReferenceStyles.styles';\nimport { Citation } from '../Citation';\nimport type { ReferenceProps, ReferenceState } from './Reference.types';\nimport { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Reference.\n *\n * The returned state can be modified with hooks such as useReferenceStyles_unstable,\n * before being passed to renderReference_unstable.\n *\n * @param props - props from this instance of Reference\n * @param ref - reference to root HTMLElement of Reference\n *\n * deprecated Use ReferenceV2 component, hooks and types instead.\n */\nexport const useReference_unstable = (props: ReferenceProps, ref: React.Ref<HTMLDivElement>): ReferenceState => {\n const { index, referenceId, citationHref, excerpt, layout = 'inline' } = props;\n\n const mode = useCopilotMode(props.mode);\n\n const labelId = useId();\n const mediaId = useId();\n const [isExpanded, setIsExpanded] = React.useState(layout === 'popover' ? true : false);\n\n const setPopoverOpen = usePopoverContext(context => context.setOpen);\n\n const onExpandClick: React.MouseEventHandler<HTMLButtonElement> = _e => {\n setIsExpanded(!isExpanded);\n };\n\n const label = slot.always(props.label, {\n defaultProps: { id: labelId },\n elementType: 'div',\n });\n const media = slot.optional(props.media, { defaultProps: { id: mediaId }, elementType: 'div' });\n if (media && React.isValidElement<HTMLElement>(media.children)) {\n media.children = React.cloneElement(media.children, {\n className: mergeClasses(media.children.props.className, referenceExtraClassNames.mediaChild),\n });\n }\n\n if (media?.id) {\n label['aria-describedby'] = label['aria-describedby']?.concat(media.id) ?? media.id;\n }\n\n const ariaLabelledByProp = props['aria-labelledby'];\n const groupSemantics = React.useMemo(() => {\n return layout === 'inline'\n ? {\n role: 'group',\n 'aria-labelledby': `${ariaLabelledByProp ?? ''} ${label.id}`,\n tabIndex: -1,\n }\n : {};\n }, [layout, ariaLabelledByProp, label.id]);\n\n // Within a popup, a citation should function as a close button\n const citationProps = React.useMemo(() => {\n const onPopoverCloseClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n setPopoverOpen(e, false);\n\n // don't navigate\n e.preventDefault();\n };\n\n return layout === 'popover'\n ? {\n referenceHref: '#',\n tabIndex: -1,\n 'aria-label': `Reference ${index}, close`,\n onClick: onPopoverCloseClick,\n }\n : {\n referenceHref: citationHref,\n };\n }, [layout, citationHref, index, setPopoverOpen]);\n\n const state: ReferenceState = {\n isExpanded,\n mode: layout === 'popover' ? 'sidecar' : mode,\n layout,\n index,\n components: {\n root: 'div',\n citation: 'div',\n media: 'div',\n actions: 'div',\n label: 'div',\n sensitivity: 'span',\n metadata: 'div',\n content: 'div',\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n icon: 'span',\n detailsButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n id: referenceId,\n ...groupSemantics,\n ...props,\n }),\n { elementType: 'div' },\n ),\n citation: slot.optional(props.citation, {\n defaultProps: {\n children: (\n <Citation block {...citationProps}>\n {index}\n </Citation>\n ),\n },\n renderByDefault: true,\n elementType: 'div',\n }),\n media,\n actions: slot.optional(layout === 'inline' ? props.actions : null, {\n renderByDefault: true,\n elementType: 'div',\n }),\n label,\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n metadata: slot.always(props.metadata, { elementType: 'div' }),\n primaryText: slot.optional(props.primaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n tertiaryText: slot.optional(props.tertiaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n content: slot.always(props.content, {\n defaultProps: {\n children: excerpt && <Caption1>{excerpt}</Caption1>,\n },\n elementType: 'div',\n }),\n detailsButton: slot.optional(layout === 'inline' ? props.detailsButton : null, {\n defaultProps: {\n appearance: 'transparent',\n 'aria-expanded': isExpanded,\n 'aria-label': 'show details',\n size: mode === 'sidecar' ? 'small' : 'medium',\n icon: {\n children: getIcon(isExpanded, mode),\n },\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n if (state.detailsButton) {\n const onClick = state.detailsButton.onClick as React.MouseEventHandler<HTMLButtonElement>;\n state.detailsButton.onClick = mergeCallbacks(onClick, onExpandClick);\n }\n\n const referenceGroupSetOpen = useReferenceGroupSetOpen();\n const onTargettedByCitation = (e: React.FocusEvent<HTMLElement>) => {\n const relatedTargetHash: string | undefined = (e.relatedTarget as HTMLAnchorElement)?.hash;\n if (relatedTargetHash && relatedTargetHash.substring(1) === referenceId) {\n referenceGroupSetOpen();\n setIsExpanded(true);\n }\n };\n state.root.onFocus = mergeCallbacks(state.root.onFocus, onTargettedByCitation);\n\n return state;\n};\n\nconst getIcon = (isExpanded: boolean, mode: ReferenceProps['mode']): JSX.Element => {\n if (mode === 'sidecar') {\n return !isExpanded ? <ChevronDown16Regular /> : <ChevronUp16Regular />;\n }\n\n return !isExpanded ? <ChevronDown24Regular /> : <ChevronUp24Regular />;\n};\n"],"names":["React","Button","Caption1","getIntrinsicElementProps","mergeCallbacks","mergeClasses","slot","useId","usePopoverContext_unstable","usePopoverContext","ChevronDown24Regular","ChevronUp24Regular","ChevronDown16Regular","ChevronUp16Regular","referenceExtraClassNames","Citation","useReferenceGroupSetOpen","useCopilotMode","useReference_unstable","props","ref","index","referenceId","citationHref","excerpt","layout","mode","labelId","mediaId","isExpanded","setIsExpanded","useState","setPopoverOpen","context","setOpen","onExpandClick","_e","label","always","defaultProps","id","elementType","media","optional","isValidElement","children","cloneElement","className","mediaChild","concat","ariaLabelledByProp","groupSemantics","useMemo","role","tabIndex","citationProps","onPopoverCloseClick","e","preventDefault","referenceHref","onClick","state","components","root","citation","actions","sensitivity","metadata","content","primaryText","secondaryText","tertiaryText","icon","detailsButton","block","renderByDefault","hidden","appearance","size","getIcon","referenceGroupSetOpen","onTargettedByCitation","relatedTargetHash","relatedTarget","hash","substring","onFocus"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,MAAM,EACNC,QAAQ,EACRC,wBAAwB,EACxBC,cAAc,EACdC,YAAY,EACZC,IAAI,EACJC,KAAK,EACLC,8BAA8BC,iBAAiB,QAC1C,6BAA6B;AACpC,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,oBAAoB,EACpBC,kBAAkB,QACb,wBAAwB;AAC/B,SAASC,wBAAwB,QAAQ,8BAA8B;AACvE,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,wBAAwB,QAAQ,uCAAuC;AAChF,SAASC,cAAc,QAAQ,mCAAmC;AAElE;;;;;;;;;;CAUC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuB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9B,MAAMiE,wBAAwB,CAACxB;YACkBA;QAA/C,MAAMyB,qBAAyCzB,mBAAAA,EAAE0B,aAAa,cAAf1B,uCAAD,AAACA,iBAAuC2B,IAAI;QAC1F,IAAIF,qBAAqBA,kBAAkBG,SAAS,CAAC,OAAO/D,aAAa;YACvE0D;YACAlD,cAAc;QAChB;IACF;IACA+B,MAAME,IAAI,CAACuB,OAAO,GAAGlF,eAAeyD,MAAME,IAAI,CAACuB,OAAO,EAAEL;IAExD,OAAOpB;AACT,EAAE;AAEF,MAAMkB,UAAU,CAAClD,YAAqBH;IACpC,IAAIA,SAAS,WAAW;QACtB,OAAO,CAACG,2BAAa,oBAACjB,4CAA0B,oBAACC;IACnD;IAEA,OAAO,CAACgB,2BAAa,oBAACnB,4CAA0B,oBAACC;AACnD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { buttonClassNames, __resetStyles, __styles, mergeClasses, shorthands, tokens, typographyStyles } from '@fluentui/react-components';
|
|
2
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
2
3
|
export const referenceClassNames = {
|
|
3
4
|
root: 'fai-Reference',
|
|
4
5
|
citation: 'fai-Reference__citation',
|
|
@@ -14,6 +15,7 @@ export const referenceClassNames = {
|
|
|
14
15
|
content: 'fai-Reference__content',
|
|
15
16
|
detailsButton: 'fai-Reference__detailsButton'
|
|
16
17
|
};
|
|
18
|
+
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
17
19
|
export const referenceExtraClassNames = {
|
|
18
20
|
text: 'fai-Reference__text',
|
|
19
21
|
mediaChild: 'fai-Reference__mediaChild'
|
|
@@ -166,6 +168,8 @@ const useLabelStyles = __styles({
|
|
|
166
168
|
});
|
|
167
169
|
/**
|
|
168
170
|
* Apply styling to the Reference slots based on the state
|
|
171
|
+
*
|
|
172
|
+
* deprecated Use ReferenceV2 component, hooks and types instead.
|
|
169
173
|
*/
|
|
170
174
|
export const useReferenceStyles_unstable = state => {
|
|
171
175
|
'use no memo';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReferenceStyles.styles.ts"],"sourcesContent":["import {\n buttonClassNames,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport type { ReferenceSlots, ReferenceState } from './Reference.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const referenceClassNames: SlotClassNames<ReferenceSlots> = {\n root: 'fai-Reference',\n citation: 'fai-Reference__citation',\n media: 'fai-Reference__media',\n actions: 'fai-Reference__actions',\n sensitivity: 'fai-Reference__sensitivity',\n metadata: 'fai-Reference__metadata',\n primaryText: 'fai-Reference__primaryText',\n secondaryText: 'fai-Reference__secondaryText',\n tertiaryText: 'fai-Reference__tertiaryText',\n icon: 'fai-Reference__icon',\n label: 'fai-Reference__label',\n content: 'fai-Reference__content',\n detailsButton: 'fai-Reference__detailsButton',\n};\n\nexport const referenceExtraClassNames = {\n text: 'fai-Reference__text',\n mediaChild: 'fai-Reference__mediaChild',\n};\n\nconst labelFontSize = typographyStyles.caption1Strong.fontSize;\nconst labelLineHeight = typographyStyles.caption1Strong.lineHeight;\n\nconst maxPopoverWidth = '256px';\n\nconst useReferenceClassName = makeResetStyles({\n boxSizing: 'border-box',\n width: '100%',\n display: 'grid',\n gridTemplateAreas: `\n \"citation media title actions\"\n \". . title .\"\n \"sensitivityLabel sensitivityLabel sensitivityLabel sensitivityLabel\"\n \"metadata metadata metadata metadata\"\n \"content content content content\"\n `,\n gridTemplateColumns: 'min-content min-content 1fr min-content',\n gridTemplateRows: '32px auto auto auto auto',\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`,\n boxShadow: 'none',\n columnGap: tokens.spacingHorizontalXS,\n alignItems: 'center',\n});\n\nconst useStyles = makeStyles({\n canvas: {},\n sidecar: {\n gridTemplateRows: '24px auto auto auto',\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalS),\n },\n inline: {},\n popover: {\n ...shorthands.borderWidth('0px'),\n width: `calc(${maxPopoverWidth} - (${tokens.spacingHorizontalM} * 2))`,\n ...shorthands.padding('0px'),\n },\n closed: {\n rowGap: 0,\n },\n citation: {\n ...shorthands.gridArea('citation'),\n },\n media: {\n ...shorthands.gridArea('media'),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mediaPopover: {\n width: '16px',\n height: '16px',\n\n [`> .${referenceExtraClassNames.mediaChild}`]: {\n width: '16px',\n height: '16px',\n },\n },\n actions: {\n ...shorthands.gridArea('actions'),\n justifySelf: 'end',\n display: 'flex',\n gridRowStart: 1,\n },\n detailsButton: {\n [`> ${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground3,\n },\n },\n sensitivity: {\n ...shorthands.gridArea('sensitivityLabel'),\n justifySelf: 'start',\n },\n metadata: {\n marginTop: tokens.spacingVerticalXS,\n\n ...shorthands.gridArea('metadata'),\n ...typographyStyles.caption2,\n },\n metadataSubsequentText: {\n position: 'relative',\n marginLeft: tokens.spacingHorizontalS,\n\n '&::before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n left: `calc(${tokens.spacingHorizontalS} / -2)`,\n top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,\n height: typographyStyles.caption2.fontSize,\n ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n },\n icon: {\n ...typographyStyles.caption2,\n verticalAlign: 'middle',\n },\n content: {\n marginTop: tokens.spacingVerticalXS,\n ...shorthands.gridArea('content'),\n display: 'flex',\n flexDirection: 'column',\n rowGap: tokens.spacingVerticalS,\n color: tokens.colorNeutralForeground3,\n wordBreak: 'break-word',\n },\n hidden: {\n display: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n root: {\n ...shorthands.gridArea('title'),\n alignSelf: 'start',\n ...typographyStyles.caption1Strong,\n wordBreak: 'break-word',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n display: '-webkit-box',\n overflowY: 'hidden',\n },\n\n canvas: {\n // 24px is the height of the tallest element within the reference\n paddingTop: `calc((24px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n sidecar: {\n // 16px is the height of the tallest element within the reference\n paddingTop: `calc((16px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n closed: {\n maxWidth: '100%',\n '-webkit-line-clamp': '1',\n },\n});\n\n/**\n * Apply styling to the Reference slots based on the state\n */\nexport const useReferenceStyles_unstable = (state: ReferenceState): ReferenceState => {\n 'use no memo';\n\n const { isExpanded, mode, layout } = state;\n\n const rootClassName = useReferenceClassName();\n const styles = useStyles();\n const labelStyles = useLabelStyles();\n state.root.className = mergeClasses(\n referenceClassNames.root,\n rootClassName,\n styles[mode],\n styles[layout],\n !isExpanded && styles.closed,\n state.root.className,\n );\n\n if (state.citation) {\n state.citation.className = mergeClasses(referenceClassNames.citation, styles.citation, state.citation.className);\n }\n\n if (state.media) {\n state.media.className = mergeClasses(\n referenceClassNames.media,\n styles.media,\n layout === 'popover' && styles.mediaPopover,\n state.media.className,\n );\n }\n\n if (state.actions) {\n state.actions.className = mergeClasses(referenceClassNames.actions, styles.actions, state.actions.className);\n }\n\n state.label.className = mergeClasses(\n referenceClassNames.label,\n labelStyles.root,\n labelStyles[mode],\n !isExpanded && labelStyles.closed,\n state.label.className,\n );\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n referenceClassNames.sensitivity,\n styles.sensitivity,\n !isExpanded && styles.hidden,\n state.sensitivity.className,\n );\n }\n\n state.metadata.className = mergeClasses(\n referenceClassNames.metadata,\n styles.metadata,\n !isExpanded && styles.hidden,\n state.metadata.className,\n );\n\n let isSubsequentText = false;\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(\n referenceClassNames.primaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.primaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n referenceClassNames.secondaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.secondaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n referenceClassNames.tertiaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.tertiaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(referenceClassNames.icon, styles.icon, state.icon.className);\n }\n state.content.className = mergeClasses(\n referenceClassNames.content,\n styles.content,\n !isExpanded && styles.hidden,\n state.content.className,\n );\n\n if (state.detailsButton) {\n state.detailsButton.className = mergeClasses(\n referenceClassNames.detailsButton,\n styles.detailsButton,\n state.detailsButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","referenceClassNames","root","citation","media","actions","sensitivity","metadata","primaryText","secondaryText","tertiaryText","icon","label","content","detailsButton","referenceExtraClassNames","text","mediaChild","labelFontSize","caption1Strong","fontSize","labelLineHeight","lineHeight","maxPopoverWidth","useReferenceClassName","boxSizing","width","display","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","padding","spacingVerticalS","spacingHorizontalS","boxShadow","columnGap","spacingHorizontalXS","alignItems","useStyles","canvas","sidecar","spacingVerticalXS","inline","popover","borderWidth","spacingHorizontalM","closed","rowGap","gridArea","justifyContent","mediaPopover","height","justifySelf","gridRowStart","color","colorNeutralForeground3","marginTop","caption2","metadataSubsequentText","position","marginLeft","left","top","borderLeft","colorNeutralStroke2","verticalAlign","flexDirection","wordBreak","hidden","useLabelStyles","alignSelf","overflowY","paddingTop","maxWidth","useReferenceStyles_unstable","state","isExpanded","mode","layout","rootClassName","styles","labelStyles","className","isSubsequentText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,gBAAgB,EAChBC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AAIpC,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,SAAS;IACTC,aAAa;IACbC,UAAU;IACVC,aAAa;IACbC,eAAe;IACfC,cAAc;IACdC,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,eAAe;AACjB,EAAE;AAEF,OAAO,MAAMC,2BAA2B;IACtCC,MAAM;IACNC,YAAY;AACd,EAAE;AAEF,MAAMC,gBAAgBlB,iBAAiBmB,cAAc,CAACC,QAAQ;AAC9D,MAAMC,kBAAkBrB,iBAAiBmB,cAAc,CAACG,UAAU;AAElE,MAAMC,kBAAkB;AAExB,MAAMC,wBAAwB7B,gBAAgB;IAC5C8B,WAAW;IACXC,OAAO;IACPC,SAAS;IACTC,mBAAmB,CAAC;;;;;;IAMlB,CAAC;IACHC,qBAAqB;IACrBC,kBAAkB;IAClBC,QAAQ,CAAC,EAAEhC,OAAOiC,eAAe,CAAC,OAAO,EAAEjC,OAAOkC,mBAAmB,CAAC,CAAC;IACvEC,cAAcnC,OAAOoC,kBAAkB;IACvCC,SAAS,CAAC,EAAErC,OAAOsC,gBAAgB,CAAC,CAAC,EAAEtC,OAAOuC,kBAAkB,CAAC,CAAC;IAClEC,WAAW;IACXC,WAAWzC,OAAO0C,mBAAmB;IACrCC,YAAY;AACd;AAEA,MAAMC,Y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AAE;QACvBkE,MAAMlE,aAAa,CAACyE,SAAS,GAAG1F,aAC9BI,oBAAoBa,aAAa,EACjCuE,OAAOvE,aAAa,EACpBkE,MAAMlE,aAAa,CAACyE,SAAS;IAEjC;IAEA,OAAOP;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["useReferenceStyles.styles.ts"],"sourcesContent":["import {\n buttonClassNames,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n tokens,\n typographyStyles,\n} from '@fluentui/react-components';\nimport type { ReferenceSlots, ReferenceState } from './Reference.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\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 ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalS),\n },\n inline: {},\n popover: {\n ...shorthands.borderWidth('0px'),\n width: `calc(${maxPopoverWidth} - (${tokens.spacingHorizontalM} * 2))`,\n ...shorthands.padding('0px'),\n },\n closed: {\n rowGap: 0,\n },\n citation: {\n ...shorthands.gridArea('citation'),\n },\n media: {\n ...shorthands.gridArea('media'),\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mediaPopover: {\n width: '16px',\n height: '16px',\n\n [`> .${referenceExtraClassNames.mediaChild}`]: {\n width: '16px',\n height: '16px',\n },\n },\n actions: {\n ...shorthands.gridArea('actions'),\n justifySelf: 'end',\n display: 'flex',\n gridRowStart: 1,\n },\n detailsButton: {\n [`> ${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground3,\n },\n },\n sensitivity: {\n ...shorthands.gridArea('sensitivityLabel'),\n justifySelf: 'start',\n },\n metadata: {\n marginTop: tokens.spacingVerticalXS,\n\n ...shorthands.gridArea('metadata'),\n ...typographyStyles.caption2,\n },\n metadataSubsequentText: {\n position: 'relative',\n marginLeft: tokens.spacingHorizontalS,\n\n '&::before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n left: `calc(${tokens.spacingHorizontalS} / -2)`,\n top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,\n height: typographyStyles.caption2.fontSize,\n ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n },\n icon: {\n ...typographyStyles.caption2,\n verticalAlign: 'middle',\n },\n content: {\n marginTop: tokens.spacingVerticalXS,\n ...shorthands.gridArea('content'),\n display: 'flex',\n flexDirection: 'column',\n rowGap: tokens.spacingVerticalS,\n color: tokens.colorNeutralForeground3,\n wordBreak: 'break-word',\n },\n hidden: {\n display: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n root: {\n ...shorthands.gridArea('title'),\n alignSelf: 'start',\n ...typographyStyles.caption1Strong,\n wordBreak: 'break-word',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n display: '-webkit-box',\n overflowY: 'hidden',\n },\n\n canvas: {\n // 24px is the height of the tallest element within the reference\n paddingTop: `calc((24px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n sidecar: {\n // 16px is the height of the tallest element within the reference\n paddingTop: `calc((16px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n closed: {\n maxWidth: '100%',\n '-webkit-line-clamp': '1',\n },\n});\n\n/**\n * Apply styling to the Reference slots based on the state\n *\n * deprecated Use ReferenceV2 component, hooks and types instead.\n */\nexport const useReferenceStyles_unstable = (state: ReferenceState): ReferenceState => {\n 'use no memo';\n\n const { isExpanded, mode, layout } = state;\n\n const rootClassName = useReferenceClassName();\n const styles = useStyles();\n const labelStyles = useLabelStyles();\n state.root.className = mergeClasses(\n referenceClassNames.root,\n rootClassName,\n styles[mode],\n styles[layout],\n !isExpanded && styles.closed,\n state.root.className,\n );\n\n if (state.citation) {\n state.citation.className = mergeClasses(referenceClassNames.citation, styles.citation, state.citation.className);\n }\n\n if (state.media) {\n state.media.className = mergeClasses(\n referenceClassNames.media,\n styles.media,\n layout === 'popover' && styles.mediaPopover,\n state.media.className,\n );\n }\n\n if (state.actions) {\n state.actions.className = mergeClasses(referenceClassNames.actions, styles.actions, state.actions.className);\n }\n\n state.label.className = mergeClasses(\n referenceClassNames.label,\n labelStyles.root,\n labelStyles[mode],\n !isExpanded && labelStyles.closed,\n state.label.className,\n );\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n referenceClassNames.sensitivity,\n styles.sensitivity,\n !isExpanded && styles.hidden,\n state.sensitivity.className,\n );\n }\n\n state.metadata.className = mergeClasses(\n referenceClassNames.metadata,\n styles.metadata,\n !isExpanded && styles.hidden,\n state.metadata.className,\n );\n\n let isSubsequentText = false;\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(\n referenceClassNames.primaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.primaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n referenceClassNames.secondaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.secondaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n referenceClassNames.tertiaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.tertiaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(referenceClassNames.icon, styles.icon, state.icon.className);\n }\n state.content.className = mergeClasses(\n referenceClassNames.content,\n styles.content,\n !isExpanded && styles.hidden,\n state.content.className,\n );\n\n if (state.detailsButton) {\n state.detailsButton.className = mergeClasses(\n referenceClassNames.detailsButton,\n styles.detailsButton,\n state.detailsButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","shorthands","tokens","typographyStyles","referenceClassNames","root","citation","media","actions","sensitivity","metadata","primaryText","secondaryText","tertiaryText","icon","label","content","detailsButton","referenceExtraClassNames","text","mediaChild","labelFontSize","caption1Strong","fontSize","labelLineHeight","lineHeight","maxPopoverWidth","useReferenceClassName","boxSizing","width","display","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","padding","spacingVerticalS","spacingHorizontalS","boxShadow","columnGap","spacingHorizontalXS","alignItems","useStyles","canvas","sidecar","spacingVerticalXS","inline","popover","borderWidth","spacingHorizontalM","closed","rowGap","gridArea","justifyContent","mediaPopover","height","justifySelf","gridRowStart","color","colorNeutralForeground3","marginTop","caption2","metadataSubsequentText","position","marginLeft","left","top","borderLeft","colorNeutralStroke2","verticalAlign","flexDirection","wordBreak","hidden","useLabelStyles","alignSelf","overflowY","paddingTop","maxWidth","useReferenceStyles_unstable","state","isExpanded","mode","layout","rootClassName","styles","labelStyles","className","isSubsequentText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,gBAAgB,EAChBC,eAAe,EACfC,UAAU,EACVC,YAAY,EACZC,UAAU,EACVC,MAAM,EACNC,gBAAgB,QACX,6BAA6B;AAIpC,mEAAmE,GACnE,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,SAAS;IACTC,aAAa;IACbC,UAAU;IACVC,aAAa;IACbC,eAAe;IACfC,cAAc;IACdC,MAAM;IACNC,OAAO;IACPC,SAAS;IACTC,eAAe;AACjB,EAAE;AAEF,mEAAmE,GACnE,OAAO,MAAMC,2BAA2B;IACtCC,MAAM;IACNC,YAAY;AACd,EAAE;AAEF,MAAMC,gBAAgBlB,iBAAiBmB,cAAc,CAACC,QAAQ;AAC9D,MAAMC,kBAAkBrB,iBAAiBmB,cAAc,CAACG,UAAU;AAElE,MAAMC,kBAAkB;AAExB,MAAMC,wBAAwB7B,gBAAgB;IAC5C8B,WAAW;IACXC,OAAO;IACPC,SAAS;IACTC,mBAAmB,CAAC;;;;;;IAMlB,CAAC;IACHC,qBAAqB;IACrBC,kBAAkB;IAClBC,QAAQ,CAA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AAaI,oBAAoBU,IAAI,EAAE0E,OAAO1E,IAAI,EAAEqE,MAAMrE,IAAI,CAAC4E,SAAS;IACjG;IACAP,MAAMnE,OAAO,CAAC0E,SAAS,GAAG1F,aACxBI,oBAAoBY,OAAO,EAC3BwE,OAAOxE,OAAO,EACd,CAACoE,cAAcI,OAAOZ,MAAM,EAC5BO,MAAMnE,OAAO,CAAC0E,SAAS;IAGzB,IAAIP,MAAMlE,aAAa,EAAE;QACvBkE,MAAMlE,aAAa,CAACyE,SAAS,GAAG1F,aAC9BI,oBAAoBa,aAAa,EACjCuE,OAAOvE,aAAa,EACpBkE,MAAMlE,aAAa,CAACyE,SAAS;IAEjC;IAEA,OAAOP;AACT,EAAE"}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { useReferenceGroupToggle_unstable } from './useReferenceGroupToggle';
|
|
3
3
|
import { renderReferenceGroupToggle_unstable } from './renderReferenceGroupToggle';
|
|
4
4
|
import { useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles.styles';
|
|
5
|
-
|
|
5
|
+
/** deprecated The ReferenceGroup pattern is deprecated and will be removed in a future release. */
|
|
6
6
|
export const ReferenceGroupToggle = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
7
|
const state = useReferenceGroupToggle_unstable(props, ref);
|
|
8
8
|
useReferenceGroupToggleStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceGroupToggle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReferenceGroupToggle_unstable } from './useReferenceGroupToggle';\nimport { renderReferenceGroupToggle_unstable } from './renderReferenceGroupToggle';\nimport { useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles.styles';\nimport type { ReferenceGroupToggleProps } from './ReferenceGroupToggle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n
|
|
1
|
+
{"version":3,"sources":["ReferenceGroupToggle.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReferenceGroupToggle_unstable } from './useReferenceGroupToggle';\nimport { renderReferenceGroupToggle_unstable } from './renderReferenceGroupToggle';\nimport { useReferenceGroupToggleStyles_unstable } from './useReferenceGroupToggleStyles.styles';\nimport type { ReferenceGroupToggleProps } from './ReferenceGroupToggle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\n/** deprecated The ReferenceGroup pattern is deprecated and will be removed in a future release. */\nexport const ReferenceGroupToggle: ForwardRefComponent<ReferenceGroupToggleProps> = React.forwardRef((props, ref) => {\n const state = useReferenceGroupToggle_unstable(props, ref);\n\n useReferenceGroupToggleStyles_unstable(state);\n return renderReferenceGroupToggle_unstable(state);\n});\n\nReferenceGroupToggle.displayName = 'ReferenceGroupToggle';\n"],"names":["React","useReferenceGroupToggle_unstable","renderReferenceGroupToggle_unstable","useReferenceGroupToggleStyles_unstable","ReferenceGroupToggle","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,gCAAgC,QAAQ,4BAA4B;AAC7E,SAASC,mCAAmC,QAAQ,+BAA+B;AACnF,SAASC,sCAAsC,QAAQ,yCAAyC;AAIhG,iGAAiG,GACjG,OAAO,MAAMC,qCAAuEJ,MAAMK,UAAU,CAAC,CAACC,OAAOC;IAC3G,MAAMC,QAAQP,iCAAiCK,OAAOC;IAEtDJ,uCAAuCK;IACvC,OAAON,oCAAoCM;AAC7C,GAAG;AAEHJ,qBAAqBK,WAAW,GAAG"}
|
|
@@ -3,7 +3,7 @@ import { useReferenceList_unstable } from './useReferenceList';
|
|
|
3
3
|
import { renderReferenceList_unstable } from './renderReferenceList';
|
|
4
4
|
import { useReferenceListStyles_unstable } from './useReferenceListStyles.styles';
|
|
5
5
|
import { useCustomStyleHook } from '@fluentui-copilot/react-provider';
|
|
6
|
-
|
|
6
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
7
7
|
export const ReferenceList = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
8
8
|
const state = useReferenceList_unstable(props, ref);
|
|
9
9
|
useReferenceListStyles_unstable(state);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReferenceList_unstable } from './useReferenceList';\nimport { renderReferenceList_unstable } from './renderReferenceList';\nimport { useReferenceListStyles_unstable } from './useReferenceListStyles.styles';\nimport type { ReferenceListProps } from './ReferenceList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n
|
|
1
|
+
{"version":3,"sources":["ReferenceList.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReferenceList_unstable } from './useReferenceList';\nimport { renderReferenceList_unstable } from './renderReferenceList';\nimport { useReferenceListStyles_unstable } from './useReferenceListStyles.styles';\nimport type { ReferenceListProps } from './ReferenceList.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/** deprecated Use ReferenceListV2 component, hooks and types instead. */\nexport const ReferenceList: ForwardRefComponent<ReferenceListProps> = React.forwardRef((props, ref) => {\n const state = useReferenceList_unstable(props, ref);\n\n useReferenceListStyles_unstable(state);\n useCustomStyleHook('useReferenceListStyles')(state);\n\n return renderReferenceList_unstable(state);\n});\n\nReferenceList.displayName = 'ReferenceList';\n"],"names":["React","useReferenceList_unstable","renderReferenceList_unstable","useReferenceListStyles_unstable","useCustomStyleHook","ReferenceList","forwardRef","props","ref","state","displayName"],"rangeMappings":";;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,yBAAyB,QAAQ,qBAAqB;AAC/D,SAASC,4BAA4B,QAAQ,wBAAwB;AACrE,SAASC,+BAA+B,QAAQ,kCAAkC;AAGlF,SAASC,kBAAkB,QAAQ,mCAAmC;AAEtE,uEAAuE,GACvE,OAAO,MAAMC,8BAAyDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQR,0BAA0BM,OAAOC;IAE/CL,gCAAgCM;IAChCL,mBAAmB,0BAA0BK;IAE7C,OAAOP,6BAA6BO;AACtC,GAAG;AAEHJ,cAAcK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type ReferenceListSlots = {\n /**\n * The root slot.\n */\n root: Slot<'ol'>;\n};\n\n
|
|
1
|
+
{"version":3,"sources":["ReferenceList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\n/** deprecated Use ReferenceListV2 component, hooks and types instead. */\nexport type ReferenceListSlots = {\n /**\n * The root slot.\n */\n root: Slot<'ol'>;\n};\n\n/** deprecated Use ReferenceListV2 component, hooks and types instead. */\nexport type ReferenceListProps = ComponentProps<ReferenceListSlots>;\n\n/** deprecated Use ReferenceListV2 component, hooks and types instead. */\nexport type ReferenceListState = ComponentState<ReferenceListSlots>;\n"],"names":[],"rangeMappings":"","mappings":"AAaA,uEAAuE,GACvE,WAAoE"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
2
|
import { assertSlots } from '@fluentui/react-components';
|
|
3
|
-
/**
|
|
4
|
-
* Render the final JSX of ReferenceList
|
|
5
|
-
*/
|
|
3
|
+
/** deprecated Use ReferenceListV2 component, hooks and types instead. */
|
|
6
4
|
export const renderReferenceList_unstable = state => {
|
|
7
5
|
assertSlots(state);
|
|
8
6
|
return /*#__PURE__*/_jsx(state.root, {});
|
|
@@ -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 { assertSlots } from '@fluentui/react-components';\nimport type { ReferenceListState, ReferenceListSlots } from './ReferenceList.types';\n\n/** deprecated Use ReferenceListV2 component, hooks and types instead. */\nexport const renderReferenceList_unstable = (state: ReferenceListState) => {\n assertSlots<ReferenceListSlots>(state);\n\n return <state.root />;\n};\n"],"names":["assertSlots","renderReferenceList_unstable","state","root"],"rangeMappings":";;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,6BAA6B;AAGzD,uEAAuE,GACvE,OAAO,MAAMC,+BAA+B,CAACC;IAC3CF,YAAgCE;IAEhC,qBAAO,KAACA,MAAMC,IAAI;AACpB,EAAE"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getIntrinsicElementProps, slot } from '@fluentui/react-components';
|
|
3
3
|
import { referenceListItemClassName } from './useReferenceListStyles.styles';
|
|
4
|
-
// If you add JSX to this file, be sure to change the file type to .tsx
|
|
5
4
|
/**
|
|
6
5
|
* Create the state required to render ReferenceList.
|
|
7
6
|
*
|
|
@@ -10,6 +9,8 @@ import { referenceListItemClassName } from './useReferenceListStyles.styles';
|
|
|
10
9
|
*
|
|
11
10
|
* @param props - props from this instance of ReferenceList
|
|
12
11
|
* @param ref - reference to root HTMLElement of ReferenceList
|
|
12
|
+
*
|
|
13
|
+
* deprecated Use ReferenceListV2 component, hooks and types instead.
|
|
13
14
|
*/
|
|
14
15
|
export const useReferenceList_unstable = (props, ref) => {
|
|
15
16
|
return {
|