@lumx/react 2.1.6-alpha.3 → 2.1.7

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 (74) hide show
  1. package/esm/_internal/Lightbox2.js +10 -4
  2. package/esm/_internal/Lightbox2.js.map +1 -1
  3. package/esm/_internal/List2.js.map +1 -1
  4. package/esm/_internal/TextField.js +2 -2
  5. package/esm/_internal/TextField.js.map +1 -1
  6. package/esm/_internal/UserBlock.js +1 -0
  7. package/esm/_internal/UserBlock.js.map +1 -1
  8. package/package.json +10 -15
  9. package/src/components/alert-dialog/AlertDialog.stories.tsx +9 -2
  10. package/src/components/autocomplete/AutocompleteMultiple.stories.tsx +1 -1
  11. package/src/components/avatar/__snapshots__/Avatar.test.tsx.snap +30 -30
  12. package/src/components/comment-block/__snapshots__/CommentBlock.test.tsx.snap +1 -1
  13. package/src/components/dialog/Dialog.stories.tsx +9 -2
  14. package/src/components/image-block/ImageBlock.stories.tsx +2 -2
  15. package/src/components/image-block/__snapshots__/ImageBlock.test.tsx.snap +1 -1
  16. package/src/components/lightbox/Lightbox.stories.tsx +82 -0
  17. package/src/components/lightbox/Lightbox.tsx +12 -4
  18. package/src/components/mosaic/__snapshots__/Mosaic.test.tsx.snap +18 -18
  19. package/src/components/notification/Notifications.stories.tsx +16 -10
  20. package/src/components/skeleton/SkeletonCircle.stories.tsx +1 -1
  21. package/src/components/skeleton/SkeletonRectangle.stories.tsx +1 -1
  22. package/src/components/skeleton/SkeletonTypography.stories.tsx +1 -1
  23. package/src/components/slideshow/__snapshots__/Slideshow.test.tsx.snap +12 -12
  24. package/src/components/text-field/TextField.stories.tsx +30 -0
  25. package/src/components/text-field/TextField.tsx +11 -9
  26. package/src/components/thumbnail/Thumbnail.stories.tsx +2 -2
  27. package/src/components/thumbnail/__snapshots__/Thumbnail.test.tsx.snap +5 -5
  28. package/src/components/user-block/UserBlock.stories.tsx +4 -1
  29. package/src/components/user-block/UserBlock.tsx +1 -0
  30. package/src/components/user-block/__snapshots__/UserBlock.test.tsx.snap +10 -10
  31. package/src/stories/chromaticForceScreenSize.tsx +7 -0
  32. package/src/stories/generated/Autocomplete/Demos.stories.tsx +1 -1
  33. package/src/stories/generated/Avatar/Demos.stories.tsx +1 -1
  34. package/src/stories/generated/Badge/Demos.stories.tsx +1 -1
  35. package/src/stories/generated/Button/Demos.stories.tsx +1 -1
  36. package/src/stories/generated/Checkbox/Demos.stories.tsx +1 -1
  37. package/src/stories/generated/Chip/Demos.stories.tsx +1 -1
  38. package/src/stories/generated/CommentBlock/Demos.stories.tsx +1 -1
  39. package/src/stories/generated/DatePicker/Demos.stories.tsx +1 -1
  40. package/src/stories/generated/Dialog/Demos.stories.tsx +1 -1
  41. package/src/stories/generated/Divider/Demos.stories.tsx +1 -1
  42. package/src/stories/generated/Dropdown/Demos.stories.tsx +1 -1
  43. package/src/stories/generated/ExpansionPanel/Demos.stories.tsx +1 -1
  44. package/src/stories/generated/Icon/Demos.stories.tsx +1 -1
  45. package/src/stories/generated/ImageBlock/Demos.stories.tsx +1 -1
  46. package/src/stories/generated/Lightbox/Demos.stories.tsx +1 -1
  47. package/src/stories/generated/Link/Demos.stories.tsx +1 -1
  48. package/src/stories/generated/LinkPreview/Demos.stories.tsx +1 -1
  49. package/src/stories/generated/List/Demos.stories.tsx +1 -1
  50. package/src/stories/generated/Message/Demos.stories.tsx +1 -1
  51. package/src/stories/generated/Mosaic/Demos.stories.tsx +1 -1
  52. package/src/stories/generated/Notification/Demos.stories.tsx +1 -1
  53. package/src/stories/generated/Popover/Demos.stories.tsx +1 -1
  54. package/src/stories/generated/PostBlock/Demos.stories.tsx +1 -1
  55. package/src/stories/generated/Progress/Demos.stories.tsx +1 -1
  56. package/src/stories/generated/ProgressTracker/Demos.stories.tsx +1 -1
  57. package/src/stories/generated/RadioButton/Demos.stories.tsx +1 -1
  58. package/src/stories/generated/Select/Demos.stories.tsx +1 -1
  59. package/src/stories/generated/SideNavigation/Demos.stories.tsx +1 -1
  60. package/src/stories/generated/Skeleton/Demos.stories.tsx +1 -1
  61. package/src/stories/generated/Slider/Demos.stories.tsx +1 -1
  62. package/src/stories/generated/Slideshow/Demos.stories.tsx +1 -1
  63. package/src/stories/generated/Switch/Demos.stories.tsx +1 -1
  64. package/src/stories/generated/Table/Demos.stories.tsx +1 -1
  65. package/src/stories/generated/Tabs/Demos.stories.tsx +1 -1
  66. package/src/stories/generated/TextField/Demos.stories.tsx +1 -1
  67. package/src/stories/generated/Thumbnail/Demos.stories.tsx +1 -1
  68. package/src/stories/generated/Toolbar/Demos.stories.tsx +1 -1
  69. package/src/stories/generated/Tooltip/Demos.stories.tsx +1 -1
  70. package/src/stories/generated/Uploader/Demos.stories.tsx +1 -1
  71. package/src/stories/generated/UserBlock/Demos.stories.tsx +1 -1
  72. package/src/stories/knobs/enumKnob.ts +1 -1
  73. package/src/stories/knobs/image.ts +12 -12
  74. package/src/untypped-modules.d.ts +2 -0
