@hero-design/rn 8.103.0 → 8.103.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.
@@ -1,4 +1,4 @@
1
- (node:3158) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
1
+ (node:3203) 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 13.6s
18
+ created lib/index.js, es/index.js in 1m 13.2s
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 22.8s
23
+ created ., . in 20.7s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hero-design/rn
2
2
 
3
+ ## 8.103.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#4020](https://github.com/Thinkei/hero-design/pull/4020) [`23b0c7f7744bb4972504237b57cce57da9da5a73`](https://github.com/Thinkei/hero-design/commit/23b0c7f7744bb4972504237b57cce57da9da5a73) Thanks [@cuongnguyeneh](https://github.com/cuongnguyeneh)! - [TextInput] Update testId for label of input
8
+
3
9
  ## 8.103.0
4
10
 
5
11
  ### Minor Changes
package/es/index.js CHANGED
@@ -20252,7 +20252,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
20252
20252
  backgroundColor: backgroundColor
20253
20253
  },
20254
20254
  nativeID: accessibilityLabelledBy,
20255
- testID: "input-label",
20255
+ testID: "input-label".concat(nativeInputTestIDSuffix),
20256
20256
  themeState: state
20257
20257
  }, required && /*#__PURE__*/React__default.createElement(StyledAsteriskLabelInsideTextInput, {
20258
20258
  style: {
@@ -20261,6 +20261,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref8, ref) {
20261
20261
  themeState: state,
20262
20262
  testID: "input-label-asterisk"
20263
20263
  }, "*"), /*#__PURE__*/React__default.createElement(Typography.Body, {
20264
+ testID: "input-label-text".concat(nativeInputTestIDSuffix),
20264
20265
  numberOfLines: 1
20265
20266
  }, label))), /*#__PURE__*/React__default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
20266
20267
  variant: variant,
package/lib/index.js CHANGED
@@ -20281,7 +20281,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
20281
20281
  backgroundColor: backgroundColor
20282
20282
  },
20283
20283
  nativeID: accessibilityLabelledBy,
20284
- testID: "input-label",
20284
+ testID: "input-label".concat(nativeInputTestIDSuffix),
20285
20285
  themeState: state
20286
20286
  }, required && /*#__PURE__*/React__namespace.default.createElement(StyledAsteriskLabelInsideTextInput, {
20287
20287
  style: {
@@ -20290,6 +20290,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref8, ref) {
20290
20290
  themeState: state,
20291
20291
  testID: "input-label-asterisk"
20292
20292
  }, "*"), /*#__PURE__*/React__namespace.default.createElement(Typography.Body, {
20293
+ testID: "input-label-text".concat(nativeInputTestIDSuffix),
20293
20294
  numberOfLines: 1
20294
20295
  }, label))), /*#__PURE__*/React__namespace.default.createElement(StyledTextInputAndLabelContainer, null, renderInput$1({
20295
20296
  variant: variant,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hero-design/rn",
3
- "version": "8.103.0",
3
+ "version": "8.103.1",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -159,6 +159,7 @@ exports[`DatePicker renders DatePickerAndroid when OS is android 1`] = `
159
159
  undefined,
160
160
  ]
161
161
  }
162
+ testID="input-label-text"
162
163
  themeIntent="body"
163
164
  themeTypeface="neutral"
164
165
  themeVariant="regular"
@@ -444,6 +445,7 @@ exports[`DatePicker renders DatePickerIOS when OS is iOS 1`] = `
444
445
  undefined,
445
446
  ]
446
447
  }
448
+ testID="input-label-text"
447
449
  themeIntent="body"
448
450
  themeTypeface="neutral"
449
451
  themeVariant="regular"
@@ -729,6 +731,7 @@ exports[`DatePicker renders variant Calendar 1`] = `
729
731
  undefined,
730
732
  ]
731
733
  }
734
+ testID="input-label-text"
732
735
  themeIntent="body"
733
736
  themeTypeface="neutral"
734
737
  themeVariant="regular"
@@ -159,6 +159,7 @@ exports[`DatePickerAndroid renders correctly 1`] = `
159
159
  undefined,
160
160
  ]
161
161
  }
162
+ testID="input-label-text"
162
163
  themeIntent="body"
163
164
  themeTypeface="neutral"
164
165
  themeVariant="regular"
@@ -159,6 +159,7 @@ exports[`DatePickerCalendar renders correctly 1`] = `
159
159
  undefined,
160
160
  ]
161
161
  }
162
+ testID="input-label-text"
162
163
  themeIntent="body"
163
164
  themeTypeface="neutral"
164
165
  themeVariant="regular"
@@ -159,6 +159,7 @@ exports[`DatePickerIOS renders correctly 1`] = `
159
159
  undefined,
160
160
  ]
161
161
  }
162
+ testID="input-label-text"
162
163
  themeIntent="body"
163
164
  themeTypeface="neutral"
164
165
  themeVariant="regular"
@@ -843,6 +844,7 @@ exports[`DatePickerIOS renders correctly with custom locale 1`] = `
843
844
  undefined,
844
845
  ]
845
846
  }
847
+ testID="input-label-text"
846
848
  themeIntent="body"
847
849
  themeTypeface="neutral"
848
850
  themeVariant="regular"
@@ -161,6 +161,7 @@ exports[`rendering allows custom renderer 1`] = `
161
161
  undefined,
162
162
  ]
163
163
  }
164
+ testID="input-label-text"
164
165
  themeIntent="body"
165
166
  themeTypeface="neutral"
166
167
  themeVariant="regular"
@@ -1705,6 +1706,7 @@ exports[`rendering renders correct floating bottom sheet variant 1`] = `
1705
1706
  undefined,
1706
1707
  ]
1707
1708
  }
1709
+ testID="input-label-text"
1708
1710
  themeIntent="body"
1709
1711
  themeTypeface="neutral"
1710
1712
  themeVariant="regular"
@@ -3419,6 +3421,7 @@ exports[`rendering renders correctly when bottom sheet is NOT visible 1`] = `
3419
3421
  undefined,
3420
3422
  ]
3421
3423
  }
3424
+ testID="input-label-text"
3422
3425
  themeIntent="body"
3423
3426
  themeTypeface="neutral"
3424
3427
  themeVariant="regular"
@@ -3709,6 +3712,7 @@ exports[`rendering renders correctly when bottom sheet is visible 1`] = `
3709
3712
  undefined,
3710
3713
  ]
3711
3714
  }
3715
+ testID="input-label-text"
3712
3716
  themeIntent="body"
3713
3717
  themeTypeface="neutral"
3714
3718
  themeVariant="regular"
@@ -5453,6 +5457,7 @@ exports[`rendering renders correctly when input is loading 1`] = `
5453
5457
  undefined,
5454
5458
  ]
5455
5459
  }
5460
+ testID="input-label-text"
5456
5461
  themeIntent="body"
5457
5462
  themeTypeface="neutral"
5458
5463
  themeVariant="regular"
@@ -5756,6 +5761,7 @@ exports[`rendering renders correctly when receives sections 1`] = `
5756
5761
  undefined,
5757
5762
  ]
5758
5763
  }
5764
+ testID="input-label-text"
5759
5765
  themeIntent="body"
5760
5766
  themeTypeface="neutral"
5761
5767
  themeVariant="regular"
@@ -7088,6 +7094,7 @@ exports[`rendering renders correctly when receives sections 2`] = `
7088
7094
  undefined,
7089
7095
  ]
7090
7096
  }
7097
+ testID="input-label-text"
7091
7098
  themeIntent="body"
7092
7099
  themeTypeface="neutral"
7093
7100
  themeVariant="regular"
@@ -161,6 +161,7 @@ exports[`rendering allows custom renderer 1`] = `
161
161
  undefined,
162
162
  ]
163
163
  }
164
+ testID="input-label-text"
164
165
  themeIntent="body"
165
166
  themeTypeface="neutral"
166
167
  themeVariant="regular"
@@ -1617,6 +1618,7 @@ exports[`rendering renders correct floating bottom sheet variant 1`] = `
1617
1618
  undefined,
1618
1619
  ]
1619
1620
  }
1621
+ testID="input-label-text"
1620
1622
  themeIntent="body"
1621
1623
  themeTypeface="neutral"
1622
1624
  themeVariant="regular"
@@ -3216,6 +3218,7 @@ exports[`rendering renders correctly when bottom sheet is NOT visible 1`] = `
3216
3218
  undefined,
3217
3219
  ]
3218
3220
  }
3221
+ testID="input-label-text"
3219
3222
  themeIntent="body"
3220
3223
  themeTypeface="neutral"
3221
3224
  themeVariant="regular"
@@ -3506,6 +3509,7 @@ exports[`rendering renders correctly when bottom sheet is visible 1`] = `
3506
3509
  undefined,
3507
3510
  ]
3508
3511
  }
3512
+ testID="input-label-text"
3509
3513
  themeIntent="body"
3510
3514
  themeTypeface="neutral"
3511
3515
  themeVariant="regular"
@@ -5107,6 +5111,7 @@ exports[`rendering renders correctly when input is loading 1`] = `
5107
5111
  undefined,
5108
5112
  ]
5109
5113
  }
5114
+ testID="input-label-text"
5110
5115
  themeIntent="body"
5111
5116
  themeTypeface="neutral"
5112
5117
  themeVariant="regular"
@@ -5410,6 +5415,7 @@ exports[`rendering renders correctly when receives sections 1`] = `
5410
5415
  undefined,
5411
5416
  ]
5412
5417
  }
5418
+ testID="input-label-text"
5413
5419
  themeIntent="body"
5414
5420
  themeTypeface="neutral"
5415
5421
  themeVariant="regular"
@@ -166,6 +166,7 @@ exports[`TextInput backgroundColor renders correctly 1`] = `
166
166
  undefined,
167
167
  ]
168
168
  }
169
+ testID="input-label-text"
169
170
  themeIntent="body"
170
171
  themeTypeface="neutral"
171
172
  themeVariant="regular"
@@ -493,6 +494,7 @@ exports[`TextInput defaultValue TextInput is idle renders correctly 1`] = `
493
494
  undefined,
494
495
  ]
495
496
  }
497
+ testID="input-label-text"
496
498
  themeIntent="body"
497
499
  themeTypeface="neutral"
498
500
  themeVariant="regular"
@@ -819,6 +821,7 @@ exports[`TextInput defaultValue default Value and Value renders correctly with 2
819
821
  undefined,
820
822
  ]
821
823
  }
824
+ testID="input-label-text"
822
825
  themeIntent="body"
823
826
  themeTypeface="neutral"
824
827
  themeVariant="regular"
@@ -1084,7 +1087,7 @@ exports[`TextInput disabled renders correctly 1`] = `
1084
1087
  },
1085
1088
  ]
1086
1089
  }
1087
- testID="input-label"
1090
+ testID="input-label-disabled-text-input"
1088
1091
  themeState="disabled"
1089
1092
  >
1090
1093
  <Text
@@ -1131,6 +1134,7 @@ exports[`TextInput disabled renders correctly 1`] = `
1131
1134
  undefined,
1132
1135
  ]
1133
1136
  }
1137
+ testID="input-label-text-disabled-text-input"
1134
1138
  themeIntent="body"
1135
1139
  themeTypeface="neutral"
1136
1140
  themeVariant="regular"
@@ -1406,6 +1410,7 @@ exports[`TextInput error renders correctly 1`] = `
1406
1410
  undefined,
1407
1411
  ]
1408
1412
  }
1413
+ testID="input-label-text"
1409
1414
  themeIntent="body"
1410
1415
  themeTypeface="neutral"
1411
1416
  themeVariant="regular"
@@ -1708,6 +1713,7 @@ exports[`TextInput filled renders correctly 1`] = `
1708
1713
  undefined,
1709
1714
  ]
1710
1715
  }
1716
+ testID="input-label-text"
1711
1717
  themeIntent="body"
1712
1718
  themeTypeface="neutral"
1713
1719
  themeVariant="regular"
@@ -1998,6 +2004,7 @@ exports[`TextInput helper text renders correctly 1`] = `
1998
2004
  undefined,
1999
2005
  ]
2000
2006
  }
2007
+ testID="input-label-text"
2001
2008
  themeIntent="body"
2002
2009
  themeTypeface="neutral"
2003
2010
  themeVariant="regular"
@@ -2248,7 +2255,7 @@ exports[`TextInput idle renders correctly 1`] = `
2248
2255
  },
2249
2256
  ]
2250
2257
  }
2251
- testID="input-label"
2258
+ testID="input-label-idle-text-input"
2252
2259
  themeState="default"
2253
2260
  >
2254
2261
  <Text
@@ -2266,6 +2273,7 @@ exports[`TextInput idle renders correctly 1`] = `
2266
2273
  undefined,
2267
2274
  ]
2268
2275
  }
2276
+ testID="input-label-text-idle-text-input"
2269
2277
  themeIntent="body"
2270
2278
  themeTypeface="neutral"
2271
2279
  themeVariant="regular"
@@ -2555,6 +2563,7 @@ exports[`TextInput idle with suffix and prefix are React Element renders correct
2555
2563
  undefined,
2556
2564
  ]
2557
2565
  }
2566
+ testID="input-label-text"
2558
2567
  themeIntent="body"
2559
2568
  themeTypeface="neutral"
2560
2569
  themeVariant="regular"
@@ -3042,6 +3051,7 @@ exports[`TextInput max length renders correctly 1`] = `
3042
3051
  undefined,
3043
3052
  ]
3044
3053
  }
3054
+ testID="input-label-text"
3045
3055
  themeIntent="body"
3046
3056
  themeTypeface="neutral"
3047
3057
  themeVariant="regular"
@@ -3390,6 +3400,7 @@ exports[`TextInput max length renders correctly with hide character count 1`] =
3390
3400
  undefined,
3391
3401
  ]
3392
3402
  }
3403
+ testID="input-label-text"
3393
3404
  themeIntent="body"
3394
3405
  themeTypeface="neutral"
3395
3406
  themeVariant="regular"
@@ -3724,6 +3735,7 @@ exports[`TextInput placeholder TextInput is idle renders correctly 1`] = `
3724
3735
  undefined,
3725
3736
  ]
3726
3737
  }
3738
+ testID="input-label-text"
3727
3739
  themeIntent="body"
3728
3740
  themeTypeface="neutral"
3729
3741
  themeVariant="regular"
@@ -4018,6 +4030,7 @@ exports[`TextInput readonly renders correctly 1`] = `
4018
4030
  undefined,
4019
4031
  ]
4020
4032
  }
4033
+ testID="input-label-text"
4021
4034
  themeIntent="body"
4022
4035
  themeTypeface="neutral"
4023
4036
  themeVariant="regular"
@@ -4263,6 +4276,7 @@ exports[`TextInput ref ref methods work correctly 1`] = `
4263
4276
  undefined,
4264
4277
  ]
4265
4278
  }
4279
+ testID="input-label-text"
4266
4280
  themeIntent="body"
4267
4281
  themeTypeface="neutral"
4268
4282
  themeVariant="regular"
@@ -4538,6 +4552,7 @@ exports[`TextInput required renders correctly 1`] = `
4538
4552
  undefined,
4539
4553
  ]
4540
4554
  }
4555
+ testID="input-label-text"
4541
4556
  themeIntent="body"
4542
4557
  themeTypeface="neutral"
4543
4558
  themeVariant="regular"
@@ -4782,6 +4797,7 @@ exports[`TextInput variants renders textarea variant correctly 1`] = `
4782
4797
  undefined,
4783
4798
  ]
4784
4799
  }
4800
+ testID="input-label-text"
4785
4801
  themeIntent="body"
4786
4802
  themeTypeface="neutral"
4787
4803
  themeVariant="regular"
@@ -62,7 +62,9 @@ describe('TextInput', () => {
62
62
  within(getByTestId('idle-text-input')).queryAllByText('Amount (AUD)')
63
63
  ).toHaveLength(1);
64
64
  expect(
65
- within(getByTestId('idle-text-input')).queryAllByTestId('input-label')
65
+ within(getByTestId('idle-text-input')).queryAllByTestId(
66
+ 'input-label-idle-text-input'
67
+ )
66
68
  ).toHaveLength(1);
67
69
  expect(
68
70
  within(getByTestId('idle-text-input')).queryAllByTestId('input-prefix')
@@ -87,7 +89,9 @@ describe('TextInput', () => {
87
89
 
88
90
  expect(getByTestId('idle-text-input')).toBeTruthy();
89
91
  expect(
90
- within(getByTestId('idle-text-input')).queryAllByTestId('input-label')
92
+ within(getByTestId('idle-text-input')).queryAllByTestId(
93
+ 'input-label-idle-text-input'
94
+ )
91
95
  ).toHaveLength(0);
92
96
  });
93
97
 
@@ -308,7 +312,9 @@ describe('TextInput', () => {
308
312
 
309
313
  expect(toJSON()).toMatchSnapshot();
310
314
  expect(queryAllByText('Amount (AUD)')).toHaveLength(1);
311
- expect(queryAllByTestId('input-label')).toHaveLength(1);
315
+ expect(queryAllByTestId('input-label-disabled-text-input')).toHaveLength(
316
+ 1
317
+ );
312
318
  expect(queryAllByTestId('text-input-disabled-text-input')).toHaveLength(
313
319
  1
314
320
  );
@@ -489,7 +489,7 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
489
489
  <StyledLabelInsideTextInput
490
490
  style={{ backgroundColor }}
491
491
  nativeID={accessibilityLabelledBy}
492
- testID="input-label"
492
+ testID={`input-label${nativeInputTestIDSuffix}`}
493
493
  themeState={state}
494
494
  >
495
495
  {required && (
@@ -501,7 +501,12 @@ const TextInput = forwardRef<TextInputHandles, TextInputProps>(
501
501
  *
502
502
  </StyledAsteriskLabelInsideTextInput>
503
503
  )}
504
- <Typography.Body numberOfLines={1}>{label}</Typography.Body>
504
+ <Typography.Body
505
+ testID={`input-label-text${nativeInputTestIDSuffix}`}
506
+ numberOfLines={1}
507
+ >
508
+ {label}
509
+ </Typography.Body>
505
510
  </StyledLabelInsideTextInput>
506
511
  )}
507
512
  </StyledLabelContainerInsideTextInput>
@@ -159,6 +159,7 @@ exports[`TimePickerAndroid renders correct with hide suffix 1`] = `
159
159
  undefined,
160
160
  ]
161
161
  }
162
+ testID="input-label-text"
162
163
  themeIntent="body"
163
164
  themeTypeface="neutral"
164
165
  themeVariant="regular"
@@ -449,6 +450,7 @@ exports[`TimePickerAndroid renders correctly 1`] = `
449
450
  undefined,
450
451
  ]
451
452
  }
453
+ testID="input-label-text"
452
454
  themeIntent="body"
453
455
  themeTypeface="neutral"
454
456
  themeVariant="regular"
@@ -159,6 +159,7 @@ exports[`TimePickerIOS renders correct with hide suffix 1`] = `
159
159
  undefined,
160
160
  ]
161
161
  }
162
+ testID="input-label-text"
162
163
  themeIntent="body"
163
164
  themeTypeface="neutral"
164
165
  themeVariant="regular"
@@ -449,6 +450,7 @@ exports[`TimePickerIOS renders correctly 1`] = `
449
450
  undefined,
450
451
  ]
451
452
  }
453
+ testID="input-label-text"
452
454
  themeIntent="body"
453
455
  themeTypeface="neutral"
454
456
  themeVariant="regular"