@fluentui/react-card 9.0.0-alpha.5 → 9.0.0-alpha.6
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 +58 -7
- package/CHANGELOG.md +23 -8
- 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/common/isConformant.js.map +1 -1
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/Card.types.js.map +1 -1
- package/lib/components/Card/index.js.map +1 -1
- package/lib/components/Card/renderCard.js.map +1 -1
- package/lib/components/Card/useCard.js.map +1 -1
- package/lib/components/Card/useCardStyles.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
- package/lib/components/CardFooter/index.js.map +1 -1
- package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
- package/lib/components/CardHeader/index.js.map +1 -1
- package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
- package/lib/components/CardPreview/index.js.map +1 -1
- package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Card.js.map +1 -1
- package/lib-commonjs/CardFooter.js.map +1 -1
- package/lib-commonjs/CardHeader.js.map +1 -1
- package/lib-commonjs/CardPreview.js.map +1 -1
- package/lib-commonjs/common/isConformant.js.map +1 -1
- package/lib-commonjs/components/Card/Card.js.map +1 -1
- package/lib-commonjs/components/Card/Card.types.js.map +1 -1
- package/lib-commonjs/components/Card/index.js.map +1 -1
- package/lib-commonjs/components/Card/renderCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.types.js.map +1 -1
- package/lib-commonjs/components/CardFooter/index.js.map +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.types.js.map +1 -1
- package/lib-commonjs/components/CardHeader/index.js.map +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.types.js.map +1 -1
- package/lib-commonjs/components/CardPreview/index.js.map +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +8 -8
- package/lib-amd/Card.d.ts +0 -1
- package/lib-amd/Card.js +0 -6
- package/lib-amd/Card.js.map +0 -1
- package/lib-amd/CardFooter.d.ts +0 -1
- package/lib-amd/CardFooter.js +0 -6
- package/lib-amd/CardFooter.js.map +0 -1
- package/lib-amd/CardHeader.d.ts +0 -1
- package/lib-amd/CardHeader.js +0 -6
- package/lib-amd/CardHeader.js.map +0 -1
- package/lib-amd/CardPreview.d.ts +0 -1
- package/lib-amd/CardPreview.js +0 -6
- package/lib-amd/CardPreview.js.map +0 -1
- package/lib-amd/common/isConformant.d.ts +0 -4
- package/lib-amd/common/isConformant.js +0 -15
- package/lib-amd/common/isConformant.js.map +0 -1
- package/lib-amd/components/Card/Card.d.ts +0 -6
- package/lib-amd/components/Card/Card.js +0 -15
- package/lib-amd/components/Card/Card.js.map +0 -1
- package/lib-amd/components/Card/Card.types.d.ts +0 -24
- package/lib-amd/components/Card/Card.types.js +0 -5
- package/lib-amd/components/Card/Card.types.js.map +0 -1
- package/lib-amd/components/Card/index.d.ts +0 -5
- package/lib-amd/components/Card/index.js +0 -10
- package/lib-amd/components/Card/index.js.map +0 -1
- package/lib-amd/components/Card/renderCard.d.ts +0 -5
- package/lib-amd/components/Card/renderCard.js +0 -14
- package/lib-amd/components/Card/renderCard.js.map +0 -1
- package/lib-amd/components/Card/useCard.d.ts +0 -13
- package/lib-amd/components/Card/useCard.js +0 -25
- package/lib-amd/components/Card/useCard.js.map +0 -1
- package/lib-amd/components/Card/useCardStyles.d.ts +0 -5
- package/lib-amd/components/Card/useCardStyles.js +0 -50
- package/lib-amd/components/Card/useCardStyles.js.map +0 -1
- package/lib-amd/components/CardFooter/CardFooter.d.ts +0 -6
- package/lib-amd/components/CardFooter/CardFooter.js +0 -15
- package/lib-amd/components/CardFooter/CardFooter.js.map +0 -1
- package/lib-amd/components/CardFooter/CardFooter.types.d.ts +0 -28
- package/lib-amd/components/CardFooter/CardFooter.types.js +0 -5
- package/lib-amd/components/CardFooter/CardFooter.types.js.map +0 -1
- package/lib-amd/components/CardFooter/index.d.ts +0 -5
- package/lib-amd/components/CardFooter/index.js +0 -10
- package/lib-amd/components/CardFooter/index.js.map +0 -1
- package/lib-amd/components/CardFooter/renderCardFooter.d.ts +0 -5
- package/lib-amd/components/CardFooter/renderCardFooter.js +0 -16
- package/lib-amd/components/CardFooter/renderCardFooter.js.map +0 -1
- package/lib-amd/components/CardFooter/useCardFooter.d.ts +0 -17
- package/lib-amd/components/CardFooter/useCardFooter.js +0 -28
- package/lib-amd/components/CardFooter/useCardFooter.js.map +0 -1
- package/lib-amd/components/CardFooter/useCardFooterStyles.d.ts +0 -5
- package/lib-amd/components/CardFooter/useCardFooterStyles.js +0 -31
- package/lib-amd/components/CardFooter/useCardFooterStyles.js.map +0 -1
- package/lib-amd/components/CardHeader/CardHeader.d.ts +0 -6
- package/lib-amd/components/CardHeader/CardHeader.js +0 -15
- package/lib-amd/components/CardHeader/CardHeader.js.map +0 -1
- package/lib-amd/components/CardHeader/CardHeader.types.d.ts +0 -44
- package/lib-amd/components/CardHeader/CardHeader.types.js +0 -5
- package/lib-amd/components/CardHeader/CardHeader.types.js.map +0 -1
- package/lib-amd/components/CardHeader/index.d.ts +0 -5
- package/lib-amd/components/CardHeader/index.js +0 -10
- package/lib-amd/components/CardHeader/index.js.map +0 -1
- package/lib-amd/components/CardHeader/renderCardHeader.d.ts +0 -5
- package/lib-amd/components/CardHeader/renderCardHeader.js +0 -19
- package/lib-amd/components/CardHeader/renderCardHeader.js.map +0 -1
- package/lib-amd/components/CardHeader/useCardHeader.d.ts +0 -17
- package/lib-amd/components/CardHeader/useCardHeader.js +0 -39
- package/lib-amd/components/CardHeader/useCardHeader.js.map +0 -1
- package/lib-amd/components/CardHeader/useCardHeaderStyles.d.ts +0 -5
- package/lib-amd/components/CardHeader/useCardHeaderStyles.js +0 -56
- package/lib-amd/components/CardHeader/useCardHeaderStyles.js.map +0 -1
- package/lib-amd/components/CardPreview/CardPreview.d.ts +0 -6
- package/lib-amd/components/CardPreview/CardPreview.js +0 -15
- package/lib-amd/components/CardPreview/CardPreview.js.map +0 -1
- package/lib-amd/components/CardPreview/CardPreview.types.d.ts +0 -28
- package/lib-amd/components/CardPreview/CardPreview.types.js +0 -5
- package/lib-amd/components/CardPreview/CardPreview.types.js.map +0 -1
- package/lib-amd/components/CardPreview/index.d.ts +0 -5
- package/lib-amd/components/CardPreview/index.js +0 -10
- package/lib-amd/components/CardPreview/index.js.map +0 -1
- package/lib-amd/components/CardPreview/renderCardPreview.d.ts +0 -5
- package/lib-amd/components/CardPreview/renderCardPreview.js +0 -16
- package/lib-amd/components/CardPreview/renderCardPreview.js.map +0 -1
- package/lib-amd/components/CardPreview/useCardPreview.d.ts +0 -17
- package/lib-amd/components/CardPreview/useCardPreview.js +0 -29
- package/lib-amd/components/CardPreview/useCardPreview.js.map +0 -1
- package/lib-amd/components/CardPreview/useCardPreviewStyles.d.ts +0 -5
- package/lib-amd/components/CardPreview/useCardPreviewStyles.js +0 -39
- package/lib-amd/components/CardPreview/useCardPreviewStyles.js.map +0 -1
- package/lib-amd/index.d.ts +0 -4
- package/lib-amd/index.js +0 -9
- package/lib-amd/index.js.map +0 -1
@@ -1,31 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@fluentui/react-make-styles"], function (require, exports, react_make_styles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useCardFooterStyles = void 0;
|
5
|
-
/**
|
6
|
-
* Styles for the root slot
|
7
|
-
*/
|
8
|
-
var useStyles = react_make_styles_1.makeStyles({
|
9
|
-
root: {
|
10
|
-
display: 'flex',
|
11
|
-
flexDirection: 'row',
|
12
|
-
gap: '12px',
|
13
|
-
},
|
14
|
-
action: {
|
15
|
-
marginLeft: 'auto',
|
16
|
-
},
|
17
|
-
});
|
18
|
-
/**
|
19
|
-
* Apply styling to the CardFooter slots based on the state
|
20
|
-
*/
|
21
|
-
var useCardFooterStyles = function (state) {
|
22
|
-
var styles = useStyles();
|
23
|
-
state.className = react_make_styles_1.mergeClasses(styles.root, state.className);
|
24
|
-
if (state.action) {
|
25
|
-
state.action.className = react_make_styles_1.mergeClasses(styles.action, state.action.className);
|
26
|
-
}
|
27
|
-
return state;
|
28
|
-
};
|
29
|
-
exports.useCardFooterStyles = useCardFooterStyles;
|
30
|
-
});
|
31
|
-
//# sourceMappingURL=useCardFooterStyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useCardFooterStyles.js","sourceRoot":"../src/","sources":["components/CardFooter/useCardFooterStyles.ts"],"names":[],"mappings":";;;;IAGA;;OAEG;IACH,IAAM,SAAS,GAAG,8BAAU,CAAC;QAC3B,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,KAAK;YACpB,GAAG,EAAE,MAAM;SACZ;QACD,MAAM,EAAE;YACN,UAAU,EAAE,MAAM;SACnB;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,mBAAmB,GAAG,UAAC,KAAsB;QACxD,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,KAAK,CAAC,SAAS,GAAG,gCAAY,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAE7D,IAAI,KAAK,CAAC,MAAM,EAAE;YAChB,KAAK,CAAC,MAAM,CAAC,SAAS,GAAG,gCAAY,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SAC9E;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IATW,QAAA,mBAAmB,uBAS9B","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport type { CardFooterState } from './CardFooter.types';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n 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 = (state: CardFooterState): CardFooterState => {\n const styles = useStyles();\n state.className = mergeClasses(styles.root, state.className);\n\n if (state.action) {\n state.action.className = mergeClasses(styles.action, state.action.className);\n }\n\n return state;\n};\n"]}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { CardHeaderProps } from './CardHeader.types';
|
3
|
-
/**
|
4
|
-
* Component to render an image, text and an action in a Card component.
|
5
|
-
*/
|
6
|
-
export declare const CardHeader: React.ForwardRefExoticComponent<CardHeaderProps & React.RefAttributes<HTMLElement>>;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "./useCardHeader", "./renderCardHeader", "./useCardHeaderStyles"], function (require, exports, React, useCardHeader_1, renderCardHeader_1, useCardHeaderStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.CardHeader = void 0;
|
5
|
-
/**
|
6
|
-
* Component to render an image, text and an action in a Card component.
|
7
|
-
*/
|
8
|
-
exports.CardHeader = React.forwardRef(function (props, ref) {
|
9
|
-
var state = useCardHeader_1.useCardHeader(props, ref);
|
10
|
-
useCardHeaderStyles_1.useCardHeaderStyles(state);
|
11
|
-
return renderCardHeader_1.renderCardHeader(state);
|
12
|
-
});
|
13
|
-
exports.CardHeader.displayName = 'CardHeader';
|
14
|
-
});
|
15
|
-
//# sourceMappingURL=CardHeader.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardHeader.js","sourceRoot":"../src/","sources":["components/CardHeader/CardHeader.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACU,QAAA,UAAU,GAAG,KAAK,CAAC,UAAU,CAA+B,UAAC,KAAK,EAAE,GAAG;QAClF,IAAM,KAAK,GAAG,6BAAa,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAExC,yCAAmB,CAAC,KAAK,CAAC,CAAC;QAC3B,OAAO,mCAAgB,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import * as React from 'react';\nimport { useCardHeader } from './useCardHeader';\nimport { renderCardHeader } from './renderCardHeader';\nimport { useCardHeaderStyles } from './useCardHeaderStyles';\nimport type { CardHeaderProps } from './CardHeader.types';\n\n/**\n * Component to render an image, text and an action in a Card component.\n */\nexport const CardHeader = React.forwardRef<HTMLElement, CardHeaderProps>((props, ref) => {\n const state = useCardHeader(props, ref);\n\n useCardHeaderStyles(state);\n return renderCardHeader(state);\n});\n\nCardHeader.displayName = 'CardHeader';\n"]}
|
@@ -1,44 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { ComponentPropsCompat, ComponentStateCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
|
3
|
-
/**
|
4
|
-
* CardHeader Props
|
5
|
-
*/
|
6
|
-
export interface CardHeaderProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {
|
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;
|
36
|
-
/**
|
37
|
-
* State used in rendering CardHeader
|
38
|
-
*/
|
39
|
-
export interface CardHeaderState extends ComponentStateCompat<CardHeaderProps, CardHeaderShorthandProps> {
|
40
|
-
/**
|
41
|
-
* Ref to the root element
|
42
|
-
*/
|
43
|
-
ref: React.Ref<HTMLElement>;
|
44
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardHeader.types.js","sourceRoot":"../src/","sources":["components/CardHeader/CardHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentPropsCompat, ComponentStateCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';\n\n/**\n * CardHeader Props\n */\nexport interface CardHeaderProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {\n /**\n * Image slot\n */\n image: ShorthandPropsCompat<React.ImgHTMLAttributes<HTMLImageElement>>;\n\n /**\n * Content slot, wrapper of the header and description slots\n */\n content?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;\n\n /**\n * Header title slot\n */\n header: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;\n\n /**\n * Description slot\n */\n description: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;\n\n /**\n * Actions slot\n */\n action?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;\n}\n\n/**\n * Names of the shorthand properties in CardHeaderProps\n */\nexport type CardHeaderShorthandProps = 'image' | 'content' | 'header' | 'description' | 'action';\n\n/**\n * Names of CardHeaderProps that have a default value in useCardHeader\n */\nexport type CardHeaderDefaultedProps = never;\n\n/**\n * State used in rendering CardHeader\n */\nexport interface CardHeaderState extends ComponentStateCompat<CardHeaderProps, CardHeaderShorthandProps> {\n /**\n * Ref to the root element\n */\n ref: React.Ref<HTMLElement>;\n}\n"]}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./CardHeader", "./CardHeader.types", "./renderCardHeader", "./useCardHeader", "./useCardHeaderStyles"], function (require, exports, tslib_1, CardHeader_1, CardHeader_types_1, renderCardHeader_1, useCardHeader_1, useCardHeaderStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(CardHeader_1, exports);
|
5
|
-
tslib_1.__exportStar(CardHeader_types_1, exports);
|
6
|
-
tslib_1.__exportStar(renderCardHeader_1, exports);
|
7
|
-
tslib_1.__exportStar(useCardHeader_1, exports);
|
8
|
-
tslib_1.__exportStar(useCardHeaderStyles_1, exports);
|
9
|
-
});
|
10
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/CardHeader/index.ts"],"names":[],"mappings":";;;IAAA,4CAA6B;IAC7B,kDAAmC;IACnC,kDAAmC;IACnC,+CAAgC;IAChC,qDAAsC","sourcesContent":["export * from './CardHeader';\nexport * from './CardHeader.types';\nexport * from './renderCardHeader';\nexport * from './useCardHeader';\nexport * from './useCardHeaderStyles';\n"]}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "./useCardHeader"], function (require, exports, tslib_1, React, react_utilities_1, useCardHeader_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.renderCardHeader = void 0;
|
5
|
-
/**
|
6
|
-
* Render the final JSX of CardHeader
|
7
|
-
*/
|
8
|
-
var renderCardHeader = function (state) {
|
9
|
-
var _a = react_utilities_1.getSlotsCompat(state, useCardHeader_1.cardHeaderShorthandPropsCompat), slots = _a.slots, slotProps = _a.slotProps;
|
10
|
-
return (React.createElement(slots.root, tslib_1.__assign({}, slotProps.root),
|
11
|
-
React.createElement(slots.image, tslib_1.__assign({}, slotProps.image)),
|
12
|
-
React.createElement(slots.content, tslib_1.__assign({}, slotProps.content),
|
13
|
-
React.createElement(slots.header, tslib_1.__assign({}, slotProps.header)),
|
14
|
-
React.createElement(slots.description, tslib_1.__assign({}, slotProps.description))),
|
15
|
-
React.createElement(slots.action, tslib_1.__assign({}, slotProps.action))));
|
16
|
-
};
|
17
|
-
exports.renderCardHeader = renderCardHeader;
|
18
|
-
});
|
19
|
-
//# sourceMappingURL=renderCardHeader.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"renderCardHeader.js","sourceRoot":"../src/","sources":["components/CardHeader/renderCardHeader.tsx"],"names":[],"mappings":";;;;IAKA;;OAEG;IACI,IAAM,gBAAgB,GAAG,UAAC,KAAsB;QAC/C,IAAA,KAAuB,gCAAc,CAAC,KAAK,EAAE,8CAA8B,CAAC,EAA1E,KAAK,WAAA,EAAE,SAAS,eAA0D,CAAC;QAEnF,OAAO,CACL,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI;YAC5B,oBAAC,KAAK,CAAC,KAAK,uBAAK,SAAS,CAAC,KAAK,EAAI;YACpC,oBAAC,KAAK,CAAC,OAAO,uBAAK,SAAS,CAAC,OAAO;gBAClC,oBAAC,KAAK,CAAC,MAAM,uBAAK,SAAS,CAAC,MAAM,EAAI;gBACtC,oBAAC,KAAK,CAAC,WAAW,uBAAK,SAAS,CAAC,WAAW,EAAI,CAClC;YAChB,oBAAC,KAAK,CAAC,MAAM,uBAAK,SAAS,CAAC,MAAM,EAAI,CAC3B,CACd,CAAC;IACJ,CAAC,CAAC;IAbW,QAAA,gBAAgB,oBAa3B","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { cardHeaderShorthandPropsCompat } from './useCardHeader';\nimport type { CardHeaderState } from './CardHeader.types';\n\n/**\n * Render the final JSX of CardHeader\n */\nexport const renderCardHeader = (state: CardHeaderState) => {\n const { slots, slotProps } = getSlotsCompat(state, cardHeaderShorthandPropsCompat);\n\n return (\n <slots.root {...slotProps.root}>\n <slots.image {...slotProps.image} />\n <slots.content {...slotProps.content}>\n <slots.header {...slotProps.header} />\n <slots.description {...slotProps.description} />\n </slots.content>\n <slots.action {...slotProps.action} />\n </slots.root>\n );\n};\n"]}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { CardHeaderProps, CardHeaderShorthandProps, CardHeaderState } from './CardHeader.types';
|
3
|
-
/**
|
4
|
-
* Array of all shorthand properties listed in CardHeaderShorthandProps
|
5
|
-
*/
|
6
|
-
export declare const cardHeaderShorthandPropsCompat: CardHeaderShorthandProps[];
|
7
|
-
/**
|
8
|
-
* Create the state required to render CardHeader.
|
9
|
-
*
|
10
|
-
* The returned state can be modified with hooks such as useCardHeaderStyles,
|
11
|
-
* before being passed to renderCardHeader.
|
12
|
-
*
|
13
|
-
* @param props - props from this instance of CardHeader
|
14
|
-
* @param ref - reference to root HTMLElement of CardHeader
|
15
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
16
|
-
*/
|
17
|
-
export declare const useCardHeader: (props: CardHeaderProps, ref: React.Ref<HTMLElement>, defaultProps?: CardHeaderProps | undefined) => CardHeaderState;
|
@@ -1,39 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "@fluentui/react-utilities"], function (require, exports, React, react_utilities_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useCardHeader = exports.cardHeaderShorthandPropsCompat = void 0;
|
5
|
-
/**
|
6
|
-
* Array of all shorthand properties listed in CardHeaderShorthandProps
|
7
|
-
*/
|
8
|
-
exports.cardHeaderShorthandPropsCompat = [
|
9
|
-
'image',
|
10
|
-
'content',
|
11
|
-
'header',
|
12
|
-
'description',
|
13
|
-
'action',
|
14
|
-
];
|
15
|
-
var mergeProps = react_utilities_1.makeMergeProps({ deepMerge: exports.cardHeaderShorthandPropsCompat });
|
16
|
-
/**
|
17
|
-
* Create the state required to render CardHeader.
|
18
|
-
*
|
19
|
-
* The returned state can be modified with hooks such as useCardHeaderStyles,
|
20
|
-
* before being passed to renderCardHeader.
|
21
|
-
*
|
22
|
-
* @param props - props from this instance of CardHeader
|
23
|
-
* @param ref - reference to root HTMLElement of CardHeader
|
24
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
25
|
-
*/
|
26
|
-
var useCardHeader = function (props, ref, defaultProps) {
|
27
|
-
var state = mergeProps({
|
28
|
-
image: { as: 'div' },
|
29
|
-
content: { as: 'div', children: React.Fragment },
|
30
|
-
header: { as: 'span' },
|
31
|
-
description: { as: 'span' },
|
32
|
-
action: { as: 'div' },
|
33
|
-
ref: ref,
|
34
|
-
}, defaultProps && react_utilities_1.resolveShorthandProps(defaultProps, exports.cardHeaderShorthandPropsCompat), react_utilities_1.resolveShorthandProps(props, exports.cardHeaderShorthandPropsCompat));
|
35
|
-
return state;
|
36
|
-
};
|
37
|
-
exports.useCardHeader = useCardHeader;
|
38
|
-
});
|
39
|
-
//# sourceMappingURL=useCardHeader.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useCardHeader.js","sourceRoot":"../src/","sources":["components/CardHeader/useCardHeader.ts"],"names":[],"mappings":";;;;IAIA;;OAEG;IACU,QAAA,8BAA8B,GAA+B;QACxE,OAAO;QACP,SAAS;QACT,QAAQ;QACR,aAAa;QACb,QAAQ;KACT,CAAC;IAEF,IAAM,UAAU,GAAG,gCAAc,CAAkB,EAAE,SAAS,EAAE,sCAA8B,EAAE,CAAC,CAAC;IAElG;;;;;;;;;OASG;IACI,IAAM,aAAa,GAAG,UAC3B,KAAsB,EACtB,GAA2B,EAC3B,YAA8B;QAE9B,IAAM,KAAK,GAAG,UAAU,CACtB;YACE,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE;YACpB,OAAO,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE;YAChD,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;YACtB,WAAW,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE;YAC3B,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE;YACrB,GAAG,KAAA;SACJ,EACD,YAAY,IAAI,uCAAqB,CAAC,YAAY,EAAE,sCAA8B,CAAC,EACnF,uCAAqB,CAAC,KAAK,EAAE,sCAA8B,CAAC,CAC7D,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAnBW,QAAA,aAAa,iBAmBxB","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport type { CardHeaderProps, CardHeaderShorthandProps, CardHeaderState } from './CardHeader.types';\n\n/**\n * Array of all shorthand properties listed in CardHeaderShorthandProps\n */\nexport const cardHeaderShorthandPropsCompat: CardHeaderShorthandProps[] = [\n 'image',\n 'content',\n 'header',\n 'description',\n 'action',\n];\n\nconst mergeProps = makeMergeProps<CardHeaderState>({ deepMerge: cardHeaderShorthandPropsCompat });\n\n/**\n * Create the state required to render CardHeader.\n *\n * The returned state can be modified with hooks such as useCardHeaderStyles,\n * before being passed to renderCardHeader.\n *\n * @param props - props from this instance of CardHeader\n * @param ref - reference to root HTMLElement of CardHeader\n * @param defaultProps - (optional) default prop values provided by the implementing type\n */\nexport const useCardHeader = (\n props: CardHeaderProps,\n ref: React.Ref<HTMLElement>,\n defaultProps?: CardHeaderProps,\n): CardHeaderState => {\n const state = mergeProps(\n {\n image: { as: 'div' },\n content: { as: 'div', children: React.Fragment },\n header: { as: 'span' },\n description: { as: 'span' },\n action: { as: 'div' },\n ref,\n },\n defaultProps && resolveShorthandProps(defaultProps, cardHeaderShorthandPropsCompat),\n resolveShorthandProps(props, cardHeaderShorthandPropsCompat),\n );\n\n return state;\n};\n"]}
|
@@ -1,56 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@fluentui/react-make-styles"], function (require, exports, react_make_styles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useCardHeaderStyles = void 0;
|
5
|
-
/**
|
6
|
-
* Styles for the root slot
|
7
|
-
*/
|
8
|
-
var useStyles = react_make_styles_1.makeStyles({
|
9
|
-
root: {
|
10
|
-
display: 'flex',
|
11
|
-
flexDirection: 'row',
|
12
|
-
alignItems: 'center',
|
13
|
-
gap: '12px',
|
14
|
-
height: '32px',
|
15
|
-
},
|
16
|
-
image: {
|
17
|
-
minWidth: '24px',
|
18
|
-
minHeight: '24px',
|
19
|
-
maxWidth: '32px',
|
20
|
-
maxHeight: '32px',
|
21
|
-
display: 'flex',
|
22
|
-
alignItems: 'center',
|
23
|
-
'> *': {
|
24
|
-
minWidth: 'inherit',
|
25
|
-
minHeight: 'inherit',
|
26
|
-
maxWidth: '100%',
|
27
|
-
maxHeight: '100%',
|
28
|
-
},
|
29
|
-
},
|
30
|
-
textContainer: {
|
31
|
-
display: 'flex',
|
32
|
-
flexDirection: 'column',
|
33
|
-
flexGrow: 1,
|
34
|
-
height: 'inherit',
|
35
|
-
'> *': {
|
36
|
-
height: '50%',
|
37
|
-
},
|
38
|
-
},
|
39
|
-
});
|
40
|
-
/**
|
41
|
-
* Apply styling to the CardHeader slots based on the state
|
42
|
-
*/
|
43
|
-
var useCardHeaderStyles = function (state) {
|
44
|
-
var styles = useStyles();
|
45
|
-
state.className = react_make_styles_1.mergeClasses(styles.root, state.className);
|
46
|
-
if (state.image) {
|
47
|
-
state.image.className = react_make_styles_1.mergeClasses(styles.image, state.image.className);
|
48
|
-
}
|
49
|
-
if (state.content) {
|
50
|
-
state.content.className = react_make_styles_1.mergeClasses(styles.textContainer, state.content.className);
|
51
|
-
}
|
52
|
-
return state;
|
53
|
-
};
|
54
|
-
exports.useCardHeaderStyles = useCardHeaderStyles;
|
55
|
-
});
|
56
|
-
//# sourceMappingURL=useCardHeaderStyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useCardHeaderStyles.js","sourceRoot":"../src/","sources":["components/CardHeader/useCardHeaderStyles.ts"],"names":[],"mappings":";;;;IAGA;;OAEG;IACH,IAAM,SAAS,GAAG,8BAAU,CAAC;QAC3B,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,MAAM;YACX,MAAM,EAAE,MAAM;SACf;QACD,KAAK,EAAE;YACL,QAAQ,EAAE,MAAM;YAChB,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,MAAM;YAChB,SAAS,EAAE,MAAM;YAEjB,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;YAEpB,KAAK,EAAE;gBACL,QAAQ,EAAE,SAAS;gBACnB,SAAS,EAAE,SAAS;gBACpB,QAAQ,EAAE,MAAM;gBAChB,SAAS,EAAE,MAAM;aAClB;SACF;QAED,aAAa,EAAE;YACb,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,QAAQ,EAAE,CAAC;YACX,MAAM,EAAE,SAAS;YAEjB,KAAK,EAAE;gBACL,MAAM,EAAE,KAAK;aACd;SACF;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,mBAAmB,GAAG,UAAC,KAAsB;QACxD,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,KAAK,CAAC,SAAS,GAAG,gCAAY,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAE7D,IAAI,KAAK,CAAC,KAAK,EAAE;YACf,KAAK,CAAC,KAAK,CAAC,SAAS,GAAG,gCAAY,CAAC,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;SAC3E;QAED,IAAI,KAAK,CAAC,OAAO,EAAE;YACjB,KAAK,CAAC,OAAO,CAAC,SAAS,GAAG,gCAAY,CAAC,MAAM,CAAC,aAAa,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;SACvF;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAbW,QAAA,mBAAmB,uBAa9B","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport type { CardHeaderState } from './CardHeader.types';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: '12px',\n height: '32px',\n },\n image: {\n minWidth: '24px',\n minHeight: '24px',\n maxWidth: '32px',\n maxHeight: '32px',\n\n display: 'flex',\n alignItems: 'center',\n\n '> *': {\n minWidth: 'inherit',\n minHeight: 'inherit',\n maxWidth: '100%',\n maxHeight: '100%',\n },\n },\n\n textContainer: {\n display: 'flex',\n flexDirection: 'column',\n flexGrow: 1,\n height: 'inherit',\n\n '> *': {\n height: '50%',\n },\n },\n});\n\n/**\n * Apply styling to the CardHeader slots based on the state\n */\nexport const useCardHeaderStyles = (state: CardHeaderState): CardHeaderState => {\n const styles = useStyles();\n state.className = mergeClasses(styles.root, state.className);\n\n if (state.image) {\n state.image.className = mergeClasses(styles.image, state.image.className);\n }\n\n if (state.content) {\n state.content.className = mergeClasses(styles.textContainer, state.content.className);\n }\n\n return state;\n};\n"]}
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { CardPreviewProps } from './CardPreview.types';
|
3
|
-
/**
|
4
|
-
* Component to render image previews of documents or articles in a Card component.
|
5
|
-
*/
|
6
|
-
export declare const CardPreview: React.ForwardRefExoticComponent<CardPreviewProps & React.RefAttributes<HTMLElement>>;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
define(["require", "exports", "react", "./useCardPreview", "./renderCardPreview", "./useCardPreviewStyles"], function (require, exports, React, useCardPreview_1, renderCardPreview_1, useCardPreviewStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.CardPreview = void 0;
|
5
|
-
/**
|
6
|
-
* Component to render image previews of documents or articles in a Card component.
|
7
|
-
*/
|
8
|
-
exports.CardPreview = React.forwardRef(function (props, ref) {
|
9
|
-
var state = useCardPreview_1.useCardPreview(props, ref);
|
10
|
-
useCardPreviewStyles_1.useCardPreviewStyles(state);
|
11
|
-
return renderCardPreview_1.renderCardPreview(state);
|
12
|
-
});
|
13
|
-
exports.CardPreview.displayName = 'CardPreview';
|
14
|
-
});
|
15
|
-
//# sourceMappingURL=CardPreview.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardPreview.js","sourceRoot":"../src/","sources":["components/CardPreview/CardPreview.tsx"],"names":[],"mappings":";;;;IAMA;;OAEG;IACU,QAAA,WAAW,GAAG,KAAK,CAAC,UAAU,CAAgC,UAAC,KAAK,EAAE,GAAG;QACpF,IAAM,KAAK,GAAG,+BAAc,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAEzC,2CAAoB,CAAC,KAAK,CAAC,CAAC;QAC5B,OAAO,qCAAiB,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import * as React from 'react';\nimport { useCardPreview } from './useCardPreview';\nimport { renderCardPreview } from './renderCardPreview';\nimport { useCardPreviewStyles } from './useCardPreviewStyles';\nimport type { CardPreviewProps } from './CardPreview.types';\n\n/**\n * Component to render image previews of documents or articles in a Card component.\n */\nexport const CardPreview = React.forwardRef<HTMLElement, CardPreviewProps>((props, ref) => {\n const state = useCardPreview(props, ref);\n\n useCardPreviewStyles(state);\n return renderCardPreview(state);\n});\n\nCardPreview.displayName = 'CardPreview';\n"]}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { ComponentPropsCompat, ComponentStateCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';
|
3
|
-
/**
|
4
|
-
* CardPreview Props
|
5
|
-
*/
|
6
|
-
export interface CardPreviewProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {
|
7
|
-
/**
|
8
|
-
* Image slot
|
9
|
-
*/
|
10
|
-
logo?: ShorthandPropsCompat<React.ImgHTMLAttributes<HTMLImageElement>>;
|
11
|
-
}
|
12
|
-
/**
|
13
|
-
* Names of the shorthand properties in CardPreviewProps
|
14
|
-
*/
|
15
|
-
export declare type CardPreviewShorthandProps = 'logo';
|
16
|
-
/**
|
17
|
-
* Names of CardPreviewProps that have a default value in useCardPreview
|
18
|
-
*/
|
19
|
-
export declare type CardPreviewDefaultedProps = never;
|
20
|
-
/**
|
21
|
-
* State used in rendering CardPreview
|
22
|
-
*/
|
23
|
-
export interface CardPreviewState extends ComponentStateCompat<CardPreviewProps, CardPreviewShorthandProps, CardPreviewDefaultedProps> {
|
24
|
-
/**
|
25
|
-
* Ref to the root element
|
26
|
-
*/
|
27
|
-
ref: React.Ref<HTMLElement>;
|
28
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CardPreview.types.js","sourceRoot":"../src/","sources":["components/CardPreview/CardPreview.types.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport type { ComponentPropsCompat, ComponentStateCompat, ShorthandPropsCompat } from '@fluentui/react-utilities';\n\n/**\n * CardPreview Props\n */\nexport interface CardPreviewProps extends ComponentPropsCompat, React.HTMLAttributes<HTMLElement> {\n /**\n * Image slot\n */\n logo?: ShorthandPropsCompat<React.ImgHTMLAttributes<HTMLImageElement>>;\n}\n\n/**\n * Names of the shorthand properties in CardPreviewProps\n */\nexport type CardPreviewShorthandProps = 'logo';\n\n/**\n * Names of CardPreviewProps that have a default value in useCardPreview\n */\nexport type CardPreviewDefaultedProps = never;\n\n/**\n * State used in rendering CardPreview\n */\nexport interface CardPreviewState\n extends ComponentStateCompat<CardPreviewProps, CardPreviewShorthandProps, CardPreviewDefaultedProps> {\n /**\n * Ref to the root element\n */\n ref: React.Ref<HTMLElement>;\n}\n"]}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./CardPreview", "./CardPreview.types", "./renderCardPreview", "./useCardPreview", "./useCardPreviewStyles"], function (require, exports, tslib_1, CardPreview_1, CardPreview_types_1, renderCardPreview_1, useCardPreview_1, useCardPreviewStyles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(CardPreview_1, exports);
|
5
|
-
tslib_1.__exportStar(CardPreview_types_1, exports);
|
6
|
-
tslib_1.__exportStar(renderCardPreview_1, exports);
|
7
|
-
tslib_1.__exportStar(useCardPreview_1, exports);
|
8
|
-
tslib_1.__exportStar(useCardPreviewStyles_1, exports);
|
9
|
-
});
|
10
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/CardPreview/index.ts"],"names":[],"mappings":";;;IAAA,6CAA8B;IAC9B,mDAAoC;IACpC,mDAAoC;IACpC,gDAAiC;IACjC,sDAAuC","sourcesContent":["export * from './CardPreview';\nexport * from './CardPreview.types';\nexport * from './renderCardPreview';\nexport * from './useCardPreview';\nexport * from './useCardPreviewStyles';\n"]}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "react", "@fluentui/react-utilities", "./useCardPreview"], function (require, exports, tslib_1, React, react_utilities_1, useCardPreview_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.renderCardPreview = void 0;
|
5
|
-
/**
|
6
|
-
* Render the final JSX of CardPreview
|
7
|
-
*/
|
8
|
-
var renderCardPreview = function (state) {
|
9
|
-
var _a = react_utilities_1.getSlotsCompat(state, useCardPreview_1.cardPreviewShorthandPropsCompat), slots = _a.slots, slotProps = _a.slotProps;
|
10
|
-
return (React.createElement(slots.root, tslib_1.__assign({}, slotProps.root),
|
11
|
-
state.children,
|
12
|
-
React.createElement(slots.logo, tslib_1.__assign({}, slotProps.logo))));
|
13
|
-
};
|
14
|
-
exports.renderCardPreview = renderCardPreview;
|
15
|
-
});
|
16
|
-
//# sourceMappingURL=renderCardPreview.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"renderCardPreview.js","sourceRoot":"../src/","sources":["components/CardPreview/renderCardPreview.tsx"],"names":[],"mappings":";;;;IAKA;;OAEG;IACI,IAAM,iBAAiB,GAAG,UAAC,KAAuB;QACjD,IAAA,KAAuB,gCAAc,CAAC,KAAK,EAAE,gDAA+B,CAAC,EAA3E,KAAK,WAAA,EAAE,SAAS,eAA2D,CAAC;QAEpF,OAAO,CACL,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI;YAC3B,KAAK,CAAC,QAAQ;YACf,oBAAC,KAAK,CAAC,IAAI,uBAAK,SAAS,CAAC,IAAI,EAAI,CACvB,CACd,CAAC;IACJ,CAAC,CAAC;IATW,QAAA,iBAAiB,qBAS5B","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { cardPreviewShorthandPropsCompat } from './useCardPreview';\nimport type { CardPreviewState } from './CardPreview.types';\n\n/**\n * Render the final JSX of CardPreview\n */\nexport const renderCardPreview = (state: CardPreviewState) => {\n const { slots, slotProps } = getSlotsCompat(state, cardPreviewShorthandPropsCompat);\n\n return (\n <slots.root {...slotProps.root}>\n {state.children}\n <slots.logo {...slotProps.logo} />\n </slots.root>\n );\n};\n"]}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import type { CardPreviewProps, CardPreviewShorthandProps, CardPreviewState } from './CardPreview.types';
|
3
|
-
/**
|
4
|
-
* Array of all shorthand properties listed in CardPreviewShorthandProps
|
5
|
-
*/
|
6
|
-
export declare const cardPreviewShorthandPropsCompat: CardPreviewShorthandProps[];
|
7
|
-
/**
|
8
|
-
* Create the state required to render CardPreview.
|
9
|
-
*
|
10
|
-
* The returned state can be modified with hooks such as useCardPreviewStyles,
|
11
|
-
* before being passed to renderCardPreview.
|
12
|
-
*
|
13
|
-
* @param props - props from this instance of CardPreview
|
14
|
-
* @param ref - reference to root HTMLElement of CardPreview
|
15
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
16
|
-
*/
|
17
|
-
export declare const useCardPreview: (props: CardPreviewProps, ref: React.Ref<HTMLElement>, defaultProps?: CardPreviewProps | undefined) => CardPreviewState;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@fluentui/react-utilities"], function (require, exports, react_utilities_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useCardPreview = exports.cardPreviewShorthandPropsCompat = void 0;
|
5
|
-
/**
|
6
|
-
* Array of all shorthand properties listed in CardPreviewShorthandProps
|
7
|
-
*/
|
8
|
-
exports.cardPreviewShorthandPropsCompat = ['logo'];
|
9
|
-
var mergeProps = react_utilities_1.makeMergeProps({ deepMerge: exports.cardPreviewShorthandPropsCompat });
|
10
|
-
/**
|
11
|
-
* Create the state required to render CardPreview.
|
12
|
-
*
|
13
|
-
* The returned state can be modified with hooks such as useCardPreviewStyles,
|
14
|
-
* before being passed to renderCardPreview.
|
15
|
-
*
|
16
|
-
* @param props - props from this instance of CardPreview
|
17
|
-
* @param ref - reference to root HTMLElement of CardPreview
|
18
|
-
* @param defaultProps - (optional) default prop values provided by the implementing type
|
19
|
-
*/
|
20
|
-
var useCardPreview = function (props, ref, defaultProps) {
|
21
|
-
var state = mergeProps({
|
22
|
-
ref: ref,
|
23
|
-
logo: { as: 'div' },
|
24
|
-
}, defaultProps && react_utilities_1.resolveShorthandProps(defaultProps, exports.cardPreviewShorthandPropsCompat), react_utilities_1.resolveShorthandProps(props, exports.cardPreviewShorthandPropsCompat));
|
25
|
-
return state;
|
26
|
-
};
|
27
|
-
exports.useCardPreview = useCardPreview;
|
28
|
-
});
|
29
|
-
//# sourceMappingURL=useCardPreview.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useCardPreview.js","sourceRoot":"../src/","sources":["components/CardPreview/useCardPreview.ts"],"names":[],"mappings":";;;;IAIA;;OAEG;IACU,QAAA,+BAA+B,GAAgC,CAAC,MAAM,CAAC,CAAC;IAErF,IAAM,UAAU,GAAG,gCAAc,CAAmB,EAAE,SAAS,EAAE,uCAA+B,EAAE,CAAC,CAAC;IAEpG;;;;;;;;;OASG;IACI,IAAM,cAAc,GAAG,UAC5B,KAAuB,EACvB,GAA2B,EAC3B,YAA+B;QAE/B,IAAM,KAAK,GAAG,UAAU,CACtB;YACE,GAAG,KAAA;YACH,IAAI,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE;SACpB,EACD,YAAY,IAAI,uCAAqB,CAAC,YAAY,EAAE,uCAA+B,CAAC,EACpF,uCAAqB,CAAC,KAAK,EAAE,uCAA+B,CAAC,CAC9D,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAfW,QAAA,cAAc,kBAezB","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps } from '@fluentui/react-utilities';\nimport type { CardPreviewProps, CardPreviewShorthandProps, CardPreviewState } from './CardPreview.types';\n\n/**\n * Array of all shorthand properties listed in CardPreviewShorthandProps\n */\nexport const cardPreviewShorthandPropsCompat: CardPreviewShorthandProps[] = ['logo'];\n\nconst mergeProps = makeMergeProps<CardPreviewState>({ deepMerge: cardPreviewShorthandPropsCompat });\n\n/**\n * Create the state required to render CardPreview.\n *\n * The returned state can be modified with hooks such as useCardPreviewStyles,\n * before being passed to renderCardPreview.\n *\n * @param props - props from this instance of CardPreview\n * @param ref - reference to root HTMLElement of CardPreview\n * @param defaultProps - (optional) default prop values provided by the implementing type\n */\nexport const useCardPreview = (\n props: CardPreviewProps,\n ref: React.Ref<HTMLElement>,\n defaultProps?: CardPreviewProps,\n): CardPreviewState => {\n const state = mergeProps(\n {\n ref,\n logo: { as: 'div' },\n },\n defaultProps && resolveShorthandProps(defaultProps, cardPreviewShorthandPropsCompat),\n resolveShorthandProps(props, cardPreviewShorthandPropsCompat),\n );\n\n return state;\n};\n"]}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
define(["require", "exports", "@fluentui/react-make-styles"], function (require, exports, react_make_styles_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
exports.useCardPreviewStyles = void 0;
|
5
|
-
/**
|
6
|
-
* Styles for the root slot
|
7
|
-
*/
|
8
|
-
var useStyles = react_make_styles_1.makeStyles({
|
9
|
-
root: function (theme) { return ({
|
10
|
-
position: 'relative',
|
11
|
-
// TODO: Explore alternate way of applying padding on parent Card
|
12
|
-
margin: '0 -12px',
|
13
|
-
'> *': {
|
14
|
-
display: 'block',
|
15
|
-
width: '100%',
|
16
|
-
},
|
17
|
-
}); },
|
18
|
-
logo: {
|
19
|
-
position: 'absolute',
|
20
|
-
bottom: '12px',
|
21
|
-
left: '12px',
|
22
|
-
width: '32px',
|
23
|
-
height: '32px',
|
24
|
-
},
|
25
|
-
});
|
26
|
-
/**
|
27
|
-
* Apply styling to the CardPreview slots based on the state
|
28
|
-
*/
|
29
|
-
var useCardPreviewStyles = function (state) {
|
30
|
-
var styles = useStyles();
|
31
|
-
state.className = react_make_styles_1.mergeClasses(styles.root, state.className);
|
32
|
-
if (state.logo) {
|
33
|
-
state.logo.className = react_make_styles_1.mergeClasses(styles.logo, state.logo.className);
|
34
|
-
}
|
35
|
-
return state;
|
36
|
-
};
|
37
|
-
exports.useCardPreviewStyles = useCardPreviewStyles;
|
38
|
-
});
|
39
|
-
//# sourceMappingURL=useCardPreviewStyles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useCardPreviewStyles.js","sourceRoot":"../src/","sources":["components/CardPreview/useCardPreviewStyles.ts"],"names":[],"mappings":";;;;IAGA;;OAEG;IACH,IAAM,SAAS,GAAG,8BAAU,CAAC;QAC3B,IAAI,EAAE,UAAA,KAAK,IAAI,OAAA,CAAC;YACd,QAAQ,EAAE,UAAU;YACpB,iEAAiE;YACjE,MAAM,EAAE,SAAS;YAEjB,KAAK,EAAE;gBACL,OAAO,EAAE,OAAO;gBAChB,KAAK,EAAE,MAAM;aACd;SACF,CAAC,EATa,CASb;QAEF,IAAI,EAAE;YACJ,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;SACf;KACF,CAAC,CAAC;IAEH;;OAEG;IACI,IAAM,oBAAoB,GAAG,UAAC,KAAuB;QAC1D,IAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,KAAK,CAAC,SAAS,GAAG,gCAAY,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;QAE7D,IAAI,KAAK,CAAC,IAAI,EAAE;YACd,KAAK,CAAC,IAAI,CAAC,SAAS,GAAG,gCAAY,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACxE;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IATW,QAAA,oBAAoB,wBAS/B","sourcesContent":["import { makeStyles, mergeClasses } from '@fluentui/react-make-styles';\nimport type { CardPreviewState } from './CardPreview.types';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: theme => ({\n position: 'relative',\n // TODO: Explore alternate way of applying padding on parent Card\n margin: '0 -12px',\n\n '> *': {\n display: 'block',\n width: '100%',\n },\n }),\n\n logo: {\n position: 'absolute',\n bottom: '12px',\n left: '12px',\n width: '32px',\n height: '32px',\n },\n});\n\n/**\n * Apply styling to the CardPreview slots based on the state\n */\nexport const useCardPreviewStyles = (state: CardPreviewState): CardPreviewState => {\n const styles = useStyles();\n state.className = mergeClasses(styles.root, state.className);\n\n if (state.logo) {\n state.logo.className = mergeClasses(styles.logo, state.logo.className);\n }\n\n return state;\n};\n"]}
|
package/lib-amd/index.d.ts
DELETED
package/lib-amd/index.js
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
define(["require", "exports", "tslib", "./Card", "./CardFooter", "./CardHeader", "./CardPreview"], function (require, exports, tslib_1, Card_1, CardFooter_1, CardHeader_1, CardPreview_1) {
|
2
|
-
"use strict";
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
-
tslib_1.__exportStar(Card_1, exports);
|
5
|
-
tslib_1.__exportStar(CardFooter_1, exports);
|
6
|
-
tslib_1.__exportStar(CardHeader_1, exports);
|
7
|
-
tslib_1.__exportStar(CardPreview_1, exports);
|
8
|
-
});
|
9
|
-
//# sourceMappingURL=index.js.map
|
package/lib-amd/index.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;IAAA,sCAAuB;IACvB,4CAA6B;IAC7B,4CAA6B;IAC7B,6CAA8B","sourcesContent":["export * from './Card';\nexport * from './CardFooter';\nexport * from './CardHeader';\nexport * from './CardPreview';\n"]}
|