@zag-js/tooltip 0.80.0 → 0.81.0
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/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -4
- package/dist/index.mjs +1 -2
- package/package.json +8 -9
package/dist/index.d.mts
CHANGED
|
@@ -130,7 +130,7 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
130
130
|
|
|
131
131
|
declare function machine(userContext: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
132
132
|
|
|
133
|
-
declare const props: ("
|
|
134
|
-
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "
|
|
133
|
+
declare const props: ("open" | "disabled" | "dir" | "id" | "aria-label" | "getRootNode" | "ids" | "openDelay" | "closeDelay" | "closeOnPointerDown" | "closeOnEscape" | "closeOnScroll" | "closeOnClick" | "interactive" | "onOpenChange" | "positioning" | "open.controlled")[];
|
|
134
|
+
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "open" | "disabled" | "dir" | "id" | "aria-label" | "getRootNode" | "ids" | "openDelay" | "closeDelay" | "closeOnPointerDown" | "closeOnEscape" | "closeOnScroll" | "closeOnClick" | "interactive" | "onOpenChange" | "positioning" | "open.controlled">];
|
|
135
135
|
|
|
136
136
|
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type OpenChangeDetails, type Service, anatomy, connect, machine, props, splitProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -130,7 +130,7 @@ declare function connect<T extends PropTypes>(state: State, send: Send, normaliz
|
|
|
130
130
|
|
|
131
131
|
declare function machine(userContext: UserDefinedContext): _zag_js_core.Machine<MachineContext, MachineState, _zag_js_core.StateMachine.AnyEventObject>;
|
|
132
132
|
|
|
133
|
-
declare const props: ("
|
|
134
|
-
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "
|
|
133
|
+
declare const props: ("open" | "disabled" | "dir" | "id" | "aria-label" | "getRootNode" | "ids" | "openDelay" | "closeDelay" | "closeOnPointerDown" | "closeOnEscape" | "closeOnScroll" | "closeOnClick" | "interactive" | "onOpenChange" | "positioning" | "open.controlled")[];
|
|
134
|
+
declare const splitProps: <Props extends Partial<UserDefinedContext>>(props: Props) => [Partial<UserDefinedContext>, Omit<Props, "open" | "disabled" | "dir" | "id" | "aria-label" | "getRootNode" | "ids" | "openDelay" | "closeDelay" | "closeOnPointerDown" | "closeOnEscape" | "closeOnScroll" | "closeOnClick" | "interactive" | "onOpenChange" | "positioning" | "open.controlled">];
|
|
135
135
|
|
|
136
136
|
export { type MachineApi as Api, type UserDefinedContext as Context, type ElementIds, type OpenChangeDetails, type Service, anatomy, connect, machine, props, splitProps };
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,6 @@ var domQuery = require('@zag-js/dom-query');
|
|
|
5
5
|
var focusVisible = require('@zag-js/focus-visible');
|
|
6
6
|
var popper = require('@zag-js/popper');
|
|
7
7
|
var core = require('@zag-js/core');
|
|
8
|
-
var domEvent = require('@zag-js/dom-event');
|
|
9
8
|
var utils = require('@zag-js/utils');
|
|
10
9
|
var types = require('@zag-js/types');
|
|
11
10
|
|
|
@@ -352,7 +351,7 @@ function machine(userContext) {
|
|
|
352
351
|
},
|
|
353
352
|
trackPointerlockChange(ctx2, _evt, { send }) {
|
|
354
353
|
const onChange = () => send({ type: "CLOSE", src: "pointerlock:change" });
|
|
355
|
-
return
|
|
354
|
+
return domQuery.addDomEvent(dom.getDoc(ctx2), "pointerlockchange", onChange, false);
|
|
356
355
|
},
|
|
357
356
|
trackScroll(ctx2, _evt, { send }) {
|
|
358
357
|
if (!ctx2.closeOnScroll) return;
|
|
@@ -363,7 +362,7 @@ function machine(userContext) {
|
|
|
363
362
|
const onScroll = () => {
|
|
364
363
|
send({ type: "CLOSE", src: "scroll" });
|
|
365
364
|
};
|
|
366
|
-
return
|
|
365
|
+
return domQuery.addDomEvent(overflowParent, "scroll", onScroll, { passive: true, capture: true });
|
|
367
366
|
});
|
|
368
367
|
return () => {
|
|
369
368
|
cleanups.forEach((fn) => fn?.());
|
|
@@ -384,7 +383,7 @@ function machine(userContext) {
|
|
|
384
383
|
event.stopPropagation();
|
|
385
384
|
send({ type: "CLOSE", src: "keydown.escape" });
|
|
386
385
|
};
|
|
387
|
-
return
|
|
386
|
+
return domQuery.addDomEvent(dom.getDoc(ctx2), "keydown", onKeyDown, true);
|
|
388
387
|
}
|
|
389
388
|
},
|
|
390
389
|
actions: {
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { createAnatomy } from '@zag-js/anatomy';
|
|
2
|
-
import { createScope, dataAttr, getOverflowAncestors, isComposingEvent } from '@zag-js/dom-query';
|
|
2
|
+
import { createScope, dataAttr, addDomEvent, getOverflowAncestors, isComposingEvent } from '@zag-js/dom-query';
|
|
3
3
|
import { isFocusVisible, trackFocusVisible } from '@zag-js/focus-visible';
|
|
4
4
|
import { getPlacementStyles, getPlacement } from '@zag-js/popper';
|
|
5
5
|
import { proxy, createMachine, subscribe, guards } from '@zag-js/core';
|
|
6
|
-
import { addDomEvent } from '@zag-js/dom-event';
|
|
7
6
|
import { createSplitProps, compact } from '@zag-js/utils';
|
|
8
7
|
import { createProps } from '@zag-js/types';
|
|
9
8
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/tooltip",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.81.0",
|
|
4
4
|
"description": "Core logic for the tooltip widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,14 +26,13 @@
|
|
|
26
26
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@zag-js/anatomy": "0.
|
|
30
|
-
"@zag-js/core": "0.
|
|
31
|
-
"@zag-js/popper": "0.
|
|
32
|
-
"@zag-js/focus-visible": "0.
|
|
33
|
-
"@zag-js/dom-query": "0.
|
|
34
|
-
"@zag-js/
|
|
35
|
-
"@zag-js/types": "0.
|
|
36
|
-
"@zag-js/utils": "0.80.0"
|
|
29
|
+
"@zag-js/anatomy": "0.81.0",
|
|
30
|
+
"@zag-js/core": "0.81.0",
|
|
31
|
+
"@zag-js/popper": "0.81.0",
|
|
32
|
+
"@zag-js/focus-visible": "0.81.0",
|
|
33
|
+
"@zag-js/dom-query": "0.81.0",
|
|
34
|
+
"@zag-js/utils": "0.81.0",
|
|
35
|
+
"@zag-js/types": "0.81.0"
|
|
37
36
|
},
|
|
38
37
|
"devDependencies": {
|
|
39
38
|
"clean-package": "2.2.0"
|