@ledgerhq/native-ui 0.7.18 → 0.7.19-next.0

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,10 +1,15 @@
1
1
  import React from "react";
2
- import { FlatListProps, NativeSyntheticEvent, NativeScrollEvent } from "react-native";
3
- import { BaseStyledProps } from "../../styled";
4
- declare type ScrollListContainerProps = BaseStyledProps & Omit<FlatListProps<any>, "onScroll" | "data" | "renderItem"> & {
2
+ import { FlatListProps, NativeSyntheticEvent, NativeScrollEvent, FlatList } from "react-native";
3
+ declare const ScrollListContainer: React.ForwardRefExoticComponent<import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> & import("styled-system").BackgroundProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Background<import("styled-system").TLengthStyledSystem>> & {
4
+ columnGap?: string | number | undefined;
5
+ rowGap?: string | number | undefined;
6
+ color?: string | undefined;
7
+ display?: string | undefined;
8
+ position?: string | undefined;
9
+ maxHeight?: number | undefined;
10
+ } & Omit<FlatListProps<any>, "data" | "onScroll" | "renderItem"> & {
5
11
  children: React.ReactNode;
6
- onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
7
- horizontal?: boolean;
8
- };
9
- declare const ScrollListContainer: ({ children, onScroll, horizontal, ...props }: ScrollListContainerProps) => JSX.Element;
12
+ onScroll?: ((event: NativeSyntheticEvent<NativeScrollEvent>) => void) | undefined;
13
+ horizontal?: boolean | undefined;
14
+ } & React.RefAttributes<FlatList<any>>>;
10
15
  export default ScrollListContainer;
@@ -9,8 +9,8 @@ var __rest = (this && this.__rest) || function (s, e) {
9
9
  }
10
10
  return t;
11
11
  };
12
- import React from "react";
13
- import { View } from "react-native";
12
+ import React, { forwardRef } from "react";
13
+ import { View, } from "react-native";
14
14
  import Animated from "react-native-reanimated";
15
15
  import baseStyled from "../../styled";
16
16
  const StyledFlatList = baseStyled.FlatList ``;
@@ -19,8 +19,8 @@ const AnimatedFlatList = Animated.createAnimatedComponent(StyledFlatList);
19
19
  ** This Layout is a wrapper for FlatList that accepts
20
20
  ** complex onScroll callback for react-native-reanimated.
21
21
  */
22
- const ScrollListContainer = (_a) => {
22
+ const ScrollListContainer = forwardRef((_a, ref) => {
23
23
  var { children, onScroll, horizontal = false } = _a, props = __rest(_a, ["children", "onScroll", "horizontal"]);
24
- return (React.createElement(AnimatedFlatList, Object.assign({ data: [...React.Children.toArray(children)], renderItem: ({ item }) => React.createElement(View, null, item), onScroll: onScroll, horizontal: horizontal }, props)));
25
- };
24
+ return (React.createElement(AnimatedFlatList, Object.assign({ ref: ref, data: [...React.Children.toArray(children)], renderItem: ({ item }) => React.createElement(View, null, item), onScroll: onScroll, horizontal: horizontal }, props)));
25
+ });
26
26
  export default ScrollListContainer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/native-ui",
3
- "version": "0.7.18",
3
+ "version": "0.7.19-next.0",
4
4
  "description": "Ledger Live - Mobile UI",
5
5
  "repository": "https://github.com/LedgerHQ/ui",
6
6
  "license": "MIT",