@@ -17,7 +17,7 @@ exports[`<Mosaic> Snapshots and structure should render story FiveThumbnails 1`]
17
17
  aspectRatio="free"
18
18
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
19
19
  fillHeight={true}
20
- image="landscape1.jpg"
20
+ image="/demo-assets/landscape1.jpg"
21
21
  loading="lazy"
22
22
  theme="light"
23
23
  />
@@ -32,7 +32,7 @@ exports[`<Mosaic> Snapshots and structure should render story FiveThumbnails 1`]
32
32
  aspectRatio="free"
33
33
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
34
34
  fillHeight={true}
35
- image="landscape2.jpg"
35
+ image="/demo-assets/landscape2.jpg"
36
36
  loading="lazy"
37
37
  theme="light"
38
38
  />
@@ -47,7 +47,7 @@ exports[`<Mosaic> Snapshots and structure should render story FiveThumbnails 1`]
47
47
  aspectRatio="free"
48
48
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
49
49
  fillHeight={true}
50
- image="landscape3.jpg"
50
+ image="/demo-assets/landscape3.jpg"
51
51
  loading="lazy"
52
52
  theme="light"
53
53
  />
@@ -62,7 +62,7 @@ exports[`<Mosaic> Snapshots and structure should render story FiveThumbnails 1`]
62
62
  aspectRatio="free"
63
63
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
64
64
  fillHeight={true}
65
- image="portrait1.jpg"
65
+ image="/demo-assets/portrait1.jpg"
66
66
  loading="lazy"
67
67
  theme="light"
68
68
  />
@@ -96,7 +96,7 @@ exports[`<Mosaic> Snapshots and structure should render story FourThumbnails 1`]
96
96
  aspectRatio="free"
97
97
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
98
98
  fillHeight={true}
99
- image="landscape1.jpg"
99
+ image="/demo-assets/landscape1.jpg"
100
100
  loading="lazy"
101
101
  theme="light"
102
102
  />
@@ -111,7 +111,7 @@ exports[`<Mosaic> Snapshots and structure should render story FourThumbnails 1`]
111
111
  aspectRatio="free"
112
112
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
113
113
  fillHeight={true}
