@danxbot/ui 6.3.4 → 6.3.6

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.
@@ -71,7 +71,7 @@ export declare function Popover({ trigger, open, side, align, arrow, width, clas
71
71
  export declare function PopoverClose({ children }: {
72
72
  children: ReactNode;
73
73
  }): import("react").JSX.Element;
74
- export interface TooltipProps {
74
+ interface TooltipBaseProps {
75
75
  /** The label. Plain text — anything interactive belongs in a Popover. */
76
76
  content: ReactNode;
77
77
  children: ReactNode;
@@ -102,12 +102,39 @@ export interface TooltipProps {
102
102
  */
103
103
  enterable?: boolean;
104
104
  }
105
+ /**
106
+ * DX-3014 — the OPT-IN controlled pair, for a caller that needs to force the
107
+ * tooltip open from an event neither hover nor keyboard focus covers.
108
+ *
109
+ * The gap this closes: Base UI opens on hover AND on keyboard focus (a real
110
+ * Tab keypress), but NOT on a plain `.focus()` call or a touch tap — both
111
+ * land as an ordinary (non-`:focus-visible`) focus, which the interaction the
112
+ * library reads for "focus" deliberately excludes (measured directly: a
113
+ * simulated tap focuses the trigger element but never opens the popup; a real
114
+ * Tab keypress does). A caller with a genuine touch-reachability requirement
115
+ * (a segmented-donut status breakdown, e.g.) wires its own tap handler to
116
+ * `onOpenChange`/`open` instead of fighting the trigger's focus semantics.
117
+ *
118
+ * BOTH OR NEITHER: passing only one makes Base UI's `Root` half-controlled
119
+ * (it would echo state changes nobody reads, or ignore an external open) — a
120
+ * discriminated union so TypeScript refuses the half-controlled shape at the
121
+ * call site rather than leaving it a runtime footgun. Omit both (the
122
+ * default, and every existing call site) for the unchanged uncontrolled
123
+ * hover/keyboard-focus behaviour.
124
+ */
125
+ export type TooltipProps = TooltipBaseProps & ({
126
+ open?: undefined;
127
+ onOpenChange?: undefined;
128
+ } | {
129
+ open: boolean;
130
+ onOpenChange: (open: boolean) => void;
131
+ });
105
132
  /**
106
133
  * Hover delay is set once on `TooltipProvider`, not per tooltip — that is where
107
134
  * Base UI keeps it, and it is the right place: the delay only means anything
108
135
  * relative to the OTHER tooltips nearby.
109
136
  */
110
- export declare function Tooltip({ content, children, side, className, defaultOpen, enterable, }: TooltipProps): import("react").JSX.Element;
137
+ export declare function Tooltip({ content, children, side, className, defaultOpen, enterable, open, onOpenChange }: TooltipProps): import("react").JSX.Element;
111
138
  /**
112
139
  * Share hover timing across every tooltip beneath it.
113
140
  *
@@ -127,3 +154,4 @@ export declare function TooltipProvider({ children, delay }: {
127
154
  children: ReactNode;
128
155
  delay?: number;
129
156
  }): import("react").JSX.Element;
157
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danxbot/ui",
3
- "version": "6.3.4",
3
+ "version": "6.3.6",
4
4
  "type": "module",
5
5
  "description": "Danxbot — a domain-agnostic React design system with motion as a first-class primitive.",
6
6
  "license": "MIT",