@fluentui/react-card 9.0.0-beta.27 → 9.0.0-beta.29
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 +111 -3
- package/CHANGELOG.md +35 -4
- package/README.md +1 -1
- 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.map +1 -1
- package/lib/components/Card/Card.types.js.map +1 -1
- package/lib/components/Card/index.js.map +1 -1
- package/lib/components/Card/renderCard.js.map +1 -1
- package/lib/components/Card/useCard.js.map +1 -1
- package/lib/components/Card/useCardStyles.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.js.map +1 -1
- package/lib/components/CardFooter/CardFooter.types.js.map +1 -1
- package/lib/components/CardFooter/index.js.map +1 -1
- package/lib/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.js.map +1 -1
- package/lib/components/CardHeader/CardHeader.types.js.map +1 -1
- package/lib/components/CardHeader/index.js.map +1 -1
- package/lib/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.js.map +1 -1
- package/lib/components/CardPreview/CardPreview.types.js.map +1 -1
- package/lib/components/CardPreview/index.js.map +1 -1
- package/lib/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Card.js.map +1 -1
- package/lib-commonjs/CardFooter.js.map +1 -1
- package/lib-commonjs/CardHeader.js.map +1 -1
- package/lib-commonjs/CardPreview.js.map +1 -1
- package/lib-commonjs/components/Card/Card.js.map +1 -1
- package/lib-commonjs/components/Card/index.js.map +1 -1
- package/lib-commonjs/components/Card/renderCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCard.js.map +1 -1
- package/lib-commonjs/components/Card/useCardStyles.js.map +1 -1
- package/lib-commonjs/components/CardFooter/CardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/index.js.map +1 -1
- package/lib-commonjs/components/CardFooter/renderCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooter.js.map +1 -1
- package/lib-commonjs/components/CardFooter/useCardFooterStyles.js.map +1 -1
- package/lib-commonjs/components/CardHeader/CardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/index.js.map +1 -1
- package/lib-commonjs/components/CardHeader/renderCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeader.js.map +1 -1
- package/lib-commonjs/components/CardHeader/useCardHeaderStyles.js.map +1 -1
- package/lib-commonjs/components/CardPreview/CardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/index.js.map +1 -1
- package/lib-commonjs/components/CardPreview/renderCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreview.js.map +1 -1
- package/lib-commonjs/components/CardPreview/useCardPreviewStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +18 -18
- package/MIGRATION.md +0 -323
- package/Spec.md +0 -527
- package/assets/Card.png +0 -0
- package/assets/CardHeader.png +0 -0
- package/assets/CardPreview.png +0 -0
- package/assets/ai_deck_template.png +0 -0
- package/assets/app_logo.svg +0 -9
- package/assets/avatar_colin.svg +0 -13
- package/assets/avatar_elvia.svg +0 -9
- package/assets/avatar_mauricio.svg +0 -9
- package/assets/card-example.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/doc_template.png +0 -0
- package/assets/excel_logo.svg +0 -24
- 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/logo.svg +0 -9
- package/assets/logo2.svg +0 -11
- package/assets/logo3.svg +0 -17
- 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/office1.png +0 -0
- package/assets/office2.png +0 -0
- package/assets/powerpoint_logo.svg +0 -9
- package/assets/sales_template.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/assets/word_logo.svg +0 -9
package/MIGRATION.md
DELETED
@@ -1,323 +0,0 @@
|
|
1
|
-
- [Migration from v0](#migration-from-v0)
|
2
|
-
- [Card](#card)
|
3
|
-
- [Property Mapping](#property-mapping)
|
4
|
-
- [Props that remain as is](#props-that-remain-as-is)
|
5
|
-
- [Props no longer supported with an equivalent functionality](#props-no-longer-supported-with-an-equivalent-functionality)
|
6
|
-
- [Props no longer supported](#props-no-longer-supported)
|
7
|
-
- [CardHeader](#cardheader)
|
8
|
-
- [Property Mapping](#property-mapping-1)
|
9
|
-
- [Props that remain as is](#props-that-remain-as-is-1)
|
10
|
-
- [Props no longer supported with an equivalent functionality](#props-no-longer-supported-with-an-equivalent-functionality-1)
|
11
|
-
- [Props no longer supported](#props-no-longer-supported-1)
|
12
|
-
- [CardBody](#cardbody)
|
13
|
-
- [CardPreview](#cardpreview)
|
14
|
-
- [Property Mapping](#property-mapping-2)
|
15
|
-
- [Props that remain as is](#props-that-remain-as-is-2)
|
16
|
-
- [Props no longer supported with an equivalent functionality](#props-no-longer-supported-with-an-equivalent-functionality-2)
|
17
|
-
- [Props no longer supported](#props-no-longer-supported-2)
|
18
|
-
- [Example](#example)
|
19
|
-
- [Before](#before)
|
20
|
-
- [After](#after)
|
21
|
-
- [CardColumn](#cardcolumn)
|
22
|
-
- [CardExpandableBox](#cardexpandablebox)
|
23
|
-
- [CardTopControls](#cardtopcontrols)
|
24
|
-
- [CardFooter](#cardfooter)
|
25
|
-
- [Property Mapping](#property-mapping-3)
|
26
|
-
- [Props that remain as is](#props-that-remain-as-is-3)
|
27
|
-
- [Props no longer supported with an equivalent functionality](#props-no-longer-supported-with-an-equivalent-functionality-3)
|
28
|
-
- [Props no longer supported](#props-no-longer-supported-3)
|
29
|
-
- [Migration from v8](#migration-from-v8)
|
30
|
-
|
31
|
-
# Migration from v0
|
32
|
-
|
33
|
-
## Card
|
34
|
-
|
35
|
-
### Property Mapping
|
36
|
-
|
37
|
-
| v0 - `Card` | v9 - `Card` |
|
38
|
-
| -------------- | ------------- |
|
39
|
-
| `acessibility` | - |
|
40
|
-
| - | `appearance` |
|
41
|
-
| `as` | `as` |
|
42
|
-
| `centered` | - |
|
43
|
-
| `className` | `className` |
|
44
|
-
| `compact` | - |
|
45
|
-
| `design` | - |
|
46
|
-
| `disabled` | - |
|
47
|
-
| `elevated` | - |
|
48
|
-
| `expandable` | - |
|
49
|
-
| `fluid` | - |
|
50
|
-
| - | `focusMode` |
|
51
|
-
| `ghost` | - |
|
52
|
-
| `inverted` | - |
|
53
|
-
| `key` | - |
|
54
|
-
| - | `orientation` |
|
55
|
-
| `ref` | - |
|
56
|
-
| - | `root` slot |
|
57
|
-
| `selected` | - |
|
58
|
-
| `size` | `size` |
|
59
|
-
| `styles` | - |
|
60
|
-
| `variables` | - |
|
61
|
-
|
62
|
-
### Props that remain as is
|
63
|
-
|
64
|
-
- `as`
|
65
|
-
- `className`
|
66
|
-
- `key`
|
67
|
-
- `ref`
|
68
|
-
- `size` => The size options are now reduced: `'small' | 'medium' | 'large'`
|
69
|
-
|
70
|
-
### Props no longer supported with an equivalent functionality
|
71
|
-
|
72
|
-
- `accessibility` => Override accessibility behavior by composing the `Card` how you want
|
73
|
-
- `compact` => Instead, use `size="small"`
|
74
|
-
- `ghost` => Instead, use `appearance="subtle"`
|
75
|
-
- `inverted` => Instead, use `appearance="filled-alternative"`
|
76
|
-
|
77
|
-
### Props no longer supported
|
78
|
-
|
79
|
-
- `centered` => Can be achieved by overriding the styles of the Card component:
|
80
|
-
|
81
|
-
```jsx
|
82
|
-
import * as React from 'react';
|
83
|
-
import { makeStyles } from '@fluentui/react-components';
|
84
|
-
import { Card } from '@fluentui/react-components/unstable';
|
85
|
-
|
86
|
-
const useStyles = makeStyles({
|
87
|
-
centeredCard: {
|
88
|
-
justifyItems: 'center',
|
89
|
-
},
|
90
|
-
});
|
91
|
-
|
92
|
-
export const CenteredCard = () => {
|
93
|
-
const styles = useStyles();
|
94
|
-
|
95
|
-
return (
|
96
|
-
<Card className={styles.centeredCard}>
|
97
|
-
<p>Lorem ipsum dolor sit amet.</p>
|
98
|
-
</Card>
|
99
|
-
);
|
100
|
-
};
|
101
|
-
```
|
102
|
-
|
103
|
-
- `disabled` => No equivalent functionality. Can be created by overriding the styles.
|
104
|
-
- `elevated` => All cards are now elevated by default. To change that, use the `appearance` property.
|
105
|
-
- `expandable` => No equivalent functionality.
|
106
|
-
- `fluid` => All cards are fluid by default. To change that, use a parent container with a defined size:
|
107
|
-
|
108
|
-
```jsx
|
109
|
-
import * as React from 'react';
|
110
|
-
import { makeStyles } from '@fluentui/react-components';
|
111
|
-
import { Card } from '@fluentui/react-components/unstable';
|
112
|
-
|
113
|
-
const useStyles = makeStyles({
|
114
|
-
parent: {
|
115
|
-
width: '500px',
|
116
|
-
},
|
117
|
-
});
|
118
|
-
|
119
|
-
export const SizedCard = () => {
|
120
|
-
const styles = useStyles();
|
121
|
-
|
122
|
-
return (
|
123
|
-
<div className={styles.parent}>
|
124
|
-
<Card>
|
125
|
-
<p>Lorem ipsum dolor sit amet.</p>
|
126
|
-
</Card>
|
127
|
-
</div>
|
128
|
-
);
|
129
|
-
};
|
130
|
-
```
|
131
|
-
|
132
|
-
- `selected` => No equivalent functionality.
|
133
|
-
|
134
|
-
## CardHeader
|
135
|
-
|
136
|
-
### Property Mapping
|
137
|
-
|
138
|
-
| v0 - `Cardheader` | v9 - `Cardheader` |
|
139
|
-
| ----------------- | ------------------ |
|
140
|
-
| `acessibility` | - |
|
141
|
-
| - | `root` slot |
|
142
|
-
| - | `image` slot |
|
143
|
-
| - | `header` slot |
|
144
|
-
| - | `description` slot |
|
145
|
-
| - | `action` slot |
|
146
|
-
| `as` | - |
|
147
|
-
| `className` | - |
|
148
|
-
| `design` | - |
|
149
|
-
| `fitted` | - |
|
150
|
-
| `key` | - |
|
151
|
-
| `ref` | - |
|
152
|
-
| `styles` | - |
|
153
|
-
| `variables` | - |
|
154
|
-
|
155
|
-
### Props that remain as is
|
156
|
-
|
157
|
-
- `as`
|
158
|
-
- `className`
|
159
|
-
- `key`
|
160
|
-
- `ref`
|
161
|
-
|
162
|
-
### Props no longer supported with an equivalent functionality
|
163
|
-
|
164
|
-
- `accessibility` => Override accessibility behavior by composing the `CardHeader` how you want
|
165
|
-
|
166
|
-
### Props no longer supported
|
167
|
-
|
168
|
-
- `design`
|
169
|
-
- `fitted`
|
170
|
-
- `styles`
|
171
|
-
- `variables`
|
172
|
-
|
173
|
-
## CardBody
|
174
|
-
|
175
|
-
This component is no longer supported. Instead, pass any content under the main Card component.
|
176
|
-
|
177
|
-
Before:
|
178
|
-
|
179
|
-
```jsx
|
180
|
-
import * as React from 'react';
|
181
|
-
import { Card, CardBody } from '@fluentui/react-northstar';
|
182
|
-
|
183
|
-
export const CardBodyExample = () => (
|
184
|
-
<Card elevated aria-roledescription="card with image and text">
|
185
|
-
<CardBody fitted>
|
186
|
-
<p>Lorem ipsum dolor sit amet.</p>
|
187
|
-
</CardBody>
|
188
|
-
</Card>
|
189
|
-
);
|
190
|
-
```
|
191
|
-
|
192
|
-
After:
|
193
|
-
|
194
|
-
```jsx
|
195
|
-
import * as React from 'react';
|
196
|
-
import { Card } from '@fluentui/react-components/unstable';
|
197
|
-
|
198
|
-
export const CardBodyExample = () => (
|
199
|
-
<Card>
|
200
|
-
<p>Lorem ipsum dolor sit amet.</p>
|
201
|
-
</Card>
|
202
|
-
);
|
203
|
-
```
|
204
|
-
|
205
|
-
## CardPreview
|
206
|
-
|
207
|
-
### Property Mapping
|
208
|
-
|
209
|
-
| v0 - `CardPreview` | v9 - `CardPreview` |
|
210
|
-
| ------------------ | ------------------ |
|
211
|
-
| `acessibility` | - |
|
212
|
-
| `as` | - |
|
213
|
-
| `className` | - |
|
214
|
-
| `design` | - |
|
215
|
-
| `fitted` | - |
|
216
|
-
| `horizontal` | - |
|
217
|
-
| - | `logo` slot |
|
218
|
-
| `key` | - |
|
219
|
-
| `ref` | - |
|
220
|
-
| - | `root` slot |
|
221
|
-
| `styles` | - |
|
222
|
-
| `variables` | - |
|
223
|
-
|
224
|
-
### Props that remain as is
|
225
|
-
|
226
|
-
- `as`
|
227
|
-
- `className`
|
228
|
-
- `key`
|
229
|
-
- `ref`
|
230
|
-
|
231
|
-
### Props no longer supported with an equivalent functionality
|
232
|
-
|
233
|
-
- `accessibility` => Override accessibility behavior by composing the `CardPreview` how you want
|
234
|
-
|
235
|
-
### Props no longer supported
|
236
|
-
|
237
|
-
- `design`
|
238
|
-
- `fitted`
|
239
|
-
- `horizontal`
|
240
|
-
- `styles`
|
241
|
-
- `variables`
|
242
|
-
|
243
|
-
### Example
|
244
|
-
|
245
|
-
#### Before
|
246
|
-
|
247
|
-
```jsx
|
248
|
-
import * as React from 'react';
|
249
|
-
import { Card, CardPreview, Image } from '@fluentui/react-northstar';
|
250
|
-
|
251
|
-
export const CardPreviewExample = () => (
|
252
|
-
<Card aria-roledescription="image card">
|
253
|
-
<CardPreview>
|
254
|
-
<Image fluid src="https://url-of.the/image.jpg" alt="Preview of a Word document" />
|
255
|
-
</CardPreview>
|
256
|
-
</Card>
|
257
|
-
);
|
258
|
-
```
|
259
|
-
|
260
|
-
#### After
|
261
|
-
|
262
|
-
```jsx
|
263
|
-
import * as React from 'react';
|
264
|
-
import { Card, CardPreview } from '@fluentui/react-components/unstable';
|
265
|
-
|
266
|
-
export const CardPreviewExample = () => (
|
267
|
-
<Card>
|
268
|
-
<CardPreview>
|
269
|
-
<img src="https://url-of.the/image.jpg" alt="Preview of a Word document" />
|
270
|
-
</CardPreview>
|
271
|
-
</Card>
|
272
|
-
);
|
273
|
-
```
|
274
|
-
|
275
|
-
## CardColumn
|
276
|
-
|
277
|
-
This component is no longer supported.
|
278
|
-
|
279
|
-
## CardExpandableBox
|
280
|
-
|
281
|
-
This component is no longer supported.
|
282
|
-
|
283
|
-
## CardTopControls
|
284
|
-
|
285
|
-
This component is no longer supported.
|
286
|
-
|
287
|
-
## CardFooter
|
288
|
-
|
289
|
-
### Property Mapping
|
290
|
-
|
291
|
-
| v0 - `CardFooter` | v9 - `CardFooter` |
|
292
|
-
| ----------------- | ----------------- |
|
293
|
-
| `acessibility` | - |
|
294
|
-
| `as` | - |
|
295
|
-
| `className` | - |
|
296
|
-
| `design` | - |
|
297
|
-
| `fitted` | - |
|
298
|
-
| `key` | - |
|
299
|
-
| `ref` | - |
|
300
|
-
| `styles` | - |
|
301
|
-
| `variables` | - |
|
302
|
-
|
303
|
-
### Props that remain as is
|
304
|
-
|
305
|
-
- `as`
|
306
|
-
- `className`
|
307
|
-
- `key`
|
308
|
-
- `ref`
|
309
|
-
|
310
|
-
### Props no longer supported with an equivalent functionality
|
311
|
-
|
312
|
-
- `accessibility` => Override accessibility behavior by composing the `CardFooter` how you want
|
313
|
-
|
314
|
-
### Props no longer supported
|
315
|
-
|
316
|
-
- `design`
|
317
|
-
- `fitted`
|
318
|
-
- `styles`
|
319
|
-
- `variables`
|
320
|
-
|
321
|
-
# Migration from v8
|
322
|
-
|
323
|
-
WIP
|