@artsy/palette-mobile 10.0.3 → 10.0.4

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,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { TextVariant } from "@artsy/palette-tokens/dist/typography/v3";
3
3
  import { Text as RNText, TextProps as RNTextProps } from "react-native";
4
- import { ColorProps, FontSizeProps, SpaceProps, TypographyProps } from "styled-system";
4
+ import { ColorProps, LineHeightProps, SpaceProps, TypographyProps } from "styled-system";
5
5
  export interface TextProps extends RNTextProps, InnerStyledTextProps {
6
6
  children?: React.ReactNode;
7
7
  variant?: TextVariant;
@@ -13,5 +13,9 @@ export interface TextProps extends RNTextProps, InnerStyledTextProps {
13
13
  maxWidth?: boolean;
14
14
  }
15
15
  export declare const Text: import("react").ForwardRefExoticComponent<TextProps & import("react").RefAttributes<RNText>>;
16
- type InnerStyledTextProps = ColorProps & SpaceProps & TypographyProps & FontSizeProps;
16
+ type LineHeight = `${number}px`;
17
+ type LineHeightTheme = {
18
+ lineHeights: Record<LineHeight, any>;
19
+ };
20
+ type InnerStyledTextProps = ColorProps & SpaceProps & TypographyProps & LineHeightProps<LineHeightTheme>;
17
21
  export {};
@@ -34,5 +34,4 @@ const InnerStyledText = (0, native_1.default)(react_native_1.Text) `
34
34
  ${styled_system_1.color}
35
35
  ${styled_system_1.space}
36
36
  ${styled_system_1.typography}
37
- ${styled_system_1.fontSize}
38
37
  `;
@@ -19,7 +19,7 @@ const VariantsInBoxes = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data
19
19
  exports.VariantsInBoxes = VariantsInBoxes;
20
20
  const BasicProps = () => ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(_1.Text, { children: "regular ~~ This is a text." }), (0, jsx_runtime_1.jsx)(_1.LinkText, { children: "LinkText." }), (0, jsx_runtime_1.jsx)(_1.Text, { caps: true, children: "caps ~~ This is a text." }), (0, jsx_runtime_1.jsx)(_1.Text, { italic: true, children: "italics ~~ This is a text." }), (0, jsx_runtime_1.jsx)(_1.Text, { caps: true, italic: true, children: "caps italics ~~ This is a text." }), (0, jsx_runtime_1.jsx)(_1.Text, { weight: "medium", children: "weight: medium ~~ This is a text." }), (0, jsx_runtime_1.jsx)(_1.Text, { maxWidth: true, children: "maxwidth ~~ This is a text." })] }));
21
21
  exports.BasicProps = BasicProps;
22
- const Misc = () => ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: { borderWidth: 1, borderColor: "black" }, children: (0, jsx_runtime_1.jsx)(_1.Text, { pl: 2, mb: 4, mr: 80, color: "red", backgroundColor: "orange", children: "Testing the other props" }) }), (0, jsx_runtime_1.jsx)(react_native_1.View, {})] }));
22
+ const Misc = () => ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(react_native_1.View, { style: { borderWidth: 1, borderColor: "black" }, children: (0, jsx_runtime_1.jsx)(_1.Text, { pl: 2, mb: 4, mr: 80, color: "red", backgroundColor: "orange", children: "Testing the other props" }) }), (0, jsx_runtime_1.jsx)(react_native_1.View, {}), (0, jsx_runtime_1.jsx)(_1.Text, { lineHeight: "20px", fontSize: 30, children: "wow" })] }));
23
23
  exports.Misc = Misc;
24
24
  // this is useful for making sure our custom fonts are rendering at the same height for ios and android
25
25
  const FontCenteringRaw = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "10.0.3",
3
+ "version": "10.0.4",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "react-native run-android",