@ledgerhq/native-ui 0.35.0-nightly.0 → 0.35.0-nightly.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 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/TabSelector/index.tsx"],"names":[],"mappings":";AA8BA,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI;IACxC,MAAM,EAAE;QAAE,EAAE,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC3C,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,EACpD,MAAM,EACN,UAAU,EACV,QAAQ,EACR,aAAqB,GACtB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAuEnC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/TabSelector/index.tsx"],"names":[],"mappings":";AA8BA,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI;IACxC,MAAM,EAAE;QAAE,EAAE,EAAE,CAAC,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC3C,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,EACpD,MAAM,EACN,UAAU,EACV,QAAQ,EACR,aAAqB,GACtB,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAyEnC"}
@@ -14,13 +14,13 @@ const Container = styled(Flex) `
14
14
  const AnimatedBackground = styled(Animated.View) `
15
15
  position: absolute;
16
16
  height: 100%;
17
- border-radius: 8px;
17
+ border-radius: ${({ $radius }) => $radius}px;
18
18
  background-color: ${({ theme }) => theme.colors.opacityDefault.c05};
19
19
  `;
20
20
  const Tab = styled(Flex) `
21
21
  flex: 1;
22
22
  padding: 4px;
23
- border-radius: 8px;
23
+ border-radius: ${({ $radius }) => $radius}px;
24
24
  align-items: center;
25
25
  justify-content: center;
26
26
  `;
@@ -59,12 +59,14 @@ export default function TabSelector({ labels, initialTab, onToggle, filledVarian
59
59
  border: 1,
60
60
  borderColor: "opacityDefault.c10",
61
61
  };
62
+ const tabRadius = filledVariant ? 12 : 8;
62
63
  return (React.createElement(Box, { height: "100%", width: "100%", borderRadius: 12, bg: boxStyles.bg, p: boxStyles.p, border: boxStyles.border, borderColor: boxStyles.borderColor },
63
64
  React.createElement(Container, { onLayout: handleLayout },
64
- React.createElement(AnimatedBackground, { style: animatedStyle }),
65
- labels.map((label, index) => (React.createElement(Pressable, { hitSlop: 6, key: label.id, onPress: () => handlePress(label.id, index), style: ({ pressed }) => [
66
- { opacity: pressed && selectedIndex !== index ? 0.5 : 1, flex: 1 },
67
- ] },
68
- React.createElement(Tab, null,
65
+ React.createElement(AnimatedBackground, { style: animatedStyle, "$radius": tabRadius }),
66
+ labels.map((label, index) => (React.createElement(Pressable, { hitSlop: 6, key: label.id, onPress: () => handlePress(label.id, index), style: ({ pressed }) => ({
67
+ opacity: pressed && selectedIndex !== index ? 0.5 : 1,
68
+ flex: 1,
69
+ }) },
70
+ React.createElement(Tab, { "$radius": tabRadius },
69
71
  React.createElement(Text, { fontSize: 14, fontWeight: "semiBold", flexShrink: 1, numberOfLines: 1 }, label.value))))))));
70
72
  }
@@ -31,7 +31,7 @@ const QuickActionButton = ({ Icon, children, disabled, onPress, onPressWhenDisab
31
31
  React.isValidElement(children) && children.props?.i18nKey
32
32
  ? children.props.i18nKey.split(".").pop() // Extract the last part of the key
33
33
  : children?.toString().toLowerCase();
34
- return (React.createElement(Base, { disabled: onPressWhenDisabled ? false : disabled, onPress: disabled ? onPressWhenDisabled : onPress, visuallyDisabled: disabled, variant: variant, isActive: !disabled && isActive, ...otherProps, testID: `${testID}-${text}` },
34
+ return (React.createElement(Base, { disabled: onPressWhenDisabled ? false : disabled, onPress: disabled ? onPressWhenDisabled : onPress, visuallyDisabled: disabled, variant: variant, isActive: isActive, ...otherProps, testID: `${testID}-${text}` },
35
35
  React.createElement(Icon, { size: variant === "small" ? 20 : 24, color: disabled ? "neutral.c50" : "neutral.c100" }),
36
36
  React.createElement(StyledText, { numberOfLines: 1, variant: textVariant, fontWeight: "semiBold", color: disabled ? "neutral.c50" : "neutral.c100", mt: 2 }, children)));
37
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/native-ui",
3
- "version": "0.35.0-nightly.0",
3
+ "version": "0.35.0-nightly.1",
4
4
  "description": "Ledger Live - Mobile UI",
5
5
  "repository": {
6
6
  "type": "git",