114
- image="landscape2.jpg"
114
+ image="/demo-assets/landscape2.jpg"
115
115
  loading="lazy"
116
116
  theme="light"
117
117
  />
@@ -126,7 +126,7 @@ exports[`<Mosaic> Snapshots and structure should render story FourThumbnails 1`]
126
126
  aspectRatio="free"
127
127
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
128
128
  fillHeight={true}
129
- image="landscape3.jpg"
129
+ image="/demo-assets/landscape3.jpg"
130
130
  loading="lazy"
131
131
  theme="light"
132
132
  />
@@ -141,7 +141,7 @@ exports[`<Mosaic> Snapshots and structure should render story FourThumbnails 1`]
141
141
  aspectRatio="free"
142
142
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
143
143
  fillHeight={true}
144
- image="portrait1.jpg"
144
+ image="/demo-assets/portrait1.jpg"
145
145
  loading="lazy"
146
146
  theme="light"
147
147
  />
@@ -167,7 +167,7 @@ exports[`<Mosaic> Snapshots and structure should render story OneThumbnail 1`] =
167
167
  aspectRatio="free"
168
168
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
169
169
  fillHeight={true}
170
- image="landscape1.jpg"
170
+ image="/demo-assets/landscape1.jpg"
171
171
  loading="lazy"
172
172
  theme="light"
173
173
  />
@@ -193,7 +193,7 @@ exports[`<Mosaic> Snapshots and structure should render story SixThumbnails 1`]
193
193
  aspectRatio="free"
194
194
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
195
195
  fillHeight={true}
196
- image="landscape1.jpg"
196
+ image="/demo-assets/landscape1.jpg"
197
197
  loading="lazy"
198
198
  onClick={[Function]}
199
199
  theme="light"
@@ -209,7 +209,7 @@ exports[`<Mosaic> Snapshots and structure should render story SixThumbnails 1`]
209
209
  aspectRatio="free"
210
210
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
211
211
  fillHeight={true}
212
- image="landscape2.jpg"
212
+ image="/demo-assets/landscape2.jpg"
213
213
  loading="lazy"
214
214
  onClick={[Function]}
215
215
  theme="light"
@@ -225,7 +225,7 @@ exports[`<Mosaic> Snapshots and structure should render story SixThumbnails 1`]
225
225
  aspectRatio="free"
226
226
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
227
227
  fillHeight={true}
228
- image="landscape3.jpg"
228
+ image="/demo-assets/landscape3.jpg"
229
229
  loading="lazy"
230
230
  onClick={[Function]}
231
231
  theme="light"
@@ -241,7 +241,7 @@ exports[`<Mosaic> Snapshots and structure should render story SixThumbnails 1`]
241
241
  aspectRatio="free"
242
242
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
243
243
  fillHeight={true}
244
- image="portrait1.jpg"
244
+ image="/demo-assets/portrait1.jpg"
245
245
  loading="lazy"
246
246
  onClick={[Function]}
247
247
  theme="light"
