@ledgerhq/native-ui 0.5.0 → 0.6.3

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.
Files changed (104) hide show
  1. package/README.md +1 -4
  2. package/components/Carousel/index.js +3 -5
  3. package/components/Form/Checkbox/index.d.ts +1 -1
  4. package/components/Form/Checkbox/index.js +1 -1
  5. package/components/Form/Input/BaseInput/index.d.ts +1 -1
  6. package/components/Form/Input/BaseInput/index.js +19 -5
  7. package/components/Form/Input/NumberInput/index.js +2 -2
  8. package/components/Form/SelectableList.d.ts +12 -3
  9. package/components/Form/SelectableList.js +9 -8
  10. package/components/Form/Slider/index.native.js +1 -1
  11. package/components/Form/Switch/index.d.ts +1 -1
  12. package/components/Form/Switch/index.js +2 -2
  13. package/components/Form/Toggle/index.d.ts +1 -1
  14. package/components/Form/Toggle/index.js +1 -1
  15. package/components/Form/index.d.ts +1 -0
  16. package/components/Form/index.js +1 -0
  17. package/components/Icon/BoxedIcon.d.ts +49 -0
  18. package/components/Icon/BoxedIcon.js +85 -0
  19. package/components/Icon/Icon.d.ts +9 -0
  20. package/components/Icon/Icon.js +20 -0
  21. package/components/Icon/IconBox/index.d.ts +2 -4
  22. package/components/Icon/IconBox/index.js +1 -2
  23. package/components/Icon/index.d.ts +2 -0
  24. package/components/Icon/index.js +2 -0
  25. package/components/Icon/type.d.ts +7 -0
  26. package/components/Icon/type.js +1 -0
  27. package/components/Layout/Collapse/Accordion/index.js +1 -1
  28. package/components/Layout/List/IconBoxList/index.d.ts +10 -0
  29. package/components/Layout/List/IconBoxList/index.js +19 -0
  30. package/components/Layout/List/List/index.d.ts +13 -0
  31. package/components/Layout/List/List/index.js +29 -0
  32. package/components/Layout/List/NumberedList/index.d.ts +9 -0
  33. package/components/Layout/List/NumberedList/index.js +23 -0
  34. package/components/Layout/List/TipList/index.d.ts +9 -0
  35. package/components/Layout/List/TipList/index.js +20 -0
  36. package/components/Layout/List/index.d.ts +4 -0
  37. package/components/Layout/List/index.js +4 -0
  38. package/components/Layout/ScrollContainer/index.d.ts +2 -1
  39. package/components/Layout/ScrollContainer/index.js +2 -2
  40. package/components/Layout/ScrollContainerHeader/Header.d.ts +1 -1
  41. package/components/Layout/ScrollContainerHeader/Header.js +23 -16
  42. package/components/Layout/ScrollContainerHeader/index.d.ts +3 -2
  43. package/components/Layout/ScrollContainerHeader/index.js +9 -4
  44. package/components/Layout/index.d.ts +1 -0
  45. package/components/Layout/index.js +1 -0
  46. package/components/Loader/InfiniteLoader/index.d.ts +9 -0
  47. package/components/Loader/InfiniteLoader/index.js +58 -0
  48. package/components/Loader/ProgressLoader/index.d.ts +11 -0
  49. package/components/Loader/ProgressLoader/index.js +24 -0
  50. package/components/Loader/index.d.ts +2 -11
  51. package/components/Loader/index.js +2 -24
  52. package/components/Navigation/FlowStepper/index.d.ts +70 -0
  53. package/components/Navigation/FlowStepper/index.js +36 -0
  54. package/components/Navigation/SlideIndicator/index.d.ts +1 -1
  55. package/components/Navigation/SlideIndicator/index.js +2 -3
  56. package/components/Navigation/Stepper/index.d.ts +1 -1
  57. package/components/Navigation/Stepper/index.js +4 -4
  58. package/components/Navigation/index.d.ts +1 -0
  59. package/components/Navigation/index.js +1 -0
  60. package/components/ProgressBar/index.d.ts +15 -0
  61. package/components/ProgressBar/index.js +33 -0
  62. package/components/Tabs/Chip/index.d.ts +5 -0
  63. package/components/Tabs/Chip/index.js +20 -0
  64. package/components/Tabs/Graph/index.d.ts +5 -0
  65. package/components/Tabs/Graph/index.js +21 -0
  66. package/components/Tabs/TemplateTabs/index.d.ts +29 -0
  67. package/components/Tabs/TemplateTabs/index.js +14 -0
  68. package/components/Tabs/index.d.ts +2 -0
  69. package/components/Tabs/index.js +2 -0
  70. package/components/Text/getTextStyle.d.ts +1 -0
  71. package/components/Text/getTextStyle.js +5 -0
  72. package/components/Text/index.d.ts +6 -8
  73. package/components/Text/index.js +15 -8
  74. package/components/cta/Button/index.d.ts +1 -0
  75. package/components/cta/Button/index.js +9 -11
  76. package/components/cta/Link/index.js +1 -5
  77. package/components/index.d.ts +4 -2
  78. package/components/index.js +5 -2
  79. package/components/message/Alert/index.d.ts +1 -1
  80. package/components/message/Alert/index.js +2 -2
  81. package/components/{drawer → message}/Notification/index.d.ts +5 -4
  82. package/components/{drawer → message}/Notification/index.js +16 -12
  83. package/components/message/index.d.ts +1 -0
  84. package/components/message/index.js +1 -0
  85. package/components/transitions/Fade.d.ts +5 -0
  86. package/components/transitions/Fade.js +32 -0
  87. package/components/transitions/Slide.d.ts +11 -0
  88. package/components/transitions/Slide.js +49 -0
  89. package/components/transitions/Transition.d.ts +49 -0
  90. package/components/transitions/Transition.js +39 -0
  91. package/components/transitions/index.d.ts +4 -0
  92. package/components/transitions/index.js +4 -0
  93. package/components/transitions/types.d.ts +21 -0
  94. package/components/transitions/types.js +1 -0
  95. package/package.json +3 -3
  96. package/styles/StyleProvider.d.ts +1 -1
  97. package/styles/StyleProvider.js +1 -1
  98. package/styles/helpers.js +1 -3
  99. package/assets/fonts/.DS_Store +0 -0
  100. package/assets/fonts/alpha/.DS_Store +0 -0
  101. package/components/Navigation/ToggleGroup/index.d.ts +0 -22
  102. package/components/Navigation/ToggleGroup/index.js +0 -25
  103. package/components/drawer/index.d.ts +0 -1
  104. package/components/drawer/index.js +0 -1
