@fluentui/react-card 9.0.0-beta.1 → 9.0.0-beta.12
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 +640 -1
- package/CHANGELOG.md +158 -2
- package/README.md +3 -1
- package/Spec.md +523 -0
- package/assets/Card.png +0 -0
- package/assets/CardHeader.png +0 -0
- package/assets/CardPreview.png +0 -0
- package/assets/context-interaction-keyboard.png +0 -0
- package/assets/context-interaction-mouse.png +0 -0
- package/assets/context-narrator.png +0 -0
- package/assets/disabled-narrator.png +0 -0
- package/assets/disabled.png +0 -0
- package/assets/interactive-interaction-keyboard.png +0 -0
- package/assets/interactive-interaction-mouse.png +0 -0
- package/assets/interactive-narrator.png +0 -0
- package/assets/non-interactive-interaction-keyboard.png +0 -0
- package/assets/non-interactive-interaction-mouse.png +0 -0
- package/assets/non-interactive-narrator.png +0 -0
- package/assets/non-interactive-selectable-interaction-keyboard.png +0 -0
- package/assets/non-interactive-selectable-interaction-mouse.png +0 -0
- package/assets/selectable-interaction-keyboard.png +0 -0
- package/assets/selectable-interaction-mouse.png +0 -0
- package/assets/selectable-narrator.png +0 -0
- package/dist/react-card.d.ts +72 -127
- package/lib/Card.js.map +1 -1
- package/lib/CardFooter.js.map +1 -1
- package/lib/CardHeader.js.map +1 -1
- package/lib/CardPreview.js.map +1 -1
- package/lib/components/Card/Card.d.ts +1 -1
- package/lib/components/Card/Card.js +8 -8
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/Card.types.d.ts +9 -18
- package/lib/components/Card/Card.types.js.map +1 -1
- package/lib/components/Card/index.js.map +1 -1
- package/lib/components/Card/renderCard.d.ts +1 -1
- package/lib/components/Card/renderCard.js +8 -8
- package/lib/components/Card/renderCard.js.map +1 -1
- package/lib/components/Card/useCard.d.ts +3 -4
- package/lib/components/Card/useCard.js +23 -11
- package/lib/components/Card/useCard.js.map +1 -1
- package/lib/components/Card/useCardStyles.d.ts +8 -2
- package/lib/components/Card/useCardStyles.js +138 -25
- package/lib/components/Card/useCardStyles.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.js +7 -7
- package/lib/components/CardFooter/CardFooter.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.types.d.ts +8 -23
- package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
- package/lib/components/CardFooter/index.js.map +1 -1
- package/lib/components/CardFooter/renderCardFooter.d.ts +1 -1
- package/lib/components/CardFooter/renderCardFooter.js +9 -9
- package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooter.d.ts +4 -9
- package/lib/components/CardFooter/useCardFooter.js +18 -17
- package/lib/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooterStyles.d.ts +8 -2
- package/lib/components/CardFooter/useCardFooterStyles.js +18 -8
- package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.js +7 -7
- package/lib/components/CardHeader/CardHeader.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.types.d.ts +12 -39
- package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
- package/lib/components/CardHeader/index.js.map +1 -1
- package/lib/components/CardHeader/renderCardHeader.d.ts +1 -1
- package/lib/components/CardHeader/renderCardHeader.js +13 -9
- package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeader.d.ts +4 -9
- package/lib/components/CardHeader/useCardHeader.js +35 -33
- package/lib/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeaderStyles.d.ts +8 -2
- package/lib/components/CardHeader/useCardHeaderStyles.js +35 -9
- package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.js +7 -7
- package/lib/components/CardPreview/CardPreview.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.types.d.ts +8 -23
- package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
- package/lib/components/CardPreview/index.js.map +1 -1
- package/lib/components/CardPreview/renderCardPreview.d.ts +1 -1
- package/lib/components/CardPreview/renderCardPreview.js +9 -9
- package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreview.d.ts +4 -9
- package/lib/components/CardPreview/useCardPreview.js +18 -20
- package/lib/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreviewStyles.d.ts +8 -2
- package/lib/components/CardPreview/useCardPreviewStyles.js +16 -11
- package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib/index.d.ts +8 -4
- package/lib/index.js +5 -4
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Card.js +1 -1
- package/lib-commonjs/Card.js.map +1 -1
- package/lib-commonjs/CardFooter.js +1 -1
- package/lib-commonjs/CardFooter.js.map +1 -1
- package/lib-commonjs/CardHeader.js +1 -1
- package/lib-commonjs/CardHeader.js.map +1 -1
- package/lib-commonjs/CardPreview.js +1 -1
- package/lib-commonjs/CardPreview.js.map +1 -1
- package/lib-commonjs/components/Card/Card.d.ts +1 -1
- package/lib-commonjs/components/Card/Card.js +9 -9
- package/lib-commonjs/components/Card/Card.js.map +1 -1
- package/lib-commonjs/components/Card/Card.types.d.ts +9 -18
- package/lib-commonjs/components/Card/Card.types.js.map +1 -1
- package/lib-commonjs/components/Card/index.js +1 -1
- package/lib-commonjs/components/Card/index.js.map +1 -1
- package/lib-commonjs/components/Card/renderCard.d.ts +1 -1
- package/lib-commonjs/components/Card/renderCard.js +11 -12
- package/lib-commonjs/components/Card/renderCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCard.d.ts +3 -4
- package/lib-commonjs/components/Card/useCard.js +26 -13
- package/lib-commonjs/components/Card/useCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCardStyles.d.ts +8 -2
- package/lib-commonjs/components/Card/useCardStyles.js +143 -28
- package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.js +8 -8
- package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.types.d.ts +8 -23
- package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
- package/lib-commonjs/components/CardFooter/index.js +1 -1
- package/lib-commonjs/components/CardFooter/index.js.map +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.d.ts +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.js +12 -14
- package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooter.d.ts +4 -9
- package/lib-commonjs/components/CardFooter/useCardFooter.js +21 -20
- package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.d.ts +8 -2
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +21 -11
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.js +8 -8
- package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.types.d.ts +12 -39
- package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
- package/lib-commonjs/components/CardHeader/index.js +1 -1
- package/lib-commonjs/components/CardHeader/index.js.map +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.d.ts +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.js +16 -14
- package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeader.d.ts +4 -9
- package/lib-commonjs/components/CardHeader/useCardHeader.js +38 -37
- package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.d.ts +8 -2
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +38 -12
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.js +8 -8
- package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.types.d.ts +8 -23
- package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
- package/lib-commonjs/components/CardPreview/index.js +1 -1
- package/lib-commonjs/components/CardPreview/index.js.map +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.d.ts +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.js +12 -14
- package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreview.d.ts +4 -9
- package/lib-commonjs/components/CardPreview/useCardPreview.js +21 -23
- package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.d.ts +8 -2
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +19 -14
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/index.d.ts +8 -4
- package/lib-commonjs/index.js +153 -5
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +19 -22
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -11
- package/lib/common/isConformant.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -22
- package/lib-commonjs/common/isConformant.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardFooter/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './CardFooter';\nexport * from './CardFooter.types';\nexport * from './renderCardFooter';\nexport * from './useCardFooter';\nexport * from './useCardFooterStyles';\n"],"sourceRoot":"../src/"}
|
@@ -2,4 +2,4 @@ import type { CardFooterState } from './CardFooter.types';
|
|
2
2
|
/**
|
3
3
|
* Render the final JSX of CardFooter
|
4
4
|
*/
|
5
|
-
export declare const
|
5
|
+
export declare const renderCardFooter_unstable: (state: CardFooterState) => JSX.Element;
|
@@ -3,27 +3,25 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.renderCardFooter_unstable = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
13
|
-
|
14
|
-
var useCardFooter_1 = /*#__PURE__*/require("./useCardFooter");
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
15
11
|
/**
|
16
12
|
* Render the final JSX of CardFooter
|
17
13
|
*/
|
18
14
|
|
19
15
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
return React.createElement(slots.root,
|
16
|
+
const renderCardFooter_unstable = state => {
|
17
|
+
const {
|
18
|
+
slots,
|
19
|
+
slotProps
|
20
|
+
} = react_utilities_1.getSlots(state);
|
21
|
+
return React.createElement(slots.root, { ...slotProps.root
|
22
|
+
}, slotProps.root.children, slots.action && React.createElement(slots.action, { ...slotProps.action
|
23
|
+
}));
|
26
24
|
};
|
27
25
|
|
28
|
-
exports.
|
26
|
+
exports.renderCardFooter_unstable = renderCardFooter_unstable;
|
29
27
|
//# sourceMappingURL=renderCardFooter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,yBAAyB,GAAI,KAAD,IAA2B;AAClE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAA0B,KAA1B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,MAAN,IAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;AAAf,GAAb,CAFnB,CADF;AAMD,CATM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardFooterSlots, CardFooterState } from './CardFooter.types';\n\n/**\n * Render the final JSX of CardFooter\n */\nexport const renderCardFooter_unstable = (state: CardFooterState) => {\n const { slots, slotProps } = getSlots<CardFooterSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,17 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { CardFooterProps,
|
3
|
-
/**
|
4
|
-
* Array of all shorthand properties listed in CardFooterShorthandProps
|
5
|
-
*/
|
6
|
-
export declare const cardFooterShorthandProps: CardFooterShorthandProps[];
|
2
|
+
import type { CardFooterProps, CardFooterState } from './CardFooter.types';
|
7
3
|
/**
|
8
4
|
* Create the state required to render CardFooter.
|
9
5
|
*
|
10
|
-
* The returned state can be modified with hooks such as
|
11
|
-
* before being passed to
|
6
|
+
* The returned state can be modified with hooks such as useCardFooterStyles_unstable,
|
7
|
+
* before being passed to renderCardFooter_unstable.
|
12
8
|
*
|
13
9
|
* @param props - props from this instance of CardFooter
|
14
10
|
* @param ref - reference to root HTMLElement of CardFooter
|
15
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
16
11
|
*/
|
17
|
-
export declare const
|
12
|
+
export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React.Ref<HTMLElement>) => CardFooterState;
|
@@ -3,35 +3,36 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCardFooter_unstable = void 0;
|
7
7
|
|
8
|
-
|
9
|
-
/**
|
10
|
-
* Array of all shorthand properties listed in CardFooterShorthandProps
|
11
|
-
*/
|
12
|
-
|
13
|
-
|
14
|
-
exports.cardFooterShorthandProps = ['action'];
|
15
|
-
var mergeProps = /*#__PURE__*/react_utilities_1.makeMergeProps({
|
16
|
-
deepMerge: exports.cardFooterShorthandProps
|
17
|
-
});
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
18
9
|
/**
|
19
10
|
* Create the state required to render CardFooter.
|
20
11
|
*
|
21
|
-
* The returned state can be modified with hooks such as
|
22
|
-
* before being passed to
|
12
|
+
* The returned state can be modified with hooks such as useCardFooterStyles_unstable,
|
13
|
+
* before being passed to renderCardFooter_unstable.
|
23
14
|
*
|
24
15
|
* @param props - props from this instance of CardFooter
|
25
16
|
* @param ref - reference to root HTMLElement of CardFooter
|
26
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
27
17
|
*/
|
28
18
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
19
|
+
|
20
|
+
const useCardFooter_unstable = (props, ref) => {
|
21
|
+
const {
|
22
|
+
action
|
23
|
+
} = props;
|
24
|
+
return {
|
25
|
+
components: {
|
26
|
+
root: 'div',
|
27
|
+
action: 'div'
|
28
|
+
},
|
29
|
+
root: react_utilities_1.getNativeElementProps('div', {
|
30
|
+
ref,
|
31
|
+
...props
|
32
|
+
}),
|
33
|
+
action: react_utilities_1.resolveShorthand(action)
|
34
|
+
};
|
34
35
|
};
|
35
36
|
|
36
|
-
exports.
|
37
|
+
exports.useCardFooter_unstable = useCardFooter_unstable;
|
37
38
|
//# sourceMappingURL=useCardFooter.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardFooter/useCardFooter.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;AAC7G,QAAM;AAAE,IAAA;AAAF,MAAa,KAAnB;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,MAAM,EAAE;AAFE,KADP;AAML,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAA7B,CAND;AAUL,IAAA,MAAM,EAAE,iBAAA,CAAA,gBAAA,CAAiB,MAAjB;AAVH,GAAP;AAYD,CAfM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { CardFooterProps, CardFooterState } from './CardFooter.types';\n\n/**\n * Create the state required to render CardFooter.\n *\n * The returned state can be modified with hooks such as useCardFooterStyles_unstable,\n * before being passed to renderCardFooter_unstable.\n *\n * @param props - props from this instance of CardFooter\n * @param ref - reference to root HTMLElement of CardFooter\n */\nexport const useCardFooter_unstable = (props: CardFooterProps, ref: React.Ref<HTMLElement>): CardFooterState => {\n const { action } = props;\n\n return {\n components: {\n root: 'div',\n action: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n action: resolveShorthand(action),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,5 +1,11 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
2
|
+
import type { CardFooterSlots, CardFooterState } from './CardFooter.types';
|
3
|
+
/**
|
4
|
+
* @deprecated Use `cardFooterClassNames.root` instead.
|
5
|
+
*/
|
6
|
+
export declare const cardFooterClassName = "fui-CardFooter";
|
7
|
+
export declare const cardFooterClassNames: SlotClassNames<CardFooterSlots>;
|
2
8
|
/**
|
3
9
|
* Apply styling to the CardFooter slots based on the state
|
4
10
|
*/
|
5
|
-
export declare const
|
11
|
+
export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
|
@@ -3,41 +3,51 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCardFooterStyles_unstable = exports.cardFooterClassNames = exports.cardFooterClassName = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
/**
|
10
|
-
*
|
10
|
+
* @deprecated Use `cardFooterClassNames.root` instead.
|
11
11
|
*/
|
12
12
|
|
13
13
|
|
14
|
-
|
14
|
+
exports.cardFooterClassName = 'fui-CardFooter';
|
15
|
+
exports.cardFooterClassNames = {
|
16
|
+
root: 'fui-CardFooter',
|
17
|
+
action: 'fui-CardFooter__action'
|
18
|
+
};
|
19
|
+
/**
|
20
|
+
* Styles for the root slot
|
21
|
+
*/
|
22
|
+
|
23
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
15
24
|
"root": {
|
16
25
|
"mc9l5x": "f22iagw",
|
17
26
|
"Beiy3e4": "f1063pyq",
|
18
|
-
"
|
27
|
+
"i8kkvl": "f4akndk",
|
28
|
+
"Belr9w4": "fe5j3v"
|
19
29
|
},
|
20
30
|
"action": {
|
21
31
|
"Frg6f3": ["fcgxt0o", "f1ujusj6"]
|
22
32
|
}
|
23
33
|
}, {
|
24
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".
|
34
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}"]
|
25
35
|
});
|
26
36
|
/**
|
27
37
|
* Apply styling to the CardFooter slots based on the state
|
28
38
|
*/
|
29
39
|
|
30
40
|
|
31
|
-
|
32
|
-
|
33
|
-
state.className =
|
41
|
+
const useCardFooterStyles_unstable = state => {
|
42
|
+
const styles = useStyles();
|
43
|
+
state.root.className = react_1.mergeClasses(exports.cardFooterClassNames.root, styles.root, state.root.className);
|
34
44
|
|
35
45
|
if (state.action) {
|
36
|
-
state.action.className =
|
46
|
+
state.action.className = react_1.mergeClasses(exports.cardFooterClassNames.action, styles.action, state.action.className);
|
37
47
|
}
|
38
48
|
|
39
49
|
return state;
|
40
50
|
};
|
41
51
|
|
42
|
-
exports.
|
52
|
+
exports.useCardFooterStyles_unstable = useCardFooterStyles_unstable;
|
43
53
|
//# sourceMappingURL=useCardFooterStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardFooter/useCardFooterStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,mBAAA,GAAsB,gBAAtB;AACA,OAAA,CAAA,oBAAA,GAAwD;AACnE,EAAA,IAAI,EAAE,gBAD6D;AAEnE,EAAA,MAAM,EAAE;AAF2D,CAAxD;AAKb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAWA;;AAEG;;;AACI,MAAM,4BAA4B,GAAI,KAAD,IAA4C;AACtF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAA,CAAqB,IAAlC,EAAwC,MAAM,CAAC,IAA/C,EAAqD,KAAK,CAAC,IAAN,CAAW,SAAhE,CAAvB;;AAEA,MAAI,KAAK,CAAC,MAAV,EAAkB;AAChB,IAAA,KAAK,CAAC,MAAN,CAAa,SAAb,GAAyB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAA,CAAqB,MAAlC,EAA0C,MAAM,CAAC,MAAjD,EAAyD,KAAK,CAAC,MAAN,CAAa,SAAtE,CAAzB;AACD;;AAED,SAAO,KAAP;AACD,CATM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { CardFooterSlots, CardFooterState } from './CardFooter.types';\n\n/**\n * @deprecated Use `cardFooterClassNames.root` instead.\n */\nexport const cardFooterClassName = 'fui-CardFooter';\nexport const cardFooterClassNames: SlotClassNames<CardFooterSlots> = {\n root: 'fui-CardFooter',\n action: 'fui-CardFooter__action',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n ...shorthands.gap('12px'),\n },\n action: {\n marginLeft: 'auto',\n },\n});\n\n/**\n * Apply styling to the CardFooter slots based on the state\n */\nexport const useCardFooterStyles_unstable = (state: CardFooterState): CardFooterState => {\n const styles = useStyles();\n state.root.className = mergeClasses(cardFooterClassNames.root, styles.root, state.root.className);\n\n if (state.action) {\n state.action.className = mergeClasses(cardFooterClassNames.action, styles.action, state.action.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -5,22 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.CardHeader = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
|
-
|
10
|
+
const useCardHeader_1 = /*#__PURE__*/require("./useCardHeader");
|
11
11
|
|
12
|
-
|
12
|
+
const renderCardHeader_1 = /*#__PURE__*/require("./renderCardHeader");
|
13
13
|
|
14
|
-
|
14
|
+
const useCardHeaderStyles_1 = /*#__PURE__*/require("./useCardHeaderStyles");
|
15
15
|
/**
|
16
16
|
* Component to render an image, text and an action in a Card component.
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
|
-
exports.CardHeader = /*#__PURE__*/React.forwardRef(
|
21
|
-
|
22
|
-
useCardHeaderStyles_1.
|
23
|
-
return renderCardHeader_1.
|
20
|
+
exports.CardHeader = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
+
const state = useCardHeader_1.useCardHeader_unstable(props, ref);
|
22
|
+
useCardHeaderStyles_1.useCardHeaderStyles_unstable(state);
|
23
|
+
return renderCardHeader_1.renderCardHeader_unstable(state);
|
24
24
|
});
|
25
25
|
exports.CardHeader.displayName = 'CardHeader';
|
26
26
|
//# sourceMappingURL=CardHeader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardHeader/CardHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AACA,MAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,MAAA,qBAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,UAAA,gBAAmD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC9F,QAAM,KAAK,GAAG,eAAA,CAAA,sBAAA,CAAuB,KAAvB,EAA8B,GAA9B,CAAd;AAEA,EAAA,qBAAA,CAAA,4BAAA,CAA6B,KAA7B;AACA,SAAO,kBAAA,CAAA,yBAAA,CAA0B,KAA1B,CAAP;AACD,CAL+D,CAAnD;AAOb,OAAA,CAAA,UAAA,CAAW,WAAX,GAAyB,YAAzB","sourcesContent":["import * as React from 'react';\nimport { useCardHeader_unstable } from './useCardHeader';\nimport { renderCardHeader_unstable } from './renderCardHeader';\nimport { useCardHeaderStyles_unstable } from './useCardHeaderStyles';\nimport type { CardHeaderProps } from './CardHeader.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Component to render an image, text and an action in a Card component.\n */\nexport const CardHeader: ForwardRefComponent<CardHeaderProps> = React.forwardRef((props, ref) => {\n const state = useCardHeader_unstable(props, ref);\n\n useCardHeaderStyles_unstable(state);\n return renderCardHeader_unstable(state);\n});\n\nCardHeader.displayName = 'CardHeader';\n"],"sourceRoot":"../src/"}
|
@@ -1,44 +1,17 @@
|
|
1
|
-
import
|
2
|
-
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
|
+
export declare type CardHeaderSlots = {
|
3
|
+
root: Slot<'div'>;
|
4
|
+
image: Slot<'div'>;
|
5
|
+
content?: Slot<'div'>;
|
6
|
+
header: Slot<'span'>;
|
7
|
+
description: Slot<'span'>;
|
8
|
+
action?: Slot<'div'>;
|
9
|
+
};
|
3
10
|
/**
|
4
|
-
* CardHeader
|
11
|
+
* CardHeader props
|
5
12
|
*/
|
6
|
-
export
|
7
|
-
/**
|
8
|
-
* Image slot
|
9
|
-
*/
|
10
|
-
image: ShorthandPropsCompat<React.ImgHTMLAttributes<HTMLImageElement>>;
|
11
|
-
/**
|
12
|
-
* Content slot, wrapper of the header and description slots
|
13
|
-
*/
|
14
|
-
content?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
|
15
|
-
/**
|
16
|
-
* Header title slot
|
17
|
-
*/
|
18
|
-
header: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
|
19
|
-
/**
|
20
|
-
* Description slot
|
21
|
-
*/
|
22
|
-
description: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
|
23
|
-
/**
|
24
|
-
* Actions slot
|
25
|
-
*/
|
26
|
-
action?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
|
27
|
-
}
|
28
|
-
/**
|
29
|
-
* Names of the shorthand properties in CardHeaderProps
|
30
|
-
*/
|
31
|
-
export declare type CardHeaderShorthandProps = 'image' | 'content' | 'header' | 'description' | 'action';
|
32
|
-
/**
|
33
|
-
* Names of CardHeaderProps that have a default value in useCardHeader
|
34
|
-
*/
|
35
|
-
export declare type CardHeaderDefaultedProps = never;
|
13
|
+
export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
|
36
14
|
/**
|
37
15
|
* State used in rendering CardHeader
|
38
16
|
*/
|
39
|
-
export
|
40
|
-
/**
|
41
|
-
* Ref to the root element
|
42
|
-
*/
|
43
|
-
ref: React.Ref<HTMLElement>;
|
44
|
-
}
|
17
|
+
export declare type CardHeaderState = ComponentState<CardHeaderSlots>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardHeader/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './CardHeader';\nexport * from './CardHeader.types';\nexport * from './renderCardHeader';\nexport * from './useCardHeader';\nexport * from './useCardHeaderStyles';\n"],"sourceRoot":"../src/"}
|
@@ -2,4 +2,4 @@ import type { CardHeaderState } from './CardHeader.types';
|
|
2
2
|
/**
|
3
3
|
* Render the final JSX of CardHeader
|
4
4
|
*/
|
5
|
-
export declare const
|
5
|
+
export declare const renderCardHeader_unstable: (state: CardHeaderState) => JSX.Element;
|
@@ -3,27 +3,29 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.renderCardHeader_unstable = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
13
|
-
|
14
|
-
var useCardHeader_1 = /*#__PURE__*/require("./useCardHeader");
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
15
11
|
/**
|
16
12
|
* Render the final JSX of CardHeader
|
17
13
|
*/
|
18
14
|
|
19
15
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
return React.createElement(slots.root,
|
16
|
+
const renderCardHeader_unstable = state => {
|
17
|
+
const {
|
18
|
+
slots,
|
19
|
+
slotProps
|
20
|
+
} = react_utilities_1.getSlots(state);
|
21
|
+
return React.createElement(slots.root, { ...slotProps.root
|
22
|
+
}, React.createElement(slots.image, { ...slotProps.image
|
23
|
+
}), slots.content && React.createElement(slots.content, { ...slotProps.content
|
24
|
+
}, React.createElement(slots.header, { ...slotProps.header
|
25
|
+
}), React.createElement(slots.description, { ...slotProps.description
|
26
|
+
})), slots.action && React.createElement(slots.action, { ...slotProps.action
|
27
|
+
}));
|
26
28
|
};
|
27
29
|
|
28
|
-
exports.
|
30
|
+
exports.renderCardHeader_unstable = renderCardHeader_unstable;
|
29
31
|
//# sourceMappingURL=renderCardHeader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardHeader/renderCardHeader.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,yBAAyB,GAAI,KAAD,IAA2B;AAClE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAA0B,KAA1B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,KAAP,EAAY,EAAA,GAAK,SAAS,CAAC;AAAf,GAAZ,CADF,EAEG,KAAK,CAAC,OAAN,IACC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;AAAf,GAAd,EACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;AAAf,GAAb,CADF,EAEE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,WAAP,EAAkB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAlB,CAFF,CAHJ,EAQG,KAAK,CAAC,MAAN,IAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;AAAf,GAAb,CARnB,CADF;AAYD,CAfM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardHeaderSlots, CardHeaderState } from './CardHeader.types';\n\n/**\n * Render the final JSX of CardHeader\n */\nexport const renderCardHeader_unstable = (state: CardHeaderState) => {\n const { slots, slotProps } = getSlots<CardHeaderSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.image {...slotProps.image} />\n {slots.content && (\n <slots.content {...slotProps.content}>\n <slots.header {...slotProps.header} />\n <slots.description {...slotProps.description} />\n </slots.content>\n )}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,17 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { CardHeaderProps,
|
3
|
-
/**
|
4
|
-
* Array of all shorthand properties listed in CardHeaderShorthandProps
|
5
|
-
*/
|
6
|
-
export declare const cardHeaderShorthandPropsCompat: CardHeaderShorthandProps[];
|
2
|
+
import type { CardHeaderProps, CardHeaderState } from './CardHeader.types';
|
7
3
|
/**
|
8
4
|
* Create the state required to render CardHeader.
|
9
5
|
*
|
10
|
-
* The returned state can be modified with hooks such as
|
11
|
-
* before being passed to
|
6
|
+
* The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
|
7
|
+
* before being passed to renderCardHeader_unstable.
|
12
8
|
*
|
13
9
|
* @param props - props from this instance of CardHeader
|
14
10
|
* @param ref - reference to root HTMLElement of CardHeader
|
15
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
16
11
|
*/
|
17
|
-
export declare const
|
12
|
+
export declare const useCardHeader_unstable: (props: CardHeaderProps, ref: React.Ref<HTMLElement>) => CardHeaderState;
|
@@ -3,53 +3,54 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCardHeader_unstable = void 0;
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
|
-
/**
|
12
|
-
* Array of all shorthand properties listed in CardHeaderShorthandProps
|
13
|
-
*/
|
14
|
-
|
15
|
-
|
16
|
-
exports.cardHeaderShorthandPropsCompat = ['image', 'content', 'header', 'description', 'action'];
|
17
|
-
var mergeProps = /*#__PURE__*/react_utilities_1.makeMergeProps({
|
18
|
-
deepMerge: exports.cardHeaderShorthandPropsCompat
|
19
|
-
});
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
20
9
|
/**
|
21
10
|
* Create the state required to render CardHeader.
|
22
11
|
*
|
23
|
-
* The returned state can be modified with hooks such as
|
24
|
-
* before being passed to
|
12
|
+
* The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
|
13
|
+
* before being passed to renderCardHeader_unstable.
|
25
14
|
*
|
26
15
|
* @param props - props from this instance of CardHeader
|
27
16
|
* @param ref - reference to root HTMLElement of CardHeader
|
28
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
29
17
|
*/
|
30
18
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
19
|
+
|
20
|
+
const useCardHeader_unstable = (props, ref) => {
|
21
|
+
const {
|
22
|
+
image,
|
23
|
+
content,
|
24
|
+
header,
|
25
|
+
description,
|
26
|
+
action
|
27
|
+
} = props;
|
28
|
+
return {
|
29
|
+
components: {
|
30
|
+
root: 'div',
|
31
|
+
image: 'div',
|
32
|
+
content: 'div',
|
33
|
+
header: 'span',
|
34
|
+
description: 'span',
|
35
|
+
action: 'div'
|
48
36
|
},
|
49
|
-
|
50
|
-
|
51
|
-
|
37
|
+
root: react_utilities_1.getNativeElementProps('div', {
|
38
|
+
ref,
|
39
|
+
...props
|
40
|
+
}),
|
41
|
+
image: react_utilities_1.resolveShorthand(image, {
|
42
|
+
required: true
|
43
|
+
}),
|
44
|
+
content: react_utilities_1.resolveShorthand(content || {}),
|
45
|
+
header: react_utilities_1.resolveShorthand(header, {
|
46
|
+
required: true
|
47
|
+
}),
|
48
|
+
description: react_utilities_1.resolveShorthand(description, {
|
49
|
+
required: true
|
50
|
+
}),
|
51
|
+
action: react_utilities_1.resolveShorthand(action)
|
52
|
+
};
|
52
53
|
};
|
53
54
|
|
54
|
-
exports.
|
55
|
+
exports.useCardHeader_unstable = useCardHeader_unstable;
|
55
56
|
//# sourceMappingURL=useCardHeader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardHeader/useCardHeader.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,sBAAsB,GAAG,CAAC,KAAD,EAAyB,GAAzB,KAAyE;AAC7G,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA,OAAT;AAAkB,IAAA,MAAlB;AAA0B,IAAA,WAA1B;AAAuC,IAAA;AAAvC,MAAkD,KAAxD;AAEA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,KAAK,EAAE,KAFG;AAGV,MAAA,OAAO,EAAE,KAHC;AAIV,MAAA,MAAM,EAAE,MAJE;AAKV,MAAA,WAAW,EAAE,MALH;AAMV,MAAA,MAAM,EAAE;AANE,KADP;AAUL,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAA7B,CAVD;AAcL,IAAA,KAAK,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB;AAC7B,MAAA,QAAQ,EAAE;AADmB,KAAxB,CAdF;AAiBL,IAAA,OAAO,EAAE,iBAAA,CAAA,gBAAA,CAAiB,OAAO,IAAI,EAA5B,CAjBJ;AAkBL,IAAA,MAAM,EAAE,iBAAA,CAAA,gBAAA,CAAiB,MAAjB,EAAyB;AAC/B,MAAA,QAAQ,EAAE;AADqB,KAAzB,CAlBH;AAqBL,IAAA,WAAW,EAAE,iBAAA,CAAA,gBAAA,CAAiB,WAAjB,EAA8B;AACzC,MAAA,QAAQ,EAAE;AAD+B,KAA9B,CArBR;AAwBL,IAAA,MAAM,EAAE,iBAAA,CAAA,gBAAA,CAAiB,MAAjB;AAxBH,GAAP;AA0BD,CA7BM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { CardHeaderProps, CardHeaderState } from './CardHeader.types';\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, content, header, description, action } = props;\n\n return {\n components: {\n root: 'div',\n image: 'div',\n content: 'div',\n header: 'span',\n description: 'span',\n action: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n image: resolveShorthand(image, {\n required: true,\n }),\n content: resolveShorthand(content || {}),\n header: resolveShorthand(header, {\n required: true,\n }),\n description: resolveShorthand(description, {\n required: true,\n }),\n action: resolveShorthand(action),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,5 +1,11 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
2
|
+
import type { CardHeaderSlots, CardHeaderState } from './CardHeader.types';
|
3
|
+
/**
|
4
|
+
* @deprecated Use `cardHeaderClassNames.root` instead.
|
5
|
+
*/
|
6
|
+
export declare const cardHeaderClassName = "fui-CardHeader";
|
7
|
+
export declare const cardHeaderClassNames: SlotClassNames<CardHeaderSlots>;
|
2
8
|
/**
|
3
9
|
* Apply styling to the CardHeader slots based on the state
|
4
10
|
*/
|
5
|
-
export declare const
|
11
|
+
export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => CardHeaderState;
|