@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.
- package/LICENSE +21 -0
- package/README.OpenSource +11 -0
- package/babel.js +1 -0
- package/dist/doctor.d.ts +1 -0
- package/dist/doctor.js +21 -0
- package/dist/doctor.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -0
- package/dist/metro/common.d.ts +4 -0
- package/dist/metro/common.js +8 -0
- package/dist/metro/common.js.map +1 -0
- package/dist/metro/index.d.ts +15 -0
- package/dist/metro/index.js +47 -0
- package/dist/metro/index.js.map +1 -0
- package/dist/metro/picocolors.d.ts +26 -0
- package/dist/metro/picocolors.js +53 -0
- package/dist/metro/picocolors.js.map +1 -0
- package/dist/metro/tailwind/index.d.ts +5 -0
- package/dist/metro/tailwind/index.js +25 -0
- package/dist/metro/tailwind/index.js.map +1 -0
- package/dist/metro/tailwind/types.d.ts +8 -0
- package/dist/metro/tailwind/types.js +3 -0
- package/dist/metro/tailwind/types.js.map +1 -0
- package/dist/metro/tailwind/v3/child.d.ts +0 -0
- package/dist/metro/tailwind/v3/child.js +45 -0
- package/dist/metro/tailwind/v3/child.js.map +1 -0
- package/dist/metro/tailwind/v3/index.d.ts +6 -0
- package/dist/metro/tailwind/v3/index.js +81 -0
- package/dist/metro/tailwind/v3/index.js.map +1 -0
- package/dist/metro/typescript.d.ts +1 -0
- package/dist/metro/typescript.js +46 -0
- package/dist/metro/typescript.js.map +1 -0
- package/dist/stylesheet.d.ts +5 -0
- package/dist/stylesheet.js +25 -0
- package/dist/stylesheet.js.map +1 -0
- package/dist/tailwind/color.d.ts +4 -0
- package/dist/tailwind/color.js +25 -0
- package/dist/tailwind/color.js.map +1 -0
- package/dist/tailwind/common.d.ts +2 -0
- package/dist/tailwind/common.js +24 -0
- package/dist/tailwind/common.js.map +1 -0
- package/dist/tailwind/dark-mode.d.ts +4 -0
- package/dist/tailwind/dark-mode.js +48 -0
- package/dist/tailwind/dark-mode.js.map +1 -0
- package/dist/tailwind/index.d.ts +0 -0
- package/dist/tailwind/index.js +13 -0
- package/dist/tailwind/index.js.map +1 -0
- package/dist/tailwind/native.d.ts +3 -0
- package/dist/tailwind/native.js +265 -0
- package/dist/tailwind/native.js.map +1 -0
- package/dist/tailwind/prop-modifier.d.ts +4 -0
- package/dist/tailwind/prop-modifier.js +13 -0
- package/dist/tailwind/prop-modifier.js.map +1 -0
- package/dist/tailwind/safe-area.d.ts +4 -0
- package/dist/tailwind/safe-area.js +216 -0
- package/dist/tailwind/safe-area.js.map +1 -0
- package/dist/tailwind/shadows.d.ts +4 -0
- package/dist/tailwind/shadows.js +79 -0
- package/dist/tailwind/shadows.js.map +1 -0
- package/dist/tailwind/switch.d.ts +8 -0
- package/dist/tailwind/switch.js +51 -0
- package/dist/tailwind/switch.js.map +1 -0
- package/dist/tailwind/translate.d.ts +2 -0
- package/dist/tailwind/translate.js +40 -0
- package/dist/tailwind/translate.js.map +1 -0
- package/dist/tailwind/verify.d.ts +4 -0
- package/dist/tailwind/verify.js +22 -0
- package/dist/tailwind/verify.js.map +1 -0
- package/dist/tailwind/web.d.ts +3 -0
- package/dist/tailwind/web.js +40 -0
- package/dist/tailwind/web.js.map +1 -0
- package/dist/test.d.ts +373 -0
- package/dist/test.js +161 -0
- package/dist/test.js.map +1 -0
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +9 -0
- package/dist/theme.js.map +1 -0
- package/expo-snack.js +71 -0
- package/jsx-dev-runtime/index.d.ts +1 -0
- package/jsx-dev-runtime/index.js +1 -0
- package/jsx-runtime/index.d.ts +1 -0
- package/jsx-runtime/index.js +1 -0
- package/metro/package.json +1 -0
- package/package.json +75 -0
- package/preset/package.json +3 -0
- package/src/__tests__/README.md +3 -0
- package/src/__tests__/accessibility.tsx +41 -0
- package/src/__tests__/backgrounds.tsx +239 -0
- package/src/__tests__/borders.tsx +355 -0
- package/src/__tests__/container-queries.tsx +59 -0
- package/src/__tests__/custom-theme.tsx +45 -0
- package/src/__tests__/custom.tsx +17 -0
- package/src/__tests__/dark-mode.ios.tsx +251 -0
- package/src/__tests__/doctor.tsx +13 -0
- package/src/__tests__/effects.ios.tsx +230 -0
- package/src/__tests__/elevation.tsx +22 -0
- package/src/__tests__/filters.tsx +201 -0
- package/src/__tests__/flexbox-grid.tsx +670 -0
- package/src/__tests__/groups.tsx +134 -0
- package/src/__tests__/interactivity.tsx +547 -0
- package/src/__tests__/layout.tsx +854 -0
- package/src/__tests__/modifier-{}.tsx +71 -0
- package/src/__tests__/platform-modifiers-test.ios.tsx +34 -0
- package/src/__tests__/preset.tsx +9 -0
- package/src/__tests__/reusing-styles.tsx +44 -0
- package/src/__tests__/safe-area.test.ios.tsx +427 -0
- package/src/__tests__/sizing.tsx +241 -0
- package/src/__tests__/spacing.tsx +106 -0
- package/src/__tests__/states.tsx +145 -0
- package/src/__tests__/svg.tsx +25 -0
- package/src/__tests__/tables.tsx +103 -0
- package/src/__tests__/theme.tsx +245 -0
- package/src/__tests__/transforms.tsx +509 -0
- package/src/__tests__/transition-animations.tsx +254 -0
- package/src/__tests__/typography.tsx +657 -0
- package/src/__tests__/unofficial-plugins.test.ios.tsx +171 -0
- package/src/doctor.ts +28 -0
- package/src/index.tsx +16 -0
- package/src/metro/common.ts +11 -0
- package/src/metro/index.ts +77 -0
- package/src/metro/picocolors.ts +76 -0
- package/src/metro/tailwind/index.ts +22 -0
- package/src/metro/tailwind/types.ts +9 -0
- package/src/metro/tailwind/v3/child.ts +61 -0
- package/src/metro/tailwind/v3/index.ts +103 -0
- package/src/metro/typescript.ts +69 -0
- package/src/stylesheet.ts +31 -0
- package/src/tailwind/color.ts +23 -0
- package/src/tailwind/common.ts +26 -0
- package/src/tailwind/dark-mode.ts +46 -0
- package/src/tailwind/index.ts +15 -0
- package/src/tailwind/native.ts +374 -0
- package/src/tailwind/prop-modifier.ts +7 -0
- package/src/tailwind/safe-area.ts +262 -0
- package/src/tailwind/shadows.ts +100 -0
- package/src/tailwind/switch.ts +59 -0
- package/src/tailwind/translate.ts +51 -0
- package/src/tailwind/verify.ts +16 -0
- package/src/tailwind/web.ts +38 -0
- package/src/tailwindcss-internals.d.ts +7 -0
- package/src/test.tsx +224 -0
- package/src/theme.ts +15 -0
- package/test/package.json +4 -0
- package/theme/package.json +3 -0
- package/types.d.ts +1 -0
|
@@ -0,0 +1,657 @@
|
|
|
1
|
+
import { renderCurrentTest } from "../test";
|
|
2
|
+
|
|
3
|
+
describe("Typography - Font Family", () => {
|
|
4
|
+
test("font-sans", async () => {
|
|
5
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
6
|
+
props: { style: { fontFamily: "system font" } },
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
test("font-serif", async () => {
|
|
10
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
11
|
+
props: { style: { fontFamily: "Georgia" } },
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
test("font-mono", async () => {
|
|
15
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
16
|
+
props: { style: { fontFamily: "Courier New" } },
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
describe("Typography - Font Size", () => {
|
|
22
|
+
test("text-xs", async () => {
|
|
23
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
24
|
+
props: { style: { fontSize: 10.5, lineHeight: 14 } },
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
test("text-base", async () => {
|
|
28
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
29
|
+
props: { style: { fontSize: 14, lineHeight: 21 } },
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
describe("Typography - Font Smoothing", () => {
|
|
35
|
+
test("antialiased", async () => {
|
|
36
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
37
|
+
props: {},
|
|
38
|
+
invalid: {
|
|
39
|
+
properties: ["-webkit-font-smoothing", "-moz-osx-font-smoothing"],
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
test("subpixel-antialiased", async () => {
|
|
44
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
45
|
+
props: {},
|
|
46
|
+
invalid: {
|
|
47
|
+
properties: ["-webkit-font-smoothing", "-moz-osx-font-smoothing"],
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
describe("Typography - Font Style", () => {
|
|
54
|
+
test("italic", async () => {
|
|
55
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
56
|
+
props: { style: { fontStyle: "italic" } },
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
test("not-italic", async () => {
|
|
60
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
61
|
+
props: { style: { fontStyle: "normal" } },
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
describe("Typography - Font Weight", () => {
|
|
67
|
+
test("font-thin", async () => {
|
|
68
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
69
|
+
props: { style: { fontWeight: "100" } },
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
test("font-normal", async () => {
|
|
73
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
74
|
+
props: { style: { fontWeight: "400" } },
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
test("font-black", async () => {
|
|
78
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
79
|
+
props: { style: { fontWeight: "900" } },
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
describe("Typography - Font Variant Numeric", () => {
|
|
85
|
+
test("normal-nums", async () => {
|
|
86
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
87
|
+
props: {},
|
|
88
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
test("ordinal", async () => {
|
|
92
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
93
|
+
props: {},
|
|
94
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
test("slashed-zero", async () => {
|
|
98
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
99
|
+
props: {},
|
|
100
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
test("lining-nums", async () => {
|
|
104
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
105
|
+
props: {},
|
|
106
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
test("oldstyle-nums", async () => {
|
|
110
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
111
|
+
props: {},
|
|
112
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
test("proportional-nums", async () => {
|
|
116
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
117
|
+
props: {},
|
|
118
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
test("tabular-nums", async () => {
|
|
122
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
123
|
+
props: {},
|
|
124
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
test("diagonal-fractions", async () => {
|
|
128
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
129
|
+
props: {},
|
|
130
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
test("stacked-fractions", async () => {
|
|
134
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
135
|
+
props: {},
|
|
136
|
+
invalid: { properties: ["font-variant-numeric"] },
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
describe("Typography - Letter Spacing", () => {
|
|
142
|
+
test("tracking-tighter", async () => {
|
|
143
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
144
|
+
props: { style: { letterSpacing: -0.5 } },
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
test("tracking-tight", async () => {
|
|
148
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
149
|
+
props: { style: { letterSpacing: -0.25 } },
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
test("tracking-normal", async () => {
|
|
153
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
154
|
+
props: { style: { letterSpacing: 0 } },
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
test("tracking-wide", async () => {
|
|
158
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
159
|
+
props: { style: { letterSpacing: 0.25 } },
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
test("tracking-wider", async () => {
|
|
163
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
164
|
+
props: { style: { letterSpacing: 0.5 } },
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
test("tracking-widest", async () => {
|
|
168
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
169
|
+
props: { style: { letterSpacing: 1 } },
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
describe("Typography - Line Clamp", () => {
|
|
175
|
+
test("line-clamp-1", async () => {
|
|
176
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
177
|
+
props: { numberOfLines: 1, style: { overflow: "hidden" } },
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
test("line-clamp-2", async () => {
|
|
181
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
182
|
+
props: { numberOfLines: 2, style: { overflow: "hidden" } },
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
test("line-clamp-3", async () => {
|
|
186
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
187
|
+
props: { numberOfLines: 3, style: { overflow: "hidden" } },
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
test("line-clamp-4", async () => {
|
|
191
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
192
|
+
props: { numberOfLines: 4, style: { overflow: "hidden" } },
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
test("line-clamp-5", async () => {
|
|
196
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
197
|
+
props: { numberOfLines: 5, style: { overflow: "hidden" } },
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
test("line-clamp-6", async () => {
|
|
201
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
202
|
+
props: { numberOfLines: 6, style: { overflow: "hidden" } },
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
test("line-clamp-none", async () => {
|
|
206
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
207
|
+
props: {
|
|
208
|
+
numberOfLines: 0,
|
|
209
|
+
style: { overflow: "visible" },
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
describe("Typography - Line Height", () => {
|
|
216
|
+
test("leading-3", async () => {
|
|
217
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
218
|
+
props: { style: { lineHeight: 10.5 } },
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
test("leading-4", async () => {
|
|
222
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
223
|
+
props: { style: { lineHeight: 14 } },
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
describe("Typography - List Style Image", () => {
|
|
229
|
+
test("list-image-none", async () => {
|
|
230
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
231
|
+
props: {},
|
|
232
|
+
invalid: { properties: ["list-style-image"] },
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
describe("Typography - List Style Position", () => {
|
|
238
|
+
test("list-inside", async () => {
|
|
239
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
240
|
+
props: {},
|
|
241
|
+
invalid: { properties: ["list-style-position"] },
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
test("list-outside", async () => {
|
|
245
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
246
|
+
props: {},
|
|
247
|
+
invalid: { properties: ["list-style-position"] },
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
describe("Typography - List Style Type", () => {
|
|
253
|
+
test("list-none", async () => {
|
|
254
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
255
|
+
props: {},
|
|
256
|
+
invalid: { properties: ["list-style-type"] },
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
test("list-disc", async () => {
|
|
260
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
261
|
+
props: {},
|
|
262
|
+
invalid: { properties: ["list-style-type"] },
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
test("list-decimal", async () => {
|
|
266
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
267
|
+
props: {},
|
|
268
|
+
invalid: { properties: ["list-style-type"] },
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
describe("Typography - Text Align", () => {
|
|
274
|
+
test("text-left", async () => {
|
|
275
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
276
|
+
props: { style: { textAlign: "left" } },
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
test("text-center", async () => {
|
|
280
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
281
|
+
props: { style: { textAlign: "center" } },
|
|
282
|
+
});
|
|
283
|
+
});
|
|
284
|
+
test("text-right", async () => {
|
|
285
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
286
|
+
props: { style: { textAlign: "right" } },
|
|
287
|
+
});
|
|
288
|
+
});
|
|
289
|
+
test("text-justify", async () => {
|
|
290
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
291
|
+
props: { style: { textAlign: "justify" } },
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
describe("Typography - Text Color", () => {
|
|
297
|
+
test("text-black", async () => {
|
|
298
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
299
|
+
props: { style: { color: "#000000" } },
|
|
300
|
+
});
|
|
301
|
+
});
|
|
302
|
+
test("text-white", async () => {
|
|
303
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
304
|
+
props: { style: { color: "#ffffff" } },
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
test("text-transparent", async () => {
|
|
308
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
309
|
+
props: { style: { color: "#00000000" } },
|
|
310
|
+
});
|
|
311
|
+
});
|
|
312
|
+
test("text-slate-50", async () => {
|
|
313
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
314
|
+
props: { style: { color: "#f8fafc" } },
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
test("text-white/50", async () => {
|
|
318
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
319
|
+
props: { style: { color: "#ffffff80" } },
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
test("text-current", async () => {
|
|
323
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
324
|
+
props: {},
|
|
325
|
+
invalid: { style: { color: "currentcolor" } },
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
test("text-inherit", async () => {
|
|
329
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
330
|
+
props: {},
|
|
331
|
+
invalid: { style: { color: "inherit" } },
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
describe("Typography - Text Decoration", () => {
|
|
337
|
+
test("underline", async () => {
|
|
338
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
339
|
+
props: { style: { textDecorationLine: "underline" } },
|
|
340
|
+
});
|
|
341
|
+
});
|
|
342
|
+
test("line-through", async () => {
|
|
343
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
344
|
+
props: { style: { textDecorationLine: "line-through" } },
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
test("no-underline", async () => {
|
|
348
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
349
|
+
props: { style: { textDecorationLine: "none" } },
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
test("overline", async () => {
|
|
353
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
354
|
+
props: {},
|
|
355
|
+
invalid: { style: { "text-decoration-line": "overline" } },
|
|
356
|
+
});
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
describe("Typography - Text Decoration Color", () => {
|
|
361
|
+
test("decoration-black", async () => {
|
|
362
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
363
|
+
props: { style: { textDecorationColor: "#000000" } },
|
|
364
|
+
});
|
|
365
|
+
});
|
|
366
|
+
test("decoration-white", async () => {
|
|
367
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
368
|
+
props: { style: { textDecorationColor: "#ffffff" } },
|
|
369
|
+
});
|
|
370
|
+
});
|
|
371
|
+
test("decoration-transparent", async () => {
|
|
372
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
373
|
+
props: { style: { textDecorationColor: "#00000000" } },
|
|
374
|
+
});
|
|
375
|
+
});
|
|
376
|
+
test("decoration-slate-50", async () => {
|
|
377
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
378
|
+
props: { style: { textDecorationColor: "#f8fafc" } },
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
test("decoration-current", async () => {
|
|
382
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
383
|
+
props: {},
|
|
384
|
+
invalid: { style: { "text-decoration-color": "currentcolor" } },
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
test("decoration-inherit", async () => {
|
|
388
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
389
|
+
props: {},
|
|
390
|
+
invalid: { style: { "text-decoration-color": "inherit" } },
|
|
391
|
+
});
|
|
392
|
+
});
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
describe("Typography - Text Decoration Style", () => {
|
|
396
|
+
test("decoration-solid", async () => {
|
|
397
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
398
|
+
props: { style: { textDecorationStyle: "solid" } },
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
test("decoration-double", async () => {
|
|
402
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
403
|
+
props: { style: { textDecorationStyle: "double" } },
|
|
404
|
+
});
|
|
405
|
+
});
|
|
406
|
+
test("decoration-dotted", async () => {
|
|
407
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
408
|
+
props: { style: { textDecorationStyle: "dotted" } },
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
test("decoration-dashed", async () => {
|
|
412
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
413
|
+
props: { style: { textDecorationStyle: "dashed" } },
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
test("decoration-wavy", async () => {
|
|
417
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
418
|
+
props: {},
|
|
419
|
+
invalid: { style: { "text-decoration-style": "wavy" } },
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
describe("Typography - Text Decoration Thickness", () => {
|
|
425
|
+
test("decoration-auto", async () => {
|
|
426
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
427
|
+
props: {},
|
|
428
|
+
invalid: { properties: ["text-decoration-thickness"] },
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
test("decoration-from-font", async () => {
|
|
432
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
433
|
+
props: {},
|
|
434
|
+
invalid: { properties: ["text-decoration-thickness"] },
|
|
435
|
+
});
|
|
436
|
+
});
|
|
437
|
+
test("decoration-0", async () => {
|
|
438
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
439
|
+
props: {},
|
|
440
|
+
invalid: { properties: ["text-decoration-thickness"] },
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
test("decoration-1", async () => {
|
|
444
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
445
|
+
props: {},
|
|
446
|
+
invalid: { properties: ["text-decoration-thickness"] },
|
|
447
|
+
});
|
|
448
|
+
});
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
describe("Typography - Text Underline Offset", () => {
|
|
452
|
+
test("underline-offset-auto", async () => {
|
|
453
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
454
|
+
props: {},
|
|
455
|
+
invalid: { properties: ["text-underline-offset"] },
|
|
456
|
+
});
|
|
457
|
+
});
|
|
458
|
+
test("underline-offset-0", async () => {
|
|
459
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
460
|
+
props: {},
|
|
461
|
+
invalid: { properties: ["text-underline-offset"] },
|
|
462
|
+
});
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
describe("Typography - Text Transform", () => {
|
|
467
|
+
test("uppercase", async () => {
|
|
468
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
469
|
+
props: { style: { textTransform: "uppercase" } },
|
|
470
|
+
});
|
|
471
|
+
});
|
|
472
|
+
test("lowercase", async () => {
|
|
473
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
474
|
+
props: { style: { textTransform: "lowercase" } },
|
|
475
|
+
});
|
|
476
|
+
});
|
|
477
|
+
test("capitalize", async () => {
|
|
478
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
479
|
+
props: { style: { textTransform: "capitalize" } },
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
test("normal-case", async () => {
|
|
483
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
484
|
+
props: { style: { textTransform: "none" } },
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
});
|
|
488
|
+
|
|
489
|
+
describe("Typography - Text Overflow", () => {
|
|
490
|
+
test("text-ellipsis", async () => {
|
|
491
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
492
|
+
props: {},
|
|
493
|
+
invalid: { properties: ["text-overflow"] },
|
|
494
|
+
});
|
|
495
|
+
});
|
|
496
|
+
test("text-clip", async () => {
|
|
497
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
498
|
+
props: {},
|
|
499
|
+
invalid: { properties: ["text-overflow"] },
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
describe("Typography - Text Indent", () => {
|
|
505
|
+
test("indent-px", async () => {
|
|
506
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
507
|
+
props: {},
|
|
508
|
+
invalid: { properties: ["text-indent"] },
|
|
509
|
+
});
|
|
510
|
+
});
|
|
511
|
+
test("indent-0", async () => {
|
|
512
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
513
|
+
props: {},
|
|
514
|
+
invalid: { properties: ["text-indent"] },
|
|
515
|
+
});
|
|
516
|
+
});
|
|
517
|
+
test("indent-1", async () => {
|
|
518
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
519
|
+
props: {},
|
|
520
|
+
invalid: { properties: ["text-indent"] },
|
|
521
|
+
});
|
|
522
|
+
});
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
describe("Typography - Vertical Align", () => {
|
|
526
|
+
test("align-baseline", async () => {
|
|
527
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
528
|
+
props: {},
|
|
529
|
+
invalid: { style: { "vertical-align": "baseline" } },
|
|
530
|
+
});
|
|
531
|
+
});
|
|
532
|
+
test("align-top", async () => {
|
|
533
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
534
|
+
props: { style: { verticalAlign: "top" } },
|
|
535
|
+
});
|
|
536
|
+
});
|
|
537
|
+
test("align-middle", async () => {
|
|
538
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
539
|
+
props: { style: { verticalAlign: "middle" } },
|
|
540
|
+
});
|
|
541
|
+
});
|
|
542
|
+
test("align-bottom", async () => {
|
|
543
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
544
|
+
props: { style: { verticalAlign: "bottom" } },
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
test("align-text-top", async () => {
|
|
548
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
549
|
+
props: {},
|
|
550
|
+
invalid: { style: { "vertical-align": "text-top" } },
|
|
551
|
+
});
|
|
552
|
+
});
|
|
553
|
+
test("align-text-bottom", async () => {
|
|
554
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
555
|
+
props: {},
|
|
556
|
+
invalid: { style: { "vertical-align": "text-bottom" } },
|
|
557
|
+
});
|
|
558
|
+
});
|
|
559
|
+
test("align-sub", async () => {
|
|
560
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
561
|
+
props: {},
|
|
562
|
+
invalid: { style: { "vertical-align": "sub" } },
|
|
563
|
+
});
|
|
564
|
+
});
|
|
565
|
+
test("align-super", async () => {
|
|
566
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
567
|
+
props: {},
|
|
568
|
+
invalid: { style: { "vertical-align": "super" } },
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
});
|
|
572
|
+
|
|
573
|
+
describe("Typography - Whitespace", () => {
|
|
574
|
+
test("whitespace-normal", async () => {
|
|
575
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
576
|
+
props: {},
|
|
577
|
+
invalid: { properties: ["white-space"] },
|
|
578
|
+
});
|
|
579
|
+
});
|
|
580
|
+
test("whitespace-nowrap", async () => {
|
|
581
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
582
|
+
props: {},
|
|
583
|
+
invalid: { properties: ["white-space"] },
|
|
584
|
+
});
|
|
585
|
+
});
|
|
586
|
+
test("whitespace-pre", async () => {
|
|
587
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
588
|
+
props: {},
|
|
589
|
+
invalid: { properties: ["white-space"] },
|
|
590
|
+
});
|
|
591
|
+
});
|
|
592
|
+
test("whitespace-pre-line", async () => {
|
|
593
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
594
|
+
props: {},
|
|
595
|
+
invalid: { properties: ["white-space"] },
|
|
596
|
+
});
|
|
597
|
+
});
|
|
598
|
+
test("whitespace-pre-wrap", async () => {
|
|
599
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
600
|
+
props: {},
|
|
601
|
+
invalid: { properties: ["white-space"] },
|
|
602
|
+
});
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
|
|
606
|
+
describe("Typography - Word Break", () => {
|
|
607
|
+
test("break-normal", async () => {
|
|
608
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
609
|
+
props: {},
|
|
610
|
+
invalid: {
|
|
611
|
+
properties: ["overflow-wrap", "word-break"],
|
|
612
|
+
},
|
|
613
|
+
});
|
|
614
|
+
});
|
|
615
|
+
test("break-words", async () => {
|
|
616
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
617
|
+
props: {},
|
|
618
|
+
invalid: { properties: ["overflow-wrap"] },
|
|
619
|
+
});
|
|
620
|
+
});
|
|
621
|
+
test("break-all", async () => {
|
|
622
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
623
|
+
props: {},
|
|
624
|
+
invalid: { properties: ["word-break"] },
|
|
625
|
+
});
|
|
626
|
+
});
|
|
627
|
+
});
|
|
628
|
+
|
|
629
|
+
describe("Typography - Hyphens", () => {
|
|
630
|
+
test("hyphens-none", async () => {
|
|
631
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
632
|
+
props: {},
|
|
633
|
+
invalid: { properties: ["hyphens"] },
|
|
634
|
+
});
|
|
635
|
+
});
|
|
636
|
+
test("hyphens-manual", async () => {
|
|
637
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
638
|
+
props: {},
|
|
639
|
+
invalid: { properties: ["hyphens"] },
|
|
640
|
+
});
|
|
641
|
+
});
|
|
642
|
+
test("hyphens-auto", async () => {
|
|
643
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
644
|
+
props: {},
|
|
645
|
+
invalid: { properties: ["hyphens"] },
|
|
646
|
+
});
|
|
647
|
+
});
|
|
648
|
+
});
|
|
649
|
+
|
|
650
|
+
describe("Typography - Content", () => {
|
|
651
|
+
test("content-none", async () => {
|
|
652
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
653
|
+
props: {},
|
|
654
|
+
invalid: { properties: ["content"] },
|
|
655
|
+
});
|
|
656
|
+
});
|
|
657
|
+
});
|