@lumx/react 2.1.9-alpha-thumbnail3 → 2.1.9-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 (119) hide show
  1. package/esm/_internal/AlertDialog.js +1 -2
  2. package/esm/_internal/AlertDialog.js.map +1 -1
  3. package/esm/_internal/AutocompleteMultiple.js +1 -2
  4. package/esm/_internal/AutocompleteMultiple.js.map +1 -1
  5. package/esm/_internal/Button2.js +1 -1
  6. package/esm/_internal/Checkbox2.js +1 -2
  7. package/esm/_internal/Checkbox2.js.map +1 -1
  8. package/esm/_internal/DatePickerField.js +1 -1
  9. package/esm/_internal/DragHandle.js +2 -3
  10. package/esm/_internal/DragHandle.js.map +1 -1
  11. package/esm/_internal/ExpansionPanel.js +1 -1
  12. package/esm/_internal/Flag2.js +1 -3
  13. package/esm/_internal/Flag2.js.map +1 -1
  14. package/esm/_internal/Icon2.js +32 -4
  15. package/esm/_internal/Icon2.js.map +1 -1
  16. package/esm/_internal/IconButton.js +1 -1
  17. package/esm/_internal/ImageBlock.js +1 -0
  18. package/esm/_internal/ImageBlock.js.map +1 -1
  19. package/esm/_internal/Lightbox2.js +1 -1
  20. package/esm/_internal/Link2.js +1 -1
  21. package/esm/_internal/LinkPreview.js +1 -1
  22. package/esm/_internal/LinkPreview.js.map +1 -1
  23. package/esm/_internal/Message2.js +5 -5
  24. package/esm/_internal/Message2.js.map +1 -1
  25. package/esm/_internal/Notification2.js +1 -2
  26. package/esm/_internal/Notification2.js.map +1 -1
  27. package/esm/_internal/ProgressTrackerStepPanel.js +1 -2
  28. package/esm/_internal/ProgressTrackerStepPanel.js.map +1 -1
  29. package/esm/_internal/SelectMultiple.js +1 -2
  30. package/esm/_internal/SelectMultiple.js.map +1 -1
  31. package/esm/_internal/SideNavigationItem.js +1 -2
  32. package/esm/_internal/SideNavigationItem.js.map +1 -1
  33. package/esm/_internal/Slider2.js +2 -21
  34. package/esm/_internal/Slider2.js.map +1 -1
  35. package/esm/_internal/SlideshowControls.js +1 -1
  36. package/esm/_internal/TabPanel.js +1 -1
  37. package/esm/_internal/TableRow.js +1 -2
  38. package/esm/_internal/TableRow.js.map +1 -1
  39. package/esm/_internal/TextField.js +1 -2
  40. package/esm/_internal/TextField.js.map +1 -1
  41. package/esm/_internal/Thumbnail2.js +764 -62
  42. package/esm/_internal/Thumbnail2.js.map +1 -1
  43. package/esm/_internal/alert-dialog.js +1 -2
  44. package/esm/_internal/alert-dialog.js.map +1 -1
  45. package/esm/_internal/autocomplete.js +1 -2
  46. package/esm/_internal/autocomplete.js.map +1 -1
  47. package/esm/_internal/avatar.js +4 -2
  48. package/esm/_internal/avatar.js.map +1 -1
  49. package/esm/_internal/button.js +1 -1
  50. package/esm/_internal/checkbox.js +1 -2
  51. package/esm/_internal/checkbox.js.map +1 -1
  52. package/esm/_internal/clamp.js +22 -0
  53. package/esm/_internal/clamp.js.map +1 -0
  54. package/esm/_internal/comment-block.js +4 -2
  55. package/esm/_internal/comment-block.js.map +1 -1
  56. package/esm/_internal/date-picker.js +1 -2
  57. package/esm/_internal/date-picker.js.map +1 -1
  58. package/esm/_internal/drag-handle.js +1 -2
  59. package/esm/_internal/drag-handle.js.map +1 -1
  60. package/esm/_internal/expansion-panel.js +1 -2
  61. package/esm/_internal/expansion-panel.js.map +1 -1
  62. package/esm/_internal/flag.js +1 -1
  63. package/esm/_internal/icon.js +1 -1
  64. package/esm/_internal/image-block.js +4 -2
  65. package/esm/_internal/image-block.js.map +1 -1
  66. package/esm/_internal/lightbox.js +1 -2
  67. package/esm/_internal/lightbox.js.map +1 -1
  68. package/esm/_internal/link-preview.js +4 -2
  69. package/esm/_internal/link-preview.js.map +1 -1
  70. package/esm/_internal/link.js +1 -1
  71. package/esm/_internal/message.js +1 -2
  72. package/esm/_internal/message.js.map +1 -1
  73. package/esm/_internal/mosaic.js +4 -2
  74. package/esm/_internal/mosaic.js.map +1 -1
  75. package/esm/_internal/notification.js +1 -2
  76. package/esm/_internal/notification.js.map +1 -1
  77. package/esm/_internal/post-block.js +4 -2
  78. package/esm/_internal/post-block.js.map +1 -1
  79. package/esm/_internal/progress-tracker.js +1 -2
  80. package/esm/_internal/progress-tracker.js.map +1 -1
  81. package/esm/_internal/select.js +1 -2
  82. package/esm/_internal/select.js.map +1 -1
  83. package/esm/_internal/side-navigation.js +1 -2
  84. package/esm/_internal/side-navigation.js.map +1 -1
  85. package/esm/_internal/slider.js +2 -1
  86. package/esm/_internal/slider.js.map +1 -1
  87. package/esm/_internal/slideshow.js +1 -2
  88. package/esm/_internal/slideshow.js.map +1 -1
  89. package/esm/_internal/table.js +1 -2
  90. package/esm/_internal/table.js.map +1 -1
  91. package/esm/_internal/tabs.js +1 -1
  92. package/esm/_internal/text-field.js +1 -2
  93. package/esm/_internal/text-field.js.map +1 -1
  94. package/esm/_internal/thumbnail.js +4 -2
  95. package/esm/_internal/thumbnail.js.map +1 -1
  96. package/esm/_internal/uploader.js +1 -1
  97. package/esm/_internal/user-block.js +3 -2
  98. package/esm/_internal/user-block.js.map +1 -1
  99. package/esm/index.js +4 -4
  100. package/package.json +4 -4
  101. package/src/components/drag-handle/DragHandle.tsx +5 -1
  102. package/src/components/flag/Flag.test.tsx +1 -2
  103. package/src/components/flag/Flag.tsx +2 -10
  104. package/src/components/flag/__snapshots__/Flag.test.tsx.snap +0 -15
  105. package/src/components/icon/Icon.tsx +15 -1
  106. package/src/components/image-block/ImageBlock.tsx +1 -0
  107. package/src/components/link-preview/LinkPreview.tsx +1 -1
  108. package/src/components/link-preview/__snapshots__/LinkPreview.test.tsx.snap +2 -2
  109. package/src/components/message/Message.tsx +4 -2
  110. package/src/components/thumbnail/Thumbnail.stories.tsx +59 -399
  111. package/src/components/thumbnail/Thumbnail.test.tsx +6 -6
  112. package/src/components/thumbnail/Thumbnail.tsx +34 -35
  113. package/src/components/thumbnail/useFocusPoint.ts +10 -18
  114. package/src/components/thumbnail/useImageLoad.ts +22 -23
  115. package/src/hooks/useOnResize.ts +0 -6
  116. package/src/stories/knobs/image.ts +3 -35
  117. package/types.d.ts +0 -2
  118. package/esm/_internal/mdi.js +0 -22
  119. package/esm/_internal/mdi.js.map +0 -1
