kaleido-ui 0.1.51 → 0.1.53

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.
@@ -56,6 +56,7 @@ __export(native_exports, {
56
56
  ThemeProvider: () => import_wdk_uikit_react_native2.ThemeProvider,
57
57
  TransactionItem: () => import_wdk_uikit_react_native2.TransactionItem,
58
58
  TransactionList: () => import_wdk_uikit_react_native2.TransactionList,
59
+ TypingDots: () => TypingDots,
59
60
  colors: () => colors,
60
61
  fontFamily: () => fontFamily,
61
62
  fontWeight: () => fontWeight,
@@ -515,9 +516,11 @@ var dark = {
515
516
  background: "#0D1813",
516
517
  card: "#121C16",
517
518
  cardElevated: "#17231C",
518
- primary: "#15E99A",
519
- primaryFg: "#062318",
520
- violet: "#8B5CFF",
519
+ // Brand primary CTA green — per DESIGN.md `brand.primary`, identical to web.
520
+ // (#15E99A is the decorative logo brandmark, kept only in gradientBrand / QR.)
521
+ primary: "#2BEE79",
522
+ primaryFg: "#051B10",
523
+ violet: "#6F32FF",
521
524
  violetSurface: "rgba(111, 50, 255, 0.18)",
522
525
  success: "#2BEE79",
523
526
  warning: "#FACC15",
@@ -532,7 +535,8 @@ var dark = {
532
535
  secondary: "rgba(255, 255, 255, 0.64)",
533
536
  muted: "rgba(255, 255, 255, 0.42)",
534
537
  disabled: "rgba(255, 255, 255, 0.26)",
535
- onAccent: "#062318",
538
+ onAccent: "#051B10",
539
+ // text on brand green — DESIGN.md `text.on-primary`
536
540
  onFill: "#FFFFFF"
537
541
  },
538
542
  border: {
@@ -996,13 +1000,64 @@ function EmptyState({ title, description, icon, action, style, ...rest }) {
996
1000
  ] });
997
1001
  }
998
1002
 
999
- // src/native/components/mode-toggle.tsx
1003
+ // src/native/components/typing-dots.tsx
1004
+ var import_react3 = require("react");
1000
1005
  var import_react_native14 = require("react-native");
1001
1006
  var import_jsx_runtime16 = require("react/jsx-runtime");
1007
+ function TypingDots({ label, color, style }) {
1008
+ const { theme, fontFamily: fontFamily2 } = useKaleidoTheme();
1009
+ const dots = (0, import_react3.useRef)([new import_react_native14.Animated.Value(0), new import_react_native14.Animated.Value(0), new import_react_native14.Animated.Value(0)]).current;
1010
+ (0, import_react3.useEffect)(() => {
1011
+ const make = (v) => import_react_native14.Animated.loop(
1012
+ import_react_native14.Animated.sequence([
1013
+ import_react_native14.Animated.timing(v, { toValue: 1, duration: 420, useNativeDriver: true }),
1014
+ import_react_native14.Animated.timing(v, { toValue: 0, duration: 420, useNativeDriver: true }),
1015
+ import_react_native14.Animated.delay(240)
1016
+ ])
1017
+ );
1018
+ const loops = dots.map(make);
1019
+ const timers = dots.map((_, i) => setTimeout(() => loops[i].start(), i * 160));
1020
+ return () => {
1021
+ timers.forEach(clearTimeout);
1022
+ loops.forEach((l) => l.stop());
1023
+ };
1024
+ }, [dots]);
1025
+ const dotColor = color ?? theme.primary;
1026
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native14.View, { style: [styles5.row, style], children: [
1027
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native14.View, { style: styles5.dotsRow, children: dots.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1028
+ import_react_native14.Animated.View,
1029
+ {
1030
+ style: {
1031
+ width: 7,
1032
+ height: 7,
1033
+ borderRadius: 3.5,
1034
+ marginHorizontal: 2.5,
1035
+ backgroundColor: dotColor,
1036
+ opacity: v.interpolate({ inputRange: [0, 1], outputRange: [0.35, 1] }),
1037
+ transform: [
1038
+ { translateY: v.interpolate({ inputRange: [0, 1], outputRange: [0, -5] }) },
1039
+ { scale: v.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1.1] }) }
1040
+ ]
1041
+ }
1042
+ },
1043
+ i
1044
+ )) }),
1045
+ label ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native14.Text, { style: [styles5.label, { color: theme.text.secondary, fontFamily: fontFamily2 }], children: label }) : null
1046
+ ] });
1047
+ }
1048
+ var styles5 = import_react_native14.StyleSheet.create({
1049
+ row: { flexDirection: "row", alignItems: "center" },
1050
+ dotsRow: { flexDirection: "row", alignItems: "center", height: 12 },
1051
+ label: { fontSize: 13, marginLeft: 10, fontWeight: "500" }
1052
+ });
1053
+
1054
+ // src/native/components/mode-toggle.tsx
1055
+ var import_react_native15 = require("react-native");
1056
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1002
1057
  function ModeToggle({ icon, size = 40, onToggle }) {
1003
1058
  const { theme, mode, toggleMode } = useKaleidoTheme();
1004
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1005
- import_react_native14.Pressable,
1059
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1060
+ import_react_native15.Pressable,
1006
1061
  {
1007
1062
  accessibilityRole: "switch",
1008
1063
  accessibilityState: { checked: mode === "dark" },
@@ -1022,7 +1077,7 @@ function ModeToggle({ icon, size = 40, onToggle }) {
1022
1077
  justifyContent: "center",
1023
1078
  opacity: pressed ? 0.85 : 1
1024
1079
  }),
1025
- children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native14.View, { children: icon(mode, theme.text.primary, Math.round(size * 0.5)) })
1080
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native15.View, { children: icon(mode, theme.text.primary, Math.round(size * 0.5)) })
1026
1081
  }
