@gympass/yoga 7.105.0 → 7.106.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.
@@ -79,7 +79,6 @@ const StyledItems = import_styled_components.default.ul`
79
79
  }
80
80
  }
81
81
  }) => import_styled_components.css`
82
- position: absolute;
83
82
  bottom: 0;
84
83
  display: grid;
85
84
  grid-auto-columns: minmax(0, 1fr);
@@ -25,105 +25,144 @@ const Text = ({ fontSizes, lineHeights, fontWeights }) => ({
25
25
  display1: {
26
26
  fontFamily: "NaN Holo Condensed",
27
27
  fontsize: fontSizes.xhuge,
28
- lineHeight: lineHeights.xhuge,
29
- fontWeight: fontWeights.bold
28
+ fontWeight: fontWeights.bold,
29
+ lineHeight: lineHeights.xhuge
30
30
  },
31
31
  display2: {
32
32
  fontFamily: "NaN Holo Condensed",
33
33
  fontsize: fontSizes.xxxlarge,
34
- lineHeight: lineHeights.xxlarge,
35
- fontWeight: fontWeights.bold
34
+ fontWeight: fontWeights.bold,
35
+ lineHeight: lineHeights.xxlarge
36
36
  },
37
37
  display3: {
38
38
  fontFamily: "NaN Holo Condensed",
39
39
  fontsize: fontSizes.xxlarge,
40
- lineHeight: lineHeights.xlarge,
41
- fontWeight: fontWeights.bold
40
+ fontWeight: fontWeights.bold,
41
+ lineHeight: lineHeights.xlarge
42
42
  },
43
43
  display4: {
44
44
  fontFamily: "NaN Holo Condensed",
45
45
  fontsize: fontSizes.xlarge,
46
- lineHeight: lineHeights.medium,
47
- fontWeight: fontWeights.bold
46
+ fontWeight: fontWeights.bold,
47
+ lineHeight: lineHeights.medium
48
48
  },
49
49
  displayNumber: {
50
50
  fontFamily: "NaN Holo Condensed",
51
51
  fontsize: fontSizes.xxxlarge,
52
- lineHeight: lineHeights.xxlarge,
53
- fontWeight: fontWeights.bold
52
+ fontWeight: fontWeights.bold,
53
+ lineHeight: lineHeights.xxlarge
54
54
  },
55
55
  h1: {
56
56
  fontsize: fontSizes.huge,
57
- lineHeight: lineHeights.huge,
58
- fontWeight: fontWeights.medium
57
+ fontWeight: fontWeights.medium,
58
+ lineHeight: lineHeights.huge
59
+ },
60
+ "h1-light": {
61
+ fontWeight: fontWeights.light
59
62
  },
60
63
  h2: {
61
64
  fontsize: fontSizes.xxxlarge,
62
- lineHeight: lineHeights.xxxlarge,
63
- fontWeight: fontWeights.medium
65
+ fontWeight: fontWeights.medium,
66
+ lineHeight: lineHeights.xxxlarge
67
+ },
68
+ "h2-light": {
69
+ fontWeight: fontWeights.light
64
70
  },
65
71
  h3: {
66
72
  fontsize: fontSizes.xxlarge,
67
- lineHeight: lineHeights.xxlarge,
68
- fontWeight: fontWeights.medium
73
+ fontWeight: fontWeights.medium,
74
+ lineHeight: lineHeights.xxlarge
75
+ },
76
+ "h3-light": {
77
+ fontWeight: fontWeights.light
69
78
  },
70
79
  h4: {
71
80
  fontsize: fontSizes.xlarge,
72
- lineHeight: lineHeights.xlarge,
73
- fontWeight: fontWeights.medium
81
+ fontWeight: fontWeights.medium,
82
+ lineHeight: lineHeights.xlarge
83
+ },
84
+ "h4-light": {
85
+ fontWeight: fontWeights.light
74
86
  },
75
87
  h5: {
76
88
  fontsize: fontSizes.large,
77
- lineHeight: lineHeights.large,
78
- fontWeight: fontWeights.medium
89
+ fontWeight: fontWeights.medium,
90
+ lineHeight: lineHeights.large
91
+ },
92
+ "h5-light": {
93
+ fontWeight: fontWeights.light
79
94
  },
80
95
  body1: {
81
96
  fontsize: fontSizes.medium,
82
- lineHeight: lineHeights.medium,
97
+ fontWeight: fontWeights.regular,
98
+ lineHeight: lineHeights.medium
99
+ },
100
+ "body1-bold": {
83
101
  fontWeight: fontWeights.medium
84
102
  },
85
103
  body2: {
86
104
  fontsize: fontSizes.small,
87
- lineHeight: lineHeights.small,
105
+ fontWeight: fontWeights.regular,
106
+ lineHeight: lineHeights.small
107
+ },
108
+ "body2-bold": {
88
109
  fontWeight: fontWeights.medium
89
110
  },
90
111
  caption: {
91
112
  fontsize: fontSizes.xsmall,
92
- lineHeight: lineHeights.xsmall,
93
- fontWeight: fontWeights.regular
113
+ fontWeight: fontWeights.regular,
114
+ lineHeight: lineHeights.xsmall
94
115
  },
95
116
  overline: {
96
117
  fontsize: fontSizes.xsmall,
97
- lineHeight: lineHeights.xsmall,
98
- fontWeight: fontWeights.bold
118
+ fontWeight: fontWeights.medium,
119
+ lineHeight: lineHeights.xsmall
99
120
  },
100
121
  sectionTitle: {
101
122
  fontsize: fontSizes.xsmall,
102
- lineHeight: lineHeights.xsmall,
103
123
  fontWeight: fontWeights.medium,
124
+ lineHeight: lineHeights.xsmall,
104
125
  letterSpacing: 1,
105
126
  textTransform: "uppercase"
106
127
  },
107
128
  smallestException: {
108
129
  fontsize: fontSizes.xxsmall,
109
- lineHeight: lineHeights.xxsmall,
110
- fontWeight: fontWeights.regular
130
+ fontWeight: fontWeights.regular,
131
+ lineHeight: lineHeights.xxsmall
111
132
  },
112
133
  // deprecated, please don't use
113
134
  p: {
114
135
  fontsize: fontSizes.medium,
115
- lineHeight: lineHeights.medium,
116
- fontWeight: fontWeights.regular
136
+ fontWeight: fontWeights.regular,
137
+ lineHeight: lineHeights.medium
138
+ },
139
+ "p-light": {
140
+ fontWeight: fontWeights.light
141
+ },
142
+ "p-bold": {
143
+ fontWeight: fontWeights.medium
117
144
  },
118
145
  small: {
119
146
  fontsize: fontSizes.small,
120
- lineHeight: lineHeights.small,
121
- fontWeight: fontWeights.regular
147
+ fontWeight: fontWeights.regular,
148
+ lineHeight: lineHeights.small
149
+ },
150
+ "small-light": {
151
+ fontWeight: fontWeights.light
152
+ },
153
+ "small-bold": {
154
+ fontWeight: fontWeights.medium
122
155
  },
123
156
  tiny: {
124
157
  fontsize: fontSizes.xsmall,
125
- lineHeight: lineHeights.xsmall,
126
- fontWeight: fontWeights.regular
158
+ fontWeight: fontWeights.regular,
159
+ lineHeight: lineHeights.xsmall
160
+ },
161
+ "tiny-light": {
162
+ fontWeight: fontWeights.light
163
+ },
164
+ "tiny-bold": {
165
+ fontWeight: fontWeights.medium
127
166
  },
128
167
  light: {
129
168
  fontWeight: fontWeights.light
@@ -24,90 +24,119 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_react = __toESM(require("react"));
26
26
  var import_react_native = require("@testing-library/react-native");
27
- var import__ = require("../..");
28
- var import__2 = require(".");
27
+ var import__ = require(".");
28
+ var import__2 = require("../..");
29
29
  describe("<Text />", () => {
30
30
  describe("Snapshots", () => {
31
31
  it("should match snapshot with Text", () => {
32
32
  const { toJSON } = (0, import_react_native.render)(
33
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.ThemeProvider, { children: [
34
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Display1, { children: "Live the mission" }),
35
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Display2, { children: "Live the mission" }),
36
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Display3, { children: "Live the mission" }),
37
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Display4, { children: "Live the mission" }),
38
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.DisplayNumber, { children: "Live the mission" }),
39
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H1, { children: "Live the mission" }),
40
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H2, { children: "Live the mission" }),
41
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H3, { children: "Live the mission" }),
42
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H4, { children: "Live the mission" }),
43
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Body1, { children: "Live the mission" }),
44
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Body2, { children: "Live the mission" }),
45
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Caption, { children: "Live the mission" }),
46
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Overline, { children: "Live the mission" }),
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SectionTitle, { children: "Live the mission" }),
48
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.SmallestException, { children: "Live the mission" }),
49
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { children: "Live the mission" }),
50
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Small, { children: "Live the mission" }),
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Tiny, { children: "Live the mission" }),
52
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Regular, { children: "Live the mission" }),
53
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Medium, { children: "Live the mission" }),
54
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Bold, { children: "Live the mission" }),
55
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Black, { children: "Live the mission" })
33
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
34
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display1, { children: "Live the mission" }),
35
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display2, { children: "Live the mission" }),
36
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display3, { children: "Live the mission" }),
37
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display4, { children: "Live the mission" }),
38
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.DisplayNumber, { children: "Live the mission" }),
39
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { children: "Live the mission" }),
40
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { children: "Live the mission" }),
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { children: "Live the mission" }),
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H4, { children: "Live the mission" }),
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Body1, { children: "Live the mission" }),
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Body2, { children: "Live the mission" }),
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Caption, { children: "Live the mission" }),
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Overline, { children: "Live the mission" }),
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.SectionTitle, { children: "Live the mission" }),
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.SmallestException, { children: "Live the mission" }),
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { children: "Live the mission" }),
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Small, { children: "Live the mission" }),
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Tiny, { children: "Live the mission" }),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Regular, { children: "Live the mission" }),
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Medium, { children: "Live the mission" }),
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Bold, { children: "Live the mission" }),
55
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Black, { children: "Live the mission" })
56
+ ] })
57
+ );
58
+ expect(toJSON()).toMatchSnapshot();
59
+ });
60
+ it("should match snapshot with Text when v3Theme is settled", () => {
61
+ const { toJSON } = (0, import_react_native.render)(
62
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display1, { children: "Text Display1" }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display2, { children: "Text Display2" }),
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display3, { children: "Text Display3" }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Display4, { children: "Text Display4" }),
67
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.DisplayNumber, { children: "Text DisplayNumber" }),
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { children: "Text H1" }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { children: "Text H2" }),
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { children: "Text H3" }),
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H4, { children: "Text H4" }),
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Body1, { children: "Text Body1" }),
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Body2, { children: "Text Body2" }),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Caption, { children: "Text Caption" }),
75
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Overline, { children: "Text Overline" }),
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.SectionTitle, { children: "Text SectionTitle" }),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.SmallestException, { children: "Text SmallestException" }),
78
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { children: "Text" }),
79
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Small, { children: "Text Small" }),
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Tiny, { children: "Text Tiny" }),
81
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Regular, { children: "Text Regular" }),
82
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Medium, { children: "Text Medium" }),
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Bold, { children: "Text Bold" }),
84
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Black, { children: "Text Black" })
56
85
  ] })
