@pushwoosh/kit-typography 1.7.5 → 1.8.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.
@@ -9,7 +9,7 @@ npm install @pushwoosh/kit-typography
9
9
  ```
10
10
 
11
11
  ## Core Dependencies
12
- - **react**: >= 16.14.0 (peer dependency)
12
+ - **react**: >= 18.0.0 (peer dependency)
13
13
  - **styled-components**: >= 5.3.3 (peer dependency)
14
14
  - **@pushwoosh/kit-constants**: Typography constants (fonts, sizes, weights, line-heights, colors)
15
15
 
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { CodeProps } from './code.types';
1
+ import { type CodeProps } from './code.types';
3
2
  export declare function Code(props: CodeProps): JSX.Element;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CodeBox } from './code.styles';
3
3
  export function Code(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(CodeBox, {
8
+ return _jsx(CodeBox, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type CodeProps = Omit<JSX.IntrinsicElements['div'], 'ref'> & {
3
3
  readonly boxRef?: React.Ref<HTMLDivElement>;
4
4
  readonly children: React.ReactNode;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { FootnoteProps } from './footnote.types';
1
+ import { type FootnoteProps } from './footnote.types';
3
2
  export declare function Footnote(props: FootnoteProps): JSX.Element;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { FootnoteBox } from './footnote.styles';
3
3
  export function Footnote(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(FootnoteBox, {
8
+ return _jsx(FootnoteBox, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type FootnoteProps = Omit<JSX.IntrinsicElements['div'], 'ref'> & {
3
3
  readonly boxRef?: React.Ref<HTMLDivElement>;
4
4
  readonly children: React.ReactNode;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { H1Props } from './h1.types';
1
+ import { type H1Props } from './h1.types';
3
2
  export declare function H1(props: H1Props): JSX.Element;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { H1Box } from './h1.styles';
3
3
  export function H1(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(H1Box, {
8
+ return _jsx(H1Box, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
package/h1/h1.types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type H1Props = Omit<JSX.IntrinsicElements['h1'], 'ref'> & {
3
3
  readonly boxRef?: React.Ref<HTMLHeadingElement>;
4
4
  readonly children: React.ReactNode;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { H2Props } from './h2.types';
1
+ import { type H2Props } from './h2.types';
3
2
  export declare function H2(props: H2Props): JSX.Element;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { H2Box } from './h2.styles';
3
3
  export function H2(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(H2Box, {
8
+ return _jsx(H2Box, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
package/h2/h2.types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type H2Props = Omit<JSX.IntrinsicElements['h2'], 'ref'> & {
3
3
  readonly boxRef?: React.Ref<HTMLHeadingElement>;
4
4
  readonly children: React.ReactNode;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { H3Props } from './h3.types';
1
+ import { type H3Props } from './h3.types';
3
2
  export declare function H3(props: H3Props): JSX.Element;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { H3Box } from './h3.styles';
3
3
  export function H3(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(H3Box, {
8
+ return _jsx(H3Box, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
package/h3/h3.types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type H3Props = Omit<JSX.IntrinsicElements['h3'], 'ref'> & {
3
3
  readonly boxRef?: React.Ref<HTMLHeadingElement>;
4
4
  readonly children: React.ReactNode;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { H4Props } from './h4.types';
1
+ import { type H4Props } from './h4.types';
3
2
  export declare function H4(props: H4Props): JSX.Element;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { H4Box } from './h4.styles';
3
3
  export function H4(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(H4Box, {
8
+ return _jsx(H4Box, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
package/h4/h4.types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type H4Props = Omit<JSX.IntrinsicElements['h4'], 'ref'> & {
3
3
  readonly boxRef?: React.Ref<HTMLHeadingElement>;
4
4
  readonly children: React.ReactNode;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { H5Props } from './h5.types';
1
+ import { type H5Props } from './h5.types';
3
2
  export declare function H5(props: H5Props): JSX.Element;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { H5Box } from './h5.styles';
3
3
  export function H5(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(H5Box, {
8
+ return _jsx(H5Box, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
package/h5/h5.types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type H5Props = Omit<JSX.IntrinsicElements['h5'], 'ref'> & {
3
3
  readonly boxRef?: React.Ref<HTMLHeadingElement>;
4
4
  readonly children: React.ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pushwoosh/kit-typography",
3
- "version": "1.7.5",
3
+ "version": "1.8.0",
4
4
  "description": "React component for build Pushwoosh products",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -11,7 +11,8 @@
11
11
  "build": "pushwoosh-engine lib:build && cp ai-documentation.md dist/ai-documentation.md",
12
12
  "playground": "pushwoosh-engine lib:playground",
13
13
  "check": "npm run check:lint && npm run check:types",
14
- "check:lint": "echo \"Run check:lint\" && eslint .",
14
+ "check:lint": "echo \"Run check:lint\" && NODE_ENV=production eslint ./src",
15
+ "check:lint-fix": "echo \"Run check:lint\" && NODE_ENV=production eslint ./src --fix",
15
16
  "check:types": "echo \"Run check:types\" && pushwoosh-engine lib:check-types"
16
17
  },
17
18
  "pre-commit": "check",
@@ -19,28 +20,18 @@
19
20
  "@pushwoosh/kit-constants": "^1.6.0"
20
21
  },
21
22
  "devDependencies": {
22
- "@pushwoosh/frontend-builder-engine": "^0.1.5",
23
- "@types/react": "^16.14.20",
24
- "@types/react-dom": "^16.9.14",
23
+ "@pushwoosh/frontend-builder-engine": "^3.0.0",
24
+ "@types/react": "^18.3.2",
25
+ "@types/react-dom": "^18.3.0",
25
26
  "@types/styled-components": "^5.1.34",
26
- "@typescript-eslint/eslint-plugin": "^7.3.1",
27
- "@typescript-eslint/parser": "^7.3.1",
28
27
  "cross-env": "^7.0.3",
29
- "eslint": "^8.31.0",
30
- "eslint-config-airbnb": "^19.0.4",
31
- "eslint-config-airbnb-typescript": "^18.0.0",
32
- "eslint-import-resolver-alias": "^1.1.2",
33
- "eslint-plugin-import": "^2.25.2",
34
- "eslint-plugin-jsx-a11y": "^6.4.1",
35
- "eslint-plugin-react": "^7.26.1",
36
- "eslint-plugin-react-hooks": "^4.2.0",
37
28
  "pre-commit": "^1.2.2",
38
- "react": "^16.14.0",
39
- "react-dom": "^16.14.0",
29
+ "react": "^18.3.1",
30
+ "react-dom": "^18.3.1",
40
31
  "styled-components": "^5.3.11"
41
32
  },
42
33
  "peerDependencies": {
43
- "react": ">= 16.14.0",
34
+ "react": ">=18.0.0",
44
35
  "styled-components": ">=5.3.3"
45
36
  },
46
37
  "engines": {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
- import { ParagraphProps } from './paragraph.types';
1
+ import { type ParagraphProps } from './paragraph.types';
3
2
  export declare function Paragraph(props: ParagraphProps): JSX.Element;
@@ -1,11 +1,11 @@
1
- import React from 'react';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ParagraphBox } from './paragraph.styles';
3
3
  export function Paragraph(props) {
4
4
  const {
5
5
  boxRef,
6
6
  ...rest
7
7
  } = props;
8
- return React.createElement(ParagraphBox, {
8
+ return _jsx(ParagraphBox, {
9
9
  ...rest,
10
10
  ref: boxRef
11
11
  });
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import type React from 'react';
2
2
  export type ParagraphProps = Omit<JSX.IntrinsicElements['p'], 'ref'> & {
3
3
  readonly boxRef?: React.Ref<HTMLParagraphElement>;
4
4
  readonly children: React.ReactNode;
package/text/Text.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { type TypographyVariant } from '../map';
2
2
  export declare const Text: import("styled-components").StyledComponent<"span", any, {
3
- $color?: string | undefined;
4
- $uppercase?: boolean | undefined;
5
- $ellipsis?: boolean | undefined;
6
- $variant?: TypographyVariant | undefined;
3
+ $color?: string;
4
+ $uppercase?: boolean;
5
+ $ellipsis?: boolean;
6
+ $variant?: TypographyVariant;
7
7
  }, never>;