@nypl/design-system-react-components 0.25.7 → 0.25.8
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.md +29 -0
- package/dist/components/Icons/IconSvgs.d.ts +1 -0
- package/dist/components/Icons/IconTypes.d.ts +1 -0
- package/dist/components/Image/ImageTypes.d.ts +3 -1
- package/dist/components/Link/LinkTypes.d.ts +1 -0
- package/dist/components/Notification/Notification.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +2 -0
- package/dist/components/Toggle/Toggle.d.ts +47 -0
- package/dist/components/Toggle/ToggleSizes.d.ts +4 -0
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +5 -3
- package/dist/design-system-react-components.cjs.development.js +613 -366
- package/dist/design-system-react-components.cjs.development.js.map +1 -1
- package/dist/design-system-react-components.cjs.production.min.js +1 -1
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
- package/dist/design-system-react-components.esm.js +606 -354
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/theme/components/notification.d.ts +8 -4
- package/dist/theme/components/toggle.d.ts +68 -0
- package/dist/theme/foundations/spacing.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.stories.mdx +1 -2
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +1 -1
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +10 -0
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +99 -0
- package/src/components/Button/Button.tsx +0 -1
- package/src/components/Card/Card.stories.mdx +74 -7
- package/src/components/Card/Card.tsx +9 -8
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +67 -35
- package/src/components/Chakra/Grid.stories.mdx +11 -14
- package/src/components/DatePicker/DatePicker.test.tsx +8 -6
- package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +5 -4
- package/src/components/Icons/Icon.stories.mdx +3 -2
- package/src/components/Icons/IconSvgs.tsx +2 -0
- package/src/components/Icons/IconTypes.tsx +1 -0
- package/src/components/Image/Image.stories.mdx +152 -90
- package/src/components/Image/Image.test.tsx +10 -0
- package/src/components/Image/ImageTypes.ts +2 -0
- package/src/components/Image/__snapshots__/Image.test.tsx.snap +24 -8
- package/src/components/Label/Label.stories.mdx +1 -1
- package/src/components/Link/Link.stories.mdx +2 -3
- package/src/components/Link/Link.test.tsx +71 -0
- package/src/components/Link/Link.tsx +41 -9
- package/src/components/Link/LinkTypes.tsx +1 -0
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +201 -0
- package/src/components/Notification/Notification.stories.mdx +36 -3
- package/src/components/Notification/Notification.test.tsx +62 -16
- package/src/components/Notification/Notification.tsx +17 -5
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +117 -0
- package/src/components/Pagination/Pagination.stories.mdx +1 -2
- package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +42 -0
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +2 -3
- package/src/components/SearchBar/SearchBar.stories.mdx +1 -1
- package/src/components/Select/Select.stories.mdx +132 -55
- package/src/components/Select/Select.test.tsx +2 -2
- package/src/components/Select/Select.tsx +6 -2
- package/src/components/Slider/Slider.stories.mdx +3 -2
- package/src/components/Slider/Slider.test.tsx +35 -0
- package/src/components/Slider/Slider.tsx +8 -2
- package/src/components/Template/Template.stories.mdx +1 -2
- package/src/components/Toggle/Toggle.stories.mdx +176 -0
- package/src/components/Toggle/Toggle.test.tsx +140 -0
- package/src/components/Toggle/Toggle.tsx +118 -0
- package/src/components/Toggle/ToggleSizes.tsx +4 -0
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +255 -0
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +39 -18
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +103 -1
- package/src/components/VideoPlayer/VideoPlayer.tsx +57 -17
- package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +48 -0
- package/src/index.ts +6 -0
- package/src/theme/components/breadcrumb.ts +1 -1
- package/src/theme/components/card.ts +4 -5
- package/src/theme/components/global.ts +1 -1
- package/src/theme/components/icon.ts +2 -2
- package/src/theme/components/image.ts +8 -0
- package/src/theme/components/notification.ts +8 -6
- package/src/theme/components/toggle.ts +65 -0
- package/src/theme/foundations/spacing.ts +3 -0
- package/src/theme/index.ts +2 -0
- package/src/utils/componentCategories.ts +3 -1
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export { default as Notification } from "./components/Notification/Notification"
|
|
|
40
40
|
export { NotificationTypes } from "./components/Notification/NotificationTypes";
|
|
41
41
|
export { default as Pagination } from "./components/Pagination/Pagination";
|
|
42
42
|
export { default as ProgressIndicator } from "./components/ProgressIndicator/ProgressIndicator";
|
|
43
|
+
export { ProgressIndicatorSizes, ProgressIndicatorTypes, } from "./components/ProgressIndicator/ProgressIndicatorTypes";
|
|
43
44
|
export { default as Radio } from "./components/Radio/Radio";
|
|
44
45
|
export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
|
|
45
46
|
export { RadioGroupLayoutTypes } from "./components/RadioGroup/RadioGroupLayoutTypes";
|
|
@@ -57,6 +58,8 @@ export { default as Text } from "./components/Text/Text";
|
|
|
57
58
|
export { TextDisplaySizes } from "./components/Text/TextTypes";
|
|
58
59
|
export { default as TextInput, TextInputRefType, } from "./components/TextInput/TextInput";
|
|
59
60
|
export { TextInputTypes } from "./components/TextInput/TextInputTypes";
|
|
61
|
+
export { default as Toggle } from "./components/Toggle/Toggle";
|
|
62
|
+
export { ToggleSizes } from "./components/Toggle/ToggleSizes";
|
|
60
63
|
export { default as useNYPLTheme } from "./hooks/useNYPLTheme";
|
|
61
64
|
export { default as VideoPlayer } from "./components/VideoPlayer/VideoPlayer";
|
|
62
65
|
export { VideoPlayerAspectRatios, VideoPlayerTypes, } from "./components/VideoPlayer/VideoPlayerTypes";
|
|
@@ -43,23 +43,26 @@ declare const _default: {
|
|
|
43
43
|
};
|
|
44
44
|
NotificationContent: {
|
|
45
45
|
parts: string[];
|
|
46
|
-
baseStyle: ({ alignText, notificationType }: {
|
|
46
|
+
baseStyle: ({ alignText, icon, notificationType }: {
|
|
47
47
|
alignText: any;
|
|
48
|
+
icon: any;
|
|
48
49
|
notificationType: any;
|
|
49
50
|
}) => {
|
|
50
51
|
display: string;
|
|
51
52
|
justifyContent: string;
|
|
52
53
|
content: {
|
|
53
|
-
width: string;
|
|
54
|
-
paddingLeft: string;
|
|
55
54
|
color: string;
|
|
55
|
+
marginTop: string;
|
|
56
|
+
paddingLeft: string;
|
|
57
|
+
width: string;
|
|
56
58
|
};
|
|
57
59
|
};
|
|
58
60
|
};
|
|
59
61
|
NotificationHeading: {
|
|
60
62
|
parts: string[];
|
|
61
|
-
baseStyle: ({ centered, notificationType }: {
|
|
63
|
+
baseStyle: ({ centered, icon, notificationType }: {
|
|
62
64
|
centered: any;
|
|
65
|
+
icon: any;
|
|
63
66
|
notificationType: any;
|
|
64
67
|
}) => {
|
|
65
68
|
display: string;
|
|
@@ -67,6 +70,7 @@ declare const _default: {
|
|
|
67
70
|
justifyContent: string;
|
|
68
71
|
heading: {
|
|
69
72
|
marginBottom: string;
|
|
73
|
+
marginTop: string;
|
|
70
74
|
color: string;
|
|
71
75
|
};
|
|
72
76
|
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
Toggle: {
|
|
3
|
+
parts: string[];
|
|
4
|
+
baseStyle: {
|
|
5
|
+
label: {
|
|
6
|
+
display: string;
|
|
7
|
+
alignItems: string;
|
|
8
|
+
width: string;
|
|
9
|
+
};
|
|
10
|
+
helper: {
|
|
11
|
+
marginLeft: string;
|
|
12
|
+
marginTop: string;
|
|
13
|
+
marginBottom: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
defaultProps: {
|
|
17
|
+
size: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
Switch: {
|
|
21
|
+
baseStyle: {
|
|
22
|
+
opacity: number;
|
|
23
|
+
track: {
|
|
24
|
+
p: string;
|
|
25
|
+
border: string;
|
|
26
|
+
borderColor: string;
|
|
27
|
+
_checked: {
|
|
28
|
+
borderColor: string;
|
|
29
|
+
bg: string;
|
|
30
|
+
opacity: number;
|
|
31
|
+
};
|
|
32
|
+
_invalid: {
|
|
33
|
+
borderColor: string;
|
|
34
|
+
bg: string;
|
|
35
|
+
"> span": {
|
|
36
|
+
bg: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
_disabled: {
|
|
40
|
+
borderColor: string;
|
|
41
|
+
bg: string;
|
|
42
|
+
_checked: {
|
|
43
|
+
opacity: number;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
_focus: {
|
|
47
|
+
outline: string;
|
|
48
|
+
outlineColor: string;
|
|
49
|
+
outlineOffset: string;
|
|
50
|
+
zIndex: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
label: {
|
|
54
|
+
fontSize: number;
|
|
55
|
+
marginLeft: string;
|
|
56
|
+
};
|
|
57
|
+
thumb: {
|
|
58
|
+
_disabled: {
|
|
59
|
+
bg: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
defaultProps: {
|
|
64
|
+
colorScheme: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export default _default;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* Chakra Number Value | Chakra Name value | DS Variable
|
|
24
24
|
* ------------------- | ----------------- | -----------------
|
|
25
|
+
* 0.5 | xxxs | --nypl-space-xxxs
|
|
25
26
|
* 1 | xxs | --nypl-space-xxs
|
|
26
27
|
* 2 | xs | --nypl-space-xs
|
|
27
28
|
* 4 | s | --nypl-space-s
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
export declare const spacing: {
|
|
35
36
|
px: string;
|
|
36
37
|
0: string;
|
|
38
|
+
xxxs: string;
|
|
37
39
|
0.5: string;
|
|
38
40
|
xxs: string;
|
|
39
41
|
1: string;
|
package/package.json
CHANGED
|
@@ -22,8 +22,7 @@ import { getCategory } from "../../utils/componentCategories";
|
|
|
22
22
|
parameters={{
|
|
23
23
|
design: {
|
|
24
24
|
type: "figma",
|
|
25
|
-
url:
|
|
26
|
-
"https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Master?node-id=10734%3A2520",
|
|
25
|
+
url: "https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Master?node-id=10734%3A2520",
|
|
27
26
|
},
|
|
28
27
|
jest: ["Accordion.test.tsx"],
|
|
29
28
|
}}
|
|
@@ -50,6 +50,15 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
50
50
|
/>
|
|
51
51
|
)
|
|
52
52
|
.toJSON();
|
|
53
|
+
const breadcrumbsLocationsVariant = renderer
|
|
54
|
+
.create(
|
|
55
|
+
<Breadcrumbs
|
|
56
|
+
breadcrumbsData={breadcrumbsData}
|
|
57
|
+
colorVariant={ColorVariants.Blogs}
|
|
58
|
+
id="breadcrumbs-test"
|
|
59
|
+
/>
|
|
60
|
+
)
|
|
61
|
+
.toJSON();
|
|
53
62
|
const breadcrumbsAdditionalStyles = renderer
|
|
54
63
|
.create(
|
|
55
64
|
<Breadcrumbs
|
|
@@ -65,6 +74,7 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
65
74
|
expect(breadcrumbsSnapshot).toMatchSnapshot();
|
|
66
75
|
expect(breadcrumbsVariantColor).toMatchSnapshot();
|
|
67
76
|
expect(breadcrumbsBlogsVariant).toMatchSnapshot();
|
|
77
|
+
expect(breadcrumbsLocationsVariant).toMatchSnapshot();
|
|
68
78
|
expect(breadcrumbsAdditionalStyles).toMatchSnapshot();
|
|
69
79
|
});
|
|
70
80
|
});
|
|
@@ -298,6 +298,105 @@ exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 3`] = `
|
|
|
298
298
|
`;
|
|
299
299
|
|
|
300
300
|
exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 4`] = `
|
|
301
|
+
<nav
|
|
302
|
+
aria-label="breadcrumb"
|
|
303
|
+
className="chakra-breadcrumb css-0"
|
|
304
|
+
id="breadcrumbs-test"
|
|
305
|
+
>
|
|
306
|
+
<ol
|
|
307
|
+
className="chakra-breadcrumb__list css-0"
|
|
308
|
+
>
|
|
309
|
+
<li
|
|
310
|
+
className="chakra-breadcrumb__list-item css-18biwo"
|
|
311
|
+
>
|
|
312
|
+
<a
|
|
313
|
+
className="chakra-breadcrumb__link css-0"
|
|
314
|
+
href="#string1"
|
|
315
|
+
>
|
|
316
|
+
<span
|
|
317
|
+
className="breadcrumb-label"
|
|
318
|
+
>
|
|
319
|
+
string1
|
|
320
|
+
</span>
|
|
321
|
+
</a>
|
|
322
|
+
<span
|
|
323
|
+
className="css-t4q1nq"
|
|
324
|
+
role="presentation"
|
|
325
|
+
>
|
|
326
|
+
/
|
|
327
|
+
</span>
|
|
328
|
+
</li>
|
|
329
|
+
<li
|
|
330
|
+
className="chakra-breadcrumb__list-item css-18biwo"
|
|
331
|
+
>
|
|
332
|
+
<a
|
|
333
|
+
className="chakra-breadcrumb__link css-0"
|
|
334
|
+
href="#string2"
|
|
335
|
+
>
|
|
336
|
+
<svg
|
|
337
|
+
aria-hidden={true}
|
|
338
|
+
className="chakra-icon breadcrumbs-icon css-onkibi"
|
|
339
|
+
focusable={false}
|
|
340
|
+
id="breadcrumbs-test__backarrow"
|
|
341
|
+
role="img"
|
|
342
|
+
title="arrow icon"
|
|
343
|
+
viewBox="0 0 24 24"
|
|
344
|
+
>
|
|
345
|
+
<g
|
|
346
|
+
stroke="currentColor"
|
|
347
|
+
strokeWidth="1.5"
|
|
348
|
+
>
|
|
349
|
+
<path
|
|
350
|
+
d="M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"
|
|
351
|
+
fill="none"
|
|
352
|
+
strokeLinecap="round"
|
|
353
|
+
/>
|
|
354
|
+
<path
|
|
355
|
+
d="M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"
|
|
356
|
+
fill="currentColor"
|
|
357
|
+
strokeLinecap="round"
|
|
358
|
+
/>
|
|
359
|
+
<circle
|
|
360
|
+
cx="12"
|
|
361
|
+
cy="12"
|
|
362
|
+
fill="none"
|
|
363
|
+
r="11.25"
|
|
364
|
+
strokeMiterlimit="10"
|
|
365
|
+
/>
|
|
366
|
+
</g>
|
|
367
|
+
</svg>
|
|
368
|
+
<span
|
|
369
|
+
className="breadcrumb-label"
|
|
370
|
+
>
|
|
371
|
+
string2
|
|
372
|
+
</span>
|
|
373
|
+
</a>
|
|
374
|
+
<span
|
|
375
|
+
className="css-t4q1nq"
|
|
376
|
+
role="presentation"
|
|
377
|
+
>
|
|
378
|
+
/
|
|
379
|
+
</span>
|
|
380
|
+
</li>
|
|
381
|
+
<li
|
|
382
|
+
className="chakra-breadcrumb__list-item css-18biwo"
|
|
383
|
+
>
|
|
384
|
+
<span
|
|
385
|
+
aria-current="page"
|
|
386
|
+
className="chakra-breadcrumb__link css-0"
|
|
387
|
+
>
|
|
388
|
+
<span
|
|
389
|
+
className="breadcrumb-label"
|
|
390
|
+
>
|
|
391
|
+
string3
|
|
392
|
+
</span>
|
|
393
|
+
</span>
|
|
394
|
+
</li>
|
|
395
|
+
</ol>
|
|
396
|
+
</nav>
|
|
397
|
+
`;
|
|
398
|
+
|
|
399
|
+
exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 5`] = `
|
|
301
400
|
<nav
|
|
302
401
|
aria-label="breadcrumb"
|
|
303
402
|
className="chakra-breadcrumb css-1f2fw9u"
|
|
@@ -31,8 +31,7 @@ import DSProvider from "../../theme/provider";
|
|
|
31
31
|
parameters={{
|
|
32
32
|
design: {
|
|
33
33
|
type: "figma",
|
|
34
|
-
url:
|
|
35
|
-
"https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=36835%3A25747",
|
|
34
|
+
url: "https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=36835%3A25747",
|
|
36
35
|
},
|
|
37
36
|
}}
|
|
38
37
|
argTypes={{
|
|
@@ -49,7 +48,7 @@ import DSProvider from "../../theme/provider";
|
|
|
49
48
|
| Component Version | DS Version |
|
|
50
49
|
| ----------------- | ---------- |
|
|
51
50
|
| Added | `0.24.0` |
|
|
52
|
-
| Latest | `0.25.
|
|
51
|
+
| Latest | `0.25.8` |
|
|
53
52
|
|
|
54
53
|
<Description of={Card} />
|
|
55
54
|
|
|
@@ -221,6 +220,44 @@ prop to override the default width.
|
|
|
221
220
|
<Canvas>
|
|
222
221
|
<Story name="Card Image Size">
|
|
223
222
|
<SimpleGrid columns={1}>
|
|
223
|
+
<Card
|
|
224
|
+
center
|
|
225
|
+
imageSrc="https://placeimg.com/400/200/animals"
|
|
226
|
+
imageAlt="Alt text"
|
|
227
|
+
imageAspectRatio={ImageRatios.Square}
|
|
228
|
+
imageSize={ImageSizes.ExtraExtraSmall}
|
|
229
|
+
>
|
|
230
|
+
<CardHeading level={HeadingLevels.Three} id="column-heading1">
|
|
231
|
+
Extra Extra Small Image
|
|
232
|
+
</CardHeading>
|
|
233
|
+
<CardHeading level={HeadingLevels.Four} id="column-heading2">
|
|
234
|
+
Max-Width: 64px
|
|
235
|
+
</CardHeading>
|
|
236
|
+
<CardContent>
|
|
237
|
+
Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
|
|
238
|
+
libero, a pharetra augue.
|
|
239
|
+
</CardContent>
|
|
240
|
+
</Card>
|
|
241
|
+
<HorizontalRule />
|
|
242
|
+
<Card
|
|
243
|
+
center
|
|
244
|
+
imageSrc="https://placeimg.com/400/200/animals"
|
|
245
|
+
imageAlt="Alt text"
|
|
246
|
+
imageAspectRatio={ImageRatios.Square}
|
|
247
|
+
imageSize={ImageSizes.ExtraSmall}
|
|
248
|
+
>
|
|
249
|
+
<CardHeading level={HeadingLevels.Three} id="column-heading1">
|
|
250
|
+
Extra Small Image
|
|
251
|
+
</CardHeading>
|
|
252
|
+
<CardHeading level={HeadingLevels.Four} id="column-heading2">
|
|
253
|
+
Max-Width: 96px
|
|
254
|
+
</CardHeading>
|
|
255
|
+
<CardContent>
|
|
256
|
+
Vestibulum id ligula porta felis euismod semper. Nulla vitae elit
|
|
257
|
+
libero, a pharetra augue.
|
|
258
|
+
</CardContent>
|
|
259
|
+
</Card>
|
|
260
|
+
<HorizontalRule />
|
|
224
261
|
<Card
|
|
225
262
|
center
|
|
226
263
|
imageSrc="https://placeimg.com/400/200/animals"
|
|
@@ -306,7 +343,40 @@ prop to override the default width.
|
|
|
306
343
|
<SimpleGrid columns={1}>
|
|
307
344
|
<Card
|
|
308
345
|
layout={CardLayouts.Row}
|
|
309
|
-
|
|
346
|
+
imageSrc="https://placeimg.com/400/200/animals"
|
|
347
|
+
imageAlt="Alt text"
|
|
348
|
+
imageAspectRatio={ImageRatios.TwoByOne}
|
|
349
|
+
imageSize={ImageSizes.ExtraExtraSmall}
|
|
350
|
+
>
|
|
351
|
+
<CardHeading level={HeadingLevels.Three} id="row2-heading1">
|
|
352
|
+
Extra Extra Small Image
|
|
353
|
+
</CardHeading>
|
|
354
|
+
<CardHeading level={HeadingLevels.Four} id="row2-heading2">
|
|
355
|
+
Max-Width: 64px
|
|
356
|
+
</CardHeading>
|
|
357
|
+
<CardContent>
|
|
358
|
+
Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
|
|
359
|
+
</CardContent>
|
|
360
|
+
</Card>
|
|
361
|
+
<Card
|
|
362
|
+
layout={CardLayouts.Row}
|
|
363
|
+
imageSrc="https://placeimg.com/400/200/animals"
|
|
364
|
+
imageAlt="Alt text"
|
|
365
|
+
imageAspectRatio={ImageRatios.TwoByOne}
|
|
366
|
+
imageSize={ImageSizes.ExtraSmall}
|
|
367
|
+
>
|
|
368
|
+
<CardHeading level={HeadingLevels.Three} id="row2-heading1">
|
|
369
|
+
Extra Small Image
|
|
370
|
+
</CardHeading>
|
|
371
|
+
<CardHeading level={HeadingLevels.Four} id="row2-heading2">
|
|
372
|
+
Max-Width: 96px
|
|
373
|
+
</CardHeading>
|
|
374
|
+
<CardContent>
|
|
375
|
+
Praesent commodo cursus magna, vel scelerisque nisl consectetur et.
|
|
376
|
+
</CardContent>
|
|
377
|
+
</Card>
|
|
378
|
+
<Card
|
|
379
|
+
layout={CardLayouts.Row}
|
|
310
380
|
imageSrc="https://placeimg.com/400/200/animals"
|
|
311
381
|
imageAlt="Alt text"
|
|
312
382
|
imageAspectRatio={ImageRatios.TwoByOne}
|
|
@@ -324,7 +394,6 @@ prop to override the default width.
|
|
|
324
394
|
</Card>
|
|
325
395
|
<Card
|
|
326
396
|
layout={CardLayouts.Row}
|
|
327
|
-
center
|
|
328
397
|
imageSrc="https://placeimg.com/410/210/animals"
|
|
329
398
|
imageAlt="Alt text"
|
|
330
399
|
imageAspectRatio={ImageRatios.TwoByOne}
|
|
@@ -343,7 +412,6 @@ prop to override the default width.
|
|
|
343
412
|
</Card>
|
|
344
413
|
<Card
|
|
345
414
|
layout={CardLayouts.Row}
|
|
346
|
-
center
|
|
347
415
|
imageSrc="https://placeimg.com/400/250/animals"
|
|
348
416
|
imageAlt="Alt text"
|
|
349
417
|
imageAspectRatio={ImageRatios.TwoByOne}
|
|
@@ -363,7 +431,6 @@ prop to override the default width.
|
|
|
363
431
|
</Card>
|
|
364
432
|
<Card
|
|
365
433
|
layout={CardLayouts.Row}
|
|
366
|
-
center
|
|
367
434
|
imageSrc="https://placeimg.com/450/250/animals"
|
|
368
435
|
imageAlt="Alt text"
|
|
369
436
|
imageAspectRatio={ImageRatios.TwoByOne}
|
|
@@ -91,14 +91,15 @@ function CardImage(props: React.ComponentProps<"img"> & CardImageProps) {
|
|
|
91
91
|
layout,
|
|
92
92
|
});
|
|
93
93
|
return (
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
94
|
+
<Box __css={styles}>
|
|
95
|
+
<Image
|
|
96
|
+
alt={alt}
|
|
97
|
+
component={component}
|
|
98
|
+
imageAspectRatio={imageAspectRatio}
|
|
99
|
+
imageSize={imageSize}
|
|
100
|
+
src={src}
|
|
101
|
+
/>
|
|
102
|
+
</Box>
|
|
102
103
|
);
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -6,16 +6,20 @@ exports[`Card Renders the UI snapshot correctly 1`] = `
|
|
|
6
6
|
id="regularCard"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
className="
|
|
9
|
+
className="css-0"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
|
-
className="the-
|
|
12
|
+
className="the-wrap css-0"
|
|
13
13
|
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
<div
|
|
15
|
+
className="the-crop css-0"
|
|
16
|
+
>
|
|
17
|
+
<img
|
|
18
|
+
alt="Alt text"
|
|
19
|
+
className="css-0"
|
|
20
|
+
src="https://placeimg.com/400/200/arch"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
19
23
|
</div>
|
|
20
24
|
</div>
|
|
21
25
|
<div
|
|
@@ -55,16 +59,20 @@ exports[`Card Renders the UI snapshot correctly 2`] = `
|
|
|
55
59
|
id="cardWithExtendedStyles"
|
|
56
60
|
>
|
|
57
61
|
<div
|
|
58
|
-
className="
|
|
62
|
+
className="css-0"
|
|
59
63
|
>
|
|
60
64
|
<div
|
|
61
|
-
className="the-
|
|
65
|
+
className="the-wrap css-0"
|
|
62
66
|
>
|
|
63
|
-
<
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
<div
|
|
68
|
+
className="the-crop css-0"
|
|
69
|
+
>
|
|
70
|
+
<img
|
|
71
|
+
alt="Alt text"
|
|
72
|
+
className="css-0"
|
|
73
|
+
src="https://placeimg.com/300/400/arch"
|
|
74
|
+
/>
|
|
75
|
+
</div>
|
|
68
76
|
</div>
|
|
69
77
|
</div>
|
|
70
78
|
<div
|
|
@@ -96,6 +104,8 @@ exports[`Card Renders the UI snapshot correctly 2`] = `
|
|
|
96
104
|
className="css-0"
|
|
97
105
|
href="online"
|
|
98
106
|
id="link-online"
|
|
107
|
+
rel={null}
|
|
108
|
+
target={null}
|
|
99
109
|
>
|
|
100
110
|
Read Online
|
|
101
111
|
</a>
|
|
@@ -103,6 +113,8 @@ exports[`Card Renders the UI snapshot correctly 2`] = `
|
|
|
103
113
|
className="css-0"
|
|
104
114
|
href="#url"
|
|
105
115
|
id="link-icon"
|
|
116
|
+
rel={null}
|
|
117
|
+
target={null}
|
|
106
118
|
>
|
|
107
119
|
<svg
|
|
108
120
|
aria-hidden={true}
|
|
@@ -149,16 +161,20 @@ exports[`Card Renders the UI snapshot correctly 3`] = `
|
|
|
149
161
|
id="cardWithNoCTAs"
|
|
150
162
|
>
|
|
151
163
|
<div
|
|
152
|
-
className="
|
|
164
|
+
className="css-0"
|
|
153
165
|
>
|
|
154
166
|
<div
|
|
155
|
-
className="the-
|
|
167
|
+
className="the-wrap css-0"
|
|
156
168
|
>
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
169
|
+
<div
|
|
170
|
+
className="the-crop css-0"
|
|
171
|
+
>
|
|
172
|
+
<img
|
|
173
|
+
alt="Alt text"
|
|
174
|
+
className="css-0"
|
|
175
|
+
src="https://placeimg.com/300/400/arch"
|
|
176
|
+
/>
|
|
177
|
+
</div>
|
|
162
178
|
</div>
|
|
163
179
|
</div>
|
|
164
180
|
<div
|
|
@@ -193,16 +209,20 @@ exports[`Card Renders the UI snapshot correctly 4`] = `
|
|
|
193
209
|
id="cardWithNoContent"
|
|
194
210
|
>
|
|
195
211
|
<div
|
|
196
|
-
className="
|
|
212
|
+
className="css-0"
|
|
197
213
|
>
|
|
198
214
|
<div
|
|
199
|
-
className="the-
|
|
215
|
+
className="the-wrap css-0"
|
|
200
216
|
>
|
|
201
|
-
<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
217
|
+
<div
|
|
218
|
+
className="the-crop css-0"
|
|
219
|
+
>
|
|
220
|
+
<img
|
|
221
|
+
alt="Alt text"
|
|
222
|
+
className="css-0"
|
|
223
|
+
src="https://placeimg.com/300/400/arch"
|
|
224
|
+
/>
|
|
225
|
+
</div>
|
|
206
226
|
</div>
|
|
207
227
|
</div>
|
|
208
228
|
<div
|
|
@@ -226,6 +246,8 @@ exports[`Card Renders the UI snapshot correctly 4`] = `
|
|
|
226
246
|
className="css-0"
|
|
227
247
|
href="online"
|
|
228
248
|
id="link-online"
|
|
249
|
+
rel={null}
|
|
250
|
+
target={null}
|
|
229
251
|
>
|
|
230
252
|
Read Online
|
|
231
253
|
</a>
|
|
@@ -233,6 +255,8 @@ exports[`Card Renders the UI snapshot correctly 4`] = `
|
|
|
233
255
|
className="css-0"
|
|
234
256
|
href="#url"
|
|
235
257
|
id="link-icon"
|
|
258
|
+
rel={null}
|
|
259
|
+
target={null}
|
|
236
260
|
>
|
|
237
261
|
<svg
|
|
238
262
|
aria-hidden={true}
|
|
@@ -304,6 +328,8 @@ exports[`Card Renders the UI snapshot correctly 5`] = `
|
|
|
304
328
|
className="css-0"
|
|
305
329
|
href="online"
|
|
306
330
|
id="link-online"
|
|
331
|
+
rel={null}
|
|
332
|
+
target={null}
|
|
307
333
|
>
|
|
308
334
|
Read Online
|
|
309
335
|
</a>
|
|
@@ -311,6 +337,8 @@ exports[`Card Renders the UI snapshot correctly 5`] = `
|
|
|
311
337
|
className="css-0"
|
|
312
338
|
href="#url"
|
|
313
339
|
id="link-icon"
|
|
340
|
+
rel={null}
|
|
341
|
+
target={null}
|
|
314
342
|
>
|
|
315
343
|
<svg
|
|
316
344
|
aria-hidden={true}
|
|
@@ -360,16 +388,20 @@ exports[`Card Renders the UI snapshot correctly 6`] = `
|
|
|
360
388
|
id="fullclick"
|
|
361
389
|
>
|
|
362
390
|
<div
|
|
363
|
-
className="
|
|
391
|
+
className="css-0"
|
|
364
392
|
>
|
|
365
393
|
<div
|
|
366
|
-
className="the-
|
|
394
|
+
className="the-wrap css-0"
|
|
367
395
|
>
|
|
368
|
-
<
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
396
|
+
<div
|
|
397
|
+
className="the-crop css-0"
|
|
398
|
+
>
|
|
399
|
+
<img
|
|
400
|
+
alt="Alt text"
|
|
401
|
+
className="css-0"
|
|
402
|
+
src="https://placeimg.com/400/200/arch"
|
|
403
|
+
/>
|
|
404
|
+
</div>
|
|
373
405
|
</div>
|
|
374
406
|
</div>
|
|
375
407
|
<div
|