@colimuca123/nativewind 4.2.2-rc.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.
Files changed (146) hide show
  1. package/LICENSE +21 -0
  2. package/README.OpenSource +11 -0
  3. package/babel.js +1 -0
  4. package/dist/doctor.d.ts +1 -0
  5. package/dist/doctor.js +21 -0
  6. package/dist/doctor.js.map +1 -0
  7. package/dist/index.d.ts +4 -0
  8. package/dist/index.js +20 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/metro/common.d.ts +4 -0
  11. package/dist/metro/common.js +8 -0
  12. package/dist/metro/common.js.map +1 -0
  13. package/dist/metro/index.d.ts +15 -0
  14. package/dist/metro/index.js +47 -0
  15. package/dist/metro/index.js.map +1 -0
  16. package/dist/metro/picocolors.d.ts +26 -0
  17. package/dist/metro/picocolors.js +53 -0
  18. package/dist/metro/picocolors.js.map +1 -0
  19. package/dist/metro/tailwind/index.d.ts +5 -0
  20. package/dist/metro/tailwind/index.js +25 -0
  21. package/dist/metro/tailwind/index.js.map +1 -0
  22. package/dist/metro/tailwind/types.d.ts +8 -0
  23. package/dist/metro/tailwind/types.js +3 -0
  24. package/dist/metro/tailwind/types.js.map +1 -0
  25. package/dist/metro/tailwind/v3/child.d.ts +0 -0
  26. package/dist/metro/tailwind/v3/child.js +45 -0
  27. package/dist/metro/tailwind/v3/child.js.map +1 -0
  28. package/dist/metro/tailwind/v3/index.d.ts +6 -0
  29. package/dist/metro/tailwind/v3/index.js +81 -0
  30. package/dist/metro/tailwind/v3/index.js.map +1 -0
  31. package/dist/metro/typescript.d.ts +1 -0
  32. package/dist/metro/typescript.js +46 -0
  33. package/dist/metro/typescript.js.map +1 -0
  34. package/dist/stylesheet.d.ts +5 -0
  35. package/dist/stylesheet.js +25 -0
  36. package/dist/stylesheet.js.map +1 -0
  37. package/dist/tailwind/color.d.ts +4 -0
  38. package/dist/tailwind/color.js +25 -0
  39. package/dist/tailwind/color.js.map +1 -0
  40. package/dist/tailwind/common.d.ts +2 -0
  41. package/dist/tailwind/common.js +24 -0
  42. package/dist/tailwind/common.js.map +1 -0
  43. package/dist/tailwind/dark-mode.d.ts +4 -0
  44. package/dist/tailwind/dark-mode.js +48 -0
  45. package/dist/tailwind/dark-mode.js.map +1 -0
  46. package/dist/tailwind/index.d.ts +0 -0
  47. package/dist/tailwind/index.js +13 -0
  48. package/dist/tailwind/index.js.map +1 -0
  49. package/dist/tailwind/native.d.ts +3 -0
  50. package/dist/tailwind/native.js +265 -0
  51. package/dist/tailwind/native.js.map +1 -0
  52. package/dist/tailwind/prop-modifier.d.ts +4 -0
  53. package/dist/tailwind/prop-modifier.js +13 -0
  54. package/dist/tailwind/prop-modifier.js.map +1 -0
  55. package/dist/tailwind/safe-area.d.ts +4 -0
  56. package/dist/tailwind/safe-area.js +216 -0
  57. package/dist/tailwind/safe-area.js.map +1 -0
  58. package/dist/tailwind/shadows.d.ts +4 -0
  59. package/dist/tailwind/shadows.js +79 -0
  60. package/dist/tailwind/shadows.js.map +1 -0
  61. package/dist/tailwind/switch.d.ts +8 -0
  62. package/dist/tailwind/switch.js +51 -0
  63. package/dist/tailwind/switch.js.map +1 -0
  64. package/dist/tailwind/translate.d.ts +2 -0
  65. package/dist/tailwind/translate.js +40 -0
  66. package/dist/tailwind/translate.js.map +1 -0
  67. package/dist/tailwind/verify.d.ts +4 -0
  68. package/dist/tailwind/verify.js +22 -0
  69. package/dist/tailwind/verify.js.map +1 -0
  70. package/dist/tailwind/web.d.ts +3 -0
  71. package/dist/tailwind/web.js +40 -0
  72. package/dist/tailwind/web.js.map +1 -0
  73. package/dist/test.d.ts +373 -0
  74. package/dist/test.js +161 -0
  75. package/dist/test.js.map +1 -0
  76. package/dist/theme.d.ts +1 -0
  77. package/dist/theme.js +9 -0
  78. package/dist/theme.js.map +1 -0
  79. package/expo-snack.js +71 -0
  80. package/jsx-dev-runtime/index.d.ts +1 -0
  81. package/jsx-dev-runtime/index.js +1 -0
  82. package/jsx-runtime/index.d.ts +1 -0
  83. package/jsx-runtime/index.js +1 -0
  84. package/metro/package.json +1 -0
  85. package/package.json +75 -0
  86. package/preset/package.json +3 -0
  87. package/src/__tests__/README.md +3 -0
  88. package/src/__tests__/accessibility.tsx +41 -0
  89. package/src/__tests__/backgrounds.tsx +239 -0
  90. package/src/__tests__/borders.tsx +355 -0
  91. package/src/__tests__/container-queries.tsx +59 -0
  92. package/src/__tests__/custom-theme.tsx +45 -0
  93. package/src/__tests__/custom.tsx +17 -0
  94. package/src/__tests__/dark-mode.ios.tsx +251 -0
  95. package/src/__tests__/doctor.tsx +13 -0
  96. package/src/__tests__/effects.ios.tsx +230 -0
  97. package/src/__tests__/elevation.tsx +22 -0
  98. package/src/__tests__/filters.tsx +201 -0
  99. package/src/__tests__/flexbox-grid.tsx +670 -0
  100. package/src/__tests__/groups.tsx +134 -0
  101. package/src/__tests__/interactivity.tsx +547 -0
  102. package/src/__tests__/layout.tsx +854 -0
  103. package/src/__tests__/modifier-{}.tsx +71 -0
  104. package/src/__tests__/platform-modifiers-test.ios.tsx +34 -0
  105. package/src/__tests__/preset.tsx +9 -0
  106. package/src/__tests__/reusing-styles.tsx +44 -0
  107. package/src/__tests__/safe-area.test.ios.tsx +427 -0
  108. package/src/__tests__/sizing.tsx +241 -0
  109. package/src/__tests__/spacing.tsx +106 -0
  110. package/src/__tests__/states.tsx +145 -0
  111. package/src/__tests__/svg.tsx +25 -0
  112. package/src/__tests__/tables.tsx +103 -0
  113. package/src/__tests__/theme.tsx +245 -0
  114. package/src/__tests__/transforms.tsx +509 -0
  115. package/src/__tests__/transition-animations.tsx +254 -0
  116. package/src/__tests__/typography.tsx +657 -0
  117. package/src/__tests__/unofficial-plugins.test.ios.tsx +171 -0
  118. package/src/doctor.ts +28 -0
  119. package/src/index.tsx +16 -0
  120. package/src/metro/common.ts +11 -0
  121. package/src/metro/index.ts +77 -0
  122. package/src/metro/picocolors.ts +76 -0
  123. package/src/metro/tailwind/index.ts +22 -0
  124. package/src/metro/tailwind/types.ts +9 -0
  125. package/src/metro/tailwind/v3/child.ts +61 -0
  126. package/src/metro/tailwind/v3/index.ts +103 -0
  127. package/src/metro/typescript.ts +69 -0
  128. package/src/stylesheet.ts +31 -0
  129. package/src/tailwind/color.ts +23 -0
  130. package/src/tailwind/common.ts +26 -0
  131. package/src/tailwind/dark-mode.ts +46 -0
  132. package/src/tailwind/index.ts +15 -0
  133. package/src/tailwind/native.ts +374 -0
  134. package/src/tailwind/prop-modifier.ts +7 -0
  135. package/src/tailwind/safe-area.ts +262 -0
  136. package/src/tailwind/shadows.ts +100 -0
  137. package/src/tailwind/switch.ts +59 -0
  138. package/src/tailwind/translate.ts +51 -0
  139. package/src/tailwind/verify.ts +16 -0
  140. package/src/tailwind/web.ts +38 -0
  141. package/src/tailwindcss-internals.d.ts +7 -0
  142. package/src/test.tsx +224 -0
  143. package/src/theme.ts +15 -0
  144. package/test/package.json +4 -0
  145. package/theme/package.json +3 -0
  146. package/types.d.ts +1 -0
