@dloizides/ui-feedback 1.29.0 → 1.30.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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.30.0
4
+
5
+ - StatusTile: `muted` greys a tile for a check that cannot run (dashed border, page background, secondary text), still pressable; showcase shows it.
6
+
3
7
  ## 1.29.0
4
8
 
5
9
  - `SkeletonLines({ lines, ... })`: a busy stack of caller-sized shimmer bars so a loading tile keeps its content's height.
package/dist/index.d.mts CHANGED
@@ -826,13 +826,14 @@ interface StatusTileProps {
826
826
  status?: React.ReactNode;
827
827
  lines: readonly string[];
828
828
  accentColor?: string;
829
+ muted?: boolean;
829
830
  onPress?: () => void;
830
831
  accessibilityLabel: string;
831
832
  accessibilityHint: string;
832
833
  testID?: string;
833
834
  }
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;
835
+ /** A status tile with title, status chip, result line and meta line that lifts on hover and focus; muted greys it for a check that cannot run. */
836
+ declare const StatusTile: ({ title, icon, status, lines, accentColor, muted, onPress, accessibilityLabel, accessibilityHint, testID }: StatusTileProps) => React.ReactElement;
836
837
 
837
838
  declare const TILE_MOTION_MS = 160;
838
839
  interface TileInteraction {
package/dist/index.d.ts CHANGED
@@ -826,13 +826,14 @@ interface StatusTileProps {
826
826
  status?: React.ReactNode;
827
827
  lines: readonly string[];
828
828
  accentColor?: string;
829
+ muted?: boolean;
829
830
  onPress?: () => void;
830
831
  accessibilityLabel: string;
831
832
  accessibilityHint: string;
832
833
  testID?: string;
833
834
  }
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;
835
+ /** A status tile with title, status chip, result line and meta line that lifts on hover and focus; muted greys it for a check that cannot run. */
836
+ declare const StatusTile: ({ title, icon, status, lines, accentColor, muted, onPress, accessibilityLabel, accessibilityHint, testID }: StatusTileProps) => React.ReactElement;
836
837
 
837
838
  declare const TILE_MOTION_MS = 160;
838
839
  interface TileInteraction {
package/dist/index.js CHANGED
@@ -2050,27 +2050,29 @@ var styles24 = reactNative.StyleSheet.create({
2050
2050
  line: { fontSize: 13 },
2051
2051
  meta: { fontSize: 12 },
2052
2052
  status: { alignSelf: "flex-start" },
2053
+ muted: { borderStyle: "dashed" },
2053
2054
  title: { flexShrink: 1, fontSize: 14, fontWeight: "700" },
2054
2055
  wrap: { borderRadius: RADIUS5, borderWidth: 1, gap: 6, minHeight: MIN_HIT2, minWidth: 0, padding: PAD3 }
2055
2056
  });
2056
- var StatusTile = ({ title, icon, status, lines, accentColor, onPress, accessibilityLabel, accessibilityHint, testID }) => {
2057
+ var StatusTile = ({ title, icon, status, lines, accentColor, muted = false, onPress, accessibilityLabel, accessibilityHint, testID }) => {
2057
2058
  const { theme } = useFeedbackUi();
2058
2059
  const reduced = uiMotion.useReducedMotion();
2059
2060
  const accent = accentColor === void 0 ? { borderColor: theme.colors.border } : { borderColor: accentColor, borderTopWidth: ACCENT, paddingTop: PAD3 - ACCENT + 1 };
2060
2061
  const interactive = onPress !== void 0;
2061
2062
  const styleOf = (state) => [
2062
2063
  styles24.wrap,
2063
- { backgroundColor: theme.colors.surface },
2064
+ { backgroundColor: muted ? theme.colors.background : theme.colors.surface },
2064
2065
  accent,
2066
+ muted ? styles24.muted : null,
2065
2067
  tileMotionStyle(theme, { interaction: { hovered: state.hovered === true, pressed: state.pressed, focused: state.focused === true }, reduced, interactive, accentColor })
2066
2068
  ];
2067
2069
  return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { accessibilityHint, accessibilityLabel, accessibilityRole: interactive ? "button" : void 0, disabled: !interactive, style: styleOf, testID, onPress, children: [
2068
2070
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.head, children: [
2069
2071
  icon,
2070
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles24.title, { color: theme.colors.text }], children: title })
2072
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: [styles24.title, { color: muted ? theme.colors.textSecondary : theme.colors.text }], children: title })
2071
2073
  ] }),
2072
2074
  status === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.status, children: status }),
2073
- lines.map((line, index) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 2, style: [index === 0 ? styles24.line : styles24.meta, { color: index === 0 ? theme.colors.text : theme.colors.textSecondary }], children: line }, `${String(index)}-${line}`))
2075
+ lines.map((line, index) => /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 2, style: [index === 0 ? styles24.line : styles24.meta, { color: index === 0 && !muted ? theme.colors.text : theme.colors.textSecondary }], children: line }, `${String(index)}-${line}`))
2074
2076
  ] });
2075
2077
  };
2076
2078