@fluentui/react-card 9.0.0-beta.5 → 9.0.0-beta.9
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 +248 -9
- package/CHANGELOG.md +62 -10
- 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 +36 -46
- 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.js +6 -6
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/Card.types.d.ts +5 -3
- 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 +3 -2
- package/lib/components/Card/renderCard.js.map +1 -1
- package/lib/components/Card/useCard.d.ts +3 -3
- package/lib/components/Card/useCard.js +7 -3
- package/lib/components/Card/useCard.js.map +1 -1
- package/lib/components/Card/useCardStyles.d.ts +1 -1
- package/lib/components/Card/useCardStyles.js +127 -23
- package/lib/components/Card/useCardStyles.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.js +6 -6
- package/lib/components/CardFooter/CardFooter.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.types.d.ts +3 -3
- 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 +5 -4
- package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooter.d.ts +4 -8
- package/lib/components/CardFooter/useCardFooter.js +3 -8
- package/lib/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooterStyles.d.ts +1 -1
- package/lib/components/CardFooter/useCardFooterStyles.js +5 -4
- package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.js +6 -6
- package/lib/components/CardHeader/CardHeader.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.types.d.ts +8 -8
- 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 +9 -4
- package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeader.d.ts +4 -5
- package/lib/components/CardHeader/useCardHeader.js +3 -4
- package/lib/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeaderStyles.d.ts +1 -1
- package/lib/components/CardHeader/useCardHeaderStyles.js +5 -4
- package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.js +6 -6
- package/lib/components/CardPreview/CardPreview.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.types.d.ts +3 -3
- 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 +5 -4
- package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreview.d.ts +4 -8
- package/lib/components/CardPreview/useCardPreview.js +3 -8
- package/lib/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreviewStyles.d.ts +1 -1
- package/lib/components/CardPreview/useCardPreviewStyles.js +3 -7
- 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/components/Card/Card.js +3 -3
- package/lib-commonjs/components/Card/Card.js.map +1 -1
- package/lib-commonjs/components/Card/Card.types.d.ts +5 -3
- 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.d.ts +1 -1
- package/lib-commonjs/components/Card/renderCard.js +5 -4
- package/lib-commonjs/components/Card/renderCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCard.d.ts +3 -3
- package/lib-commonjs/components/Card/useCard.js +9 -5
- package/lib-commonjs/components/Card/useCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCardStyles.d.ts +1 -1
- package/lib-commonjs/components/Card/useCardStyles.js +131 -26
- package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.js +3 -3
- package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.types.d.ts +3 -3
- 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.d.ts +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.js +7 -7
- package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooter.d.ts +4 -8
- package/lib-commonjs/components/CardFooter/useCardFooter.js +6 -11
- package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.d.ts +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js +10 -9
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.js +3 -3
- package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.types.d.ts +8 -8
- 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.d.ts +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.js +11 -7
- package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeader.d.ts +4 -5
- package/lib-commonjs/components/CardHeader/useCardHeader.js +6 -7
- package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.d.ts +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js +11 -10
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.js +3 -3
- package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.types.d.ts +3 -3
- 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.d.ts +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.js +7 -7
- package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreview.d.ts +4 -8
- package/lib-commonjs/components/CardPreview/useCardPreview.js +6 -11
- package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.d.ts +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js +8 -12
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +10 -11
@@ -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,16 +1,16 @@
|
|
1
|
-
import type { ComponentProps, ComponentState,
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
2
|
export declare type CardHeaderSlots = {
|
3
|
-
root:
|
4
|
-
image:
|
5
|
-
content?:
|
6
|
-
header:
|
7
|
-
description:
|
8
|
-
action?:
|
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
9
|
};
|
10
10
|
/**
|
11
11
|
* CardHeader props
|
12
12
|
*/
|
13
|
-
export declare type CardHeaderProps = ComponentProps<CardHeaderSlots
|
13
|
+
export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
|
14
14
|
/**
|
15
15
|
* State used in rendering CardHeader
|
16
16
|
*/
|
@@ -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,25 +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
10
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
|
-
|
12
|
-
const useCardHeader_1 = /*#__PURE__*/require("./useCardHeader");
|
13
11
|
/**
|
14
12
|
* Render the final JSX of CardHeader
|
15
13
|
*/
|
16
14
|
|
17
15
|
|
18
|
-
const
|
16
|
+
const renderCardHeader_unstable = state => {
|
19
17
|
const {
|
20
18
|
slots,
|
21
19
|
slotProps
|
22
|
-
} = react_utilities_1.getSlots(state
|
23
|
-
return React.createElement(slots.root,
|
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
|
+
}));
|
24
28
|
};
|
25
29
|
|
26
|
-
exports.
|
30
|
+
exports.renderCardHeader_unstable = renderCardHeader_unstable;
|
27
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,13 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { CardHeaderProps,
|
3
|
-
export declare const cardHeaderShorthandProps: Array<keyof CardHeaderSlots>;
|
2
|
+
import type { CardHeaderProps, CardHeaderState } from './CardHeader.types';
|
4
3
|
/**
|
5
4
|
* Create the state required to render CardHeader.
|
6
5
|
*
|
7
|
-
* The returned state can be modified with hooks such as
|
8
|
-
* before being passed to
|
6
|
+
* The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
|
7
|
+
* before being passed to renderCardHeader_unstable.
|
9
8
|
*
|
10
9
|
* @param props - props from this instance of CardHeader
|
11
10
|
* @param ref - reference to root HTMLElement of CardHeader
|
12
11
|
*/
|
13
|
-
export declare const
|
12
|
+
export declare const useCardHeader_unstable: (props: CardHeaderProps, ref: React.Ref<HTMLElement>) => CardHeaderState;
|
@@ -3,24 +3,23 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCardHeader_unstable = void 0;
|
7
7
|
|
8
8
|
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
10
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
|
-
|
12
|
-
exports.cardHeaderShorthandProps = ['root', 'image', 'content', 'header', 'description', 'action'];
|
13
11
|
/**
|
14
12
|
* Create the state required to render CardHeader.
|
15
13
|
*
|
16
|
-
* The returned state can be modified with hooks such as
|
17
|
-
* before being passed to
|
14
|
+
* The returned state can be modified with hooks such as useCardHeaderStyles_unstable,
|
15
|
+
* before being passed to renderCardHeader_unstable.
|
18
16
|
*
|
19
17
|
* @param props - props from this instance of CardHeader
|
20
18
|
* @param ref - reference to root HTMLElement of CardHeader
|
21
19
|
*/
|
22
20
|
|
23
|
-
|
21
|
+
|
22
|
+
const useCardHeader_unstable = (props, ref) => {
|
24
23
|
const {
|
25
24
|
image,
|
26
25
|
content,
|
@@ -55,5 +54,5 @@ const useCardHeader = (props, ref) => {
|
|
55
54
|
};
|
56
55
|
};
|
57
56
|
|
58
|
-
exports.
|
57
|
+
exports.useCardHeader_unstable = useCardHeader_unstable;
|
59
58
|
//# sourceMappingURL=useCardHeader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardHeader/useCardHeader.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;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,KAAK,CAAC,QAJJ;AAKV,MAAA,WAAW,EAAE,KAAK,CAAC,QALT;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: React.Fragment,\n description: React.Fragment,\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/"}
|
@@ -3,4 +3,4 @@ export declare const cardHeaderClassName = "fui-CardHeader";
|
|
3
3
|
/**
|
4
4
|
* Apply styling to the CardHeader slots based on the state
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => CardHeaderState;
|
@@ -3,21 +3,22 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCardHeaderStyles_unstable = exports.cardHeaderClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
10
|
exports.cardHeaderClassName = 'fui-CardHeader';
|
11
11
|
/**
|
12
12
|
* Styles for the root slot
|
13
13
|
*/
|
14
14
|
|
15
|
-
const useStyles = /*#__PURE__*/
|
15
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
16
16
|
"root": {
|
17
17
|
"mc9l5x": "f22iagw",
|
18
18
|
"Beiy3e4": "f1063pyq",
|
19
19
|
"Bt984gj": "f122n59",
|
20
|
-
"
|
20
|
+
"i8kkvl": "f4akndk",
|
21
|
+
"Belr9w4": "fe5j3v",
|
21
22
|
"Bqenvij": "f1d2rq10"
|
22
23
|
},
|
23
24
|
"image": {
|
@@ -40,27 +41,27 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
40
41
|
"Bn3e79g": "f1con4nn"
|
41
42
|
}
|
42
43
|
}, {
|
43
|
-
"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;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".
|
44
|
+
"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;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".f1d2rq10{height:32px;}", ".f17fgpbq{min-width:24px;}", ".f1pha7fy{min-height:24px;}", ".f44c6la{max-width:32px;}", ".f17bzqcb{max-height:32px;}", ".fgn7ydb>*{min-width:inherit;}", ".f1jevvm1>*{min-height:inherit;}", ".fqihwjc>*{max-width:100%;}", ".f6x1sus>*{max-height:100%;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fqerorx{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".fwk23hs{height:inherit;}", ".f1con4nn>*{height:50%;}"]
|
44
45
|
});
|
45
46
|
/**
|
46
47
|
* Apply styling to the CardHeader slots based on the state
|
47
48
|
*/
|
48
49
|
|
49
50
|
|
50
|
-
const
|
51
|
+
const useCardHeaderStyles_unstable = state => {
|
51
52
|
const styles = useStyles();
|
52
|
-
state.root.className =
|
53
|
+
state.root.className = react_1.mergeClasses(exports.cardHeaderClassName, styles.root, state.root.className);
|
53
54
|
|
54
55
|
if (state.image) {
|
55
|
-
state.image.className =
|
56
|
+
state.image.className = react_1.mergeClasses(styles.image, state.image.className);
|
56
57
|
}
|
57
58
|
|
58
59
|
if (state.content) {
|
59
|
-
state.content.className =
|
60
|
+
state.content.className = react_1.mergeClasses(styles.textContainer, state.content.className);
|
60
61
|
}
|
61
62
|
|
62
63
|
return state;
|
63
64
|
};
|
64
65
|
|
65
|
-
exports.
|
66
|
+
exports.useCardHeaderStyles_unstable = useCardHeaderStyles_unstable;
|
66
67
|
//# sourceMappingURL=useCardHeaderStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardHeader/useCardHeaderStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,mBAAA,GAAsB,gBAAtB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAqCA;;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,mBAAb,EAAkC,MAAM,CAAC,IAAzC,EAA+C,KAAK,CAAC,IAAN,CAAW,SAA1D,CAAvB;;AAEA,MAAI,KAAK,CAAC,KAAV,EAAiB;AACf,IAAA,KAAK,CAAC,KAAN,CAAY,SAAZ,GAAwB,OAAA,CAAA,YAAA,CAAa,MAAM,CAAC,KAApB,EAA2B,KAAK,CAAC,KAAN,CAAY,SAAvC,CAAxB;AACD;;AAED,MAAI,KAAK,CAAC,OAAV,EAAmB;AACjB,IAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,OAAA,CAAA,YAAA,CAAa,MAAM,CAAC,aAApB,EAAmC,KAAK,CAAC,OAAN,CAAc,SAAjD,CAA1B;AACD;;AAED,SAAO,KAAP;AACD,CAbM;;AAAM,OAAA,CAAA,4BAAA,GAA4B,4BAA5B","sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { CardHeaderState } from './CardHeader.types';\n\nexport const cardHeaderClassName = 'fui-CardHeader';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n ...shorthands.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_unstable = (state: CardHeaderState): CardHeaderState => {\n const styles = useStyles();\n state.root.className = mergeClasses(cardHeaderClassName, styles.root, state.root.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"],"sourceRoot":"../src/"}
|
@@ -18,9 +18,9 @@ const useCardPreviewStyles_1 = /*#__PURE__*/require("./useCardPreviewStyles");
|
|
18
18
|
|
19
19
|
|
20
20
|
exports.CardPreview = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
-
const state = useCardPreview_1.
|
22
|
-
useCardPreviewStyles_1.
|
23
|
-
return renderCardPreview_1.
|
21
|
+
const state = useCardPreview_1.useCardPreview_unstable(props, ref);
|
22
|
+
useCardPreviewStyles_1.useCardPreviewStyles_unstable(state);
|
23
|
+
return renderCardPreview_1.renderCardPreview_unstable(state);
|
24
24
|
});
|
25
25
|
exports.CardPreview.displayName = 'CardPreview';
|
26
26
|
//# sourceMappingURL=CardPreview.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardPreview/CardPreview.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,mBAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AACA,MAAA,sBAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,WAAA,gBAAqD,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,gBAAA,CAAA,uBAAA,CAAwB,KAAxB,EAA+B,GAA/B,CAAd;AAEA,EAAA,sBAAA,CAAA,6BAAA,CAA8B,KAA9B;AACA,SAAO,mBAAA,CAAA,0BAAA,CAA2B,KAA3B,CAAP;AACD,CALiE,CAArD;AAOb,OAAA,CAAA,WAAA,CAAY,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { useCardPreview_unstable } from './useCardPreview';\nimport { renderCardPreview_unstable } from './renderCardPreview';\nimport { useCardPreviewStyles_unstable } from './useCardPreviewStyles';\nimport type { CardPreviewProps } from './CardPreview.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Component to render image previews of documents or articles in a Card component.\n */\nexport const CardPreview: ForwardRefComponent<CardPreviewProps> = React.forwardRef((props, ref) => {\n const state = useCardPreview_unstable(props, ref);\n\n useCardPreviewStyles_unstable(state);\n return renderCardPreview_unstable(state);\n});\n\nCardPreview.displayName = 'CardPreview';\n"],"sourceRoot":"../src/"}
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import type { ComponentProps, ComponentState,
|
1
|
+
import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
|
2
2
|
export declare type CardPreviewSlots = {
|
3
|
-
root:
|
4
|
-
logo?:
|
3
|
+
root: Slot<'div'>;
|
4
|
+
logo?: Slot<'div'>;
|
5
5
|
};
|
6
6
|
/**
|
7
7
|
* CardPreview props
|
@@ -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/CardPreview/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,qBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,wBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './CardPreview';\nexport * from './CardPreview.types';\nexport * from './renderCardPreview';\nexport * from './useCardPreview';\nexport * from './useCardPreviewStyles';\n"],"sourceRoot":"../src/"}
|
@@ -2,4 +2,4 @@ import type { CardPreviewState } from './CardPreview.types';
|
|
2
2
|
/**
|
3
3
|
* Render the final JSX of CardPreview
|
4
4
|
*/
|
5
|
-
export declare const
|
5
|
+
export declare const renderCardPreview_unstable: (state: CardPreviewState) => JSX.Element;
|
@@ -3,25 +3,25 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.renderCardPreview_unstable = void 0;
|
7
7
|
|
8
8
|
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
10
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
|
-
|
12
|
-
const useCardPreview_1 = /*#__PURE__*/require("./useCardPreview");
|
13
11
|
/**
|
14
12
|
* Render the final JSX of CardPreview
|
15
13
|
*/
|
16
14
|
|
17
15
|
|
18
|
-
const
|
16
|
+
const renderCardPreview_unstable = state => {
|
19
17
|
const {
|
20
18
|
slots,
|
21
19
|
slotProps
|
22
|
-
} = react_utilities_1.getSlots(state
|
23
|
-
return React.createElement(slots.root,
|
20
|
+
} = react_utilities_1.getSlots(state);
|
21
|
+
return React.createElement(slots.root, { ...slotProps.root
|
22
|
+
}, slotProps.root.children, slots.logo && React.createElement(slots.logo, { ...slotProps.logo
|
23
|
+
}));
|
24
24
|
};
|
25
25
|
|
26
|
-
exports.
|
26
|
+
exports.renderCardPreview_unstable = renderCardPreview_unstable;
|
27
27
|
//# sourceMappingURL=renderCardPreview.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardPreview/renderCardPreview.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAA2B,KAA3B,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,IAAN,IAAc,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAFjB,CADF;AAMD,CATM;;AAAM,OAAA,CAAA,0BAAA,GAA0B,0BAA1B","sourcesContent":["import * as React from 'react';\nimport { getSlots } 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 const { slots, slotProps } = getSlots<CardPreviewSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children}\n {slots.logo && <slots.logo {...slotProps.logo} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,16 +1,12 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { CardPreviewProps,
|
3
|
-
/**
|
4
|
-
* Array of all shorthand properties listed in CardPreviewShorthandProps
|
5
|
-
*/
|
6
|
-
export declare const cardPreviewShorthandProps: Array<keyof CardPreviewSlots>;
|
2
|
+
import type { CardPreviewProps, CardPreviewState } from './CardPreview.types';
|
7
3
|
/**
|
8
4
|
* Create the state required to render CardPreview.
|
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 useCardPreviewStyles_unstable,
|
7
|
+
* before being passed to renderCardPreview_unstable.
|
12
8
|
*
|
13
9
|
* @param props - props from this instance of CardPreview
|
14
10
|
* @param ref - reference to root HTMLElement of CardPreview
|
15
11
|
*/
|
16
|
-
export declare const
|
12
|
+
export declare const useCardPreview_unstable: (props: CardPreviewProps, ref: React.Ref<HTMLElement>) => CardPreviewState;
|
@@ -3,26 +3,21 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCardPreview_unstable = void 0;
|
7
7
|
|
8
8
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
9
|
-
/**
|
10
|
-
* Array of all shorthand properties listed in CardPreviewShorthandProps
|
11
|
-
*/
|
12
|
-
|
13
|
-
|
14
|
-
exports.cardPreviewShorthandProps = ['root', 'logo'];
|
15
9
|
/**
|
16
10
|
* Create the state required to render CardPreview.
|
17
11
|
*
|
18
|
-
* The returned state can be modified with hooks such as
|
19
|
-
* before being passed to
|
12
|
+
* The returned state can be modified with hooks such as useCardPreviewStyles_unstable,
|
13
|
+
* before being passed to renderCardPreview_unstable.
|
20
14
|
*
|
21
15
|
* @param props - props from this instance of CardPreview
|
22
16
|
* @param ref - reference to root HTMLElement of CardPreview
|
23
17
|
*/
|
24
18
|
|
25
|
-
|
19
|
+
|
20
|
+
const useCardPreview_unstable = (props, ref) => {
|
26
21
|
const {
|
27
22
|
logo
|
28
23
|
} = props;
|
@@ -39,5 +34,5 @@ const useCardPreview = (props, ref) => {
|
|
39
34
|
};
|
40
35
|
};
|
41
36
|
|
42
|
-
exports.
|
37
|
+
exports.useCardPreview_unstable = useCardPreview_unstable;
|
43
38
|
//# sourceMappingURL=useCardPreview.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardPreview/useCardPreview.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;;;;;;;AAQG;;;AACI,MAAM,uBAAuB,GAAG,CAAC,KAAD,EAA0B,GAA1B,KAA2E;AAChH,QAAM;AAAE,IAAA;AAAF,MAAW,KAAjB;AACA,SAAO;AACL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KADP;AAML,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,GADiC;AAEjC,SAAG;AAF8B,KAA7B,CAND;AAUL,IAAA,IAAI,EAAE,iBAAA,CAAA,gBAAA,CAAiB,IAAjB;AAVD,GAAP;AAYD,CAdM;;AAAM,OAAA,CAAA,uBAAA,GAAuB,uBAAvB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { CardPreviewProps, CardPreviewState } from './CardPreview.types';\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 return {\n components: {\n root: 'div',\n logo: 'div',\n },\n\n root: getNativeElementProps('div', {\n ref,\n ...props,\n }),\n logo: resolveShorthand(logo),\n };\n};\n"],"sourceRoot":"../src/"}
|
@@ -3,4 +3,4 @@ export declare const cardPreviewClassName = "fui-CardPreview";
|
|
3
3
|
/**
|
4
4
|
* Apply styling to the CardPreview slots based on the state
|
5
5
|
*/
|
6
|
-
export declare const
|
6
|
+
export declare const useCardPreviewStyles_unstable: (state: CardPreviewState) => CardPreviewState;
|
@@ -3,22 +3,18 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.useCardPreviewStyles_unstable = exports.cardPreviewClassName = void 0;
|
7
7
|
|
8
|
-
const
|
8
|
+
const react_1 = /*#__PURE__*/require("@griffel/react");
|
9
9
|
|
10
10
|
exports.cardPreviewClassName = 'fui-CardPreview';
|
11
11
|
/**
|
12
12
|
* Styles for the root slot
|
13
13
|
*/
|
14
14
|
|
15
|
-
const useStyles = /*#__PURE__*/
|
15
|
+
const useStyles = /*#__PURE__*/react_1.__styles({
|
16
16
|
"root": {
|
17
17
|
"qhf8xq": "f10pi13n",
|
18
|
-
"B6of3ja": "f1hu3pq6",
|
19
|
-
"t21cq0": ["f8nhgx1", "f16yxz7i"],
|
20
|
-
"jrapky": "f19f4twv",
|
21
|
-
"Frg6f3": ["f16yxz7i", "f8nhgx1"],
|
22
18
|
"Bb0eobv": "floiv14",
|
23
19
|
"m1g0b5": "f1r7p6p5"
|
24
20
|
},
|
@@ -30,23 +26,23 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
30
26
|
"Bqenvij": "f1d2rq10"
|
31
27
|
}
|
32
28
|
}, {
|
33
|
-
"d": [".f10pi13n{position:relative;}", ".
|
29
|
+
"d": [".f10pi13n{position:relative;}", ".floiv14>*{display:block;}", ".f1r7p6p5>*{width:100%;}", ".f1euv43f{position:absolute;}", ".f1gcvs1y{bottom:12px;}", ".f1t6tvco{left:12px;}", ".ffrfxm3{right:12px;}", ".f1szoe96{width:32px;}", ".f1d2rq10{height:32px;}"]
|
34
30
|
});
|
35
31
|
/**
|
36
32
|
* Apply styling to the CardPreview slots based on the state
|
37
33
|
*/
|
38
34
|
|
39
35
|
|
40
|
-
const
|
36
|
+
const useCardPreviewStyles_unstable = state => {
|
41
37
|
const styles = useStyles();
|
42
|
-
state.root.className =
|
38
|
+
state.root.className = react_1.mergeClasses(exports.cardPreviewClassName, styles.root, state.root.className);
|
43
39
|
|
44
40
|
if (state.logo) {
|
45
|
-
state.logo.className =
|
41
|
+
state.logo.className = react_1.mergeClasses(styles.logo, state.logo.className);
|
46
42
|
}
|
47
43
|
|
48
44
|
return state;
|
49
45
|
};
|
50
46
|
|
51
|
-
exports.
|
47
|
+
exports.useCardPreviewStyles_unstable = useCardPreviewStyles_unstable;
|
52
48
|
//# sourceMappingURL=useCardPreviewStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["components/CardPreview/useCardPreviewStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,oBAAA,GAAuB,iBAAvB;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAmBA;;AAEG;;;AACI,MAAM,6BAA6B,GAAI,KAAD,IAA8C;AACzF,QAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,oBAAb,EAAmC,MAAM,CAAC,IAA1C,EAAgD,KAAK,CAAC,IAAN,CAAW,SAA3D,CAAvB;;AAEA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,MAAM,CAAC,IAApB,EAA0B,KAAK,CAAC,IAAN,CAAW,SAArC,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CATM;;AAAM,OAAA,CAAA,6BAAA,GAA6B,6BAA7B","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport type { CardPreviewState } from './CardPreview.types';\n\nexport const cardPreviewClassName = 'fui-CardPreview';\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n position: 'relative',\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_unstable = (state: CardPreviewState): CardPreviewState => {\n const styles = useStyles();\n state.root.className = mergeClasses(cardPreviewClassName, styles.root, state.root.className);\n\n if (state.logo) {\n state.logo.className = mergeClasses(styles.logo, state.logo.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,cAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Card';\nexport * from './CardFooter';\nexport * from './CardHeader';\nexport * from './CardPreview';\n"],"sourceRoot":"../src/"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-card",
|
3
|
-
"version": "9.0.0-beta.
|
3
|
+
"version": "9.0.0-beta.9",
|
4
4
|
"private": false,
|
5
5
|
"description": "Card container components for Fluent UI React.",
|
6
6
|
"main": "lib-commonjs/index.js",
|
@@ -20,21 +20,19 @@
|
|
20
20
|
"just": "just-scripts",
|
21
21
|
"lint": "just-scripts lint",
|
22
22
|
"start": "yarn storybook",
|
23
|
-
"test": "jest",
|
23
|
+
"test": "jest --passWithNoTests",
|
24
24
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
25
25
|
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-card/src && yarn docs",
|
26
|
-
"storybook": "
|
26
|
+
"storybook": "node ../../scripts/storybook/runner",
|
27
27
|
"type-check": "tsc -b tsconfig.json"
|
28
28
|
},
|
29
29
|
"devDependencies": {
|
30
|
-
"@fluentui/babel-make-styles": "9.0.0-beta.4",
|
31
30
|
"@fluentui/eslint-plugin": "*",
|
32
|
-
"@fluentui/jest-serializer-make-styles": "9.0.0-beta.4",
|
33
31
|
"@fluentui/react-conformance": "*",
|
34
|
-
"@fluentui/react-conformance-
|
32
|
+
"@fluentui/react-conformance-griffel": "9.0.0-beta.3",
|
35
33
|
"@fluentui/scripts": "^1.0.0",
|
36
|
-
"@fluentui/react-text": "9.0.0-
|
37
|
-
"@fluentui/react-button": "9.0.0-
|
34
|
+
"@fluentui/react-text": "9.0.0-rc.4",
|
35
|
+
"@fluentui/react-button": "9.0.0-rc.4",
|
38
36
|
"@types/enzyme": "3.10.3",
|
39
37
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
40
38
|
"@types/react": "16.9.42",
|
@@ -47,9 +45,10 @@
|
|
47
45
|
"react-test-renderer": "^16.3.0"
|
48
46
|
},
|
49
47
|
"dependencies": {
|
50
|
-
"@
|
51
|
-
"@fluentui/react-utilities": "9.0.0-
|
52
|
-
"@fluentui/react-tabster": "9.0.0-
|
48
|
+
"@griffel/react": "1.0.0",
|
49
|
+
"@fluentui/react-utilities": "9.0.0-rc.4",
|
50
|
+
"@fluentui/react-tabster": "9.0.0-rc.4",
|
51
|
+
"@fluentui/react-theme": "9.0.0-rc.3",
|
53
52
|
"tslib": "^2.1.0"
|
54
53
|
},
|
55
54
|
"peerDependencies": {
|