@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 +4 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +119 -119
package/dist/index.mjs
CHANGED
|
@@ -2048,27 +2048,29 @@ var styles24 = StyleSheet.create({
|
|
|
2048
2048
|
line: { fontSize: 13 },
|
|
2049
2049
|
meta: { fontSize: 12 },
|
|
2050
2050
|
status: { alignSelf: "flex-start" },
|
|
2051
|
+
muted: { borderStyle: "dashed" },
|
|
2051
2052
|
title: { flexShrink: 1, fontSize: 14, fontWeight: "700" },
|
|
2052
2053
|
wrap: { borderRadius: RADIUS5, borderWidth: 1, gap: 6, minHeight: MIN_HIT2, minWidth: 0, padding: PAD3 }
|
|
2053
2054
|
});
|
|
2054
|
-
var StatusTile = ({ title, icon, status, lines, accentColor, onPress, accessibilityLabel, accessibilityHint, testID }) => {
|
|
2055
|
+
var StatusTile = ({ title, icon, status, lines, accentColor, muted = false, onPress, accessibilityLabel, accessibilityHint, testID }) => {
|
|
2055
2056
|
const { theme } = useFeedbackUi();
|
|
2056
2057
|
const reduced = useReducedMotion();
|
|
2057
2058
|
const accent = accentColor === void 0 ? { borderColor: theme.colors.border } : { borderColor: accentColor, borderTopWidth: ACCENT, paddingTop: PAD3 - ACCENT + 1 };
|
|
2058
2059
|
const interactive = onPress !== void 0;
|
|
2059
2060
|
const styleOf = (state) => [
|
|
2060
2061
|
styles24.wrap,
|
|
2061
|
-
{ backgroundColor: theme.colors.surface },
|
|
2062
|
+
{ backgroundColor: muted ? theme.colors.background : theme.colors.surface },
|
|
2062
2063
|
accent,
|
|
2064
|
+
muted ? styles24.muted : null,
|
|
2063
2065
|
tileMotionStyle(theme, { interaction: { hovered: state.hovered === true, pressed: state.pressed, focused: state.focused === true }, reduced, interactive, accentColor })
|
|
2064
2066
|
];
|
|
2065
2067
|
return /* @__PURE__ */ jsxs(Pressable, { accessibilityHint, accessibilityLabel, accessibilityRole: interactive ? "button" : void 0, disabled: !interactive, style: styleOf, testID, onPress, children: [
|
|
2066
2068
|
/* @__PURE__ */ jsxs(View, { style: styles24.head, children: [
|
|
2067
2069
|
icon,
|
|
2068
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles24.title, { color: theme.colors.text }], children: title })
|
|
2070
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles24.title, { color: muted ? theme.colors.textSecondary : theme.colors.text }], children: title })
|
|
2069
2071
|
] }),
|
|
2070
2072
|
status === void 0 ? null : /* @__PURE__ */ jsx(View, { style: styles24.status, children: status }),
|
|
2071
|
-
lines.map((line, index) => /* @__PURE__ */ jsx(Text, { numberOfLines: 2, style: [index === 0 ? styles24.line : styles24.meta, { color: index === 0 ? theme.colors.text : theme.colors.textSecondary }], children: line }, `${String(index)}-${line}`))
|
|
2073
|
+
lines.map((line, index) => /* @__PURE__ */ jsx(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}`))
|
|
2072
2074
|
] });
|
|
2073
2075
|
};
|
|
2074
2076
|
|