@mt-gloss/ui 0.1.24 → 0.1.27
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/{Expandable-BYIgk5cN.js → Expandable-D7_L8KoV.js} +1437 -1432
- package/catalog.js +50 -50
- package/index.d.ts +2 -0
- package/index.js +1646 -1304
- package/lib/primitives/TargetInput/TargetInput.d.ts +16 -0
- package/lib/primitives/TargetInput/index.d.ts +2 -0
- package/lib/primitives/dashboard/LensChipGroup/LensChipGroup.d.ts +19 -0
- package/lib/primitives/dashboard/LensChipGroup/index.d.ts +2 -0
- package/lib/primitives/dashboard/MetricCard/CardShell.d.ts +1 -1
- package/lib/primitives/dashboard/MetricCard/types.d.ts +25 -0
- package/lib/primitives/dashboard/MoreInLensRail/MoreInLensRail.d.ts +13 -0
- package/lib/primitives/dashboard/MoreInLensRail/index.d.ts +2 -0
- package/lib/primitives/dashboard/PaceCard/DualPaceBars/DualPaceBars.d.ts +15 -0
- package/lib/primitives/dashboard/PaceCard/DualPaceBars/index.d.ts +2 -0
- package/lib/primitives/dashboard/PaceCard/GapReadout/GapReadout.d.ts +9 -0
- package/lib/primitives/dashboard/PaceCard/GapReadout/index.d.ts +2 -0
- package/lib/primitives/dashboard/PaceCard/PaceCard.d.ts +24 -0
- package/lib/primitives/dashboard/PaceCard/PacePlaceholder.d.ts +7 -0
- package/lib/primitives/dashboard/PaceCard/PaceTilePreview.d.ts +2 -0
- package/lib/primitives/dashboard/StarterRail/StarterRail.d.ts +11 -0
- package/lib/primitives/dashboard/StarterRail/index.d.ts +2 -0
- package/lib/primitives/dashboard/index.d.ts +10 -0
- package/lib/primitives/dashboard/rows/EntityRow.d.ts +17 -0
- package/lib/primitives/dashboard/rows/MagnitudeBar.d.ts +10 -0
- package/lib/primitives/dashboard/rows/RankBadge.d.ts +5 -0
- package/lib/primitives/dashboard/rows/RankDelta.d.ts +10 -0
- package/lib/primitives/dashboard/rows/SeverityDot.d.ts +9 -0
- package/lib/primitives/dashboard/rows/index.d.ts +10 -0
- package/package.json +1 -1
- package/ui.css +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TargetInputProps {
|
|
3
|
+
/** Field label. Default: "Set a target". */
|
|
4
|
+
label?: string;
|
|
5
|
+
/** Unit suffix rendered next to the input ("$", "%", "units", ...). */
|
|
6
|
+
unit?: string;
|
|
7
|
+
/** Pre-fills the input for re-edit. */
|
|
8
|
+
currentValue?: number;
|
|
9
|
+
/** Fires on Confirm click or Enter key, with the parsed numeric value. */
|
|
10
|
+
onConfirm: (value: number) => void;
|
|
11
|
+
/** Fires on Skip click or Esc key. When undefined, Skip button is hidden. */
|
|
12
|
+
onSkip?: () => void;
|
|
13
|
+
/** Optional guidance rendered below the input. */
|
|
14
|
+
hint?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const TargetInput: React.FC<TargetInputProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** GlossUI LensChipGroup type contracts. No context, BFF, or dashboard-specific imports. */
|
|
2
|
+
export interface LensChipItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** e.g. "BETA" rendered as 10px uppercase inline tag right of label */
|
|
6
|
+
badge?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface LensChipGroupProps {
|
|
10
|
+
lenses: LensChipItem[];
|
|
11
|
+
/** selected lens id */
|
|
12
|
+
value: string;
|
|
13
|
+
onChange: (id: string) => void;
|
|
14
|
+
'aria-label'?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function LensChipGroup({ lenses, value, onChange, 'aria-label': ariaLabel, }: LensChipGroupProps): import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export declare namespace LensChipGroup {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
@@ -17,6 +17,6 @@ import { CardShellProps } from './types';
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
export declare const CardShell: {
|
|
20
|
-
({ contentSlot, children, colSpan, isStale, isRetrying, beta, disabled, style, accentRing, onGraph, onDetails, onCustomize, onRemove, onWhatsThis, onExpand, onShrink, onMove, onReplace, onNavigate, onRetry, onRefresh, enableQuickSettings, onUpdateTimeframe, instanceTimeframe, cardTitle, quickConfigSlot, onViewAsStack, onUnstack, isStackedGroup, onUpdateStackedTimeframes, instanceStackedTimeframes, isGraphActive, isTableActive, isGraphCard, canExpand, anchorX, extensionOverflow, cardRef: externalCardRef, hovered, forceHide, }: CardShellProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
({ contentSlot, children, colSpan, isStale, isRetrying, beta, disabled, style, accentRing, onGraph, onDetails, onCustomize, onRemove, onWhatsThis, onExpand, onShrink, onMove, onReplace, onNavigate, onRetry, onRefresh, enableQuickSettings, onUpdateTimeframe, instanceTimeframe, cardTitle, quickConfigSlot, onViewAsStack, onUnstack, isStackedGroup, onUpdateStackedTimeframes, instanceStackedTimeframes, isGraphActive, isTableActive, isGraphCard, canExpand, anchorX, extensionOverflow, cardRef: externalCardRef, hovered, forceHide, isFlipped, onFlipChange, }: CardShellProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
displayName: string;
|
|
22
22
|
};
|
|
@@ -185,6 +185,31 @@ export interface CardShellProps {
|
|
|
185
185
|
onUpdateTimeframe?: (presetId: string) => void;
|
|
186
186
|
instanceTimeframe?: string;
|
|
187
187
|
cardTitle?: string;
|
|
188
|
+
/**
|
|
189
|
+
* Controlled flip state. When undefined (default), CardShell manages flip
|
|
190
|
+
* internally via useState (backward-compat — existing consumers unchanged).
|
|
191
|
+
*
|
|
192
|
+
* When provided, the parent owns the flip state. CardShell renders the
|
|
193
|
+
* derived `effectiveFlipped = isFlipped ?? internalFlipped` for both faces
|
|
194
|
+
* and does NOT mutate internal state; instead it delegates flip transitions
|
|
195
|
+
* to `onFlipChange`.
|
|
196
|
+
*
|
|
197
|
+
* Phase 4 (PaceCard): PacePlaceholder's "Set target" CTA needs a flip trigger
|
|
198
|
+
* path outside the overflow menu; controlled prop enables this without a
|
|
199
|
+
* CardShell API break for existing consumers (MetricCard, NameCard, etc.).
|
|
200
|
+
*/
|
|
201
|
+
isFlipped?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Fires on every flip transition request when `isFlipped` is controlled.
|
|
204
|
+
* Not called in uncontrolled mode (undefined isFlipped). The argument is the
|
|
205
|
+
* target flip state (`true` = back face requested, `false` = front face).
|
|
206
|
+
*
|
|
207
|
+
* When invoked from the back→front (handleFlipBack) path, the staged
|
|
208
|
+
* timeframe commit chain still fires before onFlipChange — consumers receive
|
|
209
|
+
* the updated timeframe via onUpdateTimeframe / onUpdateStackedTimeframes
|
|
210
|
+
* regardless of controlled or uncontrolled mode.
|
|
211
|
+
*/
|
|
212
|
+
onFlipChange?: (flipped: boolean) => void;
|
|
188
213
|
/**
|
|
189
214
|
* Custom content rendered inside the flip-back face, replacing the default
|
|
190
215
|
* <CardBack> timeframe preset grid. Use for consumer-specific quick-config
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** GlossUI MoreInLensRail type contracts. No context, BFF, or dashboard-specific imports. */
|
|
3
|
+
export interface MoreInLensRailProps {
|
|
4
|
+
/** e.g. "All metrics in this lens" */
|
|
5
|
+
heading: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/** Optional copy shown only when children is empty/null. Caller usually suppresses at caller level instead. */
|
|
8
|
+
emptyStateLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function MoreInLensRail({ heading, children, emptyStateLabel }: MoreInLensRailProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare namespace MoreInLensRail {
|
|
12
|
+
var displayName: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type SeverityState = 'neutral' | 'good' | 'warn' | 'bad';
|
|
3
|
+
export interface DualPaceBarsProps {
|
|
4
|
+
consumed: {
|
|
5
|
+
value: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
elapsed: {
|
|
9
|
+
value: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
};
|
|
12
|
+
/** Drives consumed bar color via BEM modifier. Defaults to 'neutral'. */
|
|
13
|
+
severity?: SeverityState;
|
|
14
|
+
}
|
|
15
|
+
export declare const DualPaceBars: React.FC<DualPaceBarsProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type GapSeverity = 'neutral' | 'good' | 'warn' | 'bad';
|
|
3
|
+
export interface GapReadoutProps {
|
|
4
|
+
label: string;
|
|
5
|
+
/** Pre-formatted value string, rendered verbatim (e.g., "+18% ahead", "−$8K over"). */
|
|
6
|
+
value: string;
|
|
7
|
+
severity: GapSeverity;
|
|
8
|
+
}
|
|
9
|
+
export declare const GapReadout: React.FC<GapReadoutProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PaceCardProps {
|
|
3
|
+
label: string;
|
|
4
|
+
consumed: {
|
|
5
|
+
value: number;
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
elapsed: {
|
|
9
|
+
value: number;
|
|
10
|
+
label?: string;
|
|
11
|
+
};
|
|
12
|
+
target?: {
|
|
13
|
+
value?: number;
|
|
14
|
+
};
|
|
15
|
+
severity: 'neutral' | 'good' | 'warn' | 'bad';
|
|
16
|
+
/** Pre-formatted gap string from formatPaceGap (e.g. "+18% ahead"). */
|
|
17
|
+
gapLabel: string;
|
|
18
|
+
/** Unit suffix passed through to TargetInput ("%" or "$"). Default: "pct" → "%". */
|
|
19
|
+
paceGapUnit?: 'pct' | 'usd';
|
|
20
|
+
onTargetChange: (value: number) => void;
|
|
21
|
+
onTargetSkip?: () => void;
|
|
22
|
+
isStale?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const PaceCard: React.FC<PaceCardProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** GlossUI StarterRail type contracts. No context, BFF, or dashboard-specific imports. */
|
|
3
|
+
export interface StarterRailProps {
|
|
4
|
+
/** D-13 pattern: "Starter set · {lens.question}" — e.g. "Starter set · Am I overbought?" */
|
|
5
|
+
heading: string;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export declare function StarterRail({ heading, children }: StarterRailProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare namespace StarterRail {
|
|
10
|
+
var displayName: string;
|
|
11
|
+
}
|
|
@@ -21,4 +21,14 @@ export * from './DragGhost';
|
|
|
21
21
|
export * from './SnapOutline';
|
|
22
22
|
export * from './CascadePreview';
|
|
23
23
|
export * from './SwingReveal';
|
|
24
|
+
export { PaceCard } from './PaceCard/PaceCard';
|
|
25
|
+
export type { PaceCardProps } from './PaceCard/PaceCard';
|
|
26
|
+
export { PaceTilePreview } from './PaceCard/PaceTilePreview';
|
|
27
|
+
export { DualPaceBars } from './PaceCard/DualPaceBars';
|
|
28
|
+
export type { DualPaceBarsProps, SeverityState } from './PaceCard/DualPaceBars';
|
|
29
|
+
export { GapReadout } from './PaceCard/GapReadout';
|
|
30
|
+
export type { GapReadoutProps, GapSeverity } from './PaceCard/GapReadout';
|
|
31
|
+
export * from './LensChipGroup';
|
|
32
|
+
export * from './StarterRail';
|
|
33
|
+
export * from './MoreInLensRail';
|
|
24
34
|
export * from './gridMotionPrimitives';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface EntityRowProps {
|
|
3
|
+
lead?: React.ReactNode;
|
|
4
|
+
name: string;
|
|
5
|
+
secondary?: React.ReactNode;
|
|
6
|
+
value: React.ReactNode;
|
|
7
|
+
trail?: React.ReactNode;
|
|
8
|
+
variant?: 'leaderboard' | 'exception' | 'default';
|
|
9
|
+
onClick?: () => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Consumers set style={{ ['--i' as string]: rowIndex }} for stagger animation */
|
|
12
|
+
style?: React.CSSProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare function EntityRow({ lead, name, secondary, value, trail, variant, onClick, className, style, }: EntityRowProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare namespace EntityRow {
|
|
16
|
+
var displayName: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface MagnitudeBarProps {
|
|
2
|
+
/** Fill percentage, 0-100 (clamped) */
|
|
3
|
+
fill: number;
|
|
4
|
+
variant?: 'default' | 'bottom' | 'neutral';
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function MagnitudeBar({ fill, variant, className }: MagnitudeBarProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace MagnitudeBar {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface RankDeltaProps {
|
|
2
|
+
delta: number | 'new';
|
|
3
|
+
direction?: 'up' | 'down' | 'flat';
|
|
4
|
+
/** REQUIRED — TS-enforced */
|
|
5
|
+
'aria-label': string;
|
|
6
|
+
}
|
|
7
|
+
export declare function RankDelta({ delta, direction, 'aria-label': ariaLabel, }: RankDeltaProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare namespace RankDelta {
|
|
9
|
+
var displayName: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SeverityDotProps {
|
|
2
|
+
severity: 'info' | 'warn' | 'critical';
|
|
3
|
+
/** REQUIRED — TS-enforced; missing prop fails tsc */
|
|
4
|
+
'aria-label': string;
|
|
5
|
+
}
|
|
6
|
+
export declare function SeverityDot({ severity, 'aria-label': ariaLabel }: SeverityDotProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace SeverityDot {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { EntityRow } from './EntityRow';
|
|
2
|
+
export type { EntityRowProps } from './EntityRow';
|
|
3
|
+
export { RankBadge } from './RankBadge';
|
|
4
|
+
export type { RankBadgeProps } from './RankBadge';
|
|
5
|
+
export { SeverityDot } from './SeverityDot';
|
|
6
|
+
export type { SeverityDotProps } from './SeverityDot';
|
|
7
|
+
export { RankDelta } from './RankDelta';
|
|
8
|
+
export type { RankDeltaProps } from './RankDelta';
|
|
9
|
+
export { MagnitudeBar } from './MagnitudeBar';
|
|
10
|
+
export type { MagnitudeBarProps } from './MagnitudeBar';
|