@dloizides/ui-feedback 1.21.0 → 1.23.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/dist/index.mjs CHANGED
@@ -330,7 +330,7 @@ var ErrorState = ({
330
330
  const primary = theme.palette.primary["500"];
331
331
  const hasTitle = typeof title === "string" && title !== "";
332
332
  const hasIcon = icon !== void 0 && icon !== null;
333
- const messageColor = hasTitle ? theme.colors.textSecondary : errorColor;
333
+ const messageColor = hasTitle ? theme.colors.textSecondary : theme.semanticText?.error ?? errorColor;
334
334
  const retry = typeof onRetry === "function" ? /* @__PURE__ */ jsx(
335
335
  TouchableOpacity,
336
336
  {
@@ -754,6 +754,39 @@ var ConfirmDialog = ({
754
754
  }
755
755
  );
756
756
  };
757
+ var ACTION_PADDING_HORIZONTAL = 12;
758
+ var ACTION_BORDER_RADIUS = 6;
759
+ var ACTION_FONT_SIZE = 14;
760
+ var styles8 = StyleSheet.create({
761
+ button: {
762
+ minWidth: MIN_TOUCH_TARGET,
763
+ minHeight: MIN_TOUCH_TARGET,
764
+ paddingHorizontal: ACTION_PADDING_HORIZONTAL,
765
+ borderRadius: ACTION_BORDER_RADIUS,
766
+ borderWidth: 1,
767
+ alignItems: "center",
768
+ justifyContent: "center"
769
+ },
770
+ label: { fontSize: ACTION_FONT_SIZE, fontWeight: "700" }
771
+ });
772
+ var ToastAction = ({ action, color, testID, onDismiss }) => {
773
+ const handlePress = () => {
774
+ action.onPress();
775
+ onDismiss();
776
+ };
777
+ return /* @__PURE__ */ jsx(
778
+ Pressable,
779
+ {
780
+ accessibilityHint: action.hint ?? action.label,
781
+ accessibilityLabel: action.label,
782
+ accessibilityRole: "button",
783
+ style: [styles8.button, { borderColor: color }],
784
+ testID,
785
+ onPress: handlePress,
786
+ children: /* @__PURE__ */ jsx(Text, { style: [styles8.label, { color }], children: action.label })
787
+ }
788
+ );
789
+ };
757
790
  var APP_HEADER_HEIGHT = 64;
758
791
  var HEADER_GAP = 8;
759
792
  var TOAST_TOP_MOBILE = 40;
@@ -811,7 +844,7 @@ var C1_CONTROL_END = 159;
811
844
  var ZERO_WIDTH_START = 8203;
812
845
  var ZERO_WIDTH_END = 8207;
813
846
  var BYTE_ORDER_MARK = 65279;
814
- var styles8 = StyleSheet.create({
847
+ var styles9 = StyleSheet.create({
815
848
  container: {
816
849
  position: "absolute",
817
850
  left: TOAST_HORIZONTAL_MARGIN,
@@ -888,14 +921,15 @@ var ToastItem = ({ message, onDone, tone, durationMs, fadeMs, testID }) => {
888
921
  {
889
922
  accessibilityLiveRegion: isError ? "assertive" : "polite",
890
923
  role: isError ? "alert" : "status",
891
- style: [styles8.toast, { backgroundColor: tone.fill, borderColor: tone.border, transform: [{ translateY }], opacity }],
924
+ style: [styles9.toast, { backgroundColor: tone.fill, borderColor: tone.border, transform: [{ translateY }], opacity }],
892
925
  testID,
893
926
  children: [
894
- /* @__PURE__ */ jsx(View, { "aria-hidden": true, importantForAccessibility: "no-hide-descendants", style: [styles8.glyph, { borderColor: tone.ink }], children: /* @__PURE__ */ jsx(Text, { style: [styles8.glyphText, { color: tone.ink }], children: tone.glyph }) }),
895
- /* @__PURE__ */ jsxs(View, { style: styles8.body, children: [
896
- /* @__PURE__ */ jsx(Text, { style: [styles8.text, { color: tone.ink }], children: message.text }),
927
+ /* @__PURE__ */ jsx(View, { "aria-hidden": true, importantForAccessibility: "no-hide-descendants", style: [styles9.glyph, { borderColor: tone.ink }], children: /* @__PURE__ */ jsx(Text, { style: [styles9.glyphText, { color: tone.ink }], children: tone.glyph }) }),
928
+ /* @__PURE__ */ jsxs(View, { style: styles9.body, children: [
929
+ /* @__PURE__ */ jsx(Text, { style: [styles9.text, { color: tone.ink }], children: message.text }),
897
930
  /* @__PURE__ */ jsx(ErrorReferenceRow, { actionColor: tone.ink, color: tone.ink, testID: `${testID}-reference`, traceId: message.traceId })
898
- ] })
931
+ ] }),
932
+ message.action ? /* @__PURE__ */ jsx(ToastAction, { action: message.action, color: tone.ink, testID: `${testID}-action`, onDismiss: handleDone }) : null
899
933
  ]
900
934
  }
901
935
  );
@@ -926,7 +960,7 @@ var ToastHost = ({
926
960
  );
927
961
  const push = useCallback(
928
962
  (toast) => {
929
- setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength), traceId: toast.traceId }]);
963
+ setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength), traceId: toast.traceId, action: toast.action }]);
930
964
  },
931
965
  [maxLength]
932
966
  );
@@ -936,7 +970,7 @@ var ToastHost = ({
936
970
  useEffect(() => subscribe(push), [subscribe, push]);
937
971
  if (messages.length === 0) return null;
938
972
  const canPortal = IS_WEB && typeof document !== "undefined";
939
- const layer = /* @__PURE__ */ jsx(View, { style: [styles8.container, { top: toastTop(IS_WEB, topInset) }, canPortal ? WEB_FIXED_LAYER : null], children: messages.map((m) => /* @__PURE__ */ jsx(
973
+ const layer = /* @__PURE__ */ jsx(View, { style: [styles9.container, { top: toastTop(IS_WEB, topInset) }, canPortal ? WEB_FIXED_LAYER : null], children: messages.map((m) => /* @__PURE__ */ jsx(
940
974
  ToastItem,
941
975
  {
942
976
  durationMs,
@@ -1012,7 +1046,7 @@ var SUBTITLE_FONT_SIZE = 15;
1012
1046
  var ATTEMPT_FONT_SIZE = 13;
1013
1047
  var CARD_PADDING = 24;
1014
1048
  var NO_ATTEMPT = 0;
1015
- var styles9 = StyleSheet.create({
1049
+ var styles10 = StyleSheet.create({
1016
1050
  overlay: {
1017
1051
  position: "absolute",
1018
1052
  top: 0,
@@ -1069,13 +1103,13 @@ var WarmingOverlay = ({
1069
1103
  {
1070
1104
  accessibilityLabel: mergedLabels.accessibilityLabel,
1071
1105
  accessibilityRole: "alert",
1072
- style: [styles9.overlay, { backgroundColor: colors.background }],
1106
+ style: [styles10.overlay, { backgroundColor: colors.background }],
1073
1107
  testID: testIdPrefix,
1074
- children: /* @__PURE__ */ jsxs(View, { style: styles9.card, children: [
1108
+ children: /* @__PURE__ */ jsxs(View, { style: styles10.card, children: [
1075
1109
  /* @__PURE__ */ jsx(ActivityIndicator, { color: primary, size: "large" }),
1076
- /* @__PURE__ */ jsx(Text, { style: [styles9.title, { color: colors.text }], testID: `${testIdPrefix}-title`, children: mergedLabels.title }),
1077
- /* @__PURE__ */ jsx(Text, { style: [styles9.subtitle, { color: colors.textSecondary }], testID: `${testIdPrefix}-subtitle`, children: mergedLabels.subtitle }),
1078
- showHint ? /* @__PURE__ */ jsx(Text, { style: [styles9.attempt, { color: colors.textSecondary }], testID: `${testIdPrefix}-attempt`, children: mergedLabels.attemptHint(snapshot2.attempt) }) : null
1110
+ /* @__PURE__ */ jsx(Text, { style: [styles10.title, { color: colors.text }], testID: `${testIdPrefix}-title`, children: mergedLabels.title }),
1111
+ /* @__PURE__ */ jsx(Text, { style: [styles10.subtitle, { color: colors.textSecondary }], testID: `${testIdPrefix}-subtitle`, children: mergedLabels.subtitle }),
1112
+ showHint ? /* @__PURE__ */ jsx(Text, { style: [styles10.attempt, { color: colors.textSecondary }], testID: `${testIdPrefix}-attempt`, children: mergedLabels.attemptHint(snapshot2.attempt) }) : null
1079
1113
  ] })
1080
1114
  }
1081
1115
  );
@@ -1099,6 +1133,7 @@ function createToastBus() {
1099
1133
  };
1100
1134
  },
1101
1135
  emit: emit2,
1136
+ show: push,
1102
1137
  success(text) {
1103
1138
  emit2(text, "success");
1104
1139
  },
@@ -1131,7 +1166,7 @@ var BUTTON_PADDING_V3 = 12;
1131
1166
  var BUTTON_BORDER_RADIUS3 = 8;
1132
1167
  var BUTTON_MARGIN_TOP3 = 12;
1133
1168
  var BUTTON_FONT_SIZE3 = 16;
1134
- var styles10 = StyleSheet.create({
1169
+ var styles11 = StyleSheet.create({
1135
1170
  container: {
1136
1171
  flex: 1,
1137
1172
  justifyContent: "center",
@@ -1192,6 +1227,7 @@ var ErrorBoundaryFallback = ({
1192
1227
  }) => {
1193
1228
  const { theme } = useFeedbackUi();
1194
1229
  const warningColor = (theme.semantic.warning ?? theme.semantic.error)["500"];
1230
+ const warningText = theme.semanticText?.warning ?? warningColor;
1195
1231
  const primaryColor = theme.palette.primary["500"];
1196
1232
  const hasDetails = showDetails && error !== null;
1197
1233
  const primaryFill = { backgroundColor: primaryColor };
@@ -1204,10 +1240,10 @@ var ErrorBoundaryFallback = ({
1204
1240
  accessibilityHint: labels.tryAgainHint,
1205
1241
  accessibilityLabel: labels.tryAgain,
1206
1242
  accessibilityRole: "button",
1207
- style: [styles10.button, reloadIsPrimary ? secondaryFill : primaryFill],
1243
+ style: [styles11.button, reloadIsPrimary ? secondaryFill : primaryFill],
1208
1244
  testID: `${testIDPrefix}-retry-button`,
1209
1245
  onPress: onRetry,
1210
- children: /* @__PURE__ */ jsx(Text, { style: [styles10.buttonText, reloadIsPrimary ? secondaryInk : primaryInk], children: labels.tryAgain })
1246
+ children: /* @__PURE__ */ jsx(Text, { style: [styles11.buttonText, reloadIsPrimary ? secondaryInk : primaryInk], children: labels.tryAgain })
1211
1247
  }
1212
1248
  ) : null;
1213
1249
  const reloadButton = typeof onReload === "function" ? /* @__PURE__ */ jsx(
@@ -1216,10 +1252,10 @@ var ErrorBoundaryFallback = ({
1216
1252
  accessibilityHint: labels.reloadHint,
1217
1253
  accessibilityLabel: labels.reload,
1218
1254
  accessibilityRole: "button",
1219
- style: [styles10.button, reloadIsPrimary ? primaryFill : secondaryFill],
1255
+ style: [styles11.button, reloadIsPrimary ? primaryFill : secondaryFill],
1220
1256
  testID: `${testIDPrefix}-reload-button`,
1221
1257
  onPress: onReload,
1222
- children: /* @__PURE__ */ jsx(Text, { style: [styles10.buttonText, reloadIsPrimary ? primaryInk : secondaryInk], children: labels.reload })
1258
+ children: /* @__PURE__ */ jsx(Text, { style: [styles11.buttonText, reloadIsPrimary ? primaryInk : secondaryInk], children: labels.reload })
1223
1259
  }
1224
1260
  ) : null;
1225
1261
  return /* @__PURE__ */ jsx(
@@ -1227,20 +1263,20 @@ var ErrorBoundaryFallback = ({
1227
1263
  {
1228
1264
  accessibilityLiveRegion: "assertive",
1229
1265
  role: "alert",
1230
- style: [styles10.container, { backgroundColor: theme.colors.background }],
1266
+ style: [styles11.container, { backgroundColor: theme.colors.background }],
1231
1267
  testID: testIDPrefix,
1232
- children: /* @__PURE__ */ jsxs(View, { style: styles10.content, children: [
1233
- logo !== void 0 ? /* @__PURE__ */ jsx(View, { style: styles10.logo, testID: `${testIDPrefix}-logo`, children: logo }) : null,
1234
- /* @__PURE__ */ jsx(Text, { style: [styles10.title, { color: theme.colors.text }], children: labels.title }),
1268
+ children: /* @__PURE__ */ jsxs(View, { style: styles11.content, children: [
1269
+ logo !== void 0 ? /* @__PURE__ */ jsx(View, { style: styles11.logo, testID: `${testIDPrefix}-logo`, children: logo }) : null,
1270
+ /* @__PURE__ */ jsx(Text, { style: [styles11.title, { color: theme.colors.text }], children: labels.title }),
1235
1271
  /* @__PURE__ */ jsx(ErrorState, { message: labels.message, testID: `${testIDPrefix}-message` }),
1236
1272
  hasDetails ? /* @__PURE__ */ jsxs(
1237
1273
  View,
1238
1274
  {
1239
- style: [styles10.details, { backgroundColor: theme.colors.surface, borderColor: warningColor }],
1275
+ style: [styles11.details, { backgroundColor: theme.colors.surface, borderColor: warningColor }],
1240
1276
  testID: `${testIDPrefix}-details`,
1241
1277
  children: [
1242
- /* @__PURE__ */ jsx(Text, { style: [styles10.detailsTitle, { color: warningColor }], children: labels.errorDetails }),
1243
- /* @__PURE__ */ jsx(Text, { style: [styles10.detailsText, { color: theme.colors.textSecondary }], children: error.message })
1278
+ /* @__PURE__ */ jsx(Text, { style: [styles11.detailsTitle, { color: warningText }], children: labels.errorDetails }),
1279
+ /* @__PURE__ */ jsx(Text, { style: [styles11.detailsText, { color: theme.colors.textSecondary }], children: error.message })
1244
1280
  ]
1245
1281
  }
1246
1282
  ) : null,
@@ -1253,7 +1289,7 @@ var ErrorBoundaryFallback = ({
1253
1289
  var CONTAINER_PADDING4 = 20;
1254
1290
  var MESSAGE_FONT_SIZE3 = 16;
1255
1291
  var MESSAGE_MARGIN_TOP = 12;
1256
- var styles11 = StyleSheet.create({
1292
+ var styles12 = StyleSheet.create({
1257
1293
  container: {
1258
1294
  flex: 1,
1259
1295
  justifyContent: "center",
@@ -1276,11 +1312,11 @@ var ErrorBoundaryRecovering = ({
1276
1312
  {
1277
1313
  accessibilityLiveRegion: "polite",
1278
1314
  role: "status",
1279
- style: [styles11.container, { backgroundColor: theme.colors.background }],
1315
+ style: [styles12.container, { backgroundColor: theme.colors.background }],
1280
1316
  testID,
1281
1317
  children: [
1282
1318
  /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.palette.primary["500"], size: "large" }),
1283
- /* @__PURE__ */ jsx(Text, { style: [styles11.message, { color: theme.colors.textSecondary }], children: message })
1319
+ /* @__PURE__ */ jsx(Text, { style: [styles12.message, { color: theme.colors.textSecondary }], children: message })
1284
1320
  ]
1285
1321
  }
1286
1322
  );
@@ -1382,7 +1418,7 @@ var TRACK_MARGIN = 4;
1382
1418
  var INDET_FRACTION = 0.35;
1383
1419
  var INDET_DURATION_MS = 1300;
1384
1420
  var LABEL_FONT_SIZE = 12;
1385
- var styles12 = StyleSheet.create({
1421
+ var styles13 = StyleSheet.create({
1386
1422
  track: { height: BAR_HEIGHT, borderRadius: RADIUS, overflow: "hidden", marginVertical: TRACK_MARGIN },
1387
1423
  fill: { height: "100%", borderRadius: RADIUS },
1388
1424
  label: { fontSize: LABEL_FONT_SIZE, textAlign: "right", fontVariant: ["tabular-nums"] }
@@ -1401,7 +1437,7 @@ function IndeterminateFill({ color, width, testID }) {
1401
1437
  return /* @__PURE__ */ jsx(
1402
1438
  Animated.View,
1403
1439
  {
1404
- style: [styles12.fill, { backgroundColor: color, width: barWidth, transform: [{ translateX }] }],
1440
+ style: [styles13.fill, { backgroundColor: color, width: barWidth, transform: [{ translateX }] }],
1405
1441
  testID
1406
1442
  }
1407
1443
  );
@@ -1436,13 +1472,13 @@ function ProgressBar(props) {
1436
1472
  role: "progressbar",
1437
1473
  testID,
1438
1474
  children: [
1439
- /* @__PURE__ */ jsx(View, { style: [styles12.track, { backgroundColor: trackColor }], onLayout, children: indeterminate ? /* @__PURE__ */ jsx(IndeterminateFill, { color, testID: fillTestID, width }) : /* @__PURE__ */ jsx(View, { style: [styles12.fill, { backgroundColor: color, width: `${safePct}%` }], testID: fillTestID }) }),
1440
- !indeterminate && label !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles12.label, { color: textColor }], children: label }) : null
1475
+ /* @__PURE__ */ jsx(View, { style: [styles13.track, { backgroundColor: trackColor }], onLayout, children: indeterminate ? /* @__PURE__ */ jsx(IndeterminateFill, { color, testID: fillTestID, width }) : /* @__PURE__ */ jsx(View, { style: [styles13.fill, { backgroundColor: color, width: `${safePct}%` }], testID: fillTestID }) }),
1476
+ !indeterminate && label !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles13.label, { color: textColor }], children: label }) : null
1441
1477
  ]
1442
1478
  }
1443
1479
  );
1444
1480
  }
1445
- var styles13 = StyleSheet.create({
1481
+ var styles14 = StyleSheet.create({
1446
1482
  button: {
1447
1483
  minHeight: MIN_TOUCH_TARGET_PX,
1448
1484
  minWidth: MIN_TOUCH_TARGET_PX,
@@ -1465,9 +1501,9 @@ function RunCardButton({ label, hint, color, onPress, testID, disabled = false,
1465
1501
  accessibilityState: { disabled, expanded },
1466
1502
  disabled,
1467
1503
  onPress,
1468
- style: [styles13.button, { borderColor: color }, disabled ? { opacity: DISABLED_OPACITY } : null],
1504
+ style: [styles14.button, { borderColor: color }, disabled ? { opacity: DISABLED_OPACITY } : null],
1469
1505
  testID,
1470
- children: /* @__PURE__ */ jsx(Text, { style: [styles13.text, { color }], children: label })
1506
+ children: /* @__PURE__ */ jsx(Text, { style: [styles14.text, { color }], children: label })
1471
1507
  }
1472
1508
  );
1473
1509
  }
@@ -1535,8 +1571,17 @@ function runToneColor(theme, state) {
1535
1571
  if (state === "done") return scale(theme, "success") ?? theme.colors.text;
1536
1572
  return theme.colors.textSecondary;
1537
1573
  }
1574
+ function runToneTextColor(theme, state) {
1575
+ const inks = {
1576
+ failed: theme.semanticText?.error,
1577
+ running: theme.semanticText?.warning,
1578
+ done: theme.semanticText?.success,
1579
+ pending: void 0
1580
+ };
1581
+ return inks[state] ?? runToneColor(theme, state);
1582
+ }
1538
1583
  var MARK = { done: "\u2713", running: "\u25CF", pending: "\u25CB", failed: "\u2715" };
1539
- var styles14 = StyleSheet.create({
1584
+ var styles15 = StyleSheet.create({
1540
1585
  row: { flexDirection: "row", flexWrap: "wrap", gap: 6 },
1541
1586
  chip: { borderWidth: 1, borderRadius: 6, paddingHorizontal: 10, justifyContent: "center" },
1542
1587
  tap: { minHeight: MIN_TOUCH_TARGET_PX },
@@ -1549,14 +1594,15 @@ function chipText(group, labels) {
1549
1594
  }
1550
1595
  function RunGroupChips({ groups, labels, testID, selectedId = null, onSelect }) {
1551
1596
  const { theme } = useFeedbackUi();
1552
- return /* @__PURE__ */ jsx(View, { style: styles14.row, testID, children: groups.map((group) => {
1597
+ return /* @__PURE__ */ jsx(View, { style: styles15.row, testID, children: groups.map((group) => {
1553
1598
  const color = runToneColor(theme, group.state);
1599
+ const ink = runToneTextColor(theme, group.state);
1554
1600
  const selected = group.id === selectedId;
1555
1601
  const a11y = labels.groupA11y(group.label, group.state, labels.formatDuration(group.durationSec));
1556
- const body = /* @__PURE__ */ jsx(Text, { style: [styles14.text, { color }, selected || group.state === "running" ? styles14.strong : null], children: chipText(group, labels) });
1557
- const look = [styles14.chip, { borderColor: color, backgroundColor: selected ? theme.colors.surfaceElevated : theme.colors.surface }];
1602
+ const body = /* @__PURE__ */ jsx(Text, { style: [styles15.text, { color: ink }, selected || group.state === "running" ? styles15.strong : null], children: chipText(group, labels) });
1603
+ const look = [styles15.chip, { borderColor: color, backgroundColor: selected ? theme.colors.surfaceElevated : theme.colors.surface }];
1558
1604
  if (onSelect === void 0) {
1559
- return /* @__PURE__ */ jsx(View, { style: [look, styles14.still], accessible: true, accessibilityLabel: a11y, testID: `${testID}-${group.id}`, children: body }, group.id);
1605
+ return /* @__PURE__ */ jsx(View, { style: [look, styles15.still], accessible: true, accessibilityLabel: a11y, testID: `${testID}-${group.id}`, children: body }, group.id);
1560
1606
  }
1561
1607
  return /* @__PURE__ */ jsx(
1562
1608
  Pressable,
@@ -1566,7 +1612,7 @@ function RunGroupChips({ groups, labels, testID, selectedId = null, onSelect })
1566
1612
  accessibilityHint: labels.groupHint,
1567
1613
  accessibilityState: { selected },
1568
1614
  onPress: () => onSelect(group.id),
1569
- style: [look, styles14.tap],
1615
+ style: [look, styles15.tap],
1570
1616
  testID: `${testID}-${group.id}`,
1571
1617
  children: body
1572
1618
  },
@@ -1580,8 +1626,8 @@ function RunGroupSummary({ groups, labels, testID }) {
1580
1626
  const open = groups.filter((g) => g.state !== "done");
1581
1627
  const doneColor = runToneColor(theme, "done");
1582
1628
  const doneText = labels.doneSummary(done.count, labels.formatDuration(done.durationSec));
1583
- return /* @__PURE__ */ jsxs(View, { style: styles14.row, testID, children: [
1584
- done.count > 0 ? /* @__PURE__ */ jsx(View, { style: [styles14.chip, styles14.still, { borderColor: doneColor }], accessible: true, accessibilityLabel: doneText, testID: `${testID}-done`, children: /* @__PURE__ */ jsx(Text, { style: [styles14.text, { color: doneColor }], children: `${MARK.done} ${doneText}` }) }) : null,
1629
+ return /* @__PURE__ */ jsxs(View, { style: styles15.row, testID, children: [
1630
+ done.count > 0 ? /* @__PURE__ */ jsx(View, { style: [styles15.chip, styles15.still, { borderColor: doneColor }], accessible: true, accessibilityLabel: doneText, testID: `${testID}-done`, children: /* @__PURE__ */ jsx(Text, { style: [styles15.text, { color: runToneTextColor(theme, "done") }], children: `${MARK.done} ${doneText}` }) }) : null,
1585
1631
  /* @__PURE__ */ jsx(RunGroupChips, { groups: open, labels, testID: `${testID}-open` })
1586
1632
  ] });
1587
1633
  }
@@ -1591,7 +1637,7 @@ var LABEL_SHARE = "35%";
1591
1637
  var LABEL_LINES = 2;
1592
1638
  var DURATION_WIDTH = 64;
1593
1639
  var PERCENT = 100;
1594
- var styles15 = StyleSheet.create({
1640
+ var styles16 = StyleSheet.create({
1595
1641
  list: { gap: 6 },
1596
1642
  row: { flexDirection: "row", alignItems: "center", gap: 8 },
1597
1643
  stack: { gap: 4 },
@@ -1610,22 +1656,22 @@ function RunStepBars({ steps, maxBars, labels, compact, testID }) {
1610
1656
  const maxSec = steps.reduce((m, s) => Math.max(m, s.durationSec), 0);
1611
1657
  const folded = split.hiddenCount > 0;
1612
1658
  const canFold = all && steps.length > maxBars;
1613
- return /* @__PURE__ */ jsxs(View, { style: styles15.list, testID, children: [
1659
+ return /* @__PURE__ */ jsxs(View, { style: styles16.list, testID, children: [
1614
1660
  split.visible.map((step, i) => {
1615
1661
  const color = runToneColor(theme, step.state);
1616
1662
  const duration = labels.formatDuration(step.durationSec);
1617
- const strong = step.state === "running" ? styles15.strong : null;
1618
- const name = /* @__PURE__ */ jsx(Text, { style: [compact ? styles15.compactLabel : styles15.label, { color: theme.colors.text }, strong], numberOfLines: LABEL_LINES, testID: `${testID}-name-${String(i)}`, children: step.label });
1619
- const time = /* @__PURE__ */ jsx(Text, { style: [styles15.duration, { color: theme.colors.textSecondary }, strong], children: duration });
1620
- const bar = /* @__PURE__ */ jsx(View, { style: [compact ? styles15.fullTrack : styles15.track, { backgroundColor: theme.colors.border }], children: /* @__PURE__ */ jsx(View, { style: [styles15.fill, { backgroundColor: color, width: `${barFraction(step.durationSec, maxSec) * PERCENT}%` }] }) });
1663
+ const strong = step.state === "running" ? styles16.strong : null;
1664
+ const name = /* @__PURE__ */ jsx(Text, { style: [compact ? styles16.compactLabel : styles16.label, { color: theme.colors.text }, strong], numberOfLines: LABEL_LINES, testID: `${testID}-name-${String(i)}`, children: step.label });
1665
+ const time = /* @__PURE__ */ jsx(Text, { style: [styles16.duration, { color: theme.colors.textSecondary }, strong], children: duration });
1666
+ const bar = /* @__PURE__ */ jsx(View, { style: [compact ? styles16.fullTrack : styles16.track, { backgroundColor: theme.colors.border }], children: /* @__PURE__ */ jsx(View, { style: [styles16.fill, { backgroundColor: color, width: `${barFraction(step.durationSec, maxSec) * PERCENT}%` }] }) });
1621
1667
  const a11y = { accessible: true, accessibilityLabel: labels.stepA11y(step.label, duration), testID: `${testID}-row-${String(i)}` };
1622
- return compact ? /* @__PURE__ */ jsxs(View, { style: styles15.stack, ...a11y, children: [
1623
- /* @__PURE__ */ jsxs(View, { style: styles15.row, children: [
1668
+ return compact ? /* @__PURE__ */ jsxs(View, { style: styles16.stack, ...a11y, children: [
1669
+ /* @__PURE__ */ jsxs(View, { style: styles16.row, children: [
1624
1670
  name,
1625
1671
  time
1626
1672
  ] }),
1627
1673
  bar
1628
- ] }, `${step.label}-${String(i)}`) : /* @__PURE__ */ jsxs(View, { style: styles15.row, ...a11y, children: [
1674
+ ] }, `${step.label}-${String(i)}`) : /* @__PURE__ */ jsxs(View, { style: styles16.row, ...a11y, children: [
1629
1675
  name,
1630
1676
  bar,
1631
1677
  time
@@ -1646,7 +1692,7 @@ function RunStepBars({ steps, maxBars, labels, compact, testID }) {
1646
1692
  }
1647
1693
  var LIVE_RUN_CARD_COMPACT_MAX_PX = 640;
1648
1694
  var DEFAULT_MAX_BARS = 4;
1649
- var styles16 = StyleSheet.create({
1695
+ var styles17 = StyleSheet.create({
1650
1696
  card: { borderWidth: 1, borderRadius: 8, padding: 14, gap: 10 },
1651
1697
  head: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 10 },
1652
1698
  titleBox: { flexGrow: 1, flexShrink: 1, flexBasis: 200, minWidth: 0, gap: 2 },
@@ -1667,21 +1713,22 @@ function LiveRunCard(props) {
1667
1713
  const selectedId = groups.some((g) => g.id === picked) ? picked : defaultGroupId(groups);
1668
1714
  const selected = groups.find((g) => g.id === selectedId);
1669
1715
  const tone = runToneColor(theme, status);
1716
+ const toneText = runToneTextColor(theme, status);
1670
1717
  const percent = progressPercent(progress);
1671
1718
  const showTimings = !compact || open;
1672
1719
  const muted = { color: theme.colors.textSecondary };
1673
- return /* @__PURE__ */ jsxs(View, { style: [styles16.card, { borderColor: tone, backgroundColor: theme.colors.surface }], testID, children: [
1674
- /* @__PURE__ */ jsxs(View, { style: styles16.head, children: [
1675
- /* @__PURE__ */ jsx(View, { style: [styles16.pill, { borderColor: tone }], children: /* @__PURE__ */ jsx(Text, { style: [styles16.pillText, { color: tone }], testID: `${testID}-status`, children: labels.status }) }),
1676
- /* @__PURE__ */ jsxs(View, { style: styles16.titleBox, children: [
1677
- /* @__PURE__ */ jsx(Text, { style: [styles16.title, { color: theme.colors.text }], testID: `${testID}-title`, children: title }),
1678
- /* @__PURE__ */ jsx(Text, { style: [styles16.meta, muted], testID: `${testID}-meta`, children: labels.meta })
1720
+ return /* @__PURE__ */ jsxs(View, { style: [styles17.card, { borderColor: tone, backgroundColor: theme.colors.surface }], testID, children: [
1721
+ /* @__PURE__ */ jsxs(View, { style: styles17.head, children: [
1722
+ /* @__PURE__ */ jsx(View, { style: [styles17.pill, { borderColor: tone }], children: /* @__PURE__ */ jsx(Text, { style: [styles17.pillText, { color: toneText }], testID: `${testID}-status`, children: labels.status }) }),
1723
+ /* @__PURE__ */ jsxs(View, { style: styles17.titleBox, children: [
1724
+ /* @__PURE__ */ jsx(Text, { style: [styles17.title, { color: theme.colors.text }], testID: `${testID}-title`, children: title }),
1725
+ /* @__PURE__ */ jsx(Text, { style: [styles17.meta, muted], testID: `${testID}-meta`, children: labels.meta })
1679
1726
  ] }),
1680
- onCancel !== void 0 ? /* @__PURE__ */ jsx(RunCardButton, { label: labels.cancel, hint: labels.cancelHint, color: theme.semantic.error["500"], onPress: onCancel, disabled: cancelDisabled, testID: `${testID}-cancel` }) : null
1727
+ onCancel !== void 0 ? /* @__PURE__ */ jsx(RunCardButton, { label: labels.cancel, hint: labels.cancelHint, color: theme.semanticText?.error ?? theme.semantic.error["500"], onPress: onCancel, disabled: cancelDisabled, testID: `${testID}-cancel` }) : null
1681
1728
  ] }),
1682
- currentStep !== null && currentStep !== "" ? /* @__PURE__ */ jsx(Text, { style: [styles16.step, { color: theme.colors.text }], testID: `${testID}-step`, children: currentStep }) : null,
1729
+ currentStep !== null && currentStep !== "" ? /* @__PURE__ */ jsx(Text, { style: [styles17.step, { color: theme.colors.text }], testID: `${testID}-step`, children: currentStep }) : null,
1683
1730
  percent !== null ? /* @__PURE__ */ jsx(ProgressBar, { percent, label: labels.progress, accessibilityLabel: labels.progressA11y, color: tone, testID: `${testID}-progress` }) : null,
1684
- percent === null && labels.progress !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles16.meta, muted], testID: `${testID}-progress-text`, children: labels.progress }) : null,
1731
+ percent === null && labels.progress !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles17.meta, muted], testID: `${testID}-progress-text`, children: labels.progress }) : null,
1685
1732
  compact && !open ? /* @__PURE__ */ jsx(RunGroupSummary, { groups, labels, testID: `${testID}-summary` }) : null,
1686
1733
  compact ? /* @__PURE__ */ jsx(RunCardButton, { label: labels.stepTimings, hint: labels.stepTimingsHint, color: theme.colors.textSecondary, onPress: () => setOpen(!open), expanded: open, testID: `${testID}-timings-toggle` }) : null,
1687
1734
  showTimings ? /* @__PURE__ */ jsx(RunGroupChips, { groups, labels, selectedId, onSelect: setPicked, testID: `${testID}-groups` }) : null,