57
86
  );
58
87
  expect(toJSON()).toMatchSnapshot();
59
88
  });
60
89
  it("should match snapshot with Text variant", () => {
61
90
  const { toJSON } = (0, import_react_native.render)(
62
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.ThemeProvider, { children: [
63
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H1, { variant: "primary", children: "Live the mission" }),
64
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H2, { variant: "secondary", children: "Live the mission" }),
65
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H3, { variant: "tertiary", children: "Live the mission" })
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
92
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { variant: "primary", children: "Live the mission" }),
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { variant: "secondary", children: "Live the mission" }),
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { variant: "tertiary", children: "Live the mission" })
66
95
  ] })
67
96
  );
68
97
  expect(toJSON()).toMatchSnapshot();
69
98
  });
70
99
  it("should match snapshot with Text light", () => {
71
100
  const { toJSON } = (0, import_react_native.render)(
72
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.ThemeProvider, { children: [
73
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H1, { light: true, children: "Live the mission" }),
74
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H2, { light: true, children: "Live the mission" }),
75
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H3, { light: true, children: "Live the mission" })
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
102
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { light: true, children: "Live the mission" }),
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { light: true, children: "Live the mission" }),
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { light: true, children: "Live the mission" })
76
105
  ] })
77
106
  );
