@jetbrains/kotlin-web-site-ui 4.4.6 → 4.5.0-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.
@@ -5,7 +5,7 @@ const POINTS = {
5
5
  TM: 808,
6
6
  TL: 1000,
7
7
  DS: 1190,
8
- DM: 1144
8
+ DM: 1280
9
9
  };
10
10
  const BREAKPOINTS = Object.freeze(POINTS);
11
11
  const BREAKPOINTS_KEYS = Object.keys(POINTS);
@@ -4,11 +4,11 @@
4
4
  @custom-media --ktl-tm-min (min-width: 809px);
5
5
  @custom-media --ktl-tl-min (min-width: 1001px);
6
6
  @custom-media --ktl-ds-min (min-width: 1191px);
7
- @custom-media --ktl-dm-min (min-width: 1145px);
7
+ @custom-media --ktl-dm-min (min-width: 1281px);
8
8
  @custom-media --ktl-ms (max-width: 374px);
9
9
  @custom-media --ktl-mm (max-width: 472px);
10
10
  @custom-media --ktl-ts (max-width: 616px);
11
11
  @custom-media --ktl-tm (max-width: 808px);
12
12
  @custom-media --ktl-tl (max-width: 1000px);
13
13
  @custom-media --ktl-ds (max-width: 1190px);
14
- @custom-media --ktl-dm (max-width: 1144px);
14
+ @custom-media --ktl-dm (max-width: 1280px);
@@ -1,4 +1,4 @@
1
1
  import './index.css';
2
2
  import { Header } from './header.js';
3
3
  export { Header as default } from './header.js';
4
- export { ANDROID_TITLE, ANDROID_URL, COMMUNITY_TITLE, COMMUNITY_URL, DATA_SCIENCE_TITLE, DATA_SCIENCE_URL, DOCS_TITLE, DOCS_URL, HOME_TITLE, HOME_URL, KMM_DOCS_TITLE, KMM_DOCS_URL, KOTLIN_DOCS_TITLE, KOTLIN_DOCS_URL, MULTIPLATFORM_MOBILE_TITLE, MULTIPLATFORM_MOBILE_URL, MULTIPLATFORM_OTHERS_TITLE, MULTIPLATFORM_OTHERS_URL, PLAY_EXAMPLES_TITLE, PLAY_EXAMPLES_URL, PLAY_HANDSON_TITLE, PLAY_HANDSON_URL, PLAY_KOANS_TITLE, PLAY_KOANS_URL, PLAY_TITLE, PLAY_TITLE_FULL, PLAY_URL, SERVER_SIDE_TITLE, SERVER_SIDE_URL, SOLUTIONS_TITLE, TEACH_TITLE, TEACH_URL, WEB_FRONTEND_TITLE, WEB_FRONTEND_URL, getNavScheme } from './nav-scheme.js';
4
+ export { ANDROID_TITLE, ANDROID_URL, COMMUNITY_TITLE, COMMUNITY_URL, DATA_SCIENCE_TITLE, DATA_SCIENCE_URL, DOCS_TITLE, DOCS_URL, HOME_TITLE, HOME_URL, KMM_DOCS_TITLE, KMM_DOCS_URL, KOTLIN_DOCS_TITLE, KOTLIN_DOCS_URL, MULTIPLATFORM_LIBRARIES_TITLE, MULTIPLATFORM_LIBRARIES_URL, MULTIPLATFORM_MOBILE_TITLE, MULTIPLATFORM_MOBILE_URL, PLAY_EXAMPLES_TITLE, PLAY_EXAMPLES_URL, PLAY_HANDSON_TITLE, PLAY_HANDSON_URL, PLAY_KOANS_TITLE, PLAY_KOANS_URL, PLAY_TITLE, PLAY_TITLE_FULL, PLAY_URL, SERVER_SIDE_TITLE, SERVER_SIDE_URL, SOLUTIONS_TITLE, TEACH_TITLE, TEACH_URL, getNavScheme } from './nav-scheme.js';
@@ -6,10 +6,8 @@ const MULTIPLATFORM_MOBILE_TITLE = 'Multiplatform Mobile';
6
6
  const MULTIPLATFORM_MOBILE_URL = `/lp/mobile/`;
