@retray-dev/ui-kit 6.1.0 → 7.0.1

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 (321) hide show
  1. package/COMPONENTS.md +447 -13
  2. package/EXAMPLES.md +248 -0
  3. package/README.md +11 -10
  4. package/dist/Accordion.d.mts +28 -0
  5. package/dist/Accordion.d.ts +28 -0
  6. package/dist/Accordion.js +340 -0
  7. package/dist/Accordion.mjs +6 -0
  8. package/dist/AlertBanner.d.mts +16 -0
  9. package/dist/AlertBanner.d.ts +16 -0
  10. package/dist/AlertBanner.js +247 -0
  11. package/dist/AlertBanner.mjs +5 -0
  12. package/dist/Avatar.d.mts +20 -0
  13. package/dist/Avatar.d.ts +20 -0
  14. package/dist/Avatar.js +234 -0
  15. package/dist/Avatar.mjs +3 -0
  16. package/dist/Badge.d.mts +26 -0
  17. package/dist/Badge.d.ts +26 -0
  18. package/dist/Badge.js +247 -0
  19. package/dist/Badge.mjs +4 -0
  20. package/dist/Button.d.mts +25 -0
  21. package/dist/Button.d.ts +25 -0
  22. package/dist/Button.js +414 -0
  23. package/dist/Button.mjs +8 -0
  24. package/dist/ButtonGroup.d.mts +26 -0
  25. package/dist/ButtonGroup.d.ts +26 -0
  26. package/dist/ButtonGroup.js +52 -0
  27. package/dist/ButtonGroup.mjs +2 -0
  28. package/dist/Card.d.mts +39 -0
  29. package/dist/Card.d.ts +39 -0
  30. package/dist/Card.js +329 -0
  31. package/dist/Card.mjs +7 -0
  32. package/dist/CategoryStrip.d.mts +26 -0
  33. package/dist/CategoryStrip.d.ts +26 -0
  34. package/dist/CategoryStrip.js +396 -0
  35. package/dist/CategoryStrip.mjs +9 -0
  36. package/dist/Checkbox.d.mts +14 -0
  37. package/dist/Checkbox.d.ts +14 -0
  38. package/dist/Checkbox.js +304 -0
  39. package/dist/Checkbox.mjs +7 -0
  40. package/dist/Chip.d.mts +31 -0
  41. package/dist/Chip.d.ts +31 -0
  42. package/dist/Chip.js +370 -0
  43. package/dist/Chip.mjs +8 -0
  44. package/dist/ConfirmDialog.d.mts +15 -0
  45. package/dist/ConfirmDialog.d.ts +15 -0
  46. package/dist/ConfirmDialog.js +530 -0
  47. package/dist/ConfirmDialog.mjs +9 -0
  48. package/dist/CurrencyDisplay.d.mts +24 -0
  49. package/dist/CurrencyDisplay.d.ts +24 -0
  50. package/dist/CurrencyDisplay.js +189 -0
  51. package/dist/CurrencyDisplay.mjs +3 -0
  52. package/dist/CurrencyInput.d.mts +26 -0
  53. package/dist/CurrencyInput.d.ts +26 -0
  54. package/dist/CurrencyInput.js +404 -0
  55. package/dist/CurrencyInput.mjs +7 -0
  56. package/dist/DetailRow.d.mts +32 -0
  57. package/dist/DetailRow.d.ts +32 -0
  58. package/dist/DetailRow.js +275 -0
  59. package/dist/DetailRow.mjs +4 -0
  60. package/dist/EmptyState.d.mts +27 -0
  61. package/dist/EmptyState.d.ts +27 -0
  62. package/dist/EmptyState.js +503 -0
  63. package/dist/EmptyState.mjs +9 -0
  64. package/dist/Form.d.mts +52 -0
  65. package/dist/Form.d.ts +52 -0
  66. package/dist/Form.js +204 -0
  67. package/dist/Form.mjs +3 -0
  68. package/dist/IconButton.d.mts +22 -0
  69. package/dist/IconButton.d.ts +22 -0
  70. package/dist/IconButton.js +383 -0
  71. package/dist/IconButton.mjs +7 -0
  72. package/dist/Input.d.mts +23 -0
  73. package/dist/Input.d.ts +23 -0
  74. package/dist/Input.js +351 -0
  75. package/dist/Input.mjs +6 -0
  76. package/dist/LabelValue.d.mts +16 -0
  77. package/dist/LabelValue.d.ts +16 -0
  78. package/dist/LabelValue.js +225 -0
  79. package/dist/LabelValue.mjs +4 -0
  80. package/dist/ListGroup.d.mts +34 -0
  81. package/dist/ListGroup.d.ts +34 -0
  82. package/dist/ListGroup.js +217 -0
  83. package/dist/ListGroup.mjs +4 -0
  84. package/dist/ListItem.d.mts +64 -0
  85. package/dist/ListItem.d.ts +64 -0
  86. package/dist/ListItem.js +430 -0
  87. package/dist/ListItem.mjs +8 -0
  88. package/dist/MediaCard.d.mts +39 -0
  89. package/dist/MediaCard.d.ts +39 -0
  90. package/dist/MediaCard.js +427 -0
  91. package/dist/MediaCard.mjs +8 -0
  92. package/dist/MenuGroup.d.mts +34 -0
  93. package/dist/MenuGroup.d.ts +34 -0
  94. package/dist/MenuGroup.js +217 -0
  95. package/dist/MenuGroup.mjs +4 -0
  96. package/dist/MenuItem.d.mts +48 -0
  97. package/dist/MenuItem.d.ts +48 -0
  98. package/dist/MenuItem.js +403 -0
  99. package/dist/MenuItem.mjs +8 -0
  100. package/dist/MonthPicker.d.mts +20 -0
  101. package/dist/MonthPicker.d.ts +20 -0
  102. package/dist/MonthPicker.js +234 -0
  103. package/dist/MonthPicker.mjs +4 -0
  104. package/dist/Pressable.d.mts +34 -0
  105. package/dist/Pressable.d.ts +34 -0
  106. package/dist/Pressable.js +132 -0
  107. package/dist/Pressable.mjs +4 -0
  108. package/dist/Progress.d.mts +14 -0
  109. package/dist/Progress.d.ts +14 -0
  110. package/dist/Progress.js +191 -0
  111. package/dist/Progress.mjs +4 -0
  112. package/dist/RadioGroup.d.mts +19 -0
  113. package/dist/RadioGroup.d.ts +19 -0
  114. package/dist/RadioGroup.js +341 -0
  115. package/dist/RadioGroup.mjs +7 -0
  116. package/dist/Select.d.mts +22 -0
  117. package/dist/Select.d.ts +22 -0
  118. package/dist/Select.js +441 -0
  119. package/dist/Select.mjs +6 -0
  120. package/dist/Separator.d.mts +10 -0
  121. package/dist/Separator.d.ts +10 -0
  122. package/dist/Separator.js +156 -0
  123. package/dist/Separator.mjs +2 -0
  124. package/dist/Sheet.d.mts +81 -0
  125. package/dist/Sheet.d.ts +81 -0
  126. package/dist/Sheet.js +340 -0
  127. package/dist/Sheet.mjs +4 -0
  128. package/dist/Skeleton.d.mts +17 -0
  129. package/dist/Skeleton.d.ts +17 -0
  130. package/dist/Skeleton.js +205 -0
  131. package/dist/Skeleton.mjs +4 -0
  132. package/dist/Slider.d.mts +20 -0
  133. package/dist/Slider.d.ts +20 -0
  134. package/dist/Slider.js +232 -0
  135. package/dist/Slider.mjs +4 -0
  136. package/dist/Spinner.d.mts +12 -0
  137. package/dist/Spinner.d.ts +12 -0
  138. package/dist/Spinner.js +172 -0
  139. package/dist/Spinner.mjs +3 -0
  140. package/dist/Switch.d.mts +13 -0
  141. package/dist/Switch.d.ts +13 -0
  142. package/dist/Switch.js +261 -0
  143. package/dist/Switch.mjs +5 -0
  144. package/dist/Tabs.d.mts +27 -0
  145. package/dist/Tabs.d.ts +27 -0
  146. package/dist/Tabs.js +389 -0
  147. package/dist/Tabs.mjs +6 -0
  148. package/dist/Text.d.mts +12 -0
  149. package/dist/Text.d.ts +12 -0
  150. package/dist/Text.js +311 -0
  151. package/dist/Text.mjs +4 -0
  152. package/dist/Textarea.d.mts +16 -0
  153. package/dist/Textarea.d.ts +16 -0
  154. package/dist/Textarea.js +333 -0
  155. package/dist/Textarea.mjs +6 -0
  156. package/dist/Toast.d.mts +47 -0
  157. package/dist/Toast.d.ts +47 -0
  158. package/dist/Toast.js +185 -0
  159. package/dist/Toast.mjs +3 -0
  160. package/dist/Toggle.d.mts +33 -0
  161. package/dist/Toggle.d.ts +33 -0
  162. package/dist/Toggle.js +397 -0
  163. package/dist/Toggle.mjs +8 -0
  164. package/dist/VirtualList.d.mts +19 -0
  165. package/dist/VirtualList.d.ts +19 -0
  166. package/dist/VirtualList.js +38 -0
  167. package/dist/VirtualList.mjs +1 -0
  168. package/dist/chunk-2CE3TQVY.mjs +11 -0
  169. package/dist/chunk-2UYENBLV.mjs +49 -0
  170. package/dist/chunk-3BBOZ3OQ.mjs +41 -0
  171. package/dist/chunk-5IKW3VNC.mjs +43 -0
  172. package/dist/chunk-63357L2X.mjs +51 -0
  173. package/dist/chunk-6LQYY7HC.mjs +127 -0
  174. package/dist/chunk-6Q64UFIA.mjs +71 -0
  175. package/dist/chunk-76PFOSM2.mjs +41 -0
  176. package/dist/chunk-7H2OR44A.mjs +14 -0
  177. package/dist/chunk-A4MDAP7G.mjs +42 -0
  178. package/dist/chunk-AU2VDY4P.mjs +190 -0
  179. package/dist/chunk-BRKYVJVV.mjs +60 -0
  180. package/dist/chunk-CRYBX2CM.mjs +146 -0
  181. package/dist/chunk-DITNP6PL.mjs +106 -0
  182. package/dist/chunk-FTLJOUOQ.mjs +97 -0
  183. package/dist/chunk-GCWOGZYL.mjs +104 -0
  184. package/dist/chunk-GNGLDL6Z.mjs +60 -0
  185. package/dist/chunk-GPOUINK5.mjs +148 -0
  186. package/dist/chunk-HSPSMN6U.mjs +115 -0
  187. package/dist/chunk-IRRY3CRZ.mjs +82 -0
  188. package/dist/chunk-JB67UOB5.mjs +92 -0
  189. package/dist/chunk-JBLL7U3U.mjs +64 -0
  190. package/dist/chunk-KWCPOM6W.mjs +136 -0
  191. package/dist/chunk-KZJRQOIU.mjs +64 -0
  192. package/dist/chunk-L7E7TVEZ.mjs +145 -0
  193. package/dist/chunk-LG4DO3DK.mjs +174 -0
  194. package/dist/chunk-LWG526VX.mjs +139 -0
  195. package/dist/chunk-MN7OG7IY.mjs +96 -0
  196. package/dist/chunk-MX6HRKMI.mjs +29 -0
  197. package/dist/chunk-NC5ZTR2Y.mjs +32 -0
  198. package/dist/chunk-NQGVLMWG.mjs +90 -0
  199. package/dist/chunk-QCNARS3X.mjs +46 -0
  200. package/dist/chunk-QXGYKWI7.mjs +134 -0
  201. package/dist/chunk-QY3X2UYR.mjs +191 -0
  202. package/dist/chunk-RKLHUDZS.mjs +92 -0
  203. package/dist/chunk-RMMK64W5.mjs +54 -0
  204. package/dist/chunk-RR2VQLKE.mjs +190 -0
  205. package/dist/chunk-RTC3CFXF.mjs +29 -0
  206. package/dist/chunk-SBZYEV4S.mjs +61 -0
  207. package/dist/chunk-SOA2Z4RB.mjs +82 -0
  208. package/dist/chunk-SOYNZDVY.mjs +151 -0
  209. package/dist/chunk-T7XZ7H7Y.mjs +57 -0
  210. package/dist/chunk-TAJ2PQ2O.mjs +163 -0
  211. package/dist/chunk-U4N7WF4Z.mjs +108 -0
  212. package/dist/chunk-URDE3EUU.mjs +132 -0
  213. package/dist/chunk-URLL5JBR.mjs +245 -0
  214. package/dist/chunk-XDMN67KV.mjs +59 -0
  215. package/dist/chunk-Y6MXOREN.mjs +120 -0
  216. package/dist/chunk-YZJAFS4P.mjs +131 -0
  217. package/dist/index.d.mts +94 -852
  218. package/dist/index.d.ts +94 -852
  219. package/dist/index.js +1387 -942
  220. package/dist/index.mjs +50 -3844
  221. package/package.json +23 -14
  222. package/src/assets/fonts/Sohne-Bold.otf +0 -0
  223. package/src/assets/fonts/Sohne-BoldItalic.otf +0 -0
  224. package/src/assets/fonts/Sohne-ExtraBold.otf +0 -0
  225. package/src/assets/fonts/Sohne-ExtraBoldItalic.otf +0 -0
  226. package/src/assets/fonts/Sohne-ExtraLight.otf +0 -0
  227. package/src/assets/fonts/Sohne-ExtraLightItalic.otf +0 -0
  228. package/src/assets/fonts/Sohne-Italic.otf +0 -0
  229. package/src/assets/fonts/Sohne-Light.otf +0 -0
  230. package/src/assets/fonts/Sohne-LightItalic.otf +0 -0
  231. package/src/assets/fonts/Sohne-Medium.otf +0 -0
  232. package/src/assets/fonts/Sohne-MediumItalic.otf +0 -0
  233. package/src/assets/fonts/Sohne-Regular.otf +0 -0
  234. package/src/assets/fonts/Sohne-SemiBold.otf +0 -0
  235. package/src/assets/fonts/Sohne-SemiBoldItalic.otf +0 -0
  236. package/src/assets/fonts/SohneMono-Bold.otf +0 -0
  237. package/src/assets/fonts/SohneMono-BoldItalic.otf +0 -0
  238. package/src/assets/fonts/SohneMono-ExtraBold.otf +0 -0
  239. package/src/assets/fonts/SohneMono-ExtraBoldItalic.otf +0 -0
  240. package/src/assets/fonts/SohneMono-ExtraLight.otf +0 -0
  241. package/src/assets/fonts/SohneMono-ExtraLightItalic.otf +0 -0
  242. package/src/assets/fonts/SohneMono-Italic.otf +0 -0
  243. package/src/assets/fonts/SohneMono-Light.otf +0 -0
  244. package/src/assets/fonts/SohneMono-LightItalic.otf +0 -0
  245. package/src/assets/fonts/SohneMono-Medium.otf +0 -0
  246. package/src/assets/fonts/SohneMono-MediumItalic.otf +0 -0
  247. package/src/assets/fonts/SohneMono-Regular.otf +0 -0
  248. package/src/assets/fonts/SohneMono-SemiBold.otf +0 -0
  249. package/src/assets/fonts/SohneMono-SemiBoldItalic.otf +0 -0
  250. package/src/components/Accordion/Accordion.tsx +13 -15
  251. package/src/components/AlertBanner/AlertBanner.tsx +33 -12
  252. package/src/components/Avatar/Avatar.tsx +4 -2
  253. package/src/components/Badge/Badge.tsx +4 -2
  254. package/src/components/Button/Button.tsx +30 -29
  255. package/src/components/ButtonGroup/ButtonGroup.tsx +13 -10
  256. package/src/components/Card/Card.tsx +36 -65
  257. package/src/components/CategoryStrip/CategoryStrip.tsx +68 -58
  258. package/src/components/Checkbox/Checkbox.tsx +41 -55
  259. package/src/components/Chip/Chip.tsx +49 -84
  260. package/src/components/ConfirmDialog/ConfirmDialog.tsx +2 -2
  261. package/src/components/CurrencyDisplay/CurrencyDisplay.tsx +4 -2
  262. package/src/components/CurrencyInput/CurrencyInput.tsx +2 -2
  263. package/src/components/DetailRow/DetailRow.tsx +9 -7
  264. package/src/components/EmptyState/EmptyState.tsx +2 -2
  265. package/src/components/Form/Form.tsx +149 -0
  266. package/src/components/Form/index.ts +1 -0
  267. package/src/components/IconButton/IconButton.tsx +24 -20
  268. package/src/components/Input/Input.tsx +63 -50
  269. package/src/components/LabelValue/LabelValue.tsx +6 -4
  270. package/src/components/ListGroup/ListGroup.tsx +145 -0
  271. package/src/components/ListGroup/index.ts +1 -0
  272. package/src/components/ListItem/ListItem.tsx +30 -43
  273. package/src/components/MediaCard/MediaCard.tsx +31 -29
  274. package/src/components/MenuGroup/MenuGroup.tsx +145 -0
  275. package/src/components/MenuGroup/index.ts +1 -0
  276. package/src/components/MenuItem/MenuItem.tsx +29 -40
  277. package/src/components/MonthPicker/MonthPicker.tsx +14 -4
  278. package/src/components/Pressable/Pressable.tsx +27 -46
  279. package/src/components/Progress/Progress.tsx +21 -12
  280. package/src/components/RadioGroup/RadioGroup.tsx +55 -32
  281. package/src/components/Select/Select.tsx +23 -21
  282. package/src/components/Separator/Separator.tsx +1 -3
  283. package/src/components/Sheet/Sheet.tsx +85 -18
  284. package/src/components/Skeleton/Skeleton.tsx +25 -14
  285. package/src/components/Slider/Slider.tsx +13 -3
  286. package/src/components/Spinner/Spinner.tsx +1 -1
  287. package/src/components/Switch/Switch.tsx +70 -52
  288. package/src/components/Tabs/Tabs.tsx +59 -47
  289. package/src/components/Text/Text.tsx +3 -1
  290. package/src/components/Textarea/Textarea.tsx +44 -23
  291. package/src/components/Toast/Toast.tsx +6 -6
  292. package/src/components/Toggle/Toggle.tsx +86 -68
  293. package/src/components/VirtualList/VirtualList.tsx +60 -0
  294. package/src/components/VirtualList/index.ts +1 -0
  295. package/src/fonts.ts +38 -20
  296. package/src/index.ts +5 -1
  297. package/src/theme/colors.ts +53 -39
  298. package/src/theme/types.ts +3 -0
  299. package/src/tokens.ts +49 -39
  300. package/src/utils/animations.ts +58 -0
  301. package/src/utils/icons.ts +47 -20
  302. package/src/utils/useColorTransition.ts +40 -0
  303. package/src/utils/usePressScale.ts +75 -0
  304. package/src/assets/fonts/Poppins-Black.ttf +0 -0
  305. package/src/assets/fonts/Poppins-BlackItalic.ttf +0 -0
  306. package/src/assets/fonts/Poppins-Bold.ttf +0 -0
  307. package/src/assets/fonts/Poppins-BoldItalic.ttf +0 -0
  308. package/src/assets/fonts/Poppins-ExtraBold.ttf +0 -0
  309. package/src/assets/fonts/Poppins-ExtraBoldItalic.ttf +0 -0
  310. package/src/assets/fonts/Poppins-ExtraLight.ttf +0 -0
  311. package/src/assets/fonts/Poppins-ExtraLightItalic.ttf +0 -0
  312. package/src/assets/fonts/Poppins-Italic.ttf +0 -0
  313. package/src/assets/fonts/Poppins-Light.ttf +0 -0
  314. package/src/assets/fonts/Poppins-LightItalic.ttf +0 -0
  315. package/src/assets/fonts/Poppins-Medium.ttf +0 -0
  316. package/src/assets/fonts/Poppins-MediumItalic.ttf +0 -0
  317. package/src/assets/fonts/Poppins-Regular.ttf +0 -0
  318. package/src/assets/fonts/Poppins-SemiBold.ttf +0 -0
  319. package/src/assets/fonts/Poppins-SemiBoldItalic.ttf +0 -0
  320. package/src/assets/fonts/Poppins-Thin.ttf +0 -0
  321. package/src/assets/fonts/Poppins-ThinItalic.ttf +0 -0