@@ -2,7 +2,7 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import 'lodash/isBoolean';
7
7
  import 'lodash/isEmpty';
8
8
  import 'lodash/kebabCase';
@@ -14,6 +14,5 @@ import './Button2.js';
14
14
  import 'lodash/isFunction';
15
15
  import 'react-dom';
16
16
  import './useDelayedVisibility.js';
17
- import './Icon2.js';
18
17
  export { N as Notification } from './Notification2.js';
19
18
  //# sourceMappingURL=notification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"notification.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -2,15 +2,17 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import 'lodash/isBoolean';
7
7
  import 'lodash/isEmpty';
8
8
  import 'lodash/kebabCase';
9
9
  import 'lodash/noop';
10
+ import './constants.js';
10
11
  import './mergeRefs.js';
11
- import './Icon2.js';
12
12
  import 'lodash/isObject';
13
13
  export { P as PostBlock } from './PostBlock.js';
14
+ import './clamp.js';
14
15
  import './Thumbnail2.js';
16
+ import 'lodash';
15
17
  import './types.js';
16
18
  //# sourceMappingURL=post-block.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"post-block.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"post-block.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -2,14 +2,13 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import '../index2.js';
7
7
  import 'lodash/isBoolean';
8
8
  import 'lodash/isEmpty';
