@fluentui/react-card 9.0.25 → 9.0.27
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 +73 -1
- package/CHANGELOG.md +27 -2
- package/lib/components/Card/renderCard.js +4 -4
- package/lib/components/Card/renderCard.js.map +1 -1
- package/lib/components/Card/useCard.js +4 -2
- package/lib/components/Card/useCard.js.map +1 -1
- package/lib/components/Card/useCardSelectable.js +7 -5
- package/lib/components/Card/useCardSelectable.js.map +1 -1
- package/lib/components/Card/useCardStyles.styles.js +1 -11
- package/lib/components/Card/useCardStyles.styles.js.map +1 -1
- package/lib/components/CardFooter/renderCardFooter.js +3 -3
- package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooter.js +7 -3
- package/lib/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooterStyles.styles.js +1 -1
- package/lib/components/CardHeader/renderCardHeader.js +3 -3
- package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeader.js +17 -8
- package/lib/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeaderStyles.styles.js +1 -1
- package/lib/components/CardPreview/renderCardPreview.js +3 -3
- package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreview.js +7 -3
- package/lib/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib-commonjs/components/Card/renderCard.js +3 -3
- package/lib-commonjs/components/Card/renderCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCard.js +3 -1
- package/lib-commonjs/components/Card/useCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCardSelectable.js +6 -4
- package/lib-commonjs/components/Card/useCardSelectable.js.map +1 -1
- package/lib-commonjs/components/Card/useCardStyles.styles.js +9 -39
- package/lib-commonjs/components/Card/useCardStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.js +2 -2
- package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooter.js +6 -2
- package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.js +3 -3
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.js +2 -2
- package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeader.js +16 -7
- package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.js +11 -11
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.js +2 -2
- package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreview.js +6 -2
- package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
- package/package.json +6 -6
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { getNativeElementProps,
|
2
|
+
import { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';
|
3
3
|
import { useCardContext_unstable } from '../Card/CardContext';
|
4
4
|
import { cardHeaderClassNames } from './useCardHeaderStyles.styles';
|
5
5
|
/**
|
@@ -43,12 +43,13 @@ import { cardHeaderClassNames } from './useCardHeaderStyles.styles';
|
|
43
43
|
const headerRef = React.useRef(null);
|
44
44
|
const hasChildId = React.useRef(false);
|
45
45
|
const generatedId = useId(cardHeaderClassNames.header, referenceId);
|
46
|
-
const headerSlot =
|
47
|
-
|
46
|
+
const headerSlot = slot.optional(header, {
|
47
|
+
renderByDefault: true,
|
48
48
|
defaultProps: {
|
49
49
|
ref: headerRef,
|
50
50
|
id: !hasChildId.current ? referenceId : undefined
|
51
|
-
}
|
51
|
+
},
|
52
|
+
elementType: 'div'
|
52
53
|
});
|
53
54
|
React.useEffect(()=>{
|
54
55
|
var _headerRef_current;
|
@@ -70,13 +71,21 @@ import { cardHeaderClassNames } from './useCardHeaderStyles.styles';
|
|
70
71
|
description: 'div',
|
71
72
|
action: 'div'
|
72
73
|
},
|
73
|
-
root: getNativeElementProps('div', {
|
74
|
+
root: slot.always(getNativeElementProps('div', {
|
74
75
|
ref,
|
75
76
|
...props
|
77
|
+
}), {
|
78
|
+
elementType: 'div'
|
79
|
+
}),
|
80
|
+
image: slot.optional(image, {
|
81
|
+
elementType: 'div'
|
76
82
|
}),
|
77
|
-
image: resolveShorthand(image),
|
78
83
|
header: headerSlot,
|
79
|
-
description:
|
80
|
-
|
84
|
+
description: slot.optional(description, {
|
85
|
+
elementType: 'div'
|
86
|
+
}),
|
87
|
+
action: slot.optional(action, {
|
88
|
+
elementType: 'div'
|
89
|
+
})
|
81
90
|
};
|
82
91
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCardHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps,
|
1
|
+
{"version":3,"sources":["useCardHeader.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';\nimport type { CardHeaderProps, CardHeaderState } from './CardHeader.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\nimport { cardHeaderClassNames } from './useCardHeaderStyles.styles';\n\n/**\n * Finds the first child of CardHeader with an id prop.\n *\n * @param header - the header prop of CardHeader\n */\nfunction getChildWithId(header: React.ReactNode) {\n function isReactElementWithIdProp(element: React.ReactNode): element is React.ReactElement {\n return React.isValidElement(element) && Boolean(element.props.id);\n }\n\n return React.Children.toArray(header).find(isReactElementWithIdProp);\n}\n\n/**\n * Returns the id to use for the CardHeader root element.\n *\n * @param headerId - the id prop of the CardHeader component\n * @param childWithId - the first child of the CardHeader component with an id prop\n * @param generatedId - a generated id\n *\n * @returns the id to use for the CardHeader root element\n */\nfunction getReferenceId(\n headerId: string | undefined,\n childWithId: React.ReactElement | undefined,\n generatedId: string,\n): string {\n if (headerId) {\n return headerId;\n }\n\n if (childWithId?.props.id) {\n return childWithId.props.id;\n }\n\n return generatedId;\n}\n\n/**\n * Create the state required to render CardHeader.\n *\n * The returned state can be modified with hooks such as useCardHeaderStyles_unstable,\n * before being passed to renderCardHeader_unstable.\n *\n * @param props - props from this instance of CardHeader\n * @param ref - reference to root HTMLElement of CardHeader\n */\nexport const useCardHeader_unstable = (props: CardHeaderProps, ref: React.Ref<HTMLElement>): CardHeaderState => {\n const { image, header, description, action } = props;\n\n const {\n selectableA11yProps: { referenceId, setReferenceId },\n } = useCardContext_unstable();\n const headerRef = React.useRef<HTMLDivElement>(null);\n\n const hasChildId = React.useRef(false);\n const generatedId = useId(cardHeaderClassNames.header, referenceId);\n\n const headerSlot = slot.optional(header, {\n renderByDefault: true,\n defaultProps: {\n ref: headerRef,\n id: !hasChildId.current ? referenceId : undefined,\n },\n elementType: 'div',\n });\n React.useEffect(() => {\n const headerId = !hasChildId.current ? headerRef.current?.id : undefined;\n const childWithId = getChildWithId(headerSlot?.children);\n hasChildId.current = Boolean(childWithId);\n setReferenceId(getReferenceId(headerId, childWithId, generatedId));\n }, [generatedId, header, headerSlot, setReferenceId]);\n return {\n components: { root: 'div', image: 'div', header: 'div', description: 'div', action: 'div' },\n\n root: slot.always(\n getNativeElementProps('div', {\n ref,\n ...props,\n }),\n { elementType: 'div' },\n ),\n image: slot.optional(image, { elementType: 'div' }),\n header: headerSlot,\n description: slot.optional(description, { elementType: 'div' }),\n action: slot.optional(action, { elementType: 'div' }),\n };\n};\n"],"names":["React","getNativeElementProps","useId","slot","useCardContext_unstable","cardHeaderClassNames","getChildWithId","header","isReactElementWithIdProp","element","isValidElement","Boolean","props","id","Children","toArray","find","getReferenceId","headerId","childWithId","generatedId","useCardHeader_unstable","ref","image","description","action","selectableA11yProps","referenceId","setReferenceId","headerRef","useRef","hasChildId","headerSlot","optional","renderByDefault","defaultProps","current","undefined","elementType","useEffect","children","components","root","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAE/E,SAASC,uBAAuB,QAAQ,sBAAsB;AAC9D,SAASC,oBAAoB,QAAQ,+BAA+B;AAEpE;;;;CAIC,GACD,SAASC,eAAeC,MAAuB,EAAE;IAC/C,SAASC,yBAAyBC,OAAwB,EAAiC;QACzF,OAAOT,MAAMU,cAAc,CAACD,YAAYE,QAAQF,QAAQG,KAAK,CAACC,EAAE;IAClE;IAEA,OAAOb,MAAMc,QAAQ,CAACC,OAAO,CAACR,QAAQS,IAAI,CAACR;AAC7C;AAEA;;;;;;;;CAQC,GACD,SAASS,eACPC,QAA4B,EAC5BC,WAA2C,EAC3CC,WAAmB,EACX;IACR,IAAIF,UAAU;QACZ,OAAOA;IACT,CAAC;IAED,IAAIC,wBAAAA,yBAAAA,KAAAA,IAAAA,YAAaP,KAAK,CAACC,EAAE,EAAE;QACzB,OAAOM,YAAYP,KAAK,CAACC,EAAE;IAC7B,CAAC;IAED,OAAOO;AACT;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACT,OAAwBU,MAAiD;IAC9G,MAAM,EAAEC,MAAK,EAAEhB,OAAM,EAAEiB,YAAW,EAAEC,OAAM,EAAE,GAAGb;IAE/C,MAAM,EACJc,qBAAqB,EAAEC,YAAW,EAAEC,eAAc,EAAE,CAAA,EACrD,GAAGxB;IACJ,MAAMyB,YAAY7B,MAAM8B,MAAM,CAAiB,IAAI;IAEnD,MAAMC,aAAa/B,MAAM8B,MAAM,CAAC,KAAK;IACrC,MAAMV,cAAclB,MAAMG,qBAAqBE,MAAM,EAAEoB;IAEvD,MAAMK,aAAa7B,KAAK8B,QAAQ,CAAC1B,QAAQ;QACvC2B,iBAAiB,IAAI;QACrBC,cAAc;YACZb,KAAKO;YACLhB,IAAI,CAACkB,WAAWK,OAAO,GAAGT,cAAcU,SAAS;QACnD;QACAC,aAAa;IACf;IACAtC,MAAMuC,SAAS,CAAC,IAAM;YACmBV;QAAvC,MAAMX,WAAW,CAACa,WAAWK,OAAO,GAAGP,CAAAA,qBAAAA,UAAUO,OAAO,cAAjBP,gCAAAA,KAAAA,IAAAA,mBAAmBhB,EAAE,GAAGwB,SAAS;QACxE,MAAMlB,cAAcb,eAAe0B,uBAAAA,wBAAAA,KAAAA,IAAAA,WAAYQ,QAAQ;QACvDT,WAAWK,OAAO,GAAGzB,QAAQQ;QAC7BS,eAAeX,eAAeC,UAAUC,aAAaC;IACvD,GAAG;QAACA;QAAab;QAAQyB;QAAYJ;KAAe;IACpD,OAAO;QACLa,YAAY;YAAEC,MAAM;YAAOnB,OAAO;YAAOhB,QAAQ;YAAOiB,aAAa;YAAOC,QAAQ;QAAM;QAE1FiB,MAAMvC,KAAKwC,MAAM,CACf1C,sBAAsB,OAAO;YAC3BqB;YACA,GAAGV,KAAK;QACV,IACA;YAAE0B,aAAa;QAAM;QAEvBf,OAAOpB,KAAK8B,QAAQ,CAACV,OAAO;YAAEe,aAAa;QAAM;QACjD/B,QAAQyB;QACRR,aAAarB,KAAK8B,QAAQ,CAACT,aAAa;YAAEc,aAAa;QAAM;QAC7Db,QAAQtB,KAAK8B,QAAQ,CAACR,QAAQ;YAAEa,aAAa;QAAM;IACrD;AACF,EAAE"}
|
@@ -43,7 +43,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
43
43
|
Ijaq50: "fldnz9j"
|
44
44
|
}
|
45
45
|
}, {
|
46
|
-
d: [".fkufhic{--fui-CardHeader--gap:12px;}", ".f13qh94s{display
|
46
|
+
d: [".fkufhic{--fui-CardHeader--gap:12px;}", ".f13qh94s{display:grid;}", ".f8a668j{grid-auto-columns:min-content 1fr min-content;}", ".f4h39za{grid-auto-rows:1fr min-content;}", ".f122n59{align-items:center;}", ".ftuwxu6{display:inline-flex;}", ".fql5097{margin-right:var(--fui-CardHeader--gap);}", ".f6yss9k{margin-left:var(--fui-CardHeader--gap);}", ".fwpfdsa{grid-column-start:1;}", ".fldnz9j{grid-row-start:span 2;}", ".fd46tj4{grid-column-start:2;}", ".f16hsg94{grid-row-start:1;}", ".faunodf{grid-row-start:2;}", ".fis13di{grid-column-start:3;}"]
|
47
47
|
});
|
48
48
|
/**
|
49
49
|
* Apply styling to the CardHeader slots based on the state.
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';
|
2
|
-
import {
|
2
|
+
import { assertSlots } from '@fluentui/react-utilities';
|
3
3
|
/**
|
4
4
|
* Render the final JSX of CardPreview.
|
5
5
|
*/ export const renderCardPreview_unstable = (state)=>{
|
6
|
-
|
7
|
-
return /*#__PURE__*/ createElement(
|
6
|
+
assertSlots(state);
|
7
|
+
return /*#__PURE__*/ createElement(state.root, null, state.root.children, state.logo && /*#__PURE__*/ createElement(state.logo, null));
|
8
8
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderCardPreview.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport {
|
1
|
+
{"version":3,"sources":["renderCardPreview.tsx"],"sourcesContent":["/** @jsxRuntime classic */\n/** @jsx createElement */\n\nimport { createElement } from '@fluentui/react-jsx-runtime';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { CardPreviewSlots, CardPreviewState } from './CardPreview.types';\n\n/**\n * Render the final JSX of CardPreview.\n */\nexport const renderCardPreview_unstable = (state: CardPreviewState) => {\n assertSlots<CardPreviewSlots>(state);\n\n return (\n <state.root>\n {state.root.children}\n {state.logo && <state.logo />}\n </state.root>\n );\n};\n"],"names":["createElement","assertSlots","renderCardPreview_unstable","state","root","children","logo"],"mappings":"AAAA,wBAAwB,GACxB,uBAAuB,GAEvB,SAASA,aAAa,QAAQ,8BAA8B;AAE5D,SAASC,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC,QAA4B;IACrEF,YAA8BE;IAE9B,qBACE,AAdJ,cAcKA,MAAMC,IAAI,QACRD,MAAMC,IAAI,CAACC,QAAQ,EACnBF,MAAMG,IAAI,kBAAI,AAhBrB,cAgBsBH,MAAMG,IAAI;AAGhC,EAAE"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { getNativeElementProps,
|
2
|
+
import { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';
|
3
3
|
import { useCardContext_unstable } from '../Card/CardContext';
|
4
4
|
import { cardPreviewClassNames } from './useCardPreviewStyles.styles';
|
5
5
|
/**
|
@@ -44,10 +44,14 @@ import { cardPreviewClassNames } from './useCardPreviewStyles.styles';
|
|
44
44
|
root: 'div',
|
45
45
|
logo: 'div'
|
46
46
|
},
|
47
|
-
root: getNativeElementProps('div', {
|
47
|
+
root: slot.always(getNativeElementProps('div', {
|
48
48
|
ref: previewRef,
|
49
49
|
...props
|
50
|
+
}), {
|
51
|
+
elementType: 'div'
|
50
52
|
}),
|
51
|
-
logo:
|
53
|
+
logo: slot.optional(logo, {
|
54
|
+
elementType: 'div'
|
55
|
+
})
|
52
56
|
};
|
53
57
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCardPreview.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps,
|
1
|
+
{"version":3,"sources":["useCardPreview.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport type { CardPreviewProps, CardPreviewState } from './CardPreview.types';\nimport { useCardContext_unstable } from '../Card/CardContext';\nimport { cardPreviewClassNames } from './useCardPreviewStyles.styles';\n\n/**\n * Create the state required to render CardPreview.\n *\n * The returned state can be modified with hooks such as useCardPreviewStyles_unstable,\n * before being passed to renderCardPreview_unstable.\n *\n * @param props - props from this instance of CardPreview\n * @param ref - reference to root HTMLElement of CardPreview\n */\nexport const useCardPreview_unstable = (props: CardPreviewProps, ref: React.Ref<HTMLElement>): CardPreviewState => {\n const { logo } = props;\n\n const {\n selectableA11yProps: { referenceLabel, referenceId, setReferenceLabel, setReferenceId },\n } = useCardContext_unstable();\n const previewRef = useMergedRefs(ref, React.useRef<HTMLDivElement>(null));\n\n React.useEffect(() => {\n if (referenceLabel && referenceId) {\n return;\n }\n\n if (previewRef.current && previewRef.current.parentNode) {\n const img = previewRef.current.parentNode.querySelector<HTMLImageElement>(`.${cardPreviewClassNames.root} > img`);\n\n if (img) {\n const ariaLabel = img.getAttribute('aria-label');\n const ariaDescribedby = img.getAttribute('aria-describedby');\n\n if (ariaDescribedby) {\n setReferenceId(ariaDescribedby);\n } else if (img.alt) {\n setReferenceLabel(img.alt);\n } else if (ariaLabel) {\n setReferenceLabel(ariaLabel);\n }\n }\n }\n }, [setReferenceLabel, referenceLabel, previewRef, referenceId, setReferenceId]);\n\n return {\n components: {\n root: 'div',\n logo: 'div',\n },\n\n root: slot.always(\n getNativeElementProps('div', {\n ref: previewRef,\n ...props,\n }),\n { elementType: 'div' },\n ),\n logo: slot.optional(logo, { elementType: 'div' }),\n };\n};\n"],"names":["React","getNativeElementProps","useMergedRefs","slot","useCardContext_unstable","cardPreviewClassNames","useCardPreview_unstable","props","ref","logo","selectableA11yProps","referenceLabel","referenceId","setReferenceLabel","setReferenceId","previewRef","useRef","useEffect","current","parentNode","img","querySelector","root","ariaLabel","getAttribute","ariaDescribedby","alt","components","always","elementType","optional"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,aAAa,EAAEC,IAAI,QAAQ,4BAA4B;AAEvF,SAASC,uBAAuB,QAAQ,sBAAsB;AAC9D,SAASC,qBAAqB,QAAQ,gCAAgC;AAEtE;;;;;;;;CAQC,GACD,OAAO,MAAMC,0BAA0B,CAACC,OAAyBC,MAAkD;IACjH,MAAM,EAAEC,KAAI,EAAE,GAAGF;IAEjB,MAAM,EACJG,qBAAqB,EAAEC,eAAc,EAAEC,YAAW,EAAEC,kBAAiB,EAAEC,eAAc,EAAE,CAAA,EACxF,GAAGV;IACJ,MAAMW,aAAab,cAAcM,KAAKR,MAAMgB,MAAM,CAAiB,IAAI;IAEvEhB,MAAMiB,SAAS,CAAC,IAAM;QACpB,IAAIN,kBAAkBC,aAAa;YACjC;QACF,CAAC;QAED,IAAIG,WAAWG,OAAO,IAAIH,WAAWG,OAAO,CAACC,UAAU,EAAE;YACvD,MAAMC,MAAML,WAAWG,OAAO,CAACC,UAAU,CAACE,aAAa,CAAmB,CAAC,CAAC,EAAEhB,sBAAsBiB,IAAI,CAAC,MAAM,CAAC;YAEhH,IAAIF,KAAK;gBACP,MAAMG,YAAYH,IAAII,YAAY,CAAC;gBACnC,MAAMC,kBAAkBL,IAAII,YAAY,CAAC;gBAEzC,IAAIC,iBAAiB;oBACnBX,eAAeW;gBACjB,OAAO,IAAIL,IAAIM,GAAG,EAAE;oBAClBb,kBAAkBO,IAAIM,GAAG;gBAC3B,OAAO,IAAIH,WAAW;oBACpBV,kBAAkBU;gBACpB,CAAC;YACH,CAAC;QACH,CAAC;IACH,GAAG;QAACV;QAAmBF;QAAgBI;QAAYH;QAAaE;KAAe;IAE/E,OAAO;QACLa,YAAY;YACVL,MAAM;YACNb,MAAM;QACR;QAEAa,MAAMnB,KAAKyB,MAAM,CACf3B,sBAAsB,OAAO;YAC3BO,KAAKO;YACL,GAAGR,KAAK;QACV,IACA;YAAEsB,aAAa;QAAM;QAEvBpB,MAAMN,KAAK2B,QAAQ,CAACrB,MAAM;YAAEoB,aAAa;QAAM;IACjD;AACF,EAAE"}
|
@@ -10,8 +10,8 @@ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
|
|
10
10
|
const _reactUtilities = require("@fluentui/react-utilities");
|
11
11
|
const _cardContext = require("./CardContext");
|
12
12
|
const renderCard_unstable = (state, cardContextValue)=>{
|
13
|
-
|
14
|
-
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(
|
13
|
+
(0, _reactUtilities.assertSlots)(state);
|
14
|
+
return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.root, null, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_cardContext.CardProvider, {
|
15
15
|
value: cardContextValue
|
16
|
-
},
|
16
|
+
}, state.checkbox ? /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.checkbox, null) : null, state.floatingAction ? /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(state.floatingAction, null) : null, state.root.children));
|
17
17
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["renderCard.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport {
|
1
|
+
{"version":3,"sources":["renderCard.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { assertSlots } from '@fluentui/react-utilities';\nimport { CardProvider } from './CardContext';\n/**\n * Render the final JSX of Card.\n */ export const renderCard_unstable = (state, cardContextValue)=>{\n assertSlots(state);\n return /*#__PURE__*/ createElement(state.root, null, /*#__PURE__*/ createElement(CardProvider, {\n value: cardContextValue\n }, state.checkbox ? /*#__PURE__*/ createElement(state.checkbox, null) : null, state.floatingAction ? /*#__PURE__*/ createElement(state.floatingAction, null) : null, state.root.children));\n};\n"],"names":["renderCard_unstable","state","cardContextValue","assertSlots","createElement","root","CardProvider","value","checkbox","floatingAction","children"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAKjCA;;aAAAA;;iCALkE;gCACvD;6BACC;AAGlB,MAAMA,sBAAsB,CAACC,OAAOC,mBAAmB;IAC9DC,IAAAA,2BAAW,EAACF;IACZ,OAAO,WAAW,GAAGG,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAE,IAAI,EAAE,WAAW,GAAGD,IAAAA,8BAAa,EAACE,yBAAY,EAAE;QAC3FC,OAAOL;IACX,GAAGD,MAAMO,QAAQ,GAAG,WAAW,GAAGJ,IAAAA,8BAAa,EAACH,MAAMO,QAAQ,EAAE,IAAI,IAAI,IAAI,EAAEP,MAAMQ,cAAc,GAAG,WAAW,GAAGL,IAAAA,8BAAa,EAACH,MAAMQ,cAAc,EAAE,IAAI,IAAI,IAAI,EAAER,MAAMI,IAAI,CAACK,QAAQ;AAC5L"}
|
@@ -80,12 +80,14 @@ const useCard_unstable = (props, ref)=>{
|
|
80
80
|
floatingAction: 'div',
|
81
81
|
checkbox: 'input'
|
82
82
|
},
|
83
|
-
root: (0, _reactUtilities.getNativeElementProps)('div', {
|
83
|
+
root: _reactUtilities.slot.always((0, _reactUtilities.getNativeElementProps)('div', {
|
84
84
|
ref: cardRef,
|
85
85
|
role: 'group',
|
86
86
|
...focusAttributes,
|
87
87
|
...props,
|
88
88
|
...selectableCardProps
|
89
|
+
}), {
|
90
|
+
elementType: 'div'
|
89
91
|
}),
|
90
92
|
floatingAction: floatingActionSlot,
|
91
93
|
checkbox: checkboxSlot
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCard.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs } from '@fluentui/react-utilities';\nimport { useFocusableGroup, useFocusWithin } from '@fluentui/react-tabster';\nimport { useCardSelectable } from './useCardSelectable';\nimport { cardContextDefaultValue } from './CardContext';\nconst focusMap = {\n off: undefined,\n 'no-tab': 'limited-trap-focus',\n 'tab-exit': 'limited',\n 'tab-only': 'unlimited'\n};\n/**\n * Create the state for interactive cards.\n *\n * This internal hook defines if the card is interactive\n * and control focus properties based on that.\n *\n * @param props - props from this instance of Card\n */ const useCardInteractive = ({ focusMode ='off' , ...props })=>{\n const interactive = [\n 'onClick',\n 'onDoubleClick',\n 'onMouseUp',\n 'onMouseDown',\n 'onPointerUp',\n 'onPointerDown',\n 'onTouchStart',\n 'onTouchEnd',\n 'onDragStart',\n 'onDragEnd'\n ].some((prop)=>props[prop]);\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[interactive ? 'no-tab' : focusMode]\n });\n const interactiveFocusAttributes = {\n ...groupperAttrs,\n tabIndex: 0\n };\n return {\n interactive,\n focusAttributes: focusMode === 'off' ? null : interactiveFocusAttributes\n };\n};\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to the root element of Card\n */ export const useCard_unstable = (props, ref)=>{\n const { appearance ='filled' , orientation ='vertical' , size ='medium' } = props;\n const [referenceId, setReferenceId] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n const [referenceLabel, setReferenceLabel] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n const cardBaseRef = useFocusWithin();\n const { selectable , selected , selectableCardProps , selectFocused , checkboxSlot , floatingActionSlot } = useCardSelectable(props, {\n referenceId,\n referenceLabel\n }, cardBaseRef);\n const cardRef = useMergedRefs(cardBaseRef, ref);\n const { interactive , focusAttributes } = useCardInteractive(props);\n return {\n appearance,\n orientation,\n size,\n interactive,\n selectable,\n selectFocused,\n selected,\n selectableA11yProps: {\n setReferenceId,\n referenceId,\n referenceLabel,\n setReferenceLabel\n },\n components: {\n root: 'div',\n floatingAction: 'div',\n checkbox: 'input'\n },\n root: getNativeElementProps('div', {\n ref: cardRef,\n role: 'group',\n ...focusAttributes,\n ...props,\n ...selectableCardProps\n }),\n floatingAction: floatingActionSlot,\n checkbox: checkboxSlot\n };\n};\n"],"names":["useCard_unstable","focusMap","off","undefined","useCardInteractive","focusMode","props","interactive","some","prop","groupperAttrs","useFocusableGroup","tabBehavior","interactiveFocusAttributes","tabIndex","focusAttributes","ref","appearance","orientation","size","referenceId","setReferenceId","React","useState","cardContextDefaultValue","selectableA11yProps","referenceLabel","setReferenceLabel","cardBaseRef","useFocusWithin","selectable","selected","selectableCardProps","selectFocused","checkboxSlot","floatingActionSlot","useCardSelectable","cardRef","useMergedRefs","components","root","floatingAction","checkbox","getNativeElementProps","role"],"mappings":";;;;+BAmDiBA;;aAAAA;;;6DAnDM;
|
1
|
+
{"version":3,"sources":["useCard.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFocusableGroup, useFocusWithin } from '@fluentui/react-tabster';\nimport { useCardSelectable } from './useCardSelectable';\nimport { cardContextDefaultValue } from './CardContext';\nconst focusMap = {\n off: undefined,\n 'no-tab': 'limited-trap-focus',\n 'tab-exit': 'limited',\n 'tab-only': 'unlimited'\n};\n/**\n * Create the state for interactive cards.\n *\n * This internal hook defines if the card is interactive\n * and control focus properties based on that.\n *\n * @param props - props from this instance of Card\n */ const useCardInteractive = ({ focusMode ='off' , ...props })=>{\n const interactive = [\n 'onClick',\n 'onDoubleClick',\n 'onMouseUp',\n 'onMouseDown',\n 'onPointerUp',\n 'onPointerDown',\n 'onTouchStart',\n 'onTouchEnd',\n 'onDragStart',\n 'onDragEnd'\n ].some((prop)=>props[prop]);\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[interactive ? 'no-tab' : focusMode]\n });\n const interactiveFocusAttributes = {\n ...groupperAttrs,\n tabIndex: 0\n };\n return {\n interactive,\n focusAttributes: focusMode === 'off' ? null : interactiveFocusAttributes\n };\n};\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to the root element of Card\n */ export const useCard_unstable = (props, ref)=>{\n const { appearance ='filled' , orientation ='vertical' , size ='medium' } = props;\n const [referenceId, setReferenceId] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n const [referenceLabel, setReferenceLabel] = React.useState(cardContextDefaultValue.selectableA11yProps.referenceId);\n const cardBaseRef = useFocusWithin();\n const { selectable , selected , selectableCardProps , selectFocused , checkboxSlot , floatingActionSlot } = useCardSelectable(props, {\n referenceId,\n referenceLabel\n }, cardBaseRef);\n const cardRef = useMergedRefs(cardBaseRef, ref);\n const { interactive , focusAttributes } = useCardInteractive(props);\n return {\n appearance,\n orientation,\n size,\n interactive,\n selectable,\n selectFocused,\n selected,\n selectableA11yProps: {\n setReferenceId,\n referenceId,\n referenceLabel,\n setReferenceLabel\n },\n components: {\n root: 'div',\n floatingAction: 'div',\n checkbox: 'input'\n },\n root: slot.always(getNativeElementProps('div', {\n ref: cardRef,\n role: 'group',\n ...focusAttributes,\n ...props,\n ...selectableCardProps\n }), {\n elementType: 'div'\n }),\n floatingAction: floatingActionSlot,\n checkbox: checkboxSlot\n };\n};\n"],"names":["useCard_unstable","focusMap","off","undefined","useCardInteractive","focusMode","props","interactive","some","prop","groupperAttrs","useFocusableGroup","tabBehavior","interactiveFocusAttributes","tabIndex","focusAttributes","ref","appearance","orientation","size","referenceId","setReferenceId","React","useState","cardContextDefaultValue","selectableA11yProps","referenceLabel","setReferenceLabel","cardBaseRef","useFocusWithin","selectable","selected","selectableCardProps","selectFocused","checkboxSlot","floatingActionSlot","useCardSelectable","cardRef","useMergedRefs","components","root","floatingAction","checkbox","slot","always","getNativeElementProps","role","elementType"],"mappings":";;;;+BAmDiBA;;aAAAA;;;6DAnDM;gCACoC;8BACT;mCAChB;6BACM;AACxC,MAAMC,WAAW;IACbC,KAAKC;IACL,UAAU;IACV,YAAY;IACZ,YAAY;AAChB;AACA;;;;;;;CAOC,GAAG,MAAMC,qBAAqB,CAAC,EAAEC,WAAW,MAAK,EAAG,GAAGC,OAAO,GAAG;IAC9D,MAAMC,cAAc;QAChB;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;KACH,CAACC,IAAI,CAAC,CAACC,OAAOH,KAAK,CAACG,KAAK;IAC1B,MAAMC,gBAAgBC,IAAAA,+BAAiB,EAAC;QACpCC,aAAaX,QAAQ,CAACM,cAAc,WAAWF,SAAS,CAAC;IAC7D;IACA,MAAMQ,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|
} else if (referenceLabel) {
|
72
72
|
selectableCheckboxProps['aria-label'] = referenceLabel;
|
73
73
|
}
|
74
|
-
return
|
74
|
+
return _reactUtilities.slot.optional(checkbox, {
|
75
75
|
defaultProps: {
|
76
76
|
ref: checkboxRef,
|
77
77
|
type: 'checkbox',
|
@@ -80,7 +80,8 @@ const useCardSelectable = (props, { referenceLabel , referenceId }, cardRef)=>{
|
|
80
80
|
onFocus: ()=>setIsSelectFocused(true),
|
81
81
|
onBlur: ()=>setIsSelectFocused(false),
|
82
82
|
...selectableCheckboxProps
|
83
|
-
}
|
83
|
+
},
|
84
|
+
elementType: 'input'
|
84
85
|
});
|
85
86
|
}, [
|
86
87
|
checkbox,
|
@@ -95,10 +96,11 @@ const useCardSelectable = (props, { referenceLabel , referenceId }, cardRef)=>{
|
|
95
96
|
if (!floatingAction) {
|
96
97
|
return;
|
97
98
|
}
|
98
|
-
return
|
99
|
+
return _reactUtilities.slot.optional(floatingAction, {
|
99
100
|
defaultProps: {
|
100
101
|
ref: checkboxRef
|
101
|
-
}
|
102
|
+
},
|
103
|
+
elementType: 'div'
|
102
104
|
});
|
103
105
|
}, [
|
104
106
|
floatingAction
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["useCardSelectable.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks,
|
1
|
+
{"version":3,"sources":["useCardSelectable.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, slot } from '@fluentui/react-utilities';\nimport { Enter } from '@fluentui/keyboard-keys';\nimport { useFocusFinders } from '@fluentui/react-tabster';\n/**\n * @internal\n *\n * Create the state related to selectable cards.\n *\n * This internal hook controls all the logic for selectable cards and is\n * intended to be used alongside with useCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param a11yProps - accessibility props shared between elements of the card\n * @param ref - reference to the root element of Card\n */ export const useCardSelectable = (props, { referenceLabel , referenceId }, cardRef)=>{\n const { checkbox ={} , selected , defaultSelected , onSelectionChange , floatingAction , onClick , onKeyDown } = props;\n const { findAllFocusable } = useFocusFinders();\n const checkboxRef = React.useRef(null);\n const isSelectable = [\n selected,\n defaultSelected,\n onSelectionChange\n ].some((prop)=>typeof prop !== 'undefined');\n const [isCardSelected, setIsCardSelected] = React.useState(false);\n const [isSelectFocused, setIsSelectFocused] = React.useState(false);\n const shouldRestrictTriggerAction = React.useCallback((event)=>{\n if (!cardRef.current) {\n return false;\n }\n const focusableElements = findAllFocusable(cardRef.current);\n const target = event.target;\n const isElementInFocusableGroup = focusableElements.some((element)=>element.contains(target));\n const isCheckboxSlot = (checkboxRef === null || checkboxRef === void 0 ? void 0 : checkboxRef.current) === target;\n return isElementInFocusableGroup && !isCheckboxSlot;\n }, [\n cardRef,\n findAllFocusable\n ]);\n const onChangeHandler = React.useCallback((event)=>{\n if (shouldRestrictTriggerAction(event)) {\n return;\n }\n const newCheckedValue = !isCardSelected;\n setIsCardSelected(newCheckedValue);\n if (onSelectionChange) {\n onSelectionChange(event, {\n selected: newCheckedValue\n });\n }\n }, [\n onSelectionChange,\n isCardSelected,\n shouldRestrictTriggerAction\n ]);\n const onKeyDownHandler = React.useCallback((event)=>{\n if ([\n Enter\n ].includes(event.key)) {\n event.preventDefault();\n onChangeHandler(event);\n }\n }, [\n onChangeHandler\n ]);\n const checkboxSlot = React.useMemo(()=>{\n if (!isSelectable || floatingAction) {\n return;\n }\n const selectableCheckboxProps = {};\n if (referenceId) {\n selectableCheckboxProps['aria-labelledby'] = referenceId;\n } else if (referenceLabel) {\n selectableCheckboxProps['aria-label'] = referenceLabel;\n }\n return slot.optional(checkbox, {\n defaultProps: {\n ref: checkboxRef,\n type: 'checkbox',\n checked: isCardSelected,\n onChange: (event)=>onChangeHandler(event),\n onFocus: ()=>setIsSelectFocused(true),\n onBlur: ()=>setIsSelectFocused(false),\n ...selectableCheckboxProps\n },\n elementType: 'input'\n });\n }, [\n checkbox,\n floatingAction,\n isCardSelected,\n isSelectable,\n onChangeHandler,\n referenceId,\n referenceLabel\n ]);\n const floatingActionSlot = React.useMemo(()=>{\n if (!floatingAction) {\n return;\n }\n return slot.optional(floatingAction, {\n defaultProps: {\n ref: checkboxRef\n },\n elementType: 'div'\n });\n }, [\n floatingAction\n ]);\n const selectableCardProps = React.useMemo(()=>{\n if (!isSelectable) {\n return null;\n }\n return {\n onClick: mergeCallbacks(onClick, onChangeHandler),\n onKeyDown: mergeCallbacks(onKeyDown, onKeyDownHandler)\n };\n }, [\n isSelectable,\n onChangeHandler,\n onClick,\n onKeyDown,\n onKeyDownHandler\n ]);\n React.useEffect(()=>setIsCardSelected(Boolean(defaultSelected !== null && defaultSelected !== void 0 ? defaultSelected : selected)), [\n defaultSelected,\n selected,\n setIsCardSelected\n ]);\n return {\n selected: isCardSelected,\n selectable: isSelectable,\n selectFocused: isSelectFocused,\n selectableCardProps,\n checkboxSlot,\n floatingActionSlot\n };\n};\n"],"names":["useCardSelectable","props","referenceLabel","referenceId","cardRef","checkbox","selected","defaultSelected","onSelectionChange","floatingAction","onClick","onKeyDown","findAllFocusable","useFocusFinders","checkboxRef","React","useRef","isSelectable","some","prop","isCardSelected","setIsCardSelected","useState","isSelectFocused","setIsSelectFocused","shouldRestrictTriggerAction","useCallback","event","current","focusableElements","target","isElementInFocusableGroup","element","contains","isCheckboxSlot","onChangeHandler","newCheckedValue","onKeyDownHandler","Enter","includes","key","preventDefault","checkboxSlot","useMemo","selectableCheckboxProps","slot","optional","defaultProps","ref","type","checked","onChange","onFocus","onBlur","elementType","floatingActionSlot","selectableCardProps","mergeCallbacks","useEffect","Boolean","selectable","selectFocused"],"mappings":";;;;+BAeiBA;;aAAAA;;;6DAfM;gCACc;8BACf;8BACU;AAYrB,MAAMA,oBAAoB,CAACC,OAAO,EAAEC,eAAc,EAAGC,YAAW,EAAG,EAAEC,UAAU;IACtF,MAAM,EAAEC,UAAU,CAAC,EAAC,EAAGC,SAAQ,EAAGC,gBAAe,EAAGC,kBAAiB,EAAGC,eAAc,EAAGC,QAAO,EAAGC,UAAS,EA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BAAkBD,QAAQ,IAAI;QACjIC;QACAD;QACAe;KACH;IACD,OAAO;QACHf,UAAUc;QACVwC,YAAY3C;QACZ4C,eAAetC;QACfiC;QACAd;QACAa;IACJ;AACJ"}
|
@@ -573,9 +573,9 @@ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
573
573
|
".f10m5gbb{padding-right:var(--fui-Card--size);}",
|
574
574
|
".f1k04kkk{padding-left:var(--fui-Card--size);}",
|
575
575
|
".fhftqfp{padding-bottom:var(--fui-Card--size);}",
|
576
|
-
".fxsr4vj{
|
576
|
+
".fxsr4vj{column-gap:var(--fui-Card--size);}",
|
577
577
|
".fcvsdzp{row-gap:var(--fui-Card--size);}",
|
578
|
-
".f22iagw{display
|
578
|
+
".f22iagw{display:flex;}",
|
579
579
|
".f10pi13n{position:relative;}",
|
580
580
|
".f1ewtqcl{box-sizing:border-box;}",
|
581
581
|
".f19n0e5{color:var(--colorNeutralForeground1);}",
|
@@ -598,8 +598,8 @@ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
598
598
|
".f2fl922::after{border-bottom-left-radius:var(--fui-Card--border-radius);}",
|
599
599
|
".f1anhtl::after{border-top-right-radius:var(--fui-Card--border-radius);}",
|
600
600
|
".f1n2zcl3::after{border-top-left-radius:var(--fui-Card--border-radius);}",
|
601
|
-
".f16v3d5c>.fui-CardHeader,.f16v3d5c>.fui-CardFooter{
|
602
|
-
".f1su8t2g>:not(.fui-CardPreview):not(.fui-CardHeader):not(.fui-CardFooter){
|
601
|
+
".f16v3d5c>.fui-CardHeader,.f16v3d5c>.fui-CardFooter{flex-shrink:0;}",
|
602
|
+
".f1su8t2g>:not(.fui-CardPreview):not(.fui-CardHeader):not(.fui-CardFooter){flex-grow:1;}",
|
603
603
|
".f8hki3x[data-fui-focus-visible]{border-top-color:transparent;}",
|
604
604
|
".f1d2448m[data-fui-focus-visible]{border-right-color:transparent;}",
|
605
605
|
".ffh67wi[data-fui-focus-visible]{border-left-color:transparent;}",
|
@@ -656,16 +656,16 @@ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
656
656
|
".f1cec8w7[data-fui-focus-within]:focus-within::after{right:calc(0px - var(--strokeWidthThick) - -2px);}",
|
657
657
|
".f554mv0[data-fui-focus-within]:focus-within::after{left:calc(0px - var(--strokeWidthThick) - -2px);}",
|
658
658
|
".f1sj6kbr[data-fui-focus-within]:focus-within::after{bottom:calc(0px - var(--strokeWidthThick) - -2px);}",
|
659
|
-
".f1063pyq{
|
660
|
-
".f122n59{
|
659
|
+
".f1063pyq{flex-direction:row;}",
|
660
|
+
".f122n59{align-items:center;}",
|
661
661
|
".fpfyeui>.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}",
|
662
662
|
".fwi74qw>.fui-CardPreview{margin-bottom:calc(var(--fui-Card--size) * -1);}",
|
663
663
|
".ffcmwrh>:not([aria-hidden=\"true\"]).fui-CardPreview:first-of-type{margin-left:calc(var(--fui-Card--size) * -1);}",
|
664
664
|
".f6ppoih>:not([aria-hidden=\"true\"]).fui-CardPreview:first-of-type{margin-right:calc(var(--fui-Card--size) * -1);}",
|
665
665
|
".f1dc9p14>:not([aria-hidden=\"true\"]).fui-CardPreview:last-of-type{margin-right:calc(var(--fui-Card--size) * -1);}",
|
666
666
|
".fd933vt>:not([aria-hidden=\"true\"]).fui-CardPreview:last-of-type{margin-left:calc(var(--fui-Card--size) * -1);}",
|
667
|
-
".f18esqgw>.fui-CardHeader:last-of-type,.f18esqgw>.fui-CardFooter:last-of-type{
|
668
|
-
".f1vx9l62{
|
667
|
+
".f18esqgw>.fui-CardHeader:last-of-type,.f18esqgw>.fui-CardFooter:last-of-type{flex-grow:1;}",
|
668
|
+
".f1vx9l62{flex-direction:column;}",
|
669
669
|
".fobhde4>.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}",
|
670
670
|
".fx5r7kn>.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}",
|
671
671
|
".f19chtn8>:not([aria-hidden=\"true\"]).fui-CardPreview:first-of-type{margin-top:calc(var(--fui-Card--size) * -1);}",
|
@@ -708,7 +708,7 @@ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
708
708
|
".frkrog8{width:1px;}",
|
709
709
|
".f1mpe4l3{height:1px;}",
|
710
710
|
".fmf1zke{clip:rect(0 0 0 0);}",
|
711
|
-
".f1wch0ki{
|
711
|
+
".f1wch0ki{clip-path:inset(50%);}",
|
712
712
|
".fz5stix{white-space:nowrap;}"
|
713
713
|
],
|
714
714
|
f: [
|
@@ -785,12 +785,6 @@ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
785
785
|
m: "(forced-colors: active)"
|
786
786
|
}
|
787
787
|
],
|
788
|
-
[
|
789
|
-
"@media (forced-colors: active){.f5jhx11::after{border-right-color:Highlight;}.fff9uym::after{border-left-color:Highlight;}}",
|
790
|
-
{
|
791
|
-
m: "(forced-colors: active)"
|
792
|
-
}
|
793
|
-
],
|
794
788
|
[
|
795
789
|
"@media (forced-colors: active){.fpfvv3l:hover,.fpfvv3l :active{forced-color-adjust:none;}}",
|
796
790
|
{
|
@@ -814,30 +808,6 @@ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
|
|
814
808
|
{
|
815
809
|
m: "(forced-colors: active)"
|
816
810
|
}
|
817
|
-
],
|
818
|
-
[
|
819
|
-
"@media (forced-colors: active){.fey3rwa::after{border-top-color:Highlight;}}",
|
820
|
-
{
|
821
|
-
m: "(forced-colors: active)"
|
822
|
-
}
|
823
|
-
],
|
824
|
-
[
|
825
|
-
"@media (forced-colors: active){.f5jhx11::after{border-right-color:Highlight;}.fff9uym::after{border-left-color:Highlight;}}",
|
826
|
-
{
|
827
|
-
m: "(forced-colors: active)"
|
828
|
-
}
|
829
|
-
],
|
830
|
-
[
|
831
|
-
"@media (forced-colors: active){.fm7n0jy::after{border-bottom-color:Highlight;}}",
|
832
|
-
{
|
833
|
-
m: "(forced-colors: active)"
|
834
|
-
}
|
835
|
-
],
|
836
|
-
[
|
837
|
-
"@media (forced-colors: active){.f5jhx11::after{border-right-color:Highlight;}.fff9uym::after{border-left-color:Highlight;}}",
|
838
|
-
{
|
839
|
-
m: "(forced-colors: active)"
|
840
|
-
}
|
841
811
|
]
|
842
812
|
]
|
843
813
|
});
|