@ledgerhq/native-ui 0.8.3 → 0.8.4-nightly.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,6 +1,7 @@
1
1
  import { TextVariants } from "../../styles/theme";
2
2
  import { BaseTextProps } from "./index";
3
3
  export declare type FontWeightTypes = "medium" | "semiBold" | "bold";
4
+ export declare const fontWeightTypes: FontWeightTypes[];
4
5
  export declare function getBracketSize({ variant }: {
5
6
  variant?: TextVariants;
6
7
  }): number;
@@ -11,6 +12,7 @@ export declare function getTextTypeStyle({ bracket }: {
11
12
  lineHeight?: string;
12
13
  paddingTop?: number;
13
14
  textTransform?: string;
15
+ letterSpacing?: number;
14
16
  }>;
15
17
  export declare function getTextStyle({ variant, bracket, fontWeight, }: Partial<BaseTextProps>): {
16
18
  fontFamily: string;
@@ -1,5 +1,7 @@
1
+ export const fontWeightTypes = ["medium", "semiBold", "bold"];
1
2
  const bracketSizes = {
2
3
  h1: 32,
4
+ h1Inter: 32,
3
5
  h2: 28,
4
6
  h3: 20,
5
7
  h4: 18,
@@ -24,6 +26,11 @@ export function getTextTypeStyle({ bracket }) {
24
26
  paddingTop: bracket ? 5 : 0,
25
27
  textTransform: "uppercase",
26
28
  },
29
+ h1Inter: {
30
+ fontFamily: "Inter",
31
+ lineHeight: "42px",
32
+ letterSpacing: -1,
33
+ },
27
34
  h2: {
28
35
  fontFamily: "Alpha",
29
36
  lineHeight: "28px",
@@ -1,8 +1,9 @@
1
1
  import { ColorPalette } from "@ledgerhq/ui-shared";
2
2
  export declare const space: number[];
3
- export declare type TextVariants = "h1" | "h2" | "h3" | "h4" | "h5" | "large" | "body" | "bodyLineHeight" | "paragraph" | "paragraphLineHeight" | "small" | "subtitle" | "tiny";
3
+ export declare const textVariants: readonly ["h1", "h1Inter", "h2", "h3", "h4", "h5", "large", "body", "bodyLineHeight", "paragraph", "paragraphLineHeight", "small", "subtitle", "tiny"];
4
+ export declare type TextVariants = typeof textVariants[number];
4
5
  export declare type ThemeScale<Type, Aliases extends string> = Array<Type> & Record<Aliases, Type>;
5
- export declare const fontSizes: ThemeScale<number, TextVariants>;
6
+ export declare const fontSizes: ThemeScale<number, "h1" | "h1Inter" | "h2" | "h3" | "h4" | "h5" | "large" | "body" | "bodyLineHeight" | "paragraph" | "paragraphLineHeight" | "small" | "subtitle" | "tiny">;
6
7
  export declare const radii: number[];
7
8
  export declare const zIndexes: number[];
8
9
  export declare type Theme = {
@@ -1,8 +1,24 @@
1
1
  import { palettes } from "@ledgerhq/ui-shared";
2
2
  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
3
3
  export const space = [0, 2, 4, 8, 12, 14, 16, 24, 32, 40, 48, 64, 80, 96, 120];
4
- // 0 1 2 3 4 5 6 7 8
5
- export const fontSizes = [10, 11, 12, 13, 14, 16, 18, 24, 28];
4
+ export const textVariants = [
5
+ "h1",
6
+ "h1Inter",
7
+ "h2",
8
+ "h3",
9
+ "h4",
10
+ "h5",
11
+ "large",
12
+ "body",
13
+ "bodyLineHeight",
14
+ "paragraph",
15
+ "paragraphLineHeight",
16
+ "small",
17
+ "subtitle",
18
+ "tiny",
19
+ ];
20
+ // 0 1 2 3 4 5 6 7 8 9
21
+ export const fontSizes = [10, 11, 12, 13, 14, 16, 18, 24, 28, 32];
6
22
  [
7
23
  fontSizes.tiny,
8
24
  fontSizes.subtitle,
@@ -13,6 +29,7 @@ export const fontSizes = [10, 11, 12, 13, 14, 16, 18, 24, 28];
13
29
  fontSizes.h3,
14
30
  fontSizes.h2,
15
31
  fontSizes.h1,
32
+ fontSizes.h1Inter,
16
33
  ] = fontSizes;
17
34
  fontSizes.bodyLineHeight = fontSizes.body;
18
35
  fontSizes.paragraphLineHeight = fontSizes.paragraph;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/native-ui",
3
- "version": "0.8.3",
3
+ "version": "0.8.4-nightly.0",
4
4
  "description": "Ledger Live - Mobile UI",
5
5
  "repository": {
6
6
  "type": "git",