@zag-js/tooltip 0.1.10 → 0.1.13

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.
@@ -1,8 +0,0 @@
1
- declare type Id = string | null;
2
- declare type Store = {
3
- id: Id;
4
- prevId: Id;
5
- setId: (val: Id) => void;
6
- };
7
- export declare const store: Store;
8
- export {};
@@ -1,82 +0,0 @@
1
- import type { StateMachine as S } from "@zag-js/core";
2
- import type { Placement, PositioningOptions } from "@zag-js/popper";
3
- import type { CommonProperties, RequiredBy, RootProperties } from "@zag-js/types";
4
- declare type ElementIds = Partial<{
5
- trigger: string;
6
- content: string;
7
- }>;
8
- declare type PublicContext = CommonProperties & {
9
- /**
10
- * The ids of the elements in the tooltip. Useful for composition.
11
- */
12
- ids?: ElementIds;
13
- /**
14
- * The `id` of the tooltip.
15
- */
16
- id: string;
17
- /**
18
- * The open delay of the tooltip.
19
- */
20
- openDelay: number;
21
- /**
22
- * The close delay of the tooltip.
23
- */
24
- closeDelay: number;
25
- /**
26
- * Whether to close the tooltip on pointerdown.
27
- */
28
- closeOnPointerDown: boolean;
29
- /**
30
- * Whether to close the tooltip when the Escape key is pressed.
31
- */
32
- closeOnEsc?: boolean;
33
- /**
34
- * Whether the tooltip's content is interactive.
35
- * In this mode, the tooltip will remain open when user hovers over the content.
36
- * @see https://www.w3.org/TR/WCAG21/#content-on-hover-or-focus
37
- */
38
- interactive: boolean;
39
- /**
40
- * Function called when the tooltip is opened.
41
- */
42
- onOpen?: VoidFunction;
43
- /**
44
- * Function called when the tooltip is closed.
45
- */
46
- onClose?: VoidFunction;
47
- /**
48
- * Custom label for the tooltip.
49
- */
50
- "aria-label"?: string;
51
- /**
52
- * The user provided options used to position the popover content
53
- */
54
- positioning: PositioningOptions;
55
- };
56
- export declare type UserDefinedContext = RequiredBy<PublicContext, "id">;
57
- declare type ComputedContext = Readonly<{
58
- /**
59
- * @computed Whether an `aria-label` is set.
60
- */
61
- readonly hasAriaLabel: boolean;
62
- }>;
63
- declare type PrivateContext = RootProperties & {
64
- /**
65
- * @internal
66
- * The computed placement of the tooltip.
67
- */
68
- currentPlacement?: Placement;
69
- /**
70
- * @internal
71
- * Whether the dynamic placement has been computed
72
- */
73
- isPlacementComplete?: boolean;
74
- };
75
- export declare type MachineContext = PublicContext & ComputedContext & PrivateContext;
76
- export declare type MachineState = {
77
- value: "unknown" | "opening" | "open" | "closing" | "closed";
78
- tags: "open" | "closed";
79
- };
80
- export declare type State = S.State<MachineContext, MachineState>;
81
- export declare type Send = S.Send<S.AnyEventObject>;
82
- export {};