@jetbrains/kotlin-web-site-ui 4.3.0-next-layout.2 → 4.3.0-next-layout.4

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.
@@ -1,4 +1,4 @@
1
- const BREAKPOINTS = Object.freeze({
1
+ const POINTS = {
2
2
  MS: 376,
3
3
  MM: 472,
4
4
  TS: 616,
@@ -6,14 +6,15 @@ const BREAKPOINTS = Object.freeze({
6
6
  TL: 1000,
7
7
  DS: 1190,
8
8
  DM: 1144
9
- });
10
- const BREAKPOINTS_KEYS = Object.keys(BREAKPOINTS);
9
+ };
10
+ const BREAKPOINTS = Object.freeze(POINTS);
11
+ const BREAKPOINTS_KEYS = Object.keys(POINTS);
11
12
  const BREAKPOINTS_MAX_MEDIA = Object.freeze(BREAKPOINTS_KEYS.reduce(function (result, name) {
12
- result[name] = `screen and (max-width: ${BREAKPOINTS[name]}px)`;
13
+ result[name] = `(max-width: ${BREAKPOINTS[name]}px)`;
13
14
  return result;
14
15
  }, {}));
15
16
  const BREAKPOINTS_MIN_MEDIA = Object.freeze(BREAKPOINTS_KEYS.reduce(function (result, name) {
16
- result[name] = `screen and (min-width: ${BREAKPOINTS[name] + 1}px)`;
17
+ result[name] = `(min-width: ${BREAKPOINTS[name] + 1}px)`;
17
18
  return result;
18
19
  }, {}));
19
20
  export { BREAKPOINTS, BREAKPOINTS_KEYS, BREAKPOINTS_MAX_MEDIA, BREAKPOINTS_MIN_MEDIA };
@@ -1,32 +1,32 @@
1
1
  import { useMedia } from 'the-platform/useMedia';
2
- import { BREAKPOINTS } from './constants.js';
2
+ import { BREAKPOINTS_MAX_MEDIA } from './constants.js';
3
3
 
4
4
  function useMS() {
5
- return useMedia(BREAKPOINTS.MS, false);
5
+ return useMedia(BREAKPOINTS_MAX_MEDIA.MS, false);
6
6
  }
7
7
 
8
8
  function useMM() {
9
- return useMedia(BREAKPOINTS.MM, false);
9
+ return useMedia(BREAKPOINTS_MAX_MEDIA.MM, false);
10
10
  }
11
11
 
12
12
  function useTS() {
13
- return useMedia(BREAKPOINTS.TS, false);
13
+ return useMedia(BREAKPOINTS_MAX_MEDIA.TS, false);
14
14
  }
15
15
 
16
16
  function useTM() {
17
- return useMedia(BREAKPOINTS.TM, false);
17
+ return useMedia(BREAKPOINTS_MAX_MEDIA.TM, false);
18
18
  }
19
19
 
20
20
  function useTL() {
21
- return useMedia(BREAKPOINTS.TL, false);
21
+ return useMedia(BREAKPOINTS_MAX_MEDIA.TL, false);
22
22
  }
23
23
 
24
24
  function useDM() {
25
- return useMedia(BREAKPOINTS.DM, false);
25
+ return useMedia(BREAKPOINTS_MAX_MEDIA.DM, false);
26
26
  }
27
27
 
28
28
  function useDS() {
29
- return useMedia(BREAKPOINTS.DS, false);
29
+ return useMedia(BREAKPOINTS_MAX_MEDIA.DS, false);
30
30
  }
31
31
 
32
32
  export { useDM, useDS, useMM, useMS, useTL, useTM, useTS };
@@ -0,0 +1,14 @@
1
+ @custom-media --ktl-ms-min (min-width: 377px);
2
+ @custom-media --ktl-mm-min (min-width: 473px);
3
+ @custom-media --ktl-ts-min (min-width: 617px);
4
+ @custom-media --ktl-tm-min (min-width: 809px);
5
+ @custom-media --ktl-tl-min (min-width: 1001px);
6
+ @custom-media --ktl-ds-min (min-width: 1191px);
7
+ @custom-media --ktl-dm-min (min-width: 1145px);
8
+ @custom-media --ktl-ms (max-width: 376px);
9
+ @custom-media --ktl-mm (max-width: 472px);
10
+ @custom-media --ktl-ts (max-width: 616px);
11
+ @custom-media --ktl-tm (max-width: 808px);
12
+ @custom-media --ktl-tl (max-width: 1000px);
13
+ @custom-media --ktl-ds (max-width: 1190px);
14
+ @custom-media --ktl-dm (max-width: 1144px);
@@ -3,32 +3,32 @@
3
3
  --ktl-layout-width: 1144px;
4
4
  }
5
5
 
6
- @media screen and (max-width: 1190px) {:root {
6
+ @media (max-width: 1190px) {:root {
7
7
  --ktl-layout-width: 952px
8
8
  }
9
9
  }
10
10
 
11
- @media screen and (max-width: 1000px) {:root {
11
+ @media (max-width: 1000px) {:root {
12
12
  --ktl-layout-width: 760px
13
13
  }
14
14
  }
15
15
 
16
- @media screen and (max-width: 808px) {:root {
16
+ @media (max-width: 808px) {:root {
17
17
  --ktl-layout-width: 568px
18
18
  }
19
19
  }
20
20
 
21
- @media screen and (max-width: 616px) {:root {
21
+ @media (max-width: 616px) {:root {
22
22
  --ktl-layout-width: 424px
23
23
  }
24
24
  }
25
25
 
26
- @media screen and (max-width: 472px) {:root {
26
+ @media (max-width: 472px) {:root {
27
27
  --ktl-layout-width: 328px
28
28
  }
29
29
  }
30
30
 
31
- @media screen and (max-width: 376px) {:root {
31
+ @media (max-width: 376px) {:root {
32
32
  --ktl-layout-width: 272px
33
33
  }
34
34
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jetbrains/kotlin-web-site-ui",
3
3
  "description": "UI components for Kotlin web sites development",
4
- "version": "4.3.0-next-layout.2",
4
+ "version": "4.3.0-next-layout.4",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
7
7
  "files": [
@@ -123,6 +123,7 @@
123
123
  "sha.js": "^2.4.11",
124
124
  "standard-version": "^9.2.0",
125
125
  "svgo-loader": "^3.0.0",
126
+ "the-platform": "^0.10.1",
126
127
  "ts-node": "^10.9.1",
127
128
  "typescript": "^4.2.4",
128
129
  "webpack": "^5.30.0",