@fluentui-copilot/react-reference 0.15.4 → 0.15.5-hotfix.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +19 -1
- package/lib/Citation.js +0 -1
- package/lib/Reference.js +0 -1
- package/lib/ReferenceGroupToggle.js +0 -1
- package/lib/ReferenceList.js +0 -1
- package/lib/ReferenceListV2.js +0 -1
- package/lib/ReferenceOverflowButton.js +0 -1
- package/lib/ReferenceV2.js +0 -1
- package/lib/components/Citation/Citation.js +5 -6
- package/lib/components/Citation/Citation.types.js +1 -2
- package/lib/components/Citation/index.js +0 -1
- package/lib/components/Citation/renderCitation.js +4 -6
- package/lib/components/Citation/useCitation.js +22 -28
- package/lib/components/Citation/useCitationStyles.styles.js +1 -1
- package/lib/components/Citation/useCitationStyles.styles.js.map +1 -1
- package/lib/components/Citation/useCitationStyles.styles.raw.js +69 -0
- package/lib/components/Citation/useCitationStyles.styles.raw.js.map +1 -0
- package/lib/components/Reference/Reference.js +5 -7
- package/lib/components/Reference/Reference.types.js +1 -2
- package/lib/components/Reference/index.js +0 -1
- package/lib/components/Reference/renderReference.js +27 -12
- package/lib/components/Reference/useReference.js +173 -172
- package/lib/components/Reference/useReferenceStyles.styles.raw.js +197 -0
- package/lib/components/Reference/useReferenceStyles.styles.raw.js.map +1 -0
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.js +4 -6
- package/lib/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js +1 -2
- package/lib/components/ReferenceGroupToggle/index.js +0 -1
- package/lib/components/ReferenceGroupToggle/renderReferenceGroupToggle.js +9 -8
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggle.js +26 -30
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js +44 -0
- package/lib/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js.map +1 -0
- package/lib/components/ReferenceList/ReferenceList.js +5 -7
- package/lib/components/ReferenceList/ReferenceList.types.js +1 -2
- package/lib/components/ReferenceList/index.js +0 -1
- package/lib/components/ReferenceList/renderReferenceList.js +4 -6
- package/lib/components/ReferenceList/useReferenceList.js +15 -17
- package/lib/components/ReferenceList/useReferenceListStyles.styles.raw.js +27 -0
- package/lib/components/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -0
- package/lib/components/reference-v2/Reference/Reference.js +4 -5
- package/lib/components/reference-v2/Reference/Reference.types.js +1 -2
- package/lib/components/reference-v2/Reference/index.js +0 -1
- package/lib/components/reference-v2/Reference/renderReference.js +20 -17
- package/lib/components/reference-v2/Reference/useReference.js +53 -59
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.raw.js +110 -0
- package/lib/components/reference-v2/Reference/useReferenceStyles.styles.raw.js.map +1 -0
- package/lib/components/reference-v2/ReferenceList/ReferenceList.js +5 -6
- package/lib/components/reference-v2/ReferenceList/ReferenceList.types.js +1 -2
- package/lib/components/reference-v2/ReferenceList/index.js +0 -1
- package/lib/components/reference-v2/ReferenceList/renderReferenceList.js +17 -17
- package/lib/components/reference-v2/ReferenceList/useReferenceList.js +70 -80
- package/lib/components/reference-v2/ReferenceList/useReferenceListContextValues.js +13 -21
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js +47 -0
- package/lib/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -0
- package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js +4 -5
- package/lib/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js +1 -2
- package/lib/components/reference-v2/ReferenceOverflowButton/index.js +0 -1
- package/lib/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js +9 -14
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js +77 -77
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js +45 -0
- package/lib/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js.map +1 -0
- package/lib/components/reference-v2/index.js +0 -1
- package/lib/contexts/ReferenceGroupContext.js +5 -6
- package/lib/contexts/reference-v2/index.js +0 -1
- package/lib/contexts/reference-v2/referenceListContext.js +11 -12
- package/lib/index.js +0 -1
- package/lib/utilities/index.js +0 -1
- package/lib/utilities/reference-v2/generateReferenceCitationPreview.js +75 -86
- package/lib/utilities/reference-v2/index.js +0 -1
- package/lib/utilities/reference-v2/useReferenceCitationPreview.js +5 -5
- package/lib/utilities/useReferenceCitationPreview.js +123 -114
- package/lib/utilities/useReferenceGroup.js +28 -32
- package/lib/utilities/useReferenceGroup.js.map +1 -1
- package/lib/utilities/useReferenceGroup.styles.js +9 -0
- package/lib/utilities/useReferenceGroup.styles.js.map +1 -0
- package/lib/utilities/useReferenceGroup.styles.raw.js +6 -0
- package/lib/utilities/useReferenceGroup.styles.raw.js.map +1 -0
- package/lib-commonjs/Citation.js +0 -1
- package/lib-commonjs/Reference.js +0 -1
- package/lib-commonjs/ReferenceGroupToggle.js +0 -1
- package/lib-commonjs/ReferenceList.js +0 -1
- package/lib-commonjs/ReferenceListV2.js +0 -1
- package/lib-commonjs/ReferenceOverflowButton.js +0 -1
- package/lib-commonjs/ReferenceV2.js +0 -1
- package/lib-commonjs/components/Citation/Citation.js +1 -1
- package/lib-commonjs/components/Citation/Citation.js.map +1 -1
- package/lib-commonjs/components/Citation/Citation.types.js +0 -1
- package/lib-commonjs/components/Citation/index.js +0 -1
- package/lib-commonjs/components/Citation/renderCitation.js +1 -1
- package/lib-commonjs/components/Citation/renderCitation.js.map +1 -1
- package/lib-commonjs/components/Citation/useCitation.js +1 -1
- package/lib-commonjs/components/Citation/useCitation.js.map +1 -1
- package/lib-commonjs/components/Citation/useCitationStyles.styles.js +7 -7
- package/lib-commonjs/components/Citation/useCitationStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Citation/useCitationStyles.styles.raw.js +85 -0
- package/lib-commonjs/components/Citation/useCitationStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/Reference/Reference.js +1 -1
- package/lib-commonjs/components/Reference/Reference.js.map +1 -1
- package/lib-commonjs/components/Reference/Reference.types.js +0 -1
- package/lib-commonjs/components/Reference/index.js +0 -1
- package/lib-commonjs/components/Reference/renderReference.js +1 -1
- package/lib-commonjs/components/Reference/renderReference.js.map +1 -1
- package/lib-commonjs/components/Reference/useReference.js +1 -1
- package/lib-commonjs/components/Reference/useReference.js.map +1 -1
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.raw.js +214 -0
- package/lib-commonjs/components/Reference/useReferenceStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/ReferenceGroupToggle.types.js +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/index.js +0 -1
- package/lib-commonjs/components/ReferenceGroupToggle/renderReferenceGroupToggle.js +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/renderReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggle.js.map +1 -1
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js +60 -0
- package/lib-commonjs/components/ReferenceGroupToggle/useReferenceGroupToggleStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/ReferenceList/ReferenceList.js +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/ReferenceList.types.js +0 -1
- package/lib-commonjs/components/ReferenceList/index.js +0 -1
- package/lib-commonjs/components/ReferenceList/renderReferenceList.js +1 -1
- package/lib-commonjs/components/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceList.js +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.raw.js +44 -0
- package/lib-commonjs/components/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/reference-v2/Reference/Reference.js +1 -1
- package/lib-commonjs/components/reference-v2/Reference/Reference.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/Reference.types.js +0 -1
- package/lib-commonjs/components/reference-v2/Reference/index.js +0 -1
- package/lib-commonjs/components/reference-v2/Reference/renderReference.js +1 -1
- package/lib-commonjs/components/reference-v2/Reference/renderReference.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReference.js +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReference.js.map +1 -1
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.raw.js +132 -0
- package/lib-commonjs/components/reference-v2/Reference/useReferenceStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/ReferenceList.types.js +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/index.js +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/renderReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceList.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListContextValues.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListContextValues.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js +63 -0
- package/lib-commonjs/components/reference-v2/ReferenceList/useReferenceListStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/ReferenceOverflowButton.types.js +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/index.js +0 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/renderReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButton.js.map +1 -1
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js +61 -0
- package/lib-commonjs/components/reference-v2/ReferenceOverflowButton/useReferenceOverflowButtonStyles.styles.raw.js.map +1 -0
- package/lib-commonjs/components/reference-v2/index.js +0 -1
- package/lib-commonjs/contexts/ReferenceGroupContext.js +1 -1
- package/lib-commonjs/contexts/ReferenceGroupContext.js.map +1 -1
- package/lib-commonjs/contexts/reference-v2/index.js +0 -1
- package/lib-commonjs/contexts/reference-v2/referenceListContext.js +1 -1
- package/lib-commonjs/contexts/reference-v2/referenceListContext.js.map +1 -1
- package/lib-commonjs/index.js +0 -1
- package/lib-commonjs/utilities/index.js +0 -1
- package/lib-commonjs/utilities/reference-v2/generateReferenceCitationPreview.js +1 -1
- package/lib-commonjs/utilities/reference-v2/generateReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/utilities/reference-v2/index.js +0 -1
- package/lib-commonjs/utilities/reference-v2/useReferenceCitationPreview.js +1 -1
- package/lib-commonjs/utilities/reference-v2/useReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/utilities/useReferenceCitationPreview.js +1 -1
- package/lib-commonjs/utilities/useReferenceCitationPreview.js.map +1 -1
- package/lib-commonjs/utilities/useReferenceGroup.js +3 -11
- package/lib-commonjs/utilities/useReferenceGroup.js.map +1 -1
- package/lib-commonjs/utilities/useReferenceGroup.styles.js +20 -0
- package/lib-commonjs/utilities/useReferenceGroup.styles.js.map +1 -0
- package/lib-commonjs/utilities/useReferenceGroup.styles.raw.js +16 -0
- package/lib-commonjs/utilities/useReferenceGroup.styles.raw.js.map +1 -0
- package/package.json +7 -11
|
@@ -20,4 +20,4 @@ const Citation = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
20
20
|
(0, _reactprovider.useCustomStyleHook)('useCitationStyles')(state);
|
|
21
21
|
return (0, _renderCitation.renderCitation_unstable)(state);
|
|
22
22
|
});
|
|
23
|
-
Citation.displayName = 'Citation';
|
|
23
|
+
Citation.displayName = 'Citation';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Citation.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCitation_unstable } from './useCitation';\nimport { renderCitation_unstable } from './renderCitation';\nimport { useCitationStyles_unstable } from './useCitationStyles.styles';\nimport type { CitationProps } from './Citation.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Citation component - TODO: add more docs\nexport const Citation: ForwardRefComponent<CitationProps> = React.forwardRef((props, ref) => {\n const state = useCitation_unstable(props, ref);\n\n useCitationStyles_unstable(state);\n useCustomStyleHook('useCitationStyles')(state);\n\n return renderCitation_unstable(state);\n});\n\nCitation.displayName = 'Citation';\n"],"names":["Citation","React","forwardRef","props","state","useCitation_unstable","useCitationStyles_unstable","useCustomStyleHook","renderCitation_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;6BACc;gCACG;yCACG;+BAGR;AAG5B,MAAMA,WAAAA,WAAAA,
|
|
1
|
+
{"version":3,"sources":["Citation.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useCitation_unstable } from './useCitation';\nimport { renderCitation_unstable } from './renderCitation';\nimport { useCitationStyles_unstable } from './useCitationStyles.styles';\nimport type { CitationProps } from './Citation.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n// Citation component - TODO: add more docs\nexport const Citation: ForwardRefComponent<CitationProps> = React.forwardRef((props, ref) => {\n const state = useCitation_unstable(props, ref);\n\n useCitationStyles_unstable(state);\n useCustomStyleHook('useCitationStyles')(state);\n\n return renderCitation_unstable(state);\n});\n\nCitation.displayName = 'Citation';\n"],"names":["Citation","React","forwardRef","props","ref","state","useCitation_unstable","useCitationStyles_unstable","useCustomStyleHook","renderCitation_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;6BACc;gCACG;yCACG;+BAGR;AAG5B,MAAMA,WAAAA,WAAAA,GAA+CC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACnF,MAAMC,QAAQC,IAAAA,iCAAAA,EAAqBH,OAAOC;IAE1CG,IAAAA,mDAAAA,EAA2BF;IAC3BG,IAAAA,iCAAAA,EAAmB,qBAAqBH;IAExC,OAAOI,IAAAA,uCAAAA,EAAwBJ;AACjC;AAEAL,SAASU,WAAW,GAAG"}
|
|
@@ -13,4 +13,4 @@ const _reactcomponents = require("@fluentui/react-components");
|
|
|
13
13
|
const renderCitation_unstable = (state)=>{
|
|
14
14
|
(0, _reactcomponents.assertSlots)(state);
|
|
15
15
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {});
|
|
16
|
-
};
|
|
16
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderCitation.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { CitationState, CitationSlots } from './Citation.types';\n/**\n * Render the final JSX of Citation\n */\nexport const renderCitation_unstable = (state: CitationState) => {\n assertSlots<CitationSlots>(state);\n\n return <state.root />;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderCitation.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { CitationState, CitationSlots } from './Citation.types';\n/**\n * Render the final JSX of Citation\n */\nexport const renderCitation_unstable = (state: CitationState) => {\n assertSlots<CitationSlots>(state);\n\n return <state.root />;\n};\n"],"names":["renderCitation_unstable","state","assertSlots","_jsx","root"],"rangeMappings":";;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;iCAE4B;AAKrB,MAAMA,0BAA0B,CAACC;IACtCC,IAAAA,4BAAAA,EAA2BD;IAE3B,OAAA,WAAA,GAAOE,IAAAA,eAAA,EAACF,MAAMG,IAAI,EAAA,CAAA;AACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useCitation.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport { usePreviewContext_unstable } from '@fluentui-copilot/react-preview';\nimport type { CitationProps, CitationState } from './Citation.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\n/**\n * Create the state required to render Citation.\n *\n * The returned state can be modified with hooks such as useCitationStyles_unstable,\n * before being passed to renderCitation_unstable.\n *\n * @param props - props from this instance of Citation\n * @param ref - reference to root HTMLElement of Citation\n */\nexport const useCitation_unstable = (props: CitationProps, ref: React.Ref<HTMLAnchorElement>): CitationState => {\n const { referenceHref, block = false, ...otherProps } = props;\n const designVersion = useDesignVersion(props.designVersion);\n\n const isPopoverLocked = usePreviewContext_unstable(ctx => ctx.isPreviewLocked) && (props['aria-expanded'] as boolean);\n\n const state: CitationState = {\n block,\n designVersion,\n isPopoverLocked,\n components: {\n root: 'a',\n },\n root: slot.always(\n getIntrinsicElementProps('a', {\n ref,\n href: referenceHref,\n role: undefined,\n 'aria-expanded': undefined,\n ...otherProps,\n }),\n { elementType: 'a' },\n ),\n };\n\n return state;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useCitation.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot } from '@fluentui/react-components';\nimport { usePreviewContext_unstable } from '@fluentui-copilot/react-preview';\nimport type { CitationProps, CitationState } from './Citation.types';\nimport { useDesignVersion } from '@fluentui-copilot/react-provider';\n/**\n * Create the state required to render Citation.\n *\n * The returned state can be modified with hooks such as useCitationStyles_unstable,\n * before being passed to renderCitation_unstable.\n *\n * @param props - props from this instance of Citation\n * @param ref - reference to root HTMLElement of Citation\n */\nexport const useCitation_unstable = (props: CitationProps, ref: React.Ref<HTMLAnchorElement>): CitationState => {\n const { referenceHref, block = false, ...otherProps } = props;\n const designVersion = useDesignVersion(props.designVersion);\n\n const isPopoverLocked = usePreviewContext_unstable(ctx => ctx.isPreviewLocked) && (props['aria-expanded'] as boolean);\n\n const state: CitationState = {\n block,\n designVersion,\n isPopoverLocked,\n components: {\n root: 'a',\n },\n root: slot.always(\n getIntrinsicElementProps('a', {\n ref,\n href: referenceHref,\n role: undefined,\n 'aria-expanded': undefined,\n ...otherProps,\n }),\n { elementType: 'a' },\n ),\n };\n\n return state;\n};\n"],"names":["useCitation_unstable","props","ref","referenceHref","block","otherProps","designVersion","useDesignVersion","isPopoverLocked","usePreviewContext_unstable","ctx","isPreviewLocked","state","components","root","slot","always","getIntrinsicElementProps","href","role","undefined","elementType"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;iCAbkC;8BACJ;+BAEV;AAU1B,MAAMA,uBAAuB,CAACC,OAAsBC;IACzD,MAAM,EAAEC,aAAa,EAAEC,QAAQ,KAAK,EAAE,GAAGC,YAAY,GAAGJ;IACxD,MAAMK,gBAAgBC,IAAAA,+BAAAA,EAAiBN,MAAMK,aAAa;IAE1D,MAAME,kBAAkBC,IAAAA,wCAAAA,EAA2BC,CAAAA,MAAOA,IAAIC,eAAe,KAAMV,KAAK,CAAC,gBAAgB;IAEzG,MAAMW,QAAuB;QAC3BR;QACAE;QACAE;QACAK,YAAY;YACVC,MAAM;QACR;QACAA,MAAMC,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,EAAyB,KAAK;YAC5Bf;YACAgB,MAAMf;YACNgB,MAAMC;YACN,iBAAiBA;YACjB,GAAGf,UAAU;QACf,IACA;YAAEgB,aAAa;QAAI;IAEvB;IAEA,OAAOT;AACT"}
|
|
@@ -20,13 +20,13 @@ const _reactcomponents = require("@fluentui/react-components");
|
|
|
20
20
|
const citationClassNames = {
|
|
21
21
|
root: 'fai-Citation'
|
|
22
22
|
};
|
|
23
|
-
const useCitationBaseClassName = (0, _reactcomponents.__resetStyles)("
|
|
24
|
-
".
|
|
25
|
-
".
|
|
26
|
-
".
|
|
27
|
-
".
|
|
28
|
-
".
|
|
29
|
-
".
|
|
23
|
+
const useCitationBaseClassName = (0, _reactcomponents.__resetStyles)("rf7wmfm", "r9ecysy", [
|
|
24
|
+
".rf7wmfm{display:inline-flex;justify-content:center;box-sizing:border-box;align-items:center;cursor:pointer;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase100);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase100);background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorNeutralStroke2);color:var(--colorNeutralForeground2);min-width:14px;height:14px;vertical-align:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);padding-inline:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);text-decoration:none;margin-left:var(--spacingHorizontalXXS);margin-right:var(--spacingHorizontalXXS);}",
|
|
25
|
+
".rf7wmfm:hover{cursor:pointer;color:var(--colorBrandForeground2Hover);border-color:var(--colorBrandStroke2Hover);background-color:var(--colorBrandBackground2Hover);}",
|
|
26
|
+
".rf7wmfm:hover:active{cursor:pointer;color:var(--colorBrandForeground2Pressed);border-color:var(--colorBrandStroke2Pressed);background-color:var(--colorBrandBackground2Pressed);}",
|
|
27
|
+
".r9ecysy{display:inline-flex;justify-content:center;box-sizing:border-box;align-items:center;cursor:pointer;font-family:var(--fontFamilyBase);font-size:var(--fontSizeBase100);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase100);background-color:var(--colorNeutralBackground3);border:var(--strokeWidthThin) solid var(--colorNeutralStroke2);color:var(--colorNeutralForeground2);min-width:14px;height:14px;vertical-align:calc((var(--lineHeightBase100) - var(--fontSizeBase100)) / 2);padding-inline:var(--spacingHorizontalXXS);border-radius:var(--borderRadiusMedium);text-decoration:none;margin-right:var(--spacingHorizontalXXS);margin-left:var(--spacingHorizontalXXS);}",
|
|
28
|
+
".r9ecysy:hover{cursor:pointer;color:var(--colorBrandForeground2Hover);border-color:var(--colorBrandStroke2Hover);background-color:var(--colorBrandBackground2Hover);}",
|
|
29
|
+
".r9ecysy:hover:active{cursor:pointer;color:var(--colorBrandForeground2Pressed);border-color:var(--colorBrandStroke2Pressed);background-color:var(--colorBrandBackground2Pressed);}"
|
|
30
30
|
]);
|
|
31
31
|
const useCitationRootStyles = (0, _reactcomponents.__styles)({
|
|
32
32
|
isBlock: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useCitationStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { CitationSlots, CitationState } from './Citation.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const citationClassNames: SlotClassNames<CitationSlots> = {\n root: 'fai-Citation',\n};\n\nconst useCitationBaseClassName = makeResetStyles({\n display: 'inline-flex',\n justifyContent: 'center',\n boxSizing: 'border-box',\n alignItems: 'center',\n cursor: 'pointer',\n ...typographyStyles.caption2Strong,\n\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n color: tokens.colorNeutralForeground2,\n\n minWidth: '14px',\n height: '14px',\n verticalAlign: `calc((${typographyStyles.caption2Strong.lineHeight} - ${typographyStyles.caption2Strong.fontSize}) / 2)`,\n\n borderRadius: tokens.borderRadiusMedium,\n\n textDecoration: 'none',\n\n marginLeft: tokens.spacingHorizontalXXS,\n marginRight: tokens.spacingHorizontalXXS,\n\n ':hover': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Hover,\n borderColor: tokens.colorBrandStroke2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n\n ':hover:active': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Pressed,\n borderColor: tokens.colorBrandStroke2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n});\n\nconst useCitationRootStyles = makeStyles({\n isBlock: {\n display: 'flex',\n marginLeft: 0,\n marginRight: 0,\n },\n isPopoverLocked: {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n ':hover': {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n },\n },\n});\n\nconst useNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\n/**\n * Apply styling to the Citation slots based on the state\n */\nexport const useCitationStyles_unstable = (state: CitationState): CitationState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const rootBaseClassName = useCitationBaseClassName();\n const rootStyles = useCitationRootStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n citationClassNames.root,\n state.isPopoverLocked && rootStyles.isPopoverLocked,\n state.block && rootStyles.isBlock,\n rootBaseClassName,\n designVersion === 'next' && nextStyles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["citationClassNames","
|
|
1
|
+
{"version":3,"sources":["useCitationStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { CitationSlots, CitationState } from './Citation.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const citationClassNames: SlotClassNames<CitationSlots> = {\n root: 'fai-Citation',\n};\n\nconst useCitationBaseClassName = makeResetStyles({\n display: 'inline-flex',\n justifyContent: 'center',\n boxSizing: 'border-box',\n alignItems: 'center',\n cursor: 'pointer',\n ...typographyStyles.caption2Strong,\n\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n color: tokens.colorNeutralForeground2,\n\n minWidth: '14px',\n height: '14px',\n verticalAlign: `calc((${typographyStyles.caption2Strong.lineHeight} - ${typographyStyles.caption2Strong.fontSize}) / 2)`,\n paddingInline: tokens.spacingHorizontalXXS,\n\n borderRadius: tokens.borderRadiusMedium,\n\n textDecoration: 'none',\n\n marginLeft: tokens.spacingHorizontalXXS,\n marginRight: tokens.spacingHorizontalXXS,\n\n ':hover': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Hover,\n borderColor: tokens.colorBrandStroke2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n\n ':hover:active': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Pressed,\n borderColor: tokens.colorBrandStroke2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n});\n\nconst useCitationRootStyles = makeStyles({\n isBlock: {\n display: 'flex',\n marginLeft: 0,\n marginRight: 0,\n },\n isPopoverLocked: {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n ':hover': {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n },\n },\n});\n\nconst useNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\n/**\n * Apply styling to the Citation slots based on the state\n */\nexport const useCitationStyles_unstable = (state: CitationState): CitationState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const rootBaseClassName = useCitationBaseClassName();\n const rootStyles = useCitationRootStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n citationClassNames.root,\n state.isPopoverLocked && rootStyles.isPopoverLocked,\n state.block && rootStyles.isBlock,\n rootBaseClassName,\n designVersion === 'next' && nextStyles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["citationClassNames","useCitationStyles_unstable","root","useCitationBaseClassName","makeResetStyles","display","__styles","justifyContent","boxSizing","alignItems","cursor","backgroundColor","border","color","tokens","minWidth","height","verticalAlign","typographyStyles","paddingInline","borderRadius","textDecoration","marginLeft","spacingHorizontalXXS","marginRight","gg5e9n","colorBrandBackground2Hover","borderColor","Btl43ni","B7oj6ja","Dimara","useCitationRootStyles","state","rootBaseClassName","useNextStyles","borderRadiusXLarge","isPopoverLocked","rootStyles","block","isBlock","designVersion","nextStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,kBAAAA;eAAAA;;IAqDTC,0BAAU;eAAVA;;;iCA1D4E;AAKzE,MAAMD,qBAAoD;UAC/DE;AACF;AAEA,MAAMC,2BAA2BC,IAAAA,8BAAAA,EAAAA,WAAgB,WAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;CAAA;MAC/CC,wBAASC,IAAAA,yBAAA,EAAA;aACTC;QACAC,QAAAA;QACAC,QAAAA;YAAAA;YAAY;SAAA;QACZC,QAAQ;YAAA;YAAA;SAAA;;qBAGRC;QACAC,QAAQ;QACRC,QAAOC;QAEPC,QAAAA;YAAAA;YAAU;SAAA;QACVC,SAAQ;QACRC,QAAAA;YAAAA;YAAgB;SAAQC;QACxBC,QAAAA;QAEAC,SAAAA;QAEAC,SAAAA;QAEAC,SAAAA;YAAAA;YAAmBC;SAAAA;QACnBC,QAAAA;QAEAC,QAAA;YAAA;YAAU;SAAA;gBACRf;;;;;QAGwBgB;QAA0B;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;OACpD;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;;sBAGUpB,IAAAA,yBAAA,EAAA;UACRO;iBACAc;iBACAhB;QACFiB,SAAA;QACFC,SAAA;QAEAC,QAAMC;;;;;;YAGU;oBACZP;;SACF;KAAA;;MAKEvB,6BAAU+B,CAAAA;;yBAIV,KACFA;IACF,MAAAC,oBAAA9B;IAEA,MAAM+B,aAAAA;UAA6BhC,aAAMgC;UAAEd,IAAAA,CAAAA,SAAcN,GAAAA,IAAAA,6BAAOqB,EAAAA,mBAAkBjC,IAAA,EAAA8B,MAAAI,eAAA,IAAAC,WAAAD,eAAA,EAAAJ,MAAAM,KAAA,IAAAD,WAAAE,OAAA,EAAAN,mBAAAO,kBAAA,UAAAC,WAAAvC,IAAA,EAAA8B,MAAA9B,IAAA,CAAAwC,SAAA;WAACV;AAAE,GAErF,oDAAA"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
citationClassNames: function() {
|
|
13
|
+
return citationClassNames;
|
|
14
|
+
},
|
|
15
|
+
useCitationStyles_unstable: function() {
|
|
16
|
+
return useCitationStyles_unstable;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
20
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
21
|
+
const citationClassNames = {
|
|
22
|
+
root: 'fai-Citation'
|
|
23
|
+
};
|
|
24
|
+
const useCitationBaseClassName = (0, _reactcomponents.makeResetStyles)({
|
|
25
|
+
display: 'inline-flex',
|
|
26
|
+
justifyContent: 'center',
|
|
27
|
+
boxSizing: 'border-box',
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
cursor: 'pointer',
|
|
30
|
+
..._reactcomponents.typographyStyles.caption2Strong,
|
|
31
|
+
backgroundColor: _tokens.tokens.colorNeutralBackground3,
|
|
32
|
+
border: `${_tokens.tokens.strokeWidthThin} solid ${_tokens.tokens.colorNeutralStroke2}`,
|
|
33
|
+
color: _tokens.tokens.colorNeutralForeground2,
|
|
34
|
+
minWidth: '14px',
|
|
35
|
+
height: '14px',
|
|
36
|
+
verticalAlign: `calc((${_reactcomponents.typographyStyles.caption2Strong.lineHeight} - ${_reactcomponents.typographyStyles.caption2Strong.fontSize}) / 2)`,
|
|
37
|
+
paddingInline: _tokens.tokens.spacingHorizontalXXS,
|
|
38
|
+
borderRadius: _tokens.tokens.borderRadiusMedium,
|
|
39
|
+
textDecoration: 'none',
|
|
40
|
+
marginLeft: _tokens.tokens.spacingHorizontalXXS,
|
|
41
|
+
marginRight: _tokens.tokens.spacingHorizontalXXS,
|
|
42
|
+
':hover': {
|
|
43
|
+
cursor: 'pointer',
|
|
44
|
+
color: _tokens.tokens.colorBrandForeground2Hover,
|
|
45
|
+
borderColor: _tokens.tokens.colorBrandStroke2Hover,
|
|
46
|
+
backgroundColor: _tokens.tokens.colorBrandBackground2Hover
|
|
47
|
+
},
|
|
48
|
+
':hover:active': {
|
|
49
|
+
cursor: 'pointer',
|
|
50
|
+
color: _tokens.tokens.colorBrandForeground2Pressed,
|
|
51
|
+
borderColor: _tokens.tokens.colorBrandStroke2Pressed,
|
|
52
|
+
backgroundColor: _tokens.tokens.colorBrandBackground2Pressed
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const useCitationRootStyles = (0, _reactcomponents.makeStyles)({
|
|
56
|
+
isBlock: {
|
|
57
|
+
display: 'flex',
|
|
58
|
+
marginLeft: 0,
|
|
59
|
+
marginRight: 0
|
|
60
|
+
},
|
|
61
|
+
isPopoverLocked: {
|
|
62
|
+
color: _tokens.tokens.colorBrandForeground2Pressed,
|
|
63
|
+
..._reactcomponents.shorthands.borderColor(_tokens.tokens.colorBrandStroke2Pressed),
|
|
64
|
+
backgroundColor: _tokens.tokens.colorBrandBackground2,
|
|
65
|
+
':hover': {
|
|
66
|
+
color: _tokens.tokens.colorBrandForeground2Pressed,
|
|
67
|
+
..._reactcomponents.shorthands.borderColor(_tokens.tokens.colorBrandStroke2Pressed),
|
|
68
|
+
backgroundColor: _tokens.tokens.colorBrandBackground2
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
const useNextStyles = (0, _reactcomponents.makeStyles)({
|
|
73
|
+
root: {
|
|
74
|
+
borderRadius: _tokens.tokens.borderRadiusXLarge
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const useCitationStyles_unstable = (state)=>{
|
|
78
|
+
'use no memo';
|
|
79
|
+
const { designVersion } = state;
|
|
80
|
+
const rootBaseClassName = useCitationBaseClassName();
|
|
81
|
+
const rootStyles = useCitationRootStyles();
|
|
82
|
+
const nextStyles = useNextStyles();
|
|
83
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(citationClassNames.root, state.isPopoverLocked && rootStyles.isPopoverLocked, state.block && rootStyles.isBlock, rootBaseClassName, designVersion === 'next' && nextStyles.root, state.root.className);
|
|
84
|
+
return state;
|
|
85
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useCitationStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses, shorthands, typographyStyles } from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { CitationSlots, CitationState } from './Citation.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const citationClassNames: SlotClassNames<CitationSlots> = {\n root: 'fai-Citation',\n};\n\nconst useCitationBaseClassName = makeResetStyles({\n display: 'inline-flex',\n justifyContent: 'center',\n boxSizing: 'border-box',\n alignItems: 'center',\n cursor: 'pointer',\n ...typographyStyles.caption2Strong,\n\n backgroundColor: tokens.colorNeutralBackground3,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke2}`,\n color: tokens.colorNeutralForeground2,\n\n minWidth: '14px',\n height: '14px',\n verticalAlign: `calc((${typographyStyles.caption2Strong.lineHeight} - ${typographyStyles.caption2Strong.fontSize}) / 2)`,\n paddingInline: tokens.spacingHorizontalXXS,\n\n borderRadius: tokens.borderRadiusMedium,\n\n textDecoration: 'none',\n\n marginLeft: tokens.spacingHorizontalXXS,\n marginRight: tokens.spacingHorizontalXXS,\n\n ':hover': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Hover,\n borderColor: tokens.colorBrandStroke2Hover,\n backgroundColor: tokens.colorBrandBackground2Hover,\n },\n\n ':hover:active': {\n cursor: 'pointer',\n color: tokens.colorBrandForeground2Pressed,\n borderColor: tokens.colorBrandStroke2Pressed,\n backgroundColor: tokens.colorBrandBackground2Pressed,\n },\n});\n\nconst useCitationRootStyles = makeStyles({\n isBlock: {\n display: 'flex',\n marginLeft: 0,\n marginRight: 0,\n },\n isPopoverLocked: {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n ':hover': {\n color: tokens.colorBrandForeground2Pressed,\n ...shorthands.borderColor(tokens.colorBrandStroke2Pressed),\n backgroundColor: tokens.colorBrandBackground2,\n },\n },\n});\n\nconst useNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\n/**\n * Apply styling to the Citation slots based on the state\n */\nexport const useCitationStyles_unstable = (state: CitationState): CitationState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const rootBaseClassName = useCitationBaseClassName();\n const rootStyles = useCitationRootStyles();\n const nextStyles = useNextStyles();\n\n state.root.className = mergeClasses(\n citationClassNames.root,\n state.isPopoverLocked && rootStyles.isPopoverLocked,\n state.block && rootStyles.isBlock,\n rootBaseClassName,\n designVersion === 'next' && nextStyles.root,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["citationClassNames","useCitationStyles_unstable","root","useCitationBaseClassName","makeResetStyles","display","justifyContent","boxSizing","alignItems","cursor","typographyStyles","caption2Strong","backgroundColor","tokens","colorNeutralBackground3","border","strokeWidthThin","colorNeutralStroke2","color","colorNeutralForeground2","minWidth","height","verticalAlign","lineHeight","fontSize","paddingInline","spacingHorizontalXXS","borderRadius","borderRadiusMedium","textDecoration","marginLeft","marginRight","colorBrandForeground2Hover","borderColor","colorBrandStroke2Hover","colorBrandBackground2Hover","colorBrandForeground2Pressed","colorBrandStroke2Pressed","colorBrandBackground2Pressed","useCitationRootStyles","makeStyles","isBlock","isPopoverLocked","shorthands","colorBrandBackground2","useNextStyles","borderRadiusXLarge","state","designVersion","rootBaseClassName","rootStyles","nextStyles","className","mergeClasses","block"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKaA,kBAAAA;eAAAA;;IAkEAC,0BAAAA;eAAAA;;;iCAvE2E;wBACjE;AAIhB,MAAMD,qBAAoD;IAC/DE,MAAM;AACR;AAEA,MAAMC,2BAA2BC,IAAAA,gCAAAA,EAAgB;IAC/CC,SAAS;IACTC,gBAAgB;IAChBC,WAAW;IACXC,YAAY;IACZC,QAAQ;IACR,GAAGC,iCAAAA,CAAiBC,cAAc;IAElCC,iBAAiBC,cAAAA,CAAOC,uBAAuB;IAC/CC,QAAQ,CAAC,EAAEF,cAAAA,CAAOG,e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2BAAAA,EAAW;IAAEtC,MAAM;QAAEyB,cAAcd,cAAAA,CAAOiC,kBAAkB;IAAC;AAAE;AAK9E,MAAM7C,6BAA6B,CAAC8C;IACzC;IAEA,MAAM,EAAEC,aAAa,EAAE,GAAGD;IAE1B,MAAME,oBAAoB9C;IAC1B,MAAM+C,aAAaX;IACnB,MAAMY,aAAaN;IAEnBE,MAAM7C,IAAI,CAACkD,SAAS,GAAGC,IAAAA,6BAAAA,EACrBrD,mBAAmBE,IAAI,EACvB6C,MAAML,eAAe,IAAIQ,WAAWR,eAAe,EACnDK,MAAMO,KAAK,IAAIJ,WAAWT,OAAO,EACjCQ,mBACAD,kBAAkB,UAAUG,WAAWjD,IAAI,EAC3C6C,MAAM7C,IAAI,CAACkD,SAAS;IAGtB,OAAOL;AACT"}
|
|
@@ -20,4 +20,4 @@ const Reference = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
|
20
20
|
(0, _reactprovider.useCustomStyleHook)('useReferenceStyles')(state);
|
|
21
21
|
return (0, _renderReference.renderReference_unstable)(state);
|
|
22
22
|
});
|
|
23
|
-
Reference.displayName = 'Reference';
|
|
23
|
+
Reference.displayName = 'Reference';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Reference.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReference_unstable } from './useReference';\nimport { renderReference_unstable } from './renderReference';\nimport { useReferenceStyles_unstable } from './useReferenceStyles.styles';\nimport type { ReferenceProps } from './Reference.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const Reference: ForwardRefComponent<ReferenceProps> = React.forwardRef((props, ref) => {\n const state = useReference_unstable(props, ref);\n\n useReferenceStyles_unstable(state);\n useCustomStyleHook('useReferenceStyles')(state);\n\n return renderReference_unstable(state);\n});\n\nReference.displayName = 'Reference';\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["Reference.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useReference_unstable } from './useReference';\nimport { renderReference_unstable } from './renderReference';\nimport { useReferenceStyles_unstable } from './useReferenceStyles.styles';\nimport type { ReferenceProps } from './Reference.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const Reference: ForwardRefComponent<ReferenceProps> = React.forwardRef((props, ref) => {\n const state = useReference_unstable(props, ref);\n\n useReferenceStyles_unstable(state);\n useCustomStyleHook('useReferenceStyles')(state);\n\n return renderReference_unstable(state);\n});\n\nReference.displayName = 'Reference';\n"],"names":["Reference","React","forwardRef","props","ref","state","useReference_unstable","useReferenceStyles_unstable","useCustomStyleHook","renderReference_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BASaA;;;eAAAA;;;;iEATU;8BACe;iCACG;0CACG;+BAGT;AAG5B,MAAMA,YAAAA,WAAAA,GAAiDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQC,IAAAA,mCAAAA,EAAsBH,OAAOC;IAE3CG,IAAAA,qDAAAA,EAA4BF;IAC5BG,IAAAA,iCAAAA,EAAmB,sBAAsBH;IAEzC,OAAOI,IAAAA,yCAAAA,EAAyBJ;AAClC;AAEAL,UAAUU,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["renderReference.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport type { ReferenceState, ReferenceSlots } from './Reference.types';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const renderReference_unstable = (state: ReferenceState) => {\n assertSlots<ReferenceSlots>(state);\n\n return (\n <state.root>\n {state.citation && <state.citation />}\n {state.media && <state.media />}\n <state.label />\n {state.actions && (\n <state.actions>\n {state.actions.children}\n {state.detailsButton && <state.detailsButton />}\n </state.actions>\n )}\n {state.sensitivity && <state.sensitivity />}\n <state.metadata>\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.tertiaryText && <state.tertiaryText />}\n {state.icon && <state.icon />}\n {state.metadata.children}\n </state.metadata>\n <state.content />\n </state.root>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["renderReference.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\n\nimport type { ReferenceState, ReferenceSlots } from './Reference.types';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const renderReference_unstable = (state: ReferenceState) => {\n assertSlots<ReferenceSlots>(state);\n\n return (\n <state.root>\n {state.citation && <state.citation />}\n {state.media && <state.media />}\n <state.label />\n {state.actions && (\n <state.actions>\n {state.actions.children}\n {state.detailsButton && <state.detailsButton />}\n </state.actions>\n )}\n {state.sensitivity && <state.sensitivity />}\n <state.metadata>\n {state.primaryText && <state.primaryText />}\n {state.secondaryText && <state.secondaryText />}\n {state.tertiaryText && <state.tertiaryText />}\n {state.icon && <state.icon />}\n {state.metadata.children}\n </state.metadata>\n <state.content />\n </state.root>\n );\n};\n"],"names":["renderReference_unstable","state","assertSlots","_jsxs","root","citation","_jsx","media","label","actions","children","detailsButton","sensitivity","metadata","primaryText","secondaryText","tertiaryText","icon","content"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;4BAPb;iCAE4B;AAKrB,MAAMA,2BAA2B,CAACC;IACvCC,IAAAA,4BAAAA,EAA4BD;IAE5B,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;YACRH,MAAMI,QAAQ,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACL,MAAMI,QAAQ,EAAA,CAAA;YACjCJ,MAAMM,KAAK,IAAA,WAAA,GAAID,IAAAA,eAAA,EAACL,MAAMM,KAAK,EAAA,CAAA;0BAC5BD,IAAAA,eAAA,EAACL,MAAMO,KAAK,EAAA,CAAA;YACXP,MAAMQ,OAAO,IAAA,WAAA,GACZN,IAAAA,gBAAA,EAACF,MAAMQ,OAAO,EAAA;;oBACXR,MAAMQ,OAAO,CAACC,QAAQ;oBACtBT,MAAMU,aAAa,IAAA,WAAA,GAAIL,IAAAA,eAAA,EAACL,MAAMU,aAAa,EAAA,CAAA;;;YAG/CV,MAAMW,WAAW,IAAA,WAAA,GAAIN,IAAAA,eAAA,EAACL,MAAMW,WAAW,EAAA,CAAA;0BACxCT,IAAAA,gBAAA,EAACF,MAAMY,QAAQ,EAAA;;oBACZZ,MAAMa,WAAW,IAAA,WAAA,GAAIR,IAAAA,eAAA,EAACL,MAAMa,WAAW,EAAA,CAAA;oBACvCb,MAAMc,aAAa,IAAA,WAAA,GAAIT,IAAAA,eAAA,EAACL,MAAMc,aAAa,EAAA,CAAA;oBAC3Cd,MAAMe,YAAY,IAAA,WAAA,GAAIV,IAAAA,eAAA,EAACL,MAAMe,YAAY,EAAA,CAAA;oBACzCf,MAAMgB,IAAI,IAAA,WAAA,GAAIX,IAAAA,eAAA,EAACL,MAAMgB,IAAI,EAAA,CAAA;oBACzBhB,MAAMY,QAAQ,CAACH,QAAQ;;;0BAE1BJ,IAAAA,eAAA,EAACL,MAAMiB,OAAO,EAAA,CAAA;;;AAGpB"}
|
|
@@ -193,4 +193,4 @@ const getIcon = (isExpanded, mode)=>{
|
|
|
193
193
|
return !isExpanded ? /*#__PURE__*/ _react.createElement(_reacticons.ChevronDown16Regular, null) : /*#__PURE__*/ _react.createElement(_reacticons.ChevronUp16Regular, null);
|
|
194
194
|
}
|
|
195
195
|
return !isExpanded ? /*#__PURE__*/ _react.createElement(_reacticons.ChevronDown24Regular, null) : /*#__PURE__*/ _react.createElement(_reacticons.ChevronUp24Regular, null);
|
|
196
|
-
};
|
|
196
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useReference.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Button,\n Caption1,\n getIntrinsicElementProps,\n mergeCallbacks,\n mergeClasses,\n slot,\n useId,\n usePopoverContext_unstable as usePopoverContext,\n} from '@fluentui/react-components';\nimport {\n ChevronDown24Regular,\n ChevronUp24Regular,\n ChevronDown16Regular,\n ChevronUp16Regular,\n} from '@fluentui/react-icons';\nimport { referenceExtraClassNames } from './useReferenceStyles.styles';\nimport { Citation } from '../Citation';\nimport type { ReferenceProps, ReferenceState } from './Reference.types';\nimport { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Reference.\n *\n * The returned state can be modified with hooks such as useReferenceStyles_unstable,\n * before being passed to renderReference_unstable.\n *\n * @param props - props from this instance of Reference\n * @param ref - reference to root HTMLElement of Reference\n *\n * deprecated Use ReferenceV2 component, hooks and types instead.\n */\nexport const useReference_unstable = (props: ReferenceProps, ref: React.Ref<HTMLDivElement>): ReferenceState => {\n const { index, referenceId, citationHref, excerpt, layout = 'inline' } = props;\n\n const mode = useCopilotMode(props.mode);\n\n const labelId = useId();\n const mediaId = useId();\n const [isExpanded, setIsExpanded] = React.useState(layout === 'popover' ? true : false);\n\n const setPopoverOpen = usePopoverContext(context => context.setOpen);\n\n const onExpandClick: React.MouseEventHandler<HTMLButtonElement> = _e => {\n setIsExpanded(!isExpanded);\n };\n\n const label = slot.always(props.label, {\n defaultProps: { id: labelId },\n elementType: 'div',\n });\n const media = slot.optional(props.media, { defaultProps: { id: mediaId }, elementType: 'div' });\n if (media && React.isValidElement<HTMLElement>(media.children)) {\n media.children = React.cloneElement(media.children, {\n className: mergeClasses(media.children.props.className, referenceExtraClassNames.mediaChild),\n });\n }\n\n if (media?.id) {\n label['aria-describedby'] = label['aria-describedby']?.concat(media.id) ?? media.id;\n }\n\n const ariaLabelledByProp = props['aria-labelledby'];\n const groupSemantics = React.useMemo(() => {\n return layout === 'inline'\n ? {\n role: 'group',\n 'aria-labelledby': `${ariaLabelledByProp ?? ''} ${label.id}`,\n tabIndex: -1,\n }\n : {};\n }, [layout, ariaLabelledByProp, label.id]);\n\n // Within a popup, a citation should function as a close button\n const citationProps = React.useMemo(() => {\n const onPopoverCloseClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n setPopoverOpen(e, false);\n\n // don't navigate\n e.preventDefault();\n };\n\n return layout === 'popover'\n ? {\n referenceHref: '#',\n tabIndex: -1,\n 'aria-label': `Close Reference ${index}`,\n onClick: onPopoverCloseClick,\n }\n : {\n referenceHref: citationHref,\n };\n }, [layout, citationHref, index, setPopoverOpen]);\n\n const state: ReferenceState = {\n isExpanded,\n mode: layout === 'popover' ? 'sidecar' : mode,\n layout,\n index,\n components: {\n root: 'div',\n citation: 'div',\n media: 'div',\n actions: 'div',\n label: 'div',\n sensitivity: 'span',\n metadata: 'div',\n content: 'div',\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n icon: 'span',\n detailsButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n id: referenceId,\n ...groupSemantics,\n ...props,\n }),\n { elementType: 'div' },\n ),\n citation: slot.optional(props.citation, {\n defaultProps: {\n children: (\n <Citation block {...citationProps}>\n {index}\n </Citation>\n ),\n },\n renderByDefault: true,\n elementType: 'div',\n }),\n media,\n actions: slot.optional(layout === 'inline' ? props.actions : null, {\n renderByDefault: true,\n elementType: 'div',\n }),\n label,\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n metadata: slot.always(props.metadata, { elementType: 'div' }),\n primaryText: slot.optional(props.primaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n tertiaryText: slot.optional(props.tertiaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n content: slot.always(props.content, {\n defaultProps: {\n children: excerpt && <Caption1>{excerpt}</Caption1>,\n },\n elementType: 'div',\n }),\n detailsButton: slot.optional(layout === 'inline' ? props.detailsButton : null, {\n defaultProps: {\n appearance: 'transparent',\n 'aria-expanded': isExpanded,\n 'aria-label': 'show details',\n size: mode === 'sidecar' ? 'small' : 'medium',\n icon: {\n children: getIcon(isExpanded, mode),\n },\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n if (state.detailsButton) {\n const onClick = state.detailsButton.onClick as React.MouseEventHandler<HTMLButtonElement>;\n state.detailsButton.onClick = mergeCallbacks(onClick, onExpandClick);\n }\n\n const referenceGroupSetOpen = useReferenceGroupSetOpen();\n const onTargettedByCitation = (e: React.FocusEvent<HTMLElement>) => {\n const relatedTargetHash: string | undefined = (e.relatedTarget as HTMLAnchorElement)?.hash;\n if (relatedTargetHash && relatedTargetHash.substring(1) === referenceId) {\n referenceGroupSetOpen();\n setIsExpanded(true);\n }\n };\n state.root.onFocus = mergeCallbacks(state.root.onFocus, onTargettedByCitation);\n\n return state;\n};\n\nconst getIcon = (isExpanded: boolean, mode: ReferenceProps['mode']): JSX.Element => {\n if (mode === 'sidecar') {\n return !isExpanded ? <ChevronDown16Regular /> : <ChevronUp16Regular />;\n }\n\n return !isExpanded ? <ChevronDown24Regular /> : <ChevronUp24Regular />;\n};\n"],"names":["index","citationHref","ref","referenceId","mediaId","isExpanded","excerpt","setPopoverOpen","layout","onExpandClick","mode","useCopilotMode","props","labelId","slot","always","defaultProps","usePopoverContext","context","setOpen","elementType","_e","setIsExpanded","label","media","children","React","className","mergeClasses","referenceExtraClassNames","mediaChild","id","_label_ariadescribedby_concat","_label_ariadescribedby","concat","ariaLabelledByProp","tabIndex","onPopoverCloseClick","e","useMemo","referenceHref","state","components","root","citation","actions","sensitivity","metadata","primaryText","secondaryText","tertiaryText","detailsButton","Button","optional","Citation","hidden","icon","content","createElement","Caption1","appearance","size","onClick","mergeCallbacks","onTargettedByCitation","_e_relatedTarget","relatedTargetHash","onFocus","getIcon","ChevronDown24Regular","ChevronDown16Regular","ChevronUp24Regular","ChevronUp16Regular"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAmCUA;;;eAAAA;;;;iEAnCa;iCAUhB;4BAMA;0CACkC;0BAChB;uCAEgB;+BACV;AAc7B,MAAQA,wBAAoBC,CAAAA,OAAYC;UAExC,EAEAF,KAAA,EACAG,WAAMC,EACNH,YAAOI,EAEPC,OAAMC,EAENC,SAAMC,QAAAA;UAENC,OAAAC,IAAAA,6BAAA,EAAAC,MAAAF,IAAA;UAEAG,UAAcC,IAAAA,sBAAKC;UACjBC,UAAAA,IAAAA,sBAAc;uBAAMH,cAAAA,GAAAA,OAAAA,QAAAA,CAAAA,WAAAA,YAAAA,OAAAA;UAAQN,iBAAAU,IAAAA,2CAAA,EAAAC,CAAAA,UAAAA,QAAAC,OAAA;UAC5BC,gBAAaC,CAAAA;QACfC,cAAA,CAAAjB;;UAC2CW,QAAAA,qBAAAA,CAAAA,MAAc,CAAAJ,MAAAW,KAAA,EAAA;sBAAMnB;gBAAQS;;QAAsBO,aAAA;;UAE3FI,QAAMC,qBAAAA,CAAAA,QAAQ,CAAAb,MAAAY,KAAGE,EAAAA;sBACfC;gBACFvB;QACF;QAEAgB,aAAII;;iBAC0BD,WAAAA,GAAAA,OAAAA,cAAAA,CAAAA,MAAAA,QAAAA,GAAAA;cAA5BA,QAAM,GAAA,WAAA,GAAmBG,OAAGH,YAA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A,+BAAA,EAAAD,SAAArD;;UAEvBgC,wBAAoBqB,IAAAA,+CAAyBA;UAC/CE,wBAAA1B,CAAAA;QAEA,IAAA2B;QACA,MAAMD,oBAAAA,CAAAA,mBAAyB1B,EAAAA,aAAAA,MAAAA,QAAAA,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAAA,IAAAA;iCACkBA,kBAAAA,SAAAA,CAAAA,OAAAA,aAAAA;;0BAC3C4B;;;UAGJvB,IAAA,CAAAwB,OAAA,GAAAJ,IAAAA,+BAAA,EAAAtB,MAAAE,IAAA,CAAAwB,OAAA,EAAAH;WACFvB;;MAGA2B,UAAO3B,CAAAA,YAAAA;IACP,IAAA/B,SAAA,WAAA;QAEF,OAAM0D,CAAAA,aAAW/D,WAAqBK,GAAAA,OAAAA,aAAAA,CAAAA,gCAAAA,EAAAA,QAAAA,WAAAA,GAAAA,OAAAA,aAAAA,CAAAA,8BAAAA,EAAAA;;WAElC,CAAAL,aAAQA,WAAAA,GAAAA,OAAAA,aAAa,CAAAgE,gCAACC,EAAAA,QAAAA,WAAAA,GAAAA,OAAAA,aAA0B,CAAAC,8BAACC,EAAAA;2CAG9B"}
|
|
1
|
+
{"version":3,"sources":["useReference.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Button,\n Caption1,\n getIntrinsicElementProps,\n mergeCallbacks,\n mergeClasses,\n slot,\n useId,\n usePopoverContext_unstable as usePopoverContext,\n} from '@fluentui/react-components';\nimport {\n ChevronDown24Regular,\n ChevronUp24Regular,\n ChevronDown16Regular,\n ChevronUp16Regular,\n} from '@fluentui/react-icons';\nimport { referenceExtraClassNames } from './useReferenceStyles.styles';\nimport { Citation } from '../Citation';\nimport type { ReferenceProps, ReferenceState } from './Reference.types';\nimport { useReferenceGroupSetOpen } from '../../contexts/ReferenceGroupContext';\nimport { useCopilotMode } from '@fluentui-copilot/react-provider';\n\n/**\n * Create the state required to render Reference.\n *\n * The returned state can be modified with hooks such as useReferenceStyles_unstable,\n * before being passed to renderReference_unstable.\n *\n * @param props - props from this instance of Reference\n * @param ref - reference to root HTMLElement of Reference\n *\n * deprecated Use ReferenceV2 component, hooks and types instead.\n */\nexport const useReference_unstable = (props: ReferenceProps, ref: React.Ref<HTMLDivElement>): ReferenceState => {\n const { index, referenceId, citationHref, excerpt, layout = 'inline' } = props;\n\n const mode = useCopilotMode(props.mode);\n\n const labelId = useId();\n const mediaId = useId();\n const [isExpanded, setIsExpanded] = React.useState(layout === 'popover' ? true : false);\n\n const setPopoverOpen = usePopoverContext(context => context.setOpen);\n\n const onExpandClick: React.MouseEventHandler<HTMLButtonElement> = _e => {\n setIsExpanded(!isExpanded);\n };\n\n const label = slot.always(props.label, {\n defaultProps: { id: labelId },\n elementType: 'div',\n });\n const media = slot.optional(props.media, { defaultProps: { id: mediaId }, elementType: 'div' });\n if (media && React.isValidElement<HTMLElement>(media.children)) {\n media.children = React.cloneElement(media.children, {\n className: mergeClasses(media.children.props.className, referenceExtraClassNames.mediaChild),\n });\n }\n\n if (media?.id) {\n label['aria-describedby'] = label['aria-describedby']?.concat(media.id) ?? media.id;\n }\n\n const ariaLabelledByProp = props['aria-labelledby'];\n const groupSemantics = React.useMemo(() => {\n return layout === 'inline'\n ? {\n role: 'group',\n 'aria-labelledby': `${ariaLabelledByProp ?? ''} ${label.id}`,\n tabIndex: -1,\n }\n : {};\n }, [layout, ariaLabelledByProp, label.id]);\n\n // Within a popup, a citation should function as a close button\n const citationProps = React.useMemo(() => {\n const onPopoverCloseClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n setPopoverOpen(e, false);\n\n // don't navigate\n e.preventDefault();\n };\n\n return layout === 'popover'\n ? {\n referenceHref: '#',\n tabIndex: -1,\n 'aria-label': `Close Reference ${index}`,\n onClick: onPopoverCloseClick,\n }\n : {\n referenceHref: citationHref,\n };\n }, [layout, citationHref, index, setPopoverOpen]);\n\n const state: ReferenceState = {\n isExpanded,\n mode: layout === 'popover' ? 'sidecar' : mode,\n layout,\n index,\n components: {\n root: 'div',\n citation: 'div',\n media: 'div',\n actions: 'div',\n label: 'div',\n sensitivity: 'span',\n metadata: 'div',\n content: 'div',\n primaryText: 'span',\n secondaryText: 'span',\n tertiaryText: 'span',\n icon: 'span',\n detailsButton: Button,\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n id: referenceId,\n ...groupSemantics,\n ...props,\n }),\n { elementType: 'div' },\n ),\n citation: slot.optional(props.citation, {\n defaultProps: {\n children: (\n <Citation block {...citationProps}>\n {index}\n </Citation>\n ),\n },\n renderByDefault: true,\n elementType: 'div',\n }),\n media,\n actions: slot.optional(layout === 'inline' ? props.actions : null, {\n renderByDefault: true,\n elementType: 'div',\n }),\n label,\n sensitivity: slot.optional(props.sensitivity, { elementType: 'span' }),\n metadata: slot.always(props.metadata, { elementType: 'div' }),\n primaryText: slot.optional(props.primaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n secondaryText: slot.optional(props.secondaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n tertiaryText: slot.optional(props.tertiaryText, {\n defaultProps: {\n hidden: !isExpanded,\n },\n elementType: 'span',\n }),\n icon: slot.optional(props.icon, { elementType: 'span' }),\n content: slot.always(props.content, {\n defaultProps: {\n children: excerpt && <Caption1>{excerpt}</Caption1>,\n },\n elementType: 'div',\n }),\n detailsButton: slot.optional(layout === 'inline' ? props.detailsButton : null, {\n defaultProps: {\n appearance: 'transparent',\n 'aria-expanded': isExpanded,\n 'aria-label': 'show details',\n size: mode === 'sidecar' ? 'small' : 'medium',\n icon: {\n children: getIcon(isExpanded, mode),\n },\n },\n renderByDefault: true,\n elementType: Button,\n }),\n };\n\n if (state.detailsButton) {\n const onClick = state.detailsButton.onClick as React.MouseEventHandler<HTMLButtonElement>;\n state.detailsButton.onClick = mergeCallbacks(onClick, onExpandClick);\n }\n\n const referenceGroupSetOpen = useReferenceGroupSetOpen();\n const onTargettedByCitation = (e: React.FocusEvent<HTMLElement>) => {\n const relatedTargetHash: string | undefined = (e.relatedTarget as HTMLAnchorElement)?.hash;\n if (relatedTargetHash && relatedTargetHash.substring(1) === referenceId) {\n referenceGroupSetOpen();\n setIsExpanded(true);\n }\n };\n state.root.onFocus = mergeCallbacks(state.root.onFocus, onTargettedByCitation);\n\n return state;\n};\n\nconst getIcon = (isExpanded: boolean, mode: ReferenceProps['mode']): JSX.Element => {\n if (mode === 'sidecar') {\n return !isExpanded ? <ChevronDown16Regular /> : <ChevronUp16Regular />;\n }\n\n return !isExpanded ? <ChevronDown24Regular /> : <ChevronUp24Regular />;\n};\n"],"names":["useReference_unstable","props","ref","index","referenceId","citationHref","excerpt","layout","mode","useCopilotMode","labelId","useId","mediaId","isExpanded","setIsExpanded","React","useState","setPopoverOpen","usePopoverContext","context","setOpen","onExpandClick","_e","label","slot","always","defaultProps","id","elementType","media","optional","isValidElement","children","cloneElement","className","mergeClasses","referenceExtraClassNames","mediaChild","concat","ariaLabelledByProp","groupSemantics","useMemo","role","tabIndex","citationProps","onPopoverCloseClick","e","preventDefault","referenceHref","onClick","state","components","root","citation","actions","sensitivity","metadata","content","primaryText","secondaryText","tertiaryText","icon","detailsButton","Button","getIntrinsicElementProps","createElement","Citation","block","renderByDefault","hidden","Caption1","appearance","size","getIcon","mergeCallbacks","referenceGroupSetOpen","useReferenceGroupSetOpen","onTargettedByCitation","relatedTargetHash","relatedTarget","_e_relatedTarget","hash","substring","onFocus","ChevronDown16Regular","ChevronUp16Regular","ChevronDown24Regular","ChevronUp24Regular"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAkCaA;;;eAAAA;;;;iEAl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AAAkD,aAAA,CAACsB,8BAAAA,EAAAA;AACnD"}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
referenceClassNames: function() {
|
|
13
|
+
return referenceClassNames;
|
|
14
|
+
},
|
|
15
|
+
referenceExtraClassNames: function() {
|
|
16
|
+
return referenceExtraClassNames;
|
|
17
|
+
},
|
|
18
|
+
useReferenceStyles_unstable: function() {
|
|
19
|
+
return useReferenceStyles_unstable;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
23
|
+
const _tokens = require("@fluentui-copilot/tokens");
|
|
24
|
+
const referenceClassNames = {
|
|
25
|
+
root: 'fai-Reference',
|
|
26
|
+
citation: 'fai-Reference__citation',
|
|
27
|
+
media: 'fai-Reference__media',
|
|
28
|
+
actions: 'fai-Reference__actions',
|
|
29
|
+
sensitivity: 'fai-Reference__sensitivity',
|
|
30
|
+
metadata: 'fai-Reference__metadata',
|
|
31
|
+
primaryText: 'fai-Reference__primaryText',
|
|
32
|
+
secondaryText: 'fai-Reference__secondaryText',
|
|
33
|
+
tertiaryText: 'fai-Reference__tertiaryText',
|
|
34
|
+
icon: 'fai-Reference__icon',
|
|
35
|
+
label: 'fai-Reference__label',
|
|
36
|
+
content: 'fai-Reference__content',
|
|
37
|
+
detailsButton: 'fai-Reference__detailsButton'
|
|
38
|
+
};
|
|
39
|
+
const referenceExtraClassNames = {
|
|
40
|
+
text: 'fai-Reference__text',
|
|
41
|
+
mediaChild: 'fai-Reference__mediaChild'
|
|
42
|
+
};
|
|
43
|
+
const labelFontSize = _reactcomponents.typographyStyles.caption1Strong.fontSize;
|
|
44
|
+
const labelLineHeight = _reactcomponents.typographyStyles.caption1Strong.lineHeight;
|
|
45
|
+
const maxPopoverWidth = '256px';
|
|
46
|
+
const useReferenceClassName = (0, _reactcomponents.makeResetStyles)({
|
|
47
|
+
boxSizing: 'border-box',
|
|
48
|
+
width: '100%',
|
|
49
|
+
display: 'grid',
|
|
50
|
+
gridTemplateAreas: `
|
|
51
|
+
"citation media title actions"
|
|
52
|
+
". . title ."
|
|
53
|
+
"sensitivityLabel sensitivityLabel sensitivityLabel sensitivityLabel"
|
|
54
|
+
"metadata metadata metadata metadata"
|
|
55
|
+
"content content content content"
|
|
56
|
+
`,
|
|
57
|
+
gridTemplateColumns: 'min-content min-content 1fr min-content',
|
|
58
|
+
gridTemplateRows: '32px auto auto auto auto',
|
|
59
|
+
border: `${_tokens.tokens.strokeWidthThin} solid ${_tokens.tokens.colorNeutralStroke1}`,
|
|
60
|
+
borderRadius: _tokens.tokens.borderRadiusMedium,
|
|
61
|
+
padding: `${_tokens.tokens.spacingVerticalS} ${_tokens.tokens.spacingHorizontalS}`,
|
|
62
|
+
boxShadow: 'none',
|
|
63
|
+
columnGap: _tokens.tokens.spacingHorizontalXS,
|
|
64
|
+
alignItems: 'center'
|
|
65
|
+
});
|
|
66
|
+
const useStyles = (0, _reactcomponents.makeStyles)({
|
|
67
|
+
canvas: {},
|
|
68
|
+
sidecar: {
|
|
69
|
+
gridTemplateRows: '24px auto auto auto',
|
|
70
|
+
padding: `${_tokens.tokens.spacingVerticalXS} ${_tokens.tokens.spacingHorizontalS}`
|
|
71
|
+
},
|
|
72
|
+
inline: {},
|
|
73
|
+
popover: {
|
|
74
|
+
..._reactcomponents.shorthands.borderWidth('0px'),
|
|
75
|
+
width: `calc(${maxPopoverWidth} - (${_tokens.tokens.spacingHorizontalM} * 2))`,
|
|
76
|
+
padding: '0px'
|
|
77
|
+
},
|
|
78
|
+
closed: {
|
|
79
|
+
rowGap: 0
|
|
80
|
+
},
|
|
81
|
+
citation: {
|
|
82
|
+
gridArea: 'citation'
|
|
83
|
+
},
|
|
84
|
+
media: {
|
|
85
|
+
gridArea: 'media',
|
|
86
|
+
display: 'flex',
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
justifyContent: 'center'
|
|
89
|
+
},
|
|
90
|
+
mediaPopover: {
|
|
91
|
+
width: '16px',
|
|
92
|
+
height: '16px',
|
|
93
|
+
[`> .${referenceExtraClassNames.mediaChild}`]: {
|
|
94
|
+
width: '16px',
|
|
95
|
+
height: '16px'
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
actions: {
|
|
99
|
+
gridArea: 'actions',
|
|
100
|
+
justifySelf: 'end',
|
|
101
|
+
display: 'flex',
|
|
102
|
+
gridRowStart: 1
|
|
103
|
+
},
|
|
104
|
+
detailsButton: {
|
|
105
|
+
[`> ${_reactcomponents.buttonClassNames.icon}`]: {
|
|
106
|
+
color: _tokens.tokens.colorNeutralForeground3
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
sensitivity: {
|
|
110
|
+
gridArea: 'sensitivityLabel',
|
|
111
|
+
justifySelf: 'start'
|
|
112
|
+
},
|
|
113
|
+
metadata: {
|
|
114
|
+
marginTop: _tokens.tokens.spacingVerticalXS,
|
|
115
|
+
gridArea: 'metadata',
|
|
116
|
+
..._reactcomponents.typographyStyles.caption2
|
|
117
|
+
},
|
|
118
|
+
metadataSubsequentText: {
|
|
119
|
+
position: 'relative',
|
|
120
|
+
marginLeft: _tokens.tokens.spacingHorizontalS,
|
|
121
|
+
'&::before': {
|
|
122
|
+
content: '""',
|
|
123
|
+
display: 'block',
|
|
124
|
+
position: 'absolute',
|
|
125
|
+
left: `calc(${_tokens.tokens.spacingHorizontalS} / -2)`,
|
|
126
|
+
top: `calc((${_reactcomponents.typographyStyles.caption2.lineHeight} - ${_reactcomponents.typographyStyles.caption2.fontSize}) / 2)`,
|
|
127
|
+
height: _reactcomponents.typographyStyles.caption2.fontSize,
|
|
128
|
+
..._reactcomponents.shorthands.borderLeft(_tokens.tokens.strokeWidthThin, 'solid', _tokens.tokens.colorNeutralStroke2)
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
icon: {
|
|
132
|
+
..._reactcomponents.typographyStyles.caption2,
|
|
133
|
+
verticalAlign: 'middle'
|
|
134
|
+
},
|
|
135
|
+
content: {
|
|
136
|
+
marginTop: _tokens.tokens.spacingVerticalXS,
|
|
137
|
+
gridArea: 'content',
|
|
138
|
+
display: 'flex',
|
|
139
|
+
flexDirection: 'column',
|
|
140
|
+
rowGap: _tokens.tokens.spacingVerticalS,
|
|
141
|
+
color: _tokens.tokens.colorNeutralForeground3,
|
|
142
|
+
wordBreak: 'break-word'
|
|
143
|
+
},
|
|
144
|
+
hidden: {
|
|
145
|
+
display: 'none'
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
const useLabelStyles = (0, _reactcomponents.makeStyles)({
|
|
149
|
+
root: {
|
|
150
|
+
gridArea: 'title',
|
|
151
|
+
alignSelf: 'start',
|
|
152
|
+
..._reactcomponents.typographyStyles.caption1Strong,
|
|
153
|
+
wordBreak: 'break-word',
|
|
154
|
+
'-webkit-box-orient': 'vertical',
|
|
155
|
+
'-webkit-line-clamp': '2',
|
|
156
|
+
display: '-webkit-box',
|
|
157
|
+
overflowY: 'hidden'
|
|
158
|
+
},
|
|
159
|
+
canvas: {
|
|
160
|
+
// 24px is the height of the tallest element within the reference
|
|
161
|
+
paddingTop: `calc((24px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`
|
|
162
|
+
},
|
|
163
|
+
sidecar: {
|
|
164
|
+
// 16px is the height of the tallest element within the reference
|
|
165
|
+
paddingTop: `calc((16px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`
|
|
166
|
+
},
|
|
167
|
+
closed: {
|
|
168
|
+
maxWidth: '100%',
|
|
169
|
+
'-webkit-line-clamp': '1'
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
const useReferenceStyles_unstable = (state)=>{
|
|
173
|
+
'use no memo';
|
|
174
|
+
const { isExpanded, mode, layout } = state;
|
|
175
|
+
const rootClassName = useReferenceClassName();
|
|
176
|
+
const styles = useStyles();
|
|
177
|
+
const labelStyles = useLabelStyles();
|
|
178
|
+
state.root.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.root, rootClassName, styles[mode], styles[layout], !isExpanded && styles.closed, state.root.className);
|
|
179
|
+
if (state.citation) {
|
|
180
|
+
state.citation.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.citation, styles.citation, state.citation.className);
|
|
181
|
+
}
|
|
182
|
+
if (state.media) {
|
|
183
|
+
state.media.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.media, styles.media, layout === 'popover' && styles.mediaPopover, state.media.className);
|
|
184
|
+
}
|
|
185
|
+
if (state.actions) {
|
|
186
|
+
state.actions.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.actions, styles.actions, state.actions.className);
|
|
187
|
+
}
|
|
188
|
+
state.label.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.label, labelStyles.root, labelStyles[mode], !isExpanded && labelStyles.closed, state.label.className);
|
|
189
|
+
if (state.sensitivity) {
|
|
190
|
+
state.sensitivity.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.sensitivity, styles.sensitivity, !isExpanded && styles.hidden, state.sensitivity.className);
|
|
191
|
+
}
|
|
192
|
+
state.metadata.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.metadata, styles.metadata, !isExpanded && styles.hidden, state.metadata.className);
|
|
193
|
+
let isSubsequentText = false;
|
|
194
|
+
if (state.primaryText) {
|
|
195
|
+
state.primaryText.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.primaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.primaryText.className);
|
|
196
|
+
isSubsequentText = true;
|
|
197
|
+
}
|
|
198
|
+
if (state.secondaryText) {
|
|
199
|
+
state.secondaryText.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.secondaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.secondaryText.className);
|
|
200
|
+
isSubsequentText = true;
|
|
201
|
+
}
|
|
202
|
+
if (state.tertiaryText) {
|
|
203
|
+
state.tertiaryText.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.tertiaryText, referenceExtraClassNames.text, isSubsequentText && styles.metadataSubsequentText, state.tertiaryText.className);
|
|
204
|
+
isSubsequentText = true;
|
|
205
|
+
}
|
|
206
|
+
if (state.icon) {
|
|
207
|
+
state.icon.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.icon, styles.icon, state.icon.className);
|
|
208
|
+
}
|
|
209
|
+
state.content.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.content, styles.content, !isExpanded && styles.hidden, state.content.className);
|
|
210
|
+
if (state.detailsButton) {
|
|
211
|
+
state.detailsButton.className = (0, _reactcomponents.mergeClasses)(referenceClassNames.detailsButton, styles.detailsButton, state.detailsButton.className);
|
|
212
|
+
}
|
|
213
|
+
return state;
|
|
214
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["useReferenceStyles.styles.ts"],"sourcesContent":["import {\n buttonClassNames,\n makeResetStyles,\n makeStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { ReferenceSlots, ReferenceState } from './Reference.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const referenceClassNames: SlotClassNames<ReferenceSlots> = {\n root: 'fai-Reference',\n citation: 'fai-Reference__citation',\n media: 'fai-Reference__media',\n actions: 'fai-Reference__actions',\n sensitivity: 'fai-Reference__sensitivity',\n metadata: 'fai-Reference__metadata',\n primaryText: 'fai-Reference__primaryText',\n secondaryText: 'fai-Reference__secondaryText',\n tertiaryText: 'fai-Reference__tertiaryText',\n icon: 'fai-Reference__icon',\n label: 'fai-Reference__label',\n content: 'fai-Reference__content',\n detailsButton: 'fai-Reference__detailsButton',\n};\n\n/** deprecated Use ReferenceV2 component, hooks and types instead. */\nexport const referenceExtraClassNames = {\n text: 'fai-Reference__text',\n mediaChild: 'fai-Reference__mediaChild',\n};\n\nconst labelFontSize = typographyStyles.caption1Strong.fontSize;\nconst labelLineHeight = typographyStyles.caption1Strong.lineHeight;\n\nconst maxPopoverWidth = '256px';\n\nconst useReferenceClassName = makeResetStyles({\n boxSizing: 'border-box',\n width: '100%',\n display: 'grid',\n gridTemplateAreas: `\n \"citation media title actions\"\n \". . title .\"\n \"sensitivityLabel sensitivityLabel sensitivityLabel sensitivityLabel\"\n \"metadata metadata metadata metadata\"\n \"content content content content\"\n `,\n gridTemplateColumns: 'min-content min-content 1fr min-content',\n gridTemplateRows: '32px auto auto auto auto',\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n borderRadius: tokens.borderRadiusMedium,\n padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`,\n boxShadow: 'none',\n columnGap: tokens.spacingHorizontalXS,\n alignItems: 'center',\n});\n\nconst useStyles = makeStyles({\n canvas: {},\n sidecar: {\n gridTemplateRows: '24px auto auto auto',\n padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalS}`,\n },\n inline: {},\n popover: {\n ...shorthands.borderWidth('0px'),\n width: `calc(${maxPopoverWidth} - (${tokens.spacingHorizontalM} * 2))`,\n padding: '0px',\n },\n closed: {\n rowGap: 0,\n },\n citation: {\n gridArea: 'citation',\n },\n media: {\n gridArea: 'media',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n },\n mediaPopover: {\n width: '16px',\n height: '16px',\n\n [`> .${referenceExtraClassNames.mediaChild}`]: {\n width: '16px',\n height: '16px',\n },\n },\n actions: {\n gridArea: 'actions',\n justifySelf: 'end',\n display: 'flex',\n gridRowStart: 1,\n },\n detailsButton: {\n [`> ${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground3,\n },\n },\n sensitivity: {\n gridArea: 'sensitivityLabel',\n justifySelf: 'start',\n },\n metadata: {\n marginTop: tokens.spacingVerticalXS,\n\n gridArea: 'metadata',\n ...typographyStyles.caption2,\n },\n metadataSubsequentText: {\n position: 'relative',\n marginLeft: tokens.spacingHorizontalS,\n\n '&::before': {\n content: '\"\"',\n display: 'block',\n position: 'absolute',\n left: `calc(${tokens.spacingHorizontalS} / -2)`,\n top: `calc((${typographyStyles.caption2.lineHeight} - ${typographyStyles.caption2.fontSize}) / 2)`,\n height: typographyStyles.caption2.fontSize,\n ...shorthands.borderLeft(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke2),\n },\n },\n icon: {\n ...typographyStyles.caption2,\n verticalAlign: 'middle',\n },\n content: {\n marginTop: tokens.spacingVerticalXS,\n gridArea: 'content',\n display: 'flex',\n flexDirection: 'column',\n rowGap: tokens.spacingVerticalS,\n color: tokens.colorNeutralForeground3,\n wordBreak: 'break-word',\n },\n hidden: {\n display: 'none',\n },\n});\n\nconst useLabelStyles = makeStyles({\n root: {\n gridArea: 'title',\n alignSelf: 'start',\n ...typographyStyles.caption1Strong,\n wordBreak: 'break-word',\n '-webkit-box-orient': 'vertical',\n '-webkit-line-clamp': '2',\n display: '-webkit-box',\n overflowY: 'hidden',\n },\n\n canvas: {\n // 24px is the height of the tallest element within the reference\n paddingTop: `calc((24px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n sidecar: {\n // 16px is the height of the tallest element within the reference\n paddingTop: `calc((16px / 2 ) - (${labelLineHeight} - ${labelFontSize}))`,\n },\n\n closed: {\n maxWidth: '100%',\n '-webkit-line-clamp': '1',\n },\n});\n\n/**\n * Apply styling to the Reference slots based on the state\n *\n * deprecated Use ReferenceV2 component, hooks and types instead.\n */\nexport const useReferenceStyles_unstable = (state: ReferenceState): ReferenceState => {\n 'use no memo';\n\n const { isExpanded, mode, layout } = state;\n\n const rootClassName = useReferenceClassName();\n const styles = useStyles();\n const labelStyles = useLabelStyles();\n state.root.className = mergeClasses(\n referenceClassNames.root,\n rootClassName,\n styles[mode],\n styles[layout],\n !isExpanded && styles.closed,\n state.root.className,\n );\n\n if (state.citation) {\n state.citation.className = mergeClasses(referenceClassNames.citation, styles.citation, state.citation.className);\n }\n\n if (state.media) {\n state.media.className = mergeClasses(\n referenceClassNames.media,\n styles.media,\n layout === 'popover' && styles.mediaPopover,\n state.media.className,\n );\n }\n\n if (state.actions) {\n state.actions.className = mergeClasses(referenceClassNames.actions, styles.actions, state.actions.className);\n }\n\n state.label.className = mergeClasses(\n referenceClassNames.label,\n labelStyles.root,\n labelStyles[mode],\n !isExpanded && labelStyles.closed,\n state.label.className,\n );\n\n if (state.sensitivity) {\n state.sensitivity.className = mergeClasses(\n referenceClassNames.sensitivity,\n styles.sensitivity,\n !isExpanded && styles.hidden,\n state.sensitivity.className,\n );\n }\n\n state.metadata.className = mergeClasses(\n referenceClassNames.metadata,\n styles.metadata,\n !isExpanded && styles.hidden,\n state.metadata.className,\n );\n\n let isSubsequentText = false;\n if (state.primaryText) {\n state.primaryText.className = mergeClasses(\n referenceClassNames.primaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.primaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.secondaryText) {\n state.secondaryText.className = mergeClasses(\n referenceClassNames.secondaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.secondaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.tertiaryText) {\n state.tertiaryText.className = mergeClasses(\n referenceClassNames.tertiaryText,\n referenceExtraClassNames.text,\n isSubsequentText && styles.metadataSubsequentText,\n state.tertiaryText.className,\n );\n isSubsequentText = true;\n }\n\n if (state.icon) {\n state.icon.className = mergeClasses(referenceClassNames.icon, styles.icon, state.icon.className);\n }\n state.content.className = mergeClasses(\n referenceClassNames.content,\n styles.content,\n !isExpanded && styles.hidden,\n state.content.className,\n );\n\n if (state.detailsButton) {\n state.detailsButton.className = mergeClasses(\n referenceClassNames.detailsButton,\n styles.detailsButton,\n state.detailsButton.className,\n );\n }\n\n return state;\n};\n"],"names":["referenceClassNames","referenceExtraClassNames","useReferenceStyles_unstable","root","citation","media","actions","sensitivity","metadata","primaryText","secondaryText","tertiaryText","icon","label","content","detailsButton","text","mediaChild","labelFontSize","typographyStyles","caption1Strong","fontSize","labelLineHeight","lineHeight","maxPopoverWidth","useReferenceClassName","makeResetStyles","boxSizing","width","display","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","border","tokens","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","padding","spacingVerticalS","spacingHorizontalS","boxShadow","columnGap","spacingHorizontalXS","alignItems","useStyles","makeStyles","canvas","sidecar","spacingVerticalXS","inline","popover","shorthands","borderWidth","spacingHorizontalM","closed","rowGap","gridArea","justifyContent","mediaPopover","height","justifySelf","gridRowStart","buttonClassNames","color","colorNeutralForeground3","marginTop","caption2","metadataSubsequentText","position","marginLeft","left","top","borderLeft","colorNeutralStroke2","verticalAlign","flexDirection","wordBreak","hidden","useLabelStyles","alignSelf","overflowY","paddingTop","maxWidth","state","isExpanded","mode","layout","rootClassName","styles","labelStyles","className","mergeClasses","isSubsequentText"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAaaA,mBAAAA;eAAAA;;IAiBAC,wBAAAA;eAAAA;;IAsJAC,2BAAAA;eAAAA;;;iCA7KN;wBACgB;AAKhB,MAAMF,sBAAsD;IACjEG,MAAM;IACNC,UAAU;IACVC,OAAO;IACPC,SAAS;IACTC,aAAa;IACbC,UAAU;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