dash-ui-kit 1.0.94 → 2.1.0-dev

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 (201) hide show
  1. package/README.md +52 -0
  2. package/dist/react/components/accordion/index.cjs.js +193 -0
  3. package/dist/react/components/accordion/index.cjs.js.map +1 -0
  4. package/dist/react/components/accordion/index.esm.js +169 -0
  5. package/dist/react/components/accordion/index.esm.js.map +1 -0
  6. package/dist/react/components/avatar/index.cjs.js +39 -0
  7. package/dist/react/components/avatar/index.cjs.js.map +1 -0
  8. package/dist/react/components/avatar/index.esm.js +34 -0
  9. package/dist/react/components/avatar/index.esm.js.map +1 -0
  10. package/dist/react/components/badge/index.cjs.js +97 -0
  11. package/dist/react/components/badge/index.cjs.js.map +1 -0
  12. package/dist/react/components/badge/index.d.ts +10 -1
  13. package/dist/react/components/badge/index.esm.js +92 -0
  14. package/dist/react/components/badge/index.esm.js.map +1 -0
  15. package/dist/react/components/bigNumber/index.cjs.js +100 -0
  16. package/dist/react/components/bigNumber/index.cjs.js.map +1 -0
  17. package/dist/react/components/bigNumber/index.esm.js +95 -0
  18. package/dist/react/components/bigNumber/index.esm.js.map +1 -0
  19. package/dist/react/components/button/index.cjs.js +540 -0
  20. package/dist/react/components/button/index.cjs.js.map +1 -0
  21. package/dist/react/components/button/index.d.ts +7 -1
  22. package/dist/react/components/button/index.esm.js +535 -0
  23. package/dist/react/components/button/index.esm.js.map +1 -0
  24. package/dist/react/components/copyButton/index.cjs.js +95 -0
  25. package/dist/react/components/copyButton/index.cjs.js.map +1 -0
  26. package/dist/react/components/copyButton/index.esm.js +71 -0
  27. package/dist/react/components/copyButton/index.esm.js.map +1 -0
  28. package/dist/react/components/dashLogo/index.cjs.js +74 -0
  29. package/dist/react/components/dashLogo/index.cjs.js.map +1 -0
  30. package/dist/react/components/dashLogo/index.esm.js +69 -0
  31. package/dist/react/components/dashLogo/index.esm.js.map +1 -0
  32. package/dist/react/components/dateBlock/index.cjs.js +120 -0
  33. package/dist/react/components/dateBlock/index.cjs.js.map +1 -0
  34. package/dist/react/components/dateBlock/index.esm.js +115 -0
  35. package/dist/react/components/dateBlock/index.esm.js.map +1 -0
  36. package/dist/react/components/dialog/index.cjs.js +292 -0
  37. package/dist/react/components/dialog/index.cjs.js.map +1 -0
  38. package/dist/react/components/dialog/index.esm.js +270 -0
  39. package/dist/react/components/dialog/index.esm.js.map +1 -0
  40. package/dist/react/components/heading/index.cjs.js +65 -0
  41. package/dist/react/components/heading/index.cjs.js.map +1 -0
  42. package/dist/react/components/heading/index.d.ts +4 -1
  43. package/dist/react/components/heading/index.esm.js +63 -0
  44. package/dist/react/components/heading/index.esm.js.map +1 -0
  45. package/dist/react/components/icons/index.cjs.js +1173 -0
  46. package/dist/react/components/icons/index.cjs.js.map +1 -0
  47. package/dist/react/components/icons/index.d.ts +2 -0
  48. package/dist/react/components/icons/index.esm.js +1128 -0
  49. package/dist/react/components/icons/index.esm.js.map +1 -0
  50. package/dist/react/components/identifier/index.cjs.js +286 -0
  51. package/dist/react/components/identifier/index.cjs.js.map +1 -0
  52. package/dist/react/components/identifier/index.esm.js +282 -0
  53. package/dist/react/components/identifier/index.esm.js.map +1 -0
  54. package/dist/react/components/index.cjs.js +101 -0
  55. package/dist/react/components/index.cjs.js.map +1 -0
  56. package/dist/react/components/index.d.ts +1 -1
  57. package/dist/react/components/index.esm.js +29 -0
  58. package/dist/react/components/index.esm.js.map +1 -0
  59. package/dist/react/components/input/index.cjs.js +242 -0
  60. package/dist/react/components/input/index.cjs.js.map +1 -0
  61. package/dist/react/components/input/index.d.ts +4 -0
  62. package/dist/react/components/input/index.esm.js +237 -0
  63. package/dist/react/components/input/index.esm.js.map +1 -0
  64. package/dist/react/components/list/index.cjs.js +49 -0
  65. package/dist/react/components/list/index.cjs.js.map +1 -0
  66. package/dist/react/components/list/index.esm.js +47 -0
  67. package/dist/react/components/list/index.esm.js.map +1 -0
  68. package/dist/react/components/notActive/index.cjs.js +40 -0
  69. package/dist/react/components/notActive/index.cjs.js.map +1 -0
  70. package/dist/react/components/notActive/index.esm.js +38 -0
  71. package/dist/react/components/notActive/index.esm.js.map +1 -0
  72. package/dist/react/components/overlayMenu/index.cjs.js +469 -0
  73. package/dist/react/components/overlayMenu/index.cjs.js.map +1 -0
  74. package/dist/react/components/overlayMenu/index.d.ts +9 -10
  75. package/dist/react/components/overlayMenu/index.esm.js +464 -0
  76. package/dist/react/components/overlayMenu/index.esm.js.map +1 -0
  77. package/dist/react/components/overlaySelect/index.cjs.js +350 -0
  78. package/dist/react/components/overlaySelect/index.cjs.js.map +1 -0
  79. package/dist/react/components/overlaySelect/index.d.ts +4 -0
  80. package/dist/react/components/overlaySelect/index.esm.js +345 -0
  81. package/dist/react/components/overlaySelect/index.esm.js.map +1 -0
  82. package/dist/react/components/progressStepBar/index.cjs.js +54 -0
  83. package/dist/react/components/progressStepBar/index.cjs.js.map +1 -0
  84. package/dist/react/components/progressStepBar/index.d.ts +5 -2
  85. package/dist/react/components/progressStepBar/index.esm.js +52 -0
  86. package/dist/react/components/progressStepBar/index.esm.js.map +1 -0
  87. package/dist/react/components/select/index.cjs.js +241 -0
  88. package/dist/react/components/select/index.cjs.js.map +1 -0
  89. package/dist/react/components/select/index.d.ts +4 -0
  90. package/dist/react/components/select/index.esm.js +217 -0
  91. package/dist/react/components/select/index.esm.js.map +1 -0
  92. package/dist/react/components/switch/index.cjs.js +184 -0
  93. package/dist/react/components/switch/index.cjs.js.map +1 -0
  94. package/dist/react/components/switch/index.esm.js +179 -0
  95. package/dist/react/components/switch/index.esm.js.map +1 -0
  96. package/dist/react/components/tabs/index.cjs.js +178 -0
  97. package/dist/react/components/tabs/index.cjs.js.map +1 -0
  98. package/dist/react/components/tabs/index.esm.js +154 -0
  99. package/dist/react/components/tabs/index.esm.js.map +1 -0
  100. package/dist/react/components/text/index.cjs.js +126 -0
  101. package/dist/react/components/text/index.cjs.js.map +1 -0
  102. package/dist/react/components/text/index.d.ts +5 -0
  103. package/dist/react/components/text/index.esm.js +121 -0
  104. package/dist/react/components/text/index.esm.js.map +1 -0
  105. package/dist/react/components/textarea/index.cjs.js +260 -0
  106. package/dist/react/components/textarea/index.cjs.js.map +1 -0
  107. package/dist/react/components/textarea/index.d.ts +4 -0
  108. package/dist/react/components/textarea/index.esm.js +255 -0
  109. package/dist/react/components/textarea/index.esm.js.map +1 -0
  110. package/dist/react/components/timeDelta/index.cjs.js +93 -0
  111. package/dist/react/components/timeDelta/index.cjs.js.map +1 -0
  112. package/dist/react/components/timeDelta/index.d.ts +1 -1
  113. package/dist/react/components/timeDelta/index.esm.js +88 -0
  114. package/dist/react/components/timeDelta/index.esm.js.map +1 -0
  115. package/dist/react/components/transactionStatusIcon/index.cjs.js +59 -0
  116. package/dist/react/components/transactionStatusIcon/index.cjs.js.map +1 -0
  117. package/dist/react/components/transactionStatusIcon/index.esm.js +54 -0
  118. package/dist/react/components/transactionStatusIcon/index.esm.js.map +1 -0
  119. package/dist/react/components/valueCard/index.cjs.js +181 -0
  120. package/dist/react/components/valueCard/index.cjs.js.map +1 -0
  121. package/dist/react/components/valueCard/index.d.ts +5 -1
  122. package/dist/react/components/valueCard/index.esm.js +176 -0
  123. package/dist/react/components/valueCard/index.esm.js.map +1 -0
  124. package/dist/react/contexts/ThemeContext.cjs.js +79 -0
  125. package/dist/react/contexts/ThemeContext.cjs.js.map +1 -0
  126. package/dist/react/contexts/ThemeContext.esm.js +76 -0
  127. package/dist/react/contexts/ThemeContext.esm.js.map +1 -0
  128. package/dist/react/contexts/index.cjs.js +11 -0
  129. package/dist/react/contexts/index.cjs.js.map +1 -0
  130. package/dist/react/contexts/index.esm.js +4 -0
  131. package/dist/react/contexts/index.esm.js.map +1 -0
  132. package/dist/react/hooks/index.d.ts +1 -0
  133. package/dist/react/hooks/useColorScheme.cjs.js +25 -0
  134. package/dist/react/hooks/useColorScheme.cjs.js.map +1 -0
  135. package/dist/react/hooks/useColorScheme.d.ts +9 -0
  136. package/dist/react/hooks/useColorScheme.esm.js +23 -0
  137. package/dist/react/hooks/useColorScheme.esm.js.map +1 -0
  138. package/dist/react/hooks/useDebounce.cjs.js +83 -0
  139. package/dist/react/hooks/useDebounce.cjs.js.map +1 -0
  140. package/dist/react/hooks/useDebounce.esm.js +78 -0
  141. package/dist/react/hooks/useDebounce.esm.js.map +1 -0
  142. package/dist/react/index.cjs.js +99 -12833
  143. package/dist/react/index.cjs.js.map +1 -1
  144. package/dist/react/index.d.ts +1 -1
  145. package/dist/react/index.esm.js +27 -12747
  146. package/dist/react/index.esm.js.map +1 -1
  147. package/dist/react/shared/utils/datetime.cjs.js +59 -0
  148. package/dist/react/shared/utils/datetime.cjs.js.map +1 -0
  149. package/dist/react/shared/utils/datetime.esm.js +57 -0
  150. package/dist/react/shared/utils/datetime.esm.js.map +1 -0
  151. package/dist/react/utils/copyToClipboard.cjs.js +31 -0
  152. package/dist/react/utils/copyToClipboard.cjs.js.map +1 -0
  153. package/dist/react/utils/copyToClipboard.esm.js +26 -0
  154. package/dist/react/utils/copyToClipboard.esm.js.map +1 -0
  155. package/dist/react/utils/index.d.ts +1 -1
  156. package/dist/react-native/components/avatar/index.d.ts +26 -0
  157. package/dist/react-native/components/avatar/index.web.d.ts +24 -0
  158. package/dist/react-native/components/badge/index.d.ts +63 -0
  159. package/dist/react-native/components/bigNumber/index.d.ts +26 -0
  160. package/dist/react-native/components/button/index.d.ts +45 -0
  161. package/dist/react-native/components/copyButton/index.d.ts +22 -0
  162. package/dist/react-native/components/copyButton/index.web.d.ts +20 -0
  163. package/dist/react-native/components/dashLogo/index.d.ts +30 -0
  164. package/dist/react-native/components/heading/index.d.ts +25 -0
  165. package/dist/react-native/components/icons/index.d.ts +43 -0
  166. package/dist/react-native/components/identifier/index.d.ts +47 -0
  167. package/dist/react-native/components/index.d.ts +15 -0
  168. package/dist/react-native/components/input/index.d.ts +59 -0
  169. package/dist/react-native/components/notActive/index.d.ts +16 -0
  170. package/dist/react-native/components/tabs/index.d.ts +50 -0
  171. package/dist/react-native/components/text/index.d.ts +28 -0
  172. package/dist/react-native/components/transactionStatusIcon/index.d.ts +24 -0
  173. package/dist/react-native/components/valueCard/index.d.ts +47 -0
  174. package/dist/react-native/hooks/index.d.ts +1 -0
  175. package/dist/react-native/hooks/useDebounce.d.ts +43 -0
  176. package/dist/react-native/index.cjs.js +2882 -0
  177. package/dist/react-native/index.cjs.js.map +1 -0
  178. package/dist/react-native/index.d.ts +4 -0
  179. package/dist/react-native/index.esm.js +2833 -0
  180. package/dist/react-native/index.esm.js.map +1 -0
  181. package/dist/react-native/styles/index.d.ts +11 -0
  182. package/dist/react-native/styles/tokens.d.ts +308 -0
  183. package/dist/react-native/styles/utils.d.ts +65 -0
  184. package/dist/react-native/utils/clipboard.d.ts +27 -0
  185. package/dist/react-native/utils/index.d.ts +3 -0
  186. package/dist/react-native/utils/resolveColorScheme.d.ts +1 -0
  187. package/dist/react-native/utils/tw.d.ts +7 -0
  188. package/dist/shared/constants/colors.d.ts +25 -0
  189. package/dist/shared/constants/index.d.ts +2 -0
  190. package/dist/shared/constants/sizes.d.ts +49 -0
  191. package/dist/shared/index.cjs.js +171 -0
  192. package/dist/shared/index.cjs.js.map +1 -0
  193. package/dist/shared/index.d.ts +3 -0
  194. package/dist/shared/index.esm.js +161 -0
  195. package/dist/shared/index.esm.js.map +1 -0
  196. package/dist/shared/types/common.d.ts +33 -0
  197. package/dist/shared/types/index.d.ts +1 -0
  198. package/dist/shared/utils/index.d.ts +1 -0
  199. package/dist/styles.css +1 -1
  200. package/package.json +50 -8
  201. /package/dist/{react → shared}/utils/datetime.d.ts +0 -0
