@dloizides/ui-feedback 1.27.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 +9 -0
- package/dist/index.d.mts +59 -4
- package/dist/index.d.ts +59 -4
- package/dist/index.js +221 -108
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +218 -110
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
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
|
+
|
|
8
|
+
## 1.28.0
|
|
9
|
+
|
|
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.
|
|
11
|
+
|
|
3
12
|
## 1.27.0
|
|
4
13
|
|
|
5
14
|
- `CheckStatus({ title, detail?, status?, variant: tile|row, onPress?, accessibilityLabel, accessibilityHint, testID? })`: one check as a tile or a row; the status pill is a slot; pressable when `onPress` is set (44 px min height).
|
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
|
*
|
|
@@ -744,12 +760,13 @@ interface CheckStatusProps {
|
|
|
744
760
|
detail?: string;
|
|
745
761
|
status?: React.ReactNode;
|
|
746
762
|
variant?: CheckStatusVariant;
|
|
763
|
+
statusUnderTitleEnabled?: boolean;
|
|
747
764
|
onPress?: () => void;
|
|
748
765
|
accessibilityLabel: string;
|
|
749
766
|
accessibilityHint: string;
|
|
750
767
|
testID?: string;
|
|
751
768
|
}
|
|
752
|
-
/** One check as a tile (equal share of a row) or a row (title left, status right); pressing
|
|
769
|
+
/** One check as a tile (equal share of a row) or a row (title left, status right, or under the title); pressing opens it. */
|
|
753
770
|
declare const CheckStatus: (props: CheckStatusProps) => React.ReactElement;
|
|
754
771
|
|
|
755
772
|
interface CheckPipelineItem extends Omit<CheckStatusProps, 'variant'> {
|
|
@@ -761,13 +778,17 @@ interface CheckPipelineProps {
|
|
|
761
778
|
accessibilityLabel: string;
|
|
762
779
|
accessibilityHint: string;
|
|
763
780
|
testID?: string;
|
|
781
|
+
phoneColumns?: number;
|
|
782
|
+
statusUnderTitleEnabled?: boolean;
|
|
764
783
|
}
|
|
765
|
-
/** The checks as equal tiles in one row on a computer
|
|
766
|
-
declare const CheckPipeline: ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID }: CheckPipelineProps) => React.ReactElement;
|
|
784
|
+
/** The checks as equal tiles in one row on a computer; on a phone one row per check, or a tile grid of `phoneColumns`. */
|
|
785
|
+
declare const CheckPipeline: ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID, phoneColumns, statusUnderTitleEnabled }: CheckPipelineProps) => React.ReactElement;
|
|
767
786
|
|
|
768
787
|
declare const PIPELINE_COLLAPSE_BREAKPOINT = 768;
|
|
769
788
|
/** Tiles in one row at or above the breakpoint, one row per check below it. */
|
|
770
789
|
declare function pipelineVariant(width: number, breakpoint?: number): CheckStatusVariant;
|
|
790
|
+
/** The variant each check takes: a phone grid of more than one column keeps tiles, else the pipeline variant. */
|
|
791
|
+
declare function pipelineItemVariant(width: number, breakpoint?: number, phoneColumns?: number): CheckStatusVariant;
|
|
771
792
|
|
|
772
793
|
interface ThresholdMeterProps {
|
|
773
794
|
value: number;
|
|
@@ -799,4 +820,38 @@ interface AttentionCardProps {
|
|
|
799
820
|
/** The one item that needs a person first: its name and status, a line on why, optional evidence and the next action. */
|
|
800
821
|
declare const AttentionCard: ({ title, heading, status, message, evidence, action, testID }: AttentionCardProps) => React.ReactElement;
|
|
801
822
|
|
|
802
|
-
|
|
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
|
*
|
|
@@ -744,12 +760,13 @@ interface CheckStatusProps {
|
|
|
744
760
|
detail?: string;
|
|
745
761
|
status?: React.ReactNode;
|
|
746
762
|
variant?: CheckStatusVariant;
|
|
763
|
+
statusUnderTitleEnabled?: boolean;
|
|
747
764
|
onPress?: () => void;
|
|
748
765
|
accessibilityLabel: string;
|
|
749
766
|
accessibilityHint: string;
|
|
750
767
|
testID?: string;
|
|
751
768
|
}
|
|
752
|
-
/** One check as a tile (equal share of a row) or a row (title left, status right); pressing
|
|
769
|
+
/** One check as a tile (equal share of a row) or a row (title left, status right, or under the title); pressing opens it. */
|
|
753
770
|
declare const CheckStatus: (props: CheckStatusProps) => React.ReactElement;
|
|
754
771
|
|
|
755
772
|
interface CheckPipelineItem extends Omit<CheckStatusProps, 'variant'> {
|
|
@@ -761,13 +778,17 @@ interface CheckPipelineProps {
|
|
|
761
778
|
accessibilityLabel: string;
|
|
762
779
|
accessibilityHint: string;
|
|
763
780
|
testID?: string;
|
|
781
|
+
phoneColumns?: number;
|
|
782
|
+
statusUnderTitleEnabled?: boolean;
|
|
764
783
|
}
|
|
765
|
-
/** The checks as equal tiles in one row on a computer
|
|
766
|
-
declare const CheckPipeline: ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID }: CheckPipelineProps) => React.ReactElement;
|
|
784
|
+
/** The checks as equal tiles in one row on a computer; on a phone one row per check, or a tile grid of `phoneColumns`. */
|
|
785
|
+
declare const CheckPipeline: ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID, phoneColumns, statusUnderTitleEnabled }: CheckPipelineProps) => React.ReactElement;
|
|
767
786
|
|
|
768
787
|
declare const PIPELINE_COLLAPSE_BREAKPOINT = 768;
|
|
769
788
|
/** Tiles in one row at or above the breakpoint, one row per check below it. */
|
|
770
789
|
declare function pipelineVariant(width: number, breakpoint?: number): CheckStatusVariant;
|
|
790
|
+
/** The variant each check takes: a phone grid of more than one column keeps tiles, else the pipeline variant. */
|
|
791
|
+
declare function pipelineItemVariant(width: number, breakpoint?: number, phoneColumns?: number): CheckStatusVariant;
|
|
771
792
|
|
|
772
793
|
interface ThresholdMeterProps {
|
|
773
794
|
value: number;
|
|
@@ -799,4 +820,38 @@ interface AttentionCardProps {
|
|
|
799
820
|
/** The one item that needs a person first: its name and status, a line on why, optional evidence and the next action. */
|
|
800
821
|
declare const AttentionCard: ({ title, heading, status, message, evidence, action, testID }: AttentionCardProps) => React.ReactElement;
|
|
801
822
|
|
|
802
|
-
|
|
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 };
|