@astryxdesign/lab 0.7.5-canary.c60f571 → 0.7.5-canary.cd53c2d
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/lab",
|
|
3
|
-
"version": "0.7.5-canary.
|
|
3
|
+
"version": "0.7.5-canary.cd53c2d",
|
|
4
4
|
"description": "Experimental Astryx components — published to npm only under the @canary dist-tag for early testing; never released as a stable (latest) version.",
|
|
5
5
|
"author": "Meta Open Source",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"@stylexjs/stylex": ">=0.10.0",
|
|
52
|
-
"@astryxdesign/core": "0.7.5-canary.
|
|
52
|
+
"@astryxdesign/core": "0.7.5-canary.cd53c2d",
|
|
53
53
|
"react": ">=19.0.0",
|
|
54
54
|
"react-dom": ">=19.0.0"
|
|
55
55
|
},
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"d3-shape": "^3.2.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@astryxdesign/a11y-spec": "0.7.5-canary.
|
|
63
|
-
"@astryxdesign/cli": "0.7.5-canary.
|
|
62
|
+
"@astryxdesign/a11y-spec": "0.7.5-canary.cd53c2d",
|
|
63
|
+
"@astryxdesign/cli": "0.7.5-canary.cd53c2d",
|
|
64
64
|
"@babel/cli": "^7.29.7",
|
|
65
65
|
"@babel/core": "^7.29.7",
|
|
66
66
|
"@babel/preset-react": "^7.29.7",
|
|
@@ -167,12 +167,16 @@ describe('InfoTip', () => {
|
|
|
167
167
|
expect(screen.getByTestId('rich-content')).toBeInTheDocument();
|
|
168
168
|
});
|
|
169
169
|
describe('touch', () => {
|
|
170
|
-
/**
|
|
170
|
+
/**
|
|
171
|
+
* A tap, in the order a browser dispatches it: the finger's pointer events,
|
|
172
|
+
* the hover it synthesizes, then the `click` that says the touch was a tap.
|
|
173
|
+
*/
|
|
171
174
|
const tap = (element: HTMLElement) => {
|
|
172
175
|
fireEvent.pointerEnter(element, {pointerType: 'touch'});
|
|
173
176
|
fireEvent.pointerDown(element, {pointerType: 'touch'});
|
|
174
177
|
fireEvent.pointerUp(element, {pointerType: 'touch'});
|
|
175
178
|
fireEvent.mouseEnter(element);
|
|
179
|
+
fireEvent.click(element);
|
|
176
180
|
};
|
|
177
181
|
|
|
178
182
|
it('opens on a tap, though the trigger is a button', async () => {
|
|
@@ -221,9 +225,10 @@ describe('InfoTip', () => {
|
|
|
221
225
|
expect(popoverOpenState.get(layer)).toBe(true);
|
|
222
226
|
});
|
|
223
227
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
});
|
|
228
|
+
// The tap outside counts when the finger lifts.
|
|
229
|
+
const elsewhere = screen.getByRole('button', {name: 'Elsewhere'});
|
|
230
|
+
fireEvent.pointerDown(elsewhere, {pointerType: 'touch'});
|
|
231
|
+
fireEvent.pointerUp(elsewhere, {pointerType: 'touch'});
|
|
227
232
|
|
|
228
233
|
await waitFor(() => {
|
|
229
234
|
expect(popoverOpenState.get(layer)).toBe(false);
|