react-restyle-components 0.2.18 → 0.2.20

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/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {
@@ -43,6 +43,7 @@
43
43
  "@types/node": "^16.18.113",
44
44
  "@types/react": "^18.3.11",
45
45
  "@types/react-dom": "^18.3.0",
46
+ "buffer": "^6.0.3",
46
47
  "dayjs": "^1.11.1",
47
48
  "jest-environment-jsdom": "^29.7.0",
48
49
  "react-colorful": "^5.6.1",
@@ -3,7 +3,7 @@ import { Style } from '@react-pdf/types';
3
3
  interface PdfTextProps {
4
4
  fontWeight?: 'bold' | 'medium' | 'normal';
5
5
  fontSize?: number;
6
- fontFamily?: 'ArimaRegular' | string;
6
+ fontFamily?: 'ArimaRegular' | 'ArimaBold' | string;
7
7
  textAlign?: 'center' | 'left' | 'right';
8
8
  style?: Style | Style[];
9
9
  lineHeight?: number;
@@ -11,10 +11,10 @@ interface PdfTextProps {
11
11
  fixed?: boolean;
12
12
  children?: React.ReactNode;
13
13
  }
14
- export declare const PdfHeading: ({ fontWeight, fontSize, fontFamily, style, children, }: PdfTextProps) => React.JSX.Element;
15
- export declare const PdfSubHeading: ({ fontWeight, fontSize, fontFamily, style, children, }: PdfTextProps) => React.JSX.Element;
16
- export declare const PdfMedium: ({ fontWeight, fontSize, textAlign, fontFamily, style, children, }: PdfTextProps) => React.JSX.Element;
17
- export declare const PdfRegular: ({ fontWeight, fontSize, textAlign, fontFamily, style, children, }: PdfTextProps) => React.JSX.Element;
18
- export declare const PdfSmall: ({ fontSize, fontFamily, fontWeight, textAlign, lineHeight, fixed, style, children, }: PdfTextProps) => React.JSX.Element;
14
+ export declare const PdfHeading: ({ fontWeight, fontSize, style, children, }: PdfTextProps) => React.JSX.Element;
15
+ export declare const PdfSubHeading: ({ fontWeight, fontSize, style, children, }: PdfTextProps) => React.JSX.Element;
16
+ export declare const PdfMedium: ({ fontWeight, fontSize, textAlign, style, children, }: PdfTextProps) => React.JSX.Element;
17
+ export declare const PdfRegular: ({ fontWeight, fontSize, textAlign, style, children, }: PdfTextProps) => React.JSX.Element;
18
+ export declare const PdfSmall: ({ fontSize, fontWeight, textAlign, lineHeight, fixed, style, children, }: PdfTextProps) => React.JSX.Element;
19
19
  export declare const PdfPageNumber: ({ style, bottom }: PdfTextProps) => React.JSX.Element;
20
20
  export {};
@@ -14,44 +14,39 @@ Font.register({
14
14
  family: 'ArimaRegular',
15
15
  src: '../../../library/assets/fonts/arima/arima-regular.ttf',
16
16
  });
17
- export const PdfHeading = ({ fontWeight = 'bold', fontSize = 22, fontFamily = 'ArimaRegular', style, children, }) => {
17
+ export const PdfHeading = ({ fontWeight = 'bold', fontSize = 22, style, children, }) => {
18
18
  return (React.createElement(Text, { style: {
19
19
  fontWeight: fontWeight,
20
20
  fontSize: fontSize,
21
- fontFamily: fontFamily,
22
21
  ...style,
23
22
  } }, children));
24
23
  };
25
- export const PdfSubHeading = ({ fontWeight = 'bold', fontSize = 20, fontFamily = 'ArimaRegular', style, children, }) => {
24
+ export const PdfSubHeading = ({ fontWeight = 'bold', fontSize = 20, style, children, }) => {
26
25
  return (React.createElement(Text, { style: {
27
26
  fontWeight: fontWeight,
28
27
  fontSize: fontSize,
29
- fontFamily: fontFamily,
30
28
  ...style,
31
29
  } }, children));
32
30
  };
33
- export const PdfMedium = ({ fontWeight = 'medium', fontSize = 16, textAlign = 'left', fontFamily = 'ArimaRegular', style, children, }) => {
31
+ export const PdfMedium = ({ fontWeight = 'medium', fontSize = 16, textAlign = 'left', style, children, }) => {
34
32
  return (React.createElement(Text, { style: {
35
33
  fontWeight: fontWeight,
36
34
  fontSize: fontSize,
37
- fontFamily: fontFamily,
38
35
  textAlign: textAlign,
39
36
  ...style,
40
37
  } }, children));
41
38
  };
42
- export const PdfRegular = ({ fontWeight = 'normal', fontSize = 12, textAlign = 'left', fontFamily = 'ArimaRegular', style, children, }) => {
39
+ export const PdfRegular = ({ fontWeight = 'normal', fontSize = 12, textAlign = 'left', style, children, }) => {
43
40
  return (React.createElement(Text, { style: {
44
41
  fontWeight: fontWeight,
45
42
  fontSize: fontSize,
46
- fontFamily: fontFamily,
47
43
  textAlign: textAlign,
48
44
  ...style,
49
45
  } }, children));
50
46
  };
51
- export const PdfSmall = ({ fontSize = 10, fontFamily = 'ArimaRegular', fontWeight = 'normal', textAlign = 'left', lineHeight = 0, fixed = false, style, children, }) => {
47
+ export const PdfSmall = ({ fontSize = 10, fontWeight = 'normal', textAlign = 'left', lineHeight = 0, fixed = false, style, children, }) => {
52
48
  return (React.createElement(Text, { style: {
53
49
  fontSize: fontSize,
54
- fontFamily: fontFamily,
55
50
  fontWeight: fontWeight,
56
51
  lineHeight: lineHeight,
57
52
  textAlign: textAlign,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-restyle-components",
3
- "version": "0.2.18",
3
+ "version": "0.2.20",
4
4
  "private": false,
5
5
  "description": "Easy use restyle components",
6
6
  "author": {
@@ -43,6 +43,7 @@
43
43
  "@types/node": "^16.18.113",
44
44
  "@types/react": "^18.3.11",
45
45
  "@types/react-dom": "^18.3.0",
46
+ "buffer": "^6.0.3",
46
47
  "dayjs": "^1.11.1",
47
48
  "jest-environment-jsdom": "^29.7.0",
48
49
  "react-colorful": "^5.6.1",