@danxbot/ui 4.1.10 → 4.1.12
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.
|
@@ -22,7 +22,7 @@ export interface PopoverProps {
|
|
|
22
22
|
* cosmetic: `className` is merged last and would take the viewport clamp
|
|
23
23
|
* with it (see THE SIZE CLAMP above). This writes `--dx-popover-w`, which
|
|
24
24
|
* sits INSIDE the `min()` — so a design size can be as large as it likes and
|
|
25
|
-
* still cannot render wider than
|
|
25
|
+
* still cannot render wider than 90vw or than the room the positioner found.
|
|
26
26
|
*
|
|
27
27
|
* Unset, the popup keeps the library default of 20rem at the current
|
|
28
28
|
* `--ui-scale`.
|
|
@@ -59,6 +59,32 @@ export interface ProvenanceDetailProps {
|
|
|
59
59
|
* spellings of the whole component.
|
|
60
60
|
*/
|
|
61
61
|
valueContent?: ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* Draw the top-right corner of the header yourself, in place of the built-in
|
|
64
|
+
* `ProvenanceBadge`.
|
|
65
|
+
*
|
|
66
|
+
* This replaces ONE thing — the badge beside the field name — and nothing
|
|
67
|
+
* else: the field name itself, `valueContent` on the line below it, and the
|
|
68
|
+
* confidence readout under that are still the component's. `ProvenanceBadge`
|
|
69
|
+
* exists because this library has an opinion about extraction verification;
|
|
70
|
+
* it has none about who ELSE has a stake in that same corner. A consumer that
|
|
71
|
+
* layers its own sign-off/attribution mark over a record — who answered,
|
|
72
|
+
* whether a human has signed it, an audit's own verdict — is naming a fact
|
|
73
|
+
* this library cannot: it owns the record's own fields, not a caller's
|
|
74
|
+
* broader authorship model. Forcing that mark one row lower (the only slot
|
|
75
|
+
* that reached the header before this one) put two badges answering related
|
|
76
|
+
* questions on two different lines instead of the one corner a reader
|
|
77
|
+
* actually scans.
|
|
78
|
+
*
|
|
79
|
+
* The SAME `??` idiom `valueContent` uses, and for the same reason: passing
|
|
80
|
+
* `null` falls back to the built-in `ProvenanceBadge` exactly as leaving the
|
|
81
|
+
* prop `undefined` does, so gating this on some later condition is
|
|
82
|
+
* `showOwnMark ? <OwnMark /> : null` rather than two spellings of the header.
|
|
83
|
+
*
|
|
84
|
+
* Does not touch the trigger — `ProvenanceDisclosure`'s closed-page mark and
|
|
85
|
+
* accessible name are unaffected either way; see `stateContent` there.
|
|
86
|
+
*/
|
|
87
|
+
stateContent?: ReactNode;
|
|
62
88
|
/**
|
|
63
89
|
* Put a known id on the field-name heading, so something WRAPPING this can be
|
|
64
90
|
* labelled by it.
|
|
@@ -73,4 +99,4 @@ export interface ProvenanceDetailProps {
|
|
|
73
99
|
titleAs?: ProvenanceDetailTitleAs;
|
|
74
100
|
className?: string;
|
|
75
101
|
}
|
|
76
|
-
export declare function ProvenanceDetail({ record, actions, emptyLabel, redactedLabel, ratingLabel, valueContent, titleId, titleAs: Title, className, }: ProvenanceDetailProps): import("react").JSX.Element;
|
|
102
|
+
export declare function ProvenanceDetail({ record, actions, emptyLabel, redactedLabel, ratingLabel, valueContent, stateContent, titleId, titleAs: Title, className, }: ProvenanceDetailProps): import("react").JSX.Element;
|
|
@@ -65,6 +65,16 @@ export interface ProvenanceDisclosureProps {
|
|
|
65
65
|
* consumer supplied this.
|
|
66
66
|
*/
|
|
67
67
|
valueContent?: ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* Draw the PANEL HEADER'S top-right corner yourself, in place of the
|
|
70
|
+
* built-in `ProvenanceBadge`. {@link ProvenanceDetailProps.stateContent}
|
|
71
|
+
*
|
|
72
|
+
* Like `valueContent`, this reaches only the panel — the trigger's own
|
|
73
|
+
* `triggerBadge` is a separate, independent choice about what the CLOSED
|
|
74
|
+
* page shows, and passing this does not change it or the trigger's
|
|
75
|
+
* accessible name (see "THE NAME IS COMPUTED FROM THE CONTENT" above).
|
|
76
|
+
*/
|
|
77
|
+
stateContent?: ReactNode;
|
|
68
78
|
/**
|
|
69
79
|
* Called with `true` when the panel opens and `false` when it closes.
|
|
70
80
|
*
|
|
@@ -84,5 +94,14 @@ export interface ProvenanceDisclosureProps {
|
|
|
84
94
|
*/
|
|
85
95
|
onOpenChange?: (open: boolean) => void;
|
|
86
96
|
className?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Override the panel's design width. See the `width` note at the `<Popover>`
|
|
99
|
+
* call site below for what 30rem was arithmetic on and why going wider used
|
|
100
|
+
* to read as a mistake — this exists because a real consumer's content
|
|
101
|
+
* (a dense multi-column table, not prose) outgrew that arithmetic. Unset,
|
|
102
|
+
* the panel keeps the library default of `30rem`, still clamped to
|
|
103
|
+
* `Popover`'s own viewport ceiling either way.
|
|
104
|
+
*/
|
|
105
|
+
width?: string;
|
|
87
106
|
}
|
|
88
|
-
export declare function ProvenanceDisclosure({ record, actions, emptyLabel, redactedLabel, ratingLabel, triggerBadge, valueWrap, triggerContent, valueContent, onOpenChange, className, }: ProvenanceDisclosureProps): import("react").JSX.Element;
|
|
107
|
+
export declare function ProvenanceDisclosure({ record, actions, emptyLabel, redactedLabel, ratingLabel, triggerBadge, valueWrap, triggerContent, valueContent, stateContent, onOpenChange, className, width, }: ProvenanceDisclosureProps): import("react").JSX.Element;
|