@telus-uds/components-web 2.20.0 → 2.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -2
- package/lib/Image/Image.js +12 -7
- package/lib-module/Image/Image.js +12 -7
- package/package.json +1 -1
- package/src/Image/Image.jsx +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Mon, 16 Oct 2023 22:48:33 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.20.1
|
|
8
|
+
|
|
9
|
+
Mon, 16 Oct 2023 22:48:33 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- new stories for border radius variant for card (mauricio.batresmontejo@telus.com)
|
|
14
|
+
- allow custom height input in image component (evander.owusu@telus.com)
|
|
15
|
+
|
|
7
16
|
## 2.20.0
|
|
8
17
|
|
|
9
|
-
Wed, 04 Oct 2023 18:
|
|
18
|
+
Wed, 04 Oct 2023 18:39:58 GMT
|
|
10
19
|
|
|
11
20
|
### Minor changes
|
|
12
21
|
|
package/lib/Image/Image.js
CHANGED
|
@@ -24,18 +24,23 @@ const [selectProps, selectedSystemPropTypes] = (0, _componentsBase.selectSystemP
|
|
|
24
24
|
const StyledImage = /*#__PURE__*/_styledComponents.default.img.withConfig({
|
|
25
25
|
displayName: "Image__StyledImage",
|
|
26
26
|
componentId: "components-web__sc-blwu4l-0"
|
|
27
|
-
})({
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
})(_ref => {
|
|
28
|
+
let {
|
|
29
|
+
height
|
|
30
|
+
} = _ref;
|
|
31
|
+
return {
|
|
32
|
+
height: height ?? 'auto',
|
|
33
|
+
maxWidth: '100%'
|
|
34
|
+
};
|
|
30
35
|
});
|
|
31
36
|
|
|
32
37
|
const StyledRoundedImage = /*#__PURE__*/(0, _styledComponents.default)(StyledImage).withConfig({
|
|
33
38
|
displayName: "Image__StyledRoundedImage",
|
|
34
39
|
componentId: "components-web__sc-blwu4l-1"
|
|
35
|
-
})(["border-radius:", "px;"],
|
|
40
|
+
})(["border-radius:", "px;"], _ref2 => {
|
|
36
41
|
let {
|
|
37
42
|
borderRadius
|
|
38
|
-
} =
|
|
43
|
+
} = _ref2;
|
|
39
44
|
return borderRadius;
|
|
40
45
|
});
|
|
41
46
|
const StyledCircularImage = /*#__PURE__*/(0, _styledComponents.default)(StyledImage).withConfig({
|
|
@@ -45,7 +50,7 @@ const StyledCircularImage = /*#__PURE__*/(0, _styledComponents.default)(StyledIm
|
|
|
45
50
|
borderRadius: '50%'
|
|
46
51
|
});
|
|
47
52
|
|
|
48
|
-
const Image =
|
|
53
|
+
const Image = _ref3 => {
|
|
49
54
|
let {
|
|
50
55
|
src,
|
|
51
56
|
width,
|
|
@@ -56,7 +61,7 @@ const Image = _ref2 => {
|
|
|
56
61
|
tokens,
|
|
57
62
|
variant,
|
|
58
63
|
...rest
|
|
59
|
-
} =
|
|
64
|
+
} = _ref3;
|
|
60
65
|
const {
|
|
61
66
|
borderRadius
|
|
62
67
|
} = (0, _componentsBase.useThemeTokens)('Image', tokens, variant);
|
|
@@ -8,17 +8,22 @@ const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
|
8
8
|
const StyledImage = /*#__PURE__*/styled.img.withConfig({
|
|
9
9
|
displayName: "Image__StyledImage",
|
|
10
10
|
componentId: "components-web__sc-blwu4l-0"
|
|
11
|
-
})({
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
})(_ref => {
|
|
12
|
+
let {
|
|
13
|
+
height
|
|
14
|
+
} = _ref;
|
|
15
|
+
return {
|
|
16
|
+
height: height ?? 'auto',
|
|
17
|
+
maxWidth: '100%'
|
|
18
|
+
};
|
|
14
19
|
});
|
|
15
20
|
const StyledRoundedImage = /*#__PURE__*/styled(StyledImage).withConfig({
|
|
16
21
|
displayName: "Image__StyledRoundedImage",
|
|
17
22
|
componentId: "components-web__sc-blwu4l-1"
|
|
18
|
-
})(["border-radius:", "px;"],
|
|
23
|
+
})(["border-radius:", "px;"], _ref2 => {
|
|
19
24
|
let {
|
|
20
25
|
borderRadius
|
|
21
|
-
} =
|
|
26
|
+
} = _ref2;
|
|
22
27
|
return borderRadius;
|
|
23
28
|
});
|
|
24
29
|
const StyledCircularImage = /*#__PURE__*/styled(StyledImage).withConfig({
|
|
@@ -28,7 +33,7 @@ const StyledCircularImage = /*#__PURE__*/styled(StyledImage).withConfig({
|
|
|
28
33
|
borderRadius: '50%'
|
|
29
34
|
});
|
|
30
35
|
|
|
31
|
-
const Image =
|
|
36
|
+
const Image = _ref3 => {
|
|
32
37
|
let {
|
|
33
38
|
src,
|
|
34
39
|
width,
|
|
@@ -39,7 +44,7 @@ const Image = _ref2 => {
|
|
|
39
44
|
tokens,
|
|
40
45
|
variant,
|
|
41
46
|
...rest
|
|
42
|
-
} =
|
|
47
|
+
} = _ref3;
|
|
43
48
|
const {
|
|
44
49
|
borderRadius
|
|
45
50
|
} = useThemeTokens('Image', tokens, variant);
|
package/package.json
CHANGED
package/src/Image/Image.jsx
CHANGED
|
@@ -6,9 +6,11 @@ import { htmlAttrs, warn } from '../utils'
|
|
|
6
6
|
|
|
7
7
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs])
|
|
8
8
|
|
|
9
|
-
const StyledImage = styled.img({
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
const StyledImage = styled.img(({ height }) => {
|
|
10
|
+
return {
|
|
11
|
+
height: height ?? 'auto',
|
|
12
|
+
maxWidth: '100%'
|
|
13
|
+
}
|
|
12
14
|
})
|
|
13
15
|
const StyledRoundedImage = styled(StyledImage)`
|
|
14
16
|
border-radius: ${({ borderRadius }) => borderRadius}px;
|