kaleido-ui 0.1.54 → 0.1.55
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/native/index.cjs +59 -4
- package/dist/native/index.d.cts +13 -1
- package/dist/native/index.d.ts +13 -1
- package/dist/native/index.js +59 -5
- package/package.json +1 -1
package/dist/native/index.cjs
CHANGED
|
@@ -54,6 +54,7 @@ __export(native_exports, {
|
|
|
54
54
|
SectionLabel: () => SectionLabel,
|
|
55
55
|
SeedPhrase: () => import_wdk_uikit_react_native2.SeedPhrase,
|
|
56
56
|
StatusBadge: () => StatusBadge,
|
|
57
|
+
SuggestionTile: () => SuggestionTile,
|
|
57
58
|
ThemeProvider: () => import_wdk_uikit_react_native2.ThemeProvider,
|
|
58
59
|
TransactionItem: () => import_wdk_uikit_react_native2.TransactionItem,
|
|
59
60
|
TransactionList: () => import_wdk_uikit_react_native2.TransactionList,
|
|
@@ -1139,13 +1140,66 @@ var styles6 = import_react_native15.StyleSheet.create({
|
|
|
1139
1140
|
time: { fontSize: 12, marginTop: 8, fontWeight: "500" }
|
|
1140
1141
|
});
|
|
1141
1142
|
|
|
1142
|
-
// src/native/components/
|
|
1143
|
+
// src/native/components/suggestion-tile.tsx
|
|
1143
1144
|
var import_react_native16 = require("react-native");
|
|
1144
1145
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1146
|
+
function SuggestionTile({ title, subtitle, icon, accent, onPress, style }) {
|
|
1147
|
+
const { theme } = useKaleidoTheme();
|
|
1148
|
+
const chipColor = accent ?? theme.primary;
|
|
1149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1150
|
+
import_react_native16.Pressable,
|
|
1151
|
+
{
|
|
1152
|
+
onPress,
|
|
1153
|
+
accessibilityRole: "button",
|
|
1154
|
+
accessibilityLabel: title,
|
|
1155
|
+
accessibilityHint: subtitle,
|
|
1156
|
+
style: ({ pressed }) => [
|
|
1157
|
+
styles7.card,
|
|
1158
|
+
{
|
|
1159
|
+
backgroundColor: theme.card,
|
|
1160
|
+
borderColor: theme.border.subtle,
|
|
1161
|
+
opacity: pressed ? 0.85 : 1
|
|
1162
|
+
},
|
|
1163
|
+
style
|
|
1164
|
+
],
|
|
1165
|
+
children: [
|
|
1166
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native16.View, { style: [styles7.chip, { backgroundColor: chipColor }], children: icon(theme.text.onFill, 18) }),
|
|
1167
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native16.View, { style: styles7.textArea, children: [
|
|
1168
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(KText, { variant: "caption", weight: "semibold", numberOfLines: 1, children: title }),
|
|
1169
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(KText, { variant: "tiny", tone: "muted", numberOfLines: 2, style: { marginTop: 2 }, children: subtitle }) : null
|
|
1170
|
+
] })
|
|
1171
|
+
]
|
|
1172
|
+
}
|
|
1173
|
+
);
|
|
1174
|
+
}
|
|
1175
|
+
var styles7 = import_react_native16.StyleSheet.create({
|
|
1176
|
+
card: {
|
|
1177
|
+
flex: 1,
|
|
1178
|
+
flexDirection: "row",
|
|
1179
|
+
alignItems: "center",
|
|
1180
|
+
gap: 10,
|
|
1181
|
+
paddingVertical: 12,
|
|
1182
|
+
paddingHorizontal: 12,
|
|
1183
|
+
borderRadius: 16,
|
|
1184
|
+
borderWidth: 1
|
|
1185
|
+
},
|
|
1186
|
+
chip: {
|
|
1187
|
+
width: 36,
|
|
1188
|
+
height: 36,
|
|
1189
|
+
borderRadius: 12,
|
|
1190
|
+
justifyContent: "center",
|
|
1191
|
+
alignItems: "center"
|
|
1192
|
+
},
|
|
1193
|
+
textArea: { flex: 1 }
|
|
1194
|
+
});
|
|
1195
|
+
|
|
1196
|
+
// src/native/components/mode-toggle.tsx
|
|
1197
|
+
var import_react_native17 = require("react-native");
|
|
1198
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1145
1199
|
function ModeToggle({ icon, size = 40, onToggle }) {
|
|
1146
1200
|
const { theme, mode, toggleMode } = useKaleidoTheme();
|
|
1147
|
-
return /* @__PURE__ */ (0,
|
|
1148
|
-
|
|
1201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1202
|
+
import_react_native17.Pressable,
|
|
1149
1203
|
{
|
|
1150
1204
|
accessibilityRole: "switch",
|
|
1151
1205
|
accessibilityState: { checked: mode === "dark" },
|
|
@@ -1165,7 +1219,7 @@ function ModeToggle({ icon, size = 40, onToggle }) {
|
|
|
1165
1219
|
justifyContent: "center",
|
|
1166
1220
|
opacity: pressed ? 0.85 : 1
|
|
1167
1221
|
}),
|
|
1168
|
-
children: /* @__PURE__ */ (0,
|
|
1222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native17.View, { children: icon(mode, theme.text.primary, Math.round(size * 0.5)) })
|
|
1169
1223
|
}
|
|
1170
1224
|
);
|
|
1171
1225
|
}
|
|
@@ -1262,6 +1316,7 @@ var transition = {
|
|
|
1262
1316
|
SectionLabel,
|
|
1263
1317
|
SeedPhrase,
|
|
1264
1318
|
StatusBadge,
|
|
1319
|
+
SuggestionTile,
|
|
1265
1320
|
ThemeProvider,
|
|
1266
1321
|
TransactionItem,
|
|
1267
1322
|
TransactionList,
|
package/dist/native/index.d.cts
CHANGED
|
@@ -398,6 +398,18 @@ interface ChatBubbleProps {
|
|
|
398
398
|
}
|
|
399
399
|
declare function ChatBubble({ role, avatar, time, animateOnMount, onLongPress, maxWidth, style, children, }: ChatBubbleProps): react_jsx_runtime.JSX.Element;
|
|
400
400
|
|
|
401
|
+
interface SuggestionTileProps {
|
|
402
|
+
title: string;
|
|
403
|
+
subtitle?: string;
|
|
404
|
+
/** Glyph renderer — receives the themed glyph color + size. */
|
|
405
|
+
icon: (color: string, size: number) => ReactNode;
|
|
406
|
+
/** Icon-chip background. Defaults to the brand green. */
|
|
407
|
+
accent?: string;
|
|
408
|
+
onPress?: () => void;
|
|
409
|
+
style?: ViewStyle;
|
|
410
|
+
}
|
|
411
|
+
declare function SuggestionTile({ title, subtitle, icon, accent, onPress, style }: SuggestionTileProps): react_jsx_runtime.JSX.Element;
|
|
412
|
+
|
|
401
413
|
interface ModeToggleProps {
|
|
402
414
|
icon: (mode: ThemeMode, color: string, size: number) => React.ReactNode;
|
|
403
415
|
size?: number;
|
|
@@ -591,4 +603,4 @@ declare const transition: {
|
|
|
591
603
|
readonly slow: "300ms ease-out";
|
|
592
604
|
};
|
|
593
605
|
|
|
594
|
-
export { ActionButton, type ActionButtonProps, AlertBanner, BalanceCard, type BalanceCardProps, ChatBubble, type ChatBubbleProps, type ChatRole, EmptyState, type EmptyStateProps, KButton, type KButtonProps, KCard, type KCardProps, KScreen, type KScreenProps, KText, type KTextProps, type KaleidoTheme, KaleidoThemeProvider, KaleidoUIProvider, type KaleidoUIProviderProps, ModeToggle, type ModeToggleProps, type NativeTypeLevel, NetworkBadge, NetworkChip, type NetworkChipProps, type NetworkKey, type NetworkType, QrCode, type QrCodeProps, SectionLabel, StatusBadge, type StatusType, type ThemeMode, TypingDots, type TypingDotsProps, colors, fontFamily, fontWeight, kaleidoswapBrandConfig, kaleidoswapTokens, makeTheme, nativeType, radius, shadow, themes, transition, typeScale, useKaleidoTheme };
|
|
606
|
+
export { ActionButton, type ActionButtonProps, AlertBanner, BalanceCard, type BalanceCardProps, ChatBubble, type ChatBubbleProps, type ChatRole, EmptyState, type EmptyStateProps, KButton, type KButtonProps, KCard, type KCardProps, KScreen, type KScreenProps, KText, type KTextProps, type KaleidoTheme, KaleidoThemeProvider, KaleidoUIProvider, type KaleidoUIProviderProps, ModeToggle, type ModeToggleProps, type NativeTypeLevel, NetworkBadge, NetworkChip, type NetworkChipProps, type NetworkKey, type NetworkType, QrCode, type QrCodeProps, SectionLabel, StatusBadge, type StatusType, SuggestionTile, type SuggestionTileProps, type ThemeMode, TypingDots, type TypingDotsProps, colors, fontFamily, fontWeight, kaleidoswapBrandConfig, kaleidoswapTokens, makeTheme, nativeType, radius, shadow, themes, transition, typeScale, useKaleidoTheme };
|
package/dist/native/index.d.ts
CHANGED
|
@@ -398,6 +398,18 @@ interface ChatBubbleProps {
|
|
|
398
398
|
}
|
|
399
399
|
declare function ChatBubble({ role, avatar, time, animateOnMount, onLongPress, maxWidth, style, children, }: ChatBubbleProps): react_jsx_runtime.JSX.Element;
|
|
400
400
|
|
|
401
|
+
interface SuggestionTileProps {
|
|
402
|
+
title: string;
|
|
403
|
+
subtitle?: string;
|
|
404
|
+
/** Glyph renderer — receives the themed glyph color + size. */
|
|
405
|
+
icon: (color: string, size: number) => ReactNode;
|
|
406
|
+
/** Icon-chip background. Defaults to the brand green. */
|
|
407
|
+
accent?: string;
|
|
408
|
+
onPress?: () => void;
|
|
409
|
+
style?: ViewStyle;
|
|
410
|
+
}
|
|
411
|
+
declare function SuggestionTile({ title, subtitle, icon, accent, onPress, style }: SuggestionTileProps): react_jsx_runtime.JSX.Element;
|
|
412
|
+
|
|
401
413
|
interface ModeToggleProps {
|
|
402
414
|
icon: (mode: ThemeMode, color: string, size: number) => React.ReactNode;
|
|
403
415
|
size?: number;
|
|
@@ -591,4 +603,4 @@ declare const transition: {
|
|
|
591
603
|
readonly slow: "300ms ease-out";
|
|
592
604
|
};
|
|
593
605
|
|
|
594
|
-
export { ActionButton, type ActionButtonProps, AlertBanner, BalanceCard, type BalanceCardProps, ChatBubble, type ChatBubbleProps, type ChatRole, EmptyState, type EmptyStateProps, KButton, type KButtonProps, KCard, type KCardProps, KScreen, type KScreenProps, KText, type KTextProps, type KaleidoTheme, KaleidoThemeProvider, KaleidoUIProvider, type KaleidoUIProviderProps, ModeToggle, type ModeToggleProps, type NativeTypeLevel, NetworkBadge, NetworkChip, type NetworkChipProps, type NetworkKey, type NetworkType, QrCode, type QrCodeProps, SectionLabel, StatusBadge, type StatusType, type ThemeMode, TypingDots, type TypingDotsProps, colors, fontFamily, fontWeight, kaleidoswapBrandConfig, kaleidoswapTokens, makeTheme, nativeType, radius, shadow, themes, transition, typeScale, useKaleidoTheme };
|
|
606
|
+
export { ActionButton, type ActionButtonProps, AlertBanner, BalanceCard, type BalanceCardProps, ChatBubble, type ChatBubbleProps, type ChatRole, EmptyState, type EmptyStateProps, KButton, type KButtonProps, KCard, type KCardProps, KScreen, type KScreenProps, KText, type KTextProps, type KaleidoTheme, KaleidoThemeProvider, KaleidoUIProvider, type KaleidoUIProviderProps, ModeToggle, type ModeToggleProps, type NativeTypeLevel, NetworkBadge, NetworkChip, type NetworkChipProps, type NetworkKey, type NetworkType, QrCode, type QrCodeProps, SectionLabel, StatusBadge, type StatusType, SuggestionTile, type SuggestionTileProps, type ThemeMode, TypingDots, type TypingDotsProps, colors, fontFamily, fontWeight, kaleidoswapBrandConfig, kaleidoswapTokens, makeTheme, nativeType, radius, shadow, themes, transition, typeScale, useKaleidoTheme };
|
package/dist/native/index.js
CHANGED
|
@@ -1078,13 +1078,66 @@ var styles6 = StyleSheet6.create({
|
|
|
1078
1078
|
time: { fontSize: 12, marginTop: 8, fontWeight: "500" }
|
|
1079
1079
|
});
|
|
1080
1080
|
|
|
1081
|
+
// src/native/components/suggestion-tile.tsx
|
|
1082
|
+
import { Pressable as Pressable5, View as View14, StyleSheet as StyleSheet7 } from "react-native";
|
|
1083
|
+
import { jsx as jsx18, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1084
|
+
function SuggestionTile({ title, subtitle, icon, accent, onPress, style }) {
|
|
1085
|
+
const { theme } = useKaleidoTheme();
|
|
1086
|
+
const chipColor = accent ?? theme.primary;
|
|
1087
|
+
return /* @__PURE__ */ jsxs10(
|
|
1088
|
+
Pressable5,
|
|
1089
|
+
{
|
|
1090
|
+
onPress,
|
|
1091
|
+
accessibilityRole: "button",
|
|
1092
|
+
accessibilityLabel: title,
|
|
1093
|
+
accessibilityHint: subtitle,
|
|
1094
|
+
style: ({ pressed }) => [
|
|
1095
|
+
styles7.card,
|
|
1096
|
+
{
|
|
1097
|
+
backgroundColor: theme.card,
|
|
1098
|
+
borderColor: theme.border.subtle,
|
|
1099
|
+
opacity: pressed ? 0.85 : 1
|
|
1100
|
+
},
|
|
1101
|
+
style
|
|
1102
|
+
],
|
|
1103
|
+
children: [
|
|
1104
|
+
/* @__PURE__ */ jsx18(View14, { style: [styles7.chip, { backgroundColor: chipColor }], children: icon(theme.text.onFill, 18) }),
|
|
1105
|
+
/* @__PURE__ */ jsxs10(View14, { style: styles7.textArea, children: [
|
|
1106
|
+
/* @__PURE__ */ jsx18(KText, { variant: "caption", weight: "semibold", numberOfLines: 1, children: title }),
|
|
1107
|
+
subtitle ? /* @__PURE__ */ jsx18(KText, { variant: "tiny", tone: "muted", numberOfLines: 2, style: { marginTop: 2 }, children: subtitle }) : null
|
|
1108
|
+
] })
|
|
1109
|
+
]
|
|
1110
|
+
}
|
|
1111
|
+
);
|
|
1112
|
+
}
|
|
1113
|
+
var styles7 = StyleSheet7.create({
|
|
1114
|
+
card: {
|
|
1115
|
+
flex: 1,
|
|
1116
|
+
flexDirection: "row",
|
|
1117
|
+
alignItems: "center",
|
|
1118
|
+
gap: 10,
|
|
1119
|
+
paddingVertical: 12,
|
|
1120
|
+
paddingHorizontal: 12,
|
|
1121
|
+
borderRadius: 16,
|
|
1122
|
+
borderWidth: 1
|
|
1123
|
+
},
|
|
1124
|
+
chip: {
|
|
1125
|
+
width: 36,
|
|
1126
|
+
height: 36,
|
|
1127
|
+
borderRadius: 12,
|
|
1128
|
+
justifyContent: "center",
|
|
1129
|
+
alignItems: "center"
|
|
1130
|
+
},
|
|
1131
|
+
textArea: { flex: 1 }
|
|
1132
|
+
});
|
|
1133
|
+
|
|
1081
1134
|
// src/native/components/mode-toggle.tsx
|
|
1082
|
-
import { Pressable as
|
|
1083
|
-
import { jsx as
|
|
1135
|
+
import { Pressable as Pressable6, View as View15 } from "react-native";
|
|
1136
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1084
1137
|
function ModeToggle({ icon, size = 40, onToggle }) {
|
|
1085
1138
|
const { theme, mode, toggleMode } = useKaleidoTheme();
|
|
1086
|
-
return /* @__PURE__ */
|
|
1087
|
-
|
|
1139
|
+
return /* @__PURE__ */ jsx19(
|
|
1140
|
+
Pressable6,
|
|
1088
1141
|
{
|
|
1089
1142
|
accessibilityRole: "switch",
|
|
1090
1143
|
accessibilityState: { checked: mode === "dark" },
|
|
@@ -1104,7 +1157,7 @@ function ModeToggle({ icon, size = 40, onToggle }) {
|
|
|
1104
1157
|
justifyContent: "center",
|
|
1105
1158
|
opacity: pressed ? 0.85 : 1
|
|
1106
1159
|
}),
|
|
1107
|
-
children: /* @__PURE__ */
|
|
1160
|
+
children: /* @__PURE__ */ jsx19(View15, { children: icon(mode, theme.text.primary, Math.round(size * 0.5)) })
|
|
1108
1161
|
}
|
|
1109
1162
|
);
|
|
1110
1163
|
}
|
|
@@ -1200,6 +1253,7 @@ export {
|
|
|
1200
1253
|
SectionLabel,
|
|
1201
1254
|
SeedPhrase,
|
|
1202
1255
|
StatusBadge,
|
|
1256
|
+
SuggestionTile,
|
|
1203
1257
|
ThemeProvider2 as ThemeProvider,
|
|
1204
1258
|
TransactionItem,
|
|
1205
1259
|
TransactionList,
|
package/package.json
CHANGED