@dloizides/ui-feedback 1.28.0 → 1.29.0
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/CHANGELOG.md +5 -0
- package/dist/index.d.mts +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +201 -105
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -107
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.29.0
|
|
4
|
+
|
|
5
|
+
- `SkeletonLines({ lines, ... })`: a busy stack of caller-sized shimmer bars so a loading tile keeps its content's height.
|
|
6
|
+
- `StatusTile({ title, icon?, status?, lines, accentColor?, onPress?, accessibilityLabel, accessibilityHint, testID? })`: status tile with hover, press and focus motion (lift, shadow, border tone, <= 200 ms, reduced motion respected); `tileMotionStyle` exported.
|
|
7
|
+
|
|
3
8
|
## 1.28.0
|
|
4
9
|
|
|
5
10
|
- `CheckPipeline` `phoneColumns?`: below the breakpoint the checks become a tile grid of that many columns (default 1 = one row per check). `statusUnderTitleEnabled?` puts each status pill under the check name. `CheckStatus` gains `statusUnderTitleEnabled?`; `pipelineItemVariant(width, breakpoint, phoneColumns)` exported.
|
package/dist/index.d.mts
CHANGED
|
@@ -89,6 +89,7 @@ declare const FEEDBACK_TEST_IDS: {
|
|
|
89
89
|
readonly emptyListCta: "empty-list-cta";
|
|
90
90
|
readonly loadingFallback: "loading-fallback";
|
|
91
91
|
readonly pageSkeleton: "page-skeleton";
|
|
92
|
+
readonly skeletonLines: "skeleton-lines";
|
|
92
93
|
readonly confirmDialog: "confirm-dialog";
|
|
93
94
|
readonly confirmButton: "confirm-button";
|
|
94
95
|
readonly cancelConfirmButton: "cancel-confirm-button";
|
|
@@ -193,6 +194,21 @@ interface PageSkeletonProps {
|
|
|
193
194
|
}
|
|
194
195
|
declare const PageSkeleton: React.FC<PageSkeletonProps>;
|
|
195
196
|
|
|
197
|
+
/** One placeholder bar: its height in px, its width (px or percent) and its corner radius. */
|
|
198
|
+
interface SkeletonLine {
|
|
199
|
+
height: number;
|
|
200
|
+
width?: number | string;
|
|
201
|
+
radius?: number;
|
|
202
|
+
}
|
|
203
|
+
interface SkeletonLinesProps {
|
|
204
|
+
lines: readonly SkeletonLine[];
|
|
205
|
+
gap?: number;
|
|
206
|
+
style?: StyleProp<ViewStyle>;
|
|
207
|
+
testID?: string;
|
|
208
|
+
}
|
|
209
|
+
/** A busy stack of shimmer bars sized by the caller, so a loading tile keeps the height of the content it stands in for. */
|
|
210
|
+
declare const SkeletonLines: ({ lines, gap, style, testID }: SkeletonLinesProps) => React.ReactElement;
|
|
211
|
+
|
|
196
212
|
/**
|
|
197
213
|
* AsyncSurface — the load / error / loaded contract every data screen shares, resolved once.
|
|
198
214
|
*
|
|
@@ -804,4 +820,38 @@ interface AttentionCardProps {
|
|
|
804
820
|
/** The one item that needs a person first: its name and status, a line on why, optional evidence and the next action. */
|
|
805
821
|
declare const AttentionCard: ({ title, heading, status, message, evidence, action, testID }: AttentionCardProps) => React.ReactElement;
|
|
806
822
|
|
|
807
|
-
|
|
823
|
+
interface StatusTileProps {
|
|
824
|
+
title: string;
|
|
825
|
+
icon?: React.ReactNode;
|
|
826
|
+
status?: React.ReactNode;
|
|
827
|
+
lines: readonly string[];
|
|
828
|
+
accentColor?: string;
|
|
829
|
+
onPress?: () => void;
|
|
830
|
+
accessibilityLabel: string;
|
|
831
|
+
accessibilityHint: string;
|
|
832
|
+
testID?: string;
|
|
833
|
+
}
|
|
834
|
+
/** A status tile with title, status chip, result line and meta line that lifts on hover and focus. */
|
|
835
|
+
declare const StatusTile: ({ title, icon, status, lines, accentColor, onPress, accessibilityLabel, accessibilityHint, testID }: StatusTileProps) => React.ReactElement;
|
|
836
|
+
|
|
837
|
+
declare const TILE_MOTION_MS = 160;
|
|
838
|
+
interface TileInteraction {
|
|
839
|
+
hovered: boolean;
|
|
840
|
+
pressed: boolean;
|
|
841
|
+
focused: boolean;
|
|
842
|
+
}
|
|
843
|
+
interface TileMotionInput {
|
|
844
|
+
interaction: TileInteraction;
|
|
845
|
+
reduced: boolean;
|
|
846
|
+
interactive: boolean;
|
|
847
|
+
accentColor?: string;
|
|
848
|
+
}
|
|
849
|
+
type TileMotionStyle = ViewStyle & {
|
|
850
|
+
transitionDuration?: string;
|
|
851
|
+
transitionProperty?: string;
|
|
852
|
+
transitionTimingFunction?: string;
|
|
853
|
+
};
|
|
854
|
+
/** The style a pressable tile takes for its hover, press and focus state under the user's motion setting. */
|
|
855
|
+
declare function tileMotionStyle(theme: FeedbackTheme, input: TileMotionInput): TileMotionStyle;
|
|
856
|
+
|
|
857
|
+
export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, AttentionCard, type AttentionCardProps, COPY_FEEDBACK_MS, CheckPipeline, type CheckPipelineItem, type CheckPipelineProps, CheckStatus, type CheckStatusProps, type CheckStatusVariant, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, ErrorNotice, type ErrorNoticeProps, ErrorReferenceRow, type ErrorReferenceRowProps, ErrorState, type ErrorStateAction, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackThemeSemanticText, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, type FlatRunStep, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, type LiveRunCardLabels, type LiveRunCardProps, LoadingFallback, type LoadingFallbackProps, LocalModelGate, type LocalModelGateLabels, type LocalModelGateProps, type LocalModelGateSlots, type LocalModelGateTestIds, MODAL_OVERLAY_COLOR, PIPELINE_COLLAPSE_BREAKPOINT, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type SkeletonLine, SkeletonLines, type SkeletonLinesProps, StatusTile, type StatusTileProps, type StepSplit, TILE_MOTION_MS, ThresholdMeter, type ThresholdMeterProps, type TileInteraction, type TileMotionInput, type TileMotionStyle, type ToastActionSpec, type ToastBus, ToastHost, type ToastHostProps, type ToastInput, type ToastPush, type ToastType, type FeedbackColorScale as UiColorScale, type FeedbackNavigate as UiNavigate, FeedbackUiProvider as UiProvider, type FeedbackUiProviderProps as UiProviderProps, type FeedbackTheme as UiTheme, type FeedbackThemeColors as UiThemeColors, UiThemeOverride, type UiThemeOverrideProps, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackThemeSemanticText as UiThemeSemanticText, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, WARMING_QUIET_PERIOD_MS, type WarmingInfo, WarmingOverlay, type WarmingOverlayLabels, type WarmingOverlayProps, type WarmingSnapshot, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, meetsThreshold, mergeRunSteps, meterPercent, notifyWarming, pipelineItemVariant, pipelineVariant, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, tileMotionStyle, useCopyToClipboard, useFeedbackUi, useLocalModel, useFeedbackUi as useUi };
|
package/dist/index.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ declare const FEEDBACK_TEST_IDS: {
|
|
|
89
89
|
readonly emptyListCta: "empty-list-cta";
|
|
90
90
|
readonly loadingFallback: "loading-fallback";
|
|
91
91
|
readonly pageSkeleton: "page-skeleton";
|
|
92
|
+
readonly skeletonLines: "skeleton-lines";
|
|
92
93
|
readonly confirmDialog: "confirm-dialog";
|
|
93
94
|
readonly confirmButton: "confirm-button";
|
|
94
95
|
readonly cancelConfirmButton: "cancel-confirm-button";
|
|
@@ -193,6 +194,21 @@ interface PageSkeletonProps {
|
|
|
193
194
|
}
|
|
194
195
|
declare const PageSkeleton: React.FC<PageSkeletonProps>;
|
|
195
196
|
|
|
197
|
+
/** One placeholder bar: its height in px, its width (px or percent) and its corner radius. */
|
|
198
|
+
interface SkeletonLine {
|
|
199
|
+
height: number;
|
|
200
|
+
width?: number | string;
|
|
201
|
+
radius?: number;
|
|
202
|
+
}
|
|
203
|
+
interface SkeletonLinesProps {
|
|
204
|
+
lines: readonly SkeletonLine[];
|
|
205
|
+
gap?: number;
|
|
206
|
+
style?: StyleProp<ViewStyle>;
|
|
207
|
+
testID?: string;
|
|
208
|
+
}
|
|
209
|
+
/** A busy stack of shimmer bars sized by the caller, so a loading tile keeps the height of the content it stands in for. */
|
|
210
|
+
declare const SkeletonLines: ({ lines, gap, style, testID }: SkeletonLinesProps) => React.ReactElement;
|
|
211
|
+
|
|
196
212
|
/**
|
|
197
213
|
* AsyncSurface — the load / error / loaded contract every data screen shares, resolved once.
|
|
198
214
|
*
|
|
@@ -804,4 +820,38 @@ interface AttentionCardProps {
|
|
|
804
820
|
/** The one item that needs a person first: its name and status, a line on why, optional evidence and the next action. */
|
|
805
821
|
declare const AttentionCard: ({ title, heading, status, message, evidence, action, testID }: AttentionCardProps) => React.ReactElement;
|
|
806
822
|
|
|
807
|
-
|
|
823
|
+
interface StatusTileProps {
|
|
824
|
+
title: string;
|
|
825
|
+
icon?: React.ReactNode;
|
|
826
|
+
status?: React.ReactNode;
|
|
827
|
+
lines: readonly string[];
|
|
828
|
+
accentColor?: string;
|
|
829
|
+
onPress?: () => void;
|
|
830
|
+
accessibilityLabel: string;
|
|
831
|
+
accessibilityHint: string;
|
|
832
|
+
testID?: string;
|
|
833
|
+
}
|
|
834
|
+
/** A status tile with title, status chip, result line and meta line that lifts on hover and focus. */
|
|
835
|
+
declare const StatusTile: ({ title, icon, status, lines, accentColor, onPress, accessibilityLabel, accessibilityHint, testID }: StatusTileProps) => React.ReactElement;
|
|
836
|
+
|
|
837
|
+
declare const TILE_MOTION_MS = 160;
|
|
838
|
+
interface TileInteraction {
|
|
839
|
+
hovered: boolean;
|
|
840
|
+
pressed: boolean;
|
|
841
|
+
focused: boolean;
|
|
842
|
+
}
|
|
843
|
+
interface TileMotionInput {
|
|
844
|
+
interaction: TileInteraction;
|
|
845
|
+
reduced: boolean;
|
|
846
|
+
interactive: boolean;
|
|
847
|
+
accentColor?: string;
|
|
848
|
+
}
|
|
849
|
+
type TileMotionStyle = ViewStyle & {
|
|
850
|
+
transitionDuration?: string;
|
|
851
|
+
transitionProperty?: string;
|
|
852
|
+
transitionTimingFunction?: string;
|
|
853
|
+
};
|
|
854
|
+
/** The style a pressable tile takes for its hover, press and focus state under the user's motion setting. */
|
|
855
|
+
declare function tileMotionStyle(theme: FeedbackTheme, input: TileMotionInput): TileMotionStyle;
|
|
856
|
+
|
|
857
|
+
export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, AttentionCard, type AttentionCardProps, COPY_FEEDBACK_MS, CheckPipeline, type CheckPipelineItem, type CheckPipelineProps, CheckStatus, type CheckStatusProps, type CheckStatusVariant, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, ErrorNotice, type ErrorNoticeProps, ErrorReferenceRow, type ErrorReferenceRowProps, ErrorState, type ErrorStateAction, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackThemeSemanticText, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, type FlatRunStep, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, type LiveRunCardLabels, type LiveRunCardProps, LoadingFallback, type LoadingFallbackProps, LocalModelGate, type LocalModelGateLabels, type LocalModelGateProps, type LocalModelGateSlots, type LocalModelGateTestIds, MODAL_OVERLAY_COLOR, PIPELINE_COLLAPSE_BREAKPOINT, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type SkeletonLine, SkeletonLines, type SkeletonLinesProps, StatusTile, type StatusTileProps, type StepSplit, TILE_MOTION_MS, ThresholdMeter, type ThresholdMeterProps, type TileInteraction, type TileMotionInput, type TileMotionStyle, type ToastActionSpec, type ToastBus, ToastHost, type ToastHostProps, type ToastInput, type ToastPush, type ToastType, type FeedbackColorScale as UiColorScale, type FeedbackNavigate as UiNavigate, FeedbackUiProvider as UiProvider, type FeedbackUiProviderProps as UiProviderProps, type FeedbackTheme as UiTheme, type FeedbackThemeColors as UiThemeColors, UiThemeOverride, type UiThemeOverrideProps, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackThemeSemanticText as UiThemeSemanticText, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, WARMING_QUIET_PERIOD_MS, type WarmingInfo, WarmingOverlay, type WarmingOverlayLabels, type WarmingOverlayProps, type WarmingSnapshot, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, meetsThreshold, mergeRunSteps, meterPercent, notifyWarming, pipelineItemVariant, pipelineVariant, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, tileMotionStyle, useCopyToClipboard, useFeedbackUi, useLocalModel, useFeedbackUi as useUi };
|