@ship-it-ui/shipit 0.0.6 → 0.0.7
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.cjs +450 -274
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +108 -10
- package/dist/index.d.ts +108 -10
- package/dist/index.js +436 -262
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -116,6 +116,43 @@ interface ReasoningStepProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
116
116
|
}
|
|
117
117
|
declare const ReasoningStep: react.ForwardRefExoticComponent<ReasoningStepProps & react.RefAttributes<HTMLDivElement>>;
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* StalenessChip — pairs with `ConfidenceIndicator` in the "data trust"
|
|
121
|
+
* component family. Renders a tier-coloured chip with a humanised age
|
|
122
|
+
* ("Updated 3h ago") so consumers can answer "when was this last seen?" at
|
|
123
|
+
* a glance.
|
|
124
|
+
*
|
|
125
|
+
* Tier derivation:
|
|
126
|
+
* ageSeconds ≤ thresholds[0] → `ok` (fresh)
|
|
127
|
+
* ageSeconds ≤ thresholds[1] → `warn` (stale)
|
|
128
|
+
* otherwise → `err` (very stale)
|
|
129
|
+
*
|
|
130
|
+
* Default thresholds: `[3600, 86400]` (1 hour / 24 hours) — knowledge-graph
|
|
131
|
+
* payloads usually fall on those breakpoints. Override per-surface with the
|
|
132
|
+
* `thresholds` prop.
|
|
133
|
+
*/
|
|
134
|
+
type StalenessTier = 'ok' | 'warn' | 'err';
|
|
135
|
+
interface StalenessChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'prefix'> {
|
|
136
|
+
/** Age in seconds since the data was last refreshed. Must be non-negative. */
|
|
137
|
+
ageSeconds: number;
|
|
138
|
+
/** `[okMaxSeconds, warnMaxSeconds]`. Defaults to `[3600, 86400]`. */
|
|
139
|
+
thresholds?: readonly [number, number];
|
|
140
|
+
/** Optional leading label, e.g. `"Updated"` → "Updated 3h ago". */
|
|
141
|
+
prefix?: ReactNode;
|
|
142
|
+
/**
|
|
143
|
+
* Optional tooltip body. Rendered via the `SimpleTooltip` convenience —
|
|
144
|
+
* the chip becomes its trigger.
|
|
145
|
+
*/
|
|
146
|
+
tooltip?: ReactNode;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Pure age-to-string formatter. Exported so consumers (and tests) can compose
|
|
150
|
+
* it without rendering the chip. Returns "just now" / "Xm" / "Xh" / "Xd"
|
|
151
|
+
* depending on magnitude. Negative inputs are clamped to 0.
|
|
152
|
+
*/
|
|
153
|
+
declare function formatAge(ageSeconds: number): string;
|
|
154
|
+
declare const StalenessChip: react.ForwardRefExoticComponent<StalenessChipProps & react.RefAttributes<HTMLSpanElement>>;
|
|
155
|
+
|
|
119
156
|
/**
|
|
120
157
|
* SuggestionChip — pill-shaped prompt suggestion. The ✦ glyph prefix signals
|
|
121
158
|
* "ask about this" and matches the AskBar's identity.
|
|
@@ -166,8 +203,17 @@ type EntityType = KnownEntityType | (string & {});
|
|
|
166
203
|
*/
|
|
167
204
|
type EntityBadgeVariant = 'neutral' | 'accent' | 'ok' | 'warn' | 'err' | 'purple' | 'pink';
|
|
168
205
|
interface EntityTypeMeta {
|
|
169
|
-
/**
|
|
170
|
-
|
|
206
|
+
/**
|
|
207
|
+
* Icon name in `@ship-it-ui/icons`. Entity components (`EntityBadge`,
|
|
208
|
+
* `EntityListRow`, `EntityCard`, `GraphNode`, `EntityTable`) and the
|
|
209
|
+
* cytoscape adapter render the SVG icon from `icon-data.ts`. Pass the string
|
|
210
|
+
* name (e.g. `'service'`, `'rocket'`) — type-checking against `GlyphName`
|
|
211
|
+
* happens at the registration call site, not here, to keep this interface
|
|
212
|
+
* importable from packages that don't depend on `@ship-it-ui/icons`. Names
|
|
213
|
+
* not registered in the icon manifest fall back to centered-text rendering
|
|
214
|
+
* inside the icon's SVG, so a typo is visible but won't crash.
|
|
215
|
+
*/
|
|
216
|
+
iconName: string;
|
|
171
217
|
/** Human-readable type name (e.g. `'Service'`). */
|
|
172
218
|
label: string;
|
|
173
219
|
/** Tailwind text-color class for the glyph and accent text. */
|
|
@@ -199,11 +245,6 @@ declare function getEntityTypeMeta(type: EntityType): EntityTypeMeta;
|
|
|
199
245
|
declare function listEntityTypes(): ReadonlyArray<readonly [string, EntityTypeMeta]>;
|
|
200
246
|
/** Test-only helper: drop all consumer registrations and re-seed the built-ins. */
|
|
201
247
|
declare function resetEntityTypeRegistry(): void;
|
|
202
|
-
/**
|
|
203
|
-
* @deprecated Prefer `getEntityTypeMeta(type).glyph`. Retained for the six
|
|
204
|
-
* built-in types so existing consumers keep working.
|
|
205
|
-
*/
|
|
206
|
-
declare const ENTITY_GLYPH: Record<KnownEntityType, string>;
|
|
207
248
|
/** @deprecated Prefer `getEntityTypeMeta(type).label`. */
|
|
208
249
|
declare const ENTITY_LABEL: Record<KnownEntityType, string>;
|
|
209
250
|
/** @deprecated Prefer `getEntityTypeMeta(type).toneClass`. */
|
|
@@ -254,13 +295,59 @@ interface EntityCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
254
295
|
}
|
|
255
296
|
declare const EntityCard: react.ForwardRefExoticComponent<EntityCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
256
297
|
|
|
298
|
+
/**
|
|
299
|
+
* EntityList — bordered/rounded container for `EntityListRow*` children with
|
|
300
|
+
* auto-dividers and an optional title/subtitle header. Replaces the ad-hoc
|
|
301
|
+
* `<div className="flex flex-col">` wrappers consumers were rolling by hand.
|
|
302
|
+
*
|
|
303
|
+
* When `collapsible` is set, renders a native `<details>`/`<summary>` so the
|
|
304
|
+
* expand/collapse behaviour is zero-JS and screen-reader-correct out of the
|
|
305
|
+
* box. The caret affordance rotates from down→right via CSS when the section
|
|
306
|
+
* is collapsed. Initial state is driven by `defaultCollapsed`; subsequent
|
|
307
|
+
* toggles are tracked in local state via `onToggle` so a parent re-render
|
|
308
|
+
* doesn't snap the disclosure back to its initial position.
|
|
309
|
+
*
|
|
310
|
+
* `ref` is typed as `HTMLElement` because the rendered tag flips between
|
|
311
|
+
* `<section>` and `<details>` based on `collapsible`. Narrow with a runtime
|
|
312
|
+
* `instanceof` check if you need element-specific APIs.
|
|
313
|
+
*
|
|
314
|
+
* NOTE on keyboard navigation: an arrow-key / j-k roving-tabindex scheme is
|
|
315
|
+
* intentionally NOT implemented in this initial version. Wiring focus across
|
|
316
|
+
* children requires either prop-cloning rows or a context they opt into;
|
|
317
|
+
* neither has landed yet and a half-built version would set the wrong
|
|
318
|
+
* expectation. The surface is reserved here — file a follow-up issue when a
|
|
319
|
+
* real consumer needs it.
|
|
320
|
+
*/
|
|
321
|
+
interface EntityListProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
322
|
+
/** Header title rendered above the row list. */
|
|
323
|
+
title?: ReactNode;
|
|
324
|
+
/** Muted subtitle rendered under the title. */
|
|
325
|
+
subtitle?: ReactNode;
|
|
326
|
+
/** Bordered + rounded container framing. Default `true`. */
|
|
327
|
+
framed?: boolean;
|
|
328
|
+
/** Auto-dividers between row children. Default `true`. */
|
|
329
|
+
dividers?: boolean;
|
|
330
|
+
/** Render as a native `<details>`/`<summary>` collapsible group. */
|
|
331
|
+
collapsible?: boolean;
|
|
332
|
+
/** Initial collapsed state when `collapsible`. Default `false`. */
|
|
333
|
+
defaultCollapsed?: boolean;
|
|
334
|
+
children: ReactNode;
|
|
335
|
+
}
|
|
336
|
+
declare const EntityList: react.ForwardRefExoticComponent<EntityListProps & react.RefAttributes<HTMLElement>>;
|
|
337
|
+
|
|
257
338
|
/**
|
|
258
339
|
* EntityListRow — compact row for entity lists (e.g., dependents / dependencies
|
|
259
340
|
* panels on a detail page). Glyph dot + name + optional relation pill +
|
|
260
|
-
* optional trailing meta.
|
|
341
|
+
* optional trailing meta + optional trailing `actions` slot.
|
|
261
342
|
*
|
|
262
343
|
* Renders as a button when `onClick` is supplied; otherwise a plain row.
|
|
263
344
|
*
|
|
345
|
+
* When `actions` is provided, the interactive label region (button or div) is
|
|
346
|
+
* wrapped in an outer container and `actions` renders as a peer sibling — so
|
|
347
|
+
* any nested `<button>` in the slot stays a peer of the row button instead of
|
|
348
|
+
* a descendant (avoiding axe `nested-interactive`). When `actions` is absent,
|
|
349
|
+
* the rendered structure is unchanged from the original single-element form.
|
|
350
|
+
*
|
|
264
351
|
* For strongly-typed refs use the specialized exports `EntityListRowDiv`
|
|
265
352
|
* (non-interactive) and `EntityListRowButton` (interactive). The default
|
|
266
353
|
* `EntityListRow` is a thin wrapper that picks the right underlying element
|
|
@@ -274,6 +361,11 @@ interface EntityListRowCommonProps {
|
|
|
274
361
|
relation?: ReactNode;
|
|
275
362
|
/** Trailing meta line (e.g., a timestamp). */
|
|
276
363
|
meta?: ReactNode;
|
|
364
|
+
/**
|
|
365
|
+
* Trailing action slot — typically a `Button` or `DropdownMenu` trigger.
|
|
366
|
+
* Rendered as a peer sibling of the row's interactive region.
|
|
367
|
+
*/
|
|
368
|
+
actions?: ReactNode;
|
|
277
369
|
/** When true, hides the leading glyph dot. */
|
|
278
370
|
hideGlyph?: boolean;
|
|
279
371
|
}
|
|
@@ -295,6 +387,12 @@ interface EntityListRowProps extends Omit<HTMLAttributes<HTMLElement>, 'title' |
|
|
|
295
387
|
relation?: ReactNode;
|
|
296
388
|
/** Trailing meta line (e.g., a timestamp). */
|
|
297
389
|
meta?: ReactNode;
|
|
390
|
+
/**
|
|
391
|
+
* Trailing action slot — typically a `Button` or `DropdownMenu` trigger.
|
|
392
|
+
* Rendered as a peer sibling of the row's interactive region so any nested
|
|
393
|
+
* `<button>` in the slot avoids `nested-interactive` a11y failures.
|
|
394
|
+
*/
|
|
395
|
+
actions?: ReactNode;
|
|
298
396
|
/** When provided, the row becomes a clickable button. */
|
|
299
397
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
300
398
|
/** When true, hides the leading glyph dot. */
|
|
@@ -305,7 +403,7 @@ interface EntityListRowProps extends Omit<HTMLAttributes<HTMLElement>, 'title' |
|
|
|
305
403
|
* supplied, otherwise `EntityListRowDiv`. Does not forward refs — when you
|
|
306
404
|
* need a typed ref, reach for the specialized component directly.
|
|
307
405
|
*/
|
|
308
|
-
declare function EntityListRow({ type, name, relation, meta, hideGlyph, onClick, className, ...props }: EntityListRowProps): react_jsx_runtime.JSX.Element;
|
|
406
|
+
declare function EntityListRow({ type, name, relation, meta, hideGlyph, actions, onClick, className, ...props }: EntityListRowProps): react_jsx_runtime.JSX.Element;
|
|
309
407
|
declare namespace EntityListRow {
|
|
310
408
|
var displayName: string;
|
|
311
409
|
}
|
|
@@ -687,4 +785,4 @@ interface NotifRowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
|
687
785
|
}
|
|
688
786
|
declare const NotifRow: react.ForwardRefExoticComponent<NotifRowProps & react.RefAttributes<HTMLDivElement>>;
|
|
689
787
|
|
|
690
|
-
export { AskBar, type AskBarProps, CTAStrip, type CTAStripProps, Citation, type CitationProps, ConfidenceIndicator, type ConfidenceIndicatorProps, type ConfidenceTier, ConnectorCard, type ConnectorCardProps, type ConnectorStatus, CopilotMessage, type CopilotMessageProps, type CopilotRole,
|
|
788
|
+
export { AskBar, type AskBarProps, CTAStrip, type CTAStripProps, Citation, type CitationProps, ConfidenceIndicator, type ConfidenceIndicatorProps, type ConfidenceTier, ConnectorCard, type ConnectorCardProps, type ConnectorStatus, CopilotMessage, type CopilotMessageProps, type CopilotRole, ENTITY_LABEL, ENTITY_TONE_BG, ENTITY_TONE_CLASS, EntityBadge, type EntityBadgeProps, type EntityBadgeVariant, EntityCard, type EntityCardProps, EntityList, type EntityListProps, EntityListRow, EntityListRowButton, type EntityListRowButtonProps, EntityListRowDiv, type EntityListRowDivProps, type EntityListRowProps, type EntityStat, EntityTable, type EntityTableProps, type EntityType, type EntityTypeMeta, type Feature, FeatureGrid, type FeatureGridProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GraphEdge, type GraphEdgeProps, type GraphEdgeStyle, GraphInspector, type GraphInspectorProps, GraphLegend, type GraphLegendEntry, type GraphLegendProps, GraphMinimap, type GraphMinimapProps, GraphNode, type GraphNodeProps, type GraphNodeState, Hero, type HeroProps, type InspectorProperty, type InspectorRelation, type KnownEntityType, type MinimapPoint, type MinimapViewport, NotifRow, type NotifRowProps, type NotifTone, PathOverlay, type PathOverlayProps, type PathPoint, PricingCard, type PricingCardProps, ReasoningBlock, type ReasoningBlockProps, ReasoningStep, type ReasoningStepProps, StalenessChip, type StalenessChipProps, type StalenessTier, SuggestionChip, type SuggestionChipProps, Testimonial, type TestimonialProps, ToolCallCard, type ToolCallCardProps, entityColumn, entityTypeColumn, formatAge, getEntityTypeMeta, listEntityTypes, registerEntityType, registerEntityTypes, resetEntityTypeRegistry };
|
package/dist/index.d.ts
CHANGED
|
@@ -116,6 +116,43 @@ interface ReasoningStepProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
116
116
|
}
|
|
117
117
|
declare const ReasoningStep: react.ForwardRefExoticComponent<ReasoningStepProps & react.RefAttributes<HTMLDivElement>>;
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* StalenessChip — pairs with `ConfidenceIndicator` in the "data trust"
|
|
121
|
+
* component family. Renders a tier-coloured chip with a humanised age
|
|
122
|
+
* ("Updated 3h ago") so consumers can answer "when was this last seen?" at
|
|
123
|
+
* a glance.
|
|
124
|
+
*
|
|
125
|
+
* Tier derivation:
|
|
126
|
+
* ageSeconds ≤ thresholds[0] → `ok` (fresh)
|
|
127
|
+
* ageSeconds ≤ thresholds[1] → `warn` (stale)
|
|
128
|
+
* otherwise → `err` (very stale)
|
|
129
|
+
*
|
|
130
|
+
* Default thresholds: `[3600, 86400]` (1 hour / 24 hours) — knowledge-graph
|
|
131
|
+
* payloads usually fall on those breakpoints. Override per-surface with the
|
|
132
|
+
* `thresholds` prop.
|
|
133
|
+
*/
|
|
134
|
+
type StalenessTier = 'ok' | 'warn' | 'err';
|
|
135
|
+
interface StalenessChipProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'prefix'> {
|
|
136
|
+
/** Age in seconds since the data was last refreshed. Must be non-negative. */
|
|
137
|
+
ageSeconds: number;
|
|
138
|
+
/** `[okMaxSeconds, warnMaxSeconds]`. Defaults to `[3600, 86400]`. */
|
|
139
|
+
thresholds?: readonly [number, number];
|
|
140
|
+
/** Optional leading label, e.g. `"Updated"` → "Updated 3h ago". */
|
|
141
|
+
prefix?: ReactNode;
|
|
142
|
+
/**
|
|
143
|
+
* Optional tooltip body. Rendered via the `SimpleTooltip` convenience —
|
|
144
|
+
* the chip becomes its trigger.
|
|
145
|
+
*/
|
|
146
|
+
tooltip?: ReactNode;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Pure age-to-string formatter. Exported so consumers (and tests) can compose
|
|
150
|
+
* it without rendering the chip. Returns "just now" / "Xm" / "Xh" / "Xd"
|
|
151
|
+
* depending on magnitude. Negative inputs are clamped to 0.
|
|
152
|
+
*/
|
|
153
|
+
declare function formatAge(ageSeconds: number): string;
|
|
154
|
+
declare const StalenessChip: react.ForwardRefExoticComponent<StalenessChipProps & react.RefAttributes<HTMLSpanElement>>;
|
|
155
|
+
|
|
119
156
|
/**
|
|
120
157
|
* SuggestionChip — pill-shaped prompt suggestion. The ✦ glyph prefix signals
|
|
121
158
|
* "ask about this" and matches the AskBar's identity.
|
|
@@ -166,8 +203,17 @@ type EntityType = KnownEntityType | (string & {});
|
|
|
166
203
|
*/
|
|
167
204
|
type EntityBadgeVariant = 'neutral' | 'accent' | 'ok' | 'warn' | 'err' | 'purple' | 'pink';
|
|
168
205
|
interface EntityTypeMeta {
|
|
169
|
-
/**
|
|
170
|
-
|
|
206
|
+
/**
|
|
207
|
+
* Icon name in `@ship-it-ui/icons`. Entity components (`EntityBadge`,
|
|
208
|
+
* `EntityListRow`, `EntityCard`, `GraphNode`, `EntityTable`) and the
|
|
209
|
+
* cytoscape adapter render the SVG icon from `icon-data.ts`. Pass the string
|
|
210
|
+
* name (e.g. `'service'`, `'rocket'`) — type-checking against `GlyphName`
|
|
211
|
+
* happens at the registration call site, not here, to keep this interface
|
|
212
|
+
* importable from packages that don't depend on `@ship-it-ui/icons`. Names
|
|
213
|
+
* not registered in the icon manifest fall back to centered-text rendering
|
|
214
|
+
* inside the icon's SVG, so a typo is visible but won't crash.
|
|
215
|
+
*/
|
|
216
|
+
iconName: string;
|
|
171
217
|
/** Human-readable type name (e.g. `'Service'`). */
|
|
172
218
|
label: string;
|
|
173
219
|
/** Tailwind text-color class for the glyph and accent text. */
|
|
@@ -199,11 +245,6 @@ declare function getEntityTypeMeta(type: EntityType): EntityTypeMeta;
|
|
|
199
245
|
declare function listEntityTypes(): ReadonlyArray<readonly [string, EntityTypeMeta]>;
|
|
200
246
|
/** Test-only helper: drop all consumer registrations and re-seed the built-ins. */
|
|
201
247
|
declare function resetEntityTypeRegistry(): void;
|
|
202
|
-
/**
|
|
203
|
-
* @deprecated Prefer `getEntityTypeMeta(type).glyph`. Retained for the six
|
|
204
|
-
* built-in types so existing consumers keep working.
|
|
205
|
-
*/
|
|
206
|
-
declare const ENTITY_GLYPH: Record<KnownEntityType, string>;
|
|
207
248
|
/** @deprecated Prefer `getEntityTypeMeta(type).label`. */
|
|
208
249
|
declare const ENTITY_LABEL: Record<KnownEntityType, string>;
|
|
209
250
|
/** @deprecated Prefer `getEntityTypeMeta(type).toneClass`. */
|
|
@@ -254,13 +295,59 @@ interface EntityCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>
|
|
|
254
295
|
}
|
|
255
296
|
declare const EntityCard: react.ForwardRefExoticComponent<EntityCardProps & react.RefAttributes<HTMLDivElement>>;
|
|
256
297
|
|
|
298
|
+
/**
|
|
299
|
+
* EntityList — bordered/rounded container for `EntityListRow*` children with
|
|
300
|
+
* auto-dividers and an optional title/subtitle header. Replaces the ad-hoc
|
|
301
|
+
* `<div className="flex flex-col">` wrappers consumers were rolling by hand.
|
|
302
|
+
*
|
|
303
|
+
* When `collapsible` is set, renders a native `<details>`/`<summary>` so the
|
|
304
|
+
* expand/collapse behaviour is zero-JS and screen-reader-correct out of the
|
|
305
|
+
* box. The caret affordance rotates from down→right via CSS when the section
|
|
306
|
+
* is collapsed. Initial state is driven by `defaultCollapsed`; subsequent
|
|
307
|
+
* toggles are tracked in local state via `onToggle` so a parent re-render
|
|
308
|
+
* doesn't snap the disclosure back to its initial position.
|
|
309
|
+
*
|
|
310
|
+
* `ref` is typed as `HTMLElement` because the rendered tag flips between
|
|
311
|
+
* `<section>` and `<details>` based on `collapsible`. Narrow with a runtime
|
|
312
|
+
* `instanceof` check if you need element-specific APIs.
|
|
313
|
+
*
|
|
314
|
+
* NOTE on keyboard navigation: an arrow-key / j-k roving-tabindex scheme is
|
|
315
|
+
* intentionally NOT implemented in this initial version. Wiring focus across
|
|
316
|
+
* children requires either prop-cloning rows or a context they opt into;
|
|
317
|
+
* neither has landed yet and a half-built version would set the wrong
|
|
318
|
+
* expectation. The surface is reserved here — file a follow-up issue when a
|
|
319
|
+
* real consumer needs it.
|
|
320
|
+
*/
|
|
321
|
+
interface EntityListProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
322
|
+
/** Header title rendered above the row list. */
|
|
323
|
+
title?: ReactNode;
|
|
324
|
+
/** Muted subtitle rendered under the title. */
|
|
325
|
+
subtitle?: ReactNode;
|
|
326
|
+
/** Bordered + rounded container framing. Default `true`. */
|
|
327
|
+
framed?: boolean;
|
|
328
|
+
/** Auto-dividers between row children. Default `true`. */
|
|
329
|
+
dividers?: boolean;
|
|
330
|
+
/** Render as a native `<details>`/`<summary>` collapsible group. */
|
|
331
|
+
collapsible?: boolean;
|
|
332
|
+
/** Initial collapsed state when `collapsible`. Default `false`. */
|
|
333
|
+
defaultCollapsed?: boolean;
|
|
334
|
+
children: ReactNode;
|
|
335
|
+
}
|
|
336
|
+
declare const EntityList: react.ForwardRefExoticComponent<EntityListProps & react.RefAttributes<HTMLElement>>;
|
|
337
|
+
|
|
257
338
|
/**
|
|
258
339
|
* EntityListRow — compact row for entity lists (e.g., dependents / dependencies
|
|
259
340
|
* panels on a detail page). Glyph dot + name + optional relation pill +
|
|
260
|
-
* optional trailing meta.
|
|
341
|
+
* optional trailing meta + optional trailing `actions` slot.
|
|
261
342
|
*
|
|
262
343
|
* Renders as a button when `onClick` is supplied; otherwise a plain row.
|
|
263
344
|
*
|
|
345
|
+
* When `actions` is provided, the interactive label region (button or div) is
|
|
346
|
+
* wrapped in an outer container and `actions` renders as a peer sibling — so
|
|
347
|
+
* any nested `<button>` in the slot stays a peer of the row button instead of
|
|
348
|
+
* a descendant (avoiding axe `nested-interactive`). When `actions` is absent,
|
|
349
|
+
* the rendered structure is unchanged from the original single-element form.
|
|
350
|
+
*
|
|
264
351
|
* For strongly-typed refs use the specialized exports `EntityListRowDiv`
|
|
265
352
|
* (non-interactive) and `EntityListRowButton` (interactive). The default
|
|
266
353
|
* `EntityListRow` is a thin wrapper that picks the right underlying element
|
|
@@ -274,6 +361,11 @@ interface EntityListRowCommonProps {
|
|
|
274
361
|
relation?: ReactNode;
|
|
275
362
|
/** Trailing meta line (e.g., a timestamp). */
|
|
276
363
|
meta?: ReactNode;
|
|
364
|
+
/**
|
|
365
|
+
* Trailing action slot — typically a `Button` or `DropdownMenu` trigger.
|
|
366
|
+
* Rendered as a peer sibling of the row's interactive region.
|
|
367
|
+
*/
|
|
368
|
+
actions?: ReactNode;
|
|
277
369
|
/** When true, hides the leading glyph dot. */
|
|
278
370
|
hideGlyph?: boolean;
|
|
279
371
|
}
|
|
@@ -295,6 +387,12 @@ interface EntityListRowProps extends Omit<HTMLAttributes<HTMLElement>, 'title' |
|
|
|
295
387
|
relation?: ReactNode;
|
|
296
388
|
/** Trailing meta line (e.g., a timestamp). */
|
|
297
389
|
meta?: ReactNode;
|
|
390
|
+
/**
|
|
391
|
+
* Trailing action slot — typically a `Button` or `DropdownMenu` trigger.
|
|
392
|
+
* Rendered as a peer sibling of the row's interactive region so any nested
|
|
393
|
+
* `<button>` in the slot avoids `nested-interactive` a11y failures.
|
|
394
|
+
*/
|
|
395
|
+
actions?: ReactNode;
|
|
298
396
|
/** When provided, the row becomes a clickable button. */
|
|
299
397
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
300
398
|
/** When true, hides the leading glyph dot. */
|
|
@@ -305,7 +403,7 @@ interface EntityListRowProps extends Omit<HTMLAttributes<HTMLElement>, 'title' |
|
|
|
305
403
|
* supplied, otherwise `EntityListRowDiv`. Does not forward refs — when you
|
|
306
404
|
* need a typed ref, reach for the specialized component directly.
|
|
307
405
|
*/
|
|
308
|
-
declare function EntityListRow({ type, name, relation, meta, hideGlyph, onClick, className, ...props }: EntityListRowProps): react_jsx_runtime.JSX.Element;
|
|
406
|
+
declare function EntityListRow({ type, name, relation, meta, hideGlyph, actions, onClick, className, ...props }: EntityListRowProps): react_jsx_runtime.JSX.Element;
|
|
309
407
|
declare namespace EntityListRow {
|
|
310
408
|
var displayName: string;
|
|
311
409
|
}
|
|
@@ -687,4 +785,4 @@ interface NotifRowProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
|
687
785
|
}
|
|
688
786
|
declare const NotifRow: react.ForwardRefExoticComponent<NotifRowProps & react.RefAttributes<HTMLDivElement>>;
|
|
689
787
|
|
|
690
|
-
export { AskBar, type AskBarProps, CTAStrip, type CTAStripProps, Citation, type CitationProps, ConfidenceIndicator, type ConfidenceIndicatorProps, type ConfidenceTier, ConnectorCard, type ConnectorCardProps, type ConnectorStatus, CopilotMessage, type CopilotMessageProps, type CopilotRole,
|
|
788
|
+
export { AskBar, type AskBarProps, CTAStrip, type CTAStripProps, Citation, type CitationProps, ConfidenceIndicator, type ConfidenceIndicatorProps, type ConfidenceTier, ConnectorCard, type ConnectorCardProps, type ConnectorStatus, CopilotMessage, type CopilotMessageProps, type CopilotRole, ENTITY_LABEL, ENTITY_TONE_BG, ENTITY_TONE_CLASS, EntityBadge, type EntityBadgeProps, type EntityBadgeVariant, EntityCard, type EntityCardProps, EntityList, type EntityListProps, EntityListRow, EntityListRowButton, type EntityListRowButtonProps, EntityListRowDiv, type EntityListRowDivProps, type EntityListRowProps, type EntityStat, EntityTable, type EntityTableProps, type EntityType, type EntityTypeMeta, type Feature, FeatureGrid, type FeatureGridProps, Footer, type FooterColumn, type FooterLink, type FooterProps, GraphEdge, type GraphEdgeProps, type GraphEdgeStyle, GraphInspector, type GraphInspectorProps, GraphLegend, type GraphLegendEntry, type GraphLegendProps, GraphMinimap, type GraphMinimapProps, GraphNode, type GraphNodeProps, type GraphNodeState, Hero, type HeroProps, type InspectorProperty, type InspectorRelation, type KnownEntityType, type MinimapPoint, type MinimapViewport, NotifRow, type NotifRowProps, type NotifTone, PathOverlay, type PathOverlayProps, type PathPoint, PricingCard, type PricingCardProps, ReasoningBlock, type ReasoningBlockProps, ReasoningStep, type ReasoningStepProps, StalenessChip, type StalenessChipProps, type StalenessTier, SuggestionChip, type SuggestionChipProps, Testimonial, type TestimonialProps, ToolCallCard, type ToolCallCardProps, entityColumn, entityTypeColumn, formatAge, getEntityTypeMeta, listEntityTypes, registerEntityType, registerEntityTypes, resetEntityTypeRegistry };
|