@@ -276,7 +276,7 @@ exports[`<Mosaic> Snapshots and structure should render story ThreeThumbnails 1`
276
276
  aspectRatio="free"
277
277
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
278
278
  fillHeight={true}
279
- image="landscape1.jpg"
279
+ image="/demo-assets/landscape1.jpg"
280
280
  loading="lazy"
281
281
  theme="light"
282
282
  />
@@ -291,7 +291,7 @@ exports[`<Mosaic> Snapshots and structure should render story ThreeThumbnails 1`
291
291
  aspectRatio="free"
292
292
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
293
293
  fillHeight={true}
294
- image="landscape2.jpg"
294
+ image="/demo-assets/landscape2.jpg"
295
295
  loading="lazy"
296
296
  theme="light"
297
297
  />
@@ -306,7 +306,7 @@ exports[`<Mosaic> Snapshots and structure should render story ThreeThumbnails 1`
306
306
  aspectRatio="free"
307
307
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
308
308
  fillHeight={true}
309
- image="landscape3.jpg"
309
+ image="/demo-assets/landscape3.jpg"
310
310
  loading="lazy"
311
311
  theme="light"
312
312
  />
@@ -332,7 +332,7 @@ exports[`<Mosaic> Snapshots and structure should render story TwoThumbnails 1`]
332
332
  aspectRatio="free"
333
333
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
334
334
  fillHeight={true}
335
- image="landscape1.jpg"
335
+ image="/demo-assets/landscape1.jpg"
336
336
  loading="lazy"
337
337
  theme="light"
338
338
  />
@@ -347,7 +347,7 @@ exports[`<Mosaic> Snapshots and structure should render story TwoThumbnails 1`]
347
347
  aspectRatio="free"
348
348
  fallback="M21,5V11.59L18,8.58L14,12.59L10,8.59L6,12.59L3,9.58V5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5M18,11.42L21,14.43V19A2,2 0 0,1 19,21H5A2,2 0 0,1 3,19V12.42L6,15.41L10,11.41L14,15.41"
349
349
  fillHeight={true}
350
- image="landscape2.jpg"
350
+ image="/demo-assets/landscape2.jpg"
351
351
  loading="lazy"
352
352
  theme="light"
353
353
  />
@@ -1,48 +1,54 @@
1
1
  import React, { useState } from 'react';
2
2
 
3
3
  import { Button, Notification, Kind } from '@lumx/react';
4
-
5
- import noop from 'lodash/noop';
4
+ import { NOTIFICATION_TRANSITION_DURATION } from '@lumx/core/js/constants';
5
+ import { action } from '@storybook/addon-actions';
6
+ import { chromaticForceScreenSize } from '../../stories/chromaticForceScreenSize';
6
7
 
7
8
  export default {
8
9
  title: 'LumX components/notification/Notification',
9
10
  parameters: {
10
- // Notifies Chromatic to pause the animations when they finish for the specific story.
11
- chromatic: { pauseAnimationAtEnd: true },
11
+ // Delay Chromatic snapshot to wait for notification to open.
12
+ chromatic: {
13
+ pauseAnimationAtEnd: true,
14
+ delay: NOTIFICATION_TRANSITION_DURATION,
15
+ },
12
16
  },
17
+ // Force minimum chromatic screen size to make sure the dialog appears in view.
18
+ decorators: [chromaticForceScreenSize],
13
19
  };
14
20
 
15
21
  const properties = {
16
22
  error: {
17
23
  content: 'Error',
18
- onClick: noop,
24
+ onClick: action('onClick'),
19
25
  isOpen: true,
20
26
  type: Kind.error,
21
27
  },
22
28
  info: {
23
29
  content: 'Info',
24
- onClick: noop,
30
+ onClick: action('onClick'),
25
31
  isOpen: true,
26
32
  type: Kind.info,
27
33
  },
28
34
  infoWithCallback: {
29
- onActionClick: noop,
35
+ onActionClick: action('onClick'),
30
36
  actionLabel: 'Undo',
31
37
  content: 'Info with callback',
32
- onClick: noop,
38
+ onClick: action('onClick'),
33
39
  isOpen: true,
34
40
  type: Kind.info,
35
41
  },
36
42
  success: {
37
43
  content: 'Success',
38
- onClick: noop,
44
+ onClick: action('onClick'),
39
45
  isOpen: true,
40
46
  type: Kind.success,
41
47
  },
42
48
 
43
49
  warning: {
44
50
  content: 'Warning',
45
- onClick: noop,
51
+ onClick: action('onClick'),
46
52
  isOpen: true,
47
53
  type: Kind.warning,
48
54
  },
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import { FlexBox, Orientation, Size, SkeletonCircle, ColorPalette } from '@lumx/react';
4
4
 
5
- export default { title: 'LumX components/skeleton/Skeleton' };
5
+ export default { title: 'LumX components/skeleton/Skeleton Circle' };
6
6
 
7
7
  const sizes = [Size.xxs, Size.xs, Size.s, Size.m, Size.l, Size.xl, Size.xxl] as const;
8
8
  const colors = Object.values(ColorPalette);
@@ -14,7 +14,7 @@ import {
14
14
  } from '@lumx/react';
15
15
  import { imageKnob } from '@lumx/react/stories/knobs/image';
16
16
 
17
- export default { title: 'LumX components/skeleton/Skeleton' };
17
+ export default { title: 'LumX components/skeleton/Skeleton Rectangle' };
18
18
 
19
19
  const variants = [
20
20
  SkeletonRectangleVariant.squared,
@@ -2,7 +2,7 @@ import React from 'react';
2
2
 
3
3
  import { SkeletonTypography, Typography, ColorPalette } from '@lumx/react';
4
4
 
5
- export default { title: 'LumX components/skeleton/Skeleton' };
5
+ export default { title: 'LumX components/skeleton/Skeleton Typography' };
6
6
 
7
7
  const colors = Object.values(ColorPalette);
8
8
 
@@ -23,13 +23,13 @@ Array [
23
23
  }
24
24
  >
25
25
  <SlideshowItem
26
- key="landscape1.jpg-0"
26
+ key="/demo-assets/landscape1.jpg-0"
27
27
  >
28
28
  <ImageBlock
29
29
  align="left"
30
30
  alt="Image 1"
31
31
  captionPosition="below"
32
- image="landscape1.jpg"
32
+ image="/demo-assets/landscape1.jpg"
33
33
  theme="light"
34
34
  thumbnailProps={
35
35
  Object {
@@ -39,13 +39,13 @@ Array [
39
39
  />
40
40
  </SlideshowItem>
41
41
  <SlideshowItem
42
- key="landscape2.jpg-1"
42
+ key="/demo-assets/landscape2.jpg-1"
43
43
  >
44
44
  <ImageBlock
45
45
  align="left"
46
46
  alt="Image 2"
47
47
  captionPosition="below"
48
- image="landscape2.jpg"
48
+ image="/demo-assets/landscape2.jpg"
49
49
  theme="light"
50
50
  thumbnailProps={
51
51
  Object {
@@ -55,13 +55,13 @@ Array [
55
55
  />
56
56
  </SlideshowItem>
57
57
  <SlideshowItem
58
- key="landscape3.jpg-2"
58
+ key="/demo-assets/landscape3.jpg-2"
59
59
  >
60
60
  <ImageBlock
61
61
  align="left"
62
62
  alt="Image 3"
63
63
  captionPosition="below"
64
- image="landscape3.jpg"
64
+ image="/demo-assets/landscape3.jpg"
65
65
  theme="light"
66
66
  thumbnailProps={
67
67
  Object {
@@ -71,13 +71,13 @@ Array [
71
71
  />
72
72
  </SlideshowItem>
73
73
  <SlideshowItem
74
- key="portrait1.jpg-3"
74
+ key="/demo-assets/portrait1.jpg-3"
75
75
  >
76
76
  <ImageBlock
77
77
  align="left"
78
78
  alt="Image 4"
79
79
  captionPosition="below"
80
- image="portrait1.jpg"
80
+ image="/demo-assets/portrait1.jpg"
81
81
  theme="light"
82
82
  thumbnailProps={
83
83
  Object {
@@ -87,13 +87,13 @@ Array [
87
87
  />
88
88
  </SlideshowItem>
89
89
  <SlideshowItem
90
- key="portrait2.jpg-4"
90
+ key="/demo-assets/portrait2.jpg-4"
91
91
  >
92
92
  <ImageBlock
93
93
  align="left"
94
94
  alt="Image 5"
95
95
  captionPosition="below"
96
- image="portrait2.jpg"
96
+ image="/demo-assets/portrait2.jpg"
97
97
  theme="light"
98
98
  thumbnailProps={
99
99
  Object {
@@ -103,13 +103,13 @@ Array [
103
103
  />
104
104
  </SlideshowItem>
105
105
  <SlideshowItem
106
- key="portrait3.jpg-5"
106
+ key="/demo-assets/portrait3.jpg-5"
107
107
  >
108
108
  <ImageBlock
109
109
  align="left"
110
110
  alt="Image 6"
111
111
  captionPosition="below"
112
- image="portrait3.jpg"
112
+ image="/demo-assets/portrait3.jpg"
113
113
  theme="light"
114
114
  thumbnailProps={
115
115
  Object {
@@ -137,3 +137,33 @@ export const WithAfterElement = ({ theme }: any) => {
137
137
  />
138
138
  );
139
139
  };
140
+
141
+ export const WithMaxLengthNoLabel = ({ theme }: any) => {
142
+ const [value, onChange] = React.useState('Value');
143
+ const multiline = boolean('Multiline', true);
144
+ const minimumRows = number('Minimum number of rows', 2, { min: 0, max: 100 });
145
+ const isClearable = boolean('Clearable', true);
146
+ const hasError = boolean('Has error', true);
147
+ return (
148
+ <TextField
149
+ value={value}
150
+ placeholder={text('Placeholder', 'Placeholder')}
151
+ theme={theme}
152
+ onChange={onChange}
153
+ multiline={multiline}
154
+ minimumRows={minimumRows}
155
+ hasError={hasError}
156
+ maxLength={200}
157
+ clearButtonProps={isClearable ? { label: 'Clear' } : undefined}
158
+ helper={<span>{text('Helper', 'Helper')}</span>}
159
+ afterElement={
160
+ <IconButton
161
+ label="foo"
162
+ emphasis={emphasis('Button emphasis', Emphasis.medium, 'After element')}
163
+ size={buttonSize('Button size', Size.s, 'After element')}
164
+ icon={mdiTranslate}
165
+ />
166
+ }
167
+ />
168
+ );
169
+ };
@@ -307,16 +307,18 @@ export const TextField: Comp<TextFieldProps, HTMLDivElement> = forwardRef((props
307
307
  }),
308
308
  )}
309
309
  >
310
- {label && (
310
+ {(label || maxLength) && (
311
311
  <div className={`${CLASSNAME}__header`}>
312
- <InputLabel
313
- htmlFor={textFieldId}
314
- className={`${CLASSNAME}__label`}
315
- isRequired={isRequired}
316
- theme={theme}
317
- >
318
- {label}
319
- </InputLabel>
312
+ {label && (
313
+ <InputLabel
314
+ htmlFor={textFieldId}
315
+ className={`${CLASSNAME}__label`}
316
+ isRequired={isRequired}
317
+ theme={theme}
318
+ >
319
+ {label}
320
+ </InputLabel>
321
+ )}
320
322
 
321
323
  {maxLength && (
322
324
  <div className={`${CLASSNAME}__char-counter`}>
@@ -56,7 +56,7 @@ export const CustomFallback = () => (
56
56
 
57
57
  export const WithBadge = () => {
58
58
  const thumbnailSize = sizeKnob('Thumbnail size', Size.l);
59
- const variant = select<ThumbnailVariant>('Thumbnail variant', ThumbnailVariant, ThumbnailVariant.rounded);
59
+ const variant = select('Thumbnail variant', ThumbnailVariant, ThumbnailVariant.rounded);
60
60
  const badgeColor = select('Badge color', ColorPalette, ColorPalette.primary);
61
61
  const activateFallback = boolean('Activate fallback', false);
62
62
  const image = imageKnob();
@@ -109,7 +109,7 @@ export const Knobs = ({ theme }: any) => {
109
109
  const fillHeight = boolean('Fill Height', false);
110
110
  const focusPoint = { x: focusKnob('Focus X'), y: focusKnob('Focus Y') };
111
111
  const image = imageKnob('Image', IMAGES.landscape1);
112
- const variant = select<ThumbnailVariant>('Variant', ThumbnailVariant, ThumbnailVariant.squared);
112
+ const variant = select('Variant', ThumbnailVariant, ThumbnailVariant.squared);
113
113
  const size = sizeKnob('Size', Size.xxl);
114
114
  const onClick = boolean('clickable?', false) ? () => console.log('ok') : undefined;
115
115
 
@@ -18,7 +18,7 @@ exports[`<Thumbnail> Snapshots and structure should render story 'Clickable' 1`]
18
18
  alt="Click me"
19
19
  className="lumx-thumbnail__image"
20
20
  loading="lazy"
21
- src="landscape1.jpg"
21
+ src="/demo-assets/landscape1.jpg"
22
22
  style={Object {}}
23
23
  />
24
24
  </div>
@@ -43,7 +43,7 @@ exports[`<Thumbnail> Snapshots and structure should render story 'ClickableCusto
43
43
  alt="Click me"
44
44
  className="lumx-thumbnail__image"
45
45
  loading="lazy"
46
- src="landscape1.jpg"
46
+ src="/demo-assets/landscape1.jpg"
47
47
  style={Object {}}
48
48
  />
49
49
  </div>
@@ -68,7 +68,7 @@ exports[`<Thumbnail> Snapshots and structure should render story 'ClickableLink'
68
68
  alt="Click me"
69
69
  className="lumx-thumbnail__image"
70
70
  loading="lazy"
71
- src="landscape1.jpg"
71
+ src="/demo-assets/landscape1.jpg"
72
72
  style={Object {}}
73
73
  />
74
74
  </div>
@@ -116,7 +116,7 @@ exports[`<Thumbnail> Snapshots and structure should render story 'Default' 1`] =
116
116
  alt="Image alt text"
117
117
  className="lumx-thumbnail__image"
118
118
  loading="lazy"
119
- src="landscape1.jpg"
119
+ src="/demo-assets/landscape1.jpg"
120
120
  style={Object {}}
121
121
  />
122
122
  </div>
@@ -188,7 +188,7 @@ exports[`<Thumbnail> Snapshots and structure should render story 'WithBadge' 1`]
188
188
  alt="Image alt text"
189
189
  className="lumx-thumbnail__image"
190
190
  loading="lazy"
191
- src="landscape1.jpg"
191
+ src="/demo-assets/landscape1.jpg"
192
192
  style={Object {}}
193
193
  />
194
194
  </div>
@@ -31,7 +31,10 @@ export const WithLinks = ({ theme }: any) => {
31
31
  <UserBlock
32
32
  theme={theme}
33
33
  name="Emmitt O. Lum"
34
- linkProps={{ href: 'https://www.lumapps.com', target: '_blank' }}
34
+ linkProps={{
35
+ href: 'https://www.lumapps.com',
36
+ target: '_blank',
37
+ }}
35
38
  fields={['Creative developer', 'Denpasar']}
36
39
  avatarProps={{ image: avatarImageKnob(), alt: 'Avatar' }}
37
40
  size={size}
@@ -146,6 +146,7 @@ export const UserBlock: Comp<UserBlockProps, HTMLDivElement> = forwardRef((props
146
146
  >
147
147
  {avatarProps && (
148
148
  <Avatar
149
+ linkAs={linkAs}
149
150
  linkProps={linkProps}
150
151
  {...avatarProps}
151
152
  className={classNames(`${CLASSNAME}__avatar`, avatarProps.className)}
@@ -19,7 +19,7 @@ Array [
19
19
  </Badge>
20
20
  }
21
21
  className="lumx-user-block__avatar"
22
- image="avatar1.jpg"
22
+ image="/demo-assets/avatar1.jpg"
23
23
  onClick={[Function]}
24
24
  size="m"
25
25
  theme="light"
@@ -69,7 +69,7 @@ Array [
69
69
  </Badge>
70
70
  }
71
71
  className="lumx-user-block__avatar"
72
- image="avatar2.jpg"
72
+ image="/demo-assets/avatar2.jpg"
73
73
  onClick={[Function]}
74
74
  size="m"
75
75
  theme="light"
@@ -119,7 +119,7 @@ Array [
119
119
  </Badge>
120
120
  }
121
121
  className="lumx-user-block__avatar"
122
- image="avatar3.jpg"
122
+ image="/demo-assets/avatar3.jpg"
123
123
  onClick={[Function]}
124
124
  size="m"
125
125
  theme="light"
@@ -165,7 +165,7 @@ Array [
165
165
  <Avatar
166
166
  alt="Avatar"
167
167
  className="lumx-user-block__avatar"
168
- image="avatar1.jpg"
168
+ image="/demo-assets/avatar1.jpg"
169
169
  onClick={[Function]}
170
170
  size="s"
171
171
  theme="light"
@@ -190,7 +190,7 @@ Array [
190
190
  <Avatar
191
191
  alt="Avatar"
192
192
  className="lumx-user-block__avatar"
193
- image="avatar1.jpg"
193
+ image="/demo-assets/avatar1.jpg"
194
194
  onClick={[Function]}
195
195
  size="m"
196
196
  theme="light"
@@ -231,7 +231,7 @@ Array [
231
231
  <Avatar
232
232
  alt="Avatar"
233
233
  className="lumx-user-block__avatar"
234
- image="avatar1.jpg"
234
+ image="/demo-assets/avatar1.jpg"
235
235
  onClick={[Function]}
236
236
  size="l"
237
237
  theme="light"
@@ -285,7 +285,7 @@ exports[`<UserBlock> Snapshots and structure should render story 'WithBadge' 1`]
285
285
  </Badge>
286
286
  }
287
287
  className="lumx-user-block__avatar"
288
- image="avatar1.jpg"
288
+ image="/demo-assets/avatar1.jpg"
289
289
  size="m"
290
290
  theme="light"
291
291
  />
@@ -327,7 +327,7 @@ Array [
327
327
  <Avatar
328
328
  alt="Avatar"
329
329
  className="lumx-user-block__avatar"
330
- image="avatar1.jpg"
330
+ image="/demo-assets/avatar1.jpg"
331
331
  linkProps={
332
332
  Object {
333
333
  "href": "https://www.lumapps.com",
@@ -358,7 +358,7 @@ Array [
358
358
  <Avatar
359
359
  alt="Avatar"
360
360
  className="lumx-user-block__avatar"
361
- image="avatar1.jpg"
361
+ image="/demo-assets/avatar1.jpg"
362
362
  linkProps={
363
363
  Object {
364
364
  "href": "https://www.lumapps.com",
@@ -405,7 +405,7 @@ Array [
405
405
  <Avatar
406
406
  alt="Avatar"
407
407
  className="lumx-user-block__avatar"
408
- image="avatar1.jpg"
408
+ image="/demo-assets/avatar1.jpg"
409
409
  linkProps={
410
410
  Object {
411
411
  "href": "https://www.lumapps.com",
@@ -0,0 +1,7 @@
1
+ /* eslint-disable */
2
+ import React from 'react';
3
+ import isChromatic from 'chromatic/isChromatic';
4
+
5
+ /** Story decorator used to force a minimum screen size when running in chromatic */
6
+ export const chromaticForceScreenSize = (story: any) =>
7
+ isChromatic() ? <div style={{ minWidth: 1200, minHeight: 800 }}>{story()}</div> : story();
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * File generated when storybook is started. Do not edit directly!
3
3
  */
4
- export default { title: 'LumX components/autocomplete/Demos' };
4
+ export default { title: 'LumX components/autocomplete/Autocomplete Demos' };
5
5
 
6
6
  export { App as Default } from './default';
7
7
  export { App as Multiple } from './multiple';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * File generated when storybook is started. Do not edit directly!
3
3
  */
4
- export default { title: 'LumX components/avatar/Demos' };
4
+ export default { title: 'LumX components/avatar/Avatar Demos' };
5
5
 
6
6
  export { App as Actions } from './actions';
7
7
  export { App as Default } from './default';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * File generated when storybook is started. Do not edit directly!
3
3
  */
4
- export default { title: 'LumX components/badge/Demos' };
4
+ export default { title: 'LumX components/badge/Badge Demos' };
5
5
 
6
6
  export { App as Icon } from './icon';
7
7
  export { App as Label } from './label';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * File generated when storybook is started. Do not edit directly!
3
3
  */
4
- export default { title: 'LumX components/button/Demos' };
4
+ export default { title: 'LumX components/button/Button Demos' };
5
5
 
6
6
  export { App as EmphasisHigh } from './emphasis-high';
7
7
  export { App as EmphasisLow } from './emphasis-low';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * File generated when storybook is started. Do not edit directly!
3
3
  */
4
- export default { title: 'LumX components/checkbox/Demos' };
4
+ export default { title: 'LumX components/checkbox/Checkbox Demos' };
5
5
 
6
6
  export { App as Default } from './default';
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * File generated when storybook is started. Do not edit directly!
3
3
  */
4
- export default { title: 'LumX components/chip/Demos' };
4
+ export default { title: 'LumX components/chip/Chip Demos' };
5
5
 
6
6
  export { App as Choice } from './choice';
7
7
  export { App as Default } from './default';