78
107
  expect(toJSON()).toMatchSnapshot();
79
108
  });
80
109
  it("should match snapshot with Text fontSize", () => {
81
110
  const { toJSON } = (0, import_react_native.render)(
82
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.ThemeProvider, { children: [
83
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Small, { fontSize: "xsmall", children: "Live the small mission" }),
84
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Tiny, { fontSize: "medium", children: "Live the medium mission" }),
85
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Regular, { fontSize: "xlarge", children: "Live the xlarge mission" }),
86
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Medium, { fontSize: "xxxlarge", children: "Live the xxxlarge mission" })
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Small, { fontSize: "xsmall", children: "Live the small mission" }),
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Tiny, { fontSize: "medium", children: "Live the medium mission" }),
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Regular, { fontSize: "xlarge", children: "Live the xlarge mission" }),
115
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Medium, { fontSize: "xxxlarge", children: "Live the xxxlarge mission" })
87
116
  ] })
88
117
  );
89
118
  expect(toJSON()).toMatchSnapshot();
90
119
  });
91
120
  it("should match snapshot with Text size", () => {
92
121
  const { toJSON } = (0, import_react_native.render)(
93
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.ThemeProvider, { children: [
94
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Small, { size: "xsmall", children: "Live the small mission" }),
95
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Tiny, { size: "medium", children: "Live the medium mission" }),
96
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Regular, { size: "xlarge", children: "Live the xlarge mission" }),
97
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.Medium, { size: "xxxlarge", children: "Live the xxxlarge mission" })
122
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
123
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Small, { size: "xsmall", children: "Live the small mission" }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Tiny, { size: "medium", children: "Live the medium mission" }),
125
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Regular, { size: "xlarge", children: "Live the xlarge mission" }),
126
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.Medium, { size: "xxxlarge", children: "Live the xxxlarge mission" })
98
127
  ] })
