@hero-design/rn 8.61.1 → 8.61.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.
@@ -33,14 +33,14 @@ const StyledCarouselImage = styled(Image)(() => ({
33
33
  }));
34
34
 
35
35
  const StyledCustomSizeCarouselImage = styled(Image)<{
36
- height?: number | `${number}%`;
37
- width?: number | `${number}%`;
38
- resizeMode?: ImageResizeMode;
39
- }>(({ height, resizeMode = 'contain', width }) => ({
36
+ themeHeight?: number | `${number}%`;
37
+ themeWidth?: number | `${number}%`;
38
+ themeResizeMode?: ImageResizeMode;
39
+ }>(({ themeHeight, themeResizeMode = 'contain', themeWidth }) => ({
40
40
  alignSelf: 'center',
41
- width,
42
- height,
43
- resizeMode,
41
+ width: themeWidth,
42
+ height: themeHeight,
43
+ resizeMode: themeResizeMode,
44
44
  }));
45
45
 
46
46
  const StyledCarouselContentWrapper = styled(Box)<{
@@ -397,8 +397,6 @@ exports[`Carousel renders correctly with pageControlPosition bottom 1`] = `
397
397
  }
398
398
  >
399
399
  <Image
400
- height={100}
401
- resizeMode="cover"
402
400
  source={
403
401
  {
404
402
  "height": 100,
@@ -427,7 +425,9 @@ exports[`Carousel renders correctly with pageControlPosition bottom 1`] = `
427
425
  ],
428
426
  ]
429
427
  }
430
- width={30}
428
+ themeHeight={100}
429
+ themeResizeMode="cover"
430
+ themeWidth={30}
431
431
  />
432
432
  <View
433
433
  paddingHorizontal="medium"
@@ -516,7 +516,6 @@ exports[`Carousel renders correctly with pageControlPosition bottom 1`] = `
516
516
  }
517
517
  >
518
518
  <Image
519
- height={100}
520
519
  source={
521
520
  {
522
521
  "height": 100,
@@ -544,7 +543,8 @@ exports[`Carousel renders correctly with pageControlPosition bottom 1`] = `
544
543
  ],
545
544
  ]
546
545
  }
547
- width={30}
546
+ themeHeight={100}
547
+ themeWidth={30}
548
548
  />
549
549
  <View
550
550
  paddingHorizontal="medium"
@@ -1392,8 +1392,6 @@ exports[`Carousel renders correctly with pageControlPosition top 1`] = `
1392
1392
  }
1393
1393
  >
1394
1394
  <Image
1395
- height={100}
1396
- resizeMode="cover"
1397
1395
  source={
1398
1396
  {
1399
1397
  "height": 100,
@@ -1422,7 +1420,9 @@ exports[`Carousel renders correctly with pageControlPosition top 1`] = `
1422
1420
  ],
1423
1421
  ]
1424
1422
  }
1425
- width={30}
1423
+ themeHeight={100}
1424
+ themeResizeMode="cover"
1425
+ themeWidth={30}
1426
1426
  />
1427
1427
  <View
1428
1428
  paddingHorizontal="medium"
@@ -1511,7 +1511,6 @@ exports[`Carousel renders correctly with pageControlPosition top 1`] = `
1511
1511
  }
1512
1512
  >
1513
1513
  <Image
1514
- height={100}
1515
1514
  source={
1516
1515
  {
1517
1516
  "height": 100,
@@ -1539,7 +1538,8 @@ exports[`Carousel renders correctly with pageControlPosition top 1`] = `
1539
1538
  ],
1540
1539
  ]
1541
1540
  }
1542
- width={30}
1541
+ themeHeight={100}
1542
+ themeWidth={30}
1543
1543
  />
1544
1544
  <View
1545
1545
  paddingHorizontal="medium"
@@ -451,17 +451,12 @@ describe('TextInput', () => {
451
451
 
452
452
  describe('ref', () => {
453
453
  it('ref methods work correctly', () => {
454
- const mockChildMethod = jest.fn();
455
- jest.spyOn(React, 'useRef').mockReturnValue({
456
- current: {
457
- clear: mockChildMethod,
458
- },
459
- });
460
454
  const ref = React.createRef<
461
455
  TextInputHandles & {
462
456
  getNativeTextInputRef(): RNTextInput;
463
457
  }
464
458
  >();
459
+
465
460
  const wrapper = renderWithTheme(
466
461
  <TextInput label="Amount (AUD)" value="2000" ref={ref} />
467
462
  );
package/tsconfig.json CHANGED
@@ -1,5 +1,4 @@
1
1
  {
2
- "extends": "expo/tsconfig.base",
3
2
  "compilerOptions": {
4
3
  "declaration": true,
5
4
  "jsx": "react-native",
@@ -13,8 +12,17 @@
13
12
  "target": "esnext",
14
13
  "types": ["jest"],
15
14
  "paths": {
16
- "react": ["./node_modules/@types/react"]
17
- }
15
+ "react": ["./node_modules/@types/react"],
16
+ "react-native": ["./node_modules/react-native/types"],
17
+ },
18
+ "allowJs": true,
19
+ "esModuleInterop": true,
20
+ "lib": ["DOM", "ESNext"],
21
+ "moduleResolution": "node",
22
+ "noEmit": true,
23
+ "resolveJsonModule": true,
24
+ "skipLibCheck": true,
18
25
  },
19
- "include": ["src"]
26
+ "include": ["src"],
27
+ "exclude": ["node_modules", "babel.config.js", "metro.config.js", "jest.config.js"]
20
28
  }
@@ -26,9 +26,9 @@ declare const StyledCustomSizeCarouselImage: import("@emotion/native").StyledCom
26
26
  theme?: import("@emotion/react").Theme | undefined;
27
27
  as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
28
28
  } & {
29
- height?: number | `${number}%` | undefined;
30
- width?: number | `${number}%` | undefined;
31
- resizeMode?: ImageResizeMode | undefined;
29
+ themeHeight?: number | `${number}%` | undefined;
30
+ themeWidth?: number | `${number}%` | undefined;
31
+ themeResizeMode?: ImageResizeMode | undefined;
32
32
  }, {}, {}>;
33
33
  declare const StyledCarouselContentWrapper: import("@emotion/native").StyledComponent<import("../Box").BoxProps & {
34
34
  theme?: import("@emotion/react").Theme | undefined;