@@ -0,0 +1,2833 @@
1
+ import { __rest } from 'tslib';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { Text as Text$1, Pressable, ActivityIndicator, View, TextInput, TouchableOpacity, ScrollView, Platform } from 'react-native';
4
+ import { cva } from 'class-variance-authority';
5
+ import { create } from 'twrnc';
6
+ import { useState, useMemo, useRef, useCallback, useEffect } from 'react';
7
+ import Svg, { Path, G, Defs, ClipPath, Rect, Circle, Line, SvgXml } from 'react-native-svg';
8
+ import { minidenticon } from 'minidenticons';
9
+
10
+ /**
11
+ * Tailwind utility for React Native using twrnc
12
+ * Converts Tailwind className strings to React Native style objects
13
+ */
14
+ // Inline Tailwind config with Dash brand colors for React Native
15
+ // Colors from src/styles/theme.pcss
16
+ const tailwindConfig = {
17
+ theme: {
18
+ extend: {
19
+ colors: {
20
+ // Dash brand colors - matching Web version
21
+ 'dash-brand': '#4C7EFF',
22
+ // Primary brand color
23
+ 'dash-brand-dim': '#96A7FF',
24
+ // Dimmed brand color
25
+ 'dash-brand-dark': '#4D5895',
26
+ // Dark brand color
27
+ 'dash-brand-darkness': '#13172A',
28
+ // Darkest brand color
29
+ 'dash-mint': '#60F6D2',
30
+ // Mint/teal color
31
+ 'dash-mint-hover': '#4DD4B1',
32
+ // Mint hover state
33
+ 'dash-yellow-light': '#FEF3C7',
34
+ // Light yellow
35
+ 'dash-yellow': '#FDE68A',
36
+ // Yellow
37
+ 'dash-primary-die-subdued': '#0c1c3308',
38
+ // Subdued color with alpha
39
+ 'dash-primary-dark-blue': '#0C1C33',
40
+ // Dark blue
41
+ // State colors
42
+ 'dash-green': '#40BF40',
43
+ 'dash-red': '#CD2E00',
44
+ 'dash-orange': '#F98F12'
45
+ }
46
+ }
47
+ }
48
+ };
49
+ // Create a tailwind instance with React Native compatible colors
50
+ const tw = create(tailwindConfig);
51
+ /**
52
+ * Helper to convert className string to React Native style object
53
+ * @param className - Tailwind class names string
54
+ * @returns React Native style object
55
+ */
56
+ const cn = className => tw`${className}`;
57
+
58
+ const textStyles$2 = cva('', {
59
+ variants: {
60
+ variant: {
61
+ body: 'text-base',
62
+ caption: 'text-sm',
63
+ label: 'text-xs'
64
+ },
65
+ weight: {
66
+ regular: 'font-normal',
67
+ medium: 'font-medium',
68
+ semibold: 'font-semibold',
69
+ bold: 'font-bold'
70
+ },
71
+ color: {
72
+ default: 'text-gray-900 dark:text-gray-100',
73
+ blue: 'text-dash-brand',
74
+ red: 'text-red-700 dark:text-red-400',
75
+ gray: 'text-gray-600 dark:text-gray-400'
76
+ },
77
+ italic: {
78
+ false: '',
79
+ true: 'italic'
80
+ },
81
+ underline: {
82
+ false: '',
83
+ true: 'underline'
84
+ },
85
+ lineThrough: {
86
+ false: '',
87
+ true: 'line-through'
88
+ },
89
+ transform: {
90
+ none: '',
91
+ uppercase: 'uppercase',
92
+ capitalize: 'capitalize'
93
+ },
94
+ opacity: {
95
+ 100: 'opacity-100',
96
+ 80: 'opacity-80',
97
+ 60: 'opacity-60',
98
+ 40: 'opacity-40'
99
+ }
100
+ },
101
+ defaultVariants: {
102
+ variant: 'body',
103
+ weight: 'regular',
104
+ color: 'default',
105
+ italic: false,
106
+ underline: false,
107
+ lineThrough: false,
108
+ transform: 'none',
109
+ opacity: 100
110
+ }
111
+ });
112
+ /**
113
+ * React Native Text component with variants, weights, and styling options.
114
+ * Uses twrnc for Tailwind-like styling converted to React Native styles.
115
+ */
116
+ const Text = _a => {
117
+ var {
118
+ variant,
119
+ weight,
120
+ color,
121
+ italic,
122
+ underline,
123
+ lineThrough,
124
+ transform,
125
+ opacity,
126
+ className = '',
127
+ style,
128
+ children
129
+ } = _a,
130
+ props = __rest(_a, ["variant", "weight", "color", "italic", "underline", "lineThrough", "transform", "opacity", "className", "style", "children"]);
131
+ const classes = textStyles$2({
132
+ variant,
133
+ weight,
134
+ color,
135
+ italic,
136
+ underline,
137
+ lineThrough,
138
+ transform,
139
+ opacity
140
+ }) + (className ? ` ${className}` : '');
141
+ // Convert Tailwind classes to React Native style object
142
+ const textStyle = [cn(classes), style].filter(Boolean);
143
+ return jsx(Text$1, Object.assign({
144
+ style: textStyle
145
+ }, props, {
146
+ children: children
147
+ }));
148
+ };
149
+
150
+ const headingStyles = cva('font-bold text-gray-900 dark:text-gray-100', {
151
+ variants: {
152
+ level: {
153
+ 1: 'text-4xl',
154
+ 2: 'text-3xl',
155
+ 3: 'text-2xl',
156
+ 4: 'text-xl',
157
+ 5: 'text-lg',
158
+ 6: 'text-base'
159
+ },
160
+ weight: {
161
+ normal: 'font-normal',
162
+ medium: 'font-medium',
163
+ semibold: 'font-semibold',
164
+ bold: 'font-bold',
165
+ extrabold: 'font-extrabold'
166
+ },
167
+ color: {
168
+ default: '',
169
+ black: 'text-black dark:text-white',
170
+ gray: 'text-gray-600 dark:text-gray-300',
171
+ blue: 'text-blue-600 dark:text-blue-400',
172
+ red: 'text-red-600 dark:text-red-400',
173
+ green: 'text-green-600 dark:text-green-400'
174
+ }
175
+ },
176
+ defaultVariants: {
177
+ level: 1,
178
+ weight: 'extrabold',
179
+ color: 'default'
180
+ }
181
+ });
182
+ /**
183
+ * React Native Heading component with semantic levels and customizable styling.
184
+ * Uses twrnc for Tailwind-like styling converted to React Native styles.
185
+ */
186
+ const Heading = _a => {
187
+ var {
188
+ level,
189
+ weight,
190
+ color,
191
+ className = '',
192
+ style,
193
+ children
194
+ } = _a,
195
+ props = __rest(_a, ["level", "weight", "color", "className", "style", "children"]);
196
+ const classes = headingStyles({
197
+ level,
198
+ weight,
199
+ color
200
+ }) + (className ? ` ${className}` : '');
201
+ // Convert Tailwind classes to React Native style object
202
+ const headingStyle = [cn(classes), style].filter(Boolean);
203
+ return jsx(Text$1, Object.assign({
204
+ style: headingStyle
205
+ }, props, {
206
+ children: children
207
+ }));
208
+ };
209
+
210
+ function resolveColorScheme(theme, colorScheme, colorSchemeLight, colorSchemeDark) {
211
+ if (theme === 'light' && colorSchemeLight !== undefined) return colorSchemeLight;
212
+ if (theme === 'dark' && colorSchemeDark !== undefined) return colorSchemeDark;
213
+ return colorScheme;
214
+ }
215
+
216
+ const buttonStyles = cva('items-center justify-center flex-row min-h-11 transition-colors border border-transparent', {
217
+ variants: {
218
+ variant: {
219
+ solid: '',
220
+ outline: 'border-current bg-transparent',
221
+ ghost: 'bg-transparent border-transparent'
222
+ },
223
+ colorScheme: {
224
+ brand: '',
225
+ mint: '',
226
+ gray: '',
227
+ red: '',
228
+ lightBlue: '',
229
+ lightGray: '',
230
+ white: '',
231
+ halfWhite: '',
232
+ halfBlue: ''
233
+ },
234
+ size: {
235
+ sm: 'px-3 py-2',
236
+ md: 'px-[18px] py-3',
237
+ lg: 'px-6 py-4',
238
+ xl: 'px-[25px] py-5'
239
+ },
240
+ rounded: {
241
+ default: '',
242
+ full: 'rounded-full'
243
+ },
244
+ disabled: {
245
+ false: '',
246
+ true: 'opacity-50'
247
+ }
248
+ },
249
+ compoundVariants: [
250
+ // Border radius per size (when rounded is default)
251
+ {
252
+ size: 'sm',
253
+ rounded: 'default',
254
+ class: 'rounded-[10px]'
255
+ }, {
256
+ size: 'md',
257
+ rounded: 'default',
258
+ class: 'rounded-[14px]'
259
+ }, {
260
+ size: 'lg',
261
+ rounded: 'default',
262
+ class: 'rounded-[14px]'
263
+ }, {
264
+ size: 'xl',
265
+ rounded: 'default',
266
+ class: 'rounded-[16px]'
267
+ },
268
+ // Solid variants - brand
269
+ {
270
+ variant: 'solid',
271
+ colorScheme: 'brand',
272
+ disabled: false,
273
+ class: 'bg-dash-brand'
274
+ }, {
275
+ variant: 'solid',
276
+ colorScheme: 'mint',
277
+ disabled: false,
278
+ class: 'bg-dash-mint'
279
+ }, {
280
+ variant: 'solid',
281
+ colorScheme: 'gray',
282
+ disabled: false,
283
+ class: 'bg-gray-200 dark:bg-gray-600'
284
+ }, {
285
+ variant: 'solid',
286
+ colorScheme: 'red',
287
+ disabled: false,
288
+ class: 'bg-red-200 dark:bg-red-600'
289
+ }, {
290
+ variant: 'solid',
291
+ colorScheme: 'lightBlue',
292
+ disabled: false,
293
+ class: 'bg-dash-brand/10 dark:bg-dash-brand/20'
294
+ }, {
295
+ variant: 'solid',
296
+ colorScheme: 'lightGray',
297
+ disabled: false,
298
+ class: 'bg-gray-100 dark:bg-gray-700/20'
299
+ }, {
300
+ variant: 'solid',
301
+ colorScheme: 'white',
302
+ disabled: false,
303
+ class: 'bg-white'
304
+ }, {
305
+ variant: 'solid',
306
+ colorScheme: 'halfWhite',
307
+ disabled: false,
308
+ class: 'bg-white/15'
309
+ }, {
310
+ variant: 'solid',
311
+ colorScheme: 'halfBlue',
312
+ disabled: false,
313
+ class: 'bg-dash-brand/15'
314
+ },
315
+ // Outline variants
316
+ {
317
+ variant: 'outline',
318
+ colorScheme: 'brand',
319
+ class: 'border-dash-brand'
320
+ }, {
321
+ variant: 'outline',
322
+ colorScheme: 'mint',
323
+ class: 'border-dash-mint'
324
+ }, {
325
+ variant: 'outline',
326
+ colorScheme: 'gray',
327
+ class: 'border-gray-700 dark:border-gray-300'
328
+ }, {
329
+ variant: 'outline',
330
+ colorScheme: 'red',
331
+ class: 'border-red-700 dark:border-red-400'
332
+ }, {
333
+ variant: 'outline',
334
+ colorScheme: 'white',
335
+ class: 'border-white'
336
+ }, {
337
+ variant: 'outline',
338
+ colorScheme: 'halfWhite',
339
+ class: 'border-white/50'
340
+ }, {
341
+ variant: 'outline',
342
+ colorScheme: 'halfBlue',
343
+ class: 'border-dash-brand/50'
344
+ }],
345
+ defaultVariants: {
346
+ variant: 'solid',
347
+ colorScheme: 'brand',
348
+ size: 'md',
349
+ rounded: 'default',
350
+ disabled: false
351
+ }
352
+ });
353
+ const textStyles$1 = cva('font-medium', {
354
+ variants: {
355
+ variant: {
356
+ solid: '',
357
+ outline: '',
358
+ ghost: ''
359
+ },
360
+ colorScheme: {
361
+ brand: '',
362
+ mint: '',
363
+ gray: '',
364
+ red: '',
365
+ lightBlue: '',
366
+ lightGray: '',
367
+ white: '',
368
+ halfWhite: '',
369
+ halfBlue: ''
370
+ },
371
+ size: {
372
+ sm: 'text-sm',
373
+ // 14px
374
+ md: 'text-base',
375
+ // 16px
376
+ lg: 'text-base',
377
+ // 16px
378
+ xl: 'text-lg' // 18px
379
+ }
380
+ },
381
+ compoundVariants: [
382
+ // Solid text colors
383
+ {
384
+ variant: 'solid',
385
+ colorScheme: 'brand',
386
+ class: 'text-white'
387
+ }, {
388
+ variant: 'solid',
389
+ colorScheme: 'mint',
390
+ class: 'text-black'
391
+ }, {
392
+ variant: 'solid',
393
+ colorScheme: 'gray',
394
+ class: 'text-gray-700 dark:text-gray-100'
395
+ }, {
396
+ variant: 'solid',
397
+ colorScheme: 'red',
398
+ class: 'text-red-700 dark:text-red-100'
399
+ }, {
400
+ variant: 'solid',
401
+ colorScheme: 'lightBlue',
402
+ class: 'text-dash-brand'
403
+ }, {
404
+ variant: 'solid',
405
+ colorScheme: 'lightGray',
406
+ class: 'text-gray-900 dark:text-gray-300'
407
+ }, {
408
+ variant: 'solid',
409
+ colorScheme: 'white',
410
+ class: 'text-dash-brand'
411
+ }, {
412
+ variant: 'solid',
413
+ colorScheme: 'halfWhite',
414
+ class: 'text-white'
415
+ }, {
416
+ variant: 'solid',
417
+ colorScheme: 'halfBlue',
418
+ class: 'text-dash-brand'
419
+ },
420
+ // Outline text colors
421
+ {
422
+ variant: 'outline',
423
+ colorScheme: 'brand',
424
+ class: 'text-dash-brand'
425
+ }, {
426
+ variant: 'outline',
427
+ colorScheme: 'mint',
428
+ class: 'text-dash-mint'
429
+ }, {
430
+ variant: 'outline',
431
+ colorScheme: 'gray',
432
+ class: 'text-gray-700 dark:text-gray-300'
433
+ }, {
434
+ variant: 'outline',
435
+ colorScheme: 'red',
436
+ class: 'text-red-700 dark:text-red-400'
437
+ }, {
438
+ variant: 'outline',
439
+ colorScheme: 'white',
440
+ class: 'text-white'
441
+ }, {
442
+ variant: 'outline',
443
+ colorScheme: 'halfWhite',
444
+ class: 'text-white'
445
+ }, {
446
+ variant: 'outline',
447
+ colorScheme: 'halfBlue',
448
+ class: 'text-dash-brand'
449
+ },
450
+ // Ghost text colors
451
+ {
452
+ variant: 'ghost',
453
+ colorScheme: 'brand',
454
+ class: 'text-dash-brand'
455
+ }],
456
+ defaultVariants: {
457
+ variant: 'solid',
458
+ colorScheme: 'brand',
459
+ size: 'md'
460
+ }
461
+ });
462
+ /**
463
+ * React Native Button component with variants, color schemes, sizes, and loading state.
464
+ * Uses Pressable for touch interactions and twrnc for Tailwind styling.
465
+ */
466
+ const Button = _a => {
467
+ var _b;
468
+ var {
469
+ theme = 'light',
470
+ variant,
471
+ colorScheme,
472
+ colorSchemeLight,
473
+ colorSchemeDark,
474
+ size,
475
+ rounded,
476
+ disabled = false,
477
+ loading = false,
478
+ className = '',
479
+ style,
480
+ textStyle,
481
+ children,
482
+ onPress
483
+ } = _a,
484
+ props = __rest(_a, ["theme", "variant", "colorScheme", "colorSchemeLight", "colorSchemeDark", "size", "rounded", "disabled", "loading", "className", "style", "textStyle", "children", "onPress"]);
485
+ const isDisabled = disabled || loading;
486
+ const effectiveColorScheme = (_b = resolveColorScheme(theme, colorScheme, colorSchemeLight, colorSchemeDark)) !== null && _b !== void 0 ? _b : 'brand';
487
+ const buttonClasses = buttonStyles({
488
+ variant,
489
+ colorScheme: effectiveColorScheme,
490
+ size,
491
+ rounded,
492
+ disabled: isDisabled
493
+ }) + (className ? ` ${className}` : '');
494
+ const textClasses = textStyles$1({
495
+ variant,
496
+ colorScheme: effectiveColorScheme,
497
+ size
498
+ });
499
+ // Convert Tailwind classes to React Native style objects
500
+ const buttonStyle = [cn(buttonClasses), style].filter(Boolean);
501
+ const textStyleMerged = [cn(textClasses), textStyle].filter(Boolean);
502
+ return jsx(Pressable, Object.assign({
503
+ style: ({
504
+ pressed
505
+ }) => [...buttonStyle, pressed && !isDisabled && {
506
+ opacity: 0.7
507
+ }],
508
+ disabled: isDisabled,
509
+ onPress: onPress
510
+ }, props, {
511
+ children: loading ? jsx(ActivityIndicator, {
512
+ size: "small",
513
+ color: variant === 'solid' && effectiveColorScheme === 'brand' ? '#fff' : '#3B82F6'
514
+ }) : typeof children === 'string' ? jsx(Text$1, {
515
+ style: textStyleMerged,
516
+ children: children
517
+ }) : children
518
+ }));
519
+ };
520
+
521
+ const ArrowIcon = ({
522
+ color = 'white',
523
+ size = 14,
524
+ onPress
525
+ }) => {
526
+ return jsx(Svg, {
527
+ width: size,
528
+ height: size,
529
+ viewBox: '0 0 9 14',
530
+ fill: 'none',
531
+ onPress: onPress,
532
+ color: color,
533
+ children: jsx(Path, {
534
+ d: 'M7.29297 0.292893C7.68349 -0.0976311 8.31651 -0.0976311 8.70703 0.292893C9.09756 0.683418 9.09756 1.31643 8.70703 1.70696L3.41406 6.99992L8.70703 12.2929L8.77539 12.3691C9.09574 12.7618 9.07315 13.3408 8.70703 13.707C8.34092 14.0731 7.76191 14.0957 7.36914 13.7753L7.29297 13.707L0.585938 6.99992L7.29297 0.292893Z',
535
+ fill: color
536
+ })
537
+ });
538
+ };
539
+ const CopyIcon = ({
540
+ color = 'white',
541
+ size = 16,
542
+ onPress
543
+ }) => {
544
+ return jsxs(Svg, {
545
+ width: size,
546
+ height: size,
547
+ viewBox: '0 0 16 16',
548
+ fill: 'none',
549
+ onPress: onPress,
550
+ color: color,
551
+ children: [jsx(G, {
552
+ clipPath: 'url(#clip0_3876_6767)',
553
+ children: jsx(G, {
554
+ clipPath: 'url(#clip1_3876_6767)',
555
+ children: jsx(G, {
556
+ clipPath: 'url(#clip2_3876_6767)',
557
+ children: jsx(Path, {
558
+ d: 'M11.4512 10.5645H5.28516V1.75586H9.32335L11.4512 3.88369V10.5645ZM12.332 3.51758L9.68945 0.875H5.28516H4.4043V1.75586V10.5645V11.4453H5.28516H11.4512H12.332V10.5645V3.51758ZM0.880859 4.39844H0V5.2793V14.0879V14.9688H0.880859H7.04688H7.92773V14.0879V12.3262H7.04688V14.0879H0.880859V5.2793H3.52344V4.39844H0.880859Z',
559
+ fill: color
560
+ })
561
+ })
562
+ })
563
+ }), jsxs(Defs, {
564
+ children: [jsx(ClipPath, {
565
+ id: 'clip0_3876_6767',
566
+ children: jsx(Rect, {
567
+ width: '16',
568
+ height: '16',
569
+ fill: 'white'
570
+ })
571
+ }), jsx(ClipPath, {
572
+ id: 'clip1_3876_6767',
573
+ children: jsx(Rect, {
574
+ width: '16',
575
+ height: '14.25',
576
+ fill: 'white',
577
+ transform: 'translate(0 0.875)'
578
+ })
579
+ }), jsx(ClipPath, {
580
+ id: 'clip2_3876_6767',
581
+ children: jsx(Rect, {
582
+ width: '12.332',
583
+ height: '14.0938',
584
+ fill: 'white',
585
+ transform: 'translate(0 0.875)'
586
+ })
587
+ })]
588
+ })]
589
+ });
590
+ };
591
+ const SuccessIcon = ({
592
+ color = '#1CC400',
593
+ size = 18,
594
+ onPress
595
+ }) => jsxs(Svg, {
596
+ width: size,
597
+ height: size,
598
+ viewBox: '0 0 18 18',
599
+ fill: 'none',
600
+ onPress: onPress,
601
+ color: color,
602
+ children: [jsx(Circle, {
603
+ cx: '9',
604
+ cy: '9',
605
+ r: '9',
606
+ fill: color,
607
+ fillOpacity: '.2'
608
+ }), jsx(Path, {
609
+ d: 'M5 8.5L8 11.5L13.5 6',
610
+ stroke: color,
611
+ strokeWidth: '2',
612
+ strokeLinecap: 'round'
613
+ })]
614
+ });
615
+ const ErrorIcon = ({
616
+ color = '#F45858',
617
+ size = 18,
618
+ onPress
619
+ }) => jsxs(Svg, {
620
+ width: size,
621
+ height: size,
622
+ viewBox: '0 0 18 18',
623
+ fill: 'none',
624
+ onPress: onPress,
625
+ color: color,
626
+ children: [jsx(Rect, {
627
+ width: '18',
628
+ height: '18',
629
+ rx: '4',
630
+ fill: color,
631
+ fillOpacity: '.2'
632
+ }), jsx(Path, {
633
+ d: 'M9.06951 10L9.0695 4.86092',
634
+ stroke: color,
635
+ strokeWidth: '2',
636
+ strokeLinecap: 'round'
637
+ }), jsx(Path, {
638
+ d: 'M9.06951 13L9.06951 13.0102',
639
+ stroke: color,
640
+ strokeWidth: '2',
641
+ strokeLinecap: 'round'
642
+ })]
643
+ });
644
+ const CheckIcon = ({
645
+ color = '#4C7EFF',
646
+ size = 20,
647
+ onPress
648
+ }) => {
649
+ return jsxs(Svg, {
650
+ width: size,
651
+ height: size,
652
+ viewBox: '0 0 20 20',
653
+ fill: 'none',
654
+ onPress: onPress,
655
+ children: [jsx(Circle, {
656
+ cx: '10',
657
+ cy: '10',
658
+ r: '10',
659
+ fill: 'rgba(12, 28, 51, 0.05)'
660
+ }), jsx(Path, {
661
+ d: 'M6.33 10L8.83 12.5L13.67 7.67',
662
+ stroke: color,
663
+ strokeWidth: '1.5',
664
+ strokeLinecap: 'round',
665
+ strokeLinejoin: 'round'
666
+ })]
667
+ });
668
+ };
669
+ const CrossIcon = ({
670
+ color = '#0C1C33',
671
+ size = 16,
672
+ onPress
673
+ }) => jsx(Svg, {
674
+ width: size,
675
+ height: size * 17 / 16,
676
+ viewBox: '0 0 16 17',
677
+ fill: 'none',
678
+ onPress: onPress,
679
+ color: color,
680
+ children: jsx(Path, {
681
+ d: 'M13.5693 3.40266L13.0973 2.93066L8 8.02866L2.90266 2.93066L2.43066 3.40266L7.52866 8.5L2.43066 13.5973L2.90266 14.0693L8 8.97133L13.0973 14.0693L13.5693 13.5973L8.47133 8.5L13.5693 3.40266Z',
682
+ fill: color
683
+ })
684
+ });
685
+ const PlusIcon = ({
686
+ color = '#4C7EFF',
687
+ size = 17,
688
+ onPress
689
+ }) => jsx(Svg, {
690
+ width: size,
691
+ height: size * 16 / 17,
692
+ viewBox: '0 0 17 16',
693
+ fill: 'none',
694
+ onPress: onPress,
695
+ color: color,
696
+ children: jsx(Path, {
697
+ d: 'M15.1667 7.66665H8.83337V1.33331H8.16671V7.66665H1.83337V8.33331H8.16671V14.6666H8.83337V8.33331H15.1667V7.66665Z',
698
+ fill: color
699
+ })
700
+ });
701
+ const ChevronIcon = ({
702
+ color = '#0C1C33',
703
+ size = 12,
704
+ onPress
705
+ }) => jsx(Svg, {
706
+ width: size,
707
+ height: size,
708
+ viewBox: '0 0 12 12',
709
+ fill: 'none',
710
+ onPress: onPress,
711
+ color: color,
712
+ children: jsx(Path, {
713
+ d: 'M6 8.9395L1.65149 4.59099L2.18149 4.06049L6 7.879L9.8185 4.06049L10.3485 4.59099L6 8.9395Z',
714
+ fill: color
715
+ })
716
+ });
717
+ const SearchIcon = ({
718
+ color = '#0C1C33',
719
+ size = 16,
720
+ onPress
721
+ }) => jsx(Svg, {
722
+ width: size,
723
+ height: size,
724
+ viewBox: '0 0 16 16',
725
+ fill: 'none',
726
+ onPress: onPress,
727
+ color: color,
728
+ children: jsx(Path, {
729
+ d: 'M14.569 14.0977L10.6623 10.191C11.5815 9.14938 12.0591 7.79092 11.9941 6.40327C11.9292 5.01564 11.3267 3.70776 10.3143 2.75659C9.30178 1.80542 7.95892 1.28563 6.56994 1.30729C5.18095 1.32895 3.85492 1.89036 2.87264 2.87264C1.89036 3.85492 1.32895 5.18095 1.30729 6.56994C1.28563 7.95892 1.80542 9.30178 2.75659 10.3143C3.70776 11.3267 5.01564 11.9292 6.40327 11.9941C7.79092 12.0591 9.14938 11.5815 10.191 10.6623L14.0977 14.569L14.569 14.0977ZM6.66665 11.3333C5.74364 11.3333 4.84138 11.0596 4.07396 10.5468C3.30653 10.0341 2.70839 9.30518 2.35518 8.45245C2.00197 7.59978 1.90956 6.66145 2.08962 5.7562C2.26968 4.85095 2.71414 4.01943 3.36678 3.36678C4.01943 2.71414 4.85095 2.26968 5.7562 2.08962C6.66145 1.90956 7.59978 2.00197 8.45245 2.35518C9.30518 2.70839 10.0341 3.30653 10.5468 4.07396C11.0596 4.84138 11.3333 5.74364 11.3333 6.66665C11.3319 7.90385 10.8398 9.09005 9.96492 9.96492C9.09005 10.8398 7.90385 11.3319 6.66665 11.3333Z',
730
+ fill: color
731
+ })
732
+ });
733
+ const InfoCircleIcon = ({
734
+ color = '#4C7EFF',
735
+ size = 19,
736
+ onPress
737
+ }) => jsxs(Svg, {
738
+ width: size,
739
+ height: size,
740
+ viewBox: '0 0 19 19',
741
+ fill: 'none',
742
+ onPress: onPress,
743
+ color: color,
744
+ children: [jsxs(G, {
745
+ clipPath: 'url(#clip0_1166_258)',
746
+ children: [jsx(Path, {
747
+ d: 'M9.5 5.5H9.51ZM9.5 8.5V13.5ZM18.5 9.5C18.5 14.4706 14.4706 18.5 9.5 18.5C4.52944 18.5 0.5 14.4706 0.5 9.5C0.5 4.52944 4.52944 0.5 9.5 0.5C14.4706 0.5 18.5 4.52944 18.5 9.5Z',
748
+ fill: color,
749
+ fillOpacity: '0.05'
750
+ }), jsx(Path, {
751
+ d: 'M18 9.5C18 4.80558 14.1945 1 9.5 1C4.80558 1 1 4.80558 1 9.5C1 14.1945 4.80558 18 9.5 18C14.1945 18 18 14.1945 18 9.5ZM9 13.5V8.5C9 8.22386 9.22386 8 9.5 8C9.77614 8 10 8.22386 10 8.5V13.5C10 13.7761 9.77614 14 9.5 14C9.22386 14 9 13.7761 9 13.5ZM9.50977 5C9.78591 5 10.0098 5.22386 10.0098 5.5C10.0098 5.77614 9.78591 6 9.50977 6H9.5C9.22386 6 9 5.77614 9 5.5C9 5.22386 9.22386 5 9.5 5H9.50977ZM19 9.5C19 14.7467 14.7467 19 9.5 19C4.2533 19 0 14.7467 0 9.5C0 4.2533 4.2533 0 9.5 0C14.7467 0 19 4.2533 19 9.5Z',
752
+ fill: color
753
+ })]
754
+ }), jsx(Defs, {
755
+ children: jsx(ClipPath, {
756
+ id: 'clip0_1166_258',
757
+ children: jsx(Rect, {
758
+ width: '19',
759
+ height: '19',
760
+ fill: 'white'
761
+ })
762
+ })
763
+ })]
764
+ });
765
+ const EyeOpenIcon = ({
766
+ color = 'currentColor',
767
+ size = 16,
768
+ onPress
769
+ }) => jsx(Svg, {
770
+ width: size,
771
+ height: size * 10 / 16,
772
+ viewBox: '0 0 16 10',
773
+ fill: 'none',
774
+ onPress: onPress,
775
+ color: color,
776
+ children: jsx(Path, {
777
+ d: 'M7.89888 0C6.24409 0.000806406 4.62351 0.471042 3.22533 1.35609C1.82715 2.24114 0.708743 3.50469 0 5C0.708092 6.49578 1.82635 7.75974 3.22468 8.64489C4.623 9.53004 6.24392 9.99999 7.89888 9.99999C9.55378 9.99999 11.1747 9.53004 12.573 8.64489C13.9713 7.75974 15.0896 6.49578 15.7977 5C15.089 3.50469 13.9706 2.24114 12.5724 1.35609C11.1742 0.471042 9.55364 0.000806406 7.89888 0ZM7.89888 8.98344C6.52084 8.97755 5.16914 8.60565 3.98212 7.90571C2.79509 7.20576 1.81538 6.20297 1.14327 5C1.81083 3.7931 2.78951 2.78709 3.97757 2.08654C5.16561 1.38601 6.51964 1.01653 7.89888 1.01653C9.27804 1.01653 10.6321 1.38601 11.8201 2.08654C13.0082 2.78709 13.9868 3.7931 14.6545 5C13.9823 6.20297 13.0026 7.20576 11.8156 7.90571C10.6285 8.60565 9.27689 8.97755 7.89888 8.98344ZM7.89888 2.51693C7.40772 2.51693 6.92767 2.66256 6.51934 2.93541C6.11101 3.20825 5.79274 3.59605 5.60481 4.0498C5.41687 4.50349 5.3677 5.00271 5.46351 5.48439C5.55932 5.96606 5.7958 6.4085 6.14306 6.7558C6.49033 7.10303 6.93275 7.33953 7.41443 7.43535C7.8961 7.53117 8.39533 7.48197 8.84909 7.29406C9.30277 7.10608 9.69059 6.78785 9.96342 6.3795C10.2362 5.97114 10.3819 5.4911 10.3819 5C10.3819 4.34146 10.1203 3.70989 9.65461 3.24421C9.189 2.77854 8.55742 2.51693 7.89888 2.51693ZM7.89888 6.46658C7.60878 6.46658 7.32525 6.38058 7.08407 6.21937C6.8429 6.05822 6.65492 5.82918 6.54392 5.56123C6.43291 5.29322 6.40387 4.99837 6.46045 4.7139C6.51704 4.42942 6.65675 4.16805 6.8618 3.96299C7.06693 3.75786 7.32823 3.61818 7.61271 3.5616C7.89726 3.50501 8.1921 3.53405 8.46011 3.64504C8.72806 3.75603 8.9571 3.94402 9.11825 4.18519C9.27939 4.42637 9.36546 4.7099 9.36546 5C9.36498 5.38884 9.21034 5.76161 8.93542 6.03654C8.66043 6.31146 8.28765 6.4661 7.89888 6.46658Z',
778
+ fill: color
779
+ })
780
+ });
781
+ const EyeClosedIcon = ({
782
+ color = 'currentColor',
783
+ size = 16,
784
+ onPress
785
+ }) => jsxs(Svg, {
786
+ width: size,
787
+ height: size,
788
+ viewBox: '0 0 16 16',
789
+ fill: 'none',
790
+ onPress: onPress,
791
+ color: color,
792
+ children: [jsx(Path, {
793
+ d: 'M7.89888 3C6.24409 3.00081 4.62351 3.47104 3.22533 4.35609C1.82715 5.24114 0.708743 6.50469 0 8C0.708092 9.49578 1.82635 10.7597 3.22468 11.6449C4.623 12.53 6.24392 13 7.89888 13C9.55378 13 11.1747 12.53 12.573 11.6449C13.9713 10.7597 15.0896 9.49578 15.7977 8C15.089 6.50469 13.9706 5.24114 12.5724 4.35609C11.1742 3.47104 9.55364 3.00081 7.89888 3ZM7.89888 11.9834C6.52084 11.9776 5.16914 11.6056 3.98212 10.9057C2.79509 10.2058 1.81538 9.20297 1.14327 8C1.81083 6.7931 2.78951 5.78709 3.97757 5.08654C5.16561 4.38601 6.51964 4.01653 7.89888 4.01653C9.27804 4.01653 10.6321 4.38601 11.8201 5.08654C13.0082 5.78709 13.9868 6.7931 14.6545 8C13.9823 9.20297 13.0026 10.2058 11.8156 10.9057C10.6285 11.6056 9.27689 11.9776 7.89888 11.9834Z',
794
+ fill: color
795
+ }), jsx(Line, {
796
+ x1: '1',
797
+ y1: '15',
798
+ x2: '15',
799
+ y2: '1',
800
+ stroke: color,
801
+ strokeWidth: '1.5',
802
+ strokeLinecap: 'round'
803
+ })]
804
+ });
805
+ const AsteriskIcon = ({
806
+ color = '#0C1C33',
807
+ size = 16,
808
+ onPress
809
+ }) => jsx(Svg, {
810
+ width: size,
811
+ height: size * 17 / 16,
812
+ viewBox: '0 0 16 17',
813
+ fill: 'none',
814
+ onPress: onPress,
815
+ color: color,
816
+ children: jsx(Path, {
817
+ d: 'M6.38944 0H9.61056L9.24092 8.5H6.75908L6.38944 0ZM6.38944 17L6.75908 8.5H9.24092L9.61056 17H6.38944ZM0 5.50476L1.63696 2.96825L8.60726 7.50159L7.36634 9.47143L0 5.50476ZM16 5.50476L8.63366 9.47143L7.39274 7.50159L14.363 2.96825L16 5.50476ZM16 11.4683L14.363 14.0048L7.39274 9.47143L8.63366 7.50159L16 11.4683ZM0 11.5222L7.36634 7.55556L8.60726 9.5254L1.63696 14.0587L0 11.5222Z',
818
+ fill: color
819
+ })
820
+ });
821
+ const TopRightArrowIcon = ({
822
+ color = '#0C1C33',
823
+ size = 25,
824
+ onPress
825
+ }) => jsx(Svg, {
826
+ width: size,
827
+ height: size,
828
+ viewBox: '0 0 25 25',
829
+ fill: 'none',
830
+ onPress: onPress,
831
+ color: color,
832
+ children: jsx(Path, {
833
+ d: 'M21.3388 3.66117L21.3388 21.3388M21.3388 3.66117L3.66116 3.66117M21.3388 3.66117L3.66116 21.3388',
834
+ stroke: color,
835
+ strokeWidth: '2',
836
+ strokeLinecap: 'round',
837
+ strokeLinejoin: 'round'
838
+ })
839
+ });
840
+ const QueuedIcon = ({
841
+ color = '#F4A358',
842
+ size = 18,
843
+ onPress
844
+ }) => jsxs(Svg, {
845
+ width: size,
846
+ height: size,
847
+ viewBox: '0 0 18 18',
848
+ fill: 'none',
849
+ onPress: onPress,
850
+ color: color,
851
+ children: [jsx(Rect, {
852
+ width: '18',
853
+ height: '18',
854
+ rx: '4',
855
+ fill: color,
856
+ fillOpacity: '.2'
857
+ }), jsx(Path, {
858
+ d: 'M11.6756 12.6482C11.8311 12.8601 12.1306 12.9075 12.3268 12.7326C13.1311 12.0158 13.6857 11.055 13.9009 9.99071C14.1476 8.77034 13.9301 7.50182 13.2909 6.43333C12.6518 5.36484 11.637 4.57324 10.4451 4.2134C9.25315 3.85356 7.96985 3.95136 6.84622 4.48768C5.72259 5.024 4.83949 5.96024 4.36966 7.11325C3.89983 8.26626 3.87708 9.55308 4.30587 10.722C4.73466 11.8909 5.58412 12.8577 6.6881 13.4334C7.65084 13.9355 8.74673 14.1085 9.80981 13.934C10.0691 13.8914 10.2207 13.6287 10.1537 13.3746C10.0867 13.1205 9.82636 12.9718 9.56614 13.0086C8.7336 13.1262 7.88063 12.982 7.12813 12.5896C6.23429 12.1235 5.5465 11.3406 5.19933 10.3942C4.85216 9.44781 4.87057 8.40592 5.25098 7.47237C5.63138 6.53882 6.3464 5.78078 7.25616 5.34654C8.16592 4.91231 9.20497 4.83312 10.17 5.12447C11.1351 5.41582 11.9567 6.05674 12.4742 6.92186C12.9917 7.78698 13.1678 8.81405 12.9681 9.80215C12.7999 10.634 12.3756 11.3878 11.7605 11.9612C11.5683 12.1404 11.5202 12.4362 11.6756 12.6482Z',
859
+ fill: color
860
+ })]
861
+ });
862
+ const PooledIcon = ({
863
+ color = '#008DE4',
864
+ size = 18,
865
+ onPress
866
+ }) => jsxs(Svg, {
867
+ width: size,
868
+ height: size,
869
+ viewBox: '0 0 18 18',
870
+ fill: 'none',
871
+ onPress: onPress,
872
+ color: color,
873
+ children: [jsx(Rect, {
874
+ width: '18',
875
+ height: '18',
876
+ rx: '4',
877
+ fill: color,
878
+ fillOpacity: '.2'
879
+ }), jsx(Path, {
880
+ d: 'M14 7L12.4328 6.01491C11.4484 5.39611 10.1941 5.40565 9.21918 6.03935C8.30752 6.63193 7.14565 6.6816 6.18674 6.16899L4 5',
881
+ stroke: color,
882
+ strokeLinecap: 'round'
883
+ }), jsx(Path, {
884
+ d: 'M14 10L12.4328 9.01491C11.4484 8.39611 10.1941 8.40565 9.21918 9.03935C8.30752 9.63193 7.14565 9.6816 6.18674 9.16899L4 8',
885
+ stroke: color,
886
+ strokeLinecap: 'round'
887
+ }), jsx(Path, {
888
+ d: 'M14 13L12.4328 12.0149C11.4484 11.3961 10.1941 11.4057 9.21918 12.0393C8.30752 12.6319 7.14565 12.6816 6.18674 12.169L4 11',
889
+ stroke: color,
890
+ strokeLinecap: 'round'
891
+ })]
892
+ });
893
+ const BroadcastedIcon = ({
894
+ color = '#008DE4',
895
+ size = 18,
896
+ onPress
897
+ }) => jsxs(Svg, {
898
+ width: size,
899
+ height: size,
900
+ viewBox: '0 0 18 18',
901
+ fill: 'none',
902
+ onPress: onPress,
903
+ color: color,
904
+ children: [jsx(Rect, {
905
+ width: '18',
906
+ height: '18',
907
+ rx: '4',
908
+ fill: color,
909
+ fillOpacity: '.2'
910
+ }), jsx(Path, {
911
+ d: 'M4.86093 8.74967L12.5 8.74993M12.5 8.74993L9.5 5.74993M12.5 8.74993L9.5 11.7499',
912
+ stroke: color,
913
+ strokeWidth: '2',
914
+ strokeLinecap: 'round',
915
+ strokeLinejoin: 'round'
916
+ })]
917
+ });
918
+ // Export all icons as a collection
919
+ const Icons = {
920
+ ArrowIcon,
921
+ CopyIcon,
922
+ SuccessIcon,
923
+ ErrorIcon,
924
+ CheckIcon,
925
+ CrossIcon,
926
+ PlusIcon,
927
+ ChevronIcon,
928
+ SearchIcon,
929
+ InfoCircleIcon,
930
+ EyeOpenIcon,
931
+ EyeClosedIcon,
932
+ TopRightArrowIcon,
933
+ QueuedIcon,
934
+ PooledIcon,
935
+ BroadcastedIcon,
936
+ AsteriskIcon
937
+ };
938
+
939
+ const inputStyles = cva('w-full font-normal text-sm leading-[17px]', {
940
+ variants: {
941
+ colorScheme: {
942
+ default: '',
943
+ brand: '',
944
+ error: '',
945
+ success: '',
946
+ 'light-gray': ''
947
+ },
948
+ size: {
949
+ sm: 'px-3 py-2 rounded-[10px]',
950
+ md: 'px-4 py-3 rounded-[12px]',
951
+ xl: 'px-4 py-[18px] rounded-[14px]'
952
+ },
953
+ variant: {
954
+ outlined: 'border',
955
+ filled: 'border-0'
956
+ },
957
+ disabled: {
958
+ false: '',
959
+ true: 'opacity-60'
960
+ }
961
+ },
962
+ compoundVariants: [
963
+ // Outlined variant colors
964
+ {
965
+ variant: 'outlined',
966
+ colorScheme: 'default',
967
+ class: 'border-[rgba(17,17,17,0.32)] bg-white'
968
+ }, {
969
+ variant: 'outlined',
970
+ colorScheme: 'brand',
971
+ class: 'border-dash-brand/30 bg-white'
972
+ }, {
973
+ variant: 'outlined',
974
+ colorScheme: 'error',
975
+ class: 'border-red-500 bg-white'
976
+ }, {
977
+ variant: 'outlined',
978
+ colorScheme: 'success',
979
+ class: 'border-green-500 bg-white'
980
+ }, {
981
+ variant: 'outlined',
982
+ colorScheme: 'light-gray',
983
+ class: 'border-gray-500/50 bg-white'
984
+ },
985
+ // Filled variant colors
986
+ {
987
+ variant: 'filled',
988
+ colorScheme: 'default',
989
+ class: 'bg-dash-brand/15'
990
+ }, {
991
+ variant: 'filled',
992
+ colorScheme: 'brand',
993
+ class: 'bg-dash-brand/15'
994
+ }, {
995
+ variant: 'filled',
996
+ colorScheme: 'error',
997
+ class: 'bg-red-500/15'
998
+ }, {
999
+ variant: 'filled',
1000
+ colorScheme: 'success',
1001
+ class: 'bg-green-500/15'
1002
+ }, {
1003
+ variant: 'filled',
1004
+ colorScheme: 'light-gray',
1005
+ class: 'bg-gray-100'
1006
+ }],
1007
+ defaultVariants: {
1008
+ colorScheme: 'default',
1009
+ size: 'xl',
1010
+ variant: 'outlined',
1011
+ disabled: false
1012
+ }
1013
+ });
1014
+ /**
1015
+ * React Native Input component that adapts to various color schemes, sizes, variants, and states.
1016
+ * For password inputs (secureTextEntry), includes a toggleable eye icon.
1017
+ * Supports prefix text or elements before input content.
1018
+ *
1019
+ * @example
1020
+ * <Input
1021
+ * secureTextEntry
1022
+ * placeholder="Enter password"
1023
+ * colorScheme="brand"
1024
+ * size="xl"
1025
+ * prefix="https://"
1026
+ * />
1027
+ */
1028
+ const Input = _a => {
1029
+ var _b;
1030
+ var {
1031
+ theme = 'light',
1032
+ className = '',
1033
+ colorScheme,
1034
+ colorSchemeLight,
1035
+ colorSchemeDark,
1036
+ size,
1037
+ variant,
1038
+ error = false,
1039
+ success = false,
1040
+ disabled = false,
1041
+ secureTextEntry = false,
1042
+ prefix,
1043
+ prefixStyle,
1044
+ showPasswordToggle = true,
1045
+ style,
1046
+ textStyle
1047
+ } = _a,
1048
+ props = __rest(_a, ["theme", "className", "colorScheme", "colorSchemeLight", "colorSchemeDark", "size", "variant", "error", "success", "disabled", "secureTextEntry", "prefix", "prefixStyle", "showPasswordToggle", "style", "textStyle"]);
1049
+ const [showPassword, setShowPassword] = useState(false);
1050
+ // Determine color scheme based on state
1051
+ const effectiveColorScheme = (_b = resolveColorScheme(theme, colorScheme, colorSchemeLight, colorSchemeDark)) !== null && _b !== void 0 ? _b : 'default';
1052
+ let finalColorScheme = effectiveColorScheme;
1053
+ if (error) finalColorScheme = 'error';else if (success) finalColorScheme = 'success';
1054
+ const classes = inputStyles({
1055
+ colorScheme: finalColorScheme,
1056
+ size,
1057
+ variant,
1058
+ disabled
1059
+ }) + (className ? ` ${className}` : '');
1060
+ const isPassword = secureTextEntry;
1061
+ const shouldShowToggle = isPassword && showPasswordToggle;
1062
+ const hasPrefix = Boolean(prefix);
1063
+ const togglePasswordVisibility = () => {
1064
+ setShowPassword(!showPassword);
1065
+ };
1066
+ // Convert Tailwind classes to React Native style objects
1067
+ const inputStyle = [cn(classes), style].filter(Boolean);
1068
+ const inputTextStyle = [{
1069
+ color: '#111111',
1070
+ fontSize: 14,
1071
+ lineHeight: 17,
1072
+ fontWeight: '300'
1073
+ }, textStyle].filter(Boolean);
1074
+ // Adjust padding for password toggle button and prefix
1075
+ const containerStyle = {};
1076
+ if (shouldShowToggle) containerStyle.paddingRight = 40;
1077
+ if (hasPrefix) containerStyle.paddingLeft = 70; // Extra space for prefix
1078
+ // Default prefix style
1079
+ const defaultPrefixStyle = {
1080
+ color: 'rgba(17, 17, 17, 0.6)',
1081
+ fontSize: 14,
1082
+ lineHeight: 17
1083
+ };
1084
+ // Render prefix element
1085
+ const renderPrefix = () => {
1086
+ if (!hasPrefix) return null;
1087
+ return jsx(View, {
1088
+ style: {
1089
+ position: 'absolute',
1090
+ left: 16,
1091
+ height: '100%',
1092
+ justifyContent: 'center',
1093
+ zIndex: 10,
1094
+ pointerEvents: 'none'
1095
+ },
1096
+ children: typeof prefix === 'string' ? jsx(Text$1, {
1097
+ style: [defaultPrefixStyle, prefixStyle],
1098
+ children: prefix
1099
+ }) : prefix
1100
+ });
1101
+ };
1102
+ if (isPassword || hasPrefix) {
1103
+ return jsxs(View, {
1104
+ style: {
1105
+ position: 'relative'
1106
+ },
1107
+ children: [renderPrefix(), jsx(TextInput, Object.assign({
1108
+ style: [inputStyle, containerStyle, inputTextStyle],
1109
+ editable: !disabled,
1110
+ secureTextEntry: isPassword && !showPassword,
1111
+ placeholderTextColor: "rgba(17, 17, 17, 0.6)"
1112
+ }, props)), shouldShowToggle && jsx(TouchableOpacity, {
1113
+ style: {
1114
+ position: 'absolute',
1115
+ right: 16,
1116
+ height: '100%',
1117
+ justifyContent: 'center',
1118
+ alignItems: 'center',
1119
+ opacity: 0.5
1120
+ },
1121
+ onPress: togglePasswordVisibility,
1122
+ activeOpacity: 0.7,
1123
+ children: showPassword ? jsx(EyeClosedIcon, {
1124
+ size: 16,
1125
+ color: '#0C1C33'
1126
+ }) : jsx(EyeOpenIcon, {
1127
+ size: 16,
1128
+ color: '#0C1C33'
1129
+ })
1130
+ })]
1131
+ });
1132
+ }
1133
+ // Regular input without prefix or password
1134
+ return jsx(TextInput, Object.assign({
1135
+ style: [inputStyle, inputTextStyle],
1136
+ editable: !disabled,
1137
+ placeholderTextColor: "rgba(17, 17, 17, 0.6)"
1138
+ }, props));
1139
+ };
1140
+
1141
+ const tabsRootStyles = cva('flex-col w-full', {
1142
+ variants: {
1143
+ theme: {
1144
+ light: '',
1145
+ dark: ''
1146
+ }
1147
+ },
1148
+ defaultVariants: {
1149
+ theme: 'light'
1150
+ }
1151
+ });
1152
+ const tabsListStyles = cva('flex-row relative', {
1153
+ variants: {
1154
+ theme: {
1155
+ light: '',
1156
+ dark: ''
1157
+ }
1158
+ },
1159
+ defaultVariants: {
1160
+ theme: 'light'
1161
+ }
1162
+ });
1163
+ const tabsTriggerStyles = cva(['flex-row items-center justify-center relative', 'font-light transition-all'], {
1164
+ variants: {
1165
+ theme: {
1166
+ light: '',
1167
+ dark: ''
1168
+ },
1169
+ active: {
1170
+ true: '',
1171
+ false: ''
1172
+ },
1173
+ size: {
1174
+ sm: 'text-sm px-0 pr-3 pb-2',
1175
+ lg: 'text-xl px-0 pr-4 pb-3',
1176
+ xl: 'text-2xl px-0 pr-[14px] pb-[10px]'
1177
+ }
1178
+ },
1179
+ compoundVariants: [{
1180
+ theme: 'light',
1181
+ active: true,
1182
+ class: 'text-dash-primary-dark-blue'
1183
+ }, {
1184
+ theme: 'light',
1185
+ active: false,
1186
+ class: 'text-[rgba(12,28,51,0.35)]'
1187
+ }, {
1188
+ theme: 'dark',
1189
+ active: true,
1190
+ class: 'text-white'
1191
+ }, {
1192
+ theme: 'dark',
1193
+ active: false,
1194
+ class: 'text-gray-400'
1195
+ }],
1196
+ defaultVariants: {
1197
+ theme: 'light',
1198
+ active: false,
1199
+ size: 'xl'
1200
+ }
1201
+ });
1202
+ const tabsContentStyles = cva('', {
1203
+ variants: {
1204
+ theme: {
1205
+ light: '',
1206
+ dark: ''
1207
+ },
1208
+ size: {
1209
+ sm: 'mt-2',
1210
+ lg: 'mt-3',
1211
+ xl: 'mt-4'
1212
+ }
1213
+ },
1214
+ defaultVariants: {
1215
+ theme: 'light',
1216
+ size: 'xl'
1217
+ }
1218
+ });
1219
+ /**
1220
+ * React Native Tabs component with sleek underline style matching Figma design.
1221
+ * Features horizontal scrolling, light/dark theme support, and touch interactions.
1222
+ */
1223
+ const Tabs = ({
1224
+ items,
1225
+ value,
1226
+ defaultValue,
1227
+ onValueChange,
1228
+ size = 'xl',
1229
+ theme = 'light',
1230
+ className = '',
1231
+ listClassName = '',
1232
+ triggerClassName = '',
1233
+ contentClassName = '',
1234
+ style,
1235
+ listStyle,
1236
+ triggerStyle,
1237
+ contentStyle,
1238
+ textStyle
1239
+ }) => {
1240
+ var _a;
1241
+ const [internalValue, setInternalValue] = useState(defaultValue || ((_a = items[0]) === null || _a === void 0 ? void 0 : _a.value) || '');
1242
+ // Use controlled value if provided, otherwise use internal state
1243
+ const currentValue = value !== undefined ? value : internalValue;
1244
+ const handleValueChange = newValue => {
1245
+ if (value === undefined) {
1246
+ setInternalValue(newValue);
1247
+ }
1248
+ onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(newValue);
1249
+ };
1250
+ const rootClasses = tabsRootStyles({
1251
+ theme
1252
+ }) + (className ? ` ${className}` : '');
1253
+ const listClasses = tabsListStyles({
1254
+ theme
1255
+ }) + (listClassName ? ` ${listClassName}` : '');
1256
+ const contentClasses = tabsContentStyles({
1257
+ theme,
1258
+ size
1259
+ }) + (contentClassName ? ` ${contentClassName}` : '');
1260
+ const rootStyle = [cn(rootClasses), style].filter(Boolean);
1261
+ const listStyleCombined = [cn(listClasses), listStyle].filter(Boolean);
1262
+ const contentStyleCombined = [cn(contentClasses), contentStyle].filter(Boolean);
1263
+ // Border color based on theme
1264
+ const borderColor = theme === 'light' ? 'rgba(12, 28, 51, 0.15)' : 'rgba(156, 163, 175, 0.5)';
1265
+ const activeBorderColor = '#4C7EFF';
1266
+ return jsxs(View, {
1267
+ style: rootStyle,
1268
+ children: [jsxs(View, {
1269
+ style: {
1270
+ position: 'relative'
1271
+ },
1272
+ children: [jsx(ScrollView, {
1273
+ horizontal: true,
1274
+ showsHorizontalScrollIndicator: false,
1275
+ style: listStyleCombined,
1276
+ contentContainerStyle: {
1277
+ flexDirection: 'row'
1278
+ },
1279
+ children: items.map(item => {
1280
+ const isActive = currentValue === item.value;
1281
+ const triggerClasses = tabsTriggerStyles({
1282
+ theme,
1283
+ active: isActive,
1284
+ size
1285
+ }) + (triggerClassName ? ` ${triggerClassName}` : '');
1286
+ const triggerStyleCombined = [cn(triggerClasses), triggerStyle].filter(Boolean);
1287
+ // Get text size based on size prop
1288
+ let fontSize = 24; // xl
1289
+ let lineHeight = 33; // xl (1.366)
1290
+ if (size === 'sm') {
1291
+ fontSize = 14;
1292
+ lineHeight = 18; // 1.25
1293
+ } else if (size === 'lg') {
1294
+ fontSize = 20;
1295
+ lineHeight = 26; // 1.3
1296
+ }
1297
+ // Text color based on theme and active state
1298
+ let textColor = 'rgba(12, 28, 51, 0.35)'; // light inactive
1299
+ if (theme === 'light' && isActive) {
1300
+ textColor = '#0C1C33'; // light active
1301
+ } else if (theme === 'dark' && isActive) {
1302
+ textColor = '#FFFFFF'; // dark active
1303
+ } else if (theme === 'dark' && !isActive) {
1304
+ textColor = 'rgba(156, 163, 175, 1)'; // dark inactive
1305
+ }
1306
+ const baseTextStyle = {
1307
+ fontSize,
1308
+ lineHeight,
1309
+ color: textColor,
1310
+ fontWeight: isActive ? '500' : '300'
1311
+ };
1312
+ const finalTextStyle = [baseTextStyle, textStyle].filter(Boolean);
1313
+ return jsxs(TouchableOpacity, {
1314
+ disabled: item.disabled,
1315
+ onPress: () => !item.disabled && handleValueChange(item.value),
1316
+ activeOpacity: 0.8,
1317
+ style: triggerStyleCombined,
1318
+ children: [jsx(Text$1, {
1319
+ style: finalTextStyle,
1320
+ children: item.label
1321
+ }), isActive && jsx(View, {
1322
+ style: {
1323
+ position: 'absolute',
1324
+ bottom: 0,
1325
+ left: -4,
1326
+ right: size === 'sm' ? 12 : size === 'lg' ? 16 : 14,
1327
+ height: 1,
1328
+ backgroundColor: activeBorderColor,
1329
+ zIndex: 10
1330
+ }
1331
+ })]
1332
+ }, item.value);
1333
+ })
1334
+ }), jsx(View, {
1335
+ style: {
1336
+ position: 'absolute',
1337
+ bottom: 0,
1338
+ left: 0,
1339
+ right: 0,
1340
+ height: 1,
1341
+ backgroundColor: borderColor
1342
+ }
1343
+ })]
1344
+ }), items.map(item => {
1345
+ if (currentValue !== item.value) return null;
1346
+ return jsx(View, {
1347
+ style: contentStyleCombined,
1348
+ children: item.content
1349
+ }, item.value);
1350
+ })]
1351
+ });
1352
+ };
1353
+
1354
+ /**
1355
+ * Avatar component that creates unique identicons from usernames
1356
+ * with customizable appearance.
1357
+ *
1358
+ * This is the React Native version that uses SvgXml instead of img tag.
1359
+ */
1360
+ const Avatar = _a => {
1361
+ var {
1362
+ username,
1363
+ className = '',
1364
+ saturation = 50,
1365
+ lightness = 50,
1366
+ width = 40,
1367
+ height = 40,
1368
+ style
1369
+ } = _a,
1370
+ props = __rest(_a, ["username", "className", "saturation", "lightness", "width", "height", "style"]);
1371
+ // Generate SVG string directly (no data URI needed for SvgXml)
1372
+ const svgString = useMemo(() => minidenticon(username, saturation, lightness), [username, saturation, lightness]);
1373
+ const containerClasses = `relative ${className}`.trim();
1374
+ const containerStyle = [cn(containerClasses), style].filter(Boolean);
1375
+ return jsx(View, Object.assign({
1376
+ style: containerStyle
1377
+ }, props, {
1378
+ children: jsx(SvgXml, {
1379
+ xml: svgString,
1380
+ width: width,
1381
+ height: height
1382
+ })
1383
+ }));
1384
+ };
1385
+
1386
+ // Base badge container styles
1387
+ const badgeStyles = cva('inline-flex items-center justify-center font-medium', {
1388
+ variants: {
1389
+ size: {
1390
+ xxs: 'px-1 py-1 text-xs rounded-full',
1391
+ xs: 'px-2 py-1 text-xs rounded-full',
1392
+ sm: 'px-[34px] py-[10px] text-xs rounded-full',
1393
+ xl: 'px-9 py-4 text-lg rounded-full'
1394
+ },
1395
+ borderRadius: {
1396
+ default: '',
1397
+ xs: 'rounded-[4px]'
1398
+ },
1399
+ // Color and variant combinations - blue
1400
+ color_variant_blue_default: {
1401
+ true: ''
1402
+ },
1403
+ color_variant_blue_flat: {
1404
+ true: 'bg-[rgba(76,126,255,0.15)]'
1405
+ },
1406
+ color_variant_blue_solid: {
1407
+ true: 'bg-[#4C7EFF]'
1408
+ },
1409
+ color_variant_blue_bordered: {
1410
+ true: 'border border-[#4C7EFF]'
1411
+ },
1412
+ // Color and variant combinations - white
1413
+ color_variant_white_default: {
1414
+ true: ''
1415
+ },
1416
+ color_variant_white_flat: {
1417
+ true: 'bg-[rgba(255,255,255,0.15)]'
1418
+ },
1419
+ color_variant_white_solid: {
1420
+ true: 'bg-white'
1421
+ },
1422
+ color_variant_white_bordered: {
1423
+ true: 'border border-white'
1424
+ },
1425
+ // Color and variant combinations - gray
1426
+ color_variant_gray_default: {
1427
+ true: ''
1428
+ },
1429
+ color_variant_gray_flat: {
1430
+ true: 'bg-[rgba(12,28,51,0.15)]'
1431
+ },
1432
+ color_variant_gray_solid: {
1433
+ true: 'bg-[#0C1C33]'
1434
+ },
1435
+ color_variant_gray_bordered: {
1436
+ true: 'border border-[#0C1C33]'
1437
+ },
1438
+ // Color and variant combinations - light-gray
1439
+ color_variant_lightgray_default: {
1440
+ true: ''
1441
+ },
1442
+ color_variant_lightgray_flat: {
1443
+ true: 'bg-[rgba(12,28,51,0.05)]'
1444
+ },
1445
+ color_variant_lightgray_solid: {
1446
+ true: 'bg-[rgba(12,28,51,0.15)]'
1447
+ },
1448
+ color_variant_lightgray_bordered: {
1449
+ true: 'border border-[#6B7280]'
1450
+ },
1451
+ // Color and variant combinations - turquoise
1452
+ color_variant_turquoise_default: {
1453
+ true: ''
1454
+ },
1455
+ color_variant_turquoise_flat: {
1456
+ true: 'bg-[rgba(96,246,210,0.15)]'
1457
+ },
1458
+ color_variant_turquoise_solid: {
1459
+ true: 'bg-[#60F6D2]'
1460
+ },
1461
+ color_variant_turquoise_bordered: {
1462
+ true: 'border border-[#60F6D2]'
1463
+ },
1464
+ // Color and variant combinations - red
1465
+ color_variant_red_default: {
1466
+ true: ''
1467
+ },
1468
+ color_variant_red_flat: {
1469
+ true: 'bg-[rgba(205,46,0,0.15)]'
1470
+ },
1471
+ color_variant_red_solid: {
1472
+ true: 'bg-[#CD2E00]'
1473
+ },
1474
+ color_variant_red_bordered: {
1475
+ true: 'border border-[#CD2E00]'
1476
+ },
1477
+ // Color and variant combinations - orange
1478
+ color_variant_orange_default: {
1479
+ true: ''
1480
+ },
1481
+ color_variant_orange_flat: {
1482
+ true: 'bg-[rgba(249,143,18,0.15)]'
1483
+ },
1484
+ color_variant_orange_solid: {
1485
+ true: 'bg-[#F98F12]'
1486
+ },
1487
+ color_variant_orange_bordered: {
1488
+ true: 'border border-[#F98F12]'
1489
+ }
1490
+ },
1491
+ defaultVariants: {
1492
+ size: 'sm',
1493
+ borderRadius: 'default'
1494
+ }
1495
+ });
1496
+ // Text color styles
1497
+ const textStyles = cva('font-medium', {
1498
+ variants: {
1499
+ size: {
1500
+ xxs: 'text-xs',
1501
+ xs: 'text-xs',
1502
+ sm: 'text-xs',
1503
+ xl: 'text-lg'
1504
+ },
1505
+ // Text colors for each color and variant combination
1506
+ color_variant_blue_default: {
1507
+ true: 'text-[#4C7EFF]'
1508
+ },
1509
+ color_variant_blue_flat: {
1510
+ true: 'text-[#4C7EFF]'
1511
+ },
1512
+ color_variant_blue_solid: {
1513
+ true: 'text-white'
1514
+ },
1515
+ color_variant_blue_bordered: {
1516
+ true: 'text-[#4C7EFF]'
1517
+ },
1518
+ color_variant_white_default: {
1519
+ true: 'text-white'
1520
+ },
1521
+ color_variant_white_flat: {
1522
+ true: 'text-white'
1523
+ },
1524
+ color_variant_white_solid: {
1525
+ true: 'text-[#0C1C33]'
1526
+ },
1527
+ color_variant_white_bordered: {
1528
+ true: 'text-white'
1529
+ },
1530
+ color_variant_gray_default: {
1531
+ true: 'text-[#0C1C33]'
1532
+ },
1533
+ color_variant_gray_flat: {
1534
+ true: 'text-[#0C1C33]'
1535
+ },
1536
+ color_variant_gray_solid: {
1537
+ true: 'text-white'
1538
+ },
1539
+ color_variant_gray_bordered: {
1540
+ true: 'text-[#0C1C33]'
1541
+ },
1542
+ color_variant_lightgray_default: {
1543
+ true: 'text-[#6B7280]'
1544
+ },
1545
+ color_variant_lightgray_flat: {
1546
+ true: 'text-[#0C1C33]'
1547
+ },
1548
+ color_variant_lightgray_solid: {
1549
+ true: 'text-[#0C1C33]'
1550
+ },
1551
+ color_variant_lightgray_bordered: {
1552
+ true: 'text-[#6B7280]'
1553
+ },
1554
+ color_variant_turquoise_default: {
1555
+ true: 'text-[#60F6D2]'
1556
+ },
1557
+ color_variant_turquoise_flat: {
1558
+ true: 'text-[#60F6D2]'
1559
+ },
1560
+ color_variant_turquoise_solid: {
1561
+ true: 'text-[#0C1C33]'
1562
+ },
1563
+ color_variant_turquoise_bordered: {
1564
+ true: 'text-[#60F6D2]'
1565
+ },
1566
+ color_variant_red_default: {
1567
+ true: 'text-[#CD2E00]'
1568
+ },
1569
+ color_variant_red_flat: {
1570
+ true: 'text-[#CD2E00]'
1571
+ },
1572
+ color_variant_red_solid: {
1573
+ true: 'text-white'
1574
+ },
1575
+ color_variant_red_bordered: {
1576
+ true: 'text-[#CD2E00]'
1577
+ },
1578
+ color_variant_orange_default: {
1579
+ true: 'text-[#F98F12]'
1580
+ },
1581
+ color_variant_orange_flat: {
1582
+ true: 'text-[#F98F12]'
1583
+ },
1584
+ color_variant_orange_solid: {
1585
+ true: 'text-white'
1586
+ },
1587
+ color_variant_orange_bordered: {
1588
+ true: 'text-[#F98F12]'
1589
+ }
1590
+ },
1591
+ defaultVariants: {
1592
+ size: 'sm'
1593
+ }
1594
+ });
1595
+ // Mapping object for color key normalization (handles dashes)
1596
+ const COLOR_KEY_MAP = {
1597
+ 'blue': 'blue',
1598
+ 'white': 'white',
1599
+ 'gray': 'gray',
1600
+ 'light-gray': 'lightgray',
1601
+ 'turquoise': 'turquoise',
1602
+ 'red': 'red',
1603
+ 'orange': 'orange'
1604
+ };
1605
+ /**
1606
+ * React Native Badge component with multiple variants, colors, sizes, and border radius options.
1607
+ * Uses CVA for variant management and twrnc for Tailwind styling.
1608
+ *
1609
+ * Supports 28 style combinations (7 colors × 4 variants) with 4 sizes and optional custom border radius.
1610
+ */
1611
+ const Badge = _a => {
1612
+ var _b;
1613
+ var {
1614
+ children,
1615
+ theme = 'light',
1616
+ variant = 'default',
1617
+ color,
1618
+ colorLight,
1619
+ colorDark,
1620
+ size = 'sm',
1621
+ borderRadius,
1622
+ className = '',
1623
+ style,
1624
+ textStyle,
1625
+ onPress
1626
+ } = _a,
1627
+ props = __rest(_a, ["children", "theme", "variant", "color", "colorLight", "colorDark", "size", "borderRadius", "className", "style", "textStyle", "onPress"]);
1628
+ const effectiveColor = (_b = resolveColorScheme(theme, color, colorLight, colorDark)) !== null && _b !== void 0 ? _b : 'blue';
1629
+ // Generate the color_variant key for CVA using explicit mapping
1630
+ const normalizedColor = COLOR_KEY_MAP[effectiveColor] || effectiveColor;
1631
+ const colorVariantKey = `color_variant_${normalizedColor}_${variant}`;
1632
+ // Build the badge container classes with proper typing
1633
+ const badgeVariantProps = {
1634
+ size,
1635
+ borderRadius: borderRadius || 'default',
1636
+ [colorVariantKey]: true
1637
+ };
1638
+ const badgeClasses = badgeStyles(badgeVariantProps);
1639
+ // Build the text classes with proper typing
1640
+ const textVariantProps = {
1641
+ size,
1642
+ [colorVariantKey]: true
1643
+ };
1644
+ const textClasses = textStyles(textVariantProps);
1645
+ // Convert Tailwind classes to React Native style objects
1646
+ const combinedClasses = className ? `${badgeClasses} ${className}` : badgeClasses;
1647
+ const badgeStyleArray = [cn(combinedClasses), style].filter(Boolean);
1648
+ const textStyleMerged = [cn(textClasses), textStyle].filter(Boolean);
1649
+ // Render content (string children wrapped in Text, custom content as-is)
1650
+ const content = typeof children === 'string' ? jsx(Text$1, {
1651
+ style: textStyleMerged,
1652
+ children: children
1653
+ }) : children;
1654
+ // If onPress is provided, wrap in Pressable
1655
+ if (onPress) {
1656
+ return jsx(Pressable, Object.assign({
1657
+ style: ({
1658
+ pressed
1659
+ }) => pressed ? [...badgeStyleArray, {
1660
+ opacity: 0.7
1661
+ }] : badgeStyleArray,
1662
+ onPress: onPress
1663
+ }, props, {
1664
+ children: content
1665
+ }));
1666
+ }
1667
+ // Otherwise, just render as View
1668
+ return jsx(View, {
1669
+ style: badgeStyleArray,
1670
+ children: content
1671
+ });
1672
+ };
1673
+
1674
+ /**
1675
+ * Groups digits into chunks of three, right to left.
1676
+ * Used for formatting large numbers with thousand separators.
1677
+ */
1678
+ const groupDigits = intPart => {
1679
+ return intPart.split('').reverse().reduce((acc, char, idx) => {
1680
+ if (idx % 3 === 0) acc.unshift('');
1681
+ acc[0] = char + acc[0];
1682
+ return acc;
1683
+ }, []);
1684
+ };
1685
+ /**
1686
+ * Splits a numeric string into groups of three characters for display.
1687
+ * Supports two variants:
1688
+ * - `space`: groups separated by gap
1689
+ * - `comma`: groups separated by commas, with decimal part after `.`
1690
+ * Supports light/dark theme via dark: variants.
1691
+ */
1692
+ const BigNumber = ({
1693
+ children,
1694
+ variant = 'space',
1695
+ className = '',
1696
+ decimalPointSpacing = -2,
1697
+ style,
1698
+ textStyle
1699
+ }) => {
1700
+ const decimalPointStyle = {
1701
+ marginLeft: decimalPointSpacing,
1702
+ marginRight: decimalPointSpacing
1703
+ };
1704
+ if (children === undefined || children === null) return null;
1705
+ const str = children.toString();
1706
+ // Combine base styles with optional className
1707
+ const containerClasses = `flex-row flex-wrap gap-1 ${className || ''}`;
1708
+ const textClasses = 'dark:text-gray-100';
1709
+ const containerStyle = [cn(containerClasses), style].filter(Boolean);
1710
+ const textStyleMerged = [cn(textClasses), textStyle].filter(Boolean);
1711
+ if (variant === 'space') {
1712
+ // Split into integer and decimal parts
1713
+ const [intPart, fracPart] = str.split('.');
1714
+ // group digits every 3, right to left (only for integer part)
1715
+ const groups = groupDigits(intPart);
1716
+ return jsxs(View, {
1717
+ style: containerStyle,
1718
+ children: [groups.map((grp, i) => jsx(Text$1, {
1719
+ style: textStyleMerged,
1720
+ children: grp
1721
+ }, i)), fracPart != null && jsxs(Fragment, {
1722
+ children: [jsx(Text$1, {
1723
+ style: [...textStyleMerged, decimalPointStyle],
1724
+ children: "."
1725
+ }), jsx(Text$1, {
1726
+ style: textStyleMerged,
1727
+ children: fracPart
1728
+ })]
1729
+ })]
1730
+ });
1731
+ } else {
1732
+ // comma variant
1733
+ const [intPart, fracPart] = str.split('.');
1734
+ const groups = groupDigits(intPart);
1735
+ return jsxs(View, {
1736
+ style: containerStyle,
1737
+ children: [groups.map((grp, i) => jsxs(View, {
1738
+ style: cn('flex-row'),
1739
+ children: [jsx(Text$1, {
1740
+ style: textStyleMerged,
1741
+ children: grp
1742
+ }), i < groups.length - 1 && jsx(Text$1, {
1743
+ style: textStyleMerged,
1744
+ children: ","
1745
+ })]
1746
+ }, i)), fracPart != null && jsxs(Fragment, {
1747
+ children: [jsx(Text$1, {
1748
+ style: [...textStyleMerged, decimalPointStyle],
1749
+ children: "."
1750
+ }), jsx(Text$1, {
1751
+ style: textStyleMerged,
1752
+ children: fracPart
1753
+ })]
1754
+ })]
1755
+ });
1756
+ }
1757
+ };
1758
+
1759
+ /**
1760
+ * Universal Clipboard utility for React Native and Expo
1761
+ *
1762
+ * Supports both:
1763
+ * - @react-native-clipboard/clipboard (React Native)
1764
+ * - expo-clipboard (Expo)
1765
+ *
1766
+ * Automatically detects which one is available and uses it.
1767
+ */
1768
+ let clipboardInstance = null;
1769
+ /**
1770
+ * Get the clipboard instance
1771
+ * Tries to load expo-clipboard first, then falls back to @react-native-clipboard/clipboard
1772
+ */
1773
+ function getClipboard() {
1774
+ if (clipboardInstance) {
1775
+ return clipboardInstance;
1776
+ }
1777
+ try {
1778
+ // Try expo-clipboard first (most common in Expo projects)
1779
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
1780
+ const ExpoClipboard = require('expo-clipboard');
1781
+ if ((ExpoClipboard === null || ExpoClipboard === void 0 ? void 0 : ExpoClipboard.setStringAsync) && (ExpoClipboard === null || ExpoClipboard === void 0 ? void 0 : ExpoClipboard.getStringAsync)) {
1782
+ clipboardInstance = {
1783
+ setString: text => {
1784
+ ExpoClipboard.setStringAsync(text).catch(err => {
1785
+ console.warn('[dash-ui-kit] Failed to copy to clipboard:', err);
1786
+ });
1787
+ },
1788
+ getString: () => ExpoClipboard.getStringAsync()
1789
+ };
1790
+ return clipboardInstance;
1791
+ }
1792
+ } catch (err) {
1793
+ // expo-clipboard not available, continue to try React Native clipboard
1794
+ }
1795
+ try {
1796
+ // Try @react-native-clipboard/clipboard (React Native)
1797
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
1798
+ const RNClipboard = require('@react-native-clipboard/clipboard');
1799
+ if ((RNClipboard === null || RNClipboard === void 0 ? void 0 : RNClipboard.default) || (RNClipboard === null || RNClipboard === void 0 ? void 0 : RNClipboard.Clipboard)) {
1800
+ const clipboard = RNClipboard.default || RNClipboard.Clipboard;
1801
+ clipboardInstance = {
1802
+ setString: text => clipboard.setString(text),
1803
+ getString: () => clipboard.getString()
1804
+ };
1805
+ return clipboardInstance;
1806
+ }
1807
+ } catch (err) {
1808
+ // @react-native-clipboard/clipboard not available
1809
+ }
1810
+ // No clipboard available - return stub
1811
+ console.warn('[dash-ui-kit] No clipboard library found. Please install either:\n' + ' - expo-clipboard (for Expo projects): npx expo install expo-clipboard\n' + ' - @react-native-clipboard/clipboard (for React Native): npm install @react-native-clipboard/clipboard');
1812
+ clipboardInstance = {
1813
+ setString: () => {
1814
+ console.warn('[dash-ui-kit] Clipboard not available');
1815
+ },
1816
+ getString: async () => ''
1817
+ };
1818
+ return clipboardInstance;
1819
+ }
1820
+ /**
1821
+ * Universal Clipboard object
1822
+ * Compatible with both expo-clipboard and @react-native-clipboard/clipboard
1823
+ */
1824
+ const Clipboard = {
1825
+ /**
1826
+ * Set string to clipboard
1827
+ * @param text - Text to copy
1828
+ */
1829
+ setString: text => {
1830
+ const clipboard = getClipboard();
1831
+ clipboard.setString(text);
1832
+ },
1833
+ /**
1834
+ * Get string from clipboard
1835
+ * @returns Promise with clipboard content
1836
+ */
1837
+ getString: () => {
1838
+ const clipboard = getClipboard();
1839
+ return clipboard.getString();
1840
+ }
1841
+ };
1842
+
1843
+ const FEEDBACK_DURATION_MS = 1000;
1844
+ /**
1845
+ * React Native CopyButton component. Copies text to clipboard on press
1846
+ * and shows "Copied!" feedback briefly.
1847
+ */
1848
+ const CopyButton = ({
1849
+ text,
1850
+ onCopy,
1851
+ className = '',
1852
+ style,
1853
+ textStyle,
1854
+ accessibilityLabel = 'Copy to clipboard'
1855
+ }) => {
1856
+ const [copied, setCopied] = useState(false);
1857
+ const timeoutRef = useRef(null);
1858
+ const handlePress = useCallback(() => {
1859
+ Clipboard.setString(text);
1860
+ setCopied(true);
1861
+ onCopy === null || onCopy === void 0 ? void 0 : onCopy(true);
1862
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
1863
+ timeoutRef.current = setTimeout(() => setCopied(false), FEEDBACK_DURATION_MS);
1864
+ }, [text, onCopy]);
1865
+ useEffect(() => {
1866
+ return () => {
1867
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
1868
+ };
1869
+ }, []);
1870
+ const buttonClasses = `p-0 flex-shrink-0 min-w-0 bg-transparent ${className}`.trim();
1871
+ const buttonStyle = [cn(buttonClasses), style].filter(Boolean);
1872
+ const copiedTextClasses = 'text-xs text-dash-brand font-medium';
1873
+ const copiedTextStyle = [cn(copiedTextClasses), textStyle].filter(Boolean);
1874
+ return jsx(Pressable, {
1875
+ onPress: handlePress,
1876
+ style: ({
1877
+ pressed
1878
+ }) => [buttonStyle, pressed && {
1879
+ opacity: 0.7
1880
+ }].filter(Boolean),
1881
+ accessibilityLabel: accessibilityLabel,
1882
+ accessibilityRole: "button",
1883
+ children: copied ? jsx(View, {
1884
+ style: cn('items-center justify-center min-w-4 min-h-4'),
1885
+ children: jsx(Text$1, {
1886
+ style: copiedTextStyle,
1887
+ children: "Copied!"
1888
+ })
1889
+ }) : jsx(CopyIcon, {
1890
+ color: "#0C1C33",
1891
+ size: 16
1892
+ })
1893
+ });
1894
+ };
1895
+
1896
+ /**
1897
+ * NotActive component for React Native
1898
+ * Shows "n/a" text with theme-aware styling
1899
+ */
1900
+ function NotActive(_a) {
1901
+ var {
1902
+ children,
1903
+ className = '',
1904
+ theme = 'light',
1905
+ style
1906
+ } = _a,
1907
+ props = __rest(_a, ["children", "className", "theme", "style"]);
1908
+ const themeColor = theme === 'dark' ? 'text-gray-500' : 'text-gray-400';
1909
+ const textClasses = `text-sm ${themeColor} ${className}`.trim();
1910
+ return jsx(Text$1, Object.assign({
1911
+ style: [cn(textClasses), style].filter(Boolean)
1912
+ }, props, {
1913
+ children: children !== null && children !== void 0 ? children : 'n/a'
1914
+ }));
1915
+ }
1916
+
1917
+ /** CVA for the root container with light/dark theme */
1918
+ const identifier = cva('flex flex-row items-center font-dash-grotesque text-sm font-normal', {
1919
+ variants: {
1920
+ theme: {
1921
+ light: 'text-gray-900',
1922
+ dark: 'text-white'
1923
+ },
1924
+ ellipsis: {
1925
+ false: '',
1926
+ true: 'overflow-hidden'
1927
+ },
1928
+ highlight: {
1929
+ default: '',
1930
+ dim: '',
1931
+ highlight: '',
1932
+ first: '',
1933
+ last: '',
1934
+ both: ''
1935
+ }
1936
+ },
1937
+ defaultVariants: {
1938
+ theme: 'light',
1939
+ ellipsis: false,
1940
+ highlight: 'default'
1941
+ }
1942
+ });
1943
+ /** CVA for each symbol text: inherits root color or dims */
1944
+ const symbol = cva('flex-1', {
1945
+ variants: {
1946
+ dim: {
1947
+ false: '',
1948
+ true: 'opacity-50'
1949
+ }
1950
+ },
1951
+ defaultVariants: {
1952
+ dim: false
1953
+ }
1954
+ });
1955
+ /** Highlight modes configuration */
1956
+ const highlightModes = {
1957
+ default: {
1958
+ first: true,
1959
+ middle: false,
1960
+ last: true
1961
+ },
1962
+ dim: {
1963
+ first: false,
1964
+ middle: false,
1965
+ last: false
1966
+ },
1967
+ highlight: {
1968
+ first: true,
1969
+ middle: true,
1970
+ last: true
1971
+ },
1972
+ first: {
1973
+ first: true,
1974
+ middle: false,
1975
+ last: false
1976
+ },
1977
+ last: {
1978
+ first: false,
1979
+ middle: false,
1980
+ last: true
1981
+ },
1982
+ both: {
1983
+ first: true,
1984
+ middle: false,
1985
+ last: true
1986
+ }
1987
+ };
1988
+ /**
1989
+ * HighlightedID subcomponent
1990
+ * Renders text with highlighting based on mode
1991
+ */
1992
+ const HighlightedID = ({
1993
+ children,
1994
+ mode,
1995
+ theme = 'light',
1996
+ textStyle
1997
+ }) => {
1998
+ if (children == null || children === '') return jsx(NotActive, {
1999
+ theme: theme
2000
+ });
2001
+ const text = String(children);
2002
+ const cfg = highlightModes[mode];
2003
+ const count = 5;
2004
+ const minLength = count * 2 + 1; // 11
2005
+ if (text.length < minLength) {
2006
+ const symbolStyle = [cn(symbol({
2007
+ dim: cfg.middle
2008
+ })), textStyle].filter(Boolean);
2009
+ return jsx(Text$1, {
2010
+ style: symbolStyle,
2011
+ children: text
2012
+ });
2013
+ }
2014
+ const first = text.slice(0, count);
2015
+ const middle = text.slice(count, text.length - count);
2016
+ const last = text.slice(-5);
2017
+ const firstStyle = [cn(symbol({
2018
+ dim: !cfg.first
2019
+ })), textStyle].filter(Boolean);
2020
+ const middleStyle = [cn(symbol({
2021
+ dim: !cfg.middle
2022
+ })), textStyle].filter(Boolean);
2023
+ const lastStyle = [cn(symbol({
2024
+ dim: !cfg.last
2025
+ })), textStyle].filter(Boolean);
2026
+ return jsxs(Text$1, {
2027
+ children: [jsx(Text$1, {
2028
+ style: firstStyle,
2029
+ children: first
2030
+ }), jsx(Text$1, {
2031
+ style: middleStyle,
2032
+ children: middle
2033
+ }), jsx(Text$1, {
2034
+ style: lastStyle,
2035
+ children: last
2036
+ })]
2037
+ });
2038
+ };
2039
+ /**
2040
+ * MiddleEllipsisText subcomponent
2041
+ * Renders text with ellipsis in the middle
2042
+ */
2043
+ const MiddleEllipsisText = ({
2044
+ children,
2045
+ edgeChars,
2046
+ theme = 'light',
2047
+ textStyle
2048
+ }) => {
2049
+ if (children == null || children === '') return jsx(NotActive, {
2050
+ theme: theme
2051
+ });
2052
+ const text = String(children);
2053
+ if (text.length <= edgeChars * 2) {
2054
+ const style = textStyle ? [textStyle] : undefined;
2055
+ return jsx(Text$1, {
2056
+ style: style,
2057
+ children: text
2058
+ });
2059
+ }
2060
+ const first = text.slice(0, edgeChars);
2061
+ const last = text.slice(-edgeChars);
2062
+ const ellipsisStyle = [cn('opacity-50'), textStyle].filter(Boolean);
2063
+ return jsxs(Text$1, {
2064
+ children: [jsx(Text$1, {
2065
+ style: textStyle,
2066
+ children: first
2067
+ }), jsx(Text$1, {
2068
+ style: ellipsisStyle,
2069
+ children: "\u2026"
2070
+ }), jsx(Text$1, {
2071
+ style: textStyle,
2072
+ children: last
2073
+ })]
2074
+ });
2075
+ };
2076
+ /**
2077
+ * Identifier component for React Native
2078
+ * Shows an ID string with optional highlighting, avatar, copy button, and ellipsis modes.
2079
+ *
2080
+ * Features:
2081
+ * - Highlight modes: default, dim, highlight, first, last, both
2082
+ * - Ellipsis modes: standard (tail), middle, maxLines
2083
+ * - Avatar integration
2084
+ * - Copy button integration
2085
+ * - Theme support (light/dark)
2086
+ *
2087
+ * @example
2088
+ * ```tsx
2089
+ * <Identifier highlight="both">0x1234567890abcdef</Identifier>
2090
+ * <Identifier avatar copyButton>alice@example.com</Identifier>
2091
+ * <Identifier middleEllipsis edgeChars={6}>very-long-identifier</Identifier>
2092
+ * <Identifier maxLines={2}>Multi-line\nidentifier\ntext</Identifier>
2093
+ * ```
2094
+ */
2095
+ const Identifier = _a => {
2096
+ var {
2097
+ children,
2098
+ ellipsis = false,
2099
+ highlight = undefined,
2100
+ avatar = false,
2101
+ copyButton = false,
2102
+ maxLines = 0,
2103
+ className = '',
2104
+ middleEllipsis = false,
2105
+ edgeChars = 4,
2106
+ theme = 'light',
2107
+ style,
2108
+ textStyle
2109
+ } = _a,
2110
+ props = __rest(_a, ["children", "ellipsis", "highlight", "avatar", "copyButton", "maxLines", "className", "middleEllipsis", "edgeChars", "theme", "style", "textStyle"]);
2111
+ const [containerWidth, setContainerWidth] = useState(0);
2112
+ // Handle container layout changes
2113
+ const handleLayout = useCallback(event => {
2114
+ const {
2115
+ width
2116
+ } = event.nativeEvent.layout;
2117
+ setContainerWidth(width);
2118
+ }, []);
2119
+ const rootClasses = `${identifier({
2120
+ theme: theme,
2121
+ ellipsis,
2122
+ highlight
2123
+ })} ${className}`.trim();
2124
+ // Determine if we should use standard ellipsis with numberOfLines
2125
+ const useStandardEllipsis = ellipsis === true && !middleEllipsis && maxLines === 0;
2126
+ const useMaxLines = maxLines > 0 && !middleEllipsis;
2127
+ // Symbol container classes
2128
+ const symbolContainerClass = ellipsis === true ? 'flex-1 overflow-hidden' : 'flex-1';
2129
+ // Merge text styles
2130
+ const finalTextStyle = [cn('leading-4'), textStyle].filter(Boolean);
2131
+ return jsxs(View, Object.assign({
2132
+ style: [cn(rootClasses), style].filter(Boolean),
2133
+ onLayout: handleLayout
2134
+ }, props, {
2135
+ children: [avatar && children != null && children !== '' && jsx(Avatar, {
2136
+ username: children,
2137
+ className: "mr-2",
2138
+ width: 24,
2139
+ height: 24
2140
+ }), jsx(View, {
2141
+ style: cn(symbolContainerClass),
2142
+ children: children != null && children !== '' && middleEllipsis ? jsx(MiddleEllipsisText, {
2143
+ edgeChars: edgeChars,
2144
+ theme: theme,
2145
+ textStyle: textStyle,
2146
+ children: children
2147
+ }) : children != null && children !== '' && highlight != null ? jsx(HighlightedID, {
2148
+ mode: highlight,
2149
+ theme: theme,
2150
+ textStyle: textStyle,
2151
+ children: children
2152
+ }) : children != null && children !== '' ? jsx(Text$1, {
2153
+ numberOfLines: useStandardEllipsis ? 1 : useMaxLines ? maxLines : undefined,
2154
+ ellipsizeMode: useStandardEllipsis || useMaxLines ? 'tail' : undefined,
2155
+ style: finalTextStyle,
2156
+ children: children
2157
+ }) : jsx(NotActive, {
2158
+ theme: theme
2159
+ })
2160
+ }), copyButton && children != null && children !== '' && jsx(CopyButton, {
2161
+ className: "ml-3",
2162
+ text: children
2163
+ })]
2164
+ }));
2165
+ };
2166
+
2167
+ /**
2168
+ * ValueCard CVA - twrnc-compatible classes.
2169
+ * dash-block-sm/md/xl expanded: px-3 py-2 rounded-[10px], px-[18px] py-3 rounded-[14px], px-[25px] py-5 rounded-[16px]
2170
+ * hover: classes omitted (RN uses Pressable opacity for press feedback)
2171
+ */
2172
+ const valueCardStyles = cva('flex flex-row items-center', {
2173
+ variants: {
2174
+ theme: {
2175
+ light: 'border-gray-200',
2176
+ dark: 'bg-gray-800/50 border-gray-400'
2177
+ },
2178
+ colorScheme: {
2179
+ default: '',
2180
+ transparent: 'bg-transparent',
2181
+ green: 'text-green-500 bg-green-200 border-green-400',
2182
+ lightBlue: 'bg-[rgba(150,167,255,0.1)] border-[rgba(76,126,255,0.2)]',
2183
+ white: 'bg-white',
2184
+ lightGray: 'bg-[#0c1c3308]',
2185
+ yellow: 'bg-dash-yellow-light border-dash-yellow'
2186
+ },
2187
+ size: {
2188
+ xs: 'px-2 py-1 rounded',
2189
+ sm: 'px-3 py-2 rounded-[10px]',
2190
+ md: 'px-[18px] py-3 rounded-[14px]',
2191
+ xl: 'px-[25px] py-5 rounded-[16px]'
2192
+ },
2193
+ clickable: {
2194
+ false: '',
2195
+ true: ''
2196
+ },
2197
+ loading: {
2198
+ false: '',
2199
+ true: 'opacity-70'
2200
+ },
2201
+ border: {
2202
+ false: 'border-0',
2203
+ true: 'border'
2204
+ }
2205
+ },
2206
+ defaultVariants: {
2207
+ theme: 'light',
2208
+ colorScheme: 'default',
2209
+ size: 'md',
2210
+ clickable: false,
2211
+ loading: false,
2212
+ border: true
2213
+ }
2214
+ });
2215
+ /**
2216
+ * React Native ValueCard - card container with theme, color schemes, sizes,
2217
+ * clickability, loading state, and optional border.
2218
+ */
2219
+ const ValueCard = _a => {
2220
+ var _b;
2221
+ var {
2222
+ theme = 'light',
2223
+ colorScheme,
2224
+ colorSchemeLight,
2225
+ colorSchemeDark,
2226
+ size = 'md',
2227
+ clickable = false,
2228
+ loading = false,
2229
+ border = true,
2230
+ className = '',
2231
+ style,
2232
+ children,
2233
+ onPress
2234
+ } = _a,
2235
+ props = __rest(_a, ["theme", "colorScheme", "colorSchemeLight", "colorSchemeDark", "size", "clickable", "loading", "border", "className", "style", "children", "onPress"]);
2236
+ const isClickable = Boolean(onPress !== null && onPress !== void 0 ? onPress : clickable);
2237
+ const isDisabled = loading;
2238
+ const effectiveColorScheme = (_b = resolveColorScheme(theme, colorScheme, colorSchemeLight, colorSchemeDark)) !== null && _b !== void 0 ? _b : 'default';
2239
+ const classes = valueCardStyles({
2240
+ theme,
2241
+ colorScheme: effectiveColorScheme,
2242
+ size,
2243
+ clickable: isClickable,
2244
+ loading,
2245
+ border
2246
+ });
2247
+ const combinedClasses = className ? `${classes} ${className}` : classes;
2248
+ const containerStyle = [cn(combinedClasses), style].filter(Boolean);
2249
+ const content = loading ? jsx(ActivityIndicator, {
2250
+ testID: "value-card-loading",
2251
+ size: "small",
2252
+ color: effectiveColorScheme === 'green' ? '#22c55e' : effectiveColorScheme === 'lightBlue' ? '#4C7EFF' : '#6B7280'
2253
+ }) : children;
2254
+ if (isClickable && !isDisabled) {
2255
+ return jsx(Pressable, Object.assign({
2256
+ style: ({
2257
+ pressed
2258
+ }) => [...containerStyle, pressed && {
2259
+ opacity: 0.9
2260
+ }],
2261
+ onPress: onPress,
2262
+ disabled: isDisabled
2263
+ }, props, {
2264
+ children: content
2265
+ }));
2266
+ }
2267
+ return jsx(View, Object.assign({
2268
+ style: containerStyle
2269
+ }, props, {
2270
+ children: content
2271
+ }));
2272
+ };
2273
+
2274
+ /**
2275
+ * Dash Logo component for React Native with customizable size and color
2276
+ * Original aspect ratio: 30:25 (1.2:1)
2277
+ *
2278
+ * Color can be set via:
2279
+ * - color prop (default: #4C7EFF)
2280
+ *
2281
+ * Container supports:
2282
+ * - containerPadding: padding around the logo
2283
+ * - containerSize: width/height of the container
2284
+ * - containerClassName: Tailwind classes for the container
2285
+ * - containerStyle: Additional style object for the container
2286
+ */
2287
+ const DashLogo = ({
2288
+ color = '#4C7EFF',
2289
+ size,
2290
+ width,
2291
+ height,
2292
+ className = '',
2293
+ onPress,
2294
+ containerPadding,
2295
+ containerSize,
2296
+ containerClassName = '',
2297
+ containerStyle
2298
+ }) => {
2299
+ const logoWidth = width || size || 30;
2300
+ const logoHeight = height || (size ? size * 25 / 30 : 25);
2301
+ const baseContainerClasses = 'flex justify-center items-center';
2302
+ const containerClasses = containerClassName ? `${baseContainerClasses} ${containerClassName}` : baseContainerClasses;
2303
+ const inlineContainerStyle = Object.assign({
2304
+ padding: containerPadding,
2305
+ width: containerSize,
2306
+ height: containerSize
2307
+ }, containerStyle);
2308
+ const combinedContainerStyle = [cn(containerClasses), inlineContainerStyle].filter(Boolean);
2309
+ const logoElement = jsxs(Svg, {
2310
+ width: logoWidth,
2311
+ height: logoHeight,
2312
+ viewBox: '0 0 30 25',
2313
+ fill: 'none',
2314
+ children: [jsx(Path, {
2315
+ d: 'M19.6465 0C29.2466 2.13767e-05 30.9542 5.2464 29.585 12.6006C28.6773 17.5547 26.3845 21.3391 22.5537 23.1084C20.8153 23.9084 19.1848 24.3555 15.3389 24.3555H4.44629L5.33887 19.293H14.9229C20.6921 19.3084 22.2159 16.8009 22.9697 14.6162C23.2467 13.8008 23.9084 11.2619 23.9238 9.76953C23.9699 6.84642 22.5383 5.07715 17.6768 5.07715L7.81543 5.06152L8.72363 0H19.6465Z',
2316
+ fill: color
2317
+ }), jsx(Path, {
2318
+ d: 'M15.2002 9.63184C15.2002 9.63184 15.0775 10.232 14.7236 11.709C14.4621 12.8321 14.0462 14.6934 11.1846 14.6934H0C0.00327153 14.6775 0.12745 14.0734 0.476562 12.6162C0.73811 11.493 1.15435 9.63184 4.01562 9.63184H15.2002Z',
2319
+ fill: color
2320
+ })]
2321
+ });
2322
+ if (onPress) {
2323
+ return jsx(Pressable, {
2324
+ style: combinedContainerStyle,
2325
+ onPress: onPress,
2326
+ children: logoElement
2327
+ });
2328
+ }
2329
+ return jsx(View, {
2330
+ style: combinedContainerStyle,
2331
+ children: logoElement
2332
+ });
2333
+ };
2334
+
2335
+ const defaultColors = {
2336
+ light: {
2337
+ SUCCESS: '#1CC400',
2338
+ FAIL: '#F45858',
2339
+ QUEUED: '#F4A358',
2340
+ POOLED: '#008DE4',
2341
+ BROADCASTED: '#008DE4'
2342
+ },
2343
+ dark: {
2344
+ SUCCESS: '#22D32E',
2345
+ FAIL: '#FF6B6B',
2346
+ QUEUED: '#FFB366',
2347
+ POOLED: '#42A5F5',
2348
+ BROADCASTED: '#42A5F5'
2349
+ }
2350
+ };
2351
+ const iconMap = {
2352
+ SUCCESS: SuccessIcon,
2353
+ FAIL: ErrorIcon,
2354
+ QUEUED: QueuedIcon,
2355
+ POOLED: PooledIcon,
2356
+ BROADCASTED: BroadcastedIcon
2357
+ };
2358
+ /**
2359
+ * Renders an icon corresponding to the given `status`.
2360
+ * If `status` is not recognized, returns null.
2361
+ * Colors adapt to light/dark theme unless overridden.
2362
+ */
2363
+ const TransactionStatusIcon = _a => {
2364
+ var {
2365
+ status,
2366
+ color,
2367
+ theme = 'light'
2368
+ } = _a,
2369
+ props = __rest(_a, ["status", "color", "theme"]);
2370
+ const IconComponent = iconMap[status];
2371
+ if (IconComponent == null) return null;
2372
+ const iconColor = color !== null && color !== void 0 ? color : defaultColors[theme][status];
2373
+ return jsx(IconComponent, Object.assign({
2374
+ color: iconColor
2375
+ }, props));
2376
+ };
2377
+
2378
+ /**
2379
+ * Hook for debouncing values with extended functionality
2380
+ * React Native compatible version
2381
+ *
2382
+ * @param value - Value to debounce
2383
+ * @param options - Configuration options
2384
+ * @returns Object with debounced value and control methods
2385
+ */
2386
+ const useDebounce = (value, options) => {
2387
+ // Backward compatibility support - if number is passed, it's delay
2388
+ const config = typeof options === 'number' ? {
2389
+ delay: options
2390
+ } : options;
2391
+ const {
2392
+ delay,
2393
+ callback,
2394
+ immediate = false
2395
+ } = config;
2396
+ const [debouncedValue, setDebouncedValue] = useState(value);
2397
+ const [isPending, setIsPending] = useState(false);
2398
+ const timeoutRef = useRef(null);
2399
+ const isFirstRun = useRef(true);
2400
+ const cancel = useCallback(() => {
2401
+ if (timeoutRef.current) {
2402
+ clearTimeout(timeoutRef.current);
2403
+ timeoutRef.current = null;
2404
+ setIsPending(false);
2405
+ }
2406
+ }, []);
2407
+ const flush = useCallback(() => {
2408
+ cancel();
2409
+ setDebouncedValue(value);
2410
+ callback === null || callback === void 0 ? void 0 : callback(value);
2411
+ setIsPending(false);
2412
+ }, [value, callback, cancel]);
2413
+ useEffect(() => {
2414
+ // If immediate === true and this is first run, set value immediately
2415
+ if (immediate && isFirstRun.current) {
2416
+ setDebouncedValue(value);
2417
+ callback === null || callback === void 0 ? void 0 : callback(value);
2418
+ isFirstRun.current = false;
2419
+ return;
2420
+ }
2421
+ isFirstRun.current = false;
2422
+ setIsPending(true);
2423
+ const handler = setTimeout(() => {
2424
+ setDebouncedValue(value);
2425
+ callback === null || callback === void 0 ? void 0 : callback(value);
2426
+ setIsPending(false);
2427
+ timeoutRef.current = null;
2428
+ }, delay);
2429
+ timeoutRef.current = handler;
2430
+ return () => {
2431
+ clearTimeout(handler);
2432
+ setIsPending(false);
2433
+ };
2434
+ }, [value, delay, callback, immediate]);
2435
+ // Cleanup on unmount
2436
+ useEffect(() => {
2437
+ return () => {
2438
+ if (timeoutRef.current) {
2439
+ clearTimeout(timeoutRef.current);
2440
+ }
2441
+ };
2442
+ }, []);
2443
+ return {
2444
+ debouncedValue,
2445
+ flush,
2446
+ cancel,
2447
+ isPending
2448
+ };
2449
+ };
2450
+
2451
+ /**
2452
+ * Design tokens for React Native
2453
+ *
2454
+ * These tokens are derived from the web theme (src/styles/theme.pcss)
2455
+ * and optimized for React Native StyleSheet usage.
2456
+ *
2457
+ * @example
2458
+ * ```typescript
2459
+ * import { colors, spacing, typography, borderRadius, shadows } from 'dash-ui-kit/react-native';
2460
+ * import { StyleSheet, Platform } from 'react-native';
2461
+ *
2462
+ * const styles = StyleSheet.create({
2463
+ * container: {
2464
+ * backgroundColor: colors.brand,
2465
+ * padding: spacing[4],
2466
+ * borderRadius: borderRadius.md,
2467
+ * ...Platform.select({
2468
+ * ios: shadows.md.ios,
2469
+ * android: shadows.md.android,
2470
+ * }),
2471
+ * },
2472
+ * title: {
2473
+ * fontSize: typography.fontSize.xl,
2474
+ * fontWeight: typography.fontWeight.semibold,
2475
+ * lineHeight: typography.lineHeight.xl,
2476
+ * },
2477
+ * });
2478
+ * ```
2479
+ */
2480
+ /**
2481
+ * Color palette
2482
+ * Derived from theme.pcss color variables
2483
+ */
2484
+ const colors = {
2485
+ // Brand colors
2486
+ brand: '#4C7EFF',
2487
+ brandDim: '#96A7FF',
2488
+ brandDark: '#4D5895',
2489
+ brandDarkness: '#13172A',
2490
+ // Accent colors
2491
+ mint: '#60F6D2',
2492
+ mintHover: '#4DD4B1',
2493
+ // Yellow variants
2494
+ yellowLight: '#fef3c7',
2495
+ yellow: '#fde68a',
2496
+ // Primary colors
2497
+ primaryDarkBlue: '#0C1C33',
2498
+ primaryDieSubdued: 'rgba(12, 28, 51, 0.03)',
2499
+ // State colors - Green
2500
+ green: '#40BF40',
2501
+ green75: 'rgba(64, 191, 64, 0.75)',
2502
+ green15: 'rgba(64, 191, 64, 0.15)',
2503
+ green5: 'rgba(64, 191, 64, 0.05)',
2504
+ // State colors - Red
2505
+ red: '#CD2E00',
2506
+ red75: 'rgba(205, 46, 0, 0.75)',
2507
+ red15: 'rgba(205, 46, 0, 0.15)',
2508
+ red5: 'rgba(205, 46, 0, 0.05)',
2509
+ // State colors - Orange
2510
+ orange: '#F98F12',
2511
+ orange75: 'rgba(249, 143, 18, 0.75)',
2512
+ orange15: 'rgba(249, 143, 18, 0.15)',
2513
+ orange5: 'rgba(249, 143, 18, 0.05)',
2514
+ // Common colors
2515
+ white: '#FFFFFF',
2516
+ black: '#000000',
2517
+ transparent: 'transparent'
2518
+ };
2519
+ /**
2520
+ * Spacing scale
2521
+ * Based on 4px base unit (Tailwind-compatible)
2522
+ */
2523
+ const spacing = {
2524
+ 0: 0,
2525
+ 1: 4,
2526
+ 2: 8,
2527
+ 3: 12,
2528
+ 4: 16,
2529
+ 5: 20,
2530
+ 6: 24,
2531
+ 7: 28,
2532
+ 8: 32,
2533
+ 9: 36,
2534
+ 10: 40,
2535
+ 11: 44,
2536
+ // 2.75rem from theme
2537
+ 12: 48,
2538
+ 14: 56,
2539
+ 16: 64,
2540
+ 18: 72,
2541
+ 20: 80,
2542
+ 24: 96,
2543
+ 28: 112,
2544
+ 32: 128,
2545
+ 36: 144,
2546
+ 40: 160,
2547
+ 44: 176,
2548
+ 48: 192,
2549
+ 52: 208,
2550
+ 56: 224,
2551
+ 60: 240,
2552
+ 64: 256
2553
+ };
2554
+ /**
2555
+ * Typography scale
2556
+ * Font sizes, weights, and line heights
2557
+ */
2558
+ const typography = {
2559
+ /**
2560
+ * Font size scale
2561
+ */
2562
+ fontSize: {
2563
+ xs: 12,
2564
+ sm: 14,
2565
+ base: 16,
2566
+ lg: 18,
2567
+ xl: 20,
2568
+ '2xl': 24,
2569
+ '3xl': 30,
2570
+ '4xl': 36,
2571
+ '5xl': 48,
2572
+ '6xl': 60,
2573
+ '7xl': 72,
2574
+ '8xl': 96,
2575
+ '9xl': 128
2576
+ },
2577
+ /**
2578
+ * Font weight scale
2579
+ * Values are strings for React Native compatibility
2580
+ */
2581
+ fontWeight: {
2582
+ normal: '400',
2583
+ medium: '500',
2584
+ semibold: '600',
2585
+ bold: '700',
2586
+ extrabold: '800'
2587
+ },
2588
+ /**
2589
+ * Line height scale (in pixels)
2590
+ * Calculated based on common typography ratios
2591
+ */
2592
+ lineHeight: {
2593
+ xs: 16,
2594
+ // 1.33x
2595
+ sm: 20,
2596
+ // 1.43x
2597
+ base: 24,
2598
+ // 1.5x
2599
+ lg: 28,
2600
+ // 1.56x
2601
+ xl: 28,
2602
+ // 1.4x
2603
+ '2xl': 32,
2604
+ // 1.33x
2605
+ '3xl': 36,
2606
+ // 1.2x
2607
+ '4xl': 40,
2608
+ // 1.11x
2609
+ '5xl': 56,
2610
+ // 1.17x
2611
+ '6xl': 72,
2612
+ // 1.2x
2613
+ '7xl': 84,
2614
+ // 1.17x
2615
+ '8xl': 112,
2616
+ // 1.17x
2617
+ '9xl': 144 // 1.13x
2618
+ },
2619
+ /**
2620
+ * Letter spacing (tracking)
2621
+ */
2622
+ letterSpacing: {
2623
+ tighter: -0.8,
2624
+ tight: -0.4,
2625
+ normal: 0,
2626
+ wide: 0.4,
2627
+ wider: 0.8,
2628
+ widest: 1.6
2629
+ }
2630
+ };
2631
+ /**
2632
+ * Border radius scale
2633
+ */
2634
+ const borderRadius = {
2635
+ none: 0,
2636
+ xs: 4,
2637
+ sm: 10,
2638
+ md: 12,
2639
+ lg: 14,
2640
+ xl: 16,
2641
+ '2xl': 20,
2642
+ '3xl': 24,
2643
+ full: 9999
2644
+ };
2645
+ /**
2646
+ * Shadow presets
2647
+ * Platform-specific implementations for iOS and Android
2648
+ *
2649
+ * @example
2650
+ * ```typescript
2651
+ * import { Platform } from 'react-native';
2652
+ *
2653
+ * const shadowStyle = Platform.select({
2654
+ * ios: shadows.md.ios,
2655
+ * android: shadows.md.android,
2656
+ * });
2657
+ * ```
2658
+ */
2659
+ const shadows = {
2660
+ /**
2661
+ * Small shadow - subtle elevation
2662
+ */
2663
+ sm: {
2664
+ ios: {
2665
+ shadowColor: '#000000',
2666
+ shadowOffset: {
2667
+ width: 0,
2668
+ height: 1
2669
+ },
2670
+ shadowOpacity: 0.1,
2671
+ shadowRadius: 2
2672
+ },
2673
+ android: {
2674
+ elevation: 2
2675
+ }
2676
+ },
2677
+ /**
2678
+ * Medium shadow - standard elevation
2679
+ */
2680
+ md: {
2681
+ ios: {
2682
+ shadowColor: '#000000',
2683
+ shadowOffset: {
2684
+ width: 0,
2685
+ height: 2
2686
+ },
2687
+ shadowOpacity: 0.15,
2688
+ shadowRadius: 4
2689
+ },
2690
+ android: {
2691
+ elevation: 4
2692
+ }
2693
+ },
2694
+ /**
2695
+ * Large shadow - prominent elevation
2696
+ */
2697
+ lg: {
2698
+ ios: {
2699
+ shadowColor: '#000000',
2700
+ shadowOffset: {
2701
+ width: 0,
2702
+ height: 4
2703
+ },
2704
+ shadowOpacity: 0.2,
2705
+ shadowRadius: 8
2706
+ },
2707
+ android: {
2708
+ elevation: 8
2709
+ }
2710
+ },
2711
+ /**
2712
+ * Extra large shadow - maximum elevation
2713
+ */
2714
+ xl: {
2715
+ ios: {
2716
+ shadowColor: '#000000',
2717
+ shadowOffset: {
2718
+ width: 0,
2719
+ height: 8
2720
+ },
2721
+ shadowOpacity: 0.25,
2722
+ shadowRadius: 16
2723
+ },
2724
+ android: {
2725
+ elevation: 12
2726
+ }
2727
+ }
2728
+ };
2729
+ /**
2730
+ * Border width scale
2731
+ */
2732
+ const borderWidth = {
2733
+ 0: 0,
2734
+ 1: 1,
2735
+ 2: 2,
2736
+ 4: 4,
2737
+ 8: 8
2738
+ };
2739
+ /**
2740
+ * Opacity scale
2741
+ */
2742
+ const opacity = {
2743
+ 0: 0,
2744
+ 5: 0.05,
2745
+ 10: 0.1,
2746
+ 15: 0.15,
2747
+ 20: 0.2,
2748
+ 25: 0.25,
2749
+ 30: 0.3,
2750
+ 40: 0.4,
2751
+ 50: 0.5,
2752
+ 60: 0.6,
2753
+ 70: 0.7,
2754
+ 75: 0.75,
2755
+ 80: 0.8,
2756
+ 90: 0.9,
2757
+ 95: 0.95,
2758
+ 100: 1
2759
+ };
2760
+ /**
2761
+ * Z-index scale
2762
+ */
2763
+ const zIndex = {
2764
+ 0: 0,
2765
+ 10: 10,
2766
+ 20: 20,
2767
+ 30: 30,
2768
+ 40: 40,
2769
+ 50: 50,
2770
+ auto: 'auto'
2771
+ };
2772
+
2773
+ /**
2774
+ * Utility functions for React Native styles
2775
+ */
2776
+ /**
2777
+ * Creates an rgba color string from hex color and opacity
2778
+ *
2779
+ * @param hexColor - Hex color string (e.g., '#4C7EFF')
2780
+ * @param alpha - Opacity value between 0 and 1
2781
+ * @returns rgba color string
2782
+ *
2783
+ * @example
2784
+ * ```typescript
2785
+ * rgba('#4C7EFF', 0.5) // 'rgba(76, 126, 255, 0.5)'
2786
+ * rgba('#40BF40', 0.15) // 'rgba(64, 191, 64, 0.15)'
2787
+ * ```
2788
+ */
2789
+ function rgba(hexColor, alpha) {
2790
+ const hex = hexColor.replace('#', '');
2791
+ const r = parseInt(hex.substring(0, 2), 16);
2792
+ const g = parseInt(hex.substring(2, 4), 16);
2793
+ const b = parseInt(hex.substring(4, 6), 16);
2794
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
2795
+ }
2796
+ /**
2797
+ * Converts hex color to rgba
2798
+ * Alias for rgba() with more explicit naming
2799
+ *
2800
+ * @param hexColor - Hex color string
2801
+ * @param alpha - Opacity value between 0 and 1
2802
+ * @returns rgba color string
2803
+ */
2804
+ function hexToRgba(hexColor, alpha) {
2805
+ return rgba(hexColor, alpha);
2806
+ }
2807
+ /**
2808
+ * Gets platform-specific shadow styles
2809
+ *
2810
+ * @param size - Shadow size: 'sm' | 'md' | 'lg' | 'xl'
2811
+ * @returns Platform-specific shadow styles
2812
+ *
2813
+ * @example
2814
+ * ```typescript
2815
+ * const styles = StyleSheet.create({
2816
+ * card: {
2817
+ * ...getShadow('md'),
2818
+ * },
2819
+ * });
2820
+ * ```
2821
+ */
2822
+ function getShadow(size) {
2823
+ if (Platform.OS === 'ios') {
2824
+ return shadows[size].ios;
2825
+ } else if (Platform.OS === 'android') {
2826
+ return shadows[size].android;
2827
+ }
2828
+ // Default to iOS shadow style for other platforms
2829
+ return shadows[size].ios;
2830
+ }
2831
+
2832
+ export { ArrowIcon, AsteriskIcon, Avatar, Badge, BigNumber, BroadcastedIcon, Button, CheckIcon, ChevronIcon, Clipboard, CopyButton, CopyIcon, CrossIcon, DashLogo, ErrorIcon, EyeClosedIcon, EyeOpenIcon, Heading, Icons, Identifier, InfoCircleIcon, Input, NotActive, PlusIcon, PooledIcon, QueuedIcon, SearchIcon, SuccessIcon, Tabs, Text, TopRightArrowIcon, TransactionStatusIcon, ValueCard, borderRadius, borderWidth, cn, colors, getShadow, hexToRgba, opacity, resolveColorScheme, rgba, shadows, spacing, tw, typography, useDebounce, zIndex };
2833
+ //# sourceMappingURL=index.esm.js.map