99
128
  );
100
129
  expect(toJSON()).toMatchSnapshot();
101
130
  });
102
131
  it("should match snapshot with inverted Text", () => {
103
132
  const { toJSON } = (0, import_react_native.render)(
104
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { inverted: true, children: "Live the mission" }) })
133
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { inverted: true, children: "Live the mission" }) })
105
134
  );
106
135
  expect(toJSON()).toMatchSnapshot();
107
136
  });
108
137
  it("should match snapshot with truncated lines Text", () => {
109
138
  const { toJSON } = (0, import_react_native.render)(
110
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.Text, { numberOfLines: 1, children: [
139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.Text, { numberOfLines: 1, children: [
111
140
  "Live the mission",
112
141
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("br", {}),
113
142
  "even in one line"
@@ -117,32 +146,32 @@ describe("<Text />", () => {
117
146
  });
118
147
  it("should match snapshot with border prop system", () => {
119
148
  const { toJSON } = (0, import_react_native.render)(
120
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { border: "small", bRadius: "small", children: "Live the mission" }) })
149
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { border: "small", bRadius: "small", children: "Live the mission" }) })
121
150
  );
122
151
  expect(toJSON()).toMatchSnapshot();
123
152
  });
124
153
  it("should match snapshot with background color prop system", () => {
125
154
  const { toJSON } = (0, import_react_native.render)(
126
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { backgroundColor: "vibin", children: "Live the mission" }) })
155
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { backgroundColor: "vibin", children: "Live the mission" }) })
127
156
  );
128
157
  expect(toJSON()).toMatchSnapshot();
129
158
  });
130
159
  it("should match snapshot with elevation prop system", () => {
131
160
  const { toJSON } = (0, import_react_native.render)(
132
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { elevation: "medium", children: "Live the mission" }) })
161
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { elevation: "medium", children: "Live the mission" }) })
133
162
  );
134
163
  expect(toJSON()).toMatchSnapshot();