@@ -0,0 +1,251 @@
1
+ /** @jsxImportSource nativewind */
2
+ import { Button, Text, View } from "react-native";
3
+
4
+ import { act, fireEvent, screen } from "@testing-library/react-native";
5
+
6
+ import { colorScheme, render, useColorScheme } from "../test";
7
+
8
+ const testID = "react-native-css-interop";
9
+
10
+ test("darkMode: media", async () => {
11
+ await render(<View testID={testID} className="dark:text-black" />, {
12
+ config: {
13
+ darkMode: "media",
14
+ },
15
+ });
16
+
17
+ const component = screen.getByTestId(testID);
18
+
19
+ expect(component).toHaveStyle(undefined);
20
+
21
+ act(() => colorScheme.set("dark"));
22
+
23
+ expect(component).toHaveStyle({ color: "#000000" });
24
+ });
25
+
26
+ test("darkMode: media variable switching", async () => {
27
+ await render(
28
+ <View testID={testID} className="text-[color:rgb(var(--color))]" />,
29
+ {
30
+ css: `
31
+ @tailwind base;
32
+ @tailwind components;
33
+ @tailwind utilities;
34
+
35
+ @layer base {
36
+ :root {
37
+ --color: 255 115 179;
38
+ }
39
+ @media (prefers-color-scheme: dark) {
40
+ :root {
41
+ --color: 155 100 255;
42
+ }
43
+ }
44
+ }`,
45
+ },
46
+ );
47
+
48
+ const component = screen.getByTestId(testID);
49
+
50
+ expect(component).toHaveStyle({ color: "rgb(255, 115, 179)" });
51
+
52
+ // You cannot manually set the color scheme when using media queries, so we fake it
53
+ act(() => colorScheme.set("dark"));
54
+
55
+ expect(component).toHaveStyle({ color: "rgb(155, 100, 255)" });
56
+ });
57
+
58
+ test("darkMode: class", async () => {
59
+ await render(<View testID={testID} className="dark:text-black" />, {
60
+ config: {
61
+ darkMode: "class",
62
+ },
63
+ });
64
+
65
+ const component = screen.getByTestId(testID);
66
+
67
+ expect(component).toHaveStyle(undefined);
68
+
69
+ act(() => colorScheme.set("dark"));
70
+
71
+ expect(component).toHaveStyle({ color: "#000000" });
72
+ });
73
+
74
+ test("darkMode: class - on custom prop", async () => {
75
+ await render(<View testID={testID} className="dark:fill-black" />, {
76
+ config: {
77
+ darkMode: "class",
78
+ },
79
+ });
80
+
81
+ const component = screen.getByTestId(testID);
82
+
83
+ expect(component).toHaveStyle(undefined);
84
+ expect(component.props).not.toHaveProperty("fill");
85
+
86
+ act(() => colorScheme.set("dark"));
87
+
88
+ expect(component).toHaveStyle(undefined);
89
+ expect(component.props.fill).toEqual("#000000");
90
+ });
91
+
92
+ test("darkMode: class variable switching", async () => {
93
+ await render(
94
+ <View testID={testID} className="text-[color:rgb(var(--color))]" />,
95
+ {
96
+ css: `
97
+ @tailwind base;
98
+ @tailwind components;
99
+ @tailwind utilities;
100
+
101
+ @layer base {
102
+ :root {
103
+ --color: 255 115 179;
104
+ }
105
+
106
+ .dark:root {
107
+ --color: 155 100 255;
108
+ }
109
+ }
110
+ `,
111
+ config: {
112
+ darkMode: "class",
113
+ },
114
+ },
115
+ );
116
+
117
+ const component = screen.getByTestId(testID);
118
+
119
+ expect(component).toHaveStyle({ color: "rgb(255, 115, 179)" });
120
+
121
+ act(() => colorScheme.set("dark"));
122
+
123
+ expect(component).toHaveStyle({ color: "rgb(155, 100, 255)" });
124
+ });
125
+
126
+ test("useColorScheme().setColorScheme() with darkMode: class", async () => {
127
+ const testIds = {
128
+ TEXT: "useColorScheme",
129
+ DARK_BUTTON: "dark_button",
130
+ LIGHT_BUTTON: "light_button",
131
+ SYSTEM_BUTTON: "system_button",
132
+ };
133
+
134
+ function UseColorScheme() {
135
+ const { colorScheme, setColorScheme } = useColorScheme();
136
+
137
+ return (
138
+ <View>
139
+ <Text testID={testIds.TEXT}>{colorScheme}</Text>
140
+ <Button
141
+ testID={testIds.DARK_BUTTON}
142
+ title="Dark"
143
+ onPress={() => setColorScheme("dark")}
144
+ />
145
+ <Button
146
+ testID={testIds.LIGHT_BUTTON}
147
+ title="Light"
148
+ onPress={() => setColorScheme("light")}
149
+ />
150
+ <Button
151
+ testID={testIds.SYSTEM_BUTTON}
152
+ title="System"
153
+ onPress={() => setColorScheme("system")}
154
+ />
155
+ </View>
156
+ );
157
+ }
158
+ await render(<UseColorScheme />, {
159
+ config: {
160
+ darkMode: "class",
161
+ },
162
+ });
163
+
164
+ const text = screen.getByTestId(testIds.TEXT);
165
+
166
+ // Should render light by default
167
+ expect(text.props.children).toStrictEqual("light");
168
+
169
+ // Press the dark button
170
+ act(() => fireEvent.press(screen.getByTestId(testIds.DARK_BUTTON)));
171
+ expect(text.props.children).toStrictEqual("dark");
172
+
173
+ // Press the light button
174
+ act(() => fireEvent.press(screen.getByTestId(testIds.LIGHT_BUTTON)));
175
+ expect(text.props.children).toStrictEqual("light");
176
+
177
+ // Go back to dark
178
+ act(() => fireEvent.press(screen.getByTestId(testIds.DARK_BUTTON)));
179
+ expect(text.props.children).toStrictEqual("dark");
180
+
181
+ // Press the system button (is light for the tests)
182
+ act(() => fireEvent.press(screen.getByTestId(testIds.SYSTEM_BUTTON)));
183
+ expect(text.props.children).toStrictEqual("light");
184
+ });
185
+
186
+ test("useColorScheme().toggleColorScheme() with darkMode: class", async () => {
187
+ const testIds = {
188
+ TEXT: "useColorScheme",
189
+ TOGGLE_BUTTON: "toggle_button",
190
+ };
191
+
192
+ function UseColorScheme() {
193
+ const { colorScheme, toggleColorScheme } = useColorScheme();
194
+
195
+ return (
196
+ <View>
197
+ <Text testID={testIds.TEXT}>{colorScheme}</Text>
198
+ <Button
199
+ testID={testIds.TOGGLE_BUTTON}
200
+ title="toggle"
201
+ onPress={toggleColorScheme}
202
+ />
203
+ </View>
204
+ );
205
+ }
206
+ await render(<UseColorScheme />, {
207
+ config: {
208
+ darkMode: "class",
209
+ safelist: ["dark:text-red-500"],
210
+ },
211
+ });
212
+
213
+ const text = screen.getByTestId(testIds.TEXT);
214
+ const button = screen.getByTestId(testIds.TOGGLE_BUTTON);
215
+
216
+ expect(text.props.children).toStrictEqual("light");
217
+ act(() => fireEvent.press(button));
218
+ expect(text.props.children).toStrictEqual("dark");
219
+ act(() => fireEvent.press(button));
220
+ expect(text.props.children).toStrictEqual("light");
221
+ act(() => fireEvent.press(button));
222
+ expect(text.props.children).toStrictEqual("dark");
223
+ });
224
+
225
+ test("combines with other modifiers", async () => {
226
+ act(() => colorScheme.set("dark"));
227
+
228
+ await render(
229
+ <View
230
+ testID={testID}
231
+ className="bg-green-500 active:bg-red-500 dark:active:bg-blue-500"
232
+ >
233
+ <Text>Press me</Text>
234
+ </View>,
235
+ {
236
+ config: {
237
+ darkMode: "class",
238
+ },
239
+ },
240
+ );
241
+
242
+ const component = screen.getByTestId(testID);
243
+ expect(component).toHaveStyle({ backgroundColor: "#22c55e" });
244
+
245
+ fireEvent(component, "pressIn");
246
+ expect(component).toHaveStyle({ backgroundColor: "#3b82f6" });
247
+
248
+ act(() => colorScheme.set("light"));
249
+
250
+ expect(component).toHaveStyle({ backgroundColor: "#ef4444" });
251
+ });
@@ -0,0 +1,13 @@
1
+ /** @jsxImportSource nativewind */
2
+ import { View } from "react-native";
3
+
4
+ import { verifyFlag } from "react-native-css-interop";
5
+
6
+ import { render } from "../test";
7
+
8
+ test("verifyInstallation", async () => {
9
+ // Render will inject data
10
+ await render(<View className="text-black" />);
11
+
12
+ expect(verifyFlag("nativewind")).toBe(true);
13
+ });
@@ -0,0 +1,230 @@
1
+ import { renderCurrentTest } from "../test";
2
+
3
+ describe("Effects - Box Shadow", () => {
4
+ test("shadow-sm", async () => {
5
+ expect(await renderCurrentTest()).toStrictEqual({
6
+ props: {
7
+ style: {
8
+ shadowColor: "#00000059",
9
+ shadowOpacity: 1,
10
+ shadowOffset: {
11
+ height: 1,
12
+ width: 0,
13
+ },
14
+ shadowRadius: 1,
15
+ },
16
+ },
17
+ });
18
+ });
19
+ test("shadow", async () => {
20
+ expect(await renderCurrentTest()).toStrictEqual({
21
+ props: {
22
+ style: {
23
+ shadowColor: "#00000059",
24
+ shadowOpacity: 1,
25
+ shadowOffset: {
26
+ height: 1,
27
+ width: 0,
28
+ },
29
+ shadowRadius: 4,
30
+ },
31
+ },
32
+ });
33
+ });
34
+ test("shadow-none", async () => {
35
+ expect(await renderCurrentTest()).toStrictEqual({
36
+ props: {
37
+ style: {
38
+ shadowColor: "#00000000",
39
+ shadowOpacity: 1,
40
+ shadowOffset: {
41
+ height: 0,
42
+ width: 0,
43
+ },
44
+ shadowRadius: 0,
45
+ },
46
+ },
47
+ });
48
+ });
49
+ });
50
+
51
+ describe.skip("Effects - Box Shadow Color", () => {
52
+ // TODO
53
+ });
54
+
55
+ describe("Effects - Opacity", () => {
56
+ test("opacity-0", async () =>
57
+ expect(await renderCurrentTest()).toStrictEqual({
58
+ props: { style: { opacity: 0 } },
59
+ }));
60
+ test("opacity-100", async () =>
61
+ expect(await renderCurrentTest()).toStrictEqual({
62
+ props: { style: { opacity: 1 } },
63
+ }));
64
+ });
65
+
66
+ describe("Effects - Mix Blend Mode", () => {
67
+ test("mix-blend-normal", async () =>
68
+ expect(await renderCurrentTest()).toStrictEqual({
69
+ props: {},
70
+ invalid: { properties: ["mix-blend-mode"] },
71
+ }));
72
+ test("mix-blend-multiply", async () =>
73
+ expect(await renderCurrentTest()).toStrictEqual({
74
+ props: {},
75
+ invalid: { properties: ["mix-blend-mode"] },
76
+ }));
77
+ test("mix-blend-screen", async () =>
78
+ expect(await renderCurrentTest()).toStrictEqual({
79
+ props: {},
80
+ invalid: { properties: ["mix-blend-mode"] },
81
+ }));
82
+ test("mix-blend-overlay", async () =>
83
+ expect(await renderCurrentTest()).toStrictEqual({
84
+ props: {},
85
+ invalid: { properties: ["mix-blend-mode"] },
86
+ }));
87
+ test("mix-blend-darken", async () =>
88
+ expect(await renderCurrentTest()).toStrictEqual({
89
+ props: {},
90
+ invalid: { properties: ["mix-blend-mode"] },
91
+ }));
92
+ test("mix-blend-lighten", async () =>
93
+ expect(await renderCurrentTest()).toStrictEqual({
94
+ props: {},
95
+ invalid: { properties: ["mix-blend-mode"] },
96
+ }));
97
+ test("mix-blend-color-dodge", async () =>
98
+ expect(await renderCurrentTest()).toStrictEqual({
99
+ props: {},
100
+ invalid: { properties: ["mix-blend-mode"] },
101
+ }));
102
+ test("mix-blend-color-burn", async () =>
103
+ expect(await renderCurrentTest()).toStrictEqual({
104
+ props: {},
105
+ invalid: { properties: ["mix-blend-mode"] },
106
+ }));
107
+ test("mix-blend-hard-light", async () =>
108
+ expect(await renderCurrentTest()).toStrictEqual({
109
+ props: {},
110
+ invalid: { properties: ["mix-blend-mode"] },
111
+ }));
112
+ test("mix-blend-soft-light", async () =>
113
+ expect(await renderCurrentTest()).toStrictEqual({
114
+ props: {},
115
+ invalid: { properties: ["mix-blend-mode"] },
116
+ }));
117
+ test("mix-blend-difference", async () =>
118
+ expect(await renderCurrentTest()).toStrictEqual({
119
+ props: {},
120
+ invalid: { properties: ["mix-blend-mode"] },
121
+ }));
122
+ test("mix-blend-exclusion", async () =>
123
+ expect(await renderCurrentTest()).toStrictEqual({
124
+ props: {},
125
+ invalid: { properties: ["mix-blend-mode"] },
126
+ }));
127
+ test("mix-blend-hue", async () =>
128
+ expect(await renderCurrentTest()).toStrictEqual({
129
+ props: {},
130
+ invalid: { properties: ["mix-blend-mode"] },
131
+ }));
132
+ test("mix-blend-saturation", async () =>
133
+ expect(await renderCurrentTest()).toStrictEqual({
134
+ props: {},
135
+ invalid: { properties: ["mix-blend-mode"] },
136
+ }));
137
+ test("mix-blend-color", async () =>
138
+ expect(await renderCurrentTest()).toStrictEqual({
139
+ props: {},
140
+ invalid: { properties: ["mix-blend-mode"] },
141
+ }));
142
+ test("mix-blend-luminosity", async () =>
143
+ expect(await renderCurrentTest()).toStrictEqual({
144
+ props: {},
145
+ invalid: { properties: ["mix-blend-mode"] },
146
+ }));
147
+ });
148
+
149
+ describe("Effects - Background Blend Mode", () => {
150
+ test("bg-blend-normal", async () =>
151
+ expect(await renderCurrentTest()).toStrictEqual({
152
+ props: {},
153
+ invalid: { properties: ["background-blend-mode"] },
154
+ }));
155
+ test("bg-blend-multiply", async () =>
156
+ expect(await renderCurrentTest()).toStrictEqual({
157
+ props: {},
158
+ invalid: { properties: ["background-blend-mode"] },
159
+ }));
160
+ test("bg-blend-screen", async () =>
161
+ expect(await renderCurrentTest()).toStrictEqual({
162
+ props: {},
163
+ invalid: { properties: ["background-blend-mode"] },
164
+ }));
165
+ test("bg-blend-overlay", async () =>
166
+ expect(await renderCurrentTest()).toStrictEqual({
167
+ props: {},
168
+ invalid: { properties: ["background-blend-mode"] },
169
+ }));
170
+ test("bg-blend-darken", async () =>
171
+ expect(await renderCurrentTest()).toStrictEqual({
172
+ props: {},
173
+ invalid: { properties: ["background-blend-mode"] },
174
+ }));
175
+ test("bg-blend-lighten", async () =>
176
+ expect(await renderCurrentTest()).toStrictEqual({
177
+ props: {},
178
+ invalid: { properties: ["background-blend-mode"] },
179
+ }));
180
+ test("bg-blend-color-dodge", async () =>
181
+ expect(await renderCurrentTest()).toStrictEqual({
182
+ props: {},
183
+ invalid: { properties: ["background-blend-mode"] },
184
+ }));
185
+ test("bg-blend-color-burn", async () =>
186
+ expect(await renderCurrentTest()).toStrictEqual({
187
+ props: {},
188
+ invalid: { properties: ["background-blend-mode"] },
189
+ }));
190
+ test("bg-blend-hard-light", async () =>
191
+ expect(await renderCurrentTest()).toStrictEqual({
192
+ props: {},
193
+ invalid: { properties: ["background-blend-mode"] },
194
+ }));
195
+ test("bg-blend-soft-light", async () =>
196
+ expect(await renderCurrentTest()).toStrictEqual({
197
+ props: {},
198
+ invalid: { properties: ["background-blend-mode"] },
199
+ }));
200
+ test("bg-blend-difference", async () =>
201
+ expect(await renderCurrentTest()).toStrictEqual({
202
+ props: {},
203
+ invalid: { properties: ["background-blend-mode"] },
204
+ }));
205
+ test("bg-blend-exclusion", async () =>
206
+ expect(await renderCurrentTest()).toStrictEqual({
207
+ props: {},
208
+ invalid: { properties: ["background-blend-mode"] },
209
+ }));
210
+ test("bg-blend-hue", async () =>
211
+ expect(await renderCurrentTest()).toStrictEqual({
212
+ props: {},
213
+ invalid: { properties: ["background-blend-mode"] },
214
+ }));
215
+ test("bg-blend-saturation", async () =>
216
+ expect(await renderCurrentTest()).toStrictEqual({
217
+ props: {},
218
+ invalid: { properties: ["background-blend-mode"] },
219
+ }));
220
+ test("bg-blend-color", async () =>
221
+ expect(await renderCurrentTest()).toStrictEqual({
222
+ props: {},
223
+ invalid: { properties: ["background-blend-mode"] },
224
+ }));
225
+ test("bg-blend-luminosity", async () =>
226
+ expect(await renderCurrentTest()).toStrictEqual({
227
+ props: {},
228
+ invalid: { properties: ["background-blend-mode"] },
229
+ }));
230
+ });
@@ -0,0 +1,22 @@
1
+ import { renderCurrentTest } from "../test";
2
+
3
+ describe("Custom - Elevation", () => {
4
+ test("elevation", async () => {
5
+ expect(await renderCurrentTest()).toStrictEqual({
6
+ props: {
7
+ style: {
8
+ elevation: 3,
9
+ },
10
+ },
11
+ });
12
+ });
13
+ test("elevation-sm", async () => {
14
+ expect(await renderCurrentTest()).toStrictEqual({
15
+ props: {
16
+ style: {
17
+ elevation: 1,
18
+ },
19
+ },
20
+ });
21
+ });
22
+ });