@fluentui/react-card 0.0.0-nightly-20220606-0424.1 → 0.0.0-nightly-20220609-0423.1
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 +49 -5
- package/CHANGELOG.md +10 -5
- package/dist/index.d.ts +88 -17
- 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/useCardStyles.js +55 -19
- package/lib/components/Card/useCardStyles.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/useCardFooterStyles.js +5 -4
- package/lib/components/CardFooter/useCardFooterStyles.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/useCardHeaderStyles.js +5 -4
- package/lib/components/CardHeader/useCardHeaderStyles.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/useCardPreviewStyles.js +5 -4
- package/lib/components/CardPreview/useCardPreviewStyles.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/useCardStyles.js +56 -19
- package/lib-commonjs/components/Card/useCardStyles.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/useCardFooterStyles.js +5 -4
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.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/useCardHeaderStyles.js +5 -4
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.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/useCardPreviewStyles.js +5 -4
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/package.json +10 -9
package/CHANGELOG.json
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
"name": "@fluentui/react-card",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
6
|
-
"tag": "@fluentui/react-card_v0.0.0-nightly-
|
7
|
-
"version": "0.0.0-nightly-
|
5
|
+
"date": "Thu, 09 Jun 2022 04:36:15 GMT",
|
6
|
+
"tag": "@fluentui/react-card_v0.0.0-nightly-20220609-0423.1",
|
7
|
+
"version": "0.0.0-nightly-20220609-0423.1",
|
8
8
|
"comments": {
|
9
9
|
"prerelease": [
|
10
10
|
{
|
@@ -13,11 +13,55 @@
|
|
13
13
|
"commit": "06030b7cbf61b157df4b2a203a456aca6380ea6b",
|
14
14
|
"comment": "feat: add `orientation` prop"
|
15
15
|
},
|
16
|
+
{
|
17
|
+
"author": "39736248+andrefcdias@users.noreply.github.com",
|
18
|
+
"package": "@fluentui/react-card",
|
19
|
+
"commit": "0a35ab4703e21e5f6763b17ed33a48ad3ae4409b",
|
20
|
+
"comment": "chore: add basic API documentation"
|
21
|
+
},
|
22
|
+
{
|
23
|
+
"author": "39736248+andrefcdias@users.noreply.github.com",
|
24
|
+
"package": "@fluentui/react-card",
|
25
|
+
"commit": "fbd2de31c257aa192dbc69d6eacda6388af06b30",
|
26
|
+
"comment": "feat: Add focus indicators"
|
27
|
+
},
|
28
|
+
{
|
29
|
+
"author": "beachball",
|
30
|
+
"package": "@fluentui/react-card",
|
31
|
+
"comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220609-0423.1",
|
32
|
+
"commit": "d228dfcdb97fdeaee11ee8d3836489e60b1defbe"
|
33
|
+
},
|
34
|
+
{
|
35
|
+
"author": "beachball",
|
36
|
+
"package": "@fluentui/react-card",
|
37
|
+
"comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20220609-0423.1",
|
38
|
+
"commit": "d228dfcdb97fdeaee11ee8d3836489e60b1defbe"
|
39
|
+
},
|
40
|
+
{
|
41
|
+
"author": "beachball",
|
42
|
+
"package": "@fluentui/react-card",
|
43
|
+
"comment": "Bump @fluentui/react-text to v0.0.0-nightly-20220609-0423.1",
|
44
|
+
"commit": "d228dfcdb97fdeaee11ee8d3836489e60b1defbe"
|
45
|
+
},
|
16
46
|
{
|
17
47
|
"author": "beachball",
|
18
48
|
"package": "@fluentui/react-card",
|
19
|
-
"comment": "Bump @fluentui/react-button to v0.0.0-nightly-
|
20
|
-
"commit": "
|
49
|
+
"comment": "Bump @fluentui/react-button to v0.0.0-nightly-20220609-0423.1",
|
50
|
+
"commit": "d228dfcdb97fdeaee11ee8d3836489e60b1defbe"
|
51
|
+
}
|
52
|
+
],
|
53
|
+
"none": [
|
54
|
+
{
|
55
|
+
"author": "39736248+andrefcdias@users.noreply.github.com",
|
56
|
+
"package": "@fluentui/react-card",
|
57
|
+
"commit": "571209f9a7d3ecdaf08f1584dc094c51db3b7a9e",
|
58
|
+
"comment": "chore: migrate to new DX"
|
59
|
+
},
|
60
|
+
{
|
61
|
+
"author": "lingfangao@hotmail.com",
|
62
|
+
"package": "@fluentui/react-card",
|
63
|
+
"commit": "2da2d47e3dac6f8f4396ab112ab80b1dd34cc9ac",
|
64
|
+
"comment": "Bump cypress to v10"
|
21
65
|
}
|
22
66
|
]
|
23
67
|
}
|
package/CHANGELOG.md
CHANGED
@@ -1,18 +1,23 @@
|
|
1
1
|
# Change Log - @fluentui/react-card
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 09 Jun 2022 04:36:15 GMT and should not be manually modified.
|
4
4
|
|
5
5
|
<!-- Start content -->
|
6
6
|
|
7
|
-
## [0.0.0-nightly-
|
7
|
+
## [0.0.0-nightly-20220609-0423.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-card_v0.0.0-nightly-20220609-0423.1)
|
8
8
|
|
9
|
-
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-card_v9.0.0-beta.18..@fluentui/react-card_v0.0.0-nightly-
|
9
|
+
Thu, 09 Jun 2022 04:36:15 GMT
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-card_v9.0.0-beta.18..@fluentui/react-card_v0.0.0-nightly-20220609-0423.1)
|
11
11
|
|
12
12
|
### Changes
|
13
13
|
|
14
14
|
- feat: add `orientation` prop ([PR #23037](https://github.com/microsoft/fluentui/pull/23037) by 39736248+andrefcdias@users.noreply.github.com)
|
15
|
-
-
|
15
|
+
- chore: add basic API documentation ([PR #23410](https://github.com/microsoft/fluentui/pull/23410) by 39736248+andrefcdias@users.noreply.github.com)
|
16
|
+
- feat: Add focus indicators ([PR #23456](https://github.com/microsoft/fluentui/pull/23456) by 39736248+andrefcdias@users.noreply.github.com)
|
17
|
+
- Bump @fluentui/react-utilities to v0.0.0-nightly-20220609-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/d228dfcdb97fdeaee11ee8d3836489e60b1defbe) by beachball)
|
18
|
+
- Bump @fluentui/react-tabster to v0.0.0-nightly-20220609-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/d228dfcdb97fdeaee11ee8d3836489e60b1defbe) by beachball)
|
19
|
+
- Bump @fluentui/react-text to v0.0.0-nightly-20220609-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/d228dfcdb97fdeaee11ee8d3836489e60b1defbe) by beachball)
|
20
|
+
- Bump @fluentui/react-button to v0.0.0-nightly-20220609-0423.1 ([commit](https://github.com/microsoft/fluentui/commit/d228dfcdb97fdeaee11ee8d3836489e60b1defbe) by beachball)
|
16
21
|
|
17
22
|
## [9.0.0-beta.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-card_v9.0.0-beta.18)
|
18
23
|
|
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,39 +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
|
+
*/
|
115
175
|
orientation?: 'horizontal' | 'vertical';
|
176
|
+
/**
|
177
|
+
* Controls the card's border radius and padding between inner elements.
|
178
|
+
*
|
179
|
+
* @default 'medium'
|
180
|
+
*/
|
116
181
|
size?: 'small' | 'medium' | 'large';
|
117
182
|
};
|
118
183
|
|
184
|
+
/**
|
185
|
+
* Slots available in the Card component.
|
186
|
+
*/
|
119
187
|
export declare type CardSlots = {
|
188
|
+
/**
|
189
|
+
* Root element of the component.
|
190
|
+
*/
|
120
191
|
root: Slot<'div'>;
|
121
192
|
};
|
122
193
|
|
123
194
|
/**
|
124
|
-
* State used in rendering Card
|
195
|
+
* State used in rendering Card.
|
125
196
|
*/
|
126
197
|
export declare type CardState = ComponentState<CardSlots> & Required<Pick<CardProps, 'appearance' | 'orientation' | 'size'>>;
|
127
198
|
|
128
199
|
/**
|
129
|
-
* Render the final JSX of Card
|
200
|
+
* Render the final JSX of Card.
|
130
201
|
*/
|
131
202
|
export declare const renderCard_unstable: (state: CardState) => JSX.Element;
|
132
203
|
|
133
204
|
/**
|
134
|
-
* Render the final JSX of CardFooter
|
205
|
+
* Render the final JSX of CardFooter.
|
135
206
|
*/
|
136
207
|
export declare const renderCardFooter_unstable: (state: CardFooterState) => JSX.Element;
|
137
208
|
|
138
209
|
/**
|
139
|
-
* Render the final JSX of CardHeader
|
210
|
+
* Render the final JSX of CardHeader.
|
140
211
|
*/
|
141
212
|
export declare const renderCardHeader_unstable: (state: CardHeaderState) => JSX.Element;
|
142
213
|
|
143
214
|
/**
|
144
|
-
* Render the final JSX of CardPreview
|
215
|
+
* Render the final JSX of CardPreview.
|
145
216
|
*/
|
146
217
|
export declare const renderCardPreview_unstable: (state: CardPreviewState) => JSX.Element;
|
147
218
|
|
@@ -168,7 +239,7 @@ export declare const useCard_unstable: (props: CardProps, ref: React_2.Ref<HTMLE
|
|
168
239
|
export declare const useCardFooter_unstable: (props: CardFooterProps, ref: React_2.Ref<HTMLElement>) => CardFooterState;
|
169
240
|
|
170
241
|
/**
|
171
|
-
* Apply styling to the CardFooter slots based on the state
|
242
|
+
* Apply styling to the CardFooter slots based on the state.
|
172
243
|
*/
|
173
244
|
export declare const useCardFooterStyles_unstable: (state: CardFooterState) => CardFooterState;
|
174
245
|
|
@@ -184,7 +255,7 @@ export declare const useCardFooterStyles_unstable: (state: CardFooterState) => C
|
|
184
255
|
export declare const useCardHeader_unstable: (props: CardHeaderProps, ref: React_2.Ref<HTMLElement>) => CardHeaderState;
|
185
256
|
|
186
257
|
/**
|
187
|
-
* Apply styling to the CardHeader slots based on the state
|
258
|
+
* Apply styling to the CardHeader slots based on the state.
|
188
259
|
*/
|
189
260
|
export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => CardHeaderState;
|
190
261
|
|
@@ -200,12 +271,12 @@ export declare const useCardHeaderStyles_unstable: (state: CardHeaderState) => C
|
|
200
271
|
export declare const useCardPreview_unstable: (props: CardPreviewProps, ref: React_2.Ref<HTMLElement>) => CardPreviewState;
|
201
272
|
|
202
273
|
/**
|
203
|
-
* Apply styling to the CardPreview slots based on the state
|
274
|
+
* Apply styling to the CardPreview slots based on the state.
|
204
275
|
*/
|
205
276
|
export declare const useCardPreviewStyles_unstable: (state: CardPreviewState) => CardPreviewState;
|
206
277
|
|
207
278
|
/**
|
208
|
-
* Apply styling to the Card slots based on the state
|
279
|
+
* Apply styling to the Card slots based on the state.
|
209
280
|
*/
|
210
281
|
export declare const useCardStyles_unstable: (state: CardState) => CardState;
|
211
282
|
|
@@ -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;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
|
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/"}
|
@@ -3,16 +3,23 @@ import { tokens } from '@fluentui/react-theme';
|
|
3
3
|
import { cardPreviewClassNames } from '../CardPreview/useCardPreviewStyles';
|
4
4
|
import { cardHeaderClassNames } from '../CardHeader/useCardHeaderStyles';
|
5
5
|
import { cardFooterClassNames } from '../CardFooter/useCardFooterStyles';
|
6
|
+
import { createFocusOutlineStyle } from '@fluentui/react-tabster';
|
7
|
+
/**
|
8
|
+
* Static CSS class names used internally for the component slots.
|
9
|
+
*/
|
10
|
+
|
6
11
|
export const cardClassNames = {
|
7
12
|
root: 'fui-Card'
|
8
13
|
};
|
9
|
-
export const cardCSSVars = {
|
10
|
-
cardSizeVar: '--fui-Card--size'
|
11
|
-
};
|
12
14
|
/**
|
13
|
-
*
|
15
|
+
* CSS variable names used internally for uniform styling in Card.
|
14
16
|
*/
|
15
17
|
|
18
|
+
export const cardCSSVars = {
|
19
|
+
cardSizeVar: '--fui-Card--size',
|
20
|
+
cardBorderRadiusVar: '--fui-Card--border-radius'
|
21
|
+
};
|
22
|
+
|
16
23
|
const useStyles = /*#__PURE__*/__styles({
|
17
24
|
"root": {
|
18
25
|
"mc9l5x": "f22iagw",
|
@@ -35,6 +42,14 @@ const useStyles = /*#__PURE__*/__styles({
|
|
35
42
|
"Ihftqj": ["f13hvwk3", "f1en4csx"],
|
36
43
|
"Bcgy8vk": "f1i1u9k0",
|
37
44
|
"Bhxzhr1": ["f1en4csx", "f13hvwk3"],
|
45
|
+
"B3778ie": ["f1qnomq5", "f2fl922"],
|
46
|
+
"d9w3h3": ["f2fl922", "f1qnomq5"],
|
47
|
+
"Bl18szs": ["f1anhtl", "f1n2zcl3"],
|
48
|
+
"B4j8arr": ["f1n2zcl3", "f1anhtl"],
|
49
|
+
"Bbmb7ep": ["fifeqxg", "f899z7z"],
|
50
|
+
"Beyfa6y": ["f899z7z", "fifeqxg"],
|
51
|
+
"B7oj6ja": ["f4h3tyx", "f18ur2pz"],
|
52
|
+
"Btl43ni": ["f18ur2pz", "f4h3tyx"],
|
38
53
|
"z8tnut": "f1lplnzb",
|
39
54
|
"z189sj": ["f10m5gbb", "f1k04kkk"],
|
40
55
|
"Byoj8tv": "fhftqfp",
|
@@ -42,7 +57,36 @@ const useStyles = /*#__PURE__*/__styles({
|
|
42
57
|
"i8kkvl": "fxsr4vj",
|
43
58
|
"Belr9w4": "fcvsdzp",
|
44
59
|
"B2jhnfs": "f16v3d5c",
|
45
|
-
"wiictr": "f1su8t2g"
|
60
|
+
"wiictr": "f1su8t2g",
|
61
|
+
"Brovlpu": "ftqa4ok",
|
62
|
+
"Bnmjwt4": "flfsvnh",
|
63
|
+
"Jopkrh": ["f1781m5e", "flvaaa9"],
|
64
|
+
"hhrs2v": "f50u1b5",
|
65
|
+
"B7jbng7": ["flvaaa9", "f1781m5e"],
|
66
|
+
"e8izhr": "f1pxpxw8",
|
67
|
+
"in3gf6": "f1149fnl",
|
68
|
+
"B1i23sz": "fd1orka",
|
69
|
+
"Bfgg0yq": "fq7mjg8",
|
70
|
+
"B7231uf": "fmqgchs",
|
71
|
+
"Bxoolf0": ["f1lv6wi8", "famjx04"],
|
72
|
+
"fo1iai": "f1nbyjd2",
|
73
|
+
"Bh81ga8": ["famjx04", "f1lv6wi8"],
|
74
|
+
"qztvpn": "flmzudc",
|
75
|
+
"ge3ubn": ["f18tqew5", "f1mhomb7"],
|
76
|
+
"F41yt0": "f1uxejg7",
|
77
|
+
"Bxrdl85": ["f1mhomb7", "f18tqew5"],
|
78
|
+
"Bb63s14": ["fki4c7u", "f5rcvcw"],
|
79
|
+
"Ikxprv": ["f5rcvcw", "fki4c7u"],
|
80
|
+
"Bhxvgo6": ["f1ysoeim", "fylekmx"],
|
81
|
+
"J01dyq": ["fylekmx", "f1ysoeim"],
|
82
|
+
"hzsgvt": "f1f43d5r",
|
83
|
+
"Ba9tnbb": ["f1ib27sc", "f14s7j5v"],
|
84
|
+
"Fpkomr": "f13oqbgc",
|
85
|
+
"Bttdqvk": ["f14s7j5v", "f1ib27sc"],
|
86
|
+
"Bl8qd6i": "f1c7geys",
|
87
|
+
"Byzgy54": "fekzqha",
|
88
|
+
"mq8cyt": ["f3s0hz", "f95xthf"],
|
89
|
+
"B1a67j7": ["f95xthf", "f3s0hz"]
|
46
90
|
},
|
47
91
|
"orientationHorizontal": {
|
48
92
|
"Beiy3e4": "f1063pyq",
|
@@ -59,24 +103,15 @@ const useStyles = /*#__PURE__*/__styles({
|
|
59
103
|
},
|
60
104
|
"sizeSmall": {
|
61
105
|
"B7balbw": "f1pi9uxy",
|
62
|
-
"
|
63
|
-
"Beyfa6y": ["fi2rrw2", "f1g3puop"],
|
64
|
-
"B7oj6ja": ["f1rstyi9", "f1s4nn1u"],
|
65
|
-
"Btl43ni": ["f1s4nn1u", "f1rstyi9"]
|
106
|
+
"B1h88n7": "f1h1zgly"
|
66
107
|
},
|
67
108
|
"sizeMedium": {
|
68
109
|
"B7balbw": "frsmuga",
|
69
|
-
"
|
70
|
-
"Beyfa6y": ["f16jpd5f", "f1aa9q02"],
|
71
|
-
"B7oj6ja": ["f1jar5jt", "fyu767a"],
|
72
|
-
"Btl43ni": ["fyu767a", "f1jar5jt"]
|
110
|
+
"B1h88n7": "fuldkky"
|
73
111
|
},
|
74
112
|
"sizeLarge": {
|
75
113
|
"B7balbw": "f1qua4xo",
|
76
|
-
"
|
77
|
-
"Beyfa6y": ["frrelxk", "f1ldthgs"],
|
78
|
-
"B7oj6ja": ["fobrfso", "ffisxpw"],
|
79
|
-
"Btl43ni": ["ffisxpw", "fobrfso"]
|
114
|
+
"B1h88n7": "fimkt6v"
|
80
115
|
},
|
81
116
|
"interactiveNoOutline": {
|
82
117
|
"Be0v6ae": "ftr40te",
|
@@ -175,12 +210,13 @@ const useStyles = /*#__PURE__*/__styles({
|
|
175
210
|
"Gp14am": ["fzybk4o", "fpgykix"]
|
176
211
|
}
|
177
212
|
}, {
|
178
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f10pi13n{position:relative;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1mdlcz9::after{position:absolute;}", ".frwkxtg::after{top:0;}", ".f1n6gb5g::after{left:0;}", ".f15yvnhg::after{right:0;}", ".fo72kxq::after{bottom:0;}", ".f13zj6fq::after{content:\"\";}", ".f1nwj1ja::after{pointer-events:none;}", ".f8rth92::after{border-top-style:solid;}", ".flthirb::after{border-right-style:solid;}", ".ftkbnf5::after{border-left-style:solid;}", ".f1lh990p::after{border-bottom-style:solid;}", ".f6czdpx::after{border-top-width:var(--strokeWidthThin);}", ".f13hvwk3::after{border-right-width:var(--strokeWidthThin);}", ".f1en4csx::after{border-left-width:var(--strokeWidthThin);}", ".f1i1u9k0::after{border-bottom-width:var(--strokeWidthThin);}", ".f1lplnzb{padding-top:var(--fui-Card--size);}", ".f10m5gbb{padding-right:var(--fui-Card--size);}", ".f1k04kkk{padding-left:var(--fui-Card--size);}", ".fhftqfp{padding-bottom:var(--fui-Card--size);}", ".fxsr4vj{-webkit-column-gap:var(--fui-Card--size);column-gap:var(--fui-Card--size);}", ".fcvsdzp{row-gap:var(--fui-Card--size);}", ".f16v3d5c>.fui-CardHeader,.f16v3d5c>.fui-CardFooter{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f1su8t2g>:not(.fui-CardPreview):not(.fui-CardHeader):not(.fui-CardFooter){-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".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;}", ".fpfyeui>.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}", ".fwi74qw>.fui-CardPreview{margin-bottom:calc(var(--fui-Card--size) * -1);}", ".f1yfsbdm>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}", ".f1vk4t4a>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fobhde4>.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}", ".fx5r7kn>.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}", ".frl7skw>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}", ".f1pi9uxy{--fui-Card--size:8px;}", ".
|
213
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f10pi13n{position:relative;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f1mdlcz9::after{position:absolute;}", ".frwkxtg::after{top:0;}", ".f1n6gb5g::after{left:0;}", ".f15yvnhg::after{right:0;}", ".fo72kxq::after{bottom:0;}", ".f13zj6fq::after{content:\"\";}", ".f1nwj1ja::after{pointer-events:none;}", ".f8rth92::after{border-top-style:solid;}", ".flthirb::after{border-right-style:solid;}", ".ftkbnf5::after{border-left-style:solid;}", ".f1lh990p::after{border-bottom-style:solid;}", ".f6czdpx::after{border-top-width:var(--strokeWidthThin);}", ".f13hvwk3::after{border-right-width:var(--strokeWidthThin);}", ".f1en4csx::after{border-left-width:var(--strokeWidthThin);}", ".f1i1u9k0::after{border-bottom-width:var(--strokeWidthThin);}", ".f1qnomq5::after{border-bottom-right-radius:var(--fui-Card--border-radius);}", ".f2fl922::after{border-bottom-left-radius:var(--fui-Card--border-radius);}", ".f1anhtl::after{border-top-right-radius:var(--fui-Card--border-radius);}", ".f1n2zcl3::after{border-top-left-radius:var(--fui-Card--border-radius);}", ".fifeqxg{border-bottom-right-radius:var(--fui-Card--border-radius);}", ".f899z7z{border-bottom-left-radius:var(--fui-Card--border-radius);}", ".f4h3tyx{border-top-right-radius:var(--fui-Card--border-radius);}", ".f18ur2pz{border-top-left-radius:var(--fui-Card--border-radius);}", ".f1lplnzb{padding-top:var(--fui-Card--size);}", ".f10m5gbb{padding-right:var(--fui-Card--size);}", ".f1k04kkk{padding-left:var(--fui-Card--size);}", ".fhftqfp{padding-bottom:var(--fui-Card--size);}", ".fxsr4vj{-webkit-column-gap:var(--fui-Card--size);column-gap:var(--fui-Card--size);}", ".fcvsdzp{row-gap:var(--fui-Card--size);}", ".f16v3d5c>.fui-CardHeader,.f16v3d5c>.fui-CardFooter{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f1su8t2g>:not(.fui-CardPreview):not(.fui-CardHeader):not(.fui-CardFooter){-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", "[data-keyboard-nav] .flfsvnh:focus{border-top-color:transparent;}", "[data-keyboard-nav] .f1781m5e:focus{border-right-color:transparent;}", "[data-keyboard-nav] .flvaaa9:focus{border-left-color:transparent;}", "[data-keyboard-nav] .f50u1b5:focus{border-bottom-color:transparent;}", "[data-keyboard-nav] .f1pxpxw8:focus:after{content:\"\";}", "[data-keyboard-nav] .f1149fnl:focus:after{position:absolute;}", "[data-keyboard-nav] .fd1orka:focus:after{pointer-events:none;}", "[data-keyboard-nav] .fq7mjg8:focus:after{z-index:1;}", "[data-keyboard-nav] .fmqgchs:focus:after{border-top-style:solid;}", "[data-keyboard-nav] .f1lv6wi8:focus:after{border-right-style:solid;}", "[data-keyboard-nav] .famjx04:focus:after{border-left-style:solid;}", "[data-keyboard-nav] .f1nbyjd2:focus:after{border-bottom-style:solid;}", "[data-keyboard-nav] .flmzudc:focus:after{border-top-width:var(--strokeWidthThick);}", "[data-keyboard-nav] .f18tqew5:focus:after{border-right-width:var(--strokeWidthThick);}", "[data-keyboard-nav] .f1mhomb7:focus:after{border-left-width:var(--strokeWidthThick);}", "[data-keyboard-nav] .f1uxejg7:focus:after{border-bottom-width:var(--strokeWidthThick);}", "[data-keyboard-nav] .fki4c7u:focus:after{border-bottom-right-radius:var(--fui-Card--border-radius);}", "[data-keyboard-nav] .f5rcvcw:focus:after{border-bottom-left-radius:var(--fui-Card--border-radius);}", "[data-keyboard-nav] .f1ysoeim:focus:after{border-top-right-radius:var(--fui-Card--border-radius);}", "[data-keyboard-nav] .fylekmx:focus:after{border-top-left-radius:var(--fui-Card--border-radius);}", "[data-keyboard-nav] .f1f43d5r:focus:after{border-top-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1ib27sc:focus:after{border-right-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f14s7j5v:focus:after{border-left-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f13oqbgc:focus:after{border-bottom-color:var(--colorStrokeFocus2);}", "[data-keyboard-nav] .f1c7geys:focus:after{top:-var(--strokeWidthThick);}", "[data-keyboard-nav] .fekzqha:focus:after{bottom:-var(--strokeWidthThick);}", "[data-keyboard-nav] .f3s0hz:focus:after{left:-var(--strokeWidthThick);}", "[data-keyboard-nav] .f95xthf:focus:after{right:-var(--strokeWidthThick);}", ".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;}", ".fpfyeui>.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}", ".fwi74qw>.fui-CardPreview{margin-bottom:calc(var(--fui-Card--size) * -1);}", ".f1yfsbdm>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}", ".f1vk4t4a>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}", ".fobhde4>.fui-CardPreview{margin-left:calc(var(--fui-Card--size) * -1);}", ".fx5r7kn>.fui-CardPreview{margin-right:calc(var(--fui-Card--size) * -1);}", ".frl7skw>:not([aria-hidden=\"true\"]):first-of-type.fui-CardPreview{margin-top:calc(var(--fui-Card--size) * -1);}", ".f1pi9uxy{--fui-Card--size:8px;}", ".f1h1zgly{--fui-Card--border-radius:var(--borderRadiusSmall);}", ".frsmuga{--fui-Card--size:12px;}", ".fuldkky{--fui-Card--border-radius:var(--borderRadiusMedium);}", ".f1qua4xo{--fui-Card--size:16px;}", ".fimkt6v{--fui-Card--border-radius:var(--borderRadiusLarge);}", ".f1k6fduh{cursor:pointer;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f1whvlc6{box-shadow:var(--shadow4);}", ".f16gxe2i::after{border-top-color:var(--colorTransparentStroke);}", ".fpgykix::after{border-right-color:var(--colorTransparentStroke);}", ".fzybk4o::after{border-left-color:var(--colorTransparentStroke);}", ".f1osi826::after{border-bottom-color:var(--colorTransparentStroke);}", ".f1dmdbja{background-color:var(--colorNeutralBackground2);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".f1couhl3{box-shadow:none;}", ".ft83z1f::after{border-top-color:var(--colorNeutralStroke1);}", ".f1g4150c::after{border-right-color:var(--colorNeutralStroke1);}", ".f192dr6e::after{border-left-color:var(--colorNeutralStroke1);}", ".f1qnawh6::after{border-bottom-color:var(--colorNeutralStroke1);}", ".fhovq9v{background-color:var(--colorSubtleBackground);}"],
|
214
|
+
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
179
215
|
"h": [".ftr40te:hover::after{border-top-color:var(--colorTransparentStrokeInteractive);}", ".fcsoo7g:hover::after{border-right-color:var(--colorTransparentStrokeInteractive);}", ".f1rl4q8i:hover::after{border-left-color:var(--colorTransparentStrokeInteractive);}", ".fbb4roj:hover::after{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}", ".f1m145df:hover{box-shadow:var(--shadow8);}", ".f1uvynv3:hover{background-color:var(--colorNeutralBackground2Hover);}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f1llr77y:hover::after{border-top-color:var(--colorNeutralStroke1Hover);}", ".fzk0khw:hover::after{border-right-color:var(--colorNeutralStroke1Hover);}", ".fjj8tog:hover::after{border-left-color:var(--colorNeutralStroke1Hover);}", ".fb1u8ub:hover::after{border-bottom-color:var(--colorNeutralStroke1Hover);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}"],
|
180
216
|
"a": [".fd4vwcp:active::after{border-top-color:var(--colorTransparentStrokeInteractive);}", ".f1crelnc:active::after{border-right-color:var(--colorTransparentStrokeInteractive);}", ".fup9tr0:active::after{border-left-color:var(--colorTransparentStrokeInteractive);}", ".f12d33p4:active::after{border-bottom-color:var(--colorTransparentStrokeInteractive);}", ".fb40n2d:active{background-color:var(--colorNeutralBackground1Pressed);}", ".f1yhgkbh:active{background-color:var(--colorNeutralBackground2Pressed);}", ".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}", ".f1uohb70:active::after{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1jm7v1n:active::after{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f1bus3rq:active::after{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f1fbu7rr:active::after{border-bottom-color:var(--colorNeutralStroke1Pressed);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}"]
|
181
217
|
});
|
182
218
|
/**
|
183
|
-
* Apply styling to the Card slots based on the state
|
219
|
+
* Apply styling to the Card slots based on the state.
|
184
220
|
*/
|
185
221
|
|
186
222
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Card/useCardStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { cardPreviewClassNames } from '../CardPreview/useCardPreviewStyles';\nimport { cardHeaderClassNames } from '../CardHeader/useCardHeaderStyles';\nimport { cardFooterClassNames } from '../CardFooter/useCardFooterStyles';\nimport type { CardSlots, CardState } from './Card.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const cardClassNames: SlotClassNames<CardSlots> = {\n root: 'fui-Card',\n};\nexport const cardCSSVars = {\n cardSizeVar: '--fui-Card--size',\n};\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'relative',\n ...shorthands.overflow('hidden'),\n color: tokens.colorNeutralForeground1,\n\n // Border setting using after pseudo element to allow CardPreview to render behind it\n '::after': {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n content: '\"\"',\n pointerEvents: 'none',\n\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n },\n\n ...shorthands.padding(`var(${cardCSSVars.cardSizeVar})`),\n ...shorthands.gap(`var(${cardCSSVars.cardSizeVar})`),\n\n // Prevents CardHeader and CardFooter from shrinking.\n [`> .${cardHeaderClassNames.root}, > .${cardFooterClassNames.root}`]: {\n flexShrink: 0,\n },\n // Allows non-card components to grow to fill the available space.\n [`> :not(.${cardPreviewClassNames.root}):not(.${cardHeaderClassNames.root}):not(.${cardFooterClassNames.root})`]: {\n flexGrow: 1,\n },\n },\n\n orientationHorizontal: {\n flexDirection: 'row',\n alignItems: 'center',\n\n // Remove vertical padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on horizontal cards, the left padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]):first-of-type.${cardPreviewClassNames.root}`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n },\n orientationVertical: {\n flexDirection: 'column',\n\n // Remove lateral padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on vertical cards, the top padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]):first-of-type.${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n },\n\n sizeSmall: {\n [cardCSSVars.cardSizeVar]: '8px',\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n },\n sizeMedium: {\n [cardCSSVars.cardSizeVar]: '12px',\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n },\n sizeLarge: {\n [cardCSSVars.cardSizeVar]: '16px',\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\n },\n\n interactiveNoOutline: {\n ':hover::after': {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n ':active::after': {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n\n filledInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n boxShadow: tokens.shadow8,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n },\n },\n filled: {\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n filledAlternativeInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground2Hover,\n boxShadow: tokens.shadow8,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground2Pressed,\n },\n },\n filledAlternative: {\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n outlineInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n },\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n },\n },\n },\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n },\n subtleInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n});\n\n/**\n * Apply styling to the Card slots based on the state\n */\nexport const useCardStyles_unstable = (state: CardState): CardState => {\n const styles = useStyles();\n\n const orientationMap = {\n horizontal: styles.orientationHorizontal,\n vertical: styles.orientationVertical,\n } as const;\n\n const sizeMap = {\n small: styles.sizeSmall,\n medium: styles.sizeMedium,\n large: styles.sizeLarge,\n } as const;\n\n const interactive =\n state.root.onClick ||\n state.root.onMouseUp ||\n state.root.onMouseDown ||\n state.root.onPointerUp ||\n state.root.onPointerDown ||\n state.root.onTouchStart ||\n state.root.onTouchEnd;\n\n state.root.className = mergeClasses(\n cardClassNames.root,\n styles.root,\n orientationMap[state.orientation],\n sizeMap[state.size],\n state.appearance === 'filled' && styles.filled,\n state.appearance === 'filled-alternative' && styles.filledAlternative,\n state.appearance === 'outline' && styles.outline,\n state.appearance === 'subtle' && styles.subtle,\n interactive && state.appearance === 'filled' && styles.filledInteractive,\n interactive && state.appearance === 'filled-alternative' && styles.filledAlternativeInteractive,\n interactive && state.appearance === 'outline' && styles.outlineInteractive,\n interactive && state.appearance === 'subtle' && styles.subtleInteractive,\n interactive && state.appearance !== 'outline' && styles.interactiveNoOutline,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
1
|
+
{"version":3,"sources":["components/Card/useCardStyles.ts"],"names":[],"mappings":"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","sourcesContent":["import { shorthands, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { cardPreviewClassNames } from '../CardPreview/useCardPreviewStyles';\nimport { cardHeaderClassNames } from '../CardHeader/useCardHeaderStyles';\nimport { cardFooterClassNames } from '../CardFooter/useCardFooterStyles';\nimport type { CardSlots, CardState } from './Card.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { createFocusOutlineStyle } from '@fluentui/react-tabster';\n\n/**\n * Static CSS class names used internally for the component slots.\n */\nexport const cardClassNames: SlotClassNames<CardSlots> = {\n root: 'fui-Card',\n};\n\n/**\n * CSS variable names used internally for uniform styling in Card.\n */\nexport const cardCSSVars = {\n cardSizeVar: '--fui-Card--size',\n cardBorderRadiusVar: '--fui-Card--border-radius',\n};\n\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n position: 'relative',\n ...shorthands.overflow('hidden'),\n color: tokens.colorNeutralForeground1,\n\n // Border setting using after pseudo element to allow CardPreview to render behind it.\n '::after': {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n content: '\"\"',\n pointerEvents: 'none',\n\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n ...shorthands.borderRadius(`var(${cardCSSVars.cardBorderRadiusVar})`),\n },\n\n ...shorthands.borderRadius(`var(${cardCSSVars.cardBorderRadiusVar})`),\n ...shorthands.padding(`var(${cardCSSVars.cardSizeVar})`),\n ...shorthands.gap(`var(${cardCSSVars.cardSizeVar})`),\n\n // Prevents CardHeader and CardFooter from shrinking.\n [`> .${cardHeaderClassNames.root}, > .${cardFooterClassNames.root}`]: {\n flexShrink: 0,\n },\n // Allows non-card components to grow to fill the available space.\n [`> :not(.${cardPreviewClassNames.root}):not(.${cardHeaderClassNames.root}):not(.${cardFooterClassNames.root})`]: {\n flexGrow: 1,\n },\n\n ...createFocusOutlineStyle({\n style: {\n outlineRadius: `var(${cardCSSVars.cardBorderRadiusVar})`,\n outlineWidth: tokens.strokeWidthThick,\n },\n selector: 'focus',\n }),\n },\n\n orientationHorizontal: {\n flexDirection: 'row',\n alignItems: 'center',\n\n // Remove vertical padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginBottom: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on horizontal cards, the left padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]):first-of-type.${cardPreviewClassNames.root}`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n },\n orientationVertical: {\n flexDirection: 'column',\n\n // Remove lateral padding to keep CardPreview content flush with Card's borders.\n [`> .${cardPreviewClassNames.root}`]: {\n marginLeft: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n marginRight: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n // Due to Tabster's \"Groupper\" focus functionality, hidden elements are injected before and after Card's content.\n // As such, the code below targets a CardPreview, when it's the first element.\n // Since this is on vertical cards, the top padding is removed to keep the content flush with the border.\n [`> :not([aria-hidden=\"true\"]):first-of-type.${cardPreviewClassNames.root}`]: {\n marginTop: `calc(var(${cardCSSVars.cardSizeVar}) * -1)`,\n },\n },\n\n sizeSmall: {\n [cardCSSVars.cardSizeVar]: '8px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusSmall,\n },\n sizeMedium: {\n [cardCSSVars.cardSizeVar]: '12px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusMedium,\n },\n sizeLarge: {\n [cardCSSVars.cardSizeVar]: '16px',\n [cardCSSVars.cardBorderRadiusVar]: tokens.borderRadiusLarge,\n },\n\n interactiveNoOutline: {\n ':hover::after': {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n ':active::after': {\n ...shorthands.borderColor(tokens.colorTransparentStrokeInteractive),\n },\n },\n\n filledInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n boxShadow: tokens.shadow8,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n },\n },\n filled: {\n backgroundColor: tokens.colorNeutralBackground1,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n filledAlternativeInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground2Hover,\n boxShadow: tokens.shadow8,\n },\n ':active': {\n backgroundColor: tokens.colorNeutralBackground2Pressed,\n },\n },\n filledAlternative: {\n backgroundColor: tokens.colorNeutralBackground2,\n boxShadow: tokens.shadow4,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n outlineInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n },\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n },\n },\n },\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n },\n },\n subtleInteractive: {\n cursor: 'pointer',\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n boxShadow: 'none',\n\n '::after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n});\n\n/**\n * Apply styling to the Card slots based on the state.\n */\nexport const useCardStyles_unstable = (state: CardState): CardState => {\n const styles = useStyles();\n\n const orientationMap = {\n horizontal: styles.orientationHorizontal,\n vertical: styles.orientationVertical,\n } as const;\n\n const sizeMap = {\n small: styles.sizeSmall,\n medium: styles.sizeMedium,\n large: styles.sizeLarge,\n } as const;\n\n const interactive =\n state.root.onClick ||\n state.root.onMouseUp ||\n state.root.onMouseDown ||\n state.root.onPointerUp ||\n state.root.onPointerDown ||\n state.root.onTouchStart ||\n state.root.onTouchEnd;\n\n state.root.className = mergeClasses(\n cardClassNames.root,\n styles.root,\n orientationMap[state.orientation],\n sizeMap[state.size],\n state.appearance === 'filled' && styles.filled,\n state.appearance === 'filled-alternative' && styles.filledAlternative,\n state.appearance === 'outline' && styles.outline,\n state.appearance === 'subtle' && styles.subtle,\n interactive && state.appearance === 'filled' && styles.filledInteractive,\n interactive && state.appearance === 'filled-alternative' && styles.filledAlternativeInteractive,\n interactive && state.appearance === 'outline' && styles.outlineInteractive,\n interactive && state.appearance === 'subtle' && styles.subtleInteractive,\n interactive && state.appearance !== 'outline' && styles.interactiveNoOutline,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CardFooter.types.js","sourceRoot":"../src/","sources":["components/CardFooter/CardFooter.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type CardFooterSlots = {\n root: Slot<'div'>;\n action?: Slot<'div'>;\n};\n\n/**\n * CardFooter props
|
1
|
+
{"version":3,"file":"CardFooter.types.js","sourceRoot":"../src/","sources":["components/CardFooter/CardFooter.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Slots available in the CardFooter component.\n */\nexport type CardFooterSlots = {\n /**\n * Root element of the component.\n */\n root: Slot<'div'>;\n\n /**\n * Container that renders on the far end of the footer, used for action buttons.\n */\n action?: Slot<'div'>;\n};\n\n/**\n * CardFooter component props.\n */\nexport type CardFooterProps = ComponentProps<CardFooterSlots>;\n\n/**\n * State used in rendering CardFooter.\n */\nexport type CardFooterState = ComponentState<CardFooterSlots>;\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;EAClE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAkB,KAAlB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,MAAN,iBAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;EAAf,CAAb,CAFnB,CADF;AAMD,CATM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardFooterSlots, CardFooterState } from './CardFooter.types';\n\n/**\n * Render the final JSX of CardFooter
|
1
|
+
{"version":3,"sources":["components/CardFooter/renderCardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;EAClE,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAkB,KAAlB,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,SAAS,CAAC,IAAV,CAAe,QADlB,EAEG,KAAK,CAAC,MAAN,iBAAgB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,MAAP,EAAa,EAAA,GAAK,SAAS,CAAC;EAAf,CAAb,CAFnB,CADF;AAMD,CATM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { CardFooterSlots, CardFooterState } from './CardFooter.types';\n\n/**\n * Render the final JSX of CardFooter.\n */\nexport const renderCardFooter_unstable = (state: CardFooterState) => {\n const { slots, slotProps } = getSlots<CardFooterSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slotProps.root.children}\n {slots.action && <slots.action {...slotProps.action} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import { __styles, mergeClasses, shorthands } from '@griffel/react';
|
2
|
+
/**
|
3
|
+
* Static CSS class names used internally for the component slots.
|
4
|
+
*/
|
5
|
+
|
2
6
|
export const cardFooterClassNames = {
|
3
7
|
root: 'fui-CardFooter',
|
4
8
|
action: 'fui-CardFooter__action'
|
5
9
|
};
|
6
|
-
/**
|
7
|
-
* Styles for the root slot
|
8
|
-
*/
|
9
10
|
|
10
11
|
const useStyles = /*#__PURE__*/__styles({
|
11
12
|
"root": {
|
@@ -21,7 +22,7 @@ const useStyles = /*#__PURE__*/__styles({
|
|
21
22
|
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".fcgxt0o{margin-left:auto;}", ".f1ujusj6{margin-right:auto;}"]
|
22
23
|
});
|
23
24
|
/**
|
24
|
-
* Apply styling to the CardFooter slots based on the state
|
25
|
+
* Apply styling to the CardFooter slots based on the state.
|
25
26
|
*/
|
26
27
|
|
27
28
|
|