@dloizides/ui-feedback 1.27.0 → 1.28.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 +4 -0
- package/dist/index.d.mts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +22 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1850,21 +1850,23 @@ var DETAIL_FONT = 12;
|
|
|
1850
1850
|
var styles19 = StyleSheet.create({
|
|
1851
1851
|
detail: { fontSize: DETAIL_FONT },
|
|
1852
1852
|
row: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" },
|
|
1853
|
+
statusUnder: { alignSelf: "flex-start" },
|
|
1853
1854
|
tile: { flexBasis: 0, flexGrow: 1, minWidth: 0 },
|
|
1854
1855
|
title: { fontSize: TITLE_FONT, fontWeight: "600" },
|
|
1855
1856
|
words: { flexShrink: 1, gap: 2 },
|
|
1856
1857
|
wrap: { borderRadius: RADIUS2, borderWidth: 1, gap: GAP, minHeight: MIN_HIT, padding: PAD }
|
|
1857
1858
|
});
|
|
1858
1859
|
var CheckStatus = (props) => {
|
|
1859
|
-
const { title, detail, status, variant = "tile", onPress, accessibilityLabel, accessibilityHint, testID } = props;
|
|
1860
|
+
const { title, detail, status, variant = "tile", statusUnderTitleEnabled = false, onPress, accessibilityLabel, accessibilityHint, testID } = props;
|
|
1860
1861
|
const { theme } = useFeedbackUi();
|
|
1861
1862
|
const style = [styles19.wrap, variant === "tile" ? styles19.tile : styles19.row, { backgroundColor: theme.colors.surface, borderColor: theme.colors.border }];
|
|
1862
1863
|
const body = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1863
1864
|
/* @__PURE__ */ jsxs(View, { style: styles19.words, children: [
|
|
1864
1865
|
/* @__PURE__ */ jsx(Text, { style: [styles19.title, { color: theme.colors.text }], children: title }),
|
|
1866
|
+
statusUnderTitleEnabled ? /* @__PURE__ */ jsx(View, { style: styles19.statusUnder, children: status }) : null,
|
|
1865
1867
|
detail === void 0 ? null : /* @__PURE__ */ jsx(Text, { style: [styles19.detail, { color: theme.colors.textSecondary }], children: detail })
|
|
1866
1868
|
] }),
|
|
1867
|
-
status
|
|
1869
|
+
statusUnderTitleEnabled ? null : status
|
|
1868
1870
|
] });
|
|
1869
1871
|
if (onPress === void 0) {
|
|
1870
1872
|
return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityLabel, style, testID, children: body });
|
|
@@ -1877,13 +1879,27 @@ var PIPELINE_COLLAPSE_BREAKPOINT = 768;
|
|
|
1877
1879
|
function pipelineVariant(width, breakpoint = PIPELINE_COLLAPSE_BREAKPOINT) {
|
|
1878
1880
|
return width >= breakpoint ? "tile" : "row";
|
|
1879
1881
|
}
|
|
1882
|
+
function pipelineItemVariant(width, breakpoint = PIPELINE_COLLAPSE_BREAKPOINT, phoneColumns = 1) {
|
|
1883
|
+
const variant = pipelineVariant(width, breakpoint);
|
|
1884
|
+
return variant === "row" && phoneColumns > 1 ? "tile" : variant;
|
|
1885
|
+
}
|
|
1886
|
+
var GRID_GAP_SHARE = 2;
|
|
1880
1887
|
var styles20 = StyleSheet.create({
|
|
1888
|
+
grid: { flexDirection: "row", flexWrap: "wrap", gap: 8 },
|
|
1881
1889
|
list: { gap: 8 },
|
|
1882
1890
|
row: { flexDirection: "row", gap: 12 }
|
|
1883
1891
|
});
|
|
1884
|
-
var CheckPipeline = ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID }) => {
|
|
1885
|
-
const
|
|
1886
|
-
|
|
1892
|
+
var CheckPipeline = ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID, phoneColumns = 1, statusUnderTitleEnabled }) => {
|
|
1893
|
+
const width = useWindowDimensions().width;
|
|
1894
|
+
const variant = pipelineVariant(width, breakpoint);
|
|
1895
|
+
const itemVariant = pipelineItemVariant(width, breakpoint, phoneColumns);
|
|
1896
|
+
const grid = variant !== itemVariant;
|
|
1897
|
+
const cell = { flexBasis: `${Math.floor(100 / phoneColumns) - GRID_GAP_SHARE}%`, flexGrow: 1 };
|
|
1898
|
+
const containerStyle = variant === "tile" ? styles20.row : grid ? styles20.grid : styles20.list;
|
|
1899
|
+
return /* @__PURE__ */ jsx(View, { accessibilityHint, accessibilityLabel, accessibilityRole: "summary", style: containerStyle, testID, children: items.map(({ id, ...item }) => {
|
|
1900
|
+
const check = /* @__PURE__ */ jsx(CheckStatus, { ...item, statusUnderTitleEnabled, variant: itemVariant }, id);
|
|
1901
|
+
return grid ? /* @__PURE__ */ jsx(View, { style: cell, children: check }, id) : check;
|
|
1902
|
+
}) });
|
|
1887
1903
|
};
|
|
1888
1904
|
|
|
1889
1905
|
// src/CheckStatus/semanticScale.ts
|
|
@@ -1964,6 +1980,6 @@ var AttentionCard = ({ title, heading, status, message, evidence, action, testID
|
|
|
1964
1980
|
] });
|
|
1965
1981
|
};
|
|
1966
1982
|
|
|
1967
|
-
export { AppErrorBoundary, AsyncSurface, AttentionCard, COPY_FEEDBACK_MS, CheckPipeline, CheckStatus, ConfirmDialog, CopyStatus, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, EmptyListState, ErrorNotice, ErrorReferenceRow, ErrorState, FEEDBACK_TEST_IDS, FeedbackUiProvider, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, LoadingFallback, LocalModelGate, MODAL_OVERLAY_COLOR, PIPELINE_COLLAPSE_BREAKPOINT, PageSkeleton, ProgressBar, ThresholdMeter, ToastHost, FeedbackUiProvider as UiProvider, UiThemeOverride, WARMING_QUIET_PERIOD_MS, WarmingOverlay, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, meetsThreshold, mergeRunSteps, meterPercent, notifyWarming, pipelineVariant, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useLocalModel, useFeedbackUi as useUi };
|
|
1983
|
+
export { AppErrorBoundary, AsyncSurface, AttentionCard, COPY_FEEDBACK_MS, CheckPipeline, CheckStatus, ConfirmDialog, CopyStatus, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, EmptyListState, ErrorNotice, ErrorReferenceRow, ErrorState, FEEDBACK_TEST_IDS, FeedbackUiProvider, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, LoadingFallback, LocalModelGate, MODAL_OVERLAY_COLOR, PIPELINE_COLLAPSE_BREAKPOINT, PageSkeleton, ProgressBar, ThresholdMeter, ToastHost, FeedbackUiProvider as UiProvider, UiThemeOverride, WARMING_QUIET_PERIOD_MS, WarmingOverlay, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, meetsThreshold, mergeRunSteps, meterPercent, notifyWarming, pipelineItemVariant, pipelineVariant, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useLocalModel, useFeedbackUi as useUi };
|
|
1968
1984
|
//# sourceMappingURL=index.mjs.map
|
|
1969
1985
|
//# sourceMappingURL=index.mjs.map
|