@sudobility/components-rn 1.0.42 → 1.0.43

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.
Files changed (115) hide show
  1. package/dist/index.cjs.js +895 -299
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +896 -300
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/ui/Avatar/Avatar.d.ts.map +1 -1
  6. package/dist/ui/Breadcrumb/Breadcrumb.d.ts.map +1 -1
  7. package/dist/ui/BreadcrumbNav/BreadcrumbNav.d.ts.map +1 -1
  8. package/dist/ui/CTASection/CTASection.d.ts.map +1 -1
  9. package/dist/ui/Calendar/Calendar.d.ts.map +1 -1
  10. package/dist/ui/ChainBadge/ChainBadge.d.ts.map +1 -1
  11. package/dist/ui/Checkbox/Checkbox.d.ts +0 -22
  12. package/dist/ui/Checkbox/Checkbox.d.ts.map +1 -1
  13. package/dist/ui/Code/Code.d.ts +0 -17
  14. package/dist/ui/Code/Code.d.ts.map +1 -1
  15. package/dist/ui/CodeDisplay/CodeDisplay.d.ts +0 -21
  16. package/dist/ui/CodeDisplay/CodeDisplay.d.ts.map +1 -1
  17. package/dist/ui/CollapsibleSection/CollapsibleSection.d.ts.map +1 -1
  18. package/dist/ui/Combobox/Combobox.d.ts.map +1 -1
  19. package/dist/ui/Command/Command.d.ts.map +1 -1
  20. package/dist/ui/DashboardStatCard/DashboardStatCard.d.ts +0 -17
  21. package/dist/ui/DashboardStatCard/DashboardStatCard.d.ts.map +1 -1
  22. package/dist/ui/DataList/DataList.d.ts.map +1 -1
  23. package/dist/ui/Dropdown/Dropdown.d.ts.map +1 -1
  24. package/dist/ui/ExternalLink/ExternalLink.d.ts.map +1 -1
  25. package/dist/ui/FeatureCard/FeatureCard.d.ts.map +1 -1
  26. package/dist/ui/FeatureGrid/FeatureGrid.d.ts.map +1 -1
  27. package/dist/ui/GradientIconContainer/GradientIconContainer.d.ts +0 -13
  28. package/dist/ui/GradientIconContainer/GradientIconContainer.d.ts.map +1 -1
  29. package/dist/ui/HelperText/HelperText.d.ts.map +1 -1
  30. package/dist/ui/IconContainer/IconContainer.d.ts +0 -13
  31. package/dist/ui/IconContainer/IconContainer.d.ts.map +1 -1
  32. package/dist/ui/IconText/IconText.d.ts.map +1 -1
  33. package/dist/ui/InfiniteScroll/InfiniteScroll.d.ts.map +1 -1
  34. package/dist/ui/KeyValuePair/KeyValuePair.d.ts.map +1 -1
  35. package/dist/ui/Link/Link.d.ts.map +1 -1
  36. package/dist/ui/ListItemWithAction/ListItemWithAction.d.ts.map +1 -1
  37. package/dist/ui/Modal/Modal.d.ts.map +1 -1
  38. package/dist/ui/MultiSelect/MultiSelect.d.ts.map +1 -1
  39. package/dist/ui/NavigationList/NavigationList.d.ts.map +1 -1
  40. package/dist/ui/PageSectionHeader/PageSectionHeader.d.ts.map +1 -1
  41. package/dist/ui/Pagination/Pagination.d.ts.map +1 -1
  42. package/dist/ui/PhoneInput/PhoneInput.d.ts.map +1 -1
  43. package/dist/ui/PopupSelect/PopupSelect.d.ts.map +1 -1
  44. package/dist/ui/Progress/Progress.d.ts +0 -15
  45. package/dist/ui/Progress/Progress.d.ts.map +1 -1
  46. package/dist/ui/PromotionalBanner/PromotionalBanner.d.ts.map +1 -1
  47. package/dist/ui/SearchInput/SearchInput.d.ts.map +1 -1
  48. package/dist/ui/SectionHeader/SectionHeader.d.ts.map +1 -1
  49. package/dist/ui/Select/Select.d.ts.map +1 -1
  50. package/dist/ui/SettingsList/SettingsList.d.ts.map +1 -1
  51. package/dist/ui/Sheet/Sheet.d.ts.map +1 -1
  52. package/dist/ui/SideNav/SideNav.d.ts.map +1 -1
  53. package/dist/ui/SmartLink/SmartLink.d.ts.map +1 -1
  54. package/dist/ui/StatDisplay/StatDisplay.d.ts +0 -12
  55. package/dist/ui/StatDisplay/StatDisplay.d.ts.map +1 -1
  56. package/dist/ui/StepList/StepList.d.ts.map +1 -1
  57. package/dist/ui/Table/Table.d.ts.map +1 -1
  58. package/dist/ui/Tabs/Tabs.d.ts.map +1 -1
  59. package/dist/ui/TextArea/TextArea.d.ts.map +1 -1
  60. package/dist/ui/TextInputModal/TextInputModal.d.ts.map +1 -1
  61. package/dist/ui/Tooltip/Tooltip.d.ts +0 -20
  62. package/dist/ui/Tooltip/Tooltip.d.ts.map +1 -1
  63. package/dist/ui/TransferList/TransferList.d.ts.map +1 -1
  64. package/package.json +1 -1
  65. package/src/ui/Avatar/Avatar.tsx +6 -5
  66. package/src/ui/Breadcrumb/Breadcrumb.tsx +8 -5
  67. package/src/ui/BreadcrumbNav/BreadcrumbNav.tsx +22 -3
  68. package/src/ui/CTASection/CTASection.tsx +8 -6
  69. package/src/ui/Calendar/Calendar.tsx +35 -6
  70. package/src/ui/ChainBadge/ChainBadge.tsx +67 -42
  71. package/src/ui/Checkbox/Checkbox.tsx +47 -20
  72. package/src/ui/Code/Code.tsx +51 -21
  73. package/src/ui/CodeDisplay/CodeDisplay.tsx +46 -20
  74. package/src/ui/CollapsibleSection/CollapsibleSection.tsx +7 -3
  75. package/src/ui/Combobox/Combobox.tsx +2 -1
  76. package/src/ui/Command/Command.tsx +2 -1
  77. package/src/ui/DashboardStatCard/DashboardStatCard.tsx +29 -11
  78. package/src/ui/DataList/DataList.tsx +23 -5
  79. package/src/ui/Dropdown/Dropdown.tsx +4 -1
  80. package/src/ui/ExternalLink/ExternalLink.tsx +5 -4
  81. package/src/ui/FeatureCard/FeatureCard.tsx +60 -29
  82. package/src/ui/FeatureGrid/FeatureGrid.tsx +7 -7
  83. package/src/ui/GradientIconContainer/GradientIconContainer.tsx +33 -8
  84. package/src/ui/HelperText/HelperText.tsx +9 -8
  85. package/src/ui/IconContainer/IconContainer.tsx +26 -9
  86. package/src/ui/IconText/IconText.tsx +6 -5
  87. package/src/ui/InfiniteScroll/InfiniteScroll.tsx +2 -1
  88. package/src/ui/KeyValuePair/KeyValuePair.tsx +12 -5
  89. package/src/ui/Link/Link.tsx +6 -5
  90. package/src/ui/ListItemWithAction/ListItemWithAction.tsx +2 -1
  91. package/src/ui/Modal/Modal.tsx +16 -2
  92. package/src/ui/MultiSelect/MultiSelect.tsx +2 -1
  93. package/src/ui/NavigationList/NavigationList.tsx +17 -3
  94. package/src/ui/PageSectionHeader/PageSectionHeader.tsx +2 -1
  95. package/src/ui/Pagination/Pagination.tsx +9 -6
  96. package/src/ui/PhoneInput/PhoneInput.tsx +3 -2
  97. package/src/ui/PopupSelect/PopupSelect.tsx +15 -14
  98. package/src/ui/Progress/Progress.tsx +63 -14
  99. package/src/ui/PromotionalBanner/PromotionalBanner.tsx +7 -4
  100. package/src/ui/SearchInput/SearchInput.tsx +3 -2
  101. package/src/ui/SectionHeader/SectionHeader.tsx +4 -1
  102. package/src/ui/Select/Select.tsx +20 -5
  103. package/src/ui/SettingsList/SettingsList.tsx +4 -1
  104. package/src/ui/Sheet/Sheet.tsx +20 -3
  105. package/src/ui/SideNav/SideNav.tsx +11 -2
  106. package/src/ui/SmartLink/SmartLink.tsx +6 -3
  107. package/src/ui/Spinner/Spinner.tsx +1 -1
  108. package/src/ui/StatDisplay/StatDisplay.tsx +59 -23
  109. package/src/ui/StepList/StepList.tsx +25 -3
  110. package/src/ui/Table/Table.tsx +22 -9
  111. package/src/ui/Tabs/Tabs.tsx +7 -2
  112. package/src/ui/TextArea/TextArea.tsx +2 -1
  113. package/src/ui/TextInputModal/TextInputModal.tsx +2 -1
  114. package/src/ui/Tooltip/Tooltip.tsx +47 -9
  115. package/src/ui/TransferList/TransferList.tsx +2 -1
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { useState, useRef, useEffect } from 'react';
3
3
  import { View, Text, Pressable, Modal, Animated } from 'react-native';
