@danxbot/ui 4.1.9 → 4.1.11
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,6 +1,16 @@
|
|
|
1
1
|
import type { ReactNode, Ref } from "react";
|
|
2
2
|
export interface PopoverProps {
|
|
3
3
|
trigger: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Controlled open state — for a caller that must open this popover from
|
|
6
|
+
* somewhere other than its own trigger (another control elsewhere on the
|
|
7
|
+
* screen pointing at the same content). `Dialog` and `Menu` already carry
|
|
8
|
+
* this exact prop; `Popover` was the one overlay a consumer could not drive
|
|
9
|
+
* externally, which is a real gap rather than a deliberate omission — there
|
|
10
|
+
* is nothing about a popover's semantics that makes it less legitimate to
|
|
11
|
+
* open by remote control than a dialog.
|
|
12
|
+
*/
|
|
13
|
+
open?: boolean;
|
|
4
14
|
side?: "top" | "bottom" | "left" | "right";
|
|
5
15
|
align?: "start" | "center" | "end";
|
|
6
16
|
/** Draws the little pointer at the trigger. Off by default — see below. */
|
|
@@ -12,7 +22,7 @@ export interface PopoverProps {
|
|
|
12
22
|
* cosmetic: `className` is merged last and would take the viewport clamp
|
|
13
23
|
* with it (see THE SIZE CLAMP above). This writes `--dx-popover-w`, which
|
|
14
24
|
* sits INSIDE the `min()` — so a design size can be as large as it likes and
|
|
15
|
-
* still cannot render wider than
|
|
25
|
+
* still cannot render wider than 90vw or than the room the positioner found.
|
|
16
26
|
*
|
|
17
27
|
* Unset, the popup keeps the library default of 20rem at the current
|
|
18
28
|
* `--ui-scale`.
|
|
@@ -56,7 +66,7 @@ export interface PopoverProps {
|
|
|
56
66
|
"aria-labelledby"?: string;
|
|
57
67
|
"aria-label"?: string;
|
|
58
68
|
}
|
|
59
|
-
export declare function Popover({ trigger, side, align, arrow, width, className, children, ref, defaultOpen, onOpenChange, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, }: PopoverProps): import("react").JSX.Element;
|
|
69
|
+
export declare function Popover({ trigger, open, side, align, arrow, width, className, children, ref, defaultOpen, onOpenChange, "aria-labelledby": ariaLabelledBy, "aria-label": ariaLabel, }: PopoverProps): import("react").JSX.Element;
|
|
60
70
|
/** Closes the nearest Popover. */
|
|
61
71
|
export declare function PopoverClose({ children }: {
|
|
62
72
|
children: ReactNode;
|
|
@@ -84,5 +84,14 @@ export interface ProvenanceDisclosureProps {
|
|
|
84
84
|
*/
|
|
85
85
|
onOpenChange?: (open: boolean) => void;
|
|
86
86
|
className?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Override the panel's design width. See the `width` note at the `<Popover>`
|
|
89
|
+
* call site below for what 30rem was arithmetic on and why going wider used
|
|
90
|
+
* to read as a mistake — this exists because a real consumer's content
|
|
91
|
+
* (a dense multi-column table, not prose) outgrew that arithmetic. Unset,
|
|
92
|
+
* the panel keeps the library default of `30rem`, still clamped to
|
|
93
|
+
* `Popover`'s own viewport ceiling either way.
|
|
94
|
+
*/
|
|
95
|
+
width?: string;
|
|
87
96
|
}
|
|
88
|
-
export declare function ProvenanceDisclosure({ record, actions, emptyLabel, redactedLabel, ratingLabel, triggerBadge, valueWrap, triggerContent, valueContent, onOpenChange, className, }: ProvenanceDisclosureProps): import("react").JSX.Element;
|
|
97
|
+
export declare function ProvenanceDisclosure({ record, actions, emptyLabel, redactedLabel, ratingLabel, triggerBadge, valueWrap, triggerContent, valueContent, onOpenChange, className, width, }: ProvenanceDisclosureProps): import("react").JSX.Element;
|