package/dist/Text.js ADDED
@@ -0,0 +1,311 @@
1
+ 'use strict';
2
+
3
+ var React2 = require('react');
4
+ var reactNative = require('react-native');
5
+ var reactNativeSizeMatters = require('react-native-size-matters');
6
+
7
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
+
9
+ var React2__default = /*#__PURE__*/_interopDefault(React2);
10
+
11
+ // src/components/Text/Text.tsx
12
+
13
+ // src/theme/colorUtils.ts
14
+ function hexToRgb(hex) {
15
+ const clean = hex.replace("#", "");
16
+ const full = clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean;
17
+ if (full.length !== 6) return null;
18
+ return {
19
+ r: parseInt(full.slice(0, 2), 16),
20
+ g: parseInt(full.slice(2, 4), 16),
21
+ b: parseInt(full.slice(4, 6), 16)
22
+ };
23
+ }
24
+ function componentToHex(c) {
25
+ return Math.round(Math.max(0, Math.min(255, c))).toString(16).padStart(2, "0");
26
+ }
27
+ function rgbToHex(r, g, b) {
28
+ return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
29
+ }
30
+ function withAlphaOnWhite(hex, alpha) {
31
+ const rgb = hexToRgb(hex);
32
+ if (!rgb) return hex;
33
+ const r = rgb.r * alpha + 255 * (1 - alpha);
34
+ const g = rgb.g * alpha + 255 * (1 - alpha);
35
+ const b = rgb.b * alpha + 255 * (1 - alpha);
36
+ return rgbToHex(r, g, b);
37
+ }
38
+ function withAlphaOnDark(hex, alpha, bgHex = "#0f0f0f") {
39
+ const rgb = hexToRgb(hex);
40
+ const bg = hexToRgb(bgHex);
41
+ if (!rgb || !bg) return hex;
42
+ const r = rgb.r * alpha + bg.r * (1 - alpha);
43
+ const g = rgb.g * alpha + bg.g * (1 - alpha);
44
+ const b = rgb.b * alpha + bg.b * (1 - alpha);
45
+ return rgbToHex(r, g, b);
46
+ }
47
+ function mixWithBackground(fgHex, bgHex, opacity) {
48
+ const fg = hexToRgb(fgHex);
49
+ const bg = hexToRgb(bgHex);
50
+ if (!fg || !bg) return fgHex;
51
+ const r = fg.r * opacity + bg.r * (1 - opacity);
52
+ const g = fg.g * opacity + bg.g * (1 - opacity);
53
+ const b = fg.b * opacity + bg.b * (1 - opacity);
54
+ return rgbToHex(r, g, b);
55
+ }
56
+ function lighten(hex, amount) {
57
+ return withAlphaOnWhite(hex, 1 - amount);
58
+ }
59
+ function darken(hex, amount) {
60
+ const rgb = hexToRgb(hex);
61
+ if (!rgb) return hex;
62
+ return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
63
+ }
64
+
65
+ // src/theme/colors.ts
66
+ var defaultLight = {
67
+ background: "#ffffff",
68
+ foreground: "#1a1a1a",
69
+ card: "#ffffff",
70
+ primary: "#1a1a1a",
71
+ primaryForeground: "#ffffff",
72
+ // AUDIT FIX: brand accent — was undefined; falls back to primary when omitted
73
+ accent: "#d4561d",
74
+ accentForeground: "#ffffff",
75
+ border: "#dddddd",
76
+ // AUDIT FIX: was #e53935 (4.22:1 on white — fails AA); #c72828 = 5.59:1 ✓
77
+ destructive: "#c72828",
78
+ destructiveForeground: "#ffffff",
79
+ success: "#1a7a45",
80
+ successForeground: "#ffffff",
81
+ // AUDIT FIX: was #e67e00 (2.86:1 — severe fail); #9a5200 = 5.86:1 ✓ AAA-near
82
+ warning: "#9a5200",
83
+ warningForeground: "#ffffff"
84
+ };
85
+ function deriveColors(t, scheme) {
86
+ const dark = scheme === "dark";
87
+ const bg = t.background;
88
+ const foregroundSubtle = mixWithBackground(t.foreground, bg, 0.7);
89
+ const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
90
+ const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
91
+ const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
92
+ const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
93
+ const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
94
+ const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
95
+ const successBorder = dark ? withAlphaOnDark(t.success, 0.45, bg) : withAlphaOnWhite(t.success, 0.3);
96
+ const warningTint = dark ? withAlphaOnDark(t.warning, 0.15, bg) : withAlphaOnWhite(t.warning, 0.08);
97
+ const warningBorder = dark ? withAlphaOnDark(t.warning, 0.45, bg) : withAlphaOnWhite(t.warning, 0.3);
98
+ return {
99
+ ...t,
100
+ foregroundSubtle,
101
+ foregroundMuted,
102
+ surface,
103
+ surfaceStrong,
104
+ destructiveTint,
105
+ destructiveBorder,
106
+ successTint,
107
+ successBorder,
108
+ warningTint,
109
+ warningBorder,
110
+ overlay: t.overlay ?? "rgba(0,0,0,0.45)",
111
+ accentResolved: t.accent ?? t.primary,
112
+ accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
113
+ ring: t.accent ?? t.primary,
114
+ input: t.border,
115
+ separator: dark ? lighten(t.border, 0.22) : darken(t.border, 0.16)
116
+ };
117
+ }
118
+
119
+ // src/theme/ThemeProvider.tsx
120
+ var ThemeContext = React2.createContext({
121
+ colors: deriveColors(defaultLight, "light"),
122
+ colorScheme: "light"
123
+ });
124
+ function useTheme() {
125
+ const context = React2.useContext(ThemeContext);
126
+ if (!context) {
127
+ throw new Error("useTheme must be used within a ThemeProvider");
128
+ }
129
+ return context;
130
+ }
131
+
132
+ // src/tokens.ts
133
+ var TYPOGRAPHY = {
134
+ "display-hero": {
135
+ fontFamily: "Sohne-Bold",
136
+ fontSize: 64,
137
+ fontWeight: "700",
138
+ lineHeight: 70,
139
+ letterSpacing: -1
140
+ },
141
+ "display-xl": {
142
+ fontFamily: "Sohne-Bold",
143
+ fontSize: 28,
144
+ fontWeight: "700",
145
+ lineHeight: 40,
146
+ letterSpacing: 0
147
+ },
148
+ // AUDIT FIX: was 22px/500 — raised to 24px/600; removes weight inversion vs display-md
149
+ "display-lg": {
150
+ fontFamily: "Sohne-SemiBold",
151
+ fontSize: 24,
152
+ fontWeight: "600",
153
+ lineHeight: 32,
154
+ letterSpacing: -0.3
155
+ },
156
+ // AUDIT FIX: was 21px/700 — lowered to 20px/600; weight normalised, 4px gap preserved
157
+ "display-md": {
158
+ fontFamily: "Sohne-SemiBold",
159
+ fontSize: 20,
160
+ fontWeight: "600",
161
+ lineHeight: 28,
162
+ letterSpacing: 0
163
+ },
164
+ "display-sm": {
165
+ fontFamily: "Sohne-SemiBold",
166
+ fontSize: 18,
167
+ fontWeight: "600",
168
+ lineHeight: 24,
169
+ letterSpacing: -0.18
170
+ },
171
+ // AUDIT FIX: was 16px — raised to 17px so title-md > title-sm is size-visible
172
+ "title-md": {
173
+ fontFamily: "Sohne-SemiBold",
174
+ fontSize: 17,
175
+ fontWeight: "600",
176
+ lineHeight: 22,
177
+ letterSpacing: 0
178
+ },
179
+ // AUDIT FIX: was 16px — lowered to 15px; now distinct from title-md
180
+ "title-sm": {
181
+ fontFamily: "Sohne-Medium",
182
+ fontSize: 15,
183
+ fontWeight: "500",
184
+ lineHeight: 20,
185
+ letterSpacing: 0
186
+ },
187
+ "body-md": {
188
+ fontFamily: "Sohne-Regular",
189
+ fontSize: 16,
190
+ fontWeight: "400",
191
+ lineHeight: 24,
192
+ letterSpacing: 0
193
+ },
194
+ "body-sm": {
195
+ fontFamily: "Sohne-Regular",
196
+ fontSize: 14,
197
+ fontWeight: "400",
198
+ lineHeight: 20,
199
+ letterSpacing: 0
200
+ },
201
+ "caption": {
202
+ fontFamily: "Sohne-Medium",
203
+ fontSize: 14,
204
+ fontWeight: "500",
205
+ lineHeight: 18,
206
+ letterSpacing: 0
207
+ },
208
+ "caption-sm": {
209
+ fontFamily: "Sohne-Regular",
210
+ fontSize: 13,
211
+ fontWeight: "400",
212
+ lineHeight: 16,
213
+ letterSpacing: 0
214
+ },
215
+ "badge-text": {
216
+ fontFamily: "Sohne-SemiBold",
217
+ fontSize: 11,
218
+ fontWeight: "600",
219
+ lineHeight: 14,
220
+ letterSpacing: 0
221
+ },
222
+ "micro-label": {
223
+ fontFamily: "Sohne-Bold",
224
+ fontSize: 12,
225
+ fontWeight: "700",
226
+ lineHeight: 16,
227
+ letterSpacing: 0
228
+ },
229
+ // AUDIT FIX: was 10px/0.8 letterSpacing — raised to 11px/0.6; minimum mobile readability
230
+ "uppercase-tag": {
231
+ fontFamily: "Sohne-Bold",
232
+ fontSize: 11,
233
+ fontWeight: "700",
234
+ lineHeight: 14,
235
+ letterSpacing: 0.6,
236
+ textTransform: "uppercase"
237
+ },
238
+ "button-lg": {
239
+ fontFamily: "Sohne-Medium",
240
+ fontSize: 16,
241
+ fontWeight: "500",
242
+ lineHeight: 22,
243
+ letterSpacing: 0
244
+ },
245
+ "button-sm": {
246
+ fontFamily: "Sohne-Medium",
247
+ fontSize: 14,
248
+ fontWeight: "500",
249
+ lineHeight: 18,
250
+ letterSpacing: 0
251
+ }
252
+ };
253
+ var isWeb = reactNative.Platform.OS === "web";
254
+ var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
255
+ var mvs = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateVerticalScale;
256
+
257
+ // src/components/Text/Text.tsx
258
+ var variantStyles = {
259
+ "display-hero": { ...TYPOGRAPHY["display-hero"], fontSize: ms(TYPOGRAPHY["display-hero"].fontSize), lineHeight: mvs(TYPOGRAPHY["display-hero"].lineHeight) },
260
+ "display-xl": { ...TYPOGRAPHY["display-xl"], fontSize: ms(TYPOGRAPHY["display-xl"].fontSize), lineHeight: mvs(TYPOGRAPHY["display-xl"].lineHeight) },
261
+ "display-lg": { ...TYPOGRAPHY["display-lg"], fontSize: ms(TYPOGRAPHY["display-lg"].fontSize), lineHeight: mvs(TYPOGRAPHY["display-lg"].lineHeight) },
262
+ "display-md": { ...TYPOGRAPHY["display-md"], fontSize: ms(TYPOGRAPHY["display-md"].fontSize), lineHeight: mvs(TYPOGRAPHY["display-md"].lineHeight) },
263
+ "display-sm": { ...TYPOGRAPHY["display-sm"], fontSize: ms(TYPOGRAPHY["display-sm"].fontSize), lineHeight: mvs(TYPOGRAPHY["display-sm"].lineHeight) },
264
+ "title-md": { ...TYPOGRAPHY["title-md"], fontSize: ms(TYPOGRAPHY["title-md"].fontSize), lineHeight: mvs(TYPOGRAPHY["title-md"].lineHeight) },
265
+ "title-sm": { ...TYPOGRAPHY["title-sm"], fontSize: ms(TYPOGRAPHY["title-sm"].fontSize), lineHeight: mvs(TYPOGRAPHY["title-sm"].lineHeight) },
266
+ "body-md": { ...TYPOGRAPHY["body-md"], fontSize: ms(TYPOGRAPHY["body-md"].fontSize), lineHeight: mvs(TYPOGRAPHY["body-md"].lineHeight) },
267
+ "body-sm": { ...TYPOGRAPHY["body-sm"], fontSize: ms(TYPOGRAPHY["body-sm"].fontSize), lineHeight: mvs(TYPOGRAPHY["body-sm"].lineHeight) },
268
+ caption: { ...TYPOGRAPHY["caption"], fontSize: ms(TYPOGRAPHY["caption"].fontSize), lineHeight: mvs(TYPOGRAPHY["caption"].lineHeight) },
269
+ "caption-sm": { ...TYPOGRAPHY["caption-sm"], fontSize: ms(TYPOGRAPHY["caption-sm"].fontSize), lineHeight: mvs(TYPOGRAPHY["caption-sm"].lineHeight) },
270
+ "badge-text": { ...TYPOGRAPHY["badge-text"], fontSize: ms(TYPOGRAPHY["badge-text"].fontSize), lineHeight: mvs(TYPOGRAPHY["badge-text"].lineHeight) },
271
+ "micro-label": { ...TYPOGRAPHY["micro-label"], fontSize: ms(TYPOGRAPHY["micro-label"].fontSize), lineHeight: mvs(TYPOGRAPHY["micro-label"].lineHeight) },
272
+ "uppercase-tag": { ...TYPOGRAPHY["uppercase-tag"], fontSize: ms(TYPOGRAPHY["uppercase-tag"].fontSize), lineHeight: mvs(TYPOGRAPHY["uppercase-tag"].lineHeight) },
273
+ "button-lg": { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize), lineHeight: mvs(TYPOGRAPHY["button-lg"].lineHeight) },
274
+ "button-sm": { ...TYPOGRAPHY["button-sm"], fontSize: ms(TYPOGRAPHY["button-sm"].fontSize), lineHeight: mvs(TYPOGRAPHY["button-sm"].lineHeight) }
275
+ };
276
+ var defaultColorVariant = {
277
+ "display-hero": "foreground",
278
+ "display-xl": "foreground",
279
+ "display-lg": "foreground",
280
+ "display-md": "foreground",
281
+ "display-sm": "foreground",
282
+ "title-md": "foreground",
283
+ "title-sm": "foreground",
284
+ "body-md": "foregroundSubtle",
285
+ // running text — slightly softer
286
+ "body-sm": "foregroundSubtle",
287
+ caption: "foregroundMuted",
288
+ "caption-sm": "foregroundMuted",
289
+ "badge-text": "foreground",
290
+ "micro-label": "foreground",
291
+ "uppercase-tag": "foregroundMuted",
292
+ "button-lg": "foreground",
293
+ "button-sm": "foreground"
294
+ };
295
+ function TextBase({ variant = "body-md", color, style, children, ...props }) {
296
+ const { colors } = useTheme();
297
+ const colorKey = defaultColorVariant[variant] ?? "foreground";
298
+ const resolvedColor = color ?? colors[colorKey];
299
+ return /* @__PURE__ */ React2__default.default.createElement(
300
+ reactNative.Text,
301
+ {
302
+ style: [variantStyles[variant], { color: resolvedColor }, style],
303
+ allowFontScaling: true,
304
+ ...props
305
+ },
306
+ children
307
+ );
308
+ }
309
+ var Text = React2__default.default.memo(TextBase);
310
+
311
+ exports.Text = Text;
package/dist/Text.mjs ADDED
@@ -0,0 +1,4 @@
1
+ export { Text } from './chunk-GNGLDL6Z.mjs';
2
+ import './chunk-QY3X2UYR.mjs';
3
+ import './chunk-SOYNZDVY.mjs';
4
+ import './chunk-2CE3TQVY.mjs';
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { TextInputProps, ViewStyle } from 'react-native';
3
+
4
+ interface TextareaProps extends TextInputProps {
5
+ label?: string;
6
+ error?: string;
7
+ hint?: string;
8
+ rows?: number;
9
+ prefixIcon?: string;
10
+ prefixIconNode?: React.ReactNode;
11
+ prefixIconColor?: string;
12
+ containerStyle?: ViewStyle;
13
+ }
14
+ declare function Textarea({ label, error, hint, rows, prefixIcon, prefixIconNode, prefixIconColor, containerStyle, style, onFocus, onBlur, accessibilityLabel, ...props }: TextareaProps): React.JSX.Element;
15
+
16
+ export { Textarea, type TextareaProps };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { TextInputProps, ViewStyle } from 'react-native';
3
+
4
+ interface TextareaProps extends TextInputProps {
5
+ label?: string;
6
+ error?: string;
7
+ hint?: string;
8
+ rows?: number;
9
+ prefixIcon?: string;
10
+ prefixIconNode?: React.ReactNode;
11
+ prefixIconColor?: string;
12
+ containerStyle?: ViewStyle;
13
+ }
14
+ declare function Textarea({ label, error, hint, rows, prefixIcon, prefixIconNode, prefixIconColor, containerStyle, style, onFocus, onBlur, accessibilityLabel, ...props }: TextareaProps): React.JSX.Element;
15
+
16
+ export { Textarea, type TextareaProps };
@@ -0,0 +1,333 @@
1
+ 'use strict';
2
+
3
+ var React3 = require('react');
4
+ var reactNative = require('react-native');
5
+ var Animated = require('react-native-reanimated');
6
+ var reactNativeSizeMatters = require('react-native-size-matters');
7
+ var AntDesign = require('@expo/vector-icons/AntDesign');
8
+ var Entypo = require('@expo/vector-icons/Entypo');
9
+ var Feather = require('@expo/vector-icons/Feather');
10
+ var FontAwesome5 = require('@expo/vector-icons/FontAwesome5');
11
+ var MaterialIcons = require('@expo/vector-icons/MaterialIcons');
12
+ var Ionicons = require('@expo/vector-icons/Ionicons');
13
+
14
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
15
+
16
+ var React3__default = /*#__PURE__*/_interopDefault(React3);
17
+ var Animated__default = /*#__PURE__*/_interopDefault(Animated);
18
+ var AntDesign__default = /*#__PURE__*/_interopDefault(AntDesign);
19
+ var Entypo__default = /*#__PURE__*/_interopDefault(Entypo);
20
+ var Feather__default = /*#__PURE__*/_interopDefault(Feather);
21
+ var FontAwesome5__default = /*#__PURE__*/_interopDefault(FontAwesome5);
22
+ var MaterialIcons__default = /*#__PURE__*/_interopDefault(MaterialIcons);
23
+ var Ionicons__default = /*#__PURE__*/_interopDefault(Ionicons);
24
+
25
+ // src/components/Textarea/Textarea.tsx
26
+
27
+ // src/theme/colorUtils.ts
28
+ function hexToRgb(hex) {
29
+ const clean = hex.replace("#", "");
30
+ const full = clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean;
31
+ if (full.length !== 6) return null;
32
+ return {
33
+ r: parseInt(full.slice(0, 2), 16),
34
+ g: parseInt(full.slice(2, 4), 16),
35
+ b: parseInt(full.slice(4, 6), 16)
36
+ };
37
+ }
38
+ function componentToHex(c) {
39
+ return Math.round(Math.max(0, Math.min(255, c))).toString(16).padStart(2, "0");
40
+ }
41
+ function rgbToHex(r, g, b) {
42
+ return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
43
+ }
44
+ function withAlphaOnWhite(hex, alpha) {
45
+ const rgb = hexToRgb(hex);
46
+ if (!rgb) return hex;
47
+ const r = rgb.r * alpha + 255 * (1 - alpha);
48
+ const g = rgb.g * alpha + 255 * (1 - alpha);
49
+ const b = rgb.b * alpha + 255 * (1 - alpha);
50
+ return rgbToHex(r, g, b);
51
+ }
52
+ function withAlphaOnDark(hex, alpha, bgHex = "#0f0f0f") {
53
+ const rgb = hexToRgb(hex);
54
+ const bg = hexToRgb(bgHex);
55
+ if (!rgb || !bg) return hex;
56
+ const r = rgb.r * alpha + bg.r * (1 - alpha);
57
+ const g = rgb.g * alpha + bg.g * (1 - alpha);
58
+ const b = rgb.b * alpha + bg.b * (1 - alpha);
59
+ return rgbToHex(r, g, b);
60
+ }
61
+ function mixWithBackground(fgHex, bgHex, opacity) {
62
+ const fg = hexToRgb(fgHex);
63
+ const bg = hexToRgb(bgHex);
64
+ if (!fg || !bg) return fgHex;
65
+ const r = fg.r * opacity + bg.r * (1 - opacity);
66
+ const g = fg.g * opacity + bg.g * (1 - opacity);
67
+ const b = fg.b * opacity + bg.b * (1 - opacity);
68
+ return rgbToHex(r, g, b);
69
+ }
70
+ function lighten(hex, amount) {
71
+ return withAlphaOnWhite(hex, 1 - amount);
72
+ }
73
+ function darken(hex, amount) {
74
+ const rgb = hexToRgb(hex);
75
+ if (!rgb) return hex;
76
+ return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
77
+ }
78
+
79
+ // src/theme/colors.ts
80
+ var defaultLight = {
81
+ background: "#ffffff",
82
+ foreground: "#1a1a1a",
83
+ card: "#ffffff",
84
+ primary: "#1a1a1a",
85
+ primaryForeground: "#ffffff",
86
+ // AUDIT FIX: brand accent — was undefined; falls back to primary when omitted
87
+ accent: "#d4561d",
88
+ accentForeground: "#ffffff",
89
+ border: "#dddddd",
90
+ // AUDIT FIX: was #e53935 (4.22:1 on white — fails AA); #c72828 = 5.59:1 ✓
91
+ destructive: "#c72828",
92
+ destructiveForeground: "#ffffff",
93
+ success: "#1a7a45",
94
+ successForeground: "#ffffff",
95
+ // AUDIT FIX: was #e67e00 (2.86:1 — severe fail); #9a5200 = 5.86:1 ✓ AAA-near
96
+ warning: "#9a5200",
97
+ warningForeground: "#ffffff"
98
+ };
99
+ function deriveColors(t, scheme) {
100
+ const dark = scheme === "dark";
101
+ const bg = t.background;
102
+ const foregroundSubtle = mixWithBackground(t.foreground, bg, 0.7);
103
+ const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
104
+ const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
105
+ const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
106
+ const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
107
+ const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
108
+ const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
109
+ const successBorder = dark ? withAlphaOnDark(t.success, 0.45, bg) : withAlphaOnWhite(t.success, 0.3);
110
+ const warningTint = dark ? withAlphaOnDark(t.warning, 0.15, bg) : withAlphaOnWhite(t.warning, 0.08);
111
+ const warningBorder = dark ? withAlphaOnDark(t.warning, 0.45, bg) : withAlphaOnWhite(t.warning, 0.3);
112
+ return {
113
+ ...t,
114
+ foregroundSubtle,
115
+ foregroundMuted,
116
+ surface,
117
+ surfaceStrong,
118
+ destructiveTint,
119
+ destructiveBorder,
120
+ successTint,
121
+ successBorder,
122
+ warningTint,
123
+ warningBorder,
124
+ overlay: t.overlay ?? "rgba(0,0,0,0.45)",
125
+ accentResolved: t.accent ?? t.primary,
126
+ accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
127
+ ring: t.accent ?? t.primary,
128
+ input: t.border,
129
+ separator: dark ? lighten(t.border, 0.22) : darken(t.border, 0.16)
130
+ };
131
+ }
132
+
133
+ // src/theme/ThemeProvider.tsx
134
+ var ThemeContext = React3.createContext({
135
+ colors: deriveColors(defaultLight, "light"),
136
+ colorScheme: "light"
137
+ });
138
+ function useTheme() {
139
+ const context = React3.useContext(ThemeContext);
140
+ if (!context) {
141
+ throw new Error("useTheme must be used within a ThemeProvider");
142
+ }
143
+ return context;
144
+ }
145
+ var isWeb = reactNative.Platform.OS === "web";
146
+ var s = isWeb ? (n) => n : reactNativeSizeMatters.scale;
147
+ var vs = isWeb ? (n) => n : reactNativeSizeMatters.verticalScale;
148
+ var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
149
+ var glyphMapOf = (mod) => mod.glyphMap ?? {};
150
+ var ALL_FAMILIES = [
151
+ { name: "Ionicons", component: Ionicons__default.default, getGlyphMap: () => glyphMapOf(Ionicons__default.default) },
152
+ { name: "MaterialIcons", component: MaterialIcons__default.default, getGlyphMap: () => glyphMapOf(MaterialIcons__default.default) },
153
+ { name: "FontAwesome5", component: FontAwesome5__default.default, getGlyphMap: () => glyphMapOf(FontAwesome5__default.default) },
154
+ { name: "Entypo", component: Entypo__default.default, getGlyphMap: () => glyphMapOf(Entypo__default.default) },
155
+ { name: "AntDesign", component: AntDesign__default.default, getGlyphMap: () => glyphMapOf(AntDesign__default.default) },
156
+ { name: "Feather", component: Feather__default.default, getGlyphMap: () => glyphMapOf(Feather__default.default) }
157
+ ];
158
+ var activeFamilies = ALL_FAMILIES;
159
+ var resolvedCache = null;
160
+ function buildCache() {
161
+ const cache = /* @__PURE__ */ new Map();
162
+ for (const family of activeFamilies) {
163
+ const glyphMap = family.getGlyphMap();
164
+ for (const iconName of Object.keys(glyphMap)) {
165
+ cache.set(iconName, family);
166
+ }
167
+ }
168
+ return cache;
169
+ }
170
+ function resolveFamily(name) {
171
+ if (!resolvedCache) {
172
+ resolvedCache = buildCache();
173
+ }
174
+ return resolvedCache.get(name) ?? null;
175
+ }
176
+ function Icon({ name, size, color, family }) {
177
+ let resolved = null;
178
+ if (family) {
179
+ resolved = ALL_FAMILIES.find((f) => f.name === family) ?? null;
180
+ } else {
181
+ resolved = resolveFamily(name);
182
+ }
183
+ if (!resolved) return null;
184
+ const Component = resolved.component;
185
+ return React3__default.default.createElement(Component, { name, size, color });
186
+ }
187
+ function renderIcon(name, size, color) {
188
+ return React3__default.default.createElement(Icon, { name, size, color });
189
+ }
190
+ var TIMINGS = {
191
+ /** Color/opacity transitions on toggles, checkboxes, switches. */
192
+ state: { duration: 160 },
193
+ /** Focus ring on inputs. */
194
+ focusIn: { duration: 140 },
195
+ focusOut: { duration: 100 }};
196
+ var EASINGS = {
197
+ /** Material-style ease-out — natural deceleration for state changes. */
198
+ standard: Animated.Easing.bezier(0.2, 0, 0, 1),
199
+ /** Strong ease-out for expanding surfaces (Accordion open). */
200
+ expand: Animated.Easing.bezier(0.23, 1, 0.32, 1),
201
+ /** Quick ease-in for collapsing. */
202
+ collapse: Animated.Easing.in(Animated.Easing.ease)
203
+ };
204
+
205
+ // src/utils/useColorTransition.ts
206
+ function useColorTransition(active, options = {}) {
207
+ const { duration = TIMINGS.state.duration } = options;
208
+ const progress = Animated.useSharedValue(active ? 1 : 0);
209
+ React3.useEffect(() => {
210
+ progress.value = Animated.withTiming(active ? 1 : 0, { duration, easing: EASINGS.standard });
211
+ }, [active, duration, progress]);
212
+ return progress;
213
+ }
214
+
215
+ // src/components/Textarea/Textarea.tsx
216
+ var webInputResetStyle = reactNative.Platform.OS === "web" ? { outlineStyle: "none", outlineWidth: 0, outlineColor: "transparent", boxShadow: "none" } : {};
217
+ function Textarea({
218
+ label,
219
+ error,
220
+ hint,
221
+ rows = 4,
222
+ prefixIcon,
223
+ prefixIconNode,
224
+ prefixIconColor,
225
+ containerStyle,
226
+ style,
227
+ onFocus,
228
+ onBlur,
229
+ accessibilityLabel,
230
+ ...props
231
+ }) {
232
+ const { colors } = useTheme();
233
+ const [focused, setFocused] = React3.useState(false);
234
+ const focusProgress = useColorTransition(focused, {
235
+ duration: focused ? TIMINGS.focusIn.duration : TIMINGS.focusOut.duration
236
+ });
237
+ const resolvedPrefixIcon = prefixIcon ? renderIcon(prefixIcon, ms(16), prefixIconColor ?? colors.foregroundMuted) : prefixIconNode;
238
+ const borderAnimStyle = Animated.useAnimatedStyle(() => ({
239
+ borderColor: error ? colors.destructive : Animated.interpolateColor(focusProgress.value, [0, 1], [colors.border, colors.primary]),
240
+ borderWidth: error ? 2 : Animated.interpolate(focusProgress.value, [0, 1], [1, 2])
241
+ }));
242
+ return /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [styles.container, containerStyle] }, label ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.label, { color: colors.foreground }], allowFontScaling: true }, label) : null, /* @__PURE__ */ React3__default.default.createElement(
243
+ Animated__default.default.View,
244
+ {
245
+ style: [
246
+ styles.inputWrapper,
247
+ { backgroundColor: colors.background }
248
+ ]
249
+ },
250
+ /* @__PURE__ */ React3__default.default.createElement(Animated__default.default.View, { style: [styles.borderOverlay, borderAnimStyle], pointerEvents: "none" }),
251
+ resolvedPrefixIcon ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles.prefixIcon }, resolvedPrefixIcon) : null,
252
+ /* @__PURE__ */ React3__default.default.createElement(
253
+ reactNative.TextInput,
254
+ {
255
+ multiline: true,
256
+ numberOfLines: rows,
257
+ textAlignVertical: "top",
258
+ style: [
259
+ styles.input,
260
+ {
261
+ color: colors.foreground,
262
+ minHeight: rows * vs(30)
263
+ },
264
+ webInputResetStyle,
265
+ style
266
+ ],
267
+ onFocus: (e) => {
268
+ setFocused(true);
269
+ onFocus?.(e);
270
+ },
271
+ onBlur: (e) => {
272
+ setFocused(false);
273
+ onBlur?.(e);
274
+ },
275
+ placeholderTextColor: colors.foregroundMuted,
276
+ allowFontScaling: true,
277
+ accessibilityLabel: accessibilityLabel ?? label,
278
+ ...props
279
+ }
280
+ )
281
+ ), error ? /* @__PURE__ */ React3__default.default.createElement(
282
+ reactNative.Text,
283
+ {
284
+ style: [styles.helperText, { color: colors.destructive }],
285
+ allowFontScaling: true,
286
+ accessibilityLiveRegion: "polite"
287
+ },
288
+ error
289
+ ) : null, !error && hint ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles.helperText, { color: colors.foregroundMuted }], allowFontScaling: true }, hint) : null);
290
+ }
291
+ var styles = reactNative.StyleSheet.create({
292
+ container: {
293
+ gap: vs(4)
294
+ },
295
+ label: {
296
+ fontFamily: "Sohne-Medium",
297
+ fontSize: ms(13),
298
+ lineHeight: vs(18),
299
+ marginBottom: vs(2)
300
+ },
301
+ inputWrapper: {
302
+ // Border lives on borderOverlay (absolute); wrapper carries none so the
303
+ // focus weight change never reflows content.
304
+ borderRadius: 8,
305
+ paddingHorizontal: s(14),
306
+ paddingVertical: vs(11),
307
+ gap: s(8)
308
+ },
309
+ borderOverlay: {
310
+ ...reactNative.StyleSheet.absoluteFillObject,
311
+ borderRadius: 8
312
+ },
313
+ prefixIcon: {
314
+ alignItems: "flex-start",
315
+ justifyContent: "flex-start",
316
+ paddingTop: vs(2)
317
+ },
318
+ input: {
319
+ fontFamily: "Sohne-Regular",
320
+ fontSize: ms(14),
321
+ lineHeight: vs(22),
322
+ padding: 0,
323
+ margin: 0
324
+ },
325
+ helperText: {
326
+ fontFamily: "Sohne-Regular",
327
+ fontSize: ms(12),
328
+ lineHeight: vs(16),
329
+ marginTop: vs(4)
330
+ }
331
+ });
332
+
333
+ exports.Textarea = Textarea;
@@ -0,0 +1,6 @@
1
+ export { Textarea } from './chunk-6LQYY7HC.mjs';
2
+ import './chunk-7H2OR44A.mjs';
3
+ import './chunk-T7XZ7H7Y.mjs';
4
+ import './chunk-5IKW3VNC.mjs';
5
+ import './chunk-SOYNZDVY.mjs';
6
+ import './chunk-2CE3TQVY.mjs';