4
4
  import { cn } from '../../lib/utils';
5
+ import { colors, designTokens } from '@sudobility/design';
5
6
 
6
7
  export interface TooltipProps {
7
8
  /** Content to display in the tooltip */
@@ -40,6 +41,45 @@ export interface TooltipProps {
40
41
  * </Tooltip>
41
42
  * ```
42
43
  */
44
+
45
+ // Lazily derive tooltip colors from DS to avoid ESM issues in tests.
46
+ let _tooltipColors: Record<string, string> | null = null;
47
+ function getTooltipColors() {
48
+ if (!_tooltipColors) {
49
+ const btn = colors.component.button;
50
+ // Extract bg-* from DS button base for solid tooltip backgrounds
51
+ function extractBg(base: string, darkStr: string) {
52
+ const bg =
53
+ base
54
+ .split(' ')
55
+ .find(
56
+ c =>
57
+ c.startsWith('bg-') &&
58
+ !c.includes('hover:') &&
59
+ !c.includes('active:')
60
+ ) || '';
61
+ const darkBg =
62
+ darkStr
63
+ .split(' ')
64
+ .find(
65
+ c =>
66
+ c.startsWith('dark:bg-') &&
67
+ !c.includes('hover:') &&
68
+ !c.includes('active:')
69
+ ) || '';
70
+ return `${bg} ${darkBg}`;
71
+ }
72
+ _tooltipColors = {
73
+ default: 'bg-gray-900 dark:bg-gray-700',
74
+ info: extractBg(btn.primary.base, btn.primary.dark),
75
+ success: extractBg(btn.success.base, btn.success.dark),
76
+ warning: 'bg-yellow-600 dark:bg-yellow-500', // DS has no yellow button; local fallback
77
+ error: extractBg(btn.destructive.base, btn.destructive.dark),
78
+ };
79
+ }
80
+ return _tooltipColors;
81
+ }
82
+
43
83
  export const Tooltip: React.FC<TooltipProps> = ({
44
84
  content,
45
85
  children,
@@ -98,14 +138,8 @@ export const Tooltip: React.FC<TooltipProps> = ({
98
138
  setIsVisible(false);
99
139
  };
100
140
 
101
- // Variant styles
102
- const variantClasses = {
103
- default: 'bg-gray-900 dark:bg-gray-700',
104
- info: 'bg-blue-600 dark:bg-blue-500',
105
- success: 'bg-green-600 dark:bg-green-500',
106
- warning: 'bg-yellow-600 dark:bg-yellow-500',
107
- error: 'bg-red-600 dark:bg-red-500',
108
- };
141
+ // Variant styles from DS
142
+ const variantClasses = getTooltipColors();
109
143
 
110
144
  // Calculate tooltip position
111
145
  const getTooltipPosition = () => {
@@ -173,7 +207,11 @@ export const Tooltip: React.FC<TooltipProps> = ({
173
207
  className
174
208
  )}
175
209
  >
176
- <Text className='text-xs font-medium text-white'>{content}</Text>
210
+ <Text
211
+ className={`${designTokens.typography.size.xs} ${designTokens.typography.weight.medium} text-white`}
212
+ >
213
+ {content}
214
+ </Text>
177
215
  </View>
178
216
  </Animated.View>
179
217
  </Pressable>
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import { useState, useCallback } from 'react';
3
3
  import { View, Text, TextInput, Pressable, ScrollView } from 'react-native';
4
4
  import { cn } from '../../lib/utils';
5
+ import { colors } from '@sudobility/design';
5
6
 
6
7
  export interface TransferListItem {
7
8
  /** Item ID */
@@ -173,7 +174,7 @@ export const TransferList: React.FC<TransferListProps> = ({
173
174
  value={searchValue}
174
175
  onChangeText={onSearchChange}
175
176
  placeholder={searchPlaceholder}
176
- placeholderTextColor='#9ca3af'
177
+ placeholderTextColor={colors.raw.neutral[400]}
177
178
  className='px-3 py-2 text-sm bg-gray-50 dark:bg-gray-800 text-gray-900 dark:text-white border border-gray-300 dark:border-gray-700 rounded-md'
178
179
  />
179
180
  </View>