@hero-design/rn 9.5.3-rc.0 → 9.5.4-test.1

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.
@@ -3,6 +3,6 @@ $ rollup -c
3
3
  
4
4
  src/index.ts → lib/index.js, es/index.js...
5
5
  (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
6
- (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/root/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
7
- created lib/index.js, es/index.js in 24s
6
+ (!) Plugin node-resolve: preferring built-in module 'events' over local alternative at '/home/runner/work/hero-design/hero-design/node_modules/events/events.js', pass 'preferBuiltins: false' to disable this behavior or 'preferBuiltins: true' to disable this warning
7
+ created lib/index.js, es/index.js in 57.4s
8
8
  $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # @hero-design/rn
2
+
3
+ ## 9.5.4-test.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`b60dd7df3`](https://github.com/Thinkei/hero-design/commit/b60dd7df3f2b40cbd00eaa6a66db55c28f0f8245)]:
8
+ - @hero-design/colors@9.5.4-test.1
package/es/index.js CHANGED
@@ -15107,18 +15107,12 @@ var SectionHeading = function SectionHeading(_ref) {
15107
15107
  var icon = _ref.icon,
15108
15108
  text = _ref.text,
15109
15109
  rightChildren = _ref.rightChildren,
15110
- _ref$fontSize = _ref.fontSize,
15111
- fontSize = _ref$fontSize === void 0 ? 'large' : _ref$fontSize,
15112
15110
  _ref$intent = _ref.intent,
15113
15111
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
15114
- _ref$fontWeight = _ref.fontWeight,
15115
- fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
15116
15112
  _ref$size = _ref.size,
15117
15113
  size = _ref$size === void 0 ? 'medium' : _ref$size,
15118
15114
  style = _ref.style,
15119
15115
  testID = _ref.testID;
15120
- useDeprecation("SectionHeading's fontSize prop is deprecated and will be removed in the next major release, please remove it.", fontSize !== undefined);
15121
- useDeprecation("SectionHeading's fontWeight prop is deprecated and will be removed in the next major release, please remove it.", fontWeight !== undefined);
15122
15116
  return /*#__PURE__*/React.createElement(StyledHeading, {
15123
15117
  themeSize: size,
15124
15118
  style: style,
package/lib/index.js CHANGED
@@ -15137,18 +15137,12 @@ var SectionHeading = function SectionHeading(_ref) {
15137
15137
  var icon = _ref.icon,
15138
15138
  text = _ref.text,
15139
15139
  rightChildren = _ref.rightChildren,
15140
- _ref$fontSize = _ref.fontSize,
15141
- fontSize = _ref$fontSize === void 0 ? 'large' : _ref$fontSize,
15142
15140
  _ref$intent = _ref.intent,
15143
15141
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
15144
- _ref$fontWeight = _ref.fontWeight,
15145
- fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
15146
15142
  _ref$size = _ref.size,
15147
15143
  size = _ref$size === void 0 ? 'medium' : _ref$size,
15148
15144
  style = _ref.style,
15149
15145
  testID = _ref.testID;
15150
- useDeprecation("SectionHeading's fontSize prop is deprecated and will be removed in the next major release, please remove it.", fontSize !== undefined);
15151
- useDeprecation("SectionHeading's fontWeight prop is deprecated and will be removed in the next major release, please remove it.", fontWeight !== undefined);
15152
15146
  return /*#__PURE__*/React__default["default"].createElement(StyledHeading, {
15153
15147
  themeSize: size,
15154
15148
  style: style,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "9.5.3-rc.0",
3
+ "version": "9.5.4-test.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -15,20 +15,20 @@
15
15
  "build:types": "tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json",
16
16
  "build": "yarn build:js && yarn build:types",
17
17
  "build:watch": "yarn build:js -w & yarn build:types -w",
18
- "publish:npm": "yarn publish --access public",
18
+ "publish:npm": "changeset publish --access public --no-git-tag --snapshot",
19
19
  "set-dev-env": "npm pkg set react-native=src/index.ts"
20
20
  },
21
21
  "dependencies": {
22
22
  "@emotion/native": "^11.9.3",
23
23
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "9.5.3-rc.0",
24
+ "@hero-design/colors": "9.5.4-test.1",
25
25
  "date-fns": "^2.30.0",
26
26
  "events": "^3.2.0",
27
27
  "hero-editor": "^1.9.21",
28
28
  "nanoid": "^4.0.2"
29
29
  },
30
30
  "peerDependencies": {
31
- "@hero-design/react-native-month-year-picker": "9.5.3-rc.0",
31
+ "@hero-design/react-native-month-year-picker": "9.5.4-rc.0",
32
32
  "@react-native-community/datetimepicker": "^3.5.2",
33
33
  "@react-native-community/slider": "4.1.12",
34
34
  "react": "18.0.0",
@@ -47,8 +47,8 @@
47
47
  "@babel/preset-typescript": "^7.17.12",
48
48
  "@babel/runtime": "^7.18.9",
49
49
  "@emotion/jest": "^11.11.0",
50
- "@hero-design/eslint-plugin": "9.5.3-rc.0",
51
- "@hero-design/react-native-month-year-picker": "9.5.3-rc.0",
50
+ "@hero-design/eslint-plugin": "9.5.4-rc.0",
51
+ "@hero-design/react-native-month-year-picker": "9.5.4-rc.0",
52
52
  "@react-native-community/datetimepicker": "^3.5.2",
53
53
  "@react-native-community/slider": "4.1.12",
54
54
  "@rollup/plugin-babel": "^5.3.1",
@@ -64,12 +64,12 @@
64
64
  "@types/react-native": "^0.67.7",
65
65
  "@types/react-native-vector-icons": "^6.4.10",
66
66
  "babel-plugin-inline-import": "^3.0.0",
67
- "eslint-config-hd": "9.5.3-rc.0",
67
+ "eslint-config-hd": "9.5.4-rc.0",
68
68
  "eslint-plugin-import": "^2.27.5",
69
69
  "jest": "^29.6.2",
70
70
  "jest-environment-jsdom": "^29.6.2",
71
71
  "jest-junit": "^16.0.0",
72
- "prettier-config-hd": "9.5.3-rc.0",
72
+ "prettier-config-hd": "9.5.4-rc.0",
73
73
  "react": "18.0.0",
74
74
  "react-native": "0.69.7",
75
75
  "react-native-gesture-handler": "~2.5.0",
@@ -45,7 +45,6 @@ describe('SectionHeading', () => {
45
45
  <SectionHeading
46
46
  text="test demo"
47
47
  intent="primary"
48
- fontSize="large"
49
48
  icon={<Icon icon="home" intent="danger" />}
50
49
  />
51
50
  );
@@ -1,6 +1,7 @@
1
- import React from 'react';
2
1
  import type { ReactElement } from 'react';
2
+ import React from 'react';
3
3
  import type { StyleProp, ViewProps, ViewStyle } from 'react-native';
4
+ import type { IconName, IconProps } from '../Icon';
4
5
  import Icon from '../Icon';
5
6
  import Typography from '../Typography';
6
7
  import {
@@ -8,8 +9,6 @@ import {
8
9
  StyledIconWrapper,
9
10
  StyledWrapper,
10
11
  } from './StyledHeading';
11
- import type { IconName, IconProps } from '../Icon';
12
- import { useDeprecation } from '../../utils/hooks';
13
12
 
14
13
  export interface SectionHeadingProps extends ViewProps {
15
14
  /**
@@ -24,16 +23,6 @@ export interface SectionHeadingProps extends ViewProps {
24
23
  * Right corner content
25
24
  */
26
25
  rightChildren?: ReactElement;
27
- /**
28
- * @deprecated fontSize will be removed in the next major release.
29
- * Size of the text.
30
- */
31
- fontSize?: 'small' | 'medium' | 'large' | 'xlarge';
32
- /**
33
- * @deprecated fontWeight will be removed in the next major release.
34
- * Heading's font-weight.
35
- */
36
- fontWeight?: 'light' | 'regular' | 'semi-bold';
37
26
  /**
38
27
  * Visual intent color to apply to text.
39
28
  */
@@ -67,54 +56,40 @@ const SectionHeading = ({
67
56
  icon,
68
57
  text,
69
58
  rightChildren,
70
- fontSize = 'large',
71
59
  intent = 'body',
72
- fontWeight = 'regular',
73
60
  size = 'medium',
74
61
  style,
75
62
  testID,
76
- }: SectionHeadingProps): ReactElement => {
77
- useDeprecation(
78
- `SectionHeading's fontSize prop is deprecated and will be removed in the next major release, please remove it.`,
79
- fontSize !== undefined
80
- );
81
-
82
- useDeprecation(
83
- `SectionHeading's fontWeight prop is deprecated and will be removed in the next major release, please remove it.`,
84
- fontWeight !== undefined
85
- );
86
-
87
- return (
88
- <StyledHeading themeSize={size} style={style} testID={testID}>
89
- <StyledWrapper>
90
- <StyledIconWrapper>
91
- {icon !== undefined &&
92
- (typeof icon === 'string' ? (
93
- <Icon
94
- icon={icon}
95
- size={ICON_SIZE_MAP[size]}
96
- intent={ICON_INTENT_MAP[intent]}
97
- />
98
- ) : (
99
- React.cloneElement(icon, {
100
- size: ICON_SIZE_MAP[size],
101
- intent: ICON_INTENT_MAP[intent],
102
- ...icon.props,
103
- })
104
- ))}
105
- </StyledIconWrapper>
63
+ }: SectionHeadingProps): ReactElement => (
64
+ <StyledHeading themeSize={size} style={style} testID={testID}>
65
+ <StyledWrapper>
66
+ <StyledIconWrapper>
67
+ {icon !== undefined &&
68
+ (typeof icon === 'string' ? (
69
+ <Icon
70
+ icon={icon}
71
+ size={ICON_SIZE_MAP[size]}
72
+ intent={ICON_INTENT_MAP[intent]}
73
+ />
74
+ ) : (
75
+ React.cloneElement(icon, {
76
+ size: ICON_SIZE_MAP[size],
77
+ intent: ICON_INTENT_MAP[intent],
78
+ ...icon.props,
79
+ })
80
+ ))}
81
+ </StyledIconWrapper>
106
82
 
107
- {size === 'small' ? (
108
- <Typography.Caption intent={intent}>{text}</Typography.Caption>
109
- ) : (
110
- <Typography.Body variant="small" intent={intent}>
111
- {text}
112
- </Typography.Body>
113
- )}
114
- </StyledWrapper>
115
- {rightChildren}
116
- </StyledHeading>
117
- );
118
- };
83
+ {size === 'small' ? (
84
+ <Typography.Caption intent={intent}>{text}</Typography.Caption>
85
+ ) : (
86
+ <Typography.Body variant="small" intent={intent}>
87
+ {text}
88
+ </Typography.Body>
89
+ )}
90
+ </StyledWrapper>
91
+ {rightChildren}
92
+ </StyledHeading>
93
+ );
119
94
 
120
95
  export default SectionHeading;
@@ -14,16 +14,6 @@ export interface SectionHeadingProps extends ViewProps {
14
14
  * Right corner content
15
15
  */
16
16
  rightChildren?: ReactElement;
17
- /**
18
- * @deprecated fontSize will be removed in the next major release.
19
- * Size of the text.
20
- */
21
- fontSize?: 'small' | 'medium' | 'large' | 'xlarge';
22
- /**
23
- * @deprecated fontWeight will be removed in the next major release.
24
- * Heading's font-weight.
25
- */
26
- fontWeight?: 'light' | 'regular' | 'semi-bold';
27
17
  /**
28
18
  * Visual intent color to apply to text.
29
19
  */
@@ -41,5 +31,5 @@ export interface SectionHeadingProps extends ViewProps {
41
31
  */
42
32
  size?: 'small' | 'medium';
43
33
  }
44
- declare const SectionHeading: ({ icon, text, rightChildren, fontSize, intent, fontWeight, size, style, testID, }: SectionHeadingProps) => ReactElement;
34
+ declare const SectionHeading: ({ icon, text, rightChildren, intent, size, style, testID, }: SectionHeadingProps) => ReactElement;
45
35
  export default SectionHeading;
File without changes