9
9
  import 'lodash/kebabCase';
10
10
  import 'lodash/noop';
11
11
  import './mergeRefs.js';
12
- import './Icon2.js';
13
12
  import './InputHelper.js';
14
13
  import './InputLabel.js';
15
14
  import './useRovingTabIndex.js';
@@ -1 +1 @@
1
- {"version":3,"file":"progress-tracker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"progress-tracker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import '../index2.js';
7
7
  import 'lodash/isBoolean';
8
8
  import 'lodash/isEmpty';
@@ -23,7 +23,6 @@ import './ClickAwayProvider.js';
23
23
  import 'lodash/pull';
24
24
  import './List2.js';
25
25
  import './Dropdown2.js';
26
- import './Icon2.js';
27
26
  import './InputHelper.js';
28
27
  import './InputLabel.js';
29
28
  export { a as Select, c as SelectMultiple, b as SelectMultipleField, S as SelectVariant } from './SelectMultiple.js';
@@ -1 +1 @@
1
- {"version":3,"file":"select.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"select.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import '../index2.js';
7
7
  import 'lodash/isBoolean';
8
8
  import 'lodash/isEmpty';
@@ -19,7 +19,6 @@ import './IconButton.js';
19
19
  import 'react-dom';
20
20
  import './ClickAwayProvider.js';
21
21
  import 'lodash/pull';
22
- import './Icon2.js';
23
22
  export { S as SideNavigation, a as SideNavigationItem } from './SideNavigationItem.js';
24
23
  import './Tooltip2.js';
25
24
  import 'lodash/debounce';
@@ -1 +1 @@
1
- {"version":3,"file":"side-navigation.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"side-navigation.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
@@ -9,5 +9,6 @@ import 'lodash/kebabCase';
9
9
  import 'lodash/noop';
10
10
  import './InputHelper.js';
11
11
  import './InputLabel.js';
12
- export { S as Slider, c as clamp } from './Slider2.js';
12
+ export { S as Slider } from './Slider2.js';
13
+ export { c as clamp } from './clamp.js';
13
14
  //# sourceMappingURL=slider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"slider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
@@ -2,7 +2,7 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import '../index2.js';
7
7
  import 'lodash/isBoolean';
8
8
  import 'lodash/isEmpty';
@@ -20,7 +20,6 @@ import 'lodash/range';
20
20
  import 'react-dom';
21
21
  import './ClickAwayProvider.js';
22
22
  import 'lodash/pull';
23
- import './Icon2.js';
24
23
  export { S as Slideshow, b as SlideshowControls, a as SlideshowItem } from './SlideshowControls.js';
25
24
  import './Tooltip2.js';
26
25
  import 'lodash/debounce';
@@ -1 +1 @@
1
- {"version":3,"file":"slideshow.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"slideshow.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,12 +2,11 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import 'lodash/isBoolean';
7
7
  import 'lodash/isEmpty';
8
8
  import 'lodash/kebabCase';
9
9
  import 'lodash/noop';
10
10
  import 'lodash/isFunction';
11
- import './Icon2.js';
12
11
  export { T as Table, a as TableBody, d as TableCell, c as TableCellVariant, e as TableHeader, f as TableRow, b as ThOrder } from './TableRow.js';
13
12
  //# sourceMappingURL=table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"table.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -2,13 +2,13 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
+ import './Icon2.js';
5
6
  import '../index2.js';
6
7
  import 'lodash/isBoolean';
7
8
  import 'lodash/isEmpty';
8
9
  import 'lodash/kebabCase';
9
10
  import 'lodash/noop';
10
11
  import './mergeRefs.js';
11
- import './Icon2.js';
12
12
  import './useRovingTabIndex.js';
13
13
  export { c as Tab, b as TabList, a as TabListLayout, d as TabPanel, T as TabProvider } from './TabPanel.js';
14
14
  //# sourceMappingURL=tabs.js.map
@@ -2,7 +2,7 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import '../index2.js';
7
7
  import 'lodash/isBoolean';
8
8
  import 'lodash/isEmpty';
@@ -18,7 +18,6 @@ import './IconButton.js';
18
18
  import 'react-dom';
19
19
  import './ClickAwayProvider.js';
20
20
  import 'lodash/pull';
21
- import './Icon2.js';
22
21
  import './InputHelper.js';
23
22
  import './InputLabel.js';
24
23
  export { T as TextField } from './TextField.js';
@@ -1 +1 @@
1
- {"version":3,"file":"text-field.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"text-field.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -2,13 +2,15 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import 'lodash/isBoolean';
7
7
  import 'lodash/isEmpty';
8
8
  import 'lodash/kebabCase';
9
9
  import 'lodash/noop';
10
+ import './constants.js';
10
11
  import './mergeRefs.js';
11
- import './Icon2.js';
12
+ import './clamp.js';
12
13
  export { T as Thumbnail } from './Thumbnail2.js';
14
+ import 'lodash';
13
15
  export { T as ThumbnailAspectRatio, a as ThumbnailVariant } from './types.js';
14
16
  //# sourceMappingURL=thumbnail.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"thumbnail.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
1
+ {"version":3,"file":"thumbnail.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -2,10 +2,10 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
+ import './Icon2.js';
5
6
  import 'lodash/isBoolean';
6
7
  import 'lodash/isEmpty';
7
8
  import 'lodash/kebabCase';
8
9
  import 'lodash/noop';
9
- import './Icon2.js';
10
10
  export { a as Uploader, U as UploaderVariant } from './Uploader2.js';
11
11
  //# sourceMappingURL=uploader.js.map
@@ -2,15 +2,16 @@ import './_rollupPluginBabelHelpers.js';
2
2
  import './components.js';
3
3
  import 'react';
4
4
  import './getRootClassName.js';
5
- import './mdi.js';
5
+ import './Icon2.js';
6
6
  import 'lodash/isBoolean';
7
7
  import 'lodash/isEmpty';
8
8
  import 'lodash/kebabCase';
9
9
  import 'lodash/noop';
10
+ import './constants.js';
10
11
  import './mergeRefs.js';
11
12
  import './Avatar2.js';
12
13
  import './renderLink.js';
13
- import './Icon2.js';
14
+ import './clamp.js';
14
15
  import './Thumbnail2.js';
15
16
  import 'lodash';
16
17
  export { U as UserBlock } from './UserBlock.js';
@@ -1 +1 @@
1
- {"version":3,"file":"user-block.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"user-block.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
package/esm/index.js CHANGED
@@ -2,7 +2,7 @@ import './_internal/_rollupPluginBabelHelpers.js';
2
2
  export { Alignment, AspectRatio, ColorPalette, ColorVariant, Emphasis, Kind, Orientation, Size, Theme, Typography, TypographyInterface, TypographyTitleCustom } from './_internal/components.js';
3
3
  import 'react';
4
4
  import './_internal/getRootClassName.js';
5
- import './_internal/mdi.js';
5
+ export { I as Icon } from './_internal/Icon2.js';
6
6
  import './index2.js';
7
7
  import 'lodash/isBoolean';
8
8
  import 'lodash/isEmpty';
@@ -53,7 +53,6 @@ export { F as Flag } from './_internal/Flag2.js';
53
53
  import 'lodash/castArray';
54
54
  export { F as FlexBox } from './_internal/FlexBox.js';
55
55
  export { G as Grid, a as GridItem } from './_internal/GridItem.js';
56
- export { I as Icon } from './_internal/Icon2.js';
57
56
  import 'lodash/isObject';
58
57
  export { a as ImageBlock, I as ImageBlockCaptionPosition } from './_internal/ImageBlock.js';
59
58
  export { I as InputHelper } from './_internal/InputHelper.js';
@@ -74,18 +73,19 @@ export { R as RadioButton, a as RadioGroup } from './_internal/RadioGroup.js';
74
73
  export { a as Select, c as SelectMultiple, b as SelectMultipleField, S as SelectVariant } from './_internal/SelectMultiple.js';
75
74
  export { S as SideNavigation, a as SideNavigationItem } from './_internal/SideNavigationItem.js';
76
75
  export { S as SkeletonCircle, b as SkeletonRectangle, a as SkeletonRectangleVariant, c as SkeletonTypography } from './_internal/SkeletonTypography.js';
77
- export { S as Slider, c as clamp } from './_internal/Slider2.js';
76
+ export { S as Slider } from './_internal/Slider2.js';
77
+ export { c as clamp } from './_internal/clamp.js';
78
78
  export { S as Slideshow, b as SlideshowControls, a as SlideshowItem } from './_internal/SlideshowControls.js';
79
79
  export { S as Switch } from './_internal/Switch2.js';
80
80
  export { T as Table, a as TableBody, d as TableCell, c as TableCellVariant, e as TableHeader, f as TableRow, b as ThOrder } from './_internal/TableRow.js';
81
81
  export { c as Tab, b as TabList, a as TabListLayout, d as TabPanel, T as TabProvider } from './_internal/TabPanel.js';
82
82
  export { T as TextField } from './_internal/TextField.js';
83
83
  export { T as Thumbnail } from './_internal/Thumbnail2.js';
84
+ import 'lodash';
84
85
  export { T as ThumbnailAspectRatio, a as ThumbnailVariant } from './_internal/types.js';
85
86
  export { T as Toolbar } from './_internal/Toolbar2.js';
86
87
  export { T as Tooltip } from './_internal/Tooltip2.js';
87
88
  import 'lodash/debounce';
88
89
  export { a as Uploader, U as UploaderVariant } from './_internal/Uploader2.js';
89
- import 'lodash';
90
90
  export { U as UserBlock } from './_internal/UserBlock.js';
91
91
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -7,8 +7,8 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@juggle/resize-observer": "^3.2.0",
10
- "@lumx/core": "^2.1.9-alpha-thumbnail3",
11
- "@lumx/icons": "^2.1.9-alpha-thumbnail3",
10
+ "@lumx/core": "^2.1.9-alpha.0",
11
+ "@lumx/icons": "^2.1.9-alpha.0",
12
12
  "@popperjs/core": "^2.5.4",
13
13
  "body-scroll-lock": "^3.1.5",
14
14
  "classnames": "^2.2.6",
@@ -120,6 +120,6 @@
120
120
  "build:storybook": "cd storybook && ./build"
121
121
  },
122
122
  "sideEffects": false,
123
- "version": "2.1.9-alpha-thumbnail3",
124
- "gitHead": "e57c222583d0f3fff98a3934a16a754302c88e3d"
123
+ "version": "2.1.9-alpha.0",
124
+ "gitHead": "67f0df5b67d7a55fccb30b72173163bafcf7b82e"
125
125
  }
@@ -40,7 +40,11 @@ export const DragHandle: Comp<DragHandleProps, HTMLDivElement> = forwardRef((pro
40
40
  {...forwardedProps}
41
41
  className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, theme }))}
42
42
  >
43
- <Icon icon={mdiDragVertical} color={theme === Theme.dark ? ColorPalette.light : undefined} size={Size.xs} />
43
+ <Icon
44
+ icon={mdiDragVertical}
45
+ color={theme === Theme.dark ? ColorPalette.light : ColorPalette.dark}
46
+ size={Size.xs}
47
+ />
44
48
  </div>
45
49
  );
46
50
  });
