@telus-uds/components-base 3.5.0 → 3.5.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/cjs/utils/ssr-media-query/utils/create-media-query-styles.js +2 -1
- package/lib/esm/utils/ssr-media-query/utils/create-media-query-styles.js +2 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
- package/src/utils/ssr-media-query/utils/create-media-query-styles.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-base
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Fri, 28 Mar 2025 01:00:41 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 3.5.1
|
|
8
|
+
|
|
9
|
+
Fri, 28 Mar 2025 01:00:41 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- `RNMQ`: fix createMediaQueryStyles utility (guillermo.peitzner@telus.com)
|
|
14
|
+
- `TextButton`: fixes to the storybook related to Link variants (Mauricio.BatresMontejo@telus.com)
|
|
15
|
+
|
|
7
16
|
## 3.5.0
|
|
8
17
|
|
|
9
|
-
Mon, 24 Mar 2025 16:
|
|
18
|
+
Mon, 24 Mar 2025 16:30:05 GMT
|
|
10
19
|
|
|
11
20
|
### Minor changes
|
|
12
21
|
|
|
@@ -55,7 +55,8 @@ function createMediaQueryStyles(viewportStyles) {
|
|
|
55
55
|
const minWidth = _systemConstants.viewports.map.get(viewport);
|
|
56
56
|
const nextViewport = viewportsArray[viewportsArray.indexOf(viewport) + 1];
|
|
57
57
|
const maxWidth = _systemConstants.viewports.map.get(nextViewport);
|
|
58
|
-
const mediaQuery = `@media (min-width: ${minWidth}px)${maxWidth ? ` and (max-width: ${maxWidth}px)` : ''
|
|
58
|
+
const mediaQuery = `@media (min-width: ${minWidth}px)${maxWidth ? ` and (max-width: ${maxWidth - 1}px)` : '' // Subtract 1px to avoid overlap with next viewport since the browser will apply the last matching media query
|
|
59
|
+
}`;
|
|
59
60
|
return {
|
|
60
61
|
...acc,
|
|
61
62
|
[mediaQuery]: styles
|
|
@@ -49,7 +49,8 @@ function createMediaQueryStyles(viewportStyles) {
|
|
|
49
49
|
const minWidth = viewports.map.get(viewport);
|
|
50
50
|
const nextViewport = viewportsArray[viewportsArray.indexOf(viewport) + 1];
|
|
51
51
|
const maxWidth = viewports.map.get(nextViewport);
|
|
52
|
-
const mediaQuery = `@media (min-width: ${minWidth}px)${maxWidth ? ` and (max-width: ${maxWidth}px)` : ''
|
|
52
|
+
const mediaQuery = `@media (min-width: ${minWidth}px)${maxWidth ? ` and (max-width: ${maxWidth - 1}px)` : '' // Subtract 1px to avoid overlap with next viewport since the browser will apply the last matching media query
|
|
53
|
+
}`;
|
|
53
54
|
return {
|
|
54
55
|
...acc,
|
|
55
56
|
[mediaQuery]: styles
|
package/lib/package.json
CHANGED
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@ function createMediaQueryStyles(viewportStyles, shouldInherit = true) {
|
|
|
35
35
|
const maxWidth = viewports.map.get(nextViewport)
|
|
36
36
|
|
|
37
37
|
const mediaQuery = `@media (min-width: ${minWidth}px)${
|
|
38
|
-
maxWidth ? ` and (max-width: ${maxWidth}px)` : ''
|
|
38
|
+
maxWidth ? ` and (max-width: ${maxWidth - 1}px)` : '' // Subtract 1px to avoid overlap with next viewport since the browser will apply the last matching media query
|
|
39
39
|
}`
|
|
40
40
|
return { ...acc, [mediaQuery]: styles }
|
|
41
41
|
}, {})
|