135
164
  });
136
165
  it("should match snapshot with spacing prop system", () => {
137
166
  const { toJSON } = (0, import_react_native.render)(
138
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { m: "medium", paddingVertical: "large", paddingHorizontal: "small", children: "Live the mission" }) })
167
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { m: "medium", paddingVertical: "large", paddingHorizontal: "small", children: "Live the mission" }) })
139
168
  );
140
169
  expect(toJSON()).toMatchSnapshot();
141
170
  });
142
171
  it("should match snapshot with typography prop system", () => {
143
172
  const { toJSON } = (0, import_react_native.render)(
144
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
145
- import__2.Text,
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
174
+ import__.Text,
146
175
  {
147
176
  color: "text.primary",
148
177
  fontSize: "small",
@@ -156,34 +185,34 @@ describe("<Text />", () => {
156
185
  });
157
186
  it("should match snapshot with display prop system", () => {
158
187
  const { toJSON } = (0, import_react_native.render)(
159
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { display: "flex", children: "Live the mission" }) })
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { display: "flex", children: "Live the mission" }) })
160
189
  );
161
190
  expect(toJSON()).toMatchSnapshot();
162
191
  });
163
192
  it("should match snapshot with position prop system", () => {
164
193
  const { toJSON } = (0, import_react_native.render)(
165
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { position: "absolute", top: "small", left: "small", children: "Live the mission" }) })
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { position: "absolute", top: "small", left: "small", children: "Live the mission" }) })
166
195
  );
167
196
  expect(toJSON()).toMatchSnapshot();
168
197
  });
169
198
  it("should match snapshot with flexes prop system", () => {
170
199
  const { toJSON } = (0, import_react_native.render)(
171
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { display: "flex", flexGrow: 1, children: "Live the mission" }) })
200
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { display: "flex", flexGrow: 1, children: "Live the mission" }) })
172
201
  );
173
202
  expect(toJSON()).toMatchSnapshot();
174
203
  });
175
204
  it("should match snapshot with overflows prop system", () => {
176
205
  const { toJSON } = (0, import_react_native.render)(
177
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text, { overflow: "scroll", children: "Live the mission" }) })
206
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.ThemeProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text, { overflow: "scroll", children: "Live the mission" }) })
178
207
  );
179
208
  expect(toJSON()).toMatchSnapshot();
180
209
  });
181
210
  it("should match snapshot with Text bold", () => {
182
211
  const { toJSON } = (0, import_react_native.render)(
183
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__.ThemeProvider, { children: [
184
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H1, { bold: true, children: "Live the mission" }),
185
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H2, { bold: true, children: "Live the mission" }),
186
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__2.Text.H3, { bold: true, children: "Live the mission" })
212
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import__2.ThemeProvider, { children: [
213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H1, { bold: true, children: "Live the mission" }),
214
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H2, { bold: true, children: "Live the mission" }),
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.Text.H3, { bold: true, children: "Live the mission" })
187
216
  ] })
188
217
  );
189
218
  expect(toJSON()).toMatchSnapshot();
@@ -33,6 +33,9 @@ __export(textStyle_android_exports, {
33
33
  module.exports = __toCommonJS(textStyle_android_exports);
34
34
  var import_styled_components = require("styled-components");
35
35
  var import_sharedTextStyle = __toESM(require("./sharedTextStyle"));
36
+ const formatFontFamily = (fontFamily, fontWeight) => {
37
+ return fontWeight === 400 ? fontFamily : `${fontFamily}-${fontWeight}`;
38
+ };
36
39
  const textStyle = (type) => () => import_styled_components.css`
37
40
  ${(0, import_sharedTextStyle.default)(type)};
38
41
  ${({
@@ -41,26 +44,20 @@ const textStyle = (type) => () => import_styled_components.css`
41
44
  theme: {
42
45
  yoga: {
43
46
  baseFont,
44
- fontWeights,
45
- components: {
46
- text: {
47
- [type]: { fontFamily, fontWeight }
48
- }
49
- }
47
+ components: { text }
50
48
  }
51
49
  }
52
50
  }) => {
53
- let finalFontFamily;
54
- if (fontFamily) {
55
- finalFontFamily = `${fontFamily}-${fontWeight}`;
56
- } else {
57
- finalFontFamily = fontWeight === 400 ? baseFont.family : `${baseFont.family}-${fontWeight}`;
51
+ const fontFamily = text[type].fontFamily || baseFont.family;
52
+ let finalFontWeight = text[type].fontWeight;
53
+ if (light && text[`${type}-light`]) {
54
+ finalFontWeight = text[`${type}-light`].fontWeight;
55
+ }
56
+ if (bold && text[`${type}-bold`]) {
57
+ finalFontWeight = text[`${type}-bold`].fontWeight;
58
58
  }
59
59
  return import_styled_components.css`
60
- font-family: '${finalFontFamily}';
61
-
62
- ${light ? `font-family: ${baseFont.family}-${fontWeights.light};` : ""}
63
- ${bold ? `font-family: ${baseFont.family}-${fontWeights.bold};` : ""}
60
+ font-family: '${formatFontFamily(fontFamily, finalFontWeight)}';
64
61
  `;
65
62
  }}