@@ -69,9 +69,8 @@ describe(`<${Flag.displayName} />`, () => {
69
69
 
70
70
  it('should use the color', () => {
71
71
  const color = ColorPalette.green;
72
- const { wrapper, iconEl } = setup({ icon: mdiAbTesting, color });
72
+ const { wrapper } = setup({ icon: mdiAbTesting, color });
73
73
 
74
- expect(iconEl.prop('color')).toEqual(color);
75
74
  expect(wrapper).toHaveClassName(
76
75
  getBasicClass({
77
76
  prefix: CLASSNAME,
@@ -1,7 +1,7 @@
1
1
  import React, { forwardRef } from 'react';
2
2
  import classNames from 'classnames';
3
3
 
4
- import { ColorPalette, ColorVariant, Icon, Size, Theme } from '@lumx/react';
4
+ import { ColorPalette, Icon, Size, Theme } from '@lumx/react';
5
5
  import { Comp, GenericProps, getRootClassName, handleBasicClasses } from '@lumx/react/utils';
6
6
 
7
7
  export interface FlagProps extends GenericProps {
@@ -38,15 +38,7 @@ export const Flag: Comp<FlagProps, HTMLDivElement> = forwardRef((props, ref) =>
38
38
  className={classNames(className, handleBasicClasses({ prefix: CLASSNAME, color: flagColor }))}
39
39
  ref={ref}
40
40
  >
41
- {icon && (
42
- <Icon
43
- icon={icon}
44
- color={color}
45
- colorVariant={ColorVariant.D2}
46
- size={Size.xxs}
47
- className={`${CLASSNAME}__icon`}
48
- />
49
- )}
41
+ {icon && <Icon icon={icon} size={Size.xxs} className={`${CLASSNAME}__icon`} />}
50
42
  <span className={`${CLASSNAME}__label`}>{label}</span>
51
43
  </div>
52
44
  );
@@ -19,8 +19,6 @@ Array [
19
19
  >
20
20
  <Icon
21
21
  className="lumx-flag__icon"
22
- color="blue"
23
- colorVariant="D2"
24
22
  icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
25
23
  size="xxs"
26
24
  />
@@ -35,8 +33,6 @@ Array [
35
33
  >
36
34
  <Icon
37
35
  className="lumx-flag__icon"
38
- color="dark"
39
- colorVariant="D2"
40
36
  icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
41
37
  size="xxs"
42
38
  />
@@ -51,8 +47,6 @@ Array [
51
47
  >
52
48
  <Icon
53
49
  className="lumx-flag__icon"
54
- color="green"
55
- colorVariant="D2"
56
50
  icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
57
51
  size="xxs"
58
52
  />
@@ -67,8 +61,6 @@ Array [
67
61
  >
68
62
  <Icon
69
63
  className="lumx-flag__icon"
70
- color="primary"
71
- colorVariant="D2"
72
64
  icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
73
65
  size="xxs"
74
66
  />
@@ -83,8 +75,6 @@ Array [
83
75
  >
84
76
  <Icon
85
77
  className="lumx-flag__icon"
86
- color="red"
87
- colorVariant="D2"
88
78
  icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
89
79
  size="xxs"
90
80
  />
@@ -99,8 +89,6 @@ Array [
99
89
  >
100
90
  <Icon
101
91
  className="lumx-flag__icon"
102
- color="secondary"
103
- colorVariant="D2"
104
92
  icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
105
93
  size="xxs"
106
94
  />
@@ -115,8 +103,6 @@ Array [
115
103
  >
116
104
  <Icon
117
105
  className="lumx-flag__icon"
118
- color="yellow"
119
- colorVariant="D2"
120
106
  icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
121
107
  size="xxs"
122
108
  />
@@ -135,7 +121,6 @@ exports[`<Flag /> Snapshots and structure should render story 'withIcon' 1`] = `
135
121
  >
136
122
  <Icon
137
123
  className="lumx-flag__icon"
138
- colorVariant="D2"
139
124
  icon="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z"
140
125
  size="xxs"
141
126
  />
@@ -4,6 +4,7 @@ import classNames from 'classnames';
4
4
 
5
5
  import { Color, ColorPalette, ColorVariant, Size, Theme } from '@lumx/react';
6
6
  import { Comp, GenericProps, getRootClassName, handleBasicClasses } from '@lumx/react/utils';
7
+ import { mdiAlertCircle } from '@lumx/icons';
7
8
 
8
9
  export type IconSizes = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
9
10
 
@@ -52,11 +53,20 @@ const DEFAULT_PROPS: Partial<IconProps> = {};
52
53
  */
53
54
  export const Icon: Comp<IconProps, HTMLElement> = forwardRef((props, ref) => {
54
55
  const { className, color, colorVariant, hasShape, icon, size, theme, ...forwardedProps } = props;
56
+
55
57
  let iconColor;
58
+ let iconColorVariant;
56
59
  if (color) {
57
60
  iconColor = color;
61
+ iconColorVariant = colorVariant;
58
62
  } else if (theme) {
59
63
  iconColor = theme === Theme.light ? ColorPalette.dark : ColorPalette.light;
64
+
65
+ if (colorVariant) {
66
+ iconColorVariant = colorVariant;
67
+ } else {
68
+ iconColorVariant = Theme.light ? 'L1' : 'N';
69
+ }
60
70
  } else if (hasShape) {
61
71
  iconColor = ColorPalette.dark;
62
72
  }
@@ -86,12 +96,16 @@ export const Icon: Comp<IconProps, HTMLElement> = forwardRef((props, ref) => {
86
96
  className,
87
97
  handleBasicClasses({
88
98
  color: iconColor,
89
- colorVariant,
99
+ colorVariant: iconColorVariant,
90
100
  hasShape,
91
101
  prefix: CLASSNAME,
92
102
  size: iconSize,
93
103
  }),
94
104
  !hasShape && `${CLASSNAME}--no-shape`,
105
+ !hasShape &&
106
+ iconColor === ColorPalette.yellow &&
107
+ icon === mdiAlertCircle &&
108
+ `${CLASSNAME}--has-dark-layer`,
95
109
  `${CLASSNAME}--path`,
96
110
  )}
97
111
  >
@@ -118,6 +118,7 @@ export const ImageBlock: Comp<ImageBlockProps, HTMLDivElement> = forwardRef((pro
118
118
  <Thumbnail
119
119
  {...thumbnailProps}
120
120
  className={classNames(`${CLASSNAME}__image`, thumbnailProps?.className)}
121
+ fillHeight={fillHeight}
121
122
  align={align}
122
123
  image={image}
123
124
  size={size}
@@ -115,7 +115,7 @@ export const LinkPreview: Comp<LinkPreviewProps, HTMLDivElement> = forwardRef((p
115
115
  className={classNames(`${CLASSNAME}__link`, linkProps?.className)}
116
116
  target="_blank"
117
117
  href={link}
118
- color={theme === Theme.light ? ColorPalette.blue : ColorPalette.light}
118
+ color={theme === Theme.light ? ColorPalette.primary : ColorPalette.light}
119
119
  colorVariant={ColorVariant.N}
120
120
  >
121
121
  {link}
@@ -15,7 +15,7 @@ exports[`<LinkPreview> Snapshots and structure should render correctly 1`] = `
15
15
  >
16
16
  <Link
17
17
  className="lumx-link-preview__link"
18
- color="blue"
18
+ color="primary"
19
19
  colorVariant="N"
20
20
  target="_blank"
21
21
  />
@@ -40,7 +40,7 @@ exports[`<LinkPreview> Snapshots and structure should render correctly 2`] = `
40
40
  >
41
41
  <Link
42
42
  className="lumx-link-preview__link"
43
- color="blue"
43
+ color="primary"
44
44
  colorVariant="N"
45
45
  target="_blank"
46
46
  />
@@ -62,8 +62,10 @@ export const Message: Comp<MessageProps, HTMLDivElement> = forwardRef((props, re
62
62
  )}
63
63
  {...forwardedProps}
64
64
  >
65
- {(customIcon || icon) && <Icon className="lumx-message__icon" icon={customIcon || icon} size={Size.xs} />}
66
- <div className="lumx-message__text">{children}</div>
65
+ {(customIcon || icon) && (
66
+ <Icon className={`${CLASSNAME}__icon`} icon={customIcon || icon} size={Size.xs} color={color} />
67
+ )}
68
+ <div className={`${CLASSNAME}__text`}>{children}</div>
67
69
  </div>
68
70
  );
69
71
  });