1027
1082
  );
1028
1083
  }
@@ -1121,6 +1176,7 @@ var transition = {
1121
1176
  ThemeProvider,
1122
1177
  TransactionItem,
1123
1178
  TransactionList,
1179
+ TypingDots,
1124
1180
  colors,
1125
1181
  fontFamily,
1126
1182
  fontWeight,
@@ -370,6 +370,15 @@ interface EmptyStateProps extends ViewProps {
370
370
  }
371
371
  declare function EmptyState({ title, description, icon, action, style, ...rest }: EmptyStateProps): react_jsx_runtime.JSX.Element;
372
372
 
373
+ interface TypingDotsProps {
374
+ /** Optional caption shown next to the dots (e.g. "Thinking on-device…"). */
375
+ label?: string;
376
+ /** Dot color override. Defaults to the brand green (`theme.primary`). */
377
+ color?: string;
378
+ style?: ViewStyle;
379
+ }
380
+ declare function TypingDots({ label, color, style }: TypingDotsProps): react_jsx_runtime.JSX.Element;
381
+
373
382
  interface ModeToggleProps {
374
383
  icon: (mode: ThemeMode, color: string, size: number) => React.ReactNode;
375
384
  size?: number;
@@ -563,4 +572,4 @@ declare const transition: {
563
572
  readonly slow: "300ms ease-out";
564
573
  };
565
574
 
566
- export { ActionButton, type ActionButtonProps, AlertBanner, BalanceCard, type BalanceCardProps, 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, colors, fontFamily, fontWeight, kaleidoswapBrandConfig, kaleidoswapTokens, makeTheme, nativeType, radius, shadow, themes, transition, typeScale, useKaleidoTheme };
575
+ export { ActionButton, type ActionButtonProps, AlertBanner, BalanceCard, type BalanceCardProps, 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 };
@@ -370,6 +370,15 @@ interface EmptyStateProps extends ViewProps {
370
370
  }
371
371
  declare function EmptyState({ title, description, icon, action, style, ...rest }: EmptyStateProps): react_jsx_runtime.JSX.Element;
372
372
 
373
+ interface TypingDotsProps {
374
+ /** Optional caption shown next to the dots (e.g. "Thinking on-device…"). */
375
+ label?: string;
376
+ /** Dot color override. Defaults to the brand green (`theme.primary`). */
377
+ color?: string;
378
+ style?: ViewStyle;
379
+ }
380
+ declare function TypingDots({ label, color, style }: TypingDotsProps): react_jsx_runtime.JSX.Element;
381
+
373
382
  interface ModeToggleProps {
374
383
  icon: (mode: ThemeMode, color: string, size: number) => React.ReactNode;
375
384
  size?: number;
@@ -563,4 +572,4 @@ declare const transition: {
563
572
  readonly slow: "300ms ease-out";
564
573
  };
565
574
 
566
- export { ActionButton, type ActionButtonProps, AlertBanner, BalanceCard, type BalanceCardProps, 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, colors, fontFamily, fontWeight, kaleidoswapBrandConfig, kaleidoswapTokens, makeTheme, nativeType, radius, shadow, themes, transition, typeScale, useKaleidoTheme };
575
+ export { ActionButton, type ActionButtonProps, AlertBanner, BalanceCard, type BalanceCardProps, 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 };
@@ -452,9 +452,11 @@ var dark = {
452
452
  background: "#0D1813",
453
453
  card: "#121C16",
454
454
  cardElevated: "#17231C",
455
- primary: "#15E99A",
456
- primaryFg: "#062318",
457
- violet: "#8B5CFF",
455
+ // Brand primary CTA green — per DESIGN.md `brand.primary`, identical to web.
456
+ // (#15E99A is the decorative logo brandmark, kept only in gradientBrand / QR.)
457
+ primary: "#2BEE79",
458
+ primaryFg: "#051B10",
459
+ violet: "#6F32FF",
458
460
  violetSurface: "rgba(111, 50, 255, 0.18)",
459
461
  success: "#2BEE79",
460
462
  warning: "#FACC15",
@@ -469,7 +471,8 @@ var dark = {
469
471
  secondary: "rgba(255, 255, 255, 0.64)",
470
472
  muted: "rgba(255, 255, 255, 0.42)",
471
473
  disabled: "rgba(255, 255, 255, 0.26)",
472
- onAccent: "#062318",
474
+ onAccent: "#051B10",
475
+ // text on brand green — DESIGN.md `text.on-primary`
473
476
  onFill: "#FFFFFF"
474
477
  },
475
478
  border: {
@@ -937,12 +940,63 @@ function EmptyState({ title, description, icon, action, style, ...rest }) {
937
940
  ] });
938
941
  }
939
942
 
943
+ // src/native/components/typing-dots.tsx
944
+ import { useEffect, useRef } from "react";
945
+ import { View as View12, Text as Text6, StyleSheet as StyleSheet5, Animated } from "react-native";
946
+ import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
947
+ function TypingDots({ label, color, style }) {
948
+ const { theme, fontFamily: fontFamily2 } = useKaleidoTheme();
949
+ const dots = useRef([new Animated.Value(0), new Animated.Value(0), new Animated.Value(0)]).current;
950
+ useEffect(() => {
951
+ const make = (v) => Animated.loop(
952
+ Animated.sequence([
953
+ Animated.timing(v, { toValue: 1, duration: 420, useNativeDriver: true }),
954
+ Animated.timing(v, { toValue: 0, duration: 420, useNativeDriver: true }),
955
+ Animated.delay(240)
956
+ ])
957
+ );
958
+ const loops = dots.map(make);
959
+ const timers = dots.map((_, i) => setTimeout(() => loops[i].start(), i * 160));
960
+ return () => {
961
+ timers.forEach(clearTimeout);
962
+ loops.forEach((l) => l.stop());
963
+ };
964
+ }, [dots]);
965
+ const dotColor = color ?? theme.primary;
966
+ return /* @__PURE__ */ jsxs8(View12, { style: [styles5.row, style], children: [
967
+ /* @__PURE__ */ jsx16(View12, { style: styles5.dotsRow, children: dots.map((v, i) => /* @__PURE__ */ jsx16(
968
+ Animated.View,
969
+ {
970
+ style: {
971
+ width: 7,
972
+ height: 7,
973
+ borderRadius: 3.5,
974
+ marginHorizontal: 2.5,
975
+ backgroundColor: dotColor,
976
+ opacity: v.interpolate({ inputRange: [0, 1], outputRange: [0.35, 1] }),
977
+ transform: [
978
+ { translateY: v.interpolate({ inputRange: [0, 1], outputRange: [0, -5] }) },
979
+ { scale: v.interpolate({ inputRange: [0, 1], outputRange: [0.85, 1.1] }) }
980
+ ]
981
+ }
982
+ },
983
+ i
984
+ )) }),
985
+ label ? /* @__PURE__ */ jsx16(Text6, { style: [styles5.label, { color: theme.text.secondary, fontFamily: fontFamily2 }], children: label }) : null
986
+ ] });
987
+ }
988
+ var styles5 = StyleSheet5.create({
989
+ row: { flexDirection: "row", alignItems: "center" },
990
+ dotsRow: { flexDirection: "row", alignItems: "center", height: 12 },
991
+ label: { fontSize: 13, marginLeft: 10, fontWeight: "500" }
992
+ });
993
+
940
994
  // src/native/components/mode-toggle.tsx
941
- import { Pressable as Pressable4, View as View12 } from "react-native";
942
- import { jsx as jsx16 } from "react/jsx-runtime";
995
+ import { Pressable as Pressable4, View as View13 } from "react-native";
996
+ import { jsx as jsx17 } from "react/jsx-runtime";
943
997
  function ModeToggle({ icon, size = 40, onToggle }) {
944
998
  const { theme, mode, toggleMode } = useKaleidoTheme();
945
- return /* @__PURE__ */ jsx16(
999
+ return /* @__PURE__ */ jsx17(
946
1000
  Pressable4,
947
1001
  {
948
1002
  accessibilityRole: "switch",
@@ -963,7 +1017,7 @@ function ModeToggle({ icon, size = 40, onToggle }) {
963
1017
  justifyContent: "center",
964
1018
  opacity: pressed ? 0.85 : 1
965
1019
  }),
966
- children: /* @__PURE__ */ jsx16(View12, { children: icon(mode, theme.text.primary, Math.round(size * 0.5)) })
1020
+ children: /* @__PURE__ */ jsx17(View13, { children: icon(mode, theme.text.primary, Math.round(size * 0.5)) })
967
1021
  }
968
1022
  );
969
1023
  }
@@ -1061,6 +1115,7 @@ export {
1061
1115
  ThemeProvider2 as ThemeProvider,
1062
1116
  TransactionItem,
1063
1117
  TransactionList,
1118
+ TypingDots,
1064
1119
  colors,
1065
1120
  fontFamily,
1066
1121
  fontWeight,
@@ -379,9 +379,11 @@ var dark = {
379
379
  background: "#0D1813",
380
380
  card: "#121C16",
381
381
  cardElevated: "#17231C",
382
- primary: "#15E99A",
383
- primaryFg: "#062318",
384
- violet: "#8B5CFF",
382
+ // Brand primary CTA green — per DESIGN.md `brand.primary`, identical to web.
383
+ // (#15E99A is the decorative logo brandmark, kept only in gradientBrand / QR.)
384
+ primary: "#2BEE79",
385
+ primaryFg: "#051B10",
386
+ violet: "#6F32FF",
385
387
  violetSurface: "rgba(111, 50, 255, 0.18)",
386
388
  success: "#2BEE79",
387
389
  warning: "#FACC15",
@@ -396,7 +398,8 @@ var dark = {
396
398
  secondary: "rgba(255, 255, 255, 0.64)",
397
399
  muted: "rgba(255, 255, 255, 0.42)",
398
400
  disabled: "rgba(255, 255, 255, 0.26)",
399
- onAccent: "#062318",
401
+ onAccent: "#051B10",
402
+ // text on brand green — DESIGN.md `text.on-primary`
400
403
  onFill: "#FFFFFF"
401
404
  },
402
405
  border: {
@@ -335,9 +335,11 @@ var dark = {
335
335
  background: "#0D1813",
336
336
  card: "#121C16",
337
337
  cardElevated: "#17231C",
338
- primary: "#15E99A",
339
- primaryFg: "#062318",
340
- violet: "#8B5CFF",
338
+ // Brand primary CTA green — per DESIGN.md `brand.primary`, identical to web.
339
+ // (#15E99A is the decorative logo brandmark, kept only in gradientBrand / QR.)
340
+ primary: "#2BEE79",
341
+ primaryFg: "#051B10",
342
+ violet: "#6F32FF",
341
343
  violetSurface: "rgba(111, 50, 255, 0.18)",
342
344
  success: "#2BEE79",
343
345
  warning: "#FACC15",
@@ -352,7 +354,8 @@ var dark = {
352
354
  secondary: "rgba(255, 255, 255, 0.64)",
353
355
  muted: "rgba(255, 255, 255, 0.42)",
354
356
  disabled: "rgba(255, 255, 255, 0.26)",
355
- onAccent: "#062318",
357
+ onAccent: "#051B10",
358
+ // text on brand green — DESIGN.md `text.on-primary`
356
359
  onFill: "#FFFFFF"
357
360
  },
358
361
  border: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kaleido-ui",
3
- "version": "0.1.51",
3
+ "version": "0.1.53",
4
4
  "description": "KaleidoSwap shared UI library — design tokens, web components (Tailwind + Radix), and React Native components extending WDK UI Kit",
5
5
  "license": "MIT",
6
6
  "type": "module",