@fluentui/react-card 9.0.0-beta.19 → 9.0.0-beta.21
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 +135 -1
- package/CHANGELOG.md +34 -2
- package/assets/logo.svg +9 -0
- package/dist/index.d.ts +90 -18
- package/lib/components/Card/Card.js.map +1 -1
- package/lib/components/Card/Card.types.js.map +1 -1
- package/lib/components/Card/renderCard.js +1 -1
- package/lib/components/Card/renderCard.js.map +1 -1
- package/lib/components/Card/useCard.js +2 -0
- package/lib/components/Card/useCard.js.map +1 -1
- package/lib/components/Card/useCardStyles.js +74 -21
- 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/renderCardFooter.js +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 +5 -4
- 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/renderCardHeader.js +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 +5 -4
- 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/renderCardPreview.js +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 +9 -7
- package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/components/Card/Card.js.map +1 -1
- package/lib-commonjs/components/Card/renderCard.js +1 -1
- package/lib-commonjs/components/Card/renderCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCard.js +2 -0
- package/lib-commonjs/components/Card/useCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCardStyles.js +77 -21
- 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/renderCardFooter.js +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 +5 -4
- 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/renderCardHeader.js +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 +5 -4
- 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/renderCardPreview.js +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 +9 -7
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +11 -10
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,141 @@
|
|
2
2
|
"name": "@fluentui/react-card",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "Tue,
|
5
|
+
"date": "Tue, 28 Jun 2022 17:37:47 GMT",
|
6
|
+
"tag": "@fluentui/react-card_v9.0.0-beta.21",
|
7
|
+
"version": "9.0.0-beta.21",
|
8
|
+
"comments": {
|
9
|
+
"prerelease": [
|
10
|
+
{
|
11
|
+
"author": "lingfangao@hotmail.com",
|
12
|
+
"package": "@fluentui/react-card",
|
13
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b",
|
14
|
+
"comment": "fix: Use caret dependency range for Griffel"
|
15
|
+
},
|
16
|
+
{
|
17
|
+
"author": "beachball",
|
18
|
+
"package": "@fluentui/react-card",
|
19
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.1",
|
20
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "beachball",
|
24
|
+
"package": "@fluentui/react-card",
|
25
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.10",
|
26
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-card",
|
31
|
+
"comment": "Bump @fluentui/react-text to v9.0.1",
|
32
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-card",
|
37
|
+
"comment": "Bump @fluentui/react-button to v9.0.1",
|
38
|
+
"commit": "3deda1fbbfb6ac2b1ad150d4dc6343f1f7fda85b"
|
39
|
+
}
|
40
|
+
]
|
41
|
+
}
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"date": "Tue, 28 Jun 2022 15:13:27 GMT",
|
45
|
+
"tag": "@fluentui/react-card_v9.0.0-beta.20",
|
46
|
+
"version": "9.0.0-beta.20",
|
47
|
+
"comments": {
|
48
|
+
"none": [
|
49
|
+
{
|
50
|
+
"author": "mgodbolt@microsoft.com",
|
51
|
+
"package": "@fluentui/react-card",
|
52
|
+
"commit": "0bdd0010f448387293f6dc715c1749ccc3aa85d6",
|
53
|
+
"comment": "Convert card to index based stories"
|
54
|
+
},
|
55
|
+
{
|
56
|
+
"author": "39736248+andrefcdias@users.noreply.github.com",
|
57
|
+
"package": "@fluentui/react-card",
|
58
|
+
"commit": "571209f9a7d3ecdaf08f1584dc094c51db3b7a9e",
|
59
|
+
"comment": "chore: migrate to new DX"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"author": "lingfangao@hotmail.com",
|
63
|
+
"package": "@fluentui/react-card",
|
64
|
+
"commit": "2da2d47e3dac6f8f4396ab112ab80b1dd34cc9ac",
|
65
|
+
"comment": "Bump cypress to v10"
|
66
|
+
}
|
67
|
+
],
|
68
|
+
"prerelease": [
|
69
|
+
{
|
70
|
+
"author": "39736248+andrefcdias@users.noreply.github.com",
|
71
|
+
"package": "@fluentui/react-card",
|
72
|
+
"commit": "06030b7cbf61b157df4b2a203a456aca6380ea6b",
|
73
|
+
"comment": "feat: add `orientation` prop"
|
74
|
+
},
|
75
|
+
{
|
76
|
+
"author": "39736248+andrefcdias@users.noreply.github.com",
|
77
|
+
"package": "@fluentui/react-card",
|
78
|
+
"commit": "0a35ab4703e21e5f6763b17ed33a48ad3ae4409b",
|
79
|
+
"comment": "chore: add basic API documentation"
|
80
|
+
},
|
81
|
+
{
|
82
|
+
"author": "lingfangao@hotmail.com",
|
83
|
+
"package": "@fluentui/react-card",
|
84
|
+
"commit": "675acea49c97f10837ddee9b8c4350ca27750125",
|
85
|
+
"comment": "Bump Griffel dependencies"
|
86
|
+
},
|
87
|
+
{
|
88
|
+
"author": "39736248+andrefcdias@users.noreply.github.com",
|
89
|
+
"package": "@fluentui/react-card",
|
90
|
+
"commit": "fbd2de31c257aa192dbc69d6eacda6388af06b30",
|
91
|
+
"comment": "feat: Add focus indicators"
|
92
|
+
},
|
93
|
+
{
|
94
|
+
"author": "lingfangao@hotmail.com",
|
95
|
+
"package": "@fluentui/react-card",
|
96
|
+
"commit": "e0aabd850b15adf9c151ebd4e332f7c50ad6cfdf",
|
97
|
+
"comment": "Update 9.0.0-rc dependencies to use caret range"
|
98
|
+
},
|
99
|
+
{
|
100
|
+
"author": "beachball",
|
101
|
+
"package": "@fluentui/react-card",
|
102
|
+
"comment": "Bump @fluentui/react-utilities to v9.0.0",
|
103
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
104
|
+
},
|
105
|
+
{
|
106
|
+
"author": "beachball",
|
107
|
+
"package": "@fluentui/react-card",
|
108
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0",
|
109
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
110
|
+
},
|
111
|
+
{
|
112
|
+
"author": "beachball",
|
113
|
+
"package": "@fluentui/react-card",
|
114
|
+
"comment": "Bump @fluentui/react-theme to v9.0.0",
|
115
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
116
|
+
},
|
117
|
+
{
|
118
|
+
"author": "beachball",
|
119
|
+
"package": "@fluentui/react-card",
|
120
|
+
"comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.9",
|
121
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
122
|
+
},
|
123
|
+
{
|
124
|
+
"author": "beachball",
|
125
|
+
"package": "@fluentui/react-card",
|
126
|
+
"comment": "Bump @fluentui/react-text to v9.0.0",
|
127
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
128
|
+
},
|
129
|
+
{
|
130
|
+
"author": "beachball",
|
131
|
+
"package": "@fluentui/react-card",
|
132
|
+
"comment": "Bump @fluentui/react-button to v9.0.0",
|
133
|
+
"commit": "ba6c5d651559b91c815429c9a9357c4d5a390f3e"
|
134
|
+
}
|
135
|
+
]
|
136
|
+
}
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"date": "Thu, 23 Jun 2022 14:25:31 GMT",
|
6
140
|
"tag": "@fluentui/react-card_v9.0.0-beta.19",
|
7
141
|
"version": "9.0.0-beta.19",
|
8
142
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,44 @@
|
|
1
1
|
# Change Log - @fluentui/react-card
|
2
2
|
|
3
|
-
This log was last generated on Tue,
|
3
|
+
This log was last generated on Tue, 28 Jun 2022 17:37:47 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
+
## [9.0.0-beta.21](https://github.com/microsoft/fluentui/tree/@fluentui/react-card_v9.0.0-beta.21)
|
8
|
+
|
9
|
+
Tue, 28 Jun 2022 17:37:47 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-card_v9.0.0-beta.20..@fluentui/react-card_v9.0.0-beta.21)
|
11
|
+
|
12
|
+
### Changes
|
13
|
+
|
14
|
+
- fix: Use caret dependency range for Griffel ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by lingfangao@hotmail.com)
|
15
|
+
- Bump @fluentui/react-tabster to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
16
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.10 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
17
|
+
- Bump @fluentui/react-text to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
18
|
+
- Bump @fluentui/react-button to v9.0.1 ([PR #23754](https://github.com/microsoft/fluentui/pull/23754) by beachball)
|
19
|
+
|
20
|
+
## [9.0.0-beta.20](https://github.com/microsoft/fluentui/tree/@fluentui/react-card_v9.0.0-beta.20)
|
21
|
+
|
22
|
+
Tue, 28 Jun 2022 15:13:27 GMT
|
23
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-card_v9.0.0-beta.19..@fluentui/react-card_v9.0.0-beta.20)
|
24
|
+
|
25
|
+
### Changes
|
26
|
+
|
27
|
+
- feat: add `orientation` prop ([PR #23037](https://github.com/microsoft/fluentui/pull/23037) by 39736248+andrefcdias@users.noreply.github.com)
|
28
|
+
- chore: add basic API documentation ([PR #23410](https://github.com/microsoft/fluentui/pull/23410) by 39736248+andrefcdias@users.noreply.github.com)
|
29
|
+
- Bump Griffel dependencies ([PR #23688](https://github.com/microsoft/fluentui/pull/23688) by lingfangao@hotmail.com)
|
30
|
+
- feat: Add focus indicators ([PR #23456](https://github.com/microsoft/fluentui/pull/23456) by 39736248+andrefcdias@users.noreply.github.com)
|
31
|
+
- Update 9.0.0-rc dependencies to use caret range ([PR #23732](https://github.com/microsoft/fluentui/pull/23732) by lingfangao@hotmail.com)
|
32
|
+
- Bump @fluentui/react-utilities to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
33
|
+
- Bump @fluentui/react-tabster to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
34
|
+
- Bump @fluentui/react-theme to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
35
|
+
- Bump @fluentui/react-conformance-griffel to v9.0.0-beta.9 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
36
|
+
- Bump @fluentui/react-text to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
37
|
+
- Bump @fluentui/react-button to v9.0.0 ([commit](https://github.com/microsoft/fluentui/commit/ba6c5d651559b91c815429c9a9357c4d5a390f3e) by beachball)
|
38
|
+
|
7
39
|
## [9.0.0-beta.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-card_v9.0.0-beta.19)
|
8
40
|
|
9
|
-
|
41
|
+
Thu, 23 Jun 2022 14:25:31 GMT
|
10
42
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-card_v9.0.0-beta.18..@fluentui/react-card_v9.0.0-beta.19)
|
11
43
|
|
12
44
|
### Changes
|
package/assets/logo.svg
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
<svg width="192" height="192" viewBox="0 0 192 192" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
2
|
+
<rect width="192" height="192" fill="url(#pattern0)"/>
|
3
|
+
<defs>
|
4
|
+
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
5
|
+
<use xlink:href="#image0_8855_1044" transform="scale(0.00520833)"/>
|
6
|
+
</pattern>
|
7
|
+
<image id="image0_8855_1044" width="192" height="192" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAzhSURBVHgB7d1djFVXGQbg77QUcIbMUBjK0DD8VKBMoWUKagq1iZRGINYE2qRAvFCMEPFCsHAjqRjAqIlQ4aZEMAUTDYVEaSJxwEoglgIXrWAYZAQjdQZhbG1liNQxodmud5/Z9TCdnzPnnL1+9vc+yelQ4AKG9e71fWuvvXauo6MjEiKdoruESDEGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBItSFCpXn3Pcnt2SfSeklkwniRujqJGqflf9z4oFAYcnxJXmlyL2wVabva+y9WVcVBiAMxfRoD4a+IM0Cp+hr88MEH8cyQw+wACIQJQjRnlvlqwjBmtJAfGIBS4ep+8VJxvxeB+MM5yZlPDGUSAvHEPJGJDULusAQq1T9ND/D97fHXstSZ2WD2LIkWPsWZwb6IASiHubLHIeivHBoM9A0LF7BMsocBKBtCsOdnIm+dk4r67FxTIs1lA50uBqBScrtNCE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zH5nCzc44UqPTW4Y9NgG7WuNDxj48ybVmOXNCbzqW5C5AGAVB4P86o2ueKBjR2dLIBvZuK5vX6YC0Gyu8Cv3t0poWO64k6nvNh6AD0lS7mxe/AD38DiSqQB0dn0oIWCd749MBQBvm9/UfMXbJ7g48P2TqQCsMs0jamiEoNOj5U0OfH9l8pFIrP6sO3Q5Xu939ZfDoEcYlzWNkeceHcsa3088Ga7Skqv9wsbR8anVXNXxmp6T4dIKQnIsOwb93Mm18Vmb3KIcDJ0nw5Vz/k8y4HFlXzx9lDw0rppX+nDpPRalJT7zp1Ou/qsrvluMQGAZtXBvEAZ17fC748+M+hEyfuQwmWEGPOp5XuUzgecCkWo8F4h0YwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDUGgFRjAEg1BoBUYwBINQaAVGMASDW82Y2vSCKtov8B9vsf8IxA1OsAAAAASUVORK5CYII="/>
|
8
|
+
</defs>
|
9
|
+
</svg>
|
package/dist/index.d.ts
CHANGED
@@ -10,10 +10,17 @@ import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
10
10
|
*/
|
11
11
|
export declare const Card: ForwardRefComponent<CardProps>;
|
12
12
|
|
13
|
+
/**
|
14
|
+
* Static CSS class names used internally for the component slots.
|
15
|
+
*/
|
13
16
|
export declare const cardClassNames: SlotClassNames<CardSlots>;
|
14
17
|
|
18
|
+
/**
|
19
|
+
* CSS variable names used internally for uniform styling in Card.
|
20
|
+
*/
|
15
21
|
export declare const cardCSSVars: {
|
16
22
|
cardSizeVar: string;
|
23
|
+
cardBorderRadiusVar: string;
|
17
24
|
};
|
18
25
|
|
19
26
|
/**
|
@@ -21,20 +28,32 @@ export declare const cardCSSVars: {
|
|
21
28
|
*/
|
22
29
|
export declare const CardFooter: ForwardRefComponent<CardFooterProps>;
|
23
30
|
|
31
|
+
/**
|
32
|
+
* Static CSS class names used internally for the component slots.
|
33
|
+
*/
|
24
34
|
export declare const cardFooterClassNames: SlotClassNames<CardFooterSlots>;
|
25
35
|
|
26
36
|
/**
|
27
|
-
* CardFooter props
|
37
|
+
* CardFooter component props.
|
28
38
|
*/
|
29
39
|
export declare type CardFooterProps = ComponentProps<CardFooterSlots>;
|
30
40
|
|
41
|
+
/**
|
42
|
+
* Slots available in the CardFooter component.
|
43
|
+
*/
|
31
44
|
export declare type CardFooterSlots = {
|
45
|
+
/**
|
46
|
+
* Root element of the component.
|
47
|
+
*/
|
32
48
|
root: Slot<'div'>;
|
49
|
+
/**
|
50
|
+
* Container that renders on the far end of the footer, used for action buttons.
|
51
|
+
*/
|
33
52
|
action?: Slot<'div'>;
|
34
53
|
};
|
35
54
|
|
36
55
|
/**
|
37
|
-
* State used in rendering CardFooter
|
56
|
+
* State used in rendering CardFooter.
|
38
57
|
*/
|
39
58
|
export declare type CardFooterState = ComponentState<CardFooterSlots>;
|
40
59
|
|
@@ -43,24 +62,48 @@ export declare type CardFooterState = ComponentState<CardFooterSlots>;
|
|
43
62
|
*/
|
44
63
|
export declare const CardHeader: ForwardRefComponent<CardHeaderProps>;
|
45
64
|
|
65
|
+
/**
|
66
|
+
* Static CSS class names used internally for the component slots.
|
67
|
+
*/
|
46
68
|
export declare const cardHeaderClassNames: SlotClassNames<CardHeaderSlots>;
|
47
69
|
|
48
70
|
/**
|
49
|
-
* CardHeader props
|
71
|
+
* CardHeader component props.
|
50
72
|
*/
|
51
73
|
export declare type CardHeaderProps = ComponentProps<Partial<CardHeaderSlots>>;
|
52
74
|
|
75
|
+
/**
|
76
|
+
* Slots available in the CardHeader component.
|
77
|
+
*/
|
53
78
|
export declare type CardHeaderSlots = {
|
79
|
+
/**
|
80
|
+
* Root element of the component.
|
81
|
+
*/
|
54
82
|
root: Slot<'div'>;
|
83
|
+
/**
|
84
|
+
* Element used to render an image or avatar related to the card.
|
85
|
+
*/
|
55
86
|
image: Slot<'div'>;
|
87
|
+
/**
|
88
|
+
* Parent container of the header and description slots.
|
89
|
+
*/
|
56
90
|
content?: Slot<'div'>;
|
91
|
+
/**
|
92
|
+
* Element used to render the main header title.
|
93
|
+
*/
|
57
94
|
header: Slot<'span'>;
|
95
|
+
/**
|
96
|
+
* Element used to render short descriptions related to the title.
|
97
|
+
*/
|
58
98
|
description: Slot<'span'>;
|
99
|
+
/**
|
100
|
+
* Container that renders on the far end of the footer, used for action buttons.
|
101
|
+
*/
|
59
102
|
action?: Slot<'div'>;
|
60
103
|
};
|
61
104
|
|
62
105
|
/**
|
63
|
-
* State used in rendering CardHeader
|
106
|
+
* State used in rendering CardHeader.
|
64
107
|
*/
|
65
108
|
export declare type CardHeaderState = ComponentState<CardHeaderSlots>;
|
66
109
|
|
@@ -69,25 +112,37 @@ export declare type CardHeaderState = ComponentState<CardHeaderSlots>;
|
|
69
112
|
*/
|
70
113
|
export declare const CardPreview: ForwardRefComponent<CardPreviewProps>;
|
71
114
|
|
115
|
+
/**
|
116
|
+
* Static CSS class names used internally for the component slots.
|
117
|
+
*/
|
72
118
|
export declare const cardPreviewClassNames: SlotClassNames<CardPreviewSlots>;
|
73
119
|
|
74
120
|
/**
|
75
|
-
* CardPreview props
|
121
|
+
* CardPreview component props.
|
76
122
|
*/
|
77
123
|
export declare type CardPreviewProps = ComponentProps<CardPreviewSlots>;
|
78
124
|
|
125
|
+
/**
|
126
|
+
* Slots available in the Card component.
|
127
|
+
*/
|
79
128
|
export declare type CardPreviewSlots = {
|
129
|
+
/**
|
130
|
+
* Root element of the component.
|
131
|
+
*/
|
80
132
|
root: Slot<'div'>;
|
133
|
+
/**
|
134
|
+
* Container that holds a logo related to the image preview provided.
|
135
|
+
*/
|
81
136
|
logo?: Slot<'div'>;
|
82
137
|
};
|
83
138
|
|
84
139
|
/**
|
85
|
-
* State used in rendering CardPreview
|
140
|
+
* State used in rendering CardPreview.
|
86
141
|
*/
|
87
142
|
export declare type CardPreviewState = ComponentState<CardPreviewSlots>;
|
88
143
|
|
89
144
|
/**
|
90
|
-
* Card
|
145
|
+
* Card component props.
|
91
146
|
*/
|
92
147
|
export declare type CardProps = ComponentProps<CardSlots> & {
|
93
148
|
appearance?: 'filled' | 'filled-alternative' | 'outline' | 'subtle';
|
@@ -109,38 +164,55 @@ export declare type CardProps = ComponentProps<CardSlots> & {
|
|
109
164
|
* This behaviour will cycle through all elements inside of the Card when pressing the Tab key and then release focus
|
110
165
|
* after the last inner element.
|
111
166
|
*
|
112
|
-
* @
|
167
|
+
* @default 'off'
|
113
168
|
*/
|
114
169
|
focusMode?: 'off' | 'no-tab' | 'tab-exit' | 'tab-only';
|
170
|
+
/**
|
171
|
+
* Defines the orientation of the card.
|
172
|
+
*
|
173
|
+
* @default 'vertical'
|
174
|
+
*/
|
175
|
+
orientation?: 'horizontal' | 'vertical';
|
176
|
+
/**
|
177
|
+
* Controls the card's border radius and padding between inner elements.
|
178
|
+
*
|
179
|
+
* @default 'medium'
|
180
|
+
*/
|
115
181
|
size?: 'small' | 'medium' | 'large';
|
116
182
|
};
|
117
183
|
|
184
|
+
/**
|
185
|
+
* Slots available in the Card component.
|
186
|
+
*/
|
118
187
|
export declare type CardSlots = {
|
188
|
+
/**
|
189
|
+
* Root element of the component.
|
190
|
+
*/
|
119
191
|
root: Slot<'div'>;
|
120
192
|
};
|
121
193
|
|
122
194
|
/**
|
123
|
-
* State used in rendering Card
|
195
|
+
* State used in rendering Card.
|
124
196
|
*/
|
125
|
-
export declare type CardState = ComponentState<CardSlots> & Required<Pick<CardProps, 'appearance' | 'size'>>;
|
197
|
+
export declare type CardState = ComponentState<CardSlots> & Required<Pick<CardProps, 'appearance' | 'orientation' | 'size'>>;
|
126
198
|
|
127
199
|
/**
|
128
|
-
* Render the final JSX of Card
|
200
|
+
* Render the final JSX of Card.
|
129
201
|
*/
|
130
202
|
export declare const renderCard_unstable: (state: CardState) => JSX.Element;
|
131
203
|
|
132
204
|
/**
|
133
|
-
* Render the final JSX of CardFooter
|
205
|
+
* Render the final JSX of CardFooter.
|
134
206
|
*/
|
135
207
|
export declare const renderCardFooter_unstable: (state: CardFooterState) => JSX.Element;
|
136
208
|
|
137
209
|
/**
|
138
|
-
* Render the final JSX of CardHeader
|
210
|
+
* Render the final JSX of CardHeader.
|
139
211
|
*/
|
140
212
|
export declare const renderCardHeader_unstable: (state: CardHeaderState) => JSX.Element;
|
141
213
|
|
142
214
|
/**
|
143
|
-
* Render the final JSX of CardPreview
|
215
|
+
* Render the final JSX of CardPreview.
|
144
216
|
*/
|
145
217
|
export declare const renderCardPreview_unstable: (state: CardPreviewState) => JSX.Element;
|
146
218
|
|
@@ -167,7 +239,7 @@ export declare const useCard_unstable: (props: CardProps, ref: React_2.Ref<HTMLE
|
|
167
239
|
export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React_2.Ref<HTMLElement>) => CardFooterState;
|
168
240
|
|
169
241
|
/**
|
170
|
-
* Apply styling to the CardFooter slots based on the state
|
242
|
+
* Apply styling to the CardFooter slots based on the state.
|
171
243
|
*/
|
172
244
|
export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
|
173
245
|
|
@@ -183,7 +255,7 @@ export declare const useCardFooterStyles_unstable: (state: CardFooterState) => C
|
|
183
255
|
export declare const useCardHeader_unstable: (props: CardHeaderProps, ref: React_2.Ref<HTMLElement>) => CardHeaderState;
|
184
256
|
|
185
257
|
/**
|
186
|
-
* Apply styling to the CardHeader slots based on the state
|
258
|
+
* Apply styling to the CardHeader slots based on the state.
|
187
259
|
*/
|
188
260
|
export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => CardHeaderState;
|
189
261
|
|
@@ -199,12 +271,12 @@ export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => C
|
|
199
271
|
export declare const useCardPreview_unstable: (props: CardPreviewProps, ref: React_2.Ref<HTMLElement>) => CardPreviewState;
|
200
272
|
|
201
273
|
/**
|
202
|
-
* Apply styling to the CardPreview slots based on the state
|
274
|
+
* Apply styling to the CardPreview slots based on the state.
|
203
275
|
*/
|
204
276
|
export declare const useCardPreviewStyles_unstable: (state: CardPreviewState) => CardPreviewState;
|
205
277
|
|
206
278
|
/**
|
207
|
-
* Apply styling to the Card slots based on the state
|
279
|
+
* Apply styling to the Card slots based on the state.
|
208
280
|
*/
|
209
281
|
export declare const useCardStyles_unstable: (state: CardState) => CardState;
|
210
282
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,WAAjC;AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AAIA;;AAEG;;AACH,OAAO,MAAM,IAAI,gBAAmC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;
|
1
|
+
{"version":3,"sources":["components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,WAAjC;AACA,SAAS,mBAAT,QAAoC,cAApC;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AAIA;;AAEG;;AACH,OAAO,MAAM,IAAI,gBAAmC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EAClF,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;EAEA,sBAAsB,CAAC,KAAD,CAAtB;EACA,OAAO,mBAAmB,CAAC,KAAD,CAA1B;AACD,CALmD,CAA7C;AAOP,IAAI,CAAC,WAAL,GAAmB,MAAnB","sourcesContent":["import * as React from 'react';\nimport { useCard_unstable } from './useCard';\nimport { renderCard_unstable } from './renderCard';\nimport { useCardStyles_unstable } from './useCardStyles';\nimport type { CardProps } from './Card.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * A card provides scaffolding for hosting actions and content for a single topic.\n */\nexport const Card: ForwardRefComponent<CardProps> = React.forwardRef((props, ref) => {\n const state = useCard_unstable(props, ref);\n\n useCardStyles_unstable(state);\n return renderCard_unstable(state);\n});\n\nCard.displayName = 'Card';\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Card.types.js","sourceRoot":"../src/","sources":["components/Card/Card.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardSlots = {\n root: Slot<'div'>;\n};\n\n/**\n * Card
|
1
|
+
{"version":3,"file":"Card.types.js","sourceRoot":"../src/","sources":["components/Card/Card.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Slots available in the Card component.\n */\nexport type CardSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n};\n\n/**\n * Card component props.\n */\nexport type CardProps = ComponentProps<CardSlots> & {\n appearance?: 'filled' | 'filled-alternative' | 'outline' | 'subtle';\n\n /**\n * Sets the focus behavior for the card. If `true`, the card will use the `noTab` focus behavior.\n *\n * `off`\n * The card will not focusable.\n *\n * `no-tab`\n * This behaviour traps the focus inside of the Card when pressing the Enter key and will only release focus when\n * pressing the Escape key.\n *\n * `tab-exit`\n * This behaviour traps the focus inside of the Card when pressing the Enter key but will release focus when pressing\n * the Tab key on the last inner element.\n *\n * `tab-only`\n * This behaviour will cycle through all elements inside of the Card when pressing the Tab key and then release focus\n * after the last inner element.\n *\n * @default 'off'\n */\n focusMode?: 'off' | 'no-tab' | 'tab-exit' | 'tab-only';\n\n /**\n * Defines the orientation of the card.\n *\n * @default 'vertical'\n */\n orientation?: 'horizontal' | 'vertical';\n\n /**\n * Controls the card's border radius and padding between inner elements.\n *\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n * State used in rendering Card.\n */\nexport type CardState = ComponentState<CardSlots> & Required<Pick<CardProps, 'appearance' | 'orientation' | 'size'>>;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Card/renderCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAAqB;
|
1
|
+
{"version":3,"sources":["components/Card/renderCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,mBAAmB,GAAI,KAAD,IAAqB;EACtD,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAY,KAAZ,CAArC;EAEA,oBAAO,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAAP;AACD,CAJM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardSlots, CardState } from './Card.types';\n\n/**\n * Render the final JSX of Card.\n */\nexport const renderCard_unstable = (state: CardState) => {\n const { slots, slotProps } = getSlots<CardSlots>(state);\n\n return <slots.root {...slotProps.root} />;\n};\n"],"sourceRoot":"../src/"}
|
@@ -14,6 +14,7 @@ export const useCard_unstable = (props, ref) => {
|
|
14
14
|
const {
|
15
15
|
appearance = 'filled',
|
16
16
|
focusMode = 'off',
|
17
|
+
orientation = 'vertical',
|
17
18
|
size = 'medium'
|
18
19
|
} = props;
|
19
20
|
const focusMap = {
|
@@ -31,6 +32,7 @@ export const useCard_unstable = (props, ref) => {
|
|
31
32
|
} : null;
|
32
33
|
return {
|
33
34
|
appearance,
|
35
|
+
orientation,
|
34
36
|
size,
|
35
37
|
components: {
|
36
38
|
root: 'div'
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Card/useCard.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,iBAAT,QAAkC,yBAAlC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;
|
1
|
+
{"version":3,"sources":["components/Card/useCard.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,QAAsC,2BAAtC;AAEA,SAAS,iBAAT,QAAkC,yBAAlC;AAEA;;;;;;;;AAQG;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAAmB,GAAnB,KAA6D;EAC3F,MAAM;IAAE,UAAU,GAAG,QAAf;IAAyB,SAAS,GAAG,KAArC;IAA4C,WAAW,GAAG,UAA1D;IAAsE,IAAI,GAAG;EAA7E,IAA0F,KAAhG;EAEA,MAAM,QAAQ,GAAG;IACf,GAAG,EAAE,SADU;IAEf,UAAU,oBAFK;IAGf,YAAY,SAHG;IAIf,YAAY;EAJG,CAAjB;EAOA,MAAM,aAAa,GAAG,iBAAiB,CAAC;IACtC,WAAW,EAAE,QAAQ,CAAC,SAAD;EADiB,CAAD,CAAvC;EAIA,MAAM,UAAU,GAAG,SAAS,KAAK,KAAd,GAAsB;IAAE,QAAQ,EAAE,CAAZ;IAAe,GAAG;EAAlB,CAAtB,GAA0D,IAA7E;EAEA,OAAO;IACL,UADK;IAEL,WAFK;IAGL,IAHK;IAKL,UAAU,EAAE;MAAE,IAAI,EAAE;IAAR,CALP;IAML,IAAI,EAAE,qBAAqB,CAAC,KAAK,CAAC,EAAN,IAAY,KAAb,EAAoB;MAC7C,GAD6C;MAE7C,IAAI,EAAE,OAFuC;MAG7C,GAAG,UAH0C;MAI7C,GAAG;IAJ0C,CAApB;EANtB,CAAP;AAaD,CA7BM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\nimport type { CardProps, CardState } from './Card.types';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\n\n/**\n * Create the state required to render Card.\n *\n * The returned state can be modified with hooks such as useCardStyles_unstable,\n * before being passed to renderCard_unstable.\n *\n * @param props - props from this instance of Card\n * @param ref - reference to root HTMLElement of Card\n */\nexport const useCard_unstable = (props: CardProps, ref: React.Ref<HTMLElement>): CardState => {\n const { appearance = 'filled', focusMode = 'off', orientation = 'vertical', size = 'medium' } = props;\n\n const focusMap = {\n off: undefined,\n 'no-tab': 'limited-trap-focus',\n 'tab-exit': 'limited',\n 'tab-only': 'unlimited',\n } as const;\n\n const groupperAttrs = useFocusableGroup({\n tabBehavior: focusMap[focusMode],\n });\n\n const focusAttrs = focusMode !== 'off' ? { tabIndex: 0, ...groupperAttrs } : null;\n\n return {\n appearance,\n orientation,\n size,\n\n components: { root: 'div' },\n root: getNativeElementProps(props.as || 'div', {\n ref,\n role: 'group',\n ...focusAttrs,\n ...props,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
|