66
63
  `;
@@ -41,21 +41,21 @@ const textStyle = (type) => () => import_styled_components.css`
41
41
  theme: {
42
42
  yoga: {
43
43
  baseFont,
44
- fontWeights,
45
- components: {
46
- text: {
47
- [type]: { fontFamily, fontWeight }
48
- }
49
- }
44
+ components: { text }
50
45
  }
51
46
  }
52
47
  }) => {
53
- const finalFontFamily = fontFamily || baseFont.family;
48
+ const fontFamily = text[type].fontFamily || baseFont.family;
49
+ let finalFontWeight = text[type].fontWeight;
50
+ if (light && text[`${type}-light`]) {
51
+ finalFontWeight = text[`${type}-light`].fontWeight;
52
+ }
53
+ if (bold && text[`${type}-bold`]) {
54
+ finalFontWeight = text[`${type}-bold`].fontWeight;
55
+ }
54
56
  return import_styled_components.css`
55
- font-family: ${finalFontFamily};
56
- ${fontWeight ? `font-weight: ${fontWeight};` : ""}
57
- ${light ? `font-weight: ${fontWeights.light};` : ""}
58
- ${bold ? `font-weight: ${fontWeights.bold};` : ""}
57
+ font-family: ${fontFamily};
58
+ ${finalFontWeight ? `font-weight: ${finalFontWeight};` : ""}
59
59
  `;
60
60
  }}
61
61
  `;
@@ -43,15 +43,18 @@ const textStyle = (type) => () => import_styled_components.css`
43
43
  theme: {
44
44
  yoga: {
45
45
  baseFont,
46
- fontWeights,
47
- components: {
48
- text: {
49
- [type]: { fontFamily, fontWeight }
50
- }
51
- }
46
+ components: { text }
52
47
  }
53
48
  }
54
49
  }) => {
50
+ const themeFontFamily = text[type].fontFamily ? `${text[type].fontFamily}, ` : "";
51
+ let finalFontWeight = text[type].fontWeight;
52
+ if (light && text[`${type}-light`]) {
53
+ finalFontWeight = text[`${type}-light`].fontWeight;
54
+ }
55
+ if (bold && text[`${type}-bold`]) {
56
+ finalFontWeight = text[`${type}-bold`].fontWeight;
57
+ }
55
58
  return import_styled_components.css`
56
59
  ${numberOfLines ? `
57
60
  display: -webkit-box;
@@ -60,10 +63,8 @@ const textStyle = (type) => () => import_styled_components.css`
60
63
  overflow: hidden;
61
64
  ` : ""}
62
65
 
63
- font-family: ${fontFamily ? `${fontFamily}, ` : ""}${baseFont.family};
64
- ${fontWeight ? `font-weight: ${fontWeight};` : ""}
65
- ${light ? `font-weight: ${fontWeights.light};` : ""}
66
- ${bold ? `font-weight: ${fontWeights.bold};` : ""}
66
+ font-family: ${`${themeFontFamily}${baseFont.family}`};
67
+ ${finalFontWeight ? `font-weight: ${finalFontWeight};` : ""}
67
68
  `;
68
69
  }}
69
70
  `;