@jetbrains/kotlin-web-site-ui 0.0.0-foundation-changes.1 → 0.0.0-foundation-changes.2

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.
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { CtaBlock as CtaBlock$1 } from './v2/cta-block.js';
3
+
4
+ function CtaBlock(props) {
5
+ if (props.adaptive !== 'layout') {
6
+ const {
7
+ adaptive,
8
+ ...rest
9
+ } = props;
10
+ return React.createElement(CtaBlock$1, { ...rest
11
+ });
12
+ }
13
+
14
+ const {
15
+ adaptive,
16
+ ...rest
17
+ } = props;
18
+ return React.createElement(CtaBlock$1, { ...rest
19
+ });
20
+ }
21
+
22
+ export { CtaBlock };
@@ -0,0 +1,6 @@
1
+ import './index.css';
2
+ import { CtaBlock as CtaBlock$1 } from './cta-block.js';
3
+ export { CtaBlock as CtaBlockV1 } from './v1/cta-block.js';
4
+ export { CtaBlock as CtaBlockV2 } from './v2/cta-block.js';
5
+ const CtaBlock = CtaBlock$1;
6
+ export { CtaBlock as default };
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import cn from 'classnames';
3
+ import 'bem-cn-fast';
4
+ import { useTextStyles } from '../../typography/hooks.js';
5
+ import styles from './cta-block.module.pcss.js';
6
+
7
+ function CtaBlock({
8
+ className,
9
+ theme,
10
+ classTopTitle,
11
+ topTitle,
12
+ classMainTitle,
13
+ mainTitle,
14
+ classContent,
15
+ children,
16
+ classButtons,
17
+ buttons
18
+ }) {
19
+ const textCn = useTextStyles(theme || 'dark');
20
+ return React.createElement("div", {
21
+ className: cn(className, styles.wrapper)
22
+ }, React.createElement("div", {
23
+ className: cn(styles.layout, 'ktl-layout ktl-layout--center')
24
+ }, topTitle && React.createElement("div", {
25
+ className: cn(classTopTitle, styles.topTitle, textCn('ktl-text-3'))
26
+ }, topTitle), React.createElement("h2", {
27
+ className: cn(classMainTitle, styles.mainTitle, textCn('ktl-hero'))
28
+ }, mainTitle), children && React.createElement("div", {
29
+ className: cn(classContent, styles.content)
30
+ }, children), buttons && React.createElement("div", {
31
+ className: cn(classButtons, styles.buttons)
32
+ }, buttons)));
33
+ }
34
+
35
+ export { CtaBlock };
@@ -0,0 +1,9 @@
1
+ var styles = {
2
+ "wrapper": "ktl-cta-block-module_wrapper_pE-pv",
3
+ "topTitle": "ktl-cta-block-module_top-title_8ly2n",
4
+ "mainTitle": "ktl-cta-block-module_main-title_iq1p4",
5
+ "content": "ktl-cta-block-module_content_QQ4PV",
6
+ "buttons": "ktl-cta-block-module_buttons_KPToV",
7
+ "layout": "ktl-cta-block-module_layout_ExLIm"
8
+ };
9
+ export { styles as default };
@@ -0,0 +1,26 @@
1
+ import bemCnFast from 'bem-cn-fast';
2
+
3
+ function createTextCn(theme) {
4
+ if (!theme) {
5
+ throw new TypeError('theme argument is required');
6
+ }
7
+
8
+ function textCn(type = 'ktl-text-1', params = {
9
+ paragraphOffsetAuto: false,
10
+ hardness: undefined,
11
+ external: false,
12
+ mode: undefined
13
+ }) {
14
+ return bemCnFast(type)({
15
+ 'paragraph-offset-auto': params.paragraphOffsetAuto,
16
+ hardness: params.hardness,
17
+ external: params.external,
18
+ mode: params.mode,
19
+ theme
20
+ });
21
+ }
22
+
23
+ return textCn;
24
+ }
25
+
26
+ export { createTextCn };
@@ -0,0 +1,6 @@
1
+ import { useTheme } from '@rescui/ui-contexts';
2
+ import { createTextCn } from './create-text-cn.js';
3
+
4
+ const useTextStyles = theme => createTextCn(useTheme(theme));
5
+
6
+ export { useTextStyles };
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": "0.0.0-foundation-changes.1",
4
+ "version": "0.0.0-foundation-changes.2",
5
5
  "license": "Apache-2.0",
6
6
  "author": "JetBrains",
7
7
  "files": [
@@ -1,7 +0,0 @@
1
- import './index.css';
2
- import 'react';
3
- import 'classnames';
4
- import 'bem-cn-fast';
5
- import '@rescui/ui-contexts';
6
- import { CtaBlock } from './v1/cta-block.js';
7
- export { CtaBlock as default } from './v1/cta-block.js';