package/styles/helpers.js CHANGED
@@ -5,9 +5,7 @@ export const darken = (c, a) => Color(c).darken(a).toString();
5
5
  export const lighten = (c, a) => Color(c).lighten(a).toString();
6
6
  export const mix = (c, b, a) => Color(c).mix(Color(b), a).toString();
7
7
  const get = (object, path) => {
8
- const p = typeof path === "string"
9
- ? path.split(".").filter((key) => key.length)
10
- : path;
8
+ const p = typeof path === "string" ? path.split(".").filter((key) => key.length) : path;
11
9
  return p.reduce((dive, key) => dive && dive[key], object);
12
10
  };
13
11
  export const getColor = (p, color) => {
Binary file
Binary file
@@ -1,22 +0,0 @@
1
- /// <reference types="styled-components-react-native" />
2
- import React from "react";
3
- import { TouchableOpacity } from "react-native";
4
- export declare type ToggleGroupProps = {
5
- labels: string[];
6
- activeIndex: number;
7
- onChange: (newIndex: number) => void;
8
- };
9
- export declare const ToggleGroupContainer: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, 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>> & {
10
- columnGap?: string | number | undefined;
11
- rowGap?: string | number | undefined;
12
- color?: string | undefined;
13
- display?: string | undefined;
14
- position?: string | undefined;
15
- maxHeight?: number | undefined;
16
- } & {
17
- flexDirection: string;
18
- alignItems: string;
19
- }, "alignItems" | "flexDirection">;
20
- export declare const ToggleBox: import("styled-components").StyledComponent<typeof TouchableOpacity, import("styled-components").DefaultTheme, {}, never>;
21
- declare const ToggleGroup: (props: ToggleGroupProps) => React.ReactElement;
22
- export default ToggleGroup;
@@ -1,25 +0,0 @@
1
- import React from "react";
2
- import styled from "styled-components/native";
3
- import Text from "../../Text";
4
- import { TouchableOpacity } from "react-native";
5
- import Button from "../../cta/Button";
6
- import FlexBox from "../../Layout/Flex";
7
- export const ToggleGroupContainer = styled(FlexBox).attrs({
8
- flexDirection: "row",
9
- alignItems: "stretch",
10
- }) `
11
- width: 100%;
12
- border: ${(p) => `1px solid ${p.theme.colors.neutral.c40}`};
13
- border-radius: 35px;
14
- padding: 4px;
15
- `;
16
- export const ToggleBox = styled(TouchableOpacity) `
17
- text-align: center;
18
- margin: auto;
19
- flex: 1;
20
- `;
21
- const ToggleGroup = (props) => {
22
- const { labels, activeIndex, onChange } = props;
23
- return (React.createElement(ToggleGroupContainer, null, labels.map((label, key) => (React.createElement(ToggleBox, { key: key, onPress: () => onChange(key) }, key === activeIndex ? (React.createElement(Button, { type: "main" }, label)) : (React.createElement(Text, { lineHeight: 36 }, label)))))));
24
- };
25
- export default ToggleGroup;
@@ -1 +0,0 @@
1
- export { default as Notification } from "./Notification";
@@ -1 +0,0 @@
1
- export { default as Notification } from "./Notification";