@zag-js/tooltip 1.0.1 → 1.1.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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -6
- package/dist/index.mjs +3 -6
- package/package.json +9 -9
package/dist/index.d.mts
CHANGED
|
@@ -85,7 +85,7 @@ interface TooltipProps extends DirectionProperty, CommonProperties {
|
|
|
85
85
|
*/
|
|
86
86
|
defaultOpen?: boolean | undefined;
|
|
87
87
|
}
|
|
88
|
-
type PropsWithDefault = "openDelay" | "closeDelay" | "closeOnPointerDown" | "closeOnEscape" | "closeOnScroll" | "closeOnClick" | "interactive" | "id";
|
|
88
|
+
type PropsWithDefault = "openDelay" | "closeDelay" | "closeOnPointerDown" | "closeOnEscape" | "closeOnScroll" | "closeOnClick" | "interactive" | "id" | "positioning";
|
|
89
89
|
interface TooltipSchema {
|
|
90
90
|
state: "open" | "closed" | "opening" | "closing";
|
|
91
91
|
props: RequiredBy<TooltipProps, PropsWithDefault>;
|
package/dist/index.d.ts
CHANGED
|
@@ -85,7 +85,7 @@ interface TooltipProps extends DirectionProperty, CommonProperties {
|
|
|
85
85
|
*/
|
|
86
86
|
defaultOpen?: boolean | undefined;
|
|
87
87
|
}
|
|
88
|
-
type PropsWithDefault = "openDelay" | "closeDelay" | "closeOnPointerDown" | "closeOnEscape" | "closeOnScroll" | "closeOnClick" | "interactive" | "id";
|
|
88
|
+
type PropsWithDefault = "openDelay" | "closeDelay" | "closeOnPointerDown" | "closeOnEscape" | "closeOnScroll" | "closeOnClick" | "interactive" | "id" | "positioning";
|
|
89
89
|
interface TooltipSchema {
|
|
90
90
|
state: "open" | "closed" | "opening" | "closing";
|
|
91
91
|
props: RequiredBy<TooltipProps, PropsWithDefault>;
|
package/dist/index.js
CHANGED
|
@@ -417,19 +417,16 @@ var machine = core.createMachine({
|
|
|
417
417
|
trackFocusVisible: ({ scope }) => {
|
|
418
418
|
return focusVisible.trackFocusVisible({ root: scope.getRootNode?.() });
|
|
419
419
|
},
|
|
420
|
-
trackPositioning: ({
|
|
420
|
+
trackPositioning: ({ context, prop, scope }) => {
|
|
421
421
|
if (!context.get("currentPlacement")) {
|
|
422
|
-
|
|
423
|
-
context.set("currentPlacement", positioning.placement);
|
|
422
|
+
context.set("currentPlacement", prop("positioning").placement);
|
|
424
423
|
}
|
|
425
424
|
const getPositionerEl2 = () => getPositionerEl(scope);
|
|
426
425
|
return popper.getPlacement(getTriggerEl(scope), getPositionerEl2, {
|
|
427
426
|
...prop("positioning"),
|
|
428
427
|
defer: true,
|
|
429
428
|
onComplete(data) {
|
|
430
|
-
|
|
431
|
-
context.set("currentPlacement", data.placement);
|
|
432
|
-
});
|
|
429
|
+
context.set("currentPlacement", data.placement);
|
|
433
430
|
}
|
|
434
431
|
});
|
|
435
432
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -415,19 +415,16 @@ var machine = createMachine({
|
|
|
415
415
|
trackFocusVisible: ({ scope }) => {
|
|
416
416
|
return trackFocusVisible({ root: scope.getRootNode?.() });
|
|
417
417
|
},
|
|
418
|
-
trackPositioning: ({
|
|
418
|
+
trackPositioning: ({ context, prop, scope }) => {
|
|
419
419
|
if (!context.get("currentPlacement")) {
|
|
420
|
-
|
|
421
|
-
context.set("currentPlacement", positioning.placement);
|
|
420
|
+
context.set("currentPlacement", prop("positioning").placement);
|
|
422
421
|
}
|
|
423
422
|
const getPositionerEl2 = () => getPositionerEl(scope);
|
|
424
423
|
return getPlacement(getTriggerEl(scope), getPositionerEl2, {
|
|
425
424
|
...prop("positioning"),
|
|
426
425
|
defer: true,
|
|
427
426
|
onComplete(data) {
|
|
428
|
-
|
|
429
|
-
context.set("currentPlacement", data.placement);
|
|
430
|
-
});
|
|
427
|
+
context.set("currentPlacement", data.placement);
|
|
431
428
|
}
|
|
432
429
|
});
|
|
433
430
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/tooltip",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Core logic for the tooltip widget implemented as a state machine",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
"url": "https://github.com/chakra-ui/zag/issues"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@zag-js/anatomy": "1.0
|
|
30
|
-
"@zag-js/core": "1.0
|
|
31
|
-
"@zag-js/store": "1.0
|
|
32
|
-
"@zag-js/popper": "1.0
|
|
33
|
-
"@zag-js/focus-visible": "1.0
|
|
34
|
-
"@zag-js/dom-query": "1.0
|
|
35
|
-
"@zag-js/utils": "1.0
|
|
36
|
-
"@zag-js/types": "1.0
|
|
29
|
+
"@zag-js/anatomy": "1.1.0",
|
|
30
|
+
"@zag-js/core": "1.1.0",
|
|
31
|
+
"@zag-js/store": "1.1.0",
|
|
32
|
+
"@zag-js/popper": "1.1.0",
|
|
33
|
+
"@zag-js/focus-visible": "1.1.0",
|
|
34
|
+
"@zag-js/dom-query": "1.1.0",
|
|
35
|
+
"@zag-js/utils": "1.1.0",
|
|
36
|
+
"@zag-js/types": "1.1.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"clean-package": "2.2.0"
|