@dloizides/ui-feedback 1.23.0 → 1.25.1
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 +4 -0
- package/dist/index.d.mts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +122 -92
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +121 -93
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.24.0
|
|
4
|
+
|
|
5
|
+
- `UiThemeOverride({ map, children })` (INV-EXTRACT-1 W4, D-EXTRACT-2): re-provides the surrounding UI context with its theme passed through `map`; translate and navigate are kept. Generic over the host's theme type. Showcase story `src/showcase/UiThemeOverride.showcase.tsx`.
|
|
6
|
+
|
|
3
7
|
## 1.23.0
|
|
4
8
|
|
|
5
9
|
- `ToastHost`: `ToastInput.action` (`{ label, hint?, onPress }`, LINKS-1 "Shared short-link service" Undo after delete) renders a 44x44 button (testID `<toastTestID>-action`, accessibilityLabel = label, hint defaults to label); pressing it runs `onPress` and dismisses the toast. Without `action` the toast is unchanged.
|
package/dist/index.d.mts
CHANGED
|
@@ -67,6 +67,13 @@ declare const FeedbackUiProvider: ({ theme, t, navigate, children, }: FeedbackUi
|
|
|
67
67
|
*/
|
|
68
68
|
declare function useFeedbackUi(): FeedbackUiValue;
|
|
69
69
|
|
|
70
|
+
interface UiThemeOverrideProps<T extends FeedbackTheme = FeedbackTheme> {
|
|
71
|
+
map: (theme: T) => FeedbackTheme;
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
}
|
|
74
|
+
/** Re-provides the surrounding UI context with its theme passed through `map`; translate and navigate are kept. */
|
|
75
|
+
declare function UiThemeOverride<T extends FeedbackTheme = FeedbackTheme>({ map, children, }: UiThemeOverrideProps<T>): React.ReactElement;
|
|
76
|
+
|
|
70
77
|
/** Semi-transparent scrim behind modal dialogs. */
|
|
71
78
|
declare const MODAL_OVERLAY_COLOR = "rgba(0, 0, 0, 0.5)";
|
|
72
79
|
/** Opacity applied to disabled interactive controls. */
|
|
@@ -124,6 +131,13 @@ interface ErrorStateProps {
|
|
|
124
131
|
}
|
|
125
132
|
declare const ErrorState: ({ message, onRetry, testID, title, icon, secondaryAction, error, }: ErrorStateProps) => React.ReactElement;
|
|
126
133
|
|
|
134
|
+
interface ErrorNoticeProps {
|
|
135
|
+
children: React.ReactNode;
|
|
136
|
+
testID?: string;
|
|
137
|
+
}
|
|
138
|
+
/** A bordered box in the theme's error colours that announces its lines politely; the caller supplies the lines. */
|
|
139
|
+
declare const ErrorNotice: ({ children, testID }: ErrorNoticeProps) => React.ReactElement;
|
|
140
|
+
|
|
127
141
|
/**
|
|
128
142
|
* EmptyListState - empty-collection message with an optional call-to-action.
|
|
129
143
|
*
|
|
@@ -676,4 +690,4 @@ declare function LiveRunCard(props: LiveRunCardProps): React.ReactElement;
|
|
|
676
690
|
/** The theme colour for a step or group state; falls back to primary/text when a semantic scale is absent. */
|
|
677
691
|
declare function runToneColor(theme: FeedbackTheme, state: RunStepState): string;
|
|
678
692
|
|
|
679
|
-
export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, COPY_FEEDBACK_MS, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, 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, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, 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, 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, mergeRunSteps, notifyWarming, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useFeedbackUi as useUi };
|
|
693
|
+
export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, COPY_FEEDBACK_MS, 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, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, 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, mergeRunSteps, notifyWarming, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useFeedbackUi as useUi };
|
package/dist/index.d.ts
CHANGED
|
@@ -67,6 +67,13 @@ declare const FeedbackUiProvider: ({ theme, t, navigate, children, }: FeedbackUi
|
|
|
67
67
|
*/
|
|
68
68
|
declare function useFeedbackUi(): FeedbackUiValue;
|
|
69
69
|
|
|
70
|
+
interface UiThemeOverrideProps<T extends FeedbackTheme = FeedbackTheme> {
|
|
71
|
+
map: (theme: T) => FeedbackTheme;
|
|
72
|
+
children: React.ReactNode;
|
|
73
|
+
}
|
|
74
|
+
/** Re-provides the surrounding UI context with its theme passed through `map`; translate and navigate are kept. */
|
|
75
|
+
declare function UiThemeOverride<T extends FeedbackTheme = FeedbackTheme>({ map, children, }: UiThemeOverrideProps<T>): React.ReactElement;
|
|
76
|
+
|
|
70
77
|
/** Semi-transparent scrim behind modal dialogs. */
|
|
71
78
|
declare const MODAL_OVERLAY_COLOR = "rgba(0, 0, 0, 0.5)";
|
|
72
79
|
/** Opacity applied to disabled interactive controls. */
|
|
@@ -124,6 +131,13 @@ interface ErrorStateProps {
|
|
|
124
131
|
}
|
|
125
132
|
declare const ErrorState: ({ message, onRetry, testID, title, icon, secondaryAction, error, }: ErrorStateProps) => React.ReactElement;
|
|
126
133
|
|
|
134
|
+
interface ErrorNoticeProps {
|
|
135
|
+
children: React.ReactNode;
|
|
136
|
+
testID?: string;
|
|
137
|
+
}
|
|
138
|
+
/** A bordered box in the theme's error colours that announces its lines politely; the caller supplies the lines. */
|
|
139
|
+
declare const ErrorNotice: ({ children, testID }: ErrorNoticeProps) => React.ReactElement;
|
|
140
|
+
|
|
127
141
|
/**
|
|
128
142
|
* EmptyListState - empty-collection message with an optional call-to-action.
|
|
129
143
|
*
|
|
@@ -676,4 +690,4 @@ declare function LiveRunCard(props: LiveRunCardProps): React.ReactElement;
|
|
|
676
690
|
/** The theme colour for a step or group state; falls back to primary/text when a semantic scale is absent. */
|
|
677
691
|
declare function runToneColor(theme: FeedbackTheme, state: RunStepState): string;
|
|
678
692
|
|
|
679
|
-
export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, COPY_FEEDBACK_MS, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, 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, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, 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, 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, mergeRunSteps, notifyWarming, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useFeedbackUi as useUi };
|
|
693
|
+
export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, COPY_FEEDBACK_MS, 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, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, 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, mergeRunSteps, notifyWarming, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useFeedbackUi as useUi };
|