@fluentui-copilot/react-reference 0.12.3 → 0.13.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 +42 -1
- package/CHANGELOG.md +14 -2
- package/dist/index.d.ts +15 -107
- package/lib/components/Reference/useReferenceStyles.styles.js +64 -37
- package/lib/components/Reference/useReferenceStyles.styles.js.map +1 -1
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js +2 -2
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/ReferenceList.types.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/renderReferenceList.js +4 -0
- package/lib/components/reference-v2/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceList.js +4 -1
- package/lib/components/reference-v2/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.js +99 -83
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js +2 -3
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.types.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js +2 -0
- package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js +4 -2
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js.map +1 -1
- package/package.json +10 -10
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,48 @@
|
|
|
2
2
|
"name": "@fluentui-copilot/react-reference",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Wed, 21 Aug 2024 00:24:50 GMT",
|
|
6
|
+
"tag": "@fluentui-copilot/react-reference_v0.13.0",
|
|
7
|
+
"version": "0.13.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
12
|
+
"package": "@fluentui-copilot/react-reference",
|
|
13
|
+
"commit": "6ce23774f5f2055977299510e8df454d86a1a313",
|
|
14
|
+
"comment": "chore: Removing shorthands' usage now that griffel supports them."
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "Humberto.Morimoto@microsoft.com",
|
|
18
|
+
"package": "@fluentui-copilot/react-reference",
|
|
19
|
+
"commit": "907c63c4da894b41cad4601b30e0df6d9f269056",
|
|
20
|
+
"comment": "chore: Bumping versions of @fluentui/* and @griffel/* packages to latest (corresponding to version 9.54.8 of @fluentui/react-components)."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "ololubek@microsoft.com",
|
|
24
|
+
"package": "@fluentui-copilot/react-reference",
|
|
25
|
+
"commit": "0a6327b6b174fc99abed7fa70ed0542e698bcf40",
|
|
26
|
+
"comment": "chore: bump react-components version to 9.54.10."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "humbertomakotomorimoto@gmail.com",
|
|
30
|
+
"package": "@fluentui-copilot/react-reference",
|
|
31
|
+
"commit": "b2c628b1cb2f6bfb26313bbca4a35c2b586816b0",
|
|
32
|
+
"comment": "feat: Adding minVisibleReferences prop to ReferenceList that controls how many references to always show before overflowing."
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"none": [
|
|
36
|
+
{
|
|
37
|
+
"author": "tristan.watanabe@gmail.com",
|
|
38
|
+
"package": "@fluentui-copilot/react-reference",
|
|
39
|
+
"commit": "85fc7f2580c8bad8ea04e2c73960204b4ca1c116",
|
|
40
|
+
"comment": "chore: update api.md file."
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"date": "Mon, 05 Aug 2024 19:36:41 GMT",
|
|
6
47
|
"tag": "@fluentui-copilot/react-reference_v0.12.3",
|
|
7
48
|
"version": "0.12.3",
|
|
8
49
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
1
|
# Change Log - @fluentui-copilot/react-reference
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 21 Aug 2024 00:24:50 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [0.13.0](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.13.0)
|
|
8
|
+
|
|
9
|
+
Wed, 21 Aug 2024 00:24:50 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.12.3..@fluentui-copilot/react-reference_v0.13.0)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- chore: Removing shorthands' usage now that griffel supports them. ([PR #1994](https://github.com/microsoft/fluentai/pull/1994) by Humberto.Morimoto@microsoft.com)
|
|
15
|
+
- chore: Bumping versions of @fluentui/* and @griffel/* packages to latest (corresponding to version 9.54.8 of @fluentui/react-components). ([PR #1993](https://github.com/microsoft/fluentai/pull/1993) by Humberto.Morimoto@microsoft.com)
|
|
16
|
+
- chore: bump react-components version to 9.54.10. ([PR #2018](https://github.com/microsoft/fluentai/pull/2018) by ololubek@microsoft.com)
|
|
17
|
+
- feat: Adding minVisibleReferences prop to ReferenceList that controls how many references to always show before overflowing. ([PR #2004](https://github.com/microsoft/fluentai/pull/2004) by humbertomakotomorimoto@gmail.com)
|
|
18
|
+
|
|
7
19
|
## [0.12.3](https://github.com/microsoft/fluentai/tree/@fluentui-copilot/react-reference_v0.12.3)
|
|
8
20
|
|
|
9
|
-
Mon, 05 Aug 2024 19:36:
|
|
21
|
+
Mon, 05 Aug 2024 19:36:41 GMT
|
|
10
22
|
[Compare changes](https://github.com/microsoft/fluentai/compare/@fluentui-copilot/react-reference_v0.12.2..@fluentui-copilot/react-reference_v0.12.3)
|
|
11
23
|
|
|
12
24
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -5,15 +5,17 @@ import type { ComponentProps } from '@fluentui/react-components';
|
|
|
5
5
|
import type { ComponentState } from '@fluentui/react-components';
|
|
6
6
|
import type { Context } from '@fluentui/react-context-selector';
|
|
7
7
|
import type { ContextSelector } from '@fluentui/react-context-selector';
|
|
8
|
+
import type { CopilotMode } from '@fluentui-copilot/react-provider';
|
|
8
9
|
import { FC } from 'react';
|
|
9
10
|
import type { ForwardRefComponent } from '@fluentui/react-components';
|
|
10
|
-
import type {
|
|
11
|
-
import type {
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
11
|
+
import type { PreviewHeaderProps } from '@fluentui-copilot/react-preview';
|
|
12
|
+
import type { PreviewMetadataProps } from '@fluentui-copilot/react-preview';
|
|
13
|
+
import type { PreviewProps } from '@fluentui-copilot/react-preview';
|
|
14
|
+
import type { PreviewSurfaceProps } from '@fluentui-copilot/react-preview';
|
|
14
15
|
import { Provider } from 'react';
|
|
15
16
|
import { ProviderProps } from 'react';
|
|
16
17
|
import * as React_2 from 'react';
|
|
18
|
+
import type { SensitivityLabelProps } from '@fluentui-copilot/react-sensitivity-label';
|
|
17
19
|
import type { Slot } from '@fluentui/react-components';
|
|
18
20
|
import type { SlotClassNames } from '@fluentui/react-components';
|
|
19
21
|
|
|
@@ -50,10 +52,6 @@ export declare type CitationState = ComponentState<CitationSlots> & Required<Pic
|
|
|
50
52
|
isPopoverLocked: boolean;
|
|
51
53
|
};
|
|
52
54
|
|
|
53
|
-
declare type CopilotMode = {
|
|
54
|
-
mode?: 'canvas' | 'sidecar';
|
|
55
|
-
};
|
|
56
|
-
|
|
57
55
|
/**
|
|
58
56
|
* Function to generate a Citation - Reference pair with correctly wired props.
|
|
59
57
|
* Both the Citation and the Reference act as trigger components to Previews that are also correctly wired by the function.
|
|
@@ -102,70 +100,6 @@ export declare type PackagedReferenceV2 = React_2.FC<ReferenceV2Props>;
|
|
|
102
100
|
|
|
103
101
|
declare type PartialReferenceProps = 'citationHref' | 'index' | 'referenceId';
|
|
104
102
|
|
|
105
|
-
/**
|
|
106
|
-
* PreviewHeader Props
|
|
107
|
-
*/
|
|
108
|
-
declare type PreviewHeaderProps = ComponentProps<Partial<PreviewHeaderSlots>>;
|
|
109
|
-
|
|
110
|
-
declare type PreviewHeaderSlots = {
|
|
111
|
-
root: NonNullable<Slot<'div'>>;
|
|
112
|
-
/**
|
|
113
|
-
* Actions slot.
|
|
114
|
-
*/
|
|
115
|
-
actions: Slot<'div'>;
|
|
116
|
-
/**
|
|
117
|
-
* Citation slot. Displays a `Citation`. Set to `null` to hide the citation.
|
|
118
|
-
*/
|
|
119
|
-
citation: Slot<'span'>;
|
|
120
|
-
/**
|
|
121
|
-
* Label slot. Primary description of the preview.
|
|
122
|
-
*/
|
|
123
|
-
label: NonNullable<Slot<'span'>>;
|
|
124
|
-
/**
|
|
125
|
-
* Media slot. Used to display Avatars, Icons, etc.
|
|
126
|
-
*/
|
|
127
|
-
media: Slot<'div'>;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* PreviewMetadata Props
|
|
132
|
-
*/
|
|
133
|
-
declare type PreviewMetadataProps = ComponentProps<Partial<PreviewMetadataSlots>>;
|
|
134
|
-
|
|
135
|
-
declare type PreviewMetadataSlots = {
|
|
136
|
-
root: Slot<'div'>;
|
|
137
|
-
/**
|
|
138
|
-
* Icon slot in the metadata displayed after all text.
|
|
139
|
-
*/
|
|
140
|
-
icon: Slot<'span'>;
|
|
141
|
-
/**
|
|
142
|
-
* First text displayed in the metadata.
|
|
143
|
-
*/
|
|
144
|
-
primaryText: Slot<'span'>;
|
|
145
|
-
/**
|
|
146
|
-
* Second text displayed in the metadata.
|
|
147
|
-
*/
|
|
148
|
-
secondaryText: Slot<'span'>;
|
|
149
|
-
/**
|
|
150
|
-
* Third text displayed in the metadata.
|
|
151
|
-
*/
|
|
152
|
-
tertiaryText: Slot<'span'>;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
/**
|
|
156
|
-
* Preview Props
|
|
157
|
-
*/
|
|
158
|
-
declare type PreviewProps = Omit<PopoverProps, 'mouseLeaveDelay' | 'openOnHover'>;
|
|
159
|
-
|
|
160
|
-
declare const PreviewSurface: ForwardRefComponent<PreviewSurfaceProps>;
|
|
161
|
-
|
|
162
|
-
/**
|
|
163
|
-
* PreviewSurface Props
|
|
164
|
-
*/
|
|
165
|
-
declare type PreviewSurfaceProps = ComponentProps<PreviewSurfaceSlots> & PopoverSurfaceProps & {};
|
|
166
|
-
|
|
167
|
-
declare type PreviewSurfaceSlots = PopoverSurfaceSlots & {};
|
|
168
|
-
|
|
169
103
|
/** deprecated Use ReferenceV2 component, hooks and types instead. */
|
|
170
104
|
export declare const Reference: ForwardRefComponent<ReferenceProps>;
|
|
171
105
|
|
|
@@ -270,9 +204,17 @@ export declare type ReferenceListV2Props = ComponentProps<ReferenceListV2Slots>
|
|
|
270
204
|
* The maximum number of references to display before the overflow button is shown even if there is
|
|
271
205
|
* enough space available to show more.
|
|
272
206
|
* If not set, the overflow functionality will be disabled.
|
|
207
|
+
* If this value is less than `minVisibleReferences`, then `minVisibleReferences` will take precedence.
|
|
273
208
|
* @default undefined
|
|
274
209
|
*/
|
|
275
210
|
maxVisibleReferences?: number;
|
|
211
|
+
/**
|
|
212
|
+
* The minimum number of references to always show before overflowing.
|
|
213
|
+
* If this value exceeds the number of references, the overflow functionality will be disabled.
|
|
214
|
+
* If this value is greater than `maxVisibleReferences`, then this will take precedence.
|
|
215
|
+
* @default undefined
|
|
216
|
+
*/
|
|
217
|
+
minVisibleReferences?: number;
|
|
276
218
|
};
|
|
277
219
|
|
|
278
220
|
export declare type ReferenceListV2Slots = {
|
|
@@ -284,7 +226,7 @@ export declare type ReferenceListV2Slots = {
|
|
|
284
226
|
showLessButton?: Slot<'span'>;
|
|
285
227
|
};
|
|
286
228
|
|
|
287
|
-
export declare type ReferenceListV2State = ComponentState<ReferenceListV2Slots> & Pick<ReferenceListV2Props, 'maxVisibleReferences'> & {
|
|
229
|
+
export declare type ReferenceListV2State = ComponentState<ReferenceListV2Slots> & Pick<ReferenceListV2Props, 'maxVisibleReferences' | 'minVisibleReferences'> & {
|
|
288
230
|
areReferencesExpanded: boolean;
|
|
289
231
|
overflowButtonTriggeredViaKeyboard: React.MutableRefObject<boolean>;
|
|
290
232
|
referenceListRef: React.RefObject<HTMLDivElement>;
|
|
@@ -461,40 +403,6 @@ export declare const renderReferenceOverflowButton_unstable: (state: ReferenceOv
|
|
|
461
403
|
|
|
462
404
|
export declare const renderReferenceV2_unstable: (state: ReferenceV2State) => JSX.Element;
|
|
463
405
|
|
|
464
|
-
/**
|
|
465
|
-
* SensitivityLabel Props
|
|
466
|
-
*/
|
|
467
|
-
declare type SensitivityLabelProps = ComponentProps<SensitivityLabelSlots> & {
|
|
468
|
-
description: string;
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
declare type SensitivityLabelSlots = {
|
|
472
|
-
root: Slot<'span'>;
|
|
473
|
-
label?: Slot<'span'>;
|
|
474
|
-
tooltip?: Slot<typeof SensitivityTooltip>;
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
declare const SensitivityTooltip: ForwardRefComponent<SensitivityTooltipProps>;
|
|
478
|
-
|
|
479
|
-
/**
|
|
480
|
-
* SensitivityTooltip Props
|
|
481
|
-
*/
|
|
482
|
-
declare type SensitivityTooltipProps = ComponentProps<SensitivityTooltipSlots> & {
|
|
483
|
-
positioning?: PositioningShorthand;
|
|
484
|
-
/**
|
|
485
|
-
* Prop to display a backplate behind the tooltip
|
|
486
|
-
*/
|
|
487
|
-
withBackplate?: boolean;
|
|
488
|
-
};
|
|
489
|
-
|
|
490
|
-
declare type SensitivityTooltipSlots = {
|
|
491
|
-
root: Slot<'span'>;
|
|
492
|
-
heading?: Slot<'span'>;
|
|
493
|
-
message?: Slot<'span'>;
|
|
494
|
-
previewSurface?: Slot<typeof PreviewSurface>;
|
|
495
|
-
trigger?: Slot<'span'>;
|
|
496
|
-
};
|
|
497
|
-
|
|
498
406
|
/**
|
|
499
407
|
* Create the state required to render Citation.
|
|
500
408
|
*
|
|
@@ -28,10 +28,11 @@ const useStyles = __styles({
|
|
|
28
28
|
canvas: {},
|
|
29
29
|
sidecar: {
|
|
30
30
|
wkccdc: "f2e0fxj",
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
Byoj8tv: 0,
|
|
32
|
+
uwmqm3: 0,
|
|
33
|
+
z189sj: 0,
|
|
34
|
+
z8tnut: 0,
|
|
35
|
+
B0ocmuz: "f1v65gcw"
|
|
35
36
|
},
|
|
36
37
|
inline: {},
|
|
37
38
|
popover: {
|
|
@@ -40,25 +41,28 @@ const useStyles = __styles({
|
|
|
40
41
|
Bn0qgzm: "f136mcbi",
|
|
41
42
|
ibv6hh: ["ffbvwxd", "f1orqat1"],
|
|
42
43
|
a9b677: "f1uniyfe",
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
Byoj8tv: 0,
|
|
45
|
+
uwmqm3: 0,
|
|
46
|
+
z189sj: 0,
|
|
47
|
+
z8tnut: 0,
|
|
48
|
+
B0ocmuz: "f1c5fvqg"
|
|
47
49
|
},
|
|
48
50
|
closed: {
|
|
49
51
|
Belr9w4: "f1sff6ri"
|
|
50
52
|
},
|
|
51
53
|
citation: {
|
|
52
|
-
|
|
53
|
-
Br312pm:
|
|
54
|
-
nk6f5a:
|
|
55
|
-
|
|
54
|
+
Bw0ie65: 0,
|
|
55
|
+
Br312pm: 0,
|
|
56
|
+
nk6f5a: 0,
|
|
57
|
+
Ijaq50: 0,
|
|
58
|
+
Bq1tomu: "f4z8xh6"
|
|
56
59
|
},
|
|
57
60
|
media: {
|
|
58
|
-
|
|
59
|
-
Br312pm:
|
|
60
|
-
nk6f5a:
|
|
61
|
-
|
|
61
|
+
Bw0ie65: 0,
|
|
62
|
+
Br312pm: 0,
|
|
63
|
+
nk6f5a: 0,
|
|
64
|
+
Ijaq50: 0,
|
|
65
|
+
Bq1tomu: "fujjg13",
|
|
62
66
|
mc9l5x: "f22iagw",
|
|
63
67
|
Bt984gj: "f122n59",
|
|
64
68
|
Brf1p80: "f4d9j23"
|
|
@@ -70,10 +74,11 @@ const useStyles = __styles({
|
|
|
70
74
|
vf399t: "f1ojxjpn"
|
|
71
75
|
},
|
|
72
76
|
actions: {
|
|
77
|
+
Bw0ie65: 0,
|
|
78
|
+
Br312pm: 0,
|
|
79
|
+
nk6f5a: 0,
|
|
73
80
|
Ijaq50: "f16hsg94",
|
|
74
|
-
|
|
75
|
-
nk6f5a: "fh3uimt",
|
|
76
|
-
Bw0ie65: "fnh4yke",
|
|
81
|
+
Bq1tomu: "fceb517",
|
|
77
82
|
Bdqf98w: "f1a7i8kp",
|
|
78
83
|
mc9l5x: "f22iagw"
|
|
79
84
|
},
|
|
@@ -81,18 +86,20 @@ const useStyles = __styles({
|
|
|
81
86
|
D5xksd: "fzmnlw3"
|
|
82
87
|
},
|
|
83
88
|
sensitivity: {
|
|
84
|
-
|
|
85
|
-
Br312pm:
|
|
86
|
-
nk6f5a:
|
|
87
|
-
|
|
89
|
+
Bw0ie65: 0,
|
|
90
|
+
Br312pm: 0,
|
|
91
|
+
nk6f5a: 0,
|
|
92
|
+
Ijaq50: 0,
|
|
93
|
+
Bq1tomu: "fw0kx7a",
|
|
88
94
|
Bdqf98w: "fsxvdwy"
|
|
89
95
|
},
|
|
90
96
|
metadata: {
|
|
91
97
|
B6of3ja: "fww94b8",
|
|
92
|
-
|
|
93
|
-
Br312pm:
|
|
94
|
-
nk6f5a:
|
|
95
|
-
|
|
98
|
+
Bw0ie65: 0,
|
|
99
|
+
Br312pm: 0,
|
|
100
|
+
nk6f5a: 0,
|
|
101
|
+
Ijaq50: 0,
|
|
102
|
+
Bq1tomu: "f14r5tnm",
|
|
96
103
|
Bahqtrf: "fk6fouc",
|
|
97
104
|
Be2twd7: "f13mqy1h",
|
|
98
105
|
Bhrd7zp: "figsok6",
|
|
@@ -120,10 +127,11 @@ const useStyles = __styles({
|
|
|
120
127
|
},
|
|
121
128
|
content: {
|
|
122
129
|
B6of3ja: "fww94b8",
|
|
123
|
-
|
|
124
|
-
Br312pm:
|
|
125
|
-
nk6f5a:
|
|
126
|
-
|
|
130
|
+
Bw0ie65: 0,
|
|
131
|
+
Br312pm: 0,
|
|
132
|
+
nk6f5a: 0,
|
|
133
|
+
Ijaq50: 0,
|
|
134
|
+
Bq1tomu: "fqi5tbq",
|
|
127
135
|
mc9l5x: "f22iagw",
|
|
128
136
|
Beiy3e4: "f1vx9l62",
|
|
129
137
|
Belr9w4: "f1wn3y0l",
|
|
@@ -134,14 +142,31 @@ const useStyles = __styles({
|
|
|
134
142
|
mc9l5x: "fjseox"
|
|
135
143
|
}
|
|
136
144
|
}, {
|
|
137
|
-
d: [".f2e0fxj{grid-template-rows:24px auto auto auto;}", ".
|
|
145
|
+
d: [".f2e0fxj{grid-template-rows:24px auto auto auto;}", [".f1v65gcw{padding:var(--spacingVerticalXS) var(--spacingHorizontalS);}", {
|
|
146
|
+
p: -1
|
|
147
|
+
}], ".f1pit55b{border-top-width:0px;}", ".f1orqat1{border-right-width:0px;}", ".ffbvwxd{border-left-width:0px;}", ".f136mcbi{border-bottom-width:0px;}", ".f1uniyfe{width:calc(256px - (var(--spacingHorizontalM) * 2));}", [".f1c5fvqg{padding:0px;}", {
|
|
148
|
+
p: -1
|
|
149
|
+
}], ".f1sff6ri{row-gap:0;}", [".f4z8xh6{grid-area:citation;}", {
|
|
150
|
+
p: -1
|
|
151
|
+
}], [".fujjg13{grid-area:media;}", {
|
|
152
|
+
p: -1
|
|
153
|
+
}], ".f22iagw{display:flex;}", ".f122n59{align-items:center;}", ".f4d9j23{justify-content:center;}", ".fjw5fx7{width:16px;}", ".fd461yt{height:16px;}", ".fe9dio4>.fai-Reference__mediaChild{width:16px;}", ".f1ojxjpn>.fai-Reference__mediaChild{height:16px;}", [".fceb517{grid-area:actions;}", {
|
|
154
|
+
p: -1
|
|
155
|
+
}], ".f1a7i8kp{justify-self:end;}", ".f16hsg94{grid-row-start:1;}", ".fzmnlw3>fui-Button__icon{color:var(--colorNeutralForeground3);}", [".fw0kx7a{grid-area:sensitivityLabel;}", {
|
|
156
|
+
p: -1
|
|
157
|
+
}], ".fsxvdwy{justify-self:start;}", ".fww94b8{margin-top:var(--spacingVerticalXS);}", [".f14r5tnm{grid-area:metadata;}", {
|
|
158
|
+
p: -1
|
|
159
|
+
}], ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f13mqy1h{font-size:var(--fontSizeBase100);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fcpl73t{line-height:var(--lineHeightBase100);}", ".f10pi13n{position:relative;}", ".foyynoy{margin-left:var(--spacingHorizontalS);}", ".f1vcna3q{margin-right:var(--spacingHorizontalS);}", ".f1wl9k8s::before{content:\"\";}", ".f1aocrix::before{display:block;}", ".f1j7ml58::before{position:absolute;}", ".f1s1fjay::before{left:calc(var(--spacingHorizontalS) / -2);}", ".f15a459s::before{right:calc(var(--spacingHorizontalS) / -2);}", ".f1wl9tmt::before{top:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);}", ".f8pn7wt::before{height:var(--fontSizeBase100);}", ".f1x8pvcy::before{border-left-width:var(--strokeWidthThin);}", ".f9sc749::before{border-right-width:var(--strokeWidthThin);}", ".f1jpmc5p::before{border-left-style:solid;}", ".f1yq6w5o::before{border-right-style:solid;}", ".fjml6kk::before{border-left-color:var(--colorNeutralStroke2);}", ".f1geml7w::before{border-right-color:var(--colorNeutralStroke2);}", ".fmrv4ls{vertical-align:middle;}", [".fqi5tbq{grid-area:content;}", {
|
|
160
|
+
p: -1
|
|
161
|
+
}], ".f1vx9l62{flex-direction:column;}", ".f1wn3y0l{row-gap:var(--spacingVerticalS);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".f9ijwd5{word-break:break-word;}", ".fjseox{display:none;}"]
|
|
138
162
|
});
|
|
139
163
|
const useLabelStyles = __styles({
|
|
140
164
|
root: {
|
|
141
|
-
|
|
142
|
-
Br312pm:
|
|
143
|
-
nk6f5a:
|
|
144
|
-
|
|
165
|
+
Bw0ie65: 0,
|
|
166
|
+
Br312pm: 0,
|
|
167
|
+
nk6f5a: 0,
|
|
168
|
+
Ijaq50: 0,
|
|
169
|
+
Bq1tomu: "f1m7hl8e",
|
|
145
170
|
qb2dma: "f9h729m",
|
|
146
171
|
Bahqtrf: "fk6fouc",
|
|
147
172
|
Be2twd7: "fy9rknc",
|
|
@@ -164,7 +189,9 @@ const useLabelStyles = __styles({
|
|
|
164
189
|
Bh9c35c: "fvvof4m"
|
|
165
190
|
}
|
|
166
191
|
}, {
|
|
167
|
-
d: [".
|
|
192
|
+
d: [[".f1m7hl8e{grid-area:title;}", {
|
|
193
|
+
p: -1
|
|
194
|
+
}], ".f9h729m{align-self:start;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f9ijwd5{word-break:break-word;}", ".fpfc2by{-webkit-box-orient:vertical;}", ".f1lvsx7g{-webkit-line-clamp:2;}", ".f1rvi9lw{display:-webkit-box;}", ".f1sil6mw{overflow-y:hidden;}", ".f1vd4pcd{padding-top:calc((24px / 2 ) - (var(--lineHeightBase200) - var(--fontSizeBase200)));}", ".f1u9e4k4{padding-top:calc((16px / 2 ) - (var(--lineHeightBase200) - var(--fontSizeBase200)));}", ".f6dzj5z{max-width:100%;}", ".fvvof4m{-webkit-line-clamp:1;}"]
|
|
168
195
|
});
|
|
169
196
|
/**
|
|
170
197
|
* Apply styling to the Reference slots based on the state
|
|
@@ -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\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,CAAC,EAAEhC,OAAOiC,eAAe,CAAC,OAAO,EAAEjC,OAAOkC,mBAAmB,CAAC,CAAC;IACvEC,cAAcnC,OAAOoC,kBAAkB;IACvCC,SAAS,CAAC,EAAErC,OAAOsC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AAoBY,OAAO,EAC3BwE,OAAOxE,OAAO,EACd,CAACoE,cAAcI,OAAOZ,MAAM,EAC5BO,MAAMnE,OAAO,CAAC0E,SAAS;IAGzB,IAAIP,MAAMlE,aAAa,EAAE;QACvBkE,MAAMlE,aAAa,CAACyE,SAAS,GAAG1F,aAC9BI,oBAAoBa,aAAa,EACjCuE,OAAOvE,aAAa,EACpBkE,MAAMlE,aAAa,CAACyE,SAAS;IAEjC;IAEA,OAAOP;AACT,EAAE"}
|
|
1
|
+
{"version":3,"sources":["useReferenceStyles.styles.ts"],"sourcesContent":["import {\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 padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n },\n inline: {},\n popover: {\n ...shorthands.borderWidth('0px'),\n width: `calc(${maxPopoverWidth} - (${tokens.spacingHorizontalM} * 2))`,\n padding: '0px',\n },\n closed: {\n rowGap: 0,\n },\n citation: {\n gridArea: 'citation',\n },\n media: {\n gridArea: 'media',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mediaPopover: {\n width: '16px',\n height: '16px',\n\n [`> .${referenceExtraClassNames.mediaChild}`]: {\n width: '16px',\n height: '16px',\n },\n },\n actions: {\n gridArea: 'actions',\n justifySelf: 'end',\n display: 'flex',\n gridRowStart: 1,\n },\n detailsButton: {\n [`> ${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground3,\n },\n },\n sensitivity: {\n gridArea: 'sensitivityLabel',\n justifySelf: 'start',\n },\n metadata: {\n marginTop: tokens.spacingVerticalXS,\n\n gridArea: 'metadata',\n ...typographyStyles.caption2,\n },\n metadataSubsequentText: {\n position: 'relative',\n marginLeft: tokens.spacingHorizontalS,\n\n '&::before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n left: `calc(${tokens.spacingHorizontalS} / -2)`,\n top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,\n height: typographyStyles.caption2.fontSize,\n ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n },\n icon: {\n ...typographyStyles.caption2,\n verticalAlign: 'middle',\n },\n content: {\n marginTop: tokens.spacingVerticalXS,\n gridArea: 'content',\n display: 'flex',\n flexDirection: 'column',\n rowGap: tokens.spacingVerticalS,\n color: tokens.colorNeutralForeground3,\n wordBreak: 'break-word',\n },\n hidden: {\n display: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n root: {\n gridArea: 'title',\n alignSelf: 'start',\n ...typographyStyles.caption1Strong,\n wordBreak: 'break-word',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n display: '-webkit-box',\n overflowY: 'hidden',\n },\n\n canvas: {\n // 24px is the height of the tallest element within the reference\n paddingTop: `calc((24px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n sidecar: {\n // 16px is the height of the tallest element within the reference\n paddingTop: `calc((16px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n closed: {\n maxWidth: '100%',\n '-webkit-line-clamp': '1',\n },\n});\n\n/**\n * Apply styling to the Reference slots based on the state\n *\n * deprecated Use ReferenceV2 component, hooks and types instead.\n */\nexport const useReferenceStyles_unstable = (state: ReferenceState): ReferenceState => {\n 'use no memo';\n\n const { isExpanded, mode, layout } = state;\n\n const rootClassName = useReferenceClassName();\n const styles = useStyles();\n const labelStyles = useLabelStyles();\n state.root.className = mergeClasses(\n referenceClassNames.root,\n rootClassName,\n styles[mode],\n styles[layout],\n !isExpanded && styles.closed,\n state.root.className,\n );\n\n if (state.citation) {\n state.citation.className = mergeClasses(referenceClassNames.citation, styles.citation, state.citation.className);\n }\n\n if (state.media) {\n state.media.className = mergeClasses(\n referenceClassNames.media,\n styles.media,\n layout === 'popover' && styles.mediaPopover,\n state.media.className,\n );\n }\n\n if (state.actions) {\n state.actions.className = mergeClasses(referenceClassNames.actions, styles.actions, state.actions.className);\n }\n\n state.label.className = mergeClasses(\n referenceClassNames.label,\n labelStyles.root,\n labelStyles[mode],\n !isExpanded && labelStyles.closed,\n state.label.className,\n );\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n referenceClassNames.sensitivity,\n styles.sensitivity,\n !isExpanded && styles.hidden,\n state.sensitivity.className,\n );\n }\n\n state.metadata.className = mergeClasses(\n referenceClassNames.metadata,\n styles.metadata,\n !isExpanded && styles.hidden,\n state.metadata.className,\n );\n\n let isSubsequentText = false;\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(\n referenceClassNames.primaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.primaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n referenceClassNames.secondaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.secondaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n referenceClassNames.tertiaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.tertiaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(referenceClassNames.icon, styles.icon, state.icon.className);\n }\n state.content.className = mergeClasses(\n referenceClassNames.content,\n styles.content,\n !isExpanded && styles.hidden,\n state.content.className,\n );\n\n if (state.detailsButton) {\n state.detailsButton.className = mergeClasses(\n referenceClassNames.detailsButton,\n styles.detailsButton,\n state.detailsButton.className,\n );\n }\n\n return state;\n};\n"],"names":["buttonClassNames","makeResetStyles","makeStyles","mergeClasses","shorthands","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,mBA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,EAC3BwE,OAAOxE,OAAO,EACd,CAACoE,cAAcI,OAAOZ,MAAM,EAC5BO,MAAMnE,OAAO,CAAC0E,SAAS;IAGzB,IAAIP,MAAMlE,aAAa,EAAE;QACvBkE,MAAMlE,aAAa,CAACyE,SAAS,GAAG1F,aAC9BI,oBAAoBa,aAAa,EACjCuE,OAAOvE,aAAa,EACpBkE,MAAMlE,aAAa,CAACyE,SAAS;IAEjC;IAEA,OAAOP;AACT,EAAE"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { __resetStyles, __styles, mergeClasses,
|
|
1
|
+
import { __resetStyles, __styles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';
|
|
2
2
|
export const referenceGroupToggleClassNames = {
|
|
3
3
|
root: 'fai-ReferenceGroupToggle',
|
|
4
4
|
icon: 'fai-ReferenceGroupToggle__icon'
|
|
5
5
|
};
|
|
6
|
-
const useButtonBaseClassName = __resetStyles("
|
|
6
|
+
const useButtonBaseClassName = __resetStyles("rqbbkgr", null, [".rqbbkgr{display:inline-flex;column-gap:var(--spacingHorizontalSNudge);align-items:center;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);border:0;background-color:var(--colorTransparentBackground);color:var(--colorNeutralForeground3);cursor:pointer;width:max-content;padding:var(--spacingVerticalXS) 0;}"]);
|
|
7
7
|
const useIconBaseClassName = __resetStyles("r18biwo", null, [".r18biwo{display:inline-flex;align-items:center;}"]);
|
|
8
8
|
const useStyles = __styles({
|
|
9
9
|
canvas: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReferenceGroupToggleStyles.styles.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["useReferenceGroupToggleStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ReferenceGroupToggleSlots, ReferenceGroupToggleState } from './ReferenceGroupToggle.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const referenceGroupToggleClassNames: SlotClassNames<ReferenceGroupToggleSlots> = {\n root: 'fai-ReferenceGroupToggle',\n icon: 'fai-ReferenceGroupToggle__icon',\n};\n\nconst useButtonBaseClassName = makeResetStyles({\n display: 'inline-flex',\n columnGap: tokens.spacingHorizontalSNudge,\n alignItems: 'center',\n ...typographyStyles.caption1,\n border: 0,\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground3,\n cursor: 'pointer',\n width: 'max-content',\n padding: `${tokens.spacingVerticalXS} 0`,\n});\n\nconst useIconBaseClassName = makeResetStyles({\n display: 'inline-flex',\n alignItems: 'center',\n});\n\nconst useStyles = makeStyles({\n canvas: { ...typographyStyles.caption1 },\n sidecar: {\n ...typographyStyles.caption2,\n },\n});\n\n/**\n * Apply styling to the ReferenceGroupToggle slots based on the state\n */\nexport const useReferenceGroupToggleStyles_unstable = (state: ReferenceGroupToggleState): ReferenceGroupToggleState => {\n 'use no memo';\n\n const { mode } = state;\n const styles = useStyles();\n\n const iconBaseClassName = useIconBaseClassName();\n const buttonBaseClassName = useButtonBaseClassName();\n state.root.className = mergeClasses(\n referenceGroupToggleClassNames.root,\n buttonBaseClassName,\n styles[mode],\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(referenceGroupToggleClassNames.icon, iconBaseClassName, state.icon.className);\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","typographyStyles","referenceGroupToggleClassNames","root","icon","useButtonBaseClassName","display","columnGap","spacingHorizontalSNudge","alignItems","caption1","border","backgroundColor","colorTransparentBackground","color","colorNeutralForeground3","cursor","width","padding","spacingVerticalXS","useIconBaseClassName","useStyles","canvas","sidecar","caption2","useReferenceGroupToggleStyles_unstable","state","mode","styles","iconBaseClassName","buttonBaseClassName","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,EAAEC,MAAM,EAAEC,gBAAgB,QAAQ,6BAA6B;AAIjH,OAAO,MAAMC,iCAA4E;IACvFC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,MAAMC,yBAAyBR,gBAAgB;IAC7CS,SAAS;IACTC,WAAWP,OAAOQ,uBAAuB;IACzCC,YAAY;IACZ,GAAGR,iBAAiBS,QAAQ;IAC5BC,QAAQ;IACRC,iBAAiBZ,OAAOa,0BAA0B;IAClDC,OAAOd,OAAOe,uBAAuB;IACrCC,QAAQ;IACRC,OAAO;IACPC,SAAS,CAAC,EAAElB,OAAOmB,iBAAiB,CAAC,EAAE,CAAC;AAC1C;AAEA,MAAMC,uBAAuBvB,gBAAgB;IAC3CS,SAAS;IACTG,YAAY;AACd;AAEA,MAAMY,YAAYvB,WAAW;IAC3BwB,QAAQ;QAAE,GAAGrB,iBAAiBS,QAAQ;IAAC;IACvCa,SAAS;QACP,GAAGtB,iBAAiBuB,QAAQ;IAC9B;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,yCAAyC,CAACC;IACrD;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGD;IACjB,MAAME,SAASP;IAEf,MAAMQ,oBAAoBT;IAC1B,MAAMU,sBAAsBzB;IAC5BqB,MAAMvB,IAAI,CAAC4B,SAAS,GAAGhC,aACrBG,+BAA+BC,IAAI,EACnC2B,qBACAF,MAAM,CAACD,KAAK,EACZD,MAAMvB,IAAI,CAAC4B,SAAS;IAGtB,IAAIL,MAAMtB,IAAI,EAAE;QACdsB,MAAMtB,IAAI,CAAC2B,SAAS,GAAGhC,aAAaG,+BAA+BE,IAAI,EAAEyB,mBAAmBH,MAAMtB,IAAI,CAAC2B,SAAS;IAClH;IAEA,OAAOL;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { ReferenceListContextValue } from '../../../contexts/reference-v2/referenceListContext';\n\nexport type ReferenceListSlots = {\n /** The root of the component that contains the list of references. */\n root: NonNullable<Slot<'div'>>;\n\n /** A space containing a button that expands the list of references. This slot is only rendered when the list of references is collapsed. */\n showMoreButton?: Slot<'span'>;\n\n /** A space containing a button that collapses the list of references. This slot is only rendered when the list of references is expanded. */\n showLessButton?: Slot<'span'>;\n};\n\nexport type ReferenceListProps = ComponentProps<ReferenceListSlots> & {\n /**\n * The maximum number of references to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * @default undefined\n */\n maxVisibleReferences?: number;\n};\n\nexport type ReferenceListState = ComponentState<ReferenceListSlots> &\n Pick<ReferenceListProps, 'maxVisibleReferences'> & {\n areReferencesExpanded: boolean;\n overflowButtonTriggeredViaKeyboard: React.MutableRefObject<boolean>;\n referenceListRef: React.RefObject<HTMLDivElement>;\n shouldUseOverflow: boolean;\n totalReferencesCount: number;\n };\n\nexport type ReferenceListContextValues = {\n referenceList: ReferenceListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"
|
|
1
|
+
{"version":3,"sources":["ReferenceList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { ReferenceListContextValue } from '../../../contexts/reference-v2/referenceListContext';\n\nexport type ReferenceListSlots = {\n /** The root of the component that contains the list of references. */\n root: NonNullable<Slot<'div'>>;\n\n /** A space containing a button that expands the list of references. This slot is only rendered when the list of references is collapsed. */\n showMoreButton?: Slot<'span'>;\n\n /** A space containing a button that collapses the list of references. This slot is only rendered when the list of references is expanded. */\n showLessButton?: Slot<'span'>;\n};\n\nexport type ReferenceListProps = ComponentProps<ReferenceListSlots> & {\n /**\n * The maximum number of references to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * If this value is less than `minVisibleReferences`, then `minVisibleReferences` will take precedence.\n * @default undefined\n */\n maxVisibleReferences?: number;\n\n /**\n * The minimum number of references to always show before overflowing.\n * If this value exceeds the number of references, the overflow functionality will be disabled.\n * If this value is greater than `maxVisibleReferences`, then this will take precedence.\n * @default undefined\n */\n minVisibleReferences?: number;\n};\n\nexport type ReferenceListState = ComponentState<ReferenceListSlots> &\n Pick<ReferenceListProps, 'maxVisibleReferences' | 'minVisibleReferences'> & {\n areReferencesExpanded: boolean;\n overflowButtonTriggeredViaKeyboard: React.MutableRefObject<boolean>;\n referenceListRef: React.RefObject<HTMLDivElement>;\n shouldUseOverflow: boolean;\n totalReferencesCount: number;\n };\n\nexport type ReferenceListContextValues = {\n referenceList: ReferenceListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":"AA0CA,WAEE"}
|
|
@@ -6,9 +6,13 @@ import { ReferenceListContextProvider } from '../../../contexts/reference-v2/ref
|
|
|
6
6
|
*/
|
|
7
7
|
export const renderReferenceList_unstable = (state, contextValues) => {
|
|
8
8
|
assertSlots(state);
|
|
9
|
+
const {
|
|
10
|
+
minVisibleReferences
|
|
11
|
+
} = state;
|
|
9
12
|
return /*#__PURE__*/_jsx(ReferenceListContextProvider, {
|
|
10
13
|
value: contextValues.referenceList,
|
|
11
14
|
children: /*#__PURE__*/_jsx(Overflow, {
|
|
15
|
+
minimumVisible: minVisibleReferences,
|
|
12
16
|
children: /*#__PURE__*/_jsxs(state.root, {
|
|
13
17
|
children: [state.root.children, state.showMoreButton && /*#__PURE__*/_jsx(state.showMoreButton, {}), state.showLessButton && /*#__PURE__*/_jsx(state.showLessButton, {})]
|
|
14
18
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderReferenceList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Overflow, assertSlots } from '@fluentui/react-components';\nimport type { ReferenceListState, ReferenceListSlots, ReferenceListContextValues } from './ReferenceList.types';\nimport { ReferenceListContextProvider } from '../../../contexts/reference-v2/referenceListContext';\n\n/**\n * Render the final JSX of ReferenceList\n */\nexport const renderReferenceList_unstable = (state: ReferenceListState, contextValues: ReferenceListContextValues) => {\n assertSlots<ReferenceListSlots>(state);\n\n return (\n <ReferenceListContextProvider value={contextValues.referenceList}>\n <Overflow>\n <state.root>\n {state.root.children}\n {state.showMoreButton && <state.showMoreButton />}\n {state.showLessButton && <state.showLessButton />}\n </state.root>\n </Overflow>\n </ReferenceListContextProvider>\n );\n};\n"],"names":["Overflow","assertSlots","ReferenceListContextProvider","renderReferenceList_unstable","state","contextValues","value","referenceList","root","children","showMoreButton","showLessButton"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["renderReferenceList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Overflow, assertSlots } from '@fluentui/react-components';\nimport type { ReferenceListState, ReferenceListSlots, ReferenceListContextValues } from './ReferenceList.types';\nimport { ReferenceListContextProvider } from '../../../contexts/reference-v2/referenceListContext';\n\n/**\n * Render the final JSX of ReferenceList\n */\nexport const renderReferenceList_unstable = (state: ReferenceListState, contextValues: ReferenceListContextValues) => {\n assertSlots<ReferenceListSlots>(state);\n\n const { minVisibleReferences } = state;\n\n return (\n <ReferenceListContextProvider value={contextValues.referenceList}>\n <Overflow minimumVisible={minVisibleReferences}>\n <state.root>\n {state.root.children}\n {state.showMoreButton && <state.showMoreButton />}\n {state.showLessButton && <state.showLessButton />}\n </state.root>\n </Overflow>\n </ReferenceListContextProvider>\n );\n};\n"],"names":["Overflow","assertSlots","ReferenceListContextProvider","renderReferenceList_unstable","state","contextValues","minVisibleReferences","value","referenceList","minimumVisible","root","children","showMoreButton","showLessButton"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,QAAQ,EAAEC,WAAW,QAAQ,6BAA6B;AAEnE,SAASC,4BAA4B,QAAQ,sDAAsD;AAEnG;;CAEC,GACD,OAAO,MAAMC,+BAA+B,CAACC,OAA2BC;IACtEJ,YAAgCG;IAEhC,MAAM,EAAEE,oBAAoB,EAAE,GAAGF;IAEjC,qBACE,KAACF;QAA6BK,OAAOF,cAAcG,aAAa;kBAC9D,cAAA,KAACR;YAASS,gBAAgBH;sBACxB,cAAA,MAACF,MAAMM,IAAI;;oBACRN,MAAMM,IAAI,CAACC,QAAQ;oBACnBP,MAAMQ,cAAc,kBAAI,KAACR,MAAMQ,cAAc;oBAC7CR,MAAMS,cAAc,kBAAI,KAACT,MAAMS,cAAc;;;;;AAKxD,EAAE"}
|
|
@@ -15,6 +15,7 @@ export const useReferenceList_unstable = (props, ref) => {
|
|
|
15
15
|
const {
|
|
16
16
|
children,
|
|
17
17
|
maxVisibleReferences,
|
|
18
|
+
minVisibleReferences,
|
|
18
19
|
showLessButton,
|
|
19
20
|
showMoreButton,
|
|
20
21
|
...rest
|
|
@@ -27,6 +28,7 @@ export const useReferenceList_unstable = (props, ref) => {
|
|
|
27
28
|
additionalCondition: !areReferencesExpanded,
|
|
28
29
|
children,
|
|
29
30
|
maxVisibleItems: maxVisibleReferences,
|
|
31
|
+
minVisibleItems: minVisibleReferences,
|
|
30
32
|
overflowClassName: styles.overflow
|
|
31
33
|
});
|
|
32
34
|
// We keep track of whether we are interacting with the overflow button via keyboard or not.
|
|
@@ -42,11 +44,12 @@ export const useReferenceList_unstable = (props, ref) => {
|
|
|
42
44
|
const onShowLessButtonClick = React.useCallback(() => {
|
|
43
45
|
setAreReferencesExpanded(false);
|
|
44
46
|
}, []);
|
|
45
|
-
const shouldUseOverflow = maxVisibleReferences !== undefined && !areReferencesExpanded;
|
|
47
|
+
const shouldUseOverflow = (minVisibleReferences === undefined || minVisibleReferences < totalReferencesCount) && maxVisibleReferences !== undefined && !areReferencesExpanded;
|
|
46
48
|
const state = {
|
|
47
49
|
areReferencesExpanded,
|
|
48
50
|
overflowButtonTriggeredViaKeyboard,
|
|
49
51
|
maxVisibleReferences,
|
|
52
|
+
minVisibleReferences,
|
|
50
53
|
referenceListRef,
|
|
51
54
|
shouldUseOverflow,
|
|
52
55
|
totalReferencesCount,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReferenceList.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n mergeCallbacks,\n slot,\n useArrowNavigationGroup,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';\nimport { useRootStyles } from '../Reference/useReferenceStyles.styles';\nimport type { ReferenceListProps, ReferenceListState } from './ReferenceList.types';\n\n/**\n * Create the state required to render ReferenceList.\n *\n * The returned state can be modified with hooks such as useReferenceListStyles_unstable,\n * before being passed to renderReferenceList_unstable.\n *\n * @param props - props from this instance of ReferenceList\n * @param ref - reference to root HTMLElement of ReferenceList\n */\nexport const useReferenceList_unstable = (\n props: ReferenceListProps,\n ref: React.Ref<HTMLDivElement>,\n): ReferenceListState => {\n const { children, maxVisibleReferences, showLessButton, showMoreButton, ...rest } = props;\n\n const [areReferencesExpanded, setAreReferencesExpanded] = React.useState(false);\n const referenceListRef = React.useRef<HTMLDivElement>(null);\n\n const totalReferencesCount = React.Children.count(children);\n const styles = useRootStyles();\n const resolvedChildren = useOverflowMaxVisibleItems({\n additionalCondition: !areReferencesExpanded,\n children,\n maxVisibleItems: maxVisibleReferences,\n overflowClassName: styles.overflow,\n });\n\n // We keep track of whether we are interacting with the overflow button via keyboard or not.\n const overflowButtonTriggeredViaKeyboard = React.useRef(false);\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n memorizeCurrent: true,\n });\n\n const onShowMoreButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(true);\n }, []);\n\n const onShowLessButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(false);\n }, []);\n\n const shouldUseOverflow
|
|
1
|
+
{"version":3,"sources":["useReferenceList.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n mergeCallbacks,\n slot,\n useArrowNavigationGroup,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';\nimport { useRootStyles } from '../Reference/useReferenceStyles.styles';\nimport type { ReferenceListProps, ReferenceListState } from './ReferenceList.types';\n\n/**\n * Create the state required to render ReferenceList.\n *\n * The returned state can be modified with hooks such as useReferenceListStyles_unstable,\n * before being passed to renderReferenceList_unstable.\n *\n * @param props - props from this instance of ReferenceList\n * @param ref - reference to root HTMLElement of ReferenceList\n */\nexport const useReferenceList_unstable = (\n props: ReferenceListProps,\n ref: React.Ref<HTMLDivElement>,\n): ReferenceListState => {\n const { children, maxVisibleReferences, minVisibleReferences, showLessButton, showMoreButton, ...rest } = props;\n\n const [areReferencesExpanded, setAreReferencesExpanded] = React.useState(false);\n const referenceListRef = React.useRef<HTMLDivElement>(null);\n\n const totalReferencesCount = React.Children.count(children);\n const styles = useRootStyles();\n const resolvedChildren = useOverflowMaxVisibleItems({\n additionalCondition: !areReferencesExpanded,\n children,\n maxVisibleItems: maxVisibleReferences,\n minVisibleItems: minVisibleReferences,\n overflowClassName: styles.overflow,\n });\n\n // We keep track of whether we are interacting with the overflow button via keyboard or not.\n const overflowButtonTriggeredViaKeyboard = React.useRef(false);\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n memorizeCurrent: true,\n });\n\n const onShowMoreButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(true);\n }, []);\n\n const onShowLessButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(false);\n }, []);\n\n const shouldUseOverflow =\n (minVisibleReferences === undefined || minVisibleReferences < totalReferencesCount) &&\n maxVisibleReferences !== undefined &&\n !areReferencesExpanded;\n\n const state: ReferenceListState = {\n areReferencesExpanded,\n overflowButtonTriggeredViaKeyboard,\n maxVisibleReferences,\n minVisibleReferences,\n referenceListRef,\n shouldUseOverflow,\n totalReferencesCount,\n\n components: {\n root: 'div',\n showMoreButton: 'span',\n showLessButton: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, referenceListRef),\n ...focusAttributes,\n ...rest,\n children: resolvedChildren,\n }),\n { elementType: 'div' },\n ),\n showMoreButton: shouldUseOverflow ? slot.optional(showMoreButton, { elementType: 'span' }) : undefined,\n showLessButton: areReferencesExpanded ? slot.optional(showLessButton, { elementType: 'span' }) : undefined,\n };\n\n if (state.showMoreButton) {\n state.showMoreButton.onClick = mergeCallbacks(onShowMoreButtonClick, state.showMoreButton.onClick);\n }\n\n if (state.showLessButton) {\n state.showLessButton.onClick = mergeCallbacks(onShowLessButtonClick, state.showLessButton.onClick);\n }\n\n return state;\n};\n"],"names":["React","getIntrinsicElementProps","mergeCallbacks","slot","useArrowNavigationGroup","useMergedRefs","useOverflowMaxVisibleItems","useRootStyles","useReferenceList_unstable","props","ref","children","maxVisibleReferences","minVisibleReferences","showLessButton","showMoreButton","rest","areReferencesExpanded","setAreReferencesExpanded","useState","referenceListRef","useRef","totalReferencesCount","Children","count","styles","resolvedChildren","additionalCondition","maxVisibleItems","minVisibleItems","overflowClassName","overflow","overflowButtonTriggeredViaKeyboard","focusAttributes","axis","circular","memorizeCurrent","onShowMoreButtonClick","useCallback","onShowLessButtonClick","shouldUseOverflow","undefined","state","components","root","always","elementType","optional","onClick"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,cAAc,EACdC,IAAI,EACJC,uBAAuB,EACvBC,aAAa,QACR,6BAA6B;AACpC,SAASC,0BAA0B,QAAQ,oCAAoC;AAC/E,SAASC,aAAa,QAAQ,yCAAyC;AAGvE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AoBrC,KAAK4C,QAAQ,CAAChC,gBAAgB;YAAE+B,aAAa;QAAO,KAAKL;QAC7F3B,gBAAgBG,wBAAwBd,KAAK4C,QAAQ,CAACjC,gBAAgB;YAAEgC,aAAa;QAAO,KAAKL;IACnG;IAEA,IAAIC,MAAM3B,cAAc,EAAE;QACxB2B,MAAM3B,cAAc,CAACiC,OAAO,GAAG9C,eAAemC,uBAAuBK,MAAM3B,cAAc,CAACiC,OAAO;IACnG;IAEA,IAAIN,MAAM5B,cAAc,EAAE;QACxB4B,MAAM5B,cAAc,CAACkC,OAAO,GAAG9C,eAAeqC,uBAAuBG,MAAM5B,cAAc,CAACkC,OAAO;IACnG;IAEA,OAAON;AACT,EAAE"}
|
|
@@ -49,16 +49,11 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
49
49
|
canvas: {},
|
|
50
50
|
sidecar: {
|
|
51
51
|
wkccdc: "f2e0fxj",
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Byoj8tv: "f14wxoun",
|
|
58
|
-
uwmqm3: [
|
|
59
|
-
"f1f5gg8d",
|
|
60
|
-
"f1vdfbxk"
|
|
61
|
-
]
|
|
52
|
+
Byoj8tv: 0,
|
|
53
|
+
uwmqm3: 0,
|
|
54
|
+
z189sj: 0,
|
|
55
|
+
z8tnut: 0,
|
|
56
|
+
B0ocmuz: "f1v65gcw"
|
|
62
57
|
},
|
|
63
58
|
inline: {},
|
|
64
59
|
popover: {
|
|
@@ -73,31 +68,28 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
73
68
|
"f1orqat1"
|
|
74
69
|
],
|
|
75
70
|
a9b677: "f1uniyfe",
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Byoj8tv: "f1ov4xf1",
|
|
82
|
-
uwmqm3: [
|
|
83
|
-
"f1asdtw4",
|
|
84
|
-
"fifp7yv"
|
|
85
|
-
]
|
|
71
|
+
Byoj8tv: 0,
|
|
72
|
+
uwmqm3: 0,
|
|
73
|
+
z189sj: 0,
|
|
74
|
+
z8tnut: 0,
|
|
75
|
+
B0ocmuz: "f1c5fvqg"
|
|
86
76
|
},
|
|
87
77
|
closed: {
|
|
88
78
|
Belr9w4: "f1sff6ri"
|
|
89
79
|
},
|
|
90
80
|
citation: {
|
|
91
|
-
|
|
92
|
-
Br312pm:
|
|
93
|
-
nk6f5a:
|
|
94
|
-
|
|
81
|
+
Bw0ie65: 0,
|
|
82
|
+
Br312pm: 0,
|
|
83
|
+
nk6f5a: 0,
|
|
84
|
+
Ijaq50: 0,
|
|
85
|
+
Bq1tomu: "f4z8xh6"
|
|
95
86
|
},
|
|
96
87
|
media: {
|
|
97
|
-
|
|
98
|
-
Br312pm:
|
|
99
|
-
nk6f5a:
|
|
100
|
-
|
|
88
|
+
Bw0ie65: 0,
|
|
89
|
+
Br312pm: 0,
|
|
90
|
+
nk6f5a: 0,
|
|
91
|
+
Ijaq50: 0,
|
|
92
|
+
Bq1tomu: "fujjg13",
|
|
101
93
|
mc9l5x: "f22iagw",
|
|
102
94
|
Bt984gj: "f122n59",
|
|
103
95
|
Brf1p80: "f4d9j23"
|
|
@@ -109,10 +101,11 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
109
101
|
vf399t: "f1ojxjpn"
|
|
110
102
|
},
|
|
111
103
|
actions: {
|
|
104
|
+
Bw0ie65: 0,
|
|
105
|
+
Br312pm: 0,
|
|
106
|
+
nk6f5a: 0,
|
|
112
107
|
Ijaq50: "f16hsg94",
|
|
113
|
-
|
|
114
|
-
nk6f5a: "fh3uimt",
|
|
115
|
-
Bw0ie65: "fnh4yke",
|
|
108
|
+
Bq1tomu: "fceb517",
|
|
116
109
|
Bdqf98w: "f1a7i8kp",
|
|
117
110
|
mc9l5x: "f22iagw"
|
|
118
111
|
},
|
|
@@ -120,18 +113,20 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
120
113
|
D5xksd: "fzmnlw3"
|
|
121
114
|
},
|
|
122
115
|
sensitivity: {
|
|
123
|
-
|
|
124
|
-
Br312pm:
|
|
125
|
-
nk6f5a:
|
|
126
|
-
|
|
116
|
+
Bw0ie65: 0,
|
|
117
|
+
Br312pm: 0,
|
|
118
|
+
nk6f5a: 0,
|
|
119
|
+
Ijaq50: 0,
|
|
120
|
+
Bq1tomu: "fw0kx7a",
|
|
127
121
|
Bdqf98w: "fsxvdwy"
|
|
128
122
|
},
|
|
129
123
|
metadata: {
|
|
130
124
|
B6of3ja: "fww94b8",
|
|
131
|
-
|
|
132
|
-
Br312pm:
|
|
133
|
-
nk6f5a:
|
|
134
|
-
|
|
125
|
+
Bw0ie65: 0,
|
|
126
|
+
Br312pm: 0,
|
|
127
|
+
nk6f5a: 0,
|
|
128
|
+
Ijaq50: 0,
|
|
129
|
+
Bq1tomu: "f14r5tnm",
|
|
135
130
|
Bahqtrf: "fk6fouc",
|
|
136
131
|
Be2twd7: "f13mqy1h",
|
|
137
132
|
Bhrd7zp: "figsok6",
|
|
@@ -174,10 +169,11 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
174
169
|
},
|
|
175
170
|
content: {
|
|
176
171
|
B6of3ja: "fww94b8",
|
|
177
|
-
|
|
178
|
-
Br312pm:
|
|
179
|
-
nk6f5a:
|
|
180
|
-
|
|
172
|
+
Bw0ie65: 0,
|
|
173
|
+
Br312pm: 0,
|
|
174
|
+
nk6f5a: 0,
|
|
175
|
+
Ijaq50: 0,
|
|
176
|
+
Bq1tomu: "fqi5tbq",
|
|
181
177
|
mc9l5x: "f22iagw",
|
|
182
178
|
Beiy3e4: "f1vx9l62",
|
|
183
179
|
Belr9w4: "f1wn3y0l",
|
|
@@ -190,28 +186,36 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
190
186
|
}, {
|
|
191
187
|
d: [
|
|
192
188
|
".f2e0fxj{grid-template-rows:24px auto auto auto;}",
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
189
|
+
[
|
|
190
|
+
".f1v65gcw{padding:var(--spacingVerticalXS) var(--spacingHorizontalS);}",
|
|
191
|
+
{
|
|
192
|
+
p: -1
|
|
193
|
+
}
|
|
194
|
+
],
|
|
197
195
|
".f1pit55b{border-top-width:0px;}",
|
|
198
196
|
".f1orqat1{border-right-width:0px;}",
|
|
199
197
|
".ffbvwxd{border-left-width:0px;}",
|
|
200
198
|
".f136mcbi{border-bottom-width:0px;}",
|
|
201
199
|
".f1uniyfe{width:calc(256px - (var(--spacingHorizontalM) * 2));}",
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
200
|
+
[
|
|
201
|
+
".f1c5fvqg{padding:0px;}",
|
|
202
|
+
{
|
|
203
|
+
p: -1
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
206
|
".f1sff6ri{row-gap:0;}",
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
207
|
+
[
|
|
208
|
+
".f4z8xh6{grid-area:citation;}",
|
|
209
|
+
{
|
|
210
|
+
p: -1
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
[
|
|
214
|
+
".fujjg13{grid-area:media;}",
|
|
215
|
+
{
|
|
216
|
+
p: -1
|
|
217
|
+
}
|
|
218
|
+
],
|
|
215
219
|
".f22iagw{display:flex;}",
|
|
216
220
|
".f122n59{align-items:center;}",
|
|
217
221
|
".f4d9j23{justify-content:center;}",
|
|
@@ -219,22 +223,29 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
219
223
|
".fd461yt{height:16px;}",
|
|
220
224
|
".fe9dio4>.fai-Reference__mediaChild{width:16px;}",
|
|
221
225
|
".f1ojxjpn>.fai-Reference__mediaChild{height:16px;}",
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
+
[
|
|
227
|
+
".fceb517{grid-area:actions;}",
|
|
228
|
+
{
|
|
229
|
+
p: -1
|
|
230
|
+
}
|
|
231
|
+
],
|
|
226
232
|
".f1a7i8kp{justify-self:end;}",
|
|
233
|
+
".f16hsg94{grid-row-start:1;}",
|
|
227
234
|
".fzmnlw3>fui-Button__icon{color:var(--colorNeutralForeground3);}",
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
235
|
+
[
|
|
236
|
+
".fw0kx7a{grid-area:sensitivityLabel;}",
|
|
237
|
+
{
|
|
238
|
+
p: -1
|
|
239
|
+
}
|
|
240
|
+
],
|
|
232
241
|
".fsxvdwy{justify-self:start;}",
|
|
233
242
|
".fww94b8{margin-top:var(--spacingVerticalXS);}",
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
243
|
+
[
|
|
244
|
+
".f14r5tnm{grid-area:metadata;}",
|
|
245
|
+
{
|
|
246
|
+
p: -1
|
|
247
|
+
}
|
|
248
|
+
],
|
|
238
249
|
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
239
250
|
".f13mqy1h{font-size:var(--fontSizeBase100);}",
|
|
240
251
|
".figsok6{font-weight:var(--fontWeightRegular);}",
|
|
@@ -256,10 +267,12 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
256
267
|
".fjml6kk::before{border-left-color:var(--colorNeutralStroke2);}",
|
|
257
268
|
".f1geml7w::before{border-right-color:var(--colorNeutralStroke2);}",
|
|
258
269
|
".fmrv4ls{vertical-align:middle;}",
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
[
|
|
271
|
+
".fqi5tbq{grid-area:content;}",
|
|
272
|
+
{
|
|
273
|
+
p: -1
|
|
274
|
+
}
|
|
275
|
+
],
|
|
263
276
|
".f1vx9l62{flex-direction:column;}",
|
|
264
277
|
".f1wn3y0l{row-gap:var(--spacingVerticalS);}",
|
|
265
278
|
".f11d4kpn{color:var(--colorNeutralForeground3);}",
|
|
@@ -269,10 +282,11 @@ const useStyles = (0, _reactcomponents.__styles)({
|
|
|
269
282
|
});
|
|
270
283
|
const useLabelStyles = (0, _reactcomponents.__styles)({
|
|
271
284
|
root: {
|
|
272
|
-
|
|
273
|
-
Br312pm:
|
|
274
|
-
nk6f5a:
|
|
275
|
-
|
|
285
|
+
Bw0ie65: 0,
|
|
286
|
+
Br312pm: 0,
|
|
287
|
+
nk6f5a: 0,
|
|
288
|
+
Ijaq50: 0,
|
|
289
|
+
Bq1tomu: "f1m7hl8e",
|
|
276
290
|
qb2dma: "f9h729m",
|
|
277
291
|
Bahqtrf: "fk6fouc",
|
|
278
292
|
Be2twd7: "fy9rknc",
|
|
@@ -296,10 +310,12 @@ const useLabelStyles = (0, _reactcomponents.__styles)({
|
|
|
296
310
|
}
|
|
297
311
|
}, {
|
|
298
312
|
d: [
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
313
|
+
[
|
|
314
|
+
".f1m7hl8e{grid-area:title;}",
|
|
315
|
+
{
|
|
316
|
+
p: -1
|
|
317
|
+
}
|
|
318
|
+
],
|
|
303
319
|
".f9h729m{align-self:start;}",
|
|
304
320
|
".fk6fouc{font-family:var(--fontFamilyBase);}",
|
|
305
321
|
".fy9rknc{font-size:var(--fontSizeBase200);}",
|
|
@@ -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\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":["referenceClassNames","mediaChild","metadata","mergeClasses","root","citation","actions","sensitivity","primaryText","secondaryText","tertiaryText","label","content","detailsButton","text","labelFontSize","maxPopoverWidth","caption1Strong","fontSize","useReferenceClassName","makeResetStyles","lineHeight","boxSizing","width","__resetStyles","display","__styles","gridTemplateAreas","uwmqm3","gridTemplateRows","border","borderRadius","padding","spacingVerticalS","boxShadow","columnGap","spacingHorizontalXS","alignItems","z8tnut","z189sj","useStyles","makeStyles","canvas","sidecar","Belr9w4","popover","shorthands","Bw0ie65","rowGap","Ijaq50","media","justifyContent","a9b677","mediaPopover","height","nk6f5a","justifySelf","gridRowStart","D5xksd","buttonClassNames","color","marginTop","typographyStyles","metadataSubsequentText","position","marginLeft","left","spacingHorizontalS","top","Bciustq","icon","caption2","verticalAlign","Bm6vgfq","flexDirection","hidden","Br312pm","useLabelStyles","alignSelf","wordBreak","paddingTop","closed","maxWidth","Bhrd7zp","Bg96gwp","Biipf1f","Bmxbyg5","rootClassName","labelStyles","state","B2u0y6b","Bh9c35c","isSubsequentText","mode","layout","styles","referenceExtraClassNames","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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 padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n },\n inline: {},\n popover: {\n ...shorthands.borderWidth('0px'),\n width: `calc(${maxPopoverWidth} - (${tokens.spacingHorizontalM} * 2))`,\n padding: '0px',\n },\n closed: {\n rowGap: 0,\n },\n citation: {\n gridArea: 'citation',\n },\n media: {\n gridArea: 'media',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mediaPopover: {\n width: '16px',\n height: '16px',\n\n [`> .${referenceExtraClassNames.mediaChild}`]: {\n width: '16px',\n height: '16px',\n },\n },\n actions: {\n gridArea: 'actions',\n justifySelf: 'end',\n display: 'flex',\n gridRowStart: 1,\n },\n detailsButton: {\n [`> ${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground3,\n },\n },\n sensitivity: {\n gridArea: 'sensitivityLabel',\n justifySelf: 'start',\n },\n metadata: {\n marginTop: tokens.spacingVerticalXS,\n\n gridArea: 'metadata',\n ...typographyStyles.caption2,\n },\n metadataSubsequentText: {\n position: 'relative',\n marginLeft: tokens.spacingHorizontalS,\n\n '&::before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n left: `calc(${tokens.spacingHorizontalS} / -2)`,\n top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,\n height: typographyStyles.caption2.fontSize,\n ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n },\n icon: {\n ...typographyStyles.caption2,\n verticalAlign: 'middle',\n },\n content: {\n marginTop: tokens.spacingVerticalXS,\n gridArea: 'content',\n display: 'flex',\n flexDirection: 'column',\n rowGap: tokens.spacingVerticalS,\n color: tokens.colorNeutralForeground3,\n wordBreak: 'break-word',\n },\n hidden: {\n display: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n root: {\n gridArea: 'title',\n alignSelf: 'start',\n ...typographyStyles.caption1Strong,\n wordBreak: 'break-word',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n display: '-webkit-box',\n overflowY: 'hidden',\n },\n\n canvas: {\n // 24px is the height of the tallest element within the reference\n paddingTop: `calc((24px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n sidecar: {\n // 16px is the height of the tallest element within the reference\n paddingTop: `calc((16px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n closed: {\n maxWidth: '100%',\n '-webkit-line-clamp': '1',\n },\n});\n\n/**\n * Apply styling to the Reference slots based on the state\n *\n * deprecated Use ReferenceV2 component, hooks and types instead.\n */\nexport const useReferenceStyles_unstable = (state: ReferenceState): ReferenceState => {\n 'use no memo';\n\n const { isExpanded, mode, layout } = state;\n\n const rootClassName = useReferenceClassName();\n const styles = useStyles();\n const labelStyles = useLabelStyles();\n state.root.className = mergeClasses(\n referenceClassNames.root,\n rootClassName,\n styles[mode],\n styles[layout],\n !isExpanded && styles.closed,\n state.root.className,\n );\n\n if (state.citation) {\n state.citation.className = mergeClasses(referenceClassNames.citation, styles.citation, state.citation.className);\n }\n\n if (state.media) {\n state.media.className = mergeClasses(\n referenceClassNames.media,\n styles.media,\n layout === 'popover' && styles.mediaPopover,\n state.media.className,\n );\n }\n\n if (state.actions) {\n state.actions.className = mergeClasses(referenceClassNames.actions, styles.actions, state.actions.className);\n }\n\n state.label.className = mergeClasses(\n referenceClassNames.label,\n labelStyles.root,\n labelStyles[mode],\n !isExpanded && labelStyles.closed,\n state.label.className,\n );\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n referenceClassNames.sensitivity,\n styles.sensitivity,\n !isExpanded && styles.hidden,\n state.sensitivity.className,\n );\n }\n\n state.metadata.className = mergeClasses(\n referenceClassNames.metadata,\n styles.metadata,\n !isExpanded && styles.hidden,\n state.metadata.className,\n );\n\n let isSubsequentText = false;\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(\n referenceClassNames.primaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.primaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n referenceClassNames.secondaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.secondaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n referenceClassNames.tertiaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.tertiaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(referenceClassNames.icon, styles.icon, state.icon.className);\n }\n state.content.className = mergeClasses(\n referenceClassNames.content,\n styles.content,\n !isExpanded && styles.hidden,\n state.content.className,\n );\n\n if (state.detailsButton) {\n state.detailsButton.className = mergeClasses(\n referenceClassNames.detailsButton,\n styles.detailsButton,\n state.detailsButton.className,\n );\n }\n\n return state;\n};\n"],"names":["referenceClassNames","mediaChild","root","citation","actions","sensitivity","primaryText","secondaryText","tertiaryText","label","content","detailsButton","text","labelFontSize","maxPopoverWidth","caption1Strong","fontSize","useReferenceClassName","makeResetStyles","lineHeight","boxSizing","width","__resetStyles","display","__styles","gridTemplateAreas","z8tnut","gridTemplateColumns","border","borderRadius","padding","boxShadow","columnGap","alignItems","a9b677","Byoj8tv","useStyles","canvas","sidecar","gridTemplateRows","inline","popover","Br312pm","closed","rowGap","Bq1tomu","gridArea","Bw0ie65","media","justifyContent","Bt984gj","mediaPopover","height","justifySelf","gridRowStart","D5xksd","metadata","marginTop","typographyStyles","metadataSubsequentText","position","marginLeft","left","top","icon","caption2","verticalAlign","Br0sdwz","tokens","spacingVerticalXS","flexDirection","spacingVerticalS","color","colorNeutralForeground3","hidden","Bhrd7zp","Bg96gwp","ha4doy","useLabelStyles","alignSelf","wordBreak","overflowY","Beiy3e4","paddingTop","maxWidth","p","state","nk6f5a","Bahqtrf","Biipf1f","isSubsequentText","Fd1uvx","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AAAA;QAAAA;QAAAA;QAAAA;YAAAA;YAAAA;gBACpBQ,GAAAA,CAAAA;;SASA;QAAA;QAAoB;QAAA;QAAA;QAAA;KAAA;;MAEpBR,iBAAAtD,IAAAA,yBAAA,EAAA;UAEI8D;iBACFA;QAMF5C,SAAA;QAEA6C,QAAID;gBACFA;QACFzC,SAAA;QAEAyC,QAAM7E;QAQN+E,SAAIF;iBACFA;QAMFX,SAAA;QAEAW,SAAM9B;QAONiC,SAAIC;QACJC,QAAIL;iBACFA;gBAMAI;QACFE,SAAA;;YAGEN;gBAMAI;;aAGEJ;gBACFA;;YAOF;QAEAO,SAAIP;iBACFA;;;OASF;QAAA;YAAA;YAAyB;oBACvBA;;SAKF;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA"}
|
package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js
CHANGED
|
@@ -21,9 +21,8 @@ const referenceGroupToggleClassNames = {
|
|
|
21
21
|
root: 'fai-ReferenceGroupToggle',
|
|
22
22
|
icon: 'fai-ReferenceGroupToggle__icon'
|
|
23
23
|
};
|
|
24
|
-
const useButtonBaseClassName = (0, _reactcomponents.__resetStyles)("
|
|
25
|
-
".
|
|
26
|
-
".rfdmif3{display:inline-flex;column-gap:var(--spacingHorizontalSNudge);align-items:center;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);border:0;background-color:var(--colorTransparentBackground);color:var(--colorNeutralForeground3);cursor:pointer;width:max-content;padding-top:var(--spacingVerticalXS);padding-left:0;padding-bottom:var(--spacingVerticalXS);padding-right:0;}"
|
|
24
|
+
const useButtonBaseClassName = (0, _reactcomponents.__resetStyles)("rqbbkgr", null, [
|
|
25
|
+
".rqbbkgr{display:inline-flex;column-gap:var(--spacingHorizontalSNudge);align-items:center;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase200);font-weight:var(--fontWeightRegular);line-height:var(--lineHeightBase200);border:0;background-color:var(--colorTransparentBackground);color:var(--colorNeutralForeground3);cursor:pointer;width:max-content;padding:var(--spacingVerticalXS) 0;}"
|
|
27
26
|
]);
|
|
28
27
|
const useIconBaseClassName = (0, _reactcomponents.__resetStyles)("r18biwo", null, [
|
|
29
28
|
".r18biwo{display:inline-flex;align-items:center;}"
|
package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReferenceGroupToggleStyles.styles.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["useReferenceGroupToggleStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, tokens, typographyStyles } from '@fluentui/react-components';\nimport type { ReferenceGroupToggleSlots, ReferenceGroupToggleState } from './ReferenceGroupToggle.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const referenceGroupToggleClassNames: SlotClassNames<ReferenceGroupToggleSlots> = {\n root: 'fai-ReferenceGroupToggle',\n icon: 'fai-ReferenceGroupToggle__icon',\n};\n\nconst useButtonBaseClassName = makeResetStyles({\n display: 'inline-flex',\n columnGap: tokens.spacingHorizontalSNudge,\n alignItems: 'center',\n ...typographyStyles.caption1,\n border: 0,\n backgroundColor: tokens.colorTransparentBackground,\n color: tokens.colorNeutralForeground3,\n cursor: 'pointer',\n width: 'max-content',\n padding: `${tokens.spacingVerticalXS} 0`,\n});\n\nconst useIconBaseClassName = makeResetStyles({\n display: 'inline-flex',\n alignItems: 'center',\n});\n\nconst useStyles = makeStyles({\n canvas: { ...typographyStyles.caption1 },\n sidecar: {\n ...typographyStyles.caption2,\n },\n});\n\n/**\n * Apply styling to the ReferenceGroupToggle slots based on the state\n */\nexport const useReferenceGroupToggleStyles_unstable = (state: ReferenceGroupToggleState): ReferenceGroupToggleState => {\n 'use no memo';\n\n const { mode } = state;\n const styles = useStyles();\n\n const iconBaseClassName = useIconBaseClassName();\n const buttonBaseClassName = useButtonBaseClassName();\n state.root.className = mergeClasses(\n referenceGroupToggleClassNames.root,\n buttonBaseClassName,\n styles[mode],\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(referenceGroupToggleClassNames.icon, iconBaseClassName, state.icon.className);\n }\n\n return state;\n};\n"],"names":["referenceGroupToggleClassNames","typographyStyles","root","icon","useButtonBaseClassName","makeResetStyles","display","__resetStyles","columnGap","tokens","spacingHorizontalSNudge","alignItems","Bahqtrf","border","backgroundColor","color","padding","Be2twd7","Bhrd7zp","useIconBaseClassName","d","useStyles","state","styles","iconBaseClassName","buttonBaseClassName","className","mergeClasses","mode"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIaA,8BAAAA;eAAAA;;IA0BNC,sCAAyB;eAAzBA;;;iCA9BqE;AAIrE,MAAMD,iCAA4E;UACvFE;UACAC;AACF;AAEA,MAAMC,yBAAyBC,IAAAA,8BAAAA,EAAAA,WAAgB,MAAA;IAAA;CAAA;MAC7CC,uBAASC,IAAAA,8BAAA,EAAA,WAAA,MAAA;IAAA;CAAA;MACTC,YAAWC,IAAAA,yBAAOC,EAAAA;YAClBC;QACAC,SAAGX;QACHY,SAAQ;QACRC,SAAAA;QACAC,SAAON;;aAEA;QACPO,SAAS;QACXC,SAAA;QAEAC,SAAMC;QACJb,SAAS;;AAEX,GAAA;IAEAc,GAAA;QAAMC;QAAuB;QAAA;QAAA;QAAA;QAAA;KAAA;;MAGtBpB,yCAAyBqB,CAAAA;;IAIhC,MAAA,QAEC,GACDA;UACEC,SAAAF;UAEAG,oBAAiBF;UACjBG,sBAAeJ;UAEfnB,IAAMsB,CAAAA,SAAAA,GAAAA,IAAAA,6BAAoBL,EAAAA,+BAAAA,IAAAA,EAAAA,qBAAAA,MAAAA,CAAAA,KAAAA,EAAAA,MAAAA,IAAAA,CAAAA,SAAAA;QAC1BG,MAAMG,IAAAA,EAAAA;QACNH,MAAMpB,IAAI,CAACwB,SAAS,GAAGC,IAAAA,6BAAAA,EACrB3B,+BAA+BE,IAAI,EACnCuB,mBAAAA,MACAF,IAAOK,CAAAA,SACPN;;WAIAA;mEAGKA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ReferenceList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { ReferenceListContextValue } from '../../../contexts/reference-v2/referenceListContext';\n\nexport type ReferenceListSlots = {\n /** The root of the component that contains the list of references. */\n root: NonNullable<Slot<'div'>>;\n\n /** A space containing a button that expands the list of references. This slot is only rendered when the list of references is collapsed. */\n showMoreButton?: Slot<'span'>;\n\n /** A space containing a button that collapses the list of references. This slot is only rendered when the list of references is expanded. */\n showLessButton?: Slot<'span'>;\n};\n\nexport type ReferenceListProps = ComponentProps<ReferenceListSlots> & {\n /**\n * The maximum number of references to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * @default undefined\n */\n maxVisibleReferences?: number;\n};\n\nexport type ReferenceListState = ComponentState<ReferenceListSlots> &\n Pick<ReferenceListProps, 'maxVisibleReferences'> & {\n areReferencesExpanded: boolean;\n overflowButtonTriggeredViaKeyboard: React.MutableRefObject<boolean>;\n referenceListRef: React.RefObject<HTMLDivElement>;\n shouldUseOverflow: boolean;\n totalReferencesCount: number;\n };\n\nexport type ReferenceListContextValues = {\n referenceList: ReferenceListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
1
|
+
{"version":3,"sources":["ReferenceList.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\nimport type { ReferenceListContextValue } from '../../../contexts/reference-v2/referenceListContext';\n\nexport type ReferenceListSlots = {\n /** The root of the component that contains the list of references. */\n root: NonNullable<Slot<'div'>>;\n\n /** A space containing a button that expands the list of references. This slot is only rendered when the list of references is collapsed. */\n showMoreButton?: Slot<'span'>;\n\n /** A space containing a button that collapses the list of references. This slot is only rendered when the list of references is expanded. */\n showLessButton?: Slot<'span'>;\n};\n\nexport type ReferenceListProps = ComponentProps<ReferenceListSlots> & {\n /**\n * The maximum number of references to display before the overflow button is shown even if there is\n * enough space available to show more.\n * If not set, the overflow functionality will be disabled.\n * If this value is less than `minVisibleReferences`, then `minVisibleReferences` will take precedence.\n * @default undefined\n */\n maxVisibleReferences?: number;\n\n /**\n * The minimum number of references to always show before overflowing.\n * If this value exceeds the number of references, the overflow functionality will be disabled.\n * If this value is greater than `maxVisibleReferences`, then this will take precedence.\n * @default undefined\n */\n minVisibleReferences?: number;\n};\n\nexport type ReferenceListState = ComponentState<ReferenceListSlots> &\n Pick<ReferenceListProps, 'maxVisibleReferences' | 'minVisibleReferences'> & {\n areReferencesExpanded: boolean;\n overflowButtonTriggeredViaKeyboard: React.MutableRefObject<boolean>;\n referenceListRef: React.RefObject<HTMLDivElement>;\n shouldUseOverflow: boolean;\n totalReferencesCount: number;\n };\n\nexport type ReferenceListContextValues = {\n referenceList: ReferenceListContextValue;\n};\n"],"names":[],"rangeMappings":"","mappings":""}
|
|
@@ -13,9 +13,11 @@ const _reactcomponents = require("@fluentui/react-components");
|
|
|
13
13
|
const _referenceListContext = require("../../../contexts/reference-v2/referenceListContext");
|
|
14
14
|
const renderReferenceList_unstable = (state, contextValues)=>{
|
|
15
15
|
(0, _reactcomponents.assertSlots)(state);
|
|
16
|
+
const { minVisibleReferences } = state;
|
|
16
17
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_referenceListContext.ReferenceListContextProvider, {
|
|
17
18
|
value: contextValues.referenceList,
|
|
18
19
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactcomponents.Overflow, {
|
|
20
|
+
minimumVisible: minVisibleReferences,
|
|
19
21
|
children: /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
|
|
20
22
|
children: [
|
|
21
23
|
state.root.children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderReferenceList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Overflow, assertSlots } from '@fluentui/react-components';\nimport type { ReferenceListState, ReferenceListSlots, ReferenceListContextValues } from './ReferenceList.types';\nimport { ReferenceListContextProvider } from '../../../contexts/reference-v2/referenceListContext';\n\n/**\n * Render the final JSX of ReferenceList\n */\nexport const renderReferenceList_unstable = (state: ReferenceListState, contextValues: ReferenceListContextValues) => {\n assertSlots<ReferenceListSlots>(state);\n\n return (\n <ReferenceListContextProvider value={contextValues.referenceList}>\n <Overflow>\n <state.root>\n {state.root.children}\n {state.showMoreButton && <state.showMoreButton />}\n {state.showLessButton && <state.showLessButton />}\n </state.root>\n </Overflow>\n </ReferenceListContextProvider>\n );\n};\n"],"names":["assertSlots","state","
|
|
1
|
+
{"version":3,"sources":["renderReferenceList.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { Overflow, assertSlots } from '@fluentui/react-components';\nimport type { ReferenceListState, ReferenceListSlots, ReferenceListContextValues } from './ReferenceList.types';\nimport { ReferenceListContextProvider } from '../../../contexts/reference-v2/referenceListContext';\n\n/**\n * Render the final JSX of ReferenceList\n */\nexport const renderReferenceList_unstable = (state: ReferenceListState, contextValues: ReferenceListContextValues) => {\n assertSlots<ReferenceListSlots>(state);\n\n const { minVisibleReferences } = state;\n\n return (\n <ReferenceListContextProvider value={contextValues.referenceList}>\n <Overflow minimumVisible={minVisibleReferences}>\n <state.root>\n {state.root.children}\n {state.showMoreButton && <state.showMoreButton />}\n {state.showLessButton && <state.showLessButton />}\n </state.root>\n </Overflow>\n </ReferenceListContextProvider>\n );\n};\n"],"names":["assertSlots","state","minVisibleReferences","contextValues","minimumVisible","referenceList","showMoreButton","root","showLessButton","_jsx"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAWEA;;;eAAAA;;;4BAVF;iCAEsC;sCAEO;AAM3CA,MAAAA,+BAAgCC,CAAAA,OAAAA;oCAExBC,EAAAA;UAER,sBACuCC;sBACzBC,GAAAA,IAAAA,eAAAA,EAAAA,kDAAgBF,EAAAA;6BACxBG,aAAA;;4BACGJ;iCACMK,GAAAA,IAAAA,gBAAAA,EAAAA,MAAcC,IAAA,EAAA;;0BACpBN,IAAMO,CAAAA,QAAAA;oBAAcP,MAAAK,cAAI,IAACL,WAAMO,GAAAA,IAAAA,eAAAA,EAAAA,MAAcF,cAAA,EAAA,CAAA;oBAAAL,MAAAO,cAAA,IAAA,WAAA,GAAAC,IAAAA,eAAA,EAAAR,MAAAO,cAAA,EAAA,CAAA;iBAAA;;;;GAKxD,+CAAE"}
|
|
@@ -14,7 +14,7 @@ const _reactcomponents = require("@fluentui/react-components");
|
|
|
14
14
|
const _reactutilities = require("@fluentui-copilot/react-utilities");
|
|
15
15
|
const _useReferenceStylesstyles = require("../Reference/useReferenceStyles.styles");
|
|
16
16
|
const useReferenceList_unstable = (props, ref)=>{
|
|
17
|
-
const { children, maxVisibleReferences, showLessButton, showMoreButton, ...rest } = props;
|
|
17
|
+
const { children, maxVisibleReferences, minVisibleReferences, showLessButton, showMoreButton, ...rest } = props;
|
|
18
18
|
const [areReferencesExpanded, setAreReferencesExpanded] = _react.useState(false);
|
|
19
19
|
const referenceListRef = _react.useRef(null);
|
|
20
20
|
const totalReferencesCount = _react.Children.count(children);
|
|
@@ -23,6 +23,7 @@ const useReferenceList_unstable = (props, ref)=>{
|
|
|
23
23
|
additionalCondition: !areReferencesExpanded,
|
|
24
24
|
children,
|
|
25
25
|
maxVisibleItems: maxVisibleReferences,
|
|
26
|
+
minVisibleItems: minVisibleReferences,
|
|
26
27
|
overflowClassName: styles.overflow
|
|
27
28
|
});
|
|
28
29
|
// We keep track of whether we are interacting with the overflow button via keyboard or not.
|
|
@@ -38,11 +39,12 @@ const useReferenceList_unstable = (props, ref)=>{
|
|
|
38
39
|
const onShowLessButtonClick = _react.useCallback(()=>{
|
|
39
40
|
setAreReferencesExpanded(false);
|
|
40
41
|
}, []);
|
|
41
|
-
const shouldUseOverflow = maxVisibleReferences !== undefined && !areReferencesExpanded;
|
|
42
|
+
const shouldUseOverflow = (minVisibleReferences === undefined || minVisibleReferences < totalReferencesCount) && maxVisibleReferences !== undefined && !areReferencesExpanded;
|
|
42
43
|
const state = {
|
|
43
44
|
areReferencesExpanded,
|
|
44
45
|
overflowButtonTriggeredViaKeyboard,
|
|
45
46
|
maxVisibleReferences,
|
|
47
|
+
minVisibleReferences,
|
|
46
48
|
referenceListRef,
|
|
47
49
|
shouldUseOverflow,
|
|
48
50
|
totalReferencesCount,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReferenceList.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n mergeCallbacks,\n slot,\n useArrowNavigationGroup,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';\nimport { useRootStyles } from '../Reference/useReferenceStyles.styles';\nimport type { ReferenceListProps, ReferenceListState } from './ReferenceList.types';\n\n/**\n * Create the state required to render ReferenceList.\n *\n * The returned state can be modified with hooks such as useReferenceListStyles_unstable,\n * before being passed to renderReferenceList_unstable.\n *\n * @param props - props from this instance of ReferenceList\n * @param ref - reference to root HTMLElement of ReferenceList\n */\nexport const useReferenceList_unstable = (\n props: ReferenceListProps,\n ref: React.Ref<HTMLDivElement>,\n): ReferenceListState => {\n const { children, maxVisibleReferences, showLessButton, showMoreButton, ...rest } = props;\n\n const [areReferencesExpanded, setAreReferencesExpanded] = React.useState(false);\n const referenceListRef = React.useRef<HTMLDivElement>(null);\n\n const totalReferencesCount = React.Children.count(children);\n const styles = useRootStyles();\n const resolvedChildren = useOverflowMaxVisibleItems({\n additionalCondition: !areReferencesExpanded,\n children,\n maxVisibleItems: maxVisibleReferences,\n overflowClassName: styles.overflow,\n });\n\n // We keep track of whether we are interacting with the overflow button via keyboard or not.\n const overflowButtonTriggeredViaKeyboard = React.useRef(false);\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n memorizeCurrent: true,\n });\n\n const onShowMoreButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(true);\n }, []);\n\n const onShowLessButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(false);\n }, []);\n\n const shouldUseOverflow
|
|
1
|
+
{"version":3,"sources":["useReferenceList.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n mergeCallbacks,\n slot,\n useArrowNavigationGroup,\n useMergedRefs,\n} from '@fluentui/react-components';\nimport { useOverflowMaxVisibleItems } from '@fluentui-copilot/react-utilities';\nimport { useRootStyles } from '../Reference/useReferenceStyles.styles';\nimport type { ReferenceListProps, ReferenceListState } from './ReferenceList.types';\n\n/**\n * Create the state required to render ReferenceList.\n *\n * The returned state can be modified with hooks such as useReferenceListStyles_unstable,\n * before being passed to renderReferenceList_unstable.\n *\n * @param props - props from this instance of ReferenceList\n * @param ref - reference to root HTMLElement of ReferenceList\n */\nexport const useReferenceList_unstable = (\n props: ReferenceListProps,\n ref: React.Ref<HTMLDivElement>,\n): ReferenceListState => {\n const { children, maxVisibleReferences, minVisibleReferences, showLessButton, showMoreButton, ...rest } = props;\n\n const [areReferencesExpanded, setAreReferencesExpanded] = React.useState(false);\n const referenceListRef = React.useRef<HTMLDivElement>(null);\n\n const totalReferencesCount = React.Children.count(children);\n const styles = useRootStyles();\n const resolvedChildren = useOverflowMaxVisibleItems({\n additionalCondition: !areReferencesExpanded,\n children,\n maxVisibleItems: maxVisibleReferences,\n minVisibleItems: minVisibleReferences,\n overflowClassName: styles.overflow,\n });\n\n // We keep track of whether we are interacting with the overflow button via keyboard or not.\n const overflowButtonTriggeredViaKeyboard = React.useRef(false);\n\n const focusAttributes = useArrowNavigationGroup({\n axis: 'both',\n circular: true,\n memorizeCurrent: true,\n });\n\n const onShowMoreButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(true);\n }, []);\n\n const onShowLessButtonClick = React.useCallback<React.MouseEventHandler<HTMLButtonElement>>(() => {\n setAreReferencesExpanded(false);\n }, []);\n\n const shouldUseOverflow =\n (minVisibleReferences === undefined || minVisibleReferences < totalReferencesCount) &&\n maxVisibleReferences !== undefined &&\n !areReferencesExpanded;\n\n const state: ReferenceListState = {\n areReferencesExpanded,\n overflowButtonTriggeredViaKeyboard,\n maxVisibleReferences,\n minVisibleReferences,\n referenceListRef,\n shouldUseOverflow,\n totalReferencesCount,\n\n components: {\n root: 'div',\n showMoreButton: 'span',\n showLessButton: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, referenceListRef),\n ...focusAttributes,\n ...rest,\n children: resolvedChildren,\n }),\n { elementType: 'div' },\n ),\n showMoreButton: shouldUseOverflow ? slot.optional(showMoreButton, { elementType: 'span' }) : undefined,\n showLessButton: areReferencesExpanded ? slot.optional(showLessButton, { elementType: 'span' }) : undefined,\n };\n\n if (state.showMoreButton) {\n state.showMoreButton.onClick = mergeCallbacks(onShowMoreButtonClick, state.showMoreButton.onClick);\n }\n\n if (state.showLessButton) {\n state.showLessButton.onClick = mergeCallbacks(onShowLessButtonClick, state.showLessButton.onClick);\n }\n\n return state;\n};\n"],"names":["children","maxVisibleReferences","props","minVisibleReferences","referenceListRef","totalReferencesCount","useRootStyles","showLessButton","resolvedChildren","additionalCondition","minVisibleItems","overflowClassName","styles","overflow","React","Children","count","overflowButtonTriggeredViaKeyboard","useRef","focusAttributes","memorizeCurrent","onShowLessButtonClick","useCallback","setAreReferencesExpanded","circular","shouldUseOverflow","areReferencesExpanded","components","rest","elementType","showMoreButton","slot","optional","ref","undefined","mergeCallbacks","onShowM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,aAAA;QAEA,KAAAK;IACA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-copilot/react-reference",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "Fluent AI controls for citations and references",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui-copilot/react-preview": "^0.5.
|
|
16
|
-
"@fluentui-copilot/react-provider": "^0.
|
|
17
|
-
"@fluentui-copilot/react-sensitivity-label": "^0.5.
|
|
18
|
-
"@fluentui-copilot/react-utilities": "^0.0.
|
|
15
|
+
"@fluentui-copilot/react-preview": "^0.5.2",
|
|
16
|
+
"@fluentui-copilot/react-provider": "^0.9.0",
|
|
17
|
+
"@fluentui-copilot/react-sensitivity-label": "^0.5.2",
|
|
18
|
+
"@fluentui-copilot/react-utilities": "^0.0.3",
|
|
19
19
|
"@swc/helpers": "^0.5.1"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"@fluentui/keyboard-keys": ">=9.0.7 <10.0.0",
|
|
23
|
-
"@fluentui/react-components": ">=9.54.
|
|
24
|
-
"@fluentui/react-context-selector": ">=9.1.
|
|
23
|
+
"@fluentui/react-components": ">=9.54.10 <10.0.0",
|
|
24
|
+
"@fluentui/react-context-selector": ">=9.1.65 <10.0.0",
|
|
25
25
|
"@fluentui/react-icons": ">=2.0.247 <3.0.0",
|
|
26
|
-
"@fluentui/react-jsx-runtime": ">=9.0.
|
|
27
|
-
"@fluentui/react-shared-contexts": ">=9.
|
|
28
|
-
"@fluentui/react-utilities": ">=9.18.
|
|
26
|
+
"@fluentui/react-jsx-runtime": ">=9.0.42 <10.0.0",
|
|
27
|
+
"@fluentui/react-shared-contexts": ">=9.20.0 <10.0.0",
|
|
28
|
+
"@fluentui/react-utilities": ">=9.18.13 <10.0.0",
|
|
29
29
|
"@types/react": ">=16.14.0 <19.0.0",
|
|
30
30
|
"@types/react-dom": ">=16.9.8 <19.0.0",
|
|
31
31
|
"react": ">=16.14.0 <19.0.0",
|