@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,134 @@
|
|
|
1
|
+
/** @jsxImportSource nativewind */
|
|
2
|
+
import { View } from "react-native";
|
|
3
|
+
|
|
4
|
+
import { fireEvent, render, screen } from "../test";
|
|
5
|
+
|
|
6
|
+
const grandparentID = "grandparentID";
|
|
7
|
+
const parentID = "parent";
|
|
8
|
+
const childID = "child";
|
|
9
|
+
|
|
10
|
+
test("Styling based on parent state (group-{modifier})", async () => {
|
|
11
|
+
await render(
|
|
12
|
+
<View testID={parentID} className="group">
|
|
13
|
+
<View testID={childID} className="group-hover:text-white" />
|
|
14
|
+
</View>,
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
const parent = screen.getByTestId(parentID);
|
|
18
|
+
const child = screen.getByTestId(childID);
|
|
19
|
+
|
|
20
|
+
expect(parent).toHaveStyle(undefined);
|
|
21
|
+
expect(child).toHaveStyle(undefined);
|
|
22
|
+
|
|
23
|
+
fireEvent(parent, "hoverIn");
|
|
24
|
+
|
|
25
|
+
expect(child).toHaveStyle({ color: "#ffffff" });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test("Differentiating nested groups", async () => {
|
|
29
|
+
await render(
|
|
30
|
+
<View testID={grandparentID} className="group/grandparent">
|
|
31
|
+
<View testID={parentID} className="group/parent">
|
|
32
|
+
<View className="group-hover/grandparent:text-white" />
|
|
33
|
+
<View testID={childID} className="group-hover/parent:text-white" />
|
|
34
|
+
</View>
|
|
35
|
+
</View>,
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
const grandparent = screen.getByTestId(grandparentID);
|
|
39
|
+
const parent = screen.getByTestId(parentID);
|
|
40
|
+
const child = screen.getByTestId(childID);
|
|
41
|
+
|
|
42
|
+
expect(grandparent).toHaveStyle(undefined);
|
|
43
|
+
expect(parent).toHaveStyle(undefined);
|
|
44
|
+
expect(child).toHaveStyle(undefined);
|
|
45
|
+
|
|
46
|
+
fireEvent(grandparent, "hoverIn");
|
|
47
|
+
|
|
48
|
+
expect(child).toHaveStyle(undefined);
|
|
49
|
+
|
|
50
|
+
fireEvent(parent, "hoverIn");
|
|
51
|
+
|
|
52
|
+
expect(child).toHaveStyle({ color: "#ffffff" });
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test("arbitrary groups - single className", async () => {
|
|
56
|
+
const { rerender } = await render(
|
|
57
|
+
<View testID={parentID} className="group">
|
|
58
|
+
<View testID={childID} className="group-[.test]:text-white" />
|
|
59
|
+
</View>,
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
const parent = screen.getByTestId(parentID);
|
|
63
|
+
const child = screen.getByTestId(childID);
|
|
64
|
+
|
|
65
|
+
expect(parent).toHaveStyle(undefined);
|
|
66
|
+
expect(child).toHaveStyle(undefined);
|
|
67
|
+
|
|
68
|
+
await rerender(
|
|
69
|
+
<View testID={parentID} className="group test">
|
|
70
|
+
<View testID={childID} className="group-[.test]:text-white" />
|
|
71
|
+
</View>,
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
expect(child).toHaveStyle({ color: "#ffffff" });
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
test("arbitrary groups - multiple className", async () => {
|
|
78
|
+
const { rerender } = await render(
|
|
79
|
+
<View testID={parentID} className="group">
|
|
80
|
+
<View testID={childID} className="group-[.test.test2]:text-white" />
|
|
81
|
+
</View>,
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
const parent = screen.getByTestId(parentID);
|
|
85
|
+
const child = screen.getByTestId(childID);
|
|
86
|
+
|
|
87
|
+
expect(parent).toHaveStyle(undefined);
|
|
88
|
+
expect(child).toHaveStyle(undefined);
|
|
89
|
+
|
|
90
|
+
await rerender(
|
|
91
|
+
<View testID={parentID} className="group test">
|
|
92
|
+
<View testID={childID} className="group-[.test.test2]:text-white" />
|
|
93
|
+
</View>,
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
expect(parent).toHaveStyle(undefined);
|
|
97
|
+
expect(child).toHaveStyle(undefined);
|
|
98
|
+
|
|
99
|
+
await rerender(
|
|
100
|
+
<View testID={parentID} className="group test test2">
|
|
101
|
+
<View testID={childID} className="group-[.test.test2]:text-white" />
|
|
102
|
+
</View>,
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
expect(child).toHaveStyle({ color: "#ffffff" });
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test("arbitrary groups - props", async () => {
|
|
109
|
+
const { rerender } = await render(
|
|
110
|
+
<View testID={parentID} className="group" accessibilityLabel="test">
|
|
111
|
+
<View
|
|
112
|
+
testID={childID}
|
|
113
|
+
className="group-[[accessibilityLabel=works]]:text-white"
|
|
114
|
+
/>
|
|
115
|
+
</View>,
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const parent = screen.getByTestId(parentID);
|
|
119
|
+
const child = screen.getByTestId(childID);
|
|
120
|
+
|
|
121
|
+
expect(parent).toHaveStyle(undefined);
|
|
122
|
+
expect(child).toHaveStyle(undefined);
|
|
123
|
+
|
|
124
|
+
await rerender(
|
|
125
|
+
<View testID={parentID} className="group" accessibilityLabel="works">
|
|
126
|
+
<View
|
|
127
|
+
testID={childID}
|
|
128
|
+
className="group-[[accessibilityLabel=works]]:text-white"
|
|
129
|
+
/>
|
|
130
|
+
</View>,
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
expect(child).toHaveStyle({ color: "#ffffff" });
|
|
134
|
+
});
|
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
import { renderCurrentTest } from "../test";
|
|
2
|
+
|
|
3
|
+
describe("Interactivity - Accent Color", () => {
|
|
4
|
+
test("accent-inherit", async () => {
|
|
5
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
6
|
+
props: {},
|
|
7
|
+
invalid: { properties: ["accent-color"] },
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
test("accent-current", async () => {
|
|
11
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
12
|
+
props: {},
|
|
13
|
+
invalid: { properties: ["accent-color"] },
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
test("accent-white", async () => {
|
|
17
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
18
|
+
props: {},
|
|
19
|
+
invalid: { properties: ["accent-color"] },
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
describe("Interactivity - Appearance", () => {
|
|
25
|
+
test("appearance-none", async () => {
|
|
26
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
27
|
+
props: {},
|
|
28
|
+
invalid: { properties: ["appearance"] },
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
describe("Interactivity - Cursor", () => {
|
|
34
|
+
test("cursor-auto", async () => {
|
|
35
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
36
|
+
props: {},
|
|
37
|
+
invalid: { properties: ["cursor"] },
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
test("cursor-default", async () => {
|
|
41
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
42
|
+
props: {},
|
|
43
|
+
invalid: { properties: ["cursor"] },
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
test("cursor-default", async () => {
|
|
47
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
48
|
+
props: {},
|
|
49
|
+
invalid: { properties: ["cursor"] },
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
describe("Interactivity - Caret Color", () => {
|
|
55
|
+
test("caret-inherit", async () => {
|
|
56
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
57
|
+
props: {},
|
|
58
|
+
invalid: { style: { "caret-color": "inherit" } },
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
test("caret-current", async () => {
|
|
62
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
63
|
+
props: {},
|
|
64
|
+
invalid: { style: { "caret-color": "currentcolor" } },
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
test("caret-white", async () => {
|
|
68
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
69
|
+
props: { cursorColor: "#ffffff" },
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
describe("Interactivity - Pointer Events", () => {
|
|
75
|
+
test("pointer-events-none", async () => {
|
|
76
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
77
|
+
props: { style: { pointerEvents: "none" } },
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
test("pointer-events-auto", async () => {
|
|
81
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
82
|
+
props: { style: { pointerEvents: "auto" } },
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
test("pointer-events-box-none", async () => {
|
|
86
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
87
|
+
props: { style: { pointerEvents: "box-none" } },
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
test("pointer-events-box-only", async () => {
|
|
91
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
92
|
+
props: { style: { pointerEvents: "box-only" } },
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
describe("Interactivity - Resize", () => {
|
|
98
|
+
test("resize-none", async () => {
|
|
99
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
100
|
+
props: {},
|
|
101
|
+
invalid: { properties: ["resize"] },
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
test("resize-y", async () => {
|
|
105
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
106
|
+
props: {},
|
|
107
|
+
invalid: { properties: ["resize"] },
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
test("resize-x", async () => {
|
|
111
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
112
|
+
props: {},
|
|
113
|
+
invalid: { properties: ["resize"] },
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
test("resize", async () => {
|
|
117
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
118
|
+
props: {},
|
|
119
|
+
invalid: { properties: ["resize"] },
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
describe("Interactivity - Scroll Behavior", () => {
|
|
125
|
+
test("scroll-auto", async () => {
|
|
126
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
127
|
+
props: {},
|
|
128
|
+
invalid: { properties: ["scroll-behavior"] },
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
test("scroll-smooth", async () => {
|
|
132
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
133
|
+
props: {},
|
|
134
|
+
invalid: { properties: ["scroll-behavior"] },
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
describe("Interactivity - Scroll Margin", () => {
|
|
140
|
+
test("scroll-m-0", async () => {
|
|
141
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
142
|
+
props: {},
|
|
143
|
+
invalid: { properties: ["scroll-margin"] },
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
test("scroll-mx-0", async () => {
|
|
147
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
148
|
+
props: {},
|
|
149
|
+
invalid: { properties: ["scroll-margin-left", "scroll-margin-right"] },
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
test("scroll-my-0", async () => {
|
|
153
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
154
|
+
props: {},
|
|
155
|
+
invalid: { properties: ["scroll-margin-top", "scroll-margin-bottom"] },
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
test("scroll-mt-0", async () => {
|
|
159
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
160
|
+
props: {},
|
|
161
|
+
invalid: { properties: ["scroll-margin-top"] },
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
test("scroll-mr-0", async () => {
|
|
165
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
166
|
+
props: {},
|
|
167
|
+
invalid: { properties: ["scroll-margin-right"] },
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
test("scroll-mb-0", async () => {
|
|
171
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
172
|
+
props: {},
|
|
173
|
+
invalid: { properties: ["scroll-margin-bottom"] },
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
test("scroll-ml-0", async () => {
|
|
177
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
178
|
+
props: {},
|
|
179
|
+
invalid: { properties: ["scroll-margin-left"] },
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
test("scroll-ms-0", async () => {
|
|
183
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
184
|
+
props: {},
|
|
185
|
+
invalid: { properties: ["scroll-margin-inline-start"] },
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
test("scroll-me-0", async () => {
|
|
189
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
190
|
+
props: {},
|
|
191
|
+
invalid: { properties: ["scroll-margin-inline-end"] },
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
test("scroll-m-px", async () => {
|
|
195
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
196
|
+
props: {},
|
|
197
|
+
invalid: { properties: ["scroll-margin"] },
|
|
198
|
+
});
|
|
199
|
+
});
|
|
200
|
+
test("scroll-mx-px", async () => {
|
|
201
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
202
|
+
props: {},
|
|
203
|
+
invalid: { properties: ["scroll-margin-left", "scroll-margin-right"] },
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
test("scroll-my-px", async () => {
|
|
207
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
208
|
+
props: {},
|
|
209
|
+
invalid: { properties: ["scroll-margin-top", "scroll-margin-bottom"] },
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
test("scroll-mt-px", async () => {
|
|
213
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
214
|
+
props: {},
|
|
215
|
+
invalid: { properties: ["scroll-margin-top"] },
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
test("scroll-mr-px", async () => {
|
|
219
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
220
|
+
props: {},
|
|
221
|
+
invalid: { properties: ["scroll-margin-right"] },
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
test("scroll-mb-px", async () => {
|
|
225
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
226
|
+
props: {},
|
|
227
|
+
invalid: { properties: ["scroll-margin-bottom"] },
|
|
228
|
+
});
|
|
229
|
+
});
|
|
230
|
+
test("scroll-ml-px", async () => {
|
|
231
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
232
|
+
props: {},
|
|
233
|
+
invalid: { properties: ["scroll-margin-left"] },
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
test("scroll-ms-px", async () => {
|
|
237
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
238
|
+
props: {},
|
|
239
|
+
invalid: { properties: ["scroll-margin-inline-start"] },
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
test("scroll-me-px", async () => {
|
|
243
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
244
|
+
props: {},
|
|
245
|
+
invalid: { properties: ["scroll-margin-inline-end"] },
|
|
246
|
+
});
|
|
247
|
+
});
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
describe("Interactivity - Scroll Padding", () => {
|
|
251
|
+
test("scroll-p-0", async () => {
|
|
252
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
253
|
+
props: {},
|
|
254
|
+
invalid: { properties: ["scroll-padding"] },
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
test("scroll-px-0", async () => {
|
|
258
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
259
|
+
props: {},
|
|
260
|
+
invalid: { properties: ["scroll-padding-left", "scroll-padding-right"] },
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
test("scroll-py-0", async () => {
|
|
264
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
265
|
+
props: {},
|
|
266
|
+
invalid: { properties: ["scroll-padding-top", "scroll-padding-bottom"] },
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
test("scroll-pt-0", async () => {
|
|
270
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
271
|
+
props: {},
|
|
272
|
+
invalid: { properties: ["scroll-padding-top"] },
|
|
273
|
+
});
|
|
274
|
+
});
|
|
275
|
+
test("scroll-pr-0", async () => {
|
|
276
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
277
|
+
props: {},
|
|
278
|
+
invalid: { properties: ["scroll-padding-right"] },
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
test("scroll-pb-0", async () => {
|
|
282
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
283
|
+
props: {},
|
|
284
|
+
invalid: { properties: ["scroll-padding-bottom"] },
|
|
285
|
+
});
|
|
286
|
+
});
|
|
287
|
+
test("scroll-pl-0", async () => {
|
|
288
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
289
|
+
props: {},
|
|
290
|
+
invalid: { properties: ["scroll-padding-left"] },
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
test("scroll-ps-0", async () => {
|
|
294
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
295
|
+
props: {},
|
|
296
|
+
invalid: { properties: ["scroll-padding-inline-start"] },
|
|
297
|
+
});
|
|
298
|
+
});
|
|
299
|
+
test("scroll-pe-0", async () => {
|
|
300
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
301
|
+
props: {},
|
|
302
|
+
invalid: { properties: ["scroll-padding-inline-end"] },
|
|
303
|
+
});
|
|
304
|
+
});
|
|
305
|
+
test("scroll-p-px", async () => {
|
|
306
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
307
|
+
props: {},
|
|
308
|
+
invalid: { properties: ["scroll-padding"] },
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
test("scroll-px-px", async () => {
|
|
312
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
313
|
+
props: {},
|
|
314
|
+
invalid: { properties: ["scroll-padding-left", "scroll-padding-right"] },
|
|
315
|
+
});
|
|
316
|
+
});
|
|
317
|
+
test("scroll-py-px", async () => {
|
|
318
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
319
|
+
props: {},
|
|
320
|
+
invalid: { properties: ["scroll-padding-top", "scroll-padding-bottom"] },
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
test("scroll-pt-px", async () => {
|
|
324
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
325
|
+
props: {},
|
|
326
|
+
invalid: { properties: ["scroll-padding-top"] },
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
test("scroll-pr-px", async () => {
|
|
330
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
331
|
+
props: {},
|
|
332
|
+
invalid: { properties: ["scroll-padding-right"] },
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
test("scroll-pb-px", async () => {
|
|
336
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
337
|
+
props: {},
|
|
338
|
+
invalid: { properties: ["scroll-padding-bottom"] },
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
test("scroll-pl-px", async () => {
|
|
342
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
343
|
+
props: {},
|
|
344
|
+
invalid: { properties: ["scroll-padding-left"] },
|
|
345
|
+
});
|
|
346
|
+
});
|
|
347
|
+
test("scroll-ps-px", async () => {
|
|
348
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
349
|
+
props: {},
|
|
350
|
+
invalid: { properties: ["scroll-padding-inline-start"] },
|
|
351
|
+
});
|
|
352
|
+
});
|
|
353
|
+
test("scroll-pe-px", async () => {
|
|
354
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
355
|
+
props: {},
|
|
356
|
+
invalid: { properties: ["scroll-padding-inline-end"] },
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
describe("Interactivity - Scroll Snap Align", () => {
|
|
362
|
+
test("snap-start", async () => {
|
|
363
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
364
|
+
props: {},
|
|
365
|
+
invalid: { properties: ["scroll-snap-align"] },
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
test("snap-end", async () => {
|
|
369
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
370
|
+
props: {},
|
|
371
|
+
invalid: { properties: ["scroll-snap-align"] },
|
|
372
|
+
});
|
|
373
|
+
});
|
|
374
|
+
test("snap-center", async () => {
|
|
375
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
376
|
+
props: {},
|
|
377
|
+
invalid: { properties: ["scroll-snap-align"] },
|
|
378
|
+
});
|
|
379
|
+
});
|
|
380
|
+
test("snap-align-none", async () => {
|
|
381
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
382
|
+
props: {},
|
|
383
|
+
invalid: { properties: ["scroll-snap-align"] },
|
|
384
|
+
});
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
|
|
388
|
+
describe("Interactivity - Scroll Snap Stop", () => {
|
|
389
|
+
test("snap-normal", async () => {
|
|
390
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
391
|
+
props: {},
|
|
392
|
+
invalid: { properties: ["scroll-snap-stop"] },
|
|
393
|
+
});
|
|
394
|
+
});
|
|
395
|
+
test("snap-always", async () => {
|
|
396
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
397
|
+
props: {},
|
|
398
|
+
invalid: { properties: ["scroll-snap-stop"] },
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
});
|
|
402
|
+
|
|
403
|
+
describe("Interactivity - Scroll Snap Type", () => {
|
|
404
|
+
test("snap-none", async () => {
|
|
405
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
406
|
+
props: {},
|
|
407
|
+
invalid: { properties: ["scroll-snap-type"] },
|
|
408
|
+
});
|
|
409
|
+
});
|
|
410
|
+
test("snap-x", async () => {
|
|
411
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
412
|
+
props: {},
|
|
413
|
+
invalid: { properties: ["scroll-snap-type"] },
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
test("snap-y", async () => {
|
|
417
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
418
|
+
props: {},
|
|
419
|
+
invalid: { properties: ["scroll-snap-type"] },
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
test("snap-both", async () => {
|
|
423
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
424
|
+
props: {},
|
|
425
|
+
invalid: { properties: ["scroll-snap-type"] },
|
|
426
|
+
});
|
|
427
|
+
});
|
|
428
|
+
test("snap-mandatory", async () => {
|
|
429
|
+
expect(await renderCurrentTest()).toStrictEqual({ props: {} });
|
|
430
|
+
});
|
|
431
|
+
test("snap-proximity", async () => {
|
|
432
|
+
expect(await renderCurrentTest()).toStrictEqual({ props: {} });
|
|
433
|
+
});
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
describe("Interactivity - Touch Action", () => {
|
|
437
|
+
test("touch-auto", async () => {
|
|
438
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
439
|
+
props: {},
|
|
440
|
+
invalid: { properties: ["touch-action"] },
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
test("touch-none", async () => {
|
|
444
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
445
|
+
props: {},
|
|
446
|
+
invalid: { properties: ["touch-action"] },
|
|
447
|
+
});
|
|
448
|
+
});
|
|
449
|
+
test("touch-pan-x", async () => {
|
|
450
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
451
|
+
props: {},
|
|
452
|
+
invalid: { properties: ["touch-action"] },
|
|
453
|
+
});
|
|
454
|
+
});
|
|
455
|
+
test("touch-pan-left", async () => {
|
|
456
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
457
|
+
props: {},
|
|
458
|
+
invalid: { properties: ["touch-action"] },
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
test("touch-pan-right", async () => {
|
|
462
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
463
|
+
props: {},
|
|
464
|
+
invalid: { properties: ["touch-action"] },
|
|
465
|
+
});
|
|
466
|
+
});
|
|
467
|
+
test("touch-pan-y", async () => {
|
|
468
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
469
|
+
props: {},
|
|
470
|
+
invalid: { properties: ["touch-action"] },
|
|
471
|
+
});
|
|
472
|
+
});
|
|
473
|
+
test("touch-pan-up", async () => {
|
|
474
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
475
|
+
props: {},
|
|
476
|
+
invalid: { properties: ["touch-action"] },
|
|
477
|
+
});
|
|
478
|
+
});
|
|
479
|
+
test("touch-pan-down", async () => {
|
|
480
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
481
|
+
props: {},
|
|
482
|
+
invalid: { properties: ["touch-action"] },
|
|
483
|
+
});
|
|
484
|
+
});
|
|
485
|
+
test("touch-pinch-zoom", async () => {
|
|
486
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
487
|
+
props: {},
|
|
488
|
+
invalid: { properties: ["touch-action"] },
|
|
489
|
+
});
|
|
490
|
+
});
|
|
491
|
+
test("touch-manipulation", async () => {
|
|
492
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
493
|
+
props: {},
|
|
494
|
+
invalid: { properties: ["touch-action"] },
|
|
495
|
+
});
|
|
496
|
+
});
|
|
497
|
+
});
|
|
498
|
+
|
|
499
|
+
describe("Interactivity - User Select", () => {
|
|
500
|
+
test("select-none", async () => {
|
|
501
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
502
|
+
props: { style: { userSelect: "none" } },
|
|
503
|
+
});
|
|
504
|
+
});
|
|
505
|
+
test("select-text", async () => {
|
|
506
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
507
|
+
props: { style: { userSelect: "text" } },
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
test("select-all", async () => {
|
|
511
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
512
|
+
props: { style: { userSelect: "all" } },
|
|
513
|
+
});
|
|
514
|
+
});
|
|
515
|
+
test("select-auto", async () => {
|
|
516
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
517
|
+
props: { style: { userSelect: "auto" } },
|
|
518
|
+
});
|
|
519
|
+
});
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
describe("Interactivity - Will Change", () => {
|
|
523
|
+
test("will-change-auto", async () => {
|
|
524
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
525
|
+
props: {},
|
|
526
|
+
invalid: { properties: ["will-change"] },
|
|
527
|
+
});
|
|
528
|
+
});
|
|
529
|
+
test("will-change-scroll", async () => {
|
|
530
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
531
|
+
props: {},
|
|
532
|
+
invalid: { properties: ["will-change"] },
|
|
533
|
+
});
|
|
534
|
+
});
|
|
535
|
+
test("will-change-contents", async () => {
|
|
536
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
537
|
+
props: {},
|
|
538
|
+
invalid: { properties: ["will-change"] },
|
|
539
|
+
});
|
|
540
|
+
});
|
|
541
|
+
test("will-change-transform", async () => {
|
|
542
|
+
expect(await renderCurrentTest()).toStrictEqual({
|
|
543
|
+
props: {},
|
|
544
|
+
invalid: { properties: ["will-change"] },
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
});
|