@lumx/react 3.1.5 → 3.2.1-alpha.0
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/_internal/types.d.ts +16 -5
- package/index.d.ts +45 -4
- package/index.js +632 -423
- package/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/alert-dialog/AlertDialog.stories.tsx +96 -165
- package/src/components/alert-dialog/AlertDialog.test.tsx +15 -23
- package/src/components/avatar/Avatar.stories.tsx +91 -62
- package/src/components/avatar/Avatar.test.tsx +9 -24
- package/src/components/badge/Badge.stories.tsx +63 -38
- package/src/components/button/Button.stories.tsx +147 -139
- package/src/components/button/IconButton.stories.tsx +45 -0
- package/src/components/checkbox/Checkbox.stories.tsx +37 -30
- package/src/components/chip/Chip.stories.tsx +77 -15
- package/src/components/comment-block/CommentBlock.stories.tsx +90 -25
- package/src/components/comment-block/CommentBlock.test.tsx +12 -17
- package/src/components/date-picker/DatePickerField.stories.tsx +52 -83
- package/src/components/dialog/Dialog.stories.tsx +131 -293
- package/src/components/dialog/Dialog.test.tsx +0 -32
- package/src/components/dropdown/Dropdown.stories.tsx +1 -186
- package/src/components/flag/Flag.stories.tsx +33 -18
- package/src/components/flag/Flag.test.tsx +1 -8
- package/src/components/flex-box/FlexBox.stories.tsx +151 -238
- package/src/components/flex-box/FlexBox.test.tsx +9 -49
- package/src/components/generic-block/GenericBlock.stories.jsx +1 -1
- package/src/components/grid-column/GridColumn.stories.tsx +46 -0
- package/src/components/heading/Heading.stories.tsx +57 -95
- package/src/components/icon/Icon.stories.tsx +67 -70
- package/src/components/image-block/ImageBlock.stories.tsx +103 -47
- package/src/components/image-block/ImageBlock.test.tsx +12 -17
- package/src/components/inline-list/InlineList.stories.tsx +45 -29
- package/src/components/input-helper/InputHelper.stories.tsx +31 -25
- package/src/components/input-label/InputLabel.stories.tsx +33 -10
- package/src/components/lightbox/Lightbox.stories.tsx +39 -77
- package/src/components/lightbox/Lightbox.test.tsx +12 -17
- package/src/components/link/Link.stories.tsx +98 -128
- package/src/components/link-preview/LinkPreview.stories.tsx +48 -75
- package/src/components/list/List.stories.tsx +59 -84
- package/src/components/list/List.test.tsx +8 -17
- package/src/components/list/ListDivider.stories.tsx +9 -4
- package/src/components/list/ListDivider.test.tsx +12 -17
- package/src/components/list/ListItem.stories.tsx +97 -59
- package/src/components/list/ListItem.test.tsx +12 -17
- package/src/components/list/ListSubheader.stories.tsx +8 -5
- package/src/components/list/ListSubheader.test.tsx +12 -18
- package/src/components/message/Message.stories.tsx +51 -22
- package/src/components/mosaic/Mosaic.stories.tsx +78 -74
- package/src/components/mosaic/Mosaic.test.tsx +0 -31
- package/src/components/navigation/Navigation.stories.tsx +67 -0
- package/src/components/navigation/Navigation.test.tsx +58 -0
- package/src/components/navigation/Navigation.tsx +62 -0
- package/src/components/navigation/NavigationItem.test.tsx +37 -0
- package/src/components/navigation/NavigationItem.tsx +89 -0
- package/src/components/navigation/NavigationSection.test.tsx +126 -0
- package/src/components/navigation/NavigationSection.tsx +109 -0
- package/src/components/navigation/context.tsx +6 -0
- package/src/components/navigation/index.ts +1 -0
- package/src/components/notification/Notifications.stories.tsx +52 -47
- package/src/components/popover/Popover.stories.tsx +68 -201
- package/src/components/popover/Popover.tsx +7 -9
- package/src/components/popover-dialog/PopoverDialog.stories.tsx +26 -65
- package/src/components/post-block/PostBlock.test.tsx +12 -17
- package/src/components/progress/ProgressCircular.stories.tsx +24 -12
- package/src/components/progress/ProgressLinear.stories.tsx +6 -2
- package/src/components/radio-button/RadioButton.stories.tsx +35 -24
- package/src/components/select/Select.stories.tsx +19 -23
- package/src/components/select/SelectMultiple.stories.tsx +105 -2
- package/src/components/select/WithSelectContext.tsx +10 -4
- package/src/components/skeleton/SkeletonCircle.stories.tsx +37 -21
- package/src/components/skeleton/SkeletonCircle.test.tsx +12 -17
- package/src/components/skeleton/SkeletonRectangle.stories.tsx +74 -99
- package/src/components/skeleton/SkeletonRectangle.test.tsx +12 -17
- package/src/components/skeleton/SkeletonTypography.test.tsx +12 -17
- package/src/components/slider/Slider.stories.tsx +41 -25
- package/src/components/slider/Slider.test.tsx +12 -18
- package/src/components/slideshow/Slideshow.stories.tsx +31 -61
- package/src/components/slideshow/Slideshow.test.tsx +15 -23
- package/src/components/slideshow/SlideshowControls.stories.tsx +4 -6
- package/src/components/switch/Switch.stories.tsx +35 -32
- package/src/components/table/Table.test.tsx +12 -17
- package/src/components/tabs/Tabs.stories.tsx +4 -3
- package/src/components/text/Text.stories.tsx +130 -0
- package/src/components/text-field/TextField.stories.tsx +114 -148
- package/src/components/thumbnail/Thumbnail.stories.tsx +106 -255
- package/src/components/thumbnail/Thumbnail.test.tsx +12 -35
- package/src/components/tooltip/Tooltip.stories.tsx +51 -136
- package/src/components/user-block/UserBlock.stories.tsx +67 -56
- package/src/components/user-block/UserBlock.test.tsx +1 -5
- package/src/hooks/useFocusTrap.ts +2 -2
- package/src/index.ts +1 -0
- package/src/stories/controls/color.ts +6 -0
- package/src/stories/controls/element.ts +6 -0
- package/src/stories/controls/focusPoint.ts +1 -0
- package/src/stories/controls/icons.ts +6 -0
- package/src/stories/{knobs → controls}/image.ts +6 -16
- package/src/stories/controls/selectArgType.ts +4 -0
- package/src/stories/controls/theme.ts +3 -0
- package/src/stories/controls/typography.ts +5 -0
- package/src/stories/controls/withUndefined.ts +1 -0
- package/src/stories/decorators/withChromaticForceScreenSize.tsx +8 -0
- package/src/stories/decorators/withCombinations.tsx +99 -0
- package/src/stories/decorators/withNestedProps.tsx +23 -0
- package/src/stories/{withResizableBox.tsx → decorators/withResizableBox.tsx} +6 -10
- package/src/stories/decorators/withValueOnChange.tsx +18 -0
- package/src/stories/decorators/withWrapper.tsx +19 -0
- package/src/stories/utils/CustomLink.tsx +8 -2
- package/src/stories/{knobs → utils}/lorem.ts +9 -9
- package/src/testing/utils/commonTestsSuiteRTL.ts +2 -3
- package/src/testing/utils/index.ts +0 -2
- package/src/untypped-modules.d.ts +0 -2
- package/src/utils/MaterialThemeSwitcher/MaterialThemeSwitcher.tsx +1 -1
- package/src/utils/ThemeContext.ts +4 -0
- package/src/utils/forwardRefPolymorphic.ts +9 -0
- package/src/utils/type.ts +28 -4
- package/src/components/alert-dialog/__snapshots__/AlertDialog.test.tsx.snap +0 -558
- package/src/components/avatar/__snapshots__/Avatar.test.tsx.snap +0 -681
- package/src/components/comment-block/__snapshots__/CommentBlock.test.tsx.snap +0 -92
- package/src/components/dialog/__snapshots__/Dialog.test.tsx.snap +0 -1133
- package/src/components/expansion-panel/ExpansionPanel.stories.tsx +0 -65
- package/src/components/flag/__snapshots__/Flag.test.tsx.snap +0 -133
- package/src/components/flex-box/__snapshots__/FlexBox.test.tsx.snap +0 -492
- package/src/components/grid-column/GridColumn.stories.jsx +0 -56
- package/src/components/image-block/__snapshots__/ImageBlock.test.tsx.snap +0 -64
- package/src/components/lightbox/__snapshots__/Lightbox.test.tsx.snap +0 -194
- package/src/components/list/__snapshots__/List.test.tsx.snap +0 -360
- package/src/components/list/__snapshots__/ListDivider.test.tsx.snap +0 -7
- package/src/components/list/__snapshots__/ListItem.test.tsx.snap +0 -160
- package/src/components/list/__snapshots__/ListSubheader.test.tsx.snap +0 -9
- package/src/components/mosaic/__snapshots__/Mosaic.test.tsx.snap +0 -357
- package/src/components/post-block/__snapshots__/PostBlock.test.tsx.snap +0 -139
- package/src/components/skeleton/__snapshots__/SkeletonCircle.test.tsx.snap +0 -54
- package/src/components/skeleton/__snapshots__/SkeletonRectangle.test.tsx.snap +0 -177
- package/src/components/skeleton/__snapshots__/SkeletonTypography.test.tsx.snap +0 -174
- package/src/components/slider/__snapshots__/Slider.test.tsx.snap +0 -122
- package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +0 -157
- package/src/components/table/__snapshots__/Table.test.tsx.snap +0 -263
- package/src/components/text/Text.stories.jsx +0 -75
- package/src/components/thumbnail/__snapshots__/Thumbnail.test.tsx.snap +0 -130
- package/src/components/user-block/__snapshots__/UserBlock.test.tsx.snap +0 -362
- package/src/stories/chromaticForceScreenSize.tsx +0 -7
- package/src/stories/knobs/buttonKnob.ts +0 -9
- package/src/stories/knobs/emphasisKnob.ts +0 -8
- package/src/stories/knobs/enumKnob.ts +0 -14
- package/src/stories/knobs/focusKnob.ts +0 -3
- package/src/stories/knobs/sizeKnob.ts +0 -5
- package/src/stories/knobs/thumbnailsKnob.ts +0 -9
- package/src/testing/utils/itShouldRenderStories.tsx +0 -103
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { GridColumn } from '@lumx/react/components/grid-column/GridColumn';
|
|
4
|
-
|
|
5
|
-
import range from 'lodash/range';
|
|
6
|
-
import { Size } from '@lumx/react';
|
|
7
|
-
|
|
8
|
-
const genericBlockStyle = { border: '1px solid red', padding: '2px 8px' };
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
title: 'LumX components/grid-column/GridColumn',
|
|
12
|
-
argTypes: {
|
|
13
|
-
nbItems: {
|
|
14
|
-
control: 'number',
|
|
15
|
-
defaultValue: 6,
|
|
16
|
-
min: 0,
|
|
17
|
-
},
|
|
18
|
-
gap: {
|
|
19
|
-
control: 'select',
|
|
20
|
-
options: [Size.tiny, Size.regular, Size.big, Size.huge],
|
|
21
|
-
defaultValue: Size.regular,
|
|
22
|
-
},
|
|
23
|
-
itemMinWidth: {
|
|
24
|
-
control: 'number',
|
|
25
|
-
defaultValue: 200,
|
|
26
|
-
},
|
|
27
|
-
maxColumns: {
|
|
28
|
-
control: 'number',
|
|
29
|
-
defaultValue: 4,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
args: {
|
|
33
|
-
style: {
|
|
34
|
-
overflow: 'hidden',
|
|
35
|
-
resize: 'horizontal',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
const getItems = (nb) =>
|
|
41
|
-
range(nb).map((key) => (
|
|
42
|
-
// eslint-disable-next-line react/jsx-key
|
|
43
|
-
<div style={genericBlockStyle}>
|
|
44
|
-
<h2>Column {key}</h2>
|
|
45
|
-
<p>
|
|
46
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
|
|
47
|
-
dolore magna aliqua. Nulla pharetra diam sit amet nisl suscipit adipiscing bibendum. Iaculis at erat
|
|
48
|
-
pellentesque adipiscing commodo elit at imperdiet dui. Ultricies integer quis auctor elit sed vulputate.
|
|
49
|
-
Mattis enim ut tellus elementum. Ipsum suspendisse ultrices gravida dictum fusce ut..
|
|
50
|
-
</p>
|
|
51
|
-
</div>
|
|
52
|
-
));
|
|
53
|
-
|
|
54
|
-
const Template = ({ nbItems = 5, ...props }) => <GridColumn {...props}>{getItems(nbItems)}</GridColumn>;
|
|
55
|
-
|
|
56
|
-
export const Default = Template.bind({});
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<ImageBlock> Snapshots and structure should render story 'DefaultImageBlock' 1`] = `
|
|
4
|
-
<figure
|
|
5
|
-
className="lumx-image-block lumx-image-block--caption-position-below lumx-image-block--align-center lumx-image-block--theme-light"
|
|
6
|
-
>
|
|
7
|
-
<Thumbnail
|
|
8
|
-
align="center"
|
|
9
|
-
alt="Image alt text"
|
|
10
|
-
aspectRatio="square"
|
|
11
|
-
className="lumx-image-block__image"
|
|
12
|
-
fallback="M19,3A2,2 0 0,1 21,5V11H19V13H19L17,13V15H15V17H13V19H11V21H5C3.89,21 3,20.1 3,19V5A2,2 0 0,1 5,3H19M21,15V19A2,2 0 0,1 19,21H19L15,21V19H17V17H19V15H21M19,8.5A0.5,0.5 0 0,0 18.5,8H5.5A0.5,0.5 0 0,0 5,8.5V15.5A0.5,0.5 0 0,0 5.5,16H11V15H13V13H15V11H17V9H19V8.5Z"
|
|
13
|
-
focusPoint={
|
|
14
|
-
{
|
|
15
|
-
"x": 0,
|
|
16
|
-
"y": 0,
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
image="/demo-assets/landscape1.jpg"
|
|
20
|
-
loading="lazy"
|
|
21
|
-
onClick={false}
|
|
22
|
-
theme="light"
|
|
23
|
-
/>
|
|
24
|
-
<figcaption
|
|
25
|
-
className="lumx-image-block__wrapper"
|
|
26
|
-
>
|
|
27
|
-
<div
|
|
28
|
-
className="lumx-image-block__caption"
|
|
29
|
-
>
|
|
30
|
-
<span
|
|
31
|
-
className="lumx-image-block__title"
|
|
32
|
-
>
|
|
33
|
-
Hello world
|
|
34
|
-
</span>
|
|
35
|
-
|
|
36
|
-
<span
|
|
37
|
-
className="lumx-image-block__description"
|
|
38
|
-
>
|
|
39
|
-
My awesome description
|
|
40
|
-
</span>
|
|
41
|
-
</div>
|
|
42
|
-
<div
|
|
43
|
-
className="lumx-image-block__tags"
|
|
44
|
-
>
|
|
45
|
-
<ChipGroup
|
|
46
|
-
align="left"
|
|
47
|
-
>
|
|
48
|
-
<Chip
|
|
49
|
-
size="s"
|
|
50
|
-
theme="light"
|
|
51
|
-
>
|
|
52
|
-
Tag 1
|
|
53
|
-
</Chip>
|
|
54
|
-
<Chip
|
|
55
|
-
size="s"
|
|
56
|
-
theme="light"
|
|
57
|
-
>
|
|
58
|
-
Tag 2
|
|
59
|
-
</Chip>
|
|
60
|
-
</ChipGroup>
|
|
61
|
-
</div>
|
|
62
|
-
</figcaption>
|
|
63
|
-
</figure>
|
|
64
|
-
`;
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<Lightbox> Snapshots and structure should render story 'Default' 1`] = `
|
|
4
|
-
<Portal
|
|
5
|
-
containerInfo={<body />}
|
|
6
|
-
>
|
|
7
|
-
<div
|
|
8
|
-
aria-modal="true"
|
|
9
|
-
className="lumx-lightbox lumx-lightbox--is-shown"
|
|
10
|
-
style={
|
|
11
|
-
{
|
|
12
|
-
"zIndex": undefined,
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
>
|
|
16
|
-
<IconButton
|
|
17
|
-
className="lumx-lightbox__close"
|
|
18
|
-
color="light"
|
|
19
|
-
emphasis="low"
|
|
20
|
-
icon="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
|
|
21
|
-
label="Close"
|
|
22
|
-
onClick={[Function]}
|
|
23
|
-
size="m"
|
|
24
|
-
theme="light"
|
|
25
|
-
type="button"
|
|
26
|
-
/>
|
|
27
|
-
<ClickAwayProvider
|
|
28
|
-
callback={[Function]}
|
|
29
|
-
childrenRefs={
|
|
30
|
-
{
|
|
31
|
-
"current": [
|
|
32
|
-
{
|
|
33
|
-
"current": null,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
>
|
|
39
|
-
<div
|
|
40
|
-
className="lumx-lightbox__wrapper"
|
|
41
|
-
role="presentation"
|
|
42
|
-
>
|
|
43
|
-
<Slideshow
|
|
44
|
-
activeIndex={0}
|
|
45
|
-
autoPlay={true}
|
|
46
|
-
fillHeight={true}
|
|
47
|
-
groupBy={1}
|
|
48
|
-
interval={5000}
|
|
49
|
-
slideshowControlsProps={
|
|
50
|
-
{
|
|
51
|
-
"nextButtonProps": {
|
|
52
|
-
"label": "Next",
|
|
53
|
-
},
|
|
54
|
-
"previousButtonProps": {
|
|
55
|
-
"label": "Previous",
|
|
56
|
-
},
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
theme="dark"
|
|
60
|
-
>
|
|
61
|
-
<SlideshowItem
|
|
62
|
-
key="/demo-assets/portrait1.jpg"
|
|
63
|
-
>
|
|
64
|
-
<ImageBlock
|
|
65
|
-
align="center"
|
|
66
|
-
alt="Nice Image"
|
|
67
|
-
captionPosition="below"
|
|
68
|
-
description="What an image"
|
|
69
|
-
fillHeight={true}
|
|
70
|
-
image="/demo-assets/portrait1.jpg"
|
|
71
|
-
tags={
|
|
72
|
-
<ChipGroup
|
|
73
|
-
align="center"
|
|
74
|
-
>
|
|
75
|
-
<Chip
|
|
76
|
-
size="s"
|
|
77
|
-
theme="dark"
|
|
78
|
-
>
|
|
79
|
-
Tag 1
|
|
80
|
-
</Chip>
|
|
81
|
-
<Chip
|
|
82
|
-
size="s"
|
|
83
|
-
theme="dark"
|
|
84
|
-
>
|
|
85
|
-
Tag 2
|
|
86
|
-
</Chip>
|
|
87
|
-
</ChipGroup>
|
|
88
|
-
}
|
|
89
|
-
theme="dark"
|
|
90
|
-
title="Nice Image"
|
|
91
|
-
/>
|
|
92
|
-
</SlideshowItem>
|
|
93
|
-
<SlideshowItem
|
|
94
|
-
key="/demo-assets/portrait2.jpg"
|
|
95
|
-
>
|
|
96
|
-
<ImageBlock
|
|
97
|
-
align="center"
|
|
98
|
-
alt="Nice Image"
|
|
99
|
-
captionPosition="below"
|
|
100
|
-
description="What an image"
|
|
101
|
-
fillHeight={true}
|
|
102
|
-
image="/demo-assets/portrait2.jpg"
|
|
103
|
-
tags={
|
|
104
|
-
<ChipGroup
|
|
105
|
-
align="center"
|
|
106
|
-
>
|
|
107
|
-
<Chip
|
|
108
|
-
size="s"
|
|
109
|
-
theme="dark"
|
|
110
|
-
>
|
|
111
|
-
Tag 1
|
|
112
|
-
</Chip>
|
|
113
|
-
<Chip
|
|
114
|
-
size="s"
|
|
115
|
-
theme="dark"
|
|
116
|
-
>
|
|
117
|
-
Tag 2
|
|
118
|
-
</Chip>
|
|
119
|
-
</ChipGroup>
|
|
120
|
-
}
|
|
121
|
-
theme="dark"
|
|
122
|
-
title="Nice Image"
|
|
123
|
-
/>
|
|
124
|
-
</SlideshowItem>
|
|
125
|
-
<SlideshowItem
|
|
126
|
-
key="/demo-assets/landscape3.jpg"
|
|
127
|
-
>
|
|
128
|
-
<ImageBlock
|
|
129
|
-
align="center"
|
|
130
|
-
alt="Nice Image"
|
|
131
|
-
captionPosition="below"
|
|
132
|
-
description="What an image"
|
|
133
|
-
fillHeight={true}
|
|
134
|
-
image="/demo-assets/landscape3.jpg"
|
|
135
|
-
tags={
|
|
136
|
-
<ChipGroup
|
|
137
|
-
align="center"
|
|
138
|
-
>
|
|
139
|
-
<Chip
|
|
140
|
-
size="s"
|
|
141
|
-
theme="dark"
|
|
142
|
-
>
|
|
143
|
-
Tag 1
|
|
144
|
-
</Chip>
|
|
145
|
-
<Chip
|
|
146
|
-
size="s"
|
|
147
|
-
theme="dark"
|
|
148
|
-
>
|
|
149
|
-
Tag 2
|
|
150
|
-
</Chip>
|
|
151
|
-
</ChipGroup>
|
|
152
|
-
}
|
|
153
|
-
theme="dark"
|
|
154
|
-
title="Nice Image"
|
|
155
|
-
/>
|
|
156
|
-
</SlideshowItem>
|
|
157
|
-
<SlideshowItem
|
|
158
|
-
key="/demo-assets/landscape2.jpg"
|
|
159
|
-
>
|
|
160
|
-
<ImageBlock
|
|
161
|
-
align="center"
|
|
162
|
-
alt="Nice Image"
|
|
163
|
-
captionPosition="below"
|
|
164
|
-
description="What an image"
|
|
165
|
-
fillHeight={true}
|
|
166
|
-
image="/demo-assets/landscape2.jpg"
|
|
167
|
-
tags={
|
|
168
|
-
<ChipGroup
|
|
169
|
-
align="center"
|
|
170
|
-
>
|
|
171
|
-
<Chip
|
|
172
|
-
size="s"
|
|
173
|
-
theme="dark"
|
|
174
|
-
>
|
|
175
|
-
Tag 1
|
|
176
|
-
</Chip>
|
|
177
|
-
<Chip
|
|
178
|
-
size="s"
|
|
179
|
-
theme="dark"
|
|
180
|
-
>
|
|
181
|
-
Tag 2
|
|
182
|
-
</Chip>
|
|
183
|
-
</ChipGroup>
|
|
184
|
-
}
|
|
185
|
-
theme="dark"
|
|
186
|
-
title="Nice Image"
|
|
187
|
-
/>
|
|
188
|
-
</SlideshowItem>
|
|
189
|
-
</Slideshow>
|
|
190
|
-
</div>
|
|
191
|
-
</ClickAwayProvider>
|
|
192
|
-
</div>
|
|
193
|
-
</Portal>
|
|
194
|
-
`;
|
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`<List> Snapshots and structure should render story 'AsLink' 1`] = `
|
|
4
|
-
<ul
|
|
5
|
-
className="lumx-list lumx-list--item-padding-big"
|
|
6
|
-
tabIndex={-1}
|
|
7
|
-
>
|
|
8
|
-
<ListItem
|
|
9
|
-
before={
|
|
10
|
-
<Icon
|
|
11
|
-
icon="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z"
|
|
12
|
-
/>
|
|
13
|
-
}
|
|
14
|
-
className="lumx-color-background-dark-L6"
|
|
15
|
-
isHighlighted={false}
|
|
16
|
-
key=".0"
|
|
17
|
-
linkProps={
|
|
18
|
-
{
|
|
19
|
-
"href": "#",
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
linkRef={[Function]}
|
|
23
|
-
onFocus={[Function]}
|
|
24
|
-
onItemSelected={[Function]}
|
|
25
|
-
onMouseDown={[Function]}
|
|
26
|
-
onMouseUp={[Function]}
|
|
27
|
-
size="regular"
|
|
28
|
-
>
|
|
29
|
-
<span>
|
|
30
|
-
My first link
|
|
31
|
-
</span>
|
|
32
|
-
</ListItem>
|
|
33
|
-
<ListItem
|
|
34
|
-
after={
|
|
35
|
-
<Icon
|
|
36
|
-
icon="M14,3V5H17.59L7.76,14.83L9.17,16.24L19,6.41V10H21V3M19,19H5V5H12V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V12H19V19Z"
|
|
37
|
-
/>
|
|
38
|
-
}
|
|
39
|
-
className="lumx-color-background-dark-L6"
|
|
40
|
-
isHighlighted={false}
|
|
41
|
-
key=".1"
|
|
42
|
-
linkProps={
|
|
43
|
-
{
|
|
44
|
-
"href": "http://www.google.com",
|
|
45
|
-
"target": "_blank",
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
linkRef={[Function]}
|
|
49
|
-
onFocus={[Function]}
|
|
50
|
-
onItemSelected={[Function]}
|
|
51
|
-
onMouseDown={[Function]}
|
|
52
|
-
onMouseUp={[Function]}
|
|
53
|
-
size="regular"
|
|
54
|
-
>
|
|
55
|
-
<span>
|
|
56
|
-
Google
|
|
57
|
-
</span>
|
|
58
|
-
</ListItem>
|
|
59
|
-
</ul>
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
exports[`<List> Snapshots and structure should render story 'KeyboardNavigation' 1`] = `
|
|
63
|
-
<ul
|
|
64
|
-
className="lumx-list lumx-list--item-padding-big"
|
|
65
|
-
tabIndex={-1}
|
|
66
|
-
>
|
|
67
|
-
<ListItem
|
|
68
|
-
isHighlighted={false}
|
|
69
|
-
key=".0"
|
|
70
|
-
linkRef={[Function]}
|
|
71
|
-
onFocus={[Function]}
|
|
72
|
-
onItemSelected={[Function]}
|
|
73
|
-
onMouseDown={[Function]}
|
|
74
|
-
onMouseUp={[Function]}
|
|
75
|
-
size="regular"
|
|
76
|
-
>
|
|
77
|
-
Clickable item 1
|
|
78
|
-
</ListItem>
|
|
79
|
-
<ListDivider
|
|
80
|
-
key=".1"
|
|
81
|
-
/>
|
|
82
|
-
<ListItem
|
|
83
|
-
isHighlighted={false}
|
|
84
|
-
key=".2"
|
|
85
|
-
linkProps={
|
|
86
|
-
{
|
|
87
|
-
"href": "#",
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
linkRef={[Function]}
|
|
91
|
-
onFocus={[Function]}
|
|
92
|
-
onItemSelected={[Function]}
|
|
93
|
-
onMouseDown={[Function]}
|
|
94
|
-
onMouseUp={[Function]}
|
|
95
|
-
size="regular"
|
|
96
|
-
>
|
|
97
|
-
Link item 1
|
|
98
|
-
</ListItem>
|
|
99
|
-
<ListItem
|
|
100
|
-
key=".3..0"
|
|
101
|
-
size="regular"
|
|
102
|
-
>
|
|
103
|
-
Non clickable (=non navigable) item
|
|
104
|
-
</ListItem>
|
|
105
|
-
<ListSubheader
|
|
106
|
-
key=".3..1"
|
|
107
|
-
>
|
|
108
|
-
Header
|
|
109
|
-
</ListSubheader>
|
|
110
|
-
<ListItem
|
|
111
|
-
isHighlighted={false}
|
|
112
|
-
key=".3..2"
|
|
113
|
-
linkProps={
|
|
114
|
-
{
|
|
115
|
-
"href": "#",
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
linkRef={[Function]}
|
|
119
|
-
onFocus={[Function]}
|
|
120
|
-
onItemSelected={[Function]}
|
|
121
|
-
onMouseDown={[Function]}
|
|
122
|
-
onMouseUp={[Function]}
|
|
123
|
-
size="regular"
|
|
124
|
-
>
|
|
125
|
-
Link item 2
|
|
126
|
-
</ListItem>
|
|
127
|
-
<ListSubheader
|
|
128
|
-
key=".3..3"
|
|
129
|
-
>
|
|
130
|
-
Header
|
|
131
|
-
</ListSubheader>
|
|
132
|
-
<ListItem
|
|
133
|
-
isDisabled={true}
|
|
134
|
-
key=".4"
|
|
135
|
-
linkProps={
|
|
136
|
-
{
|
|
137
|
-
"href": "#",
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
size="regular"
|
|
141
|
-
>
|
|
142
|
-
Disabled link item
|
|
143
|
-
</ListItem>
|
|
144
|
-
<ListItem
|
|
145
|
-
isDisabled={true}
|
|
146
|
-
key=".5"
|
|
147
|
-
onItemSelected={[Function]}
|
|
148
|
-
size="regular"
|
|
149
|
-
>
|
|
150
|
-
Disabled button item
|
|
151
|
-
</ListItem>
|
|
152
|
-
<CustomListItem
|
|
153
|
-
key=".6"
|
|
154
|
-
/>
|
|
155
|
-
<ListItem
|
|
156
|
-
isHighlighted={false}
|
|
157
|
-
key=".7:$1"
|
|
158
|
-
linkProps={
|
|
159
|
-
{
|
|
160
|
-
"href": "#",
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
linkRef={[Function]}
|
|
164
|
-
onFocus={[Function]}
|
|
165
|
-
onItemSelected={[Function]}
|
|
166
|
-
onMouseDown={[Function]}
|
|
167
|
-
onMouseUp={[Function]}
|
|
168
|
-
size="regular"
|
|
169
|
-
>
|
|
170
|
-
Link item 4
|
|
171
|
-
</ListItem>
|
|
172
|
-
</ul>
|
|
173
|
-
`;
|
|
174
|
-
|
|
175
|
-
exports[`<List> Snapshots and structure should render story 'WithCustomChildren' 1`] = `
|
|
176
|
-
<ul
|
|
177
|
-
className="lumx-list"
|
|
178
|
-
tabIndex={-1}
|
|
179
|
-
>
|
|
180
|
-
<CustomListItem
|
|
181
|
-
key=".0"
|
|
182
|
-
/>
|
|
183
|
-
<CustomListItem
|
|
184
|
-
key=".1"
|
|
185
|
-
/>
|
|
186
|
-
<CustomListItem
|
|
187
|
-
key=".2"
|
|
188
|
-
/>
|
|
189
|
-
</ul>
|
|
190
|
-
`;
|
|
191
|
-
|
|
192
|
-
exports[`<List> Snapshots and structure should render story 'WithItemPadding' 1`] = `
|
|
193
|
-
[
|
|
194
|
-
<ul
|
|
195
|
-
className="lumx-list lumx-list--item-padding-big"
|
|
196
|
-
tabIndex={-1}
|
|
197
|
-
>
|
|
198
|
-
<ListItem
|
|
199
|
-
className="lumx-color-background-dark-L6"
|
|
200
|
-
isHighlighted={false}
|
|
201
|
-
key=".0"
|
|
202
|
-
linkProps={
|
|
203
|
-
{
|
|
204
|
-
"href": "#",
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
linkRef={[Function]}
|
|
208
|
-
onFocus={[Function]}
|
|
209
|
-
onItemSelected={[Function]}
|
|
210
|
-
onMouseDown={[Function]}
|
|
211
|
-
onMouseUp={[Function]}
|
|
212
|
-
size="big"
|
|
213
|
-
>
|
|
214
|
-
<div>
|
|
215
|
-
Two-line item
|
|
216
|
-
</div>
|
|
217
|
-
<div
|
|
218
|
-
className="lumx-color-font-dark-L2"
|
|
219
|
-
>
|
|
220
|
-
Secondary text
|
|
221
|
-
</div>
|
|
222
|
-
</ListItem>
|
|
223
|
-
<ListItem
|
|
224
|
-
className="lumx-color-background-dark-L6"
|
|
225
|
-
isHighlighted={false}
|
|
226
|
-
key=".1"
|
|
227
|
-
linkProps={
|
|
228
|
-
{
|
|
229
|
-
"href": "#",
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
linkRef={[Function]}
|
|
233
|
-
onFocus={[Function]}
|
|
234
|
-
onItemSelected={[Function]}
|
|
235
|
-
onMouseDown={[Function]}
|
|
236
|
-
onMouseUp={[Function]}
|
|
237
|
-
size="big"
|
|
238
|
-
>
|
|
239
|
-
<div>
|
|
240
|
-
Two-line item
|
|
241
|
-
</div>
|
|
242
|
-
<div
|
|
243
|
-
className="lumx-color-font-dark-L2"
|
|
244
|
-
>
|
|
245
|
-
Secondary text
|
|
246
|
-
</div>
|
|
247
|
-
</ListItem>
|
|
248
|
-
</ul>,
|
|
249
|
-
<ul
|
|
250
|
-
className="lumx-list lumx-list--item-padding-big"
|
|
251
|
-
tabIndex={-1}
|
|
252
|
-
>
|
|
253
|
-
<ListItem
|
|
254
|
-
className="lumx-color-background-dark-L6"
|
|
255
|
-
isHighlighted={false}
|
|
256
|
-
key=".0"
|
|
257
|
-
linkProps={
|
|
258
|
-
{
|
|
259
|
-
"href": "#",
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
linkRef={[Function]}
|
|
263
|
-
onFocus={[Function]}
|
|
264
|
-
onItemSelected={[Function]}
|
|
265
|
-
onMouseDown={[Function]}
|
|
266
|
-
onMouseUp={[Function]}
|
|
267
|
-
size="big"
|
|
268
|
-
>
|
|
269
|
-
<div>
|
|
270
|
-
Two-line item
|
|
271
|
-
</div>
|
|
272
|
-
<div
|
|
273
|
-
className="lumx-color-font-dark-L2"
|
|
274
|
-
>
|
|
275
|
-
Secondary text
|
|
276
|
-
</div>
|
|
277
|
-
</ListItem>
|
|
278
|
-
<ListItem
|
|
279
|
-
className="lumx-color-background-dark-L6"
|
|
280
|
-
isHighlighted={false}
|
|
281
|
-
key=".1"
|
|
282
|
-
linkProps={
|
|
283
|
-
{
|
|
284
|
-
"href": "#",
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
linkRef={[Function]}
|
|
288
|
-
onFocus={[Function]}
|
|
289
|
-
onItemSelected={[Function]}
|
|
290
|
-
onMouseDown={[Function]}
|
|
291
|
-
onMouseUp={[Function]}
|
|
292
|
-
size="big"
|
|
293
|
-
>
|
|
294
|
-
<div>
|
|
295
|
-
Two-line item
|
|
296
|
-
</div>
|
|
297
|
-
<div
|
|
298
|
-
className="lumx-color-font-dark-L2"
|
|
299
|
-
>
|
|
300
|
-
Secondary text
|
|
301
|
-
</div>
|
|
302
|
-
</ListItem>
|
|
303
|
-
</ul>,
|
|
304
|
-
<ul
|
|
305
|
-
className="lumx-list lumx-list--item-padding-huge"
|
|
306
|
-
tabIndex={-1}
|
|
307
|
-
>
|
|
308
|
-
<ListItem
|
|
309
|
-
className="lumx-color-background-dark-L6"
|
|
310
|
-
isHighlighted={false}
|
|
311
|
-
key=".0"
|
|
312
|
-
linkProps={
|
|
313
|
-
{
|
|
314
|
-
"href": "#",
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
linkRef={[Function]}
|
|
318
|
-
onFocus={[Function]}
|
|
319
|
-
onItemSelected={[Function]}
|
|
320
|
-
onMouseDown={[Function]}
|
|
321
|
-
onMouseUp={[Function]}
|
|
322
|
-
size="big"
|
|
323
|
-
>
|
|
324
|
-
<div>
|
|
325
|
-
Two-line item
|
|
326
|
-
</div>
|
|
327
|
-
<div
|
|
328
|
-
className="lumx-color-font-dark-L2"
|
|
329
|
-
>
|
|
330
|
-
Secondary text
|
|
331
|
-
</div>
|
|
332
|
-
</ListItem>
|
|
333
|
-
<ListItem
|
|
334
|
-
className="lumx-color-background-dark-L6"
|
|
335
|
-
isHighlighted={false}
|
|
336
|
-
key=".1"
|
|
337
|
-
linkProps={
|
|
338
|
-
{
|
|
339
|
-
"href": "#",
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
linkRef={[Function]}
|
|
343
|
-
onFocus={[Function]}
|
|
344
|
-
onItemSelected={[Function]}
|
|
345
|
-
onMouseDown={[Function]}
|
|
346
|
-
onMouseUp={[Function]}
|
|
347
|
-
size="big"
|
|
348
|
-
>
|
|
349
|
-
<div>
|
|
350
|
-
Two-line item
|
|
351
|
-
</div>
|
|
352
|
-
<div
|
|
353
|
-
className="lumx-color-font-dark-L2"
|
|
354
|
-
>
|
|
355
|
-
Secondary text
|
|
356
|
-
</div>
|
|
357
|
-
</ListItem>
|
|
358
|
-
</ul>,
|
|
359
|
-
]
|
|
360
|
-
`;
|