@hero-design/rn 8.40.0 → 8.40.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.
@@ -4,5 +4,5 @@ $ rollup -c
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
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 26.1s
7
+ created lib/index.js, es/index.js in 26.4s
8
8
  $ tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json
package/es/index.js CHANGED
@@ -2649,13 +2649,14 @@ var getRichTextEditorTheme = function getRichTextEditorTheme(theme) {
2649
2649
 
2650
2650
  var getSectionHeadingTheme = function getSectionHeadingTheme(theme) {
2651
2651
  var colors = {
2652
- background: theme.colors.neutralGlobalSurface
2652
+ background: theme.colors.neutralGlobalSurface,
2653
+ backgroundSmall: theme.colors.decorativePrimarySurface
2653
2654
  };
2654
2655
  var space = {
2655
2656
  headingVerticalPadding: theme.space.small,
2656
2657
  headingHorizontalPadding: theme.space.medium,
2657
2658
  headingMarginBottom: theme.space.medium,
2658
- iconMarginRight: theme.space.small
2659
+ iconMarginRight: theme.space.smallMedium
2659
2660
  };
2660
2661
  return {
2661
2662
  colors: colors,
@@ -15493,11 +15494,12 @@ var CompoundRadio = {
15493
15494
  };
15494
15495
 
15495
15496
  var StyledHeading = index$b(View)(function (_ref) {
15496
- var theme = _ref.theme;
15497
+ var theme = _ref.theme,
15498
+ themeSize = _ref.themeSize;
15497
15499
  return {
15498
15500
  paddingVertical: theme.__hd__.sectionHeading.space.headingVerticalPadding,
15499
15501
  paddingHorizontal: theme.__hd__.sectionHeading.space.headingHorizontalPadding,
15500
- backgroundColor: theme.__hd__.sectionHeading.colors.background,
15502
+ backgroundColor: themeSize === 'medium' ? theme.__hd__.sectionHeading.colors.background : theme.__hd__.sectionHeading.colors.backgroundSmall,
15501
15503
  marginBottom: theme.__hd__.sectionHeading.space.headingMarginBottom,
15502
15504
  display: 'flex',
15503
15505
  flexDirection: 'row',
@@ -15514,15 +15516,14 @@ var StyledIconWrapper$2 = index$b(View)(function (_ref2) {
15514
15516
  var StyledWrapper$3 = index$b(View)(function () {
15515
15517
  return {
15516
15518
  display: 'flex',
15517
- flexDirection: 'row'
15519
+ flexDirection: 'row',
15520
+ alignItems: 'center'
15518
15521
  };
15519
15522
  });
15520
15523
 
15521
15524
  var ICON_SIZE_MAP = {
15522
15525
  small: 'small',
15523
- medium: 'medium',
15524
- large: 'medium',
15525
- xlarge: 'large'
15526
+ medium: 'medium'
15526
15527
  };
15527
15528
  var ICON_INTENT_MAP = {
15528
15529
  body: 'text',
@@ -15539,22 +15540,28 @@ var SectionHeading = function SectionHeading(_ref) {
15539
15540
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
15540
15541
  _ref$fontWeight = _ref.fontWeight,
15541
15542
  fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
15543
+ _ref$size = _ref.size,
15544
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
15542
15545
  style = _ref.style,
15543
15546
  testID = _ref.testID;
15547
+ useDeprecation("SectionHeading's fontSize prop is deprecated and will be removed in the next major release, please remove it.", fontSize !== undefined);
15548
+ useDeprecation("SectionHeading's fontWeight prop is deprecated and will be removed in the next major release, please remove it.", fontWeight !== undefined);
15544
15549
  return /*#__PURE__*/React.createElement(StyledHeading, {
15550
+ themeSize: size,
15545
15551
  style: style,
15546
15552
  testID: testID
15547
15553
  }, /*#__PURE__*/React.createElement(StyledWrapper$3, null, /*#__PURE__*/React.createElement(StyledIconWrapper$2, null, icon !== undefined && (typeof icon === 'string' ? /*#__PURE__*/React.createElement(Icon, {
15548
15554
  icon: icon,
15549
- size: ICON_SIZE_MAP[fontSize],
15555
+ size: ICON_SIZE_MAP[size],
15550
15556
  intent: ICON_INTENT_MAP[intent]
15551
15557
  }) : /*#__PURE__*/React.cloneElement(icon, _objectSpread2({
15552
- size: ICON_SIZE_MAP[fontSize],
15558
+ size: ICON_SIZE_MAP[size],
15553
15559
  intent: ICON_INTENT_MAP[intent]
15554
- }, icon.props)))), /*#__PURE__*/React.createElement(Typography.Text, {
15555
- fontSize: fontSize,
15556
- intent: intent,
15557
- fontWeight: fontWeight
15560
+ }, icon.props)))), size === 'small' ? /*#__PURE__*/React.createElement(Typography.Caption, {
15561
+ intent: intent
15562
+ }, text) : /*#__PURE__*/React.createElement(Typography.Body, {
15563
+ variant: "small",
15564
+ intent: intent
15558
15565
  }, text)), rightChildren);
15559
15566
  };
15560
15567
 
@@ -0,0 +1,17 @@
1
+ const baseConfig = require('./jest.config');
2
+
3
+ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
4
+ module.exports = {
5
+ ...baseConfig,
6
+ reporters: [
7
+ 'default',
8
+ [
9
+ 'jest-junit',
10
+ {
11
+ outputDirectory: '../../reports',
12
+ addFileAttribute: 'true',
13
+ outputName: 'rn-junit.xml',
14
+ },
15
+ ],
16
+ ],
17
+ };
package/jest.config.js CHANGED
@@ -1,5 +1,3 @@
1
- const path = require('path');
2
-
3
1
  /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
4
2
  module.exports = {
5
3
  preset: 'react-native',
package/lib/index.js CHANGED
@@ -2680,13 +2680,14 @@ var getRichTextEditorTheme = function getRichTextEditorTheme(theme) {
2680
2680
 
2681
2681
  var getSectionHeadingTheme = function getSectionHeadingTheme(theme) {
2682
2682
  var colors = {
2683
- background: theme.colors.neutralGlobalSurface
2683
+ background: theme.colors.neutralGlobalSurface,
2684
+ backgroundSmall: theme.colors.decorativePrimarySurface
2684
2685
  };
2685
2686
  var space = {
2686
2687
  headingVerticalPadding: theme.space.small,
2687
2688
  headingHorizontalPadding: theme.space.medium,
2688
2689
  headingMarginBottom: theme.space.medium,
2689
- iconMarginRight: theme.space.small
2690
+ iconMarginRight: theme.space.smallMedium
2690
2691
  };
2691
2692
  return {
2692
2693
  colors: colors,
@@ -15524,11 +15525,12 @@ var CompoundRadio = {
15524
15525
  };
15525
15526
 
15526
15527
  var StyledHeading = index$b(reactNative.View)(function (_ref) {
15527
- var theme = _ref.theme;
15528
+ var theme = _ref.theme,
15529
+ themeSize = _ref.themeSize;
15528
15530
  return {
15529
15531
  paddingVertical: theme.__hd__.sectionHeading.space.headingVerticalPadding,
15530
15532
  paddingHorizontal: theme.__hd__.sectionHeading.space.headingHorizontalPadding,
15531
- backgroundColor: theme.__hd__.sectionHeading.colors.background,
15533
+ backgroundColor: themeSize === 'medium' ? theme.__hd__.sectionHeading.colors.background : theme.__hd__.sectionHeading.colors.backgroundSmall,
15532
15534
  marginBottom: theme.__hd__.sectionHeading.space.headingMarginBottom,
15533
15535
  display: 'flex',
15534
15536
  flexDirection: 'row',
@@ -15545,15 +15547,14 @@ var StyledIconWrapper$2 = index$b(reactNative.View)(function (_ref2) {
15545
15547
  var StyledWrapper$3 = index$b(reactNative.View)(function () {
15546
15548
  return {
15547
15549
  display: 'flex',
15548
- flexDirection: 'row'
15550
+ flexDirection: 'row',
15551
+ alignItems: 'center'
15549
15552
  };
15550
15553
  });
15551
15554
 
15552
15555
  var ICON_SIZE_MAP = {
15553
15556
  small: 'small',
15554
- medium: 'medium',
15555
- large: 'medium',
15556
- xlarge: 'large'
15557
+ medium: 'medium'
15557
15558
  };
15558
15559
  var ICON_INTENT_MAP = {
15559
15560
  body: 'text',
@@ -15570,22 +15571,28 @@ var SectionHeading = function SectionHeading(_ref) {
15570
15571
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
15571
15572
  _ref$fontWeight = _ref.fontWeight,
15572
15573
  fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
15574
+ _ref$size = _ref.size,
15575
+ size = _ref$size === void 0 ? 'medium' : _ref$size,
15573
15576
  style = _ref.style,
15574
15577
  testID = _ref.testID;
15578
+ useDeprecation("SectionHeading's fontSize prop is deprecated and will be removed in the next major release, please remove it.", fontSize !== undefined);
15579
+ useDeprecation("SectionHeading's fontWeight prop is deprecated and will be removed in the next major release, please remove it.", fontWeight !== undefined);
15575
15580
  return /*#__PURE__*/React__default["default"].createElement(StyledHeading, {
15581
+ themeSize: size,
15576
15582
  style: style,
15577
15583
  testID: testID
15578
15584
  }, /*#__PURE__*/React__default["default"].createElement(StyledWrapper$3, null, /*#__PURE__*/React__default["default"].createElement(StyledIconWrapper$2, null, icon !== undefined && (typeof icon === 'string' ? /*#__PURE__*/React__default["default"].createElement(Icon, {
15579
15585
  icon: icon,
15580
- size: ICON_SIZE_MAP[fontSize],
15586
+ size: ICON_SIZE_MAP[size],
15581
15587
  intent: ICON_INTENT_MAP[intent]
15582
15588
  }) : /*#__PURE__*/React__default["default"].cloneElement(icon, _objectSpread2({
15583
- size: ICON_SIZE_MAP[fontSize],
15589
+ size: ICON_SIZE_MAP[size],
15584
15590
  intent: ICON_INTENT_MAP[intent]
15585
- }, icon.props)))), /*#__PURE__*/React__default["default"].createElement(Typography.Text, {
15586
- fontSize: fontSize,
15587
- intent: intent,
15588
- fontWeight: fontWeight
15591
+ }, icon.props)))), size === 'small' ? /*#__PURE__*/React__default["default"].createElement(Typography.Caption, {
15592
+ intent: intent
15593
+ }, text) : /*#__PURE__*/React__default["default"].createElement(Typography.Body, {
15594
+ variant: "small",
15595
+ intent: intent
15589
15596
  }, text)), rightChildren);
15590
15597
  };
15591
15598
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.40.0",
3
+ "version": "8.40.2",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -10,7 +10,7 @@
10
10
  "type-check": "tsc --noEmit",
11
11
  "test": "jest --runInBand",
12
12
  "test:watch": "jest --runInBand --watch",
13
- "test:ci": "jest --runInBand --logHeapUsage",
13
+ "test:ci": "jest --c=jest-ci.config.js --i --logHeapUsage",
14
14
  "build:js": "rollup -c",
15
15
  "build:types": "tsc --noEmit false --emitDeclarationOnly --project tsconfig.prod.json",
16
16
  "build": "yarn build:js && yarn build:types",
@@ -21,14 +21,14 @@
21
21
  "dependencies": {
22
22
  "@emotion/native": "^11.9.3",
23
23
  "@emotion/react": "^11.9.3",
24
- "@hero-design/colors": "8.40.0",
24
+ "@hero-design/colors": "8.40.2",
25
25
  "date-fns": "^2.16.1",
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": "^8.40.0",
31
+ "@hero-design/react-native-month-year-picker": "^8.40.2",
32
32
  "@react-native-community/datetimepicker": "^3.5.2",
33
33
  "@react-native-community/slider": "4.1.12",
34
34
  "react": "18.0.0",
@@ -48,8 +48,8 @@
48
48
  "@babel/preset-typescript": "^7.17.12",
49
49
  "@babel/runtime": "^7.18.9",
50
50
  "@emotion/jest": "^11.11.0",
51
- "@hero-design/eslint-plugin": "8.40.0",
52
- "@hero-design/react-native-month-year-picker": "^8.40.0",
51
+ "@hero-design/eslint-plugin": "8.40.2",
52
+ "@hero-design/react-native-month-year-picker": "^8.40.2",
53
53
  "@react-native-community/datetimepicker": "^3.5.2",
54
54
  "@react-native-community/slider": "4.1.12",
55
55
  "@rollup/plugin-babel": "^5.3.1",
@@ -65,11 +65,12 @@
65
65
  "@types/react-native": "^0.67.7",
66
66
  "@types/react-native-vector-icons": "^6.4.10",
67
67
  "babel-plugin-inline-import": "^3.0.0",
68
- "eslint-config-hd": "8.40.0",
68
+ "eslint-config-hd": "8.40.2",
69
69
  "eslint-plugin-import": "^2.27.5",
70
70
  "jest": "^29.6.2",
71
71
  "jest-environment-jsdom": "^29.6.2",
72
- "prettier-config-hd": "8.40.0",
72
+ "jest-junit": "^16.0.0",
73
+ "prettier-config-hd": "8.40.2",
73
74
  "react": "18.0.0",
74
75
  "react-native": "0.69.7",
75
76
  "react-native-gesture-handler": "~2.5.0",
@@ -1,16 +1,26 @@
1
1
  import styled from '@emotion/native';
2
2
  import { View } from 'react-native';
3
3
 
4
- const StyledHeading = styled(View)(({ theme }) => ({
5
- paddingVertical: theme.__hd__.sectionHeading.space.headingVerticalPadding,
6
- paddingHorizontal: theme.__hd__.sectionHeading.space.headingHorizontalPadding,
7
- backgroundColor: theme.__hd__.sectionHeading.colors.background,
8
- marginBottom: theme.__hd__.sectionHeading.space.headingMarginBottom,
9
- display: 'flex',
10
- flexDirection: 'row',
11
- alignContent: 'center',
12
- justifyContent: 'space-between',
13
- }));
4
+ type StyledHeadingProps = {
5
+ themeSize: 'small' | 'medium';
6
+ };
7
+
8
+ const StyledHeading = styled(View)<StyledHeadingProps>(
9
+ ({ theme, themeSize }) => ({
10
+ paddingVertical: theme.__hd__.sectionHeading.space.headingVerticalPadding,
11
+ paddingHorizontal:
12
+ theme.__hd__.sectionHeading.space.headingHorizontalPadding,
13
+ backgroundColor:
14
+ themeSize === 'medium'
15
+ ? theme.__hd__.sectionHeading.colors.background
16
+ : theme.__hd__.sectionHeading.colors.backgroundSmall,
17
+ marginBottom: theme.__hd__.sectionHeading.space.headingMarginBottom,
18
+ display: 'flex',
19
+ flexDirection: 'row',
20
+ alignContent: 'center',
21
+ justifyContent: 'space-between',
22
+ })
23
+ );
14
24
 
15
25
  const StyledIconWrapper = styled(View)(({ theme }) => ({
16
26
  marginRight: theme.__hd__.sectionHeading.space.iconMarginRight,
@@ -19,6 +29,7 @@ const StyledIconWrapper = styled(View)(({ theme }) => ({
19
29
  const StyledWrapper = styled(View)(() => ({
20
30
  display: 'flex',
21
31
  flexDirection: 'row',
32
+ alignItems: 'center',
22
33
  }));
23
34
 
24
35
  export { StyledHeading, StyledIconWrapper, StyledWrapper };
@@ -7,8 +7,12 @@ import {
7
7
  } from '../StyledHeading';
8
8
 
9
9
  describe('StyledHeading', () => {
10
- it('renders correct style', () => {
11
- const { toJSON } = renderWithTheme(<StyledHeading />);
10
+ it.each`
11
+ themeSize
12
+ ${'small'}
13
+ ${'medium'}
14
+ `('renders correct style with $themeSize', ({ themeSize }) => {
15
+ const { toJSON } = renderWithTheme(<StyledHeading themeSize={themeSize} />);
12
16
  expect(toJSON()).toMatchSnapshot();
13
17
  });
14
18
  });
@@ -1,6 +1,6 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`StyledHeading renders correct style 1`] = `
3
+ exports[`StyledHeading renders correct style with medium 1`] = `
4
4
  <View
5
5
  style={
6
6
  [
@@ -17,6 +17,28 @@ exports[`StyledHeading renders correct style 1`] = `
17
17
  undefined,
18
18
  ]
19
19
  }
20
+ themeSize="medium"
21
+ />
22
+ `;
23
+
24
+ exports[`StyledHeading renders correct style with small 1`] = `
25
+ <View
26
+ style={
27
+ [
28
+ {
29
+ "alignContent": "center",
30
+ "backgroundColor": "#ccd2d3",
31
+ "display": "flex",
32
+ "flexDirection": "row",
33
+ "justifyContent": "space-between",
34
+ "marginBottom": 16,
35
+ "paddingHorizontal": 16,
36
+ "paddingVertical": 8,
37
+ },
38
+ undefined,
39
+ ]
40
+ }
41
+ themeSize="small"
20
42
  />
21
43
  `;
22
44
 
@@ -25,7 +47,7 @@ exports[`StyledIconWrapper renders correct style 1`] = `
25
47
  style={
26
48
  [
27
49
  {
28
- "marginRight": 8,
50
+ "marginRight": 12,
29
51
  },
30
52
  undefined,
31
53
  ]
@@ -38,6 +60,7 @@ exports[`StyledWrapper renders correct style 1`] = `
38
60
  style={
39
61
  [
40
62
  {
63
+ "alignItems": "center",
41
64
  "display": "flex",
42
65
  "flexDirection": "row",
43
66
  },
@@ -17,11 +17,13 @@ exports[`SectionHeading allows to customise the icon 1`] = `
17
17
  undefined,
18
18
  ]
19
19
  }
20
+ themeSize="medium"
20
21
  >
21
22
  <View
22
23
  style={
23
24
  [
24
25
  {
26
+ "alignItems": "center",
25
27
  "display": "flex",
26
28
  "flexDirection": "row",
27
29
  },
@@ -33,7 +35,7 @@ exports[`SectionHeading allows to customise the icon 1`] = `
33
35
  style={
34
36
  [
35
37
  {
36
- "marginRight": 8,
38
+ "marginRight": 12,
37
39
  },
38
40
  undefined,
39
41
  ]
@@ -61,17 +63,16 @@ exports[`SectionHeading allows to customise the icon 1`] = `
61
63
  {
62
64
  "color": "#401960",
63
65
  "fontFamily": "BeVietnamPro-Regular",
64
- "fontSize": 16,
66
+ "fontSize": 14,
65
67
  "letterSpacing": 0.48,
66
- "lineHeight": 24,
68
+ "lineHeight": 22,
67
69
  },
68
70
  undefined,
69
71
  ]
70
72
  }
71
- themeFontSize="large"
72
- themeFontWeight="regular"
73
73
  themeIntent="primary"
74
74
  themeTypeface="neutral"
75
+ themeVariant="small"
75
76
  >
76
77
  test demo
77
78
  </Text>
@@ -97,11 +98,13 @@ exports[`SectionHeading render icon correctly 1`] = `
97
98
  ]
98
99
  }
99
100
  testID="sectionHeading"
101
+ themeSize="medium"
100
102
  >
101
103
  <View
102
104
  style={
103
105
  [
104
106
  {
107
+ "alignItems": "center",
105
108
  "display": "flex",
106
109
  "flexDirection": "row",
107
110
  },
@@ -113,7 +116,7 @@ exports[`SectionHeading render icon correctly 1`] = `
113
116
  style={
114
117
  [
115
118
  {
116
- "marginRight": 8,
119
+ "marginRight": 12,
117
120
  },
118
121
  undefined,
119
122
  ]
@@ -141,17 +144,16 @@ exports[`SectionHeading render icon correctly 1`] = `
141
144
  {
142
145
  "color": "#001f23",
143
146
  "fontFamily": "BeVietnamPro-Regular",
144
- "fontSize": 16,
147
+ "fontSize": 14,
145
148
  "letterSpacing": 0.48,
146
- "lineHeight": 24,
149
+ "lineHeight": 22,
147
150
  },
148
151
  undefined,
149
152
  ]
150
153
  }
151
- themeFontSize="large"
152
- themeFontWeight="regular"
153
154
  themeIntent="body"
154
155
  themeTypeface="neutral"
156
+ themeVariant="small"
155
157
  >
156
158
  test demo
157
159
  </Text>
@@ -177,11 +179,13 @@ exports[`SectionHeading render right children correctly 1`] = `
177
179
  ]
178
180
  }
179
181
  testID="sectionHeading"
182
+ themeSize="medium"
180
183
  >
181
184
  <View
182
185
  style={
183
186
  [
184
187
  {
188
+ "alignItems": "center",
185
189
  "display": "flex",
186
190
  "flexDirection": "row",
187
191
  },
@@ -193,7 +197,7 @@ exports[`SectionHeading render right children correctly 1`] = `
193
197
  style={
194
198
  [
195
199
  {
196
- "marginRight": 8,
200
+ "marginRight": 12,
197
201
  },
198
202
  undefined,
199
203
  ]
@@ -206,17 +210,16 @@ exports[`SectionHeading render right children correctly 1`] = `
206
210
  {
207
211
  "color": "#001f23",
208
212
  "fontFamily": "BeVietnamPro-Regular",
209
- "fontSize": 16,
213
+ "fontSize": 14,
210
214
  "letterSpacing": 0.48,
211
- "lineHeight": 24,
215
+ "lineHeight": 22,
212
216
  },
213
217
  undefined,
214
218
  ]
215
219
  }
216
- themeFontSize="large"
217
- themeFontWeight="regular"
218
220
  themeIntent="body"
219
221
  themeTypeface="neutral"
222
+ themeVariant="small"
220
223
  >
221
224
  test demo
222
225
  </Text>
@@ -244,6 +247,135 @@ exports[`SectionHeading render right children correctly 1`] = `
244
247
  </View>
245
248
  `;
246
249
 
250
+ exports[`SectionHeading renders correct style with medium 1`] = `
251
+ <View
252
+ style={
253
+ [
254
+ {
255
+ "alignContent": "center",
256
+ "backgroundColor": "#f6f6f7",
257
+ "display": "flex",
258
+ "flexDirection": "row",
259
+ "justifyContent": "space-between",
260
+ "marginBottom": 16,
261
+ "paddingHorizontal": 16,
262
+ "paddingVertical": 8,
263
+ },
264
+ undefined,
265
+ ]
266
+ }
267
+ themeSize="medium"
268
+ >
269
+ <View
270
+ style={
271
+ [
272
+ {
273
+ "alignItems": "center",
274
+ "display": "flex",
275
+ "flexDirection": "row",
276
+ },
277
+ undefined,
278
+ ]
279
+ }
280
+ >
281
+ <View
282
+ style={
283
+ [
284
+ {
285
+ "marginRight": 12,
286
+ },
287
+ undefined,
288
+ ]
289
+ }
290
+ />
291
+ <Text
292
+ allowFontScaling={false}
293
+ style={
294
+ [
295
+ {
296
+ "color": "#001f23",
297
+ "fontFamily": "BeVietnamPro-Regular",
298
+ "fontSize": 14,
299
+ "letterSpacing": 0.48,
300
+ "lineHeight": 22,
301
+ },
302
+ undefined,
303
+ ]
304
+ }
305
+ themeIntent="body"
306
+ themeTypeface="neutral"
307
+ themeVariant="small"
308
+ >
309
+ Section Heading
310
+ </Text>
311
+ </View>
312
+ </View>
313
+ `;
314
+
315
+ exports[`SectionHeading renders correct style with small 1`] = `
316
+ <View
317
+ style={
318
+ [
319
+ {
320
+ "alignContent": "center",
321
+ "backgroundColor": "#ccd2d3",
322
+ "display": "flex",
323
+ "flexDirection": "row",
324
+ "justifyContent": "space-between",
325
+ "marginBottom": 16,
326
+ "paddingHorizontal": 16,
327
+ "paddingVertical": 8,
328
+ },
329
+ undefined,
330
+ ]
331
+ }
332
+ themeSize="small"
333
+ >
334
+ <View
335
+ style={
336
+ [
337
+ {
338
+ "alignItems": "center",
339
+ "display": "flex",
340
+ "flexDirection": "row",
341
+ },
342
+ undefined,
343
+ ]
344
+ }
345
+ >
346
+ <View
347
+ style={
348
+ [
349
+ {
350
+ "marginRight": 12,
351
+ },
352
+ undefined,
353
+ ]
354
+ }
355
+ />
356
+ <Text
357
+ allowFontScaling={false}
358
+ style={
359
+ [
360
+ {
361
+ "color": "#001f23",
362
+ "fontFamily": "BeVietnamPro-Regular",
363
+ "fontSize": 12,
364
+ "letterSpacing": 0.48,
365
+ "lineHeight": 16,
366
+ },
367
+ undefined,
368
+ ]
369
+ }
370
+ themeFontWeight="regular"
371
+ themeIntent="body"
372
+ >
373
+ Section Heading
374
+ </Text>
375
+ </View>
376
+ </View>
377
+ `;
378
+
247
379
  exports[`SectionHeading renders correctly 1`] = `
248
380
  <View
249
381
  style={
@@ -262,11 +394,13 @@ exports[`SectionHeading renders correctly 1`] = `
262
394
  ]
263
395
  }
264
396
  testID="sectionHeading"
397
+ themeSize="medium"
265
398
  >
266
399
  <View
267
400
  style={
268
401
  [
269
402
  {
403
+ "alignItems": "center",
270
404
  "display": "flex",
271
405
  "flexDirection": "row",
272
406
  },
@@ -278,7 +412,7 @@ exports[`SectionHeading renders correctly 1`] = `
278
412
  style={
279
413
  [
280
414
  {
281
- "marginRight": 8,
415
+ "marginRight": 12,
282
416
  },
283
417
  undefined,
284
418
  ]
@@ -291,17 +425,16 @@ exports[`SectionHeading renders correctly 1`] = `
291
425
  {
292
426
  "color": "#001f23",
293
427
  "fontFamily": "BeVietnamPro-Regular",
294
- "fontSize": 16,
428
+ "fontSize": 14,
295
429
  "letterSpacing": 0.48,
296
- "lineHeight": 24,
430
+ "lineHeight": 22,
297
431
  },
298
432
  undefined,
299
433
  ]
300
434
  }
301
- themeFontSize="large"
302
- themeFontWeight="regular"
303
435
  themeIntent="body"
304
436
  themeTypeface="neutral"
437
+ themeVariant="small"
305
438
  >
306
439
  test demo
307
440
  </Text>