7
7
  const SERVER_SIDE_TITLE = 'Server-side';
8
8
  const SERVER_SIDE_URL = `/lp/server-side/`;
9
- const WEB_FRONTEND_TITLE = 'Web frontend';
10
- const WEB_FRONTEND_URL = `/docs/js-overview.html`;
11
- const MULTIPLATFORM_OTHERS_TITLE = 'Multiplatform for other platforms';
12
- const MULTIPLATFORM_OTHERS_URL = '/docs/multiplatform.html';
9
+ const MULTIPLATFORM_LIBRARIES_TITLE = 'Multiplatform libraries';
10
+ const MULTIPLATFORM_LIBRARIES_URL = '/docs/multiplatform-library.html';
13
11
  const DATA_SCIENCE_TITLE = 'Data science';
14
12
  const DATA_SCIENCE_URL = `/docs/data-science-overview.html`;
15
13
  const ANDROID_TITLE = 'Android';
@@ -43,14 +41,11 @@ const navScheme = [{
43
41
  title: MULTIPLATFORM_MOBILE_TITLE,
44
42
  url: MULTIPLATFORM_MOBILE_URL
45
43
  }, {
46
- title: MULTIPLATFORM_OTHERS_TITLE,
47
- url: MULTIPLATFORM_OTHERS_URL
44
+ title: MULTIPLATFORM_LIBRARIES_TITLE,
45
+ url: MULTIPLATFORM_LIBRARIES_URL
48
46
  }, {
49
47
  title: SERVER_SIDE_TITLE,
50
48
  url: SERVER_SIDE_URL
51
- }, {
52
- title: WEB_FRONTEND_TITLE,
53
- url: WEB_FRONTEND_URL
54
49
  }, {
55
50
  title: DATA_SCIENCE_TITLE,
56
51
  url: DATA_SCIENCE_URL
@@ -138,4 +133,4 @@ function makeExternalUrl(url, currentUrl, isPlayground) {
138
133
  return url;
139
134
  }
140
135
 
141
- export { ANDROID_TITLE, ANDROID_URL, COMMUNITY_TITLE, COMMUNITY_URL, DATA_SCIENCE_TITLE, DATA_SCIENCE_URL, DOCS_TITLE, DOCS_URL, HOME_TITLE, HOME_URL, KMM_DOCS_TITLE, KMM_DOCS_URL, KOTLIN_DOCS_TITLE, KOTLIN_DOCS_URL, MULTIPLATFORM_MOBILE_TITLE, MULTIPLATFORM_MOBILE_URL, MULTIPLATFORM_OTHERS_TITLE, MULTIPLATFORM_OTHERS_URL, PLAY_EXAMPLES_TITLE, PLAY_EXAMPLES_URL, PLAY_HANDSON_TITLE, PLAY_HANDSON_URL, PLAY_KOANS_TITLE, PLAY_KOANS_URL, PLAY_TITLE, PLAY_TITLE_FULL, PLAY_URL, SERVER_SIDE_TITLE, SERVER_SIDE_URL, SOLUTIONS_TITLE, TEACH_TITLE, TEACH_URL, WEB_FRONTEND_TITLE, WEB_FRONTEND_URL, getNavScheme };
136
+ export { ANDROID_TITLE, ANDROID_URL, COMMUNITY_TITLE, COMMUNITY_URL, DATA_SCIENCE_TITLE, DATA_SCIENCE_URL, DOCS_TITLE, DOCS_URL, HOME_TITLE, HOME_URL, KMM_DOCS_TITLE, KMM_DOCS_URL, KOTLIN_DOCS_TITLE, KOTLIN_DOCS_URL, MULTIPLATFORM_LIBRARIES_TITLE, MULTIPLATFORM_LIBRARIES_URL, MULTIPLATFORM_MOBILE_TITLE, MULTIPLATFORM_MOBILE_URL, PLAY_EXAMPLES_TITLE, PLAY_EXAMPLES_URL, PLAY_HANDSON_TITLE, PLAY_HANDSON_URL, PLAY_KOANS_TITLE, PLAY_KOANS_URL, PLAY_TITLE, PLAY_TITLE_FULL, PLAY_URL, SERVER_SIDE_TITLE, SERVER_SIDE_URL, SOLUTIONS_TITLE, TEACH_TITLE, TEACH_URL, getNavScheme };
@@ -21,6 +21,14 @@
21
21
  }
22
22
  }
23
23
 
24
+ .ktl-quotes-slider-module_icon-container-dark-theme_YwVUC svg > path {
25
+ fill: #ffffff;
26
+ }
27
+
28
+ .ktl-quotes-slider-module_quote-text_u-x9D {
29
+ margin: 0;
30
+ }
31
+
24
32
  .ktl-quotes-slider-module_nav_0aZMC {
25
33
  margin-top: 16px;
26
34
  }
@@ -35,10 +43,6 @@
35
43
  }
36
44
  }
37
45
 
38
- .ktl-quotes-slider-module_title_wOsKl p {
39
- color: var(--ktl-icon-color-dark);
40
- }
41
-
42
46
  .ktl-quotes-slider-module_controls_OuyQ8 {
43
47
  display: flex;
44
48
  align-items: center;
@@ -68,10 +72,6 @@
68
72
  opacity: 1;
69
73
  }
70
74
 
71
- .ktl-quotes-slider-module_control-prev_9eMAN {
72
- transform: scale(-1);
73
- }
74
-
75
75
  .ktl-quotes-slider-module_slides-count_T0-Ln {
76
76
  margin: 0 30px;
77
77
  -webkit-user-select: none;
@@ -80,7 +80,3 @@
80
80
  min-width: 40px;
81
81
  text-align: center;
82
82
  }
83
-
84
- .ktl-quotes-slider-module_slides-count_T0-Ln p {
85
- color: var(--ktl-icon-color-dark);
86
- }
@@ -1,3 +1,3 @@
1
1
  import './index.css';
2
- import { QuotesSlider } from './quites-slider.js';
3
- export { QuotesSlider as default } from './quites-slider.js';
2
+ import { QuotesSlider } from './quotes-slider.js';
3
+ export { QuotesSlider as default } from './quotes-slider.js';
@@ -1,8 +1,10 @@
1
1
  import React__default, { useState, useCallback } from 'react';
2
2
  import SwipeableViews from 'react-swipeable-views';
3
+ import { ArrowLeftIcon, ArrowRightIcon } from '@rescui/icons';
4
+ import { useTheme } from '@rescui/ui-contexts';
5
+ import { useTextStyles } from '@rescui/typography';
3
6
  import cn from 'classnames';
4
7
  import SvgQuote from './quote.svg.js';
5
- import SvgSliderArrow from './slider-arrow.svg.js';
6
8
  import styles from './quotes-slider.module.pcss.js';
7
9
 
8
10
  const QuotesSlider = ({
@@ -31,40 +33,50 @@ const QuotesSlider = ({
31
33
  const nextButtonClass = cn(styles.control, {
32
34
  [styles.controlActive]: index + 1 < totalSlides
33
35
  });
34
- const quoteTextClass = large ? 'ktl-subtitle' : 'ktl-text-1';
36
+ const textCn = useTextStyles();
37
+ const theme = useTheme();
38
+ const quoteTextClass = large ? textCn('rs-subtitle-2') : textCn('rs-text-1');
35
39
  return React__default.createElement("div", {
36
- className: styles.quotesSlider
40
+ className: cn(styles.quotesSlider, {
41
+ [styles.quotesSliderDarkTheme]: theme === 'dark'
42
+ })
37
43
  }, React__default.createElement("div", {
38
44
  className: styles.content
39
45
  }, React__default.createElement("div", {
40
- className: styles.iconContainer
46
+ className: cn(styles.iconContainer, {
47
+ [styles.iconContainerDarkTheme]: theme === 'dark'
48
+ })
41
49
  }, React__default.createElement(SvgQuote, null)), React__default.createElement("div", null, quotes.length > 1 ? React__default.createElement(SwipeableViews, {
42
50
  index: index,
43
51
  onChangeIndex: handleChangeIndex
44
52
  }, quotes.map((quote, i) => React__default.createElement("p", {
45
- className: quoteTextClass,
53
+ className: cn(quoteTextClass, styles.quoteText),
46
54
  key: i
47
55
  }, quote.text))) : React__default.createElement("p", {
48
- className: quoteTextClass
56
+ className: cn(quoteTextClass, styles.quoteText)
49
57
  }, quotes[0].text), React__default.createElement("div", {
50
58
  className: styles.nav
51
59
  }, React__default.createElement("div", {
52
60
  className: styles.title
53
61
  }, React__default.createElement("p", {
54
- className: "ktl-text-2"
62
+ className: textCn('rs-text-2')
55
63
  }, slideTitle)), quotes.length > 1 && React__default.createElement("div", {
56
64
  className: styles.controls
57
65
  }, React__default.createElement("div", {
58
66
  className: prevButtonClass,
59
67
  onClick: handlePrevSlide
60
- }, React__default.createElement(SvgSliderArrow, null)), React__default.createElement("div", {
68
+ }, React__default.createElement(ArrowLeftIcon, {
69
+ theme: theme
70
+ })), React__default.createElement("div", {
61
71
  className: styles.slidesCount
62
72
  }, React__default.createElement("p", {
63
- className: "ktl-text-2"
73
+ className: textCn('rs-text-2')
64
74
  }, index + 1, "/", totalSlides)), React__default.createElement("div", {
65
75
  className: nextButtonClass,
66
76
  onClick: handleNextSlide
67
- }, React__default.createElement(SvgSliderArrow, null)))))));
77
+ }, React__default.createElement(ArrowRightIcon, {
78
+ theme: theme
79
+ })))))));
68
80
  };
69
81
 
70
82
  export { QuotesSlider };
@@ -2,12 +2,12 @@ var styles = {
2
2
  "quotesSlider": "ktl-quotes-slider-module_quotes-slider_y2xdf",
3
3
  "content": "ktl-quotes-slider-module_content_ycgWG",
4
4
  "iconContainer": "ktl-quotes-slider-module_icon-container_tRSxF",
5
+ "iconContainerDarkTheme": "ktl-quotes-slider-module_icon-container-dark-theme_YwVUC",
6
+ "quoteText": "ktl-quotes-slider-module_quote-text_u-x9D",
5
7
  "nav": "ktl-quotes-slider-module_nav_0aZMC",
6
- "title": "ktl-quotes-slider-module_title_wOsKl",
7
8
  "controls": "ktl-quotes-slider-module_controls_OuyQ8",
8
9
  "control": "ktl-quotes-slider-module_control_eN3Tf",
9
10
  "controlActive": "ktl-quotes-slider-module_control-active_sE-QK",
10
- "controlPrev": "ktl-quotes-slider-module_control-prev_9eMAN",
11
11
  "slidesCount": "ktl-quotes-slider-module_slides-count_T0-Ln"
12
12
  };
13
13
  export { styles as default };
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.4.6",
4
+ "version": "4.5.0-alpha.0",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
7
7
  "files": [
@@ -1,33 +0,0 @@
1
- import * as React from 'react';
2
-
3
- var _path;
4
-
5
- function _extends() {
6
- _extends = Object.assign || function (target) {
7
- for (var i = 1; i < arguments.length; i++) {
8
- var source = arguments[i];
9
-
10
- for (var key in source) {
11
- if (Object.prototype.hasOwnProperty.call(source, key)) {
12
- target[key] = source[key];
13
- }
14
- }
15
- }
16
-
17
- return target;
18
- };
19
-
20
- return _extends.apply(this, arguments);
21
- }
22
-
23
- const SvgSliderArrow = props => /*#__PURE__*/React.createElement("svg", _extends({
24
- width: 19,
25
- height: 14,
26
- fill: "none",
27
- xmlns: "http://www.w3.org/2000/svg"
28
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
29
- d: "M19 7.1 11 14V8.1H0v-2h11V.3l8 6.8Z",
30
- fill: "currentColor"
31
- })));
32
-
33
- export { SvgSliderArrow as default };