@ledgerhq/native-ui 0.6.6 → 0.6.7

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.
@@ -24,9 +24,10 @@ const modalStyleOverrides = StyleSheet.create({
24
24
  paddingRight: 24,
25
25
  paddingTop: 24,
26
26
  paddingBottom: 24,
27
+ maxHeight: "100%",
27
28
  },
28
29
  });
29
30
  export default function BottomDrawer(_a) {
30
31
  var { children } = _a, restProps = __rest(_a, ["children"]);
31
- return (React.createElement(BaseModal, Object.assign({}, restProps, { modalStyle: modalStyleOverrides.modal, containerStyle: modalStyleOverrides.container, swipeDirection: ["down"], propagateSwipe: true }), children));
32
+ return (React.createElement(BaseModal, Object.assign({}, restProps, { modalStyle: modalStyleOverrides.modal, containerStyle: modalStyleOverrides.container, propagateSwipe: true }), children));
32
33
  }
@@ -7,5 +7,8 @@ export declare type HeaderProps = {
7
7
  BottomSection?: JSX.Element;
8
8
  currentPositionY: Animated.SharedValue<number>;
9
9
  };
10
- declare const Header: ({ TopLeftSection, TopRightSection, TopMiddleSection, MiddleSection, BottomSection, currentPositionY, }: HeaderProps) => JSX.Element;
10
+ declare const Header: {
11
+ ({ TopLeftSection, TopRightSection, TopMiddleSection, MiddleSection, BottomSection, currentPositionY, }: HeaderProps): JSX.Element;
12
+ PADDING_HORIZONTAL: number;
13
+ };
11
14
  export default Header;
@@ -2,8 +2,9 @@ import React, { useCallback, useState } from "react";
2
2
  import styled from "styled-components/native";
3
3
  import Animated, { useAnimatedStyle, interpolate, Extrapolate } from "react-native-reanimated";
4
4
  import Flex from "../Flex";
5
+ const PADDING_HORIZONTAL = 16;
5
6
  const Container = styled(Flex).attrs({
6
- paddingHorizontal: 16,
7
+ paddingHorizontal: PADDING_HORIZONTAL,
7
8
  }) `
8
9
  background-color: ${(p) => p.theme.colors.background.main};
9
10
  width: 100%;
@@ -68,4 +69,5 @@ const Header = ({ TopLeftSection, TopRightSection, TopMiddleSection, MiddleSecti
68
69
  React.createElement(Animated.View, { onLayout: middleWidth ? () => { } : onLayoutMiddle, style: MiddleStyle }, MiddleSection),
69
70
  BottomSection ? React.createElement(Flex, null, BottomSection) : null));
70
71
  };
72
+ Header.PADDING_HORIZONTAL = PADDING_HORIZONTAL;
71
73
  export default Header;
@@ -7,5 +7,11 @@ declare type ScrollContainerHeaderProps = BaseStyledProps & Omit<HeaderProps, "c
7
7
  onScroll?: (y: number) => void;
8
8
  containerProps?: BaseStyledProps;
9
9
  };
10
- declare const ScrollContainerHeader: ({ TopLeftSection, TopRightSection, TopMiddleSection, MiddleSection, BottomSection, children, onScroll, containerProps, ...props }: ScrollContainerHeaderProps) => JSX.Element;
10
+ declare const ScrollContainerHeader: {
11
+ ({ TopLeftSection, TopRightSection, TopMiddleSection, MiddleSection, BottomSection, children, onScroll, containerProps, ...props }: ScrollContainerHeaderProps): JSX.Element;
12
+ Header: {
13
+ ({ TopLeftSection, TopRightSection, TopMiddleSection, MiddleSection, BottomSection, currentPositionY, }: HeaderProps): JSX.Element;
14
+ PADDING_HORIZONTAL: number;
15
+ };
16
+ };
11
17
  export default ScrollContainerHeader;
@@ -29,4 +29,5 @@ const ScrollContainerHeader = (_a) => {
29
29
  React.createElement(Header, { TopLeftSection: TopLeftSection, TopRightSection: TopRightSection, TopMiddleSection: TopMiddleSection, MiddleSection: MiddleSection, BottomSection: BottomSection, currentPositionY: currentPositionY }),
30
30
  React.createElement(AnimatedFlatList, Object.assign({}, props, { onScroll: handleScroll, scrollEventThrottle: 16, data: [...React.Children.toArray(children)], renderItem: ({ item }) => React.createElement(View, null, item), keyExtractor: (_, index) => index }))));
31
31
  };
32
+ ScrollContainerHeader.Header = Header;
32
33
  export default ScrollContainerHeader;
@@ -1,24 +1,24 @@
1
1
  import React from "react";
2
2
  import styled from "styled-components/native";
3
3
  import Text from "../../Text";
4
- import { TouchableOpacity } from "react-native";
5
4
  import TemplateTabs from "../TemplateTabs";
6
- const TabBox = styled(TouchableOpacity) `
5
+ const TabBox = styled.TouchableOpacity `
7
6
  text-align: center;
8
7
  margin: auto;
9
8
  flex: 1;
9
+ border-radius: 48px;
10
+ overflow: hidden;
10
11
  `;
11
12
  const TabText = styled(Text).attrs((p) => ({
12
13
  // Avoid conflict with styled-system's size property by nulling size and renaming it
13
14
  size: undefined,
14
15
  lineHeight: p.size === "medium" ? "36px" : "26px",
15
16
  textAlign: "center",
16
- borderRadius: 48,
17
- px: p.theme.space[p.size === "medium" ? 7 : 6],
18
- height: p.size === "medium" ? 36 : 26,
17
+ px: 4,
18
+ height: p.size === "medium" ? "36px" : "26px",
19
19
  })) ``;
20
20
  const StyledTabs = styled(TemplateTabs) `
21
- border: ${(p) => `1px solid ${p.theme.colors.palette.neutral.c40}`};
21
+ border: ${(p) => `1px solid ${p.theme.colors.neutral.c40}`};
22
22
  border-radius: 35px;
23
23
  padding: ${(p) => `${p.theme.space[p.size === "medium" ? 2 : 1]}px`};
24
24
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/native-ui",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "Ledger Live - Desktop UI",
5
5
  "repository": "https://github.com/LedgerHQ/ui",
6
6
  "license": "MIT",