@hero-design/rn 8.101.3-alpha.0 → 8.101.3

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.
@@ -1,4 +1,4 @@
1
- (node:4149) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
1
+ (node:3262) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
2
2
  (Use `node --trace-warnings ...` to show where the warning was created)
3
3
  
4
4
  src/index.ts → lib/index.js, es/index.js...
@@ -15,9 +15,9 @@ node_modules/d3-selection/src/selection/index.js -> node_modules/d3-selection/sr
15
15
     ~~~~~~~~~~~~~~~~~~~
16
16
  
17
17
  (!) [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.or passing a function to 'preferBuiltins' to provide more fine-grained control over which built-in modules to prefer.
18
- created lib/index.js, es/index.js in 1m 11.2s
18
+ created lib/index.js, es/index.js in 1m 10.1s
19
19
  
20
20
  /home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_AU.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/en_CA.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/index.ts, /home/runner/work/hero-design/hero-design/packages/rn/src/locales/types.ts → ., ....
21
21
  (!) Generated empty chunks
22
22
  "locales/types" and "locales/types"
23
- created ., . in 25.9s
23
+ created ., . in 19.8s
package/CHANGELOG.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @hero-design/rn
2
2
 
3
- ## 8.101.3-alpha.0
3
+ ## 8.101.3
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - [`4de62c1c0bda0ef6f78a9c93956192641b6e9eea`](https://github.com/Thinkei/hero-design/commit/4de62c1c0bda0ef6f78a9c93956192641b6e9eea) Thanks [@cuongnguyeneh](https://github.com/cuongnguyeneh)! - chore: update testId of native text input
7
+ - [#3976](https://github.com/Thinkei/hero-design/pull/3976) [`e33210e17116b5510e62076d52c48ec1e9d3be58`](https://github.com/Thinkei/hero-design/commit/e33210e17116b5510e62076d52c48ec1e9d3be58) Thanks [@vinhphan-eh](https://github.com/vinhphan-eh)! - [Badge.Count] Increase text size
8
8
 
9
9
  ## 8.101.2
10
10
 
package/es/index.js CHANGED
@@ -2684,15 +2684,15 @@ var getBadgeTheme = function getBadgeTheme(theme) {
2684
2684
  medium: theme.fontSizes.small,
2685
2685
  small: 8
2686
2686
  },
2687
- count: 6
2687
+ count: 8
2688
2688
  };
2689
2689
  var lineHeights = {
2690
2690
  medium: theme.lineHeights.small,
2691
2691
  small: 10,
2692
2692
  count: Platform.select({
2693
- android: 11,
2693
+ android: 14,
2694
2694
  // vertical alignment
2695
- "default": 12
2695
+ "default": 18
2696
2696
  })
2697
2697
  };
2698
2698
  var radii = {
@@ -2710,8 +2710,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
2710
2710
  statusHeight: theme.sizes.small,
2711
2711
  statusWidth: theme.sizes.small,
2712
2712
  count: {
2713
- width: theme.sizes.smallMedium,
2714
- height: theme.sizes.smallMedium
2713
+ width: theme.sizes.medium,
2714
+ height: theme.sizes.medium
2715
2715
  }
2716
2716
  };
2717
2717
  var borderWidths = {
@@ -2726,6 +2726,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
2726
2726
  },
2727
2727
  statusPositionTop: -theme.space.xxsmall,
2728
2728
  statusPositionRight: -theme.space.xxsmall,
2729
+ countPositionTop: -theme.space.xsmall,
2730
+ countPositionRight: -theme.space.xsmall,
2729
2731
  countPaddingHorizontal: theme.space.xxsmall
2730
2732
  };
2731
2733
  return {
@@ -9724,8 +9726,8 @@ var StyledCount = index$b(View)(function (_ref4) {
9724
9726
  display: 'flex',
9725
9727
  paddingHorizontal: theme.__hd__.badge.space.countPaddingHorizontal,
9726
9728
  position: 'absolute',
9727
- top: theme.__hd__.badge.space.statusPositionTop,
9728
- right: theme.__hd__.badge.space.statusPositionRight
9729
+ top: theme.__hd__.badge.space.countPositionTop,
9730
+ right: theme.__hd__.badge.space.countPositionRight
9729
9731
  };
9730
9732
  });
9731
9733
  var StyledCountText = index$b(Typography.Text)(function (_ref5) {
@@ -20175,13 +20177,12 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
20175
20177
  }, [style, theme]),
20176
20178
  backgroundColor = _useMemo2.backgroundColor,
20177
20179
  styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
20178
- var nativeInputTestIDSuffix = testID ? "-".concat(testID) : '';
20179
20180
  var nativeInputProps = _objectSpread2(_objectSpread2({
20180
20181
  style: StyleSheet$1.flatten([{
20181
20182
  backgroundColor: backgroundColor,
20182
20183
  color: theme.__hd__.textInput.colors.text
20183
20184
  }, textStyleWithoutBorderStyle]),
20184
- testID: "text-input".concat(nativeInputTestIDSuffix),
20185
+ testID: 'text-input',
20185
20186
  accessibilityState: {
20186
20187
  disabled: state === 'disabled' || state === 'readonly'
20187
20188
  },
package/lib/index.js CHANGED
@@ -2713,15 +2713,15 @@ var getBadgeTheme = function getBadgeTheme(theme) {
2713
2713
  medium: theme.fontSizes.small,
2714
2714
  small: 8
2715
2715
  },
2716
- count: 6
2716
+ count: 8
2717
2717
  };
2718
2718
  var lineHeights = {
2719
2719
  medium: theme.lineHeights.small,
2720
2720
  small: 10,
2721
2721
  count: reactNative.Platform.select({
2722
- android: 11,
2722
+ android: 14,
2723
2723
  // vertical alignment
2724
- "default": 12
2724
+ "default": 18
2725
2725
  })
2726
2726
  };
2727
2727
  var radii = {
@@ -2739,8 +2739,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
2739
2739
  statusHeight: theme.sizes.small,
2740
2740
  statusWidth: theme.sizes.small,
2741
2741
  count: {
2742
- width: theme.sizes.smallMedium,
2743
- height: theme.sizes.smallMedium
2742
+ width: theme.sizes.medium,
2743
+ height: theme.sizes.medium
2744
2744
  }
2745
2745
  };
2746
2746
  var borderWidths = {
@@ -2755,6 +2755,8 @@ var getBadgeTheme = function getBadgeTheme(theme) {
2755
2755
  },
2756
2756
  statusPositionTop: -theme.space.xxsmall,
2757
2757
  statusPositionRight: -theme.space.xxsmall,
2758
+ countPositionTop: -theme.space.xsmall,
2759
+ countPositionRight: -theme.space.xsmall,
2758
2760
  countPaddingHorizontal: theme.space.xxsmall
2759
2761
  };
2760
2762
  return {
@@ -9753,8 +9755,8 @@ var StyledCount = index$b(reactNative.View)(function (_ref4) {
9753
9755
  display: 'flex',
9754
9756
  paddingHorizontal: theme.__hd__.badge.space.countPaddingHorizontal,
9755
9757
  position: 'absolute',
9756
- top: theme.__hd__.badge.space.statusPositionTop,
9757
- right: theme.__hd__.badge.space.statusPositionRight
9758
+ top: theme.__hd__.badge.space.countPositionTop,
9759
+ right: theme.__hd__.badge.space.countPositionRight
9758
9760
  };
9759
9761
  });
9760
9762
  var StyledCountText = index$b(Typography.Text)(function (_ref5) {
@@ -20204,13 +20206,12 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
20204
20206
  }, [style, theme]),
20205
20207
  backgroundColor = _useMemo2.backgroundColor,
20206
20208
  styleWithoutBackgroundColor = _useMemo2.styleWithoutBackgroundColor;
20207
- var nativeInputTestIDSuffix = testID ? "-".concat(testID) : '';
20208
20209
  var nativeInputProps = _objectSpread2(_objectSpread2({
20209
20210
  style: reactNative.StyleSheet.flatten([{
20210
20211
  backgroundColor: backgroundColor,
20211
20212
  color: theme.__hd__.textInput.colors.text
20212
20213
  }, textStyleWithoutBorderStyle]),
20213
- testID: "text-input".concat(nativeInputTestIDSuffix),
20214
+ testID: 'text-input',
20214
20215
  accessibilityState: {
20215
20216
  disabled: state === 'disabled' || state === 'readonly'
20216
20217
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.101.3-alpha.0",
3
+ "version": "8.101.3",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -77,8 +77,8 @@ const StyledCount = styled(View)(({ theme }) => ({
77
77
  display: 'flex',
78
78
  paddingHorizontal: theme.__hd__.badge.space.countPaddingHorizontal,
79
79
  position: 'absolute',
80
- top: theme.__hd__.badge.space.statusPositionTop,
81
- right: theme.__hd__.badge.space.statusPositionRight,
80
+ top: theme.__hd__.badge.space.countPositionTop,
81
+ right: theme.__hd__.badge.space.countPositionRight,
82
82
  }));
83
83
 
84
84
  const StyledCountText = styled(Typography.Text)(({ theme }) => ({
@@ -34,15 +34,15 @@ exports[`BadgeCount displays 1 for content 1 1`] = `
34
34
  "borderRadius": 999,
35
35
  "color": "#ffffff",
36
36
  "display": "flex",
37
- "height": 12,
37
+ "height": 16,
38
38
  "justifyContent": "center",
39
- "minWidth": 12,
39
+ "minWidth": 16,
40
40
  "paddingHorizontal": 2,
41
41
  "position": "absolute",
42
- "right": -2,
42
+ "right": -4,
43
43
  "textAlign": "center",
44
44
  "textAlignVertical": "center",
45
- "top": -2,
45
+ "top": -4,
46
46
  },
47
47
  undefined,
48
48
  ]
@@ -63,9 +63,9 @@ exports[`BadgeCount displays 1 for content 1 1`] = `
63
63
  [
64
64
  {
65
65
  "color": "#ffffff",
66
- "fontSize": 6,
67
- "height": 12,
68
- "lineHeight": 12,
66
+ "fontSize": 8,
67
+ "height": 16,
68
+ "lineHeight": 18,
69
69
  },
70
70
  undefined,
71
71
  ],
@@ -137,15 +137,15 @@ exports[`BadgeCount displays 12 for content 12 1`] = `
137
137
  "borderRadius": 999,
138
138
  "color": "#ffffff",
139
139
  "display": "flex",
140
- "height": 12,
140
+ "height": 16,
141
141
  "justifyContent": "center",
142
- "minWidth": 12,
142
+ "minWidth": 16,
143
143
  "paddingHorizontal": 2,
144
144
  "position": "absolute",
145
- "right": -2,
145
+ "right": -4,
146
146
  "textAlign": "center",
147
147
  "textAlignVertical": "center",
148
- "top": -2,
148
+ "top": -4,
149
149
  },
150
150
  undefined,
151
151
  ]
@@ -166,9 +166,9 @@ exports[`BadgeCount displays 12 for content 12 1`] = `
166
166
  [
167
167
  {
168
168
  "color": "#ffffff",
169
- "fontSize": 6,
170
- "height": 12,
171
- "lineHeight": 12,
169
+ "fontSize": 8,
170
+ "height": 16,
171
+ "lineHeight": 18,
172
172
  },
173
173
  undefined,
174
174
  ],
@@ -240,15 +240,15 @@ exports[`BadgeCount displays 99+ for content 999 1`] = `
240
240
  "borderRadius": 999,
241
241
  "color": "#ffffff",
242
242
  "display": "flex",
243
- "height": 12,
243
+ "height": 16,
244
244
  "justifyContent": "center",
245
- "minWidth": 12,
245
+ "minWidth": 16,
246
246
  "paddingHorizontal": 2,
247
247
  "position": "absolute",
248
- "right": -2,
248
+ "right": -4,
249
249
  "textAlign": "center",
250
250
  "textAlignVertical": "center",
251
- "top": -2,
251
+ "top": -4,
252
252
  },
253
253
  undefined,
254
254
  ]
@@ -269,9 +269,9 @@ exports[`BadgeCount displays 99+ for content 999 1`] = `
269
269
  [
270
270
  {
271
271
  "color": "#ffffff",
272
- "fontSize": 6,
273
- "height": 12,
274
- "lineHeight": 12,
272
+ "fontSize": 8,
273
+ "height": 16,
274
+ "lineHeight": 18,
275
275
  },
276
276
  undefined,
277
277
  ],
@@ -1185,7 +1185,7 @@ exports[`TextInput disabled renders correctly 1`] = `
1185
1185
  },
1186
1186
  ]
1187
1187
  }
1188
- testID="text-input-disabled-text-input"
1188
+ testID="text-input"
1189
1189
  themeVariant="text"
1190
1190
  value="100"
1191
1191
  />
@@ -2320,7 +2320,7 @@ exports[`TextInput idle renders correctly 1`] = `
2320
2320
  },
2321
2321
  ]
2322
2322
  }
2323
- testID="text-input-idle-text-input"
2323
+ testID="text-input"
2324
2324
  themeVariant="text"
2325
2325
  />
2326
2326
  </View>
@@ -54,9 +54,7 @@ describe('TextInput', () => {
54
54
  expect(toJSON()).toMatchSnapshot();
55
55
  expect(getByTestId('idle-text-input')).toBeTruthy();
56
56
  expect(
57
- within(getByTestId('idle-text-input')).queryAllByTestId(
58
- 'text-input-idle-text-input'
59
- )
57
+ within(getByTestId('idle-text-input')).queryAllByTestId('text-input')
60
58
  ).toHaveLength(1);
61
59
  expect(
62
60
  within(getByTestId('idle-text-input')).queryAllByText('Amount (AUD)')
@@ -71,9 +69,7 @@ describe('TextInput', () => {
71
69
  within(getByTestId('idle-text-input')).queryAllByTestId('input-suffix')
72
70
  ).toHaveLength(1);
73
71
 
74
- expect(getByTestId('text-input-idle-text-input').props.placeholder).toBe(
75
- ' '
76
- );
72
+ expect(getByTestId('text-input').props.placeholder).toBe(' ');
77
73
  });
78
74
 
79
75
  it('should not render input-label if label is empty', () => {
@@ -108,7 +104,7 @@ describe('TextInput', () => {
108
104
  );
109
105
 
110
106
  const testInput = within(getByTestId('idle-text-input')).getByTestId(
111
- 'text-input-idle-text-input'
107
+ 'text-input'
112
108
  );
113
109
 
114
110
  fireEvent.changeText(testInput, 'Thong Quach');
@@ -309,18 +305,13 @@ describe('TextInput', () => {
309
305
  expect(toJSON()).toMatchSnapshot();
310
306
  expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
311
307
  expect(queryAllByTestId('input-label')).toHaveLength(1);
312
- expect(queryAllByTestId('text-input-disabled-text-input')).toHaveLength(
313
- 1
314
- );
308
+ expect(queryAllByTestId('text-input')).toHaveLength(1);
315
309
  expect(getByTestId('disabled-text-input')).toHaveProp(
316
310
  'pointerEvents',
317
311
  'none'
318
312
  );
319
313
 
320
- expect(getByTestId('text-input-disabled-text-input')).not.toHaveProp(
321
- 'multiline',
322
- 'true'
323
- );
314
+ expect(getByTestId('text-input')).not.toHaveProp('multiline', 'true');
324
315
  });
325
316
  });
326
317
 
@@ -569,7 +560,7 @@ describe('renderInput', () => {
569
560
  {renderInput({
570
561
  variant: 'textarea',
571
562
  nativeInputProps: {
572
- testID: 'text-input-idle-text-input',
563
+ testID: 'text-input',
573
564
  value: 'text input value',
574
565
  },
575
566
  theme,
@@ -577,9 +568,7 @@ describe('renderInput', () => {
577
568
  </>
578
569
  );
579
570
 
580
- expect(wrapper.queryAllByTestId('text-input-idle-text-input')).toHaveLength(
581
- 1
582
- );
571
+ expect(wrapper.queryAllByTestId('text-input')).toHaveLength(1);
583
572
  expect(wrapper.queryAllByDisplayValue('text input value')).toHaveLength(1);
584
573
  });
585
574
  });
@@ -397,8 +397,6 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
397
397
  };
398
398
  }, [style, theme]);
399
399
 
400
- const nativeInputTestIDSuffix = testID ? `-${testID}` : '';
401
-
402
400
  const nativeInputProps: NativeTextInputProps = {
403
401
  style: StyleSheet.flatten([
404
402
  {
@@ -407,7 +405,7 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
407
405
  },
408
406
  textStyleWithoutBorderStyle,
409
407
  ]),
410
- testID: `text-input${nativeInputTestIDSuffix}`,
408
+ testID: 'text-input',
411
409
  accessibilityState: {
412
410
  disabled: state === 'disabled' || state === 'readonly',
413
411
  },
@@ -157,7 +157,7 @@ exports[`theme returns correct theme object 1`] = `
157
157
  "warning": "#ac5d00",
158
158
  },
159
159
  "fontSizes": {
160
- "count": 6,
160
+ "count": 8,
161
161
  "icon": {
162
162
  "medium": 12,
163
163
  "small": 8,
@@ -170,7 +170,7 @@ exports[`theme returns correct theme object 1`] = `
170
170
  "small": "BeVietnamPro-SemiBold",
171
171
  },
172
172
  "lineHeights": {
173
- "count": 12,
173
+ "count": 18,
174
174
  "medium": 16,
175
175
  "small": 10,
176
176
  },
@@ -179,8 +179,8 @@ exports[`theme returns correct theme object 1`] = `
179
179
  },
180
180
  "sizes": {
181
181
  "count": {
182
- "height": 12,
183
- "width": 12,
182
+ "height": 16,
183
+ "width": 16,
184
184
  },
185
185
  "medium": {
186
186
  "height": 24,
@@ -195,6 +195,8 @@ exports[`theme returns correct theme object 1`] = `
195
195
  },
196
196
  "space": {
197
197
  "countPaddingHorizontal": 2,
198
+ "countPositionRight": -4,
199
+ "countPositionTop": -4,
198
200
  "medium": {
199
201
  "horizontalPadding": 8,
200
202
  },
@@ -26,15 +26,15 @@ const getBadgeTheme = (theme: GlobalTheme) => {
26
26
  medium: theme.fontSizes.small,
27
27
  small: 8,
28
28
  },
29
- count: 6,
29
+ count: 8,
30
30
  };
31
31
 
32
32
  const lineHeights = {
33
33
  medium: theme.lineHeights.small,
34
34
  small: 10,
35
35
  count: Platform.select({
36
- android: 11, // vertical alignment
37
- default: 12,
36
+ android: 14, // vertical alignment
37
+ default: 18,
38
38
  }),
39
39
  };
40
40
 
@@ -54,8 +54,8 @@ const getBadgeTheme = (theme: GlobalTheme) => {
54
54
  statusHeight: theme.sizes.small,
55
55
  statusWidth: theme.sizes.small,
56
56
  count: {
57
- width: theme.sizes.smallMedium,
58
- height: theme.sizes.smallMedium,
57
+ width: theme.sizes.medium,
58
+ height: theme.sizes.medium,
59
59
  },
60
60
  };
61
61
 
@@ -72,6 +72,8 @@ const getBadgeTheme = (theme: GlobalTheme) => {
72
72
  },
73
73
  statusPositionTop: -theme.space.xxsmall,
74
74
  statusPositionRight: -theme.space.xxsmall,
75
+ countPositionTop: -theme.space.xsmall,
76
+ countPositionRight: -theme.space.xsmall,
75
77
  countPaddingHorizontal: theme.space.xxsmall,
76
78
  };
77
79
 
package/src/types.ts CHANGED
@@ -22,6 +22,7 @@ import type { CalendarDateRange } from './components/Calendar/CalendarRange';
22
22
  import { LocaleCode, LocaleValues, DateTimeFormats } from './locales/types';
23
23
  import type { ColumnChartProps } from './components/Chart/ColumnChart';
24
24
  import { LineChartProps } from './components/Chart/Line';
25
+ import type { Scale, SystemPalette } from './theme/global';
25
26
 
26
27
  export type {
27
28
  BottomNavigationTabType,
@@ -48,4 +49,6 @@ export type {
48
49
  DateTimeFormats,
49
50
  ColumnChartProps,
50
51
  LineChartProps,
52
+ Scale,
53
+ SystemPalette,
51
54
  };