@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.
Files changed (147) hide show
  1. package/_internal/types.d.ts +16 -5
  2. package/index.d.ts +45 -4
  3. package/index.js +632 -423
  4. package/index.js.map +1 -1
  5. package/package.json +3 -3
  6. package/src/components/alert-dialog/AlertDialog.stories.tsx +96 -165
  7. package/src/components/alert-dialog/AlertDialog.test.tsx +15 -23
  8. package/src/components/avatar/Avatar.stories.tsx +91 -62
  9. package/src/components/avatar/Avatar.test.tsx +9 -24
  10. package/src/components/badge/Badge.stories.tsx +63 -38
  11. package/src/components/button/Button.stories.tsx +147 -139
  12. package/src/components/button/IconButton.stories.tsx +45 -0
  13. package/src/components/checkbox/Checkbox.stories.tsx +37 -30
  14. package/src/components/chip/Chip.stories.tsx +77 -15
  15. package/src/components/comment-block/CommentBlock.stories.tsx +90 -25
  16. package/src/components/comment-block/CommentBlock.test.tsx +12 -17
  17. package/src/components/date-picker/DatePickerField.stories.tsx +52 -83
  18. package/src/components/dialog/Dialog.stories.tsx +131 -293
  19. package/src/components/dialog/Dialog.test.tsx +0 -32
  20. package/src/components/dropdown/Dropdown.stories.tsx +1 -186
  21. package/src/components/flag/Flag.stories.tsx +33 -18
  22. package/src/components/flag/Flag.test.tsx +1 -8
  23. package/src/components/flex-box/FlexBox.stories.tsx +151 -238
  24. package/src/components/flex-box/FlexBox.test.tsx +9 -49
  25. package/src/components/generic-block/GenericBlock.stories.jsx +1 -1
  26. package/src/components/grid-column/GridColumn.stories.tsx +46 -0
  27. package/src/components/heading/Heading.stories.tsx +57 -95
  28. package/src/components/icon/Icon.stories.tsx +67 -70
  29. package/src/components/image-block/ImageBlock.stories.tsx +103 -47
  30. package/src/components/image-block/ImageBlock.test.tsx +12 -17
  31. package/src/components/inline-list/InlineList.stories.tsx +45 -29
  32. package/src/components/input-helper/InputHelper.stories.tsx +31 -25
  33. package/src/components/input-label/InputLabel.stories.tsx +33 -10
  34. package/src/components/lightbox/Lightbox.stories.tsx +39 -77
  35. package/src/components/lightbox/Lightbox.test.tsx +12 -17
  36. package/src/components/link/Link.stories.tsx +98 -128
  37. package/src/components/link-preview/LinkPreview.stories.tsx +48 -75
  38. package/src/components/list/List.stories.tsx +59 -84
  39. package/src/components/list/List.test.tsx +8 -17
  40. package/src/components/list/ListDivider.stories.tsx +9 -4
  41. package/src/components/list/ListDivider.test.tsx +12 -17
  42. package/src/components/list/ListItem.stories.tsx +97 -59
  43. package/src/components/list/ListItem.test.tsx +12 -17
  44. package/src/components/list/ListSubheader.stories.tsx +8 -5
  45. package/src/components/list/ListSubheader.test.tsx +12 -18
  46. package/src/components/message/Message.stories.tsx +51 -22
  47. package/src/components/mosaic/Mosaic.stories.tsx +78 -74
  48. package/src/components/mosaic/Mosaic.test.tsx +0 -31
  49. package/src/components/navigation/Navigation.stories.tsx +67 -0
  50. package/src/components/navigation/Navigation.test.tsx +58 -0
  51. package/src/components/navigation/Navigation.tsx +62 -0
  52. package/src/components/navigation/NavigationItem.test.tsx +37 -0
  53. package/src/components/navigation/NavigationItem.tsx +89 -0
  54. package/src/components/navigation/NavigationSection.test.tsx +126 -0
  55. package/src/components/navigation/NavigationSection.tsx +109 -0
  56. package/src/components/navigation/context.tsx +6 -0
  57. package/src/components/navigation/index.ts +1 -0
  58. package/src/components/notification/Notifications.stories.tsx +52 -47
  59. package/src/components/popover/Popover.stories.tsx +68 -201
  60. package/src/components/popover/Popover.tsx +7 -9
  61. package/src/components/popover-dialog/PopoverDialog.stories.tsx +26 -65
  62. package/src/components/post-block/PostBlock.test.tsx +12 -17
  63. package/src/components/progress/ProgressCircular.stories.tsx +24 -12
  64. package/src/components/progress/ProgressLinear.stories.tsx +6 -2
  65. package/src/components/radio-button/RadioButton.stories.tsx +35 -24
  66. package/src/components/select/Select.stories.tsx +19 -23
  67. package/src/components/select/SelectMultiple.stories.tsx +105 -2
  68. package/src/components/select/WithSelectContext.tsx +10 -4
  69. package/src/components/skeleton/SkeletonCircle.stories.tsx +37 -21
  70. package/src/components/skeleton/SkeletonCircle.test.tsx +12 -17
  71. package/src/components/skeleton/SkeletonRectangle.stories.tsx +74 -99
  72. package/src/components/skeleton/SkeletonRectangle.test.tsx +12 -17
  73. package/src/components/skeleton/SkeletonTypography.test.tsx +12 -17
  74. package/src/components/slider/Slider.stories.tsx +41 -25
  75. package/src/components/slider/Slider.test.tsx +12 -18
  76. package/src/components/slideshow/Slideshow.stories.tsx +31 -61
  77. package/src/components/slideshow/Slideshow.test.tsx +15 -23
  78. package/src/components/slideshow/SlideshowControls.stories.tsx +4 -6
  79. package/src/components/switch/Switch.stories.tsx +35 -32
  80. package/src/components/table/Table.test.tsx +12 -17
  81. package/src/components/tabs/Tabs.stories.tsx +4 -3
  82. package/src/components/text/Text.stories.tsx +130 -0
  83. package/src/components/text-field/TextField.stories.tsx +114 -148
  84. package/src/components/thumbnail/Thumbnail.stories.tsx +106 -255
  85. package/src/components/thumbnail/Thumbnail.test.tsx +12 -35
  86. package/src/components/tooltip/Tooltip.stories.tsx +51 -136
  87. package/src/components/user-block/UserBlock.stories.tsx +67 -56
  88. package/src/components/user-block/UserBlock.test.tsx +1 -5
  89. package/src/hooks/useFocusTrap.ts +2 -2
  90. package/src/index.ts +1 -0
  91. package/src/stories/controls/color.ts +6 -0
  92. package/src/stories/controls/element.ts +6 -0
  93. package/src/stories/controls/focusPoint.ts +1 -0
  94. package/src/stories/controls/icons.ts +6 -0
  95. package/src/stories/{knobs → controls}/image.ts +6 -16
  96. package/src/stories/controls/selectArgType.ts +4 -0
  97. package/src/stories/controls/theme.ts +3 -0
  98. package/src/stories/controls/typography.ts +5 -0
  99. package/src/stories/controls/withUndefined.ts +1 -0
  100. package/src/stories/decorators/withChromaticForceScreenSize.tsx +8 -0
  101. package/src/stories/decorators/withCombinations.tsx +99 -0
  102. package/src/stories/decorators/withNestedProps.tsx +23 -0
  103. package/src/stories/{withResizableBox.tsx → decorators/withResizableBox.tsx} +6 -10
  104. package/src/stories/decorators/withValueOnChange.tsx +18 -0
  105. package/src/stories/decorators/withWrapper.tsx +19 -0
  106. package/src/stories/utils/CustomLink.tsx +8 -2
  107. package/src/stories/{knobs → utils}/lorem.ts +9 -9
  108. package/src/testing/utils/commonTestsSuiteRTL.ts +2 -3
  109. package/src/testing/utils/index.ts +0 -2
  110. package/src/untypped-modules.d.ts +0 -2
  111. package/src/utils/MaterialThemeSwitcher/MaterialThemeSwitcher.tsx +1 -1
  112. package/src/utils/ThemeContext.ts +4 -0
  113. package/src/utils/forwardRefPolymorphic.ts +9 -0
  114. package/src/utils/type.ts +28 -4
  115. package/src/components/alert-dialog/__snapshots__/AlertDialog.test.tsx.snap +0 -558
  116. package/src/components/avatar/__snapshots__/Avatar.test.tsx.snap +0 -681
  117. package/src/components/comment-block/__snapshots__/CommentBlock.test.tsx.snap +0 -92
  118. package/src/components/dialog/__snapshots__/Dialog.test.tsx.snap +0 -1133
  119. package/src/components/expansion-panel/ExpansionPanel.stories.tsx +0 -65
  120. package/src/components/flag/__snapshots__/Flag.test.tsx.snap +0 -133
  121. package/src/components/flex-box/__snapshots__/FlexBox.test.tsx.snap +0 -492
  122. package/src/components/grid-column/GridColumn.stories.jsx +0 -56
  123. package/src/components/image-block/__snapshots__/ImageBlock.test.tsx.snap +0 -64
  124. package/src/components/lightbox/__snapshots__/Lightbox.test.tsx.snap +0 -194
  125. package/src/components/list/__snapshots__/List.test.tsx.snap +0 -360
  126. package/src/components/list/__snapshots__/ListDivider.test.tsx.snap +0 -7
  127. package/src/components/list/__snapshots__/ListItem.test.tsx.snap +0 -160
  128. package/src/components/list/__snapshots__/ListSubheader.test.tsx.snap +0 -9
  129. package/src/components/mosaic/__snapshots__/Mosaic.test.tsx.snap +0 -357
  130. package/src/components/post-block/__snapshots__/PostBlock.test.tsx.snap +0 -139
  131. package/src/components/skeleton/__snapshots__/SkeletonCircle.test.tsx.snap +0 -54
  132. package/src/components/skeleton/__snapshots__/SkeletonRectangle.test.tsx.snap +0 -177
  133. package/src/components/skeleton/__snapshots__/SkeletonTypography.test.tsx.snap +0 -174
  134. package/src/components/slider/__snapshots__/Slider.test.tsx.snap +0 -122
  135. package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +0 -157
  136. package/src/components/table/__snapshots__/Table.test.tsx.snap +0 -263
  137. package/src/components/text/Text.stories.jsx +0 -75
  138. package/src/components/thumbnail/__snapshots__/Thumbnail.test.tsx.snap +0 -130
  139. package/src/components/user-block/__snapshots__/UserBlock.test.tsx.snap +0 -362
  140. package/src/stories/chromaticForceScreenSize.tsx +0 -7
  141. package/src/stories/knobs/buttonKnob.ts +0 -9
  142. package/src/stories/knobs/emphasisKnob.ts +0 -8
  143. package/src/stories/knobs/enumKnob.ts +0 -14
  144. package/src/stories/knobs/focusKnob.ts +0 -3
  145. package/src/stories/knobs/sizeKnob.ts +0 -5
  146. package/src/stories/knobs/thumbnailsKnob.ts +0 -9
  147. package/src/testing/utils/itShouldRenderStories.tsx +0 -103
@@ -1,263 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`<Table> Snapshots and structure should render story 'Default' 1`] = `
4
- <table
5
- className="lumx-table lumx-table--has-dividers lumx-table--theme-light"
6
- style={
7
- {
8
- "minWidth": 620,
9
- }
10
- }
11
- >
12
- <TableHeader>
13
- <TableRow>
14
- <TableCell
15
- isSortable={true}
16
- key="dessert"
17
- onHeaderClick={[Function]}
18
- variant="head"
19
- >
20
- Dessert
21
- </TableCell>
22
- <TableCell
23
- isSortable={true}
24
- key="calories"
25
- onHeaderClick={[Function]}
26
- variant="head"
27
- width="100"
28
- >
29
- Calories
30
- </TableCell>
31
- <TableCell
32
- isSortable={true}
33
- key="fat"
34
- onHeaderClick={[Function]}
35
- sortOrder="asc"
36
- variant="head"
37
- width="100"
38
- >
39
- Fat (g)
40
- </TableCell>
41
- <TableCell
42
- icon="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M10,16V19.08L13.08,16H20V4H4V16H10Z"
43
- isSortable={false}
44
- key="comments"
45
- onHeaderClick={[Function]}
46
- variant="head"
47
- width="150"
48
- >
49
- Comments
50
- </TableCell>
51
- </TableRow>
52
- </TableHeader>
53
- <TableBody>
54
- <TableRow
55
- key="1"
56
- >
57
- <TableCell
58
- variant="body"
59
- >
60
- <FlexBox
61
- hAlign="center"
62
- orientation="horizontal"
63
- >
64
- <Thumbnail
65
- alt="Frozen yogurt"
66
- aspectRatio="square"
67
- className="lumx-spacing-margin-right-big"
68
- 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"
69
- image="/demo-assets/landscape1.jpg"
70
- loading="lazy"
71
- size="m"
72
- theme="light"
73
- variant="rounded"
74
- />
75
- <Link
76
- color="dark"
77
- href="./"
78
- >
79
- <span
80
- className="lumx-typography-subtitle1"
81
- >
82
- Frozen yogurt
83
- </span>
84
- </Link>
85
- <FlexBox
86
- hAlign="center"
87
- marginAuto="left"
88
- orientation="horizontal"
89
- >
90
- <IconButton
91
- emphasis="low"
92
- icon="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"
93
- label="Informations"
94
- size="m"
95
- theme="light"
96
- />
97
- <IconButton
98
- emphasis="low"
99
- icon="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"
100
- label="More options"
101
- size="m"
102
- theme="light"
103
- />
104
- </FlexBox>
105
- </FlexBox>
106
- </TableCell>
107
- <TableCell
108
- variant="body"
109
- >
110
- 159
111
- </TableCell>
112
- <TableCell
113
- variant="body"
114
- >
115
- 6
116
- </TableCell>
117
- <TableCell
118
- variant="body"
119
- >
120
- Lorem ipsum
121
- </TableCell>
122
- </TableRow>
123
- <TableRow
124
- key="2"
125
- >
126
- <TableCell
127
- variant="body"
128
- >
129
- <FlexBox
130
- hAlign="center"
131
- orientation="horizontal"
132
- >
133
- <Thumbnail
134
- alt="Ice cream sandwich"
135
- aspectRatio="square"
136
- className="lumx-spacing-margin-right-big"
137
- 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"
138
- image="/demo-assets/landscape2.jpg"
139
- loading="lazy"
140
- size="m"
141
- theme="light"
142
- variant="rounded"
143
- />
144
- <Link
145
- color="dark"
146
- href="./"
147
- >
148
- <span
149
- className="lumx-typography-subtitle1"
150
- >
151
- Ice cream sandwich
152
- </span>
153
- </Link>
154
- <FlexBox
155
- hAlign="center"
156
- marginAuto="left"
157
- orientation="horizontal"
158
- >
159
- <IconButton
160
- emphasis="low"
161
- icon="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"
162
- label="Informations"
163
- size="m"
164
- theme="light"
165
- />
166
- <IconButton
167
- emphasis="low"
168
- icon="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"
169
- label="More options"
170
- size="m"
171
- theme="light"
172
- />
173
- </FlexBox>
174
- </FlexBox>
175
- </TableCell>
176
- <TableCell
177
- variant="body"
178
- >
179
- 237
180
- </TableCell>
181
- <TableCell
182
- variant="body"
183
- >
184
- 9
185
- </TableCell>
186
- <TableCell
187
- variant="body"
188
- >
189
- Lorem ipsum
190
- </TableCell>
191
- </TableRow>
192
- <TableRow
193
- key="3"
194
- >
195
- <TableCell
196
- variant="body"
197
- >
198
- <FlexBox
199
- hAlign="center"
200
- orientation="horizontal"
201
- >
202
- <Thumbnail
203
- alt="Eclair"
204
- aspectRatio="square"
205
- className="lumx-spacing-margin-right-big"
206
- 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"
207
- image="/demo-assets/landscape3.jpg"
208
- loading="lazy"
209
- size="m"
210
- theme="light"
211
- variant="rounded"
212
- />
213
- <Link
214
- color="dark"
215
- href="./"
216
- >
217
- <span
218
- className="lumx-typography-subtitle1"
219
- >
220
- Eclair
221
- </span>
222
- </Link>
223
- <FlexBox
224
- hAlign="center"
225
- marginAuto="left"
226
- orientation="horizontal"
227
- >
228
- <IconButton
229
- emphasis="low"
230
- icon="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z"
231
- label="Informations"
232
- size="m"
233
- theme="light"
234
- />
235
- <IconButton
236
- emphasis="low"
237
- icon="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z"
238
- label="More options"
239
- size="m"
240
- theme="light"
241
- />
242
- </FlexBox>
243
- </FlexBox>
244
- </TableCell>
245
- <TableCell
246
- variant="body"
247
- >
248
- 262
249
- </TableCell>
250
- <TableCell
251
- variant="body"
252
- >
253
- 16
254
- </TableCell>
255
- <TableCell
256
- variant="body"
257
- >
258
- Lorem ipsum
259
- </TableCell>
260
- </TableRow>
261
- </TableBody>
262
- </table>
263
- `;
@@ -1,75 +0,0 @@
1
- import React from 'react';
2
- import { ColorPalette, ColorVariant, Icon, TypographyCustom, TypographyInterface } from '@lumx/react';
3
- import { mdiEarth, mdiHeart } from '@lumx/icons';
4
- import { withResizableBox } from '@lumx/react/stories/withResizableBox';
5
- import { Text } from './Text';
6
-
7
- export default { title: 'LumX components/text/Text' };
8
-
9
- export const Default = () => <Text as="p">Some text</Text>;
10
-
11
- export const WithIcon = (args) => (
12
- <Text as="p" {...args}>
13
- Some text <Icon icon={mdiHeart} /> with icons <Icon icon={mdiEarth} />
14
- </Text>
15
- );
16
-
17
- export const LongText = (args) => (
18
- <Text as="p" {...args}>
19
- Some very very very very very very very very very long text
20
- </Text>
21
- );
22
- LongText.decorators = [withResizableBox()];
23
-
24
- export const NoWrap = LongText.bind({});
25
- NoWrap.args = { noWrap: true };
26
- NoWrap.decorators = [withResizableBox()];
27
-
28
- export const Truncate = LongText.bind({});
29
- Truncate.args = { truncate: true };
30
- Truncate.decorators = [withResizableBox()];
31
-
32
- export const TruncateMultiline = LongText.bind({});
33
- TruncateMultiline.args = { truncate: { lines: 2 } };
34
- TruncateMultiline.decorators = [withResizableBox()];
35
-
36
- export const AllTypography = () => {
37
- const typographies = [undefined, ...Object.values(TypographyInterface), ...Object.values(TypographyCustom)];
38
- return (
39
- <table>
40
- {typographies.map((typography) => (
41
- <tr key={typography}>
42
- <td>{typography}</td>
43
- <td>
44
- <WithIcon typography={typography} />
45
- </td>
46
- </tr>
47
- ))}
48
- </table>
49
- );
50
- };
51
-
52
- export const AllColor = () => {
53
- const colorVariants = [undefined, ...Object.values(ColorVariant)];
54
- const colors = [undefined, ...Object.values(ColorPalette)];
55
- return (
56
- <table style={{ borderCollapse: 'separate', borderSpacing: 5 }}>
57
- <tr>
58
- <td />
59
- {colorVariants.map((colorVariant) => (
60
- <td key={colorVariant}>{colorVariant}</td>
61
- ))}
62
- </tr>
63
- {colors.map((color) => (
64
- <tr key={color}>
65
- <td>{color}</td>
66
- {colorVariants.map((colorVariant) => (
67
- <td key={colorVariant}>
68
- <WithIcon color={color} colorVariant={colorVariant} />
69
- </td>
70
- ))}
71
- </tr>
72
- ))}
73
- </table>
74
- );
75
- };
@@ -1,130 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`<Thumbnail> Snapshots and structure should render story 'Clickable' 1`] = `
4
- <button
5
- aria-label="Click me"
6
- className="lumx-thumbnail lumx-thumbnail--aspect-ratio-original lumx-thumbnail--size-xxl lumx-thumbnail--theme-light lumx-thumbnail--is-clickable lumx-thumbnail--is-loading"
7
- onClick={[Function]}
8
- type="button"
9
- >
10
- <div
11
- className="lumx-thumbnail__background"
12
- >
13
- <img
14
- alt="Click me"
15
- className="lumx-thumbnail__image lumx-thumbnail__image--is-loading"
16
- loading="lazy"
17
- src="/demo-assets/landscape1.jpg"
18
- style={{}}
19
- />
20
- </div>
21
- </button>
22
- `;
23
-
24
- exports[`<Thumbnail> Snapshots and structure should render story 'ClickableCustomLink' 1`] = `
25
- <CustomLink
26
- className="custom-class-name lumx-thumbnail lumx-thumbnail--aspect-ratio-original lumx-thumbnail--size-xxl lumx-thumbnail--theme-light lumx-thumbnail--is-clickable lumx-thumbnail--is-loading"
27
- href="https://google.fr"
28
- >
29
- <div
30
- className="lumx-thumbnail__background"
31
- >
32
- <img
33
- alt="Click me"
34
- className="lumx-thumbnail__image lumx-thumbnail__image--is-loading"
35
- loading="lazy"
36
- src="/demo-assets/landscape1.jpg"
37
- style={{}}
38
- />
39
- </div>
40
- </CustomLink>
41
- `;
42
-
43
- exports[`<Thumbnail> Snapshots and structure should render story 'ClickableLink' 1`] = `
44
- <a
45
- className="lumx-thumbnail lumx-thumbnail--aspect-ratio-original lumx-thumbnail--size-xxl lumx-thumbnail--theme-light lumx-thumbnail--is-clickable lumx-thumbnail--is-loading"
46
- href="https://google.fr"
47
- >
48
- <div
49
- className="lumx-thumbnail__background"
50
- >
51
- <img
52
- alt="Click me"
53
- className="lumx-thumbnail__image lumx-thumbnail__image--is-loading"
54
- loading="lazy"
55
- src="/demo-assets/landscape1.jpg"
56
- style={{}}
57
- />
58
- </div>
59
- </a>
60
- `;
61
-
62
- exports[`<Thumbnail> Snapshots and structure should render story 'Default' 1`] = `
63
- <div
64
- className="lumx-thumbnail lumx-thumbnail--aspect-ratio-original lumx-thumbnail--theme-light lumx-thumbnail--variant-squared lumx-thumbnail--is-loading"
65
- >
66
- <div
67
- className="lumx-thumbnail__background"
68
- >
69
- <img
70
- alt="Image alt text"
71
- className="lumx-thumbnail__image lumx-thumbnail__image--is-loading"
72
- loading="lazy"
73
- src="/demo-assets/landscape1.jpg"
74
- style={{}}
75
- />
76
- </div>
77
- </div>
78
- `;
79
-
80
- exports[`<Thumbnail> Snapshots and structure should render story 'WithBadge' 1`] = `
81
- <div
82
- className="lumx-thumbnail lumx-thumbnail--aspect-ratio-square lumx-thumbnail--size-l lumx-thumbnail--theme-light lumx-thumbnail--variant-rounded lumx-thumbnail--is-loading lumx-thumbnail--has-badge"
83
- >
84
- <div
85
- className="lumx-thumbnail__background"
86
- >
87
- <img
88
- alt="Image alt text"
89
- className="lumx-thumbnail__image lumx-thumbnail__image--is-loading"
90
- loading="lazy"
91
- src="/demo-assets/landscape1.jpg"
92
- style={{}}
93
- />
94
- </div>
95
- <Badge
96
- className="lumx-thumbnail__badge"
97
- color="primary"
98
- >
99
- <Icon
100
- icon="M4 2A2 2 0 0 0 2 4V12H4V8H6V12H8V4A2 2 0 0 0 6 2H4M4 4H6V6H4M22 15.5V14A2 2 0 0 0 20 12H16V22H20A2 2 0 0 0 22 20V18.5A1.54 1.54 0 0 0 20.5 17A1.54 1.54 0 0 0 22 15.5M20 20H18V18H20V20M20 16H18V14H20M5.79 21.61L4.21 20.39L18.21 2.39L19.79 3.61Z"
101
- />
102
- </Badge>
103
- </div>
104
- `;
105
-
106
- exports[`<Thumbnail> Snapshots and structure should render story 'WithCustomImageClassName' 1`] = `
107
- <div
108
- className="lumx-thumbnail lumx-thumbnail--aspect-ratio-square lumx-thumbnail--size-l lumx-thumbnail--theme-light lumx-thumbnail--variant-rounded lumx-thumbnail--is-loading lumx-thumbnail--has-badge"
109
- >
110
- <div
111
- className="lumx-thumbnail__background"
112
- >
113
- <img
114
- alt="Image alt text"
115
- className="lumx-thumbnail__image lumx-thumbnail__image--is-loading custom-image-class-name"
116
- loading="lazy"
117
- src="/demo-assets/landscape1.jpg"
118
- style={{}}
119
- />
120
- </div>
121
- <Badge
122
- className="lumx-thumbnail__badge"
123
- color="primary"
124
- >
125
- <Icon
126
- icon="M4 2A2 2 0 0 0 2 4V12H4V8H6V12H8V4A2 2 0 0 0 6 2H4M4 4H6V6H4M22 15.5V14A2 2 0 0 0 20 12H16V22H20A2 2 0 0 0 22 20V18.5A1.54 1.54 0 0 0 20.5 17A1.54 1.54 0 0 0 22 15.5M20 20H18V18H20V20M20 16H18V14H20M5.79 21.61L4.21 20.39L18.21 2.39L19.79 3.61Z"
127
- />
128
- </Badge>
129
- </div>
130
- `;