@retray-dev/ui-kit 7.0.1 → 9.1.0

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 (234) hide show
  1. package/COMPONENTS.md +567 -14
  2. package/EXAMPLES.md +21 -14
  3. package/README.md +14 -8
  4. package/dist/Accordion.js +57 -5
  5. package/dist/Accordion.mjs +4 -3
  6. package/dist/AlertBanner.js +4 -1
  7. package/dist/AlertBanner.mjs +3 -2
  8. package/dist/AppHeader.d.mts +40 -0
  9. package/dist/AppHeader.d.ts +40 -0
  10. package/dist/AppHeader.js +515 -0
  11. package/dist/AppHeader.mjs +10 -0
  12. package/dist/Avatar.js +39 -29
  13. package/dist/Avatar.mjs +2 -1
  14. package/dist/Badge.js +11 -1
  15. package/dist/Badge.mjs +2 -1
  16. package/dist/Button.d.mts +8 -3
  17. package/dist/Button.d.ts +8 -3
  18. package/dist/Button.js +126 -108
  19. package/dist/Button.mjs +6 -5
  20. package/dist/ButtonGroup.mjs +1 -0
  21. package/dist/Card.js +90 -70
  22. package/dist/Card.mjs +5 -4
  23. package/dist/CategoryStrip.js +79 -22
  24. package/dist/CategoryStrip.mjs +6 -6
  25. package/dist/Checkbox.js +118 -86
  26. package/dist/Checkbox.mjs +5 -5
  27. package/dist/Chip.js +113 -80
  28. package/dist/Chip.mjs +5 -5
  29. package/dist/ConfirmDialog.js +140 -110
  30. package/dist/ConfirmDialog.mjs +7 -6
  31. package/dist/CurrencyDisplay.mjs +1 -0
  32. package/dist/CurrencyInput.d.mts +1 -1
  33. package/dist/CurrencyInput.d.ts +1 -1
  34. package/dist/CurrencyInput.js +9 -5
  35. package/dist/CurrencyInput.mjs +5 -4
  36. package/dist/DetailRow.mjs +1 -0
  37. package/dist/EmptyState.js +131 -111
  38. package/dist/EmptyState.mjs +7 -6
  39. package/dist/ErrorBoundary.d.mts +42 -0
  40. package/dist/ErrorBoundary.d.ts +42 -0
  41. package/dist/ErrorBoundary.js +351 -0
  42. package/dist/ErrorBoundary.mjs +7 -0
  43. package/dist/Form.mjs +1 -0
  44. package/dist/HolographicCard.d.mts +55 -0
  45. package/dist/HolographicCard.d.ts +55 -0
  46. package/dist/HolographicCard.js +316 -0
  47. package/dist/HolographicCard.mjs +191 -0
  48. package/dist/IconButton.d.mts +8 -3
  49. package/dist/IconButton.d.ts +8 -3
  50. package/dist/IconButton.js +115 -98
  51. package/dist/IconButton.mjs +5 -4
  52. package/dist/ImageViewer.d.mts +23 -0
  53. package/dist/ImageViewer.d.ts +23 -0
  54. package/dist/ImageViewer.js +582 -0
  55. package/dist/ImageViewer.mjs +8 -0
  56. package/dist/Input.mjs +4 -3
  57. package/dist/LabelValue.mjs +1 -0
  58. package/dist/ListGroup.mjs +1 -0
  59. package/dist/ListItem.js +131 -117
  60. package/dist/ListItem.mjs +6 -5
  61. package/dist/MediaCard.js +54 -6
  62. package/dist/MediaCard.mjs +6 -5
  63. package/dist/MenuGroup.mjs +1 -0
  64. package/dist/MenuItem.js +91 -79
  65. package/dist/MenuItem.mjs +6 -5
  66. package/dist/MonthPicker.d.mts +10 -2
  67. package/dist/MonthPicker.d.ts +10 -2
  68. package/dist/MonthPicker.js +80 -17
  69. package/dist/MonthPicker.mjs +3 -2
  70. package/dist/PagerDots.d.mts +35 -0
  71. package/dist/PagerDots.d.ts +35 -0
  72. package/dist/PagerDots.js +392 -0
  73. package/dist/PagerDots.mjs +7 -0
  74. package/dist/Pressable.d.mts +5 -5
  75. package/dist/Pressable.d.ts +5 -5
  76. package/dist/Pressable.js +97 -86
  77. package/dist/Pressable.mjs +5 -4
  78. package/dist/PricingCard.d.mts +50 -0
  79. package/dist/PricingCard.d.ts +50 -0
  80. package/dist/PricingCard.js +636 -0
  81. package/dist/PricingCard.mjs +11 -0
  82. package/dist/Progress.mjs +3 -2
  83. package/dist/RadioGroup.js +81 -30
  84. package/dist/RadioGroup.mjs +5 -5
  85. package/dist/RetrayProvider.d.mts +2 -0
  86. package/dist/RetrayProvider.d.ts +2 -0
  87. package/dist/RetrayProvider.js +214 -0
  88. package/dist/RetrayProvider.mjs +5 -0
  89. package/dist/Select.js +51 -4
  90. package/dist/Select.mjs +5 -4
  91. package/dist/SelectableGrid.d.mts +44 -0
  92. package/dist/SelectableGrid.d.ts +44 -0
  93. package/dist/SelectableGrid.js +448 -0
  94. package/dist/SelectableGrid.mjs +9 -0
  95. package/dist/Separator.mjs +1 -0
  96. package/dist/Sheet.d.mts +13 -1
  97. package/dist/Sheet.d.ts +13 -1
  98. package/dist/Sheet.js +115 -5
  99. package/dist/Sheet.mjs +4 -2
  100. package/dist/Skeleton.d.mts +50 -0
  101. package/dist/Skeleton.d.ts +50 -0
  102. package/dist/Skeleton.js +61 -0
  103. package/dist/Skeleton.mjs +4 -2
  104. package/dist/Slider.js +51 -4
  105. package/dist/Slider.mjs +3 -2
  106. package/dist/Spinner.js +28 -7
  107. package/dist/Spinner.mjs +2 -1
  108. package/dist/Switch.js +98 -48
  109. package/dist/Switch.mjs +4 -3
  110. package/dist/TabBar.d.mts +42 -0
  111. package/dist/TabBar.d.ts +42 -0
  112. package/dist/TabBar.js +361 -0
  113. package/dist/TabBar.mjs +6 -0
  114. package/dist/Tabs.js +92 -62
  115. package/dist/Tabs.mjs +5 -4
  116. package/dist/Text.js +16 -0
  117. package/dist/Text.mjs +2 -1
  118. package/dist/Textarea.mjs +4 -3
  119. package/dist/Toast.d.mts +7 -7
  120. package/dist/Toast.d.ts +7 -7
  121. package/dist/Toast.mjs +1 -0
  122. package/dist/Toggle.d.mts +6 -3
  123. package/dist/Toggle.d.ts +6 -3
  124. package/dist/Toggle.js +135 -120
  125. package/dist/Toggle.mjs +5 -5
  126. package/dist/VirtualList.mjs +1 -0
  127. package/dist/{chunk-7H2OR44A.mjs → chunk-26BCI223.mjs} +1 -1
  128. package/dist/{chunk-CRYBX2CM.mjs → chunk-2TFTAWVJ.mjs} +44 -59
  129. package/dist/chunk-3DKJ2GIC.mjs +30 -0
  130. package/dist/{chunk-KWCPOM6W.mjs → chunk-3U4SSNWP.mjs} +32 -48
  131. package/dist/chunk-4I7D47FH.mjs +139 -0
  132. package/dist/chunk-4K625MVM.mjs +142 -0
  133. package/dist/{chunk-MN7OG7IY.mjs → chunk-6OAZJ577.mjs} +6 -4
  134. package/dist/{chunk-L7E7TVEZ.mjs → chunk-756RAKE4.mjs} +2 -2
  135. package/dist/{chunk-HSPSMN6U.mjs → chunk-7QHVVCB3.mjs} +2 -2
  136. package/dist/{chunk-URLL5JBR.mjs → chunk-A3A6KNQN.mjs} +3 -3
  137. package/dist/chunk-AJ7ZDNBT.mjs +120 -0
  138. package/dist/{chunk-FTLJOUOQ.mjs → chunk-AV4EMIRH.mjs} +25 -28
  139. package/dist/chunk-AZJF2BLK.mjs +115 -0
  140. package/dist/chunk-BNP626TY.mjs +159 -0
  141. package/dist/{chunk-5IKW3VNC.mjs → chunk-DVK4G2GT.mjs} +17 -1
  142. package/dist/{chunk-6LQYY7HC.mjs → chunk-EH745HE5.mjs} +2 -2
  143. package/dist/chunk-EJ7ZPXOH.mjs +163 -0
  144. package/dist/{chunk-RKLHUDZS.mjs → chunk-GD6KXMG5.mjs} +29 -15
  145. package/dist/{chunk-RR2VQLKE.mjs → chunk-GQYFLP3D.mjs} +14 -17
  146. package/dist/{chunk-Y6MXOREN.mjs → chunk-ID72TK46.mjs} +8 -17
  147. package/dist/{chunk-NQGVLMWG.mjs → chunk-JMOZEC77.mjs} +1 -1
  148. package/dist/{chunk-GCWOGZYL.mjs → chunk-JT7HKXRB.mjs} +39 -29
  149. package/dist/{chunk-LWG526VX.mjs → chunk-KIHCWCWL.mjs} +47 -62
  150. package/dist/chunk-LXJIIOYQ.mjs +104 -0
  151. package/dist/{chunk-SBZYEV4S.mjs → chunk-M6ZXVBTK.mjs} +5 -2
  152. package/dist/{chunk-XDMN67KV.mjs → chunk-MAC465BB.mjs} +10 -8
  153. package/dist/chunk-MBMXYJJV.mjs +36 -0
  154. package/dist/chunk-MLF3EZFW.mjs +119 -0
  155. package/dist/chunk-NA7PARID.mjs +147 -0
  156. package/dist/{chunk-QXGYKWI7.mjs → chunk-O3HA6TYM.mjs} +9 -4
  157. package/dist/{chunk-63357L2X.mjs → chunk-OB4JUQ3O.mjs} +1 -1
  158. package/dist/{chunk-AU2VDY4P.mjs → chunk-PFZTM6D5.mjs} +52 -4
  159. package/dist/chunk-QKH5ZOD5.mjs +97 -0
  160. package/dist/{chunk-KZJRQOIU.mjs → chunk-TERDKCLE.mjs} +11 -1
  161. package/dist/{chunk-U4N7WF4Z.mjs → chunk-UREA2GYY.mjs} +28 -23
  162. package/dist/{chunk-TAJ2PQ2O.mjs → chunk-VGTDN7SW.mjs} +7 -6
  163. package/dist/{chunk-URDE3EUU.mjs → chunk-VQ57HWPL.mjs} +27 -15
  164. package/dist/chunk-WBOOUHSS.mjs +62 -0
  165. package/dist/{chunk-GNGLDL6Z.mjs → chunk-WJLKJMKR.mjs} +18 -0
  166. package/dist/{chunk-YZJAFS4P.mjs → chunk-X4G6APW6.mjs} +22 -19
  167. package/dist/chunk-Y6FXYEAI.mjs +8 -0
  168. package/dist/chunk-YFZ3ELX5.mjs +16 -0
  169. package/dist/{chunk-QCNARS3X.mjs → chunk-YNROWHQJ.mjs} +1 -1
  170. package/dist/chunk-Z4BVUWW6.mjs +196 -0
  171. package/dist/{chunk-GPOUINK5.mjs → chunk-ZJKGQMYH.mjs} +10 -27
  172. package/dist/index-wt-orHUi.d.mts +85 -0
  173. package/dist/index-wt-orHUi.d.ts +85 -0
  174. package/dist/index.d.mts +59 -51
  175. package/dist/index.d.ts +59 -51
  176. package/dist/index.js +1940 -744
  177. package/dist/index.mjs +49 -39
  178. package/package.json +35 -5
  179. package/src/components/Accordion/Accordion.tsx +12 -1
  180. package/src/components/AlertBanner/AlertBanner.tsx +5 -0
  181. package/src/components/AppHeader/AppHeader.tsx +172 -0
  182. package/src/components/AppHeader/index.ts +1 -0
  183. package/src/components/Avatar/Avatar.tsx +10 -2
  184. package/src/components/Badge/Badge.tsx +8 -1
  185. package/src/components/Button/Button.tsx +20 -27
  186. package/src/components/Card/Card.tsx +12 -23
  187. package/src/components/CategoryStrip/CategoryStrip.tsx +17 -21
  188. package/src/components/Checkbox/Checkbox.tsx +26 -40
  189. package/src/components/Chip/Chip.tsx +24 -33
  190. package/src/components/CurrencyInput/CurrencyInput.tsx +10 -8
  191. package/src/components/EmptyState/EmptyState.tsx +2 -1
  192. package/src/components/ErrorBoundary/ErrorBoundary.tsx +153 -0
  193. package/src/components/ErrorBoundary/index.ts +1 -0
  194. package/src/components/HolographicCard/HolographicCard.tsx +315 -0
  195. package/src/components/HolographicCard/index.ts +1 -0
  196. package/src/components/IconButton/IconButton.tsx +19 -27
  197. package/src/components/ImageViewer/ImageViewer.tsx +290 -0
  198. package/src/components/ImageViewer/index.ts +1 -0
  199. package/src/components/ListItem/ListItem.tsx +70 -67
  200. package/src/components/MediaCard/MediaCard.tsx +8 -2
  201. package/src/components/MenuItem/MenuItem.tsx +10 -25
  202. package/src/components/MonthPicker/MonthPicker.tsx +39 -13
  203. package/src/components/MonthPicker/index.ts +1 -1
  204. package/src/components/PagerDots/PagerDots.tsx +200 -0
  205. package/src/components/PagerDots/index.ts +1 -0
  206. package/src/components/Pressable/Pressable.tsx +19 -35
  207. package/src/components/PricingCard/PricingCard.tsx +220 -0
  208. package/src/components/PricingCard/index.ts +1 -0
  209. package/src/components/RadioGroup/RadioGroup.tsx +14 -27
  210. package/src/components/RetrayProvider/RetrayProvider.tsx +59 -0
  211. package/src/components/RetrayProvider/index.ts +1 -0
  212. package/src/components/SelectableGrid/SelectableGrid.tsx +205 -0
  213. package/src/components/SelectableGrid/index.ts +1 -0
  214. package/src/components/Sheet/Sheet.tsx +65 -1
  215. package/src/components/Skeleton/Skeleton.tsx +142 -1
  216. package/src/components/Spinner/Spinner.tsx +17 -2
  217. package/src/components/Switch/Switch.tsx +30 -58
  218. package/src/components/TabBar/TabBar.tsx +169 -0
  219. package/src/components/TabBar/index.ts +1 -0
  220. package/src/components/Tabs/Tabs.tsx +23 -26
  221. package/src/components/Text/Text.tsx +2 -0
  222. package/src/components/Toggle/Toggle.tsx +35 -51
  223. package/src/fonts.ts +4 -1
  224. package/src/index.ts +23 -2
  225. package/src/utils/animations.ts +29 -1
  226. package/src/utils/fontGuard.ts +34 -0
  227. package/src/utils/haptics.ts +211 -9
  228. package/src/utils/pressable.ts +66 -0
  229. package/dist/chunk-76PFOSM2.mjs +0 -41
  230. package/dist/chunk-DITNP6PL.mjs +0 -106
  231. package/dist/chunk-JBLL7U3U.mjs +0 -64
  232. package/dist/chunk-LG4DO3DK.mjs +0 -174
  233. package/dist/chunk-RMMK64W5.mjs +0 -54
  234. package/dist/chunk-RTC3CFXF.mjs +0 -29
@@ -0,0 +1,636 @@
1
+ 'use strict';
2
+
3
+ var React3 = require('react');
4
+ var reactNative = require('react-native');
5
+ var reactNativeSizeMatters = require('react-native-size-matters');
6
+ var AntDesign = require('@expo/vector-icons/AntDesign');
7
+ var Entypo = require('@expo/vector-icons/Entypo');
8
+ var Feather = require('@expo/vector-icons/Feather');
9
+ var FontAwesome5 = require('@expo/vector-icons/FontAwesome5');
10
+ var MaterialIcons = require('@expo/vector-icons/MaterialIcons');
11
+ var Ionicons = require('@expo/vector-icons/Ionicons');
12
+ var pressto = require('pressto');
13
+ var reactNativeReanimated = require('react-native-reanimated');
14
+
15
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
16
+
17
+ var React3__default = /*#__PURE__*/_interopDefault(React3);
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
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
26
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
27
+ }) : x)(function(x) {
28
+ if (typeof require !== "undefined") return require.apply(this, arguments);
29
+ throw Error('Dynamic require of "' + x + '" is not supported');
30
+ });
31
+
32
+ // src/theme/colorUtils.ts
33
+ function hexToRgb(hex) {
34
+ const clean = hex.replace("#", "");
35
+ const full = clean.length === 3 ? clean.split("").map((c) => c + c).join("") : clean;
36
+ if (full.length !== 6) return null;
37
+ return {
38
+ r: parseInt(full.slice(0, 2), 16),
39
+ g: parseInt(full.slice(2, 4), 16),
40
+ b: parseInt(full.slice(4, 6), 16)
41
+ };
42
+ }
43
+ function componentToHex(c) {
44
+ return Math.round(Math.max(0, Math.min(255, c))).toString(16).padStart(2, "0");
45
+ }
46
+ function rgbToHex(r, g, b) {
47
+ return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
48
+ }
49
+ function withAlphaOnWhite(hex, alpha) {
50
+ const rgb = hexToRgb(hex);
51
+ if (!rgb) return hex;
52
+ const r = rgb.r * alpha + 255 * (1 - alpha);
53
+ const g = rgb.g * alpha + 255 * (1 - alpha);
54
+ const b = rgb.b * alpha + 255 * (1 - alpha);
55
+ return rgbToHex(r, g, b);
56
+ }
57
+ function withAlphaOnDark(hex, alpha, bgHex = "#0f0f0f") {
58
+ const rgb = hexToRgb(hex);
59
+ const bg = hexToRgb(bgHex);
60
+ if (!rgb || !bg) return hex;
61
+ const r = rgb.r * alpha + bg.r * (1 - alpha);
62
+ const g = rgb.g * alpha + bg.g * (1 - alpha);
63
+ const b = rgb.b * alpha + bg.b * (1 - alpha);
64
+ return rgbToHex(r, g, b);
65
+ }
66
+ function mixWithBackground(fgHex, bgHex, opacity) {
67
+ const fg = hexToRgb(fgHex);
68
+ const bg = hexToRgb(bgHex);
69
+ if (!fg || !bg) return fgHex;
70
+ const r = fg.r * opacity + bg.r * (1 - opacity);
71
+ const g = fg.g * opacity + bg.g * (1 - opacity);
72
+ const b = fg.b * opacity + bg.b * (1 - opacity);
73
+ return rgbToHex(r, g, b);
74
+ }
75
+ function lighten(hex, amount) {
76
+ return withAlphaOnWhite(hex, 1 - amount);
77
+ }
78
+ function darken(hex, amount) {
79
+ const rgb = hexToRgb(hex);
80
+ if (!rgb) return hex;
81
+ return rgbToHex(rgb.r * (1 - amount), rgb.g * (1 - amount), rgb.b * (1 - amount));
82
+ }
83
+
84
+ // src/theme/colors.ts
85
+ var defaultLight = {
86
+ background: "#ffffff",
87
+ foreground: "#1a1a1a",
88
+ card: "#ffffff",
89
+ primary: "#1a1a1a",
90
+ primaryForeground: "#ffffff",
91
+ // AUDIT FIX: brand accent — was undefined; falls back to primary when omitted
92
+ accent: "#d4561d",
93
+ accentForeground: "#ffffff",
94
+ border: "#dddddd",
95
+ // AUDIT FIX: was #e53935 (4.22:1 on white — fails AA); #c72828 = 5.59:1 ✓
96
+ destructive: "#c72828",
97
+ destructiveForeground: "#ffffff",
98
+ success: "#1a7a45",
99
+ successForeground: "#ffffff",
100
+ // AUDIT FIX: was #e67e00 (2.86:1 — severe fail); #9a5200 = 5.86:1 ✓ AAA-near
101
+ warning: "#9a5200",
102
+ warningForeground: "#ffffff"
103
+ };
104
+ function deriveColors(t, scheme) {
105
+ const dark = scheme === "dark";
106
+ const bg = t.background;
107
+ const foregroundSubtle = mixWithBackground(t.foreground, bg, 0.7);
108
+ const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
109
+ const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
110
+ const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
111
+ const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
112
+ const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
113
+ const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
114
+ const successBorder = dark ? withAlphaOnDark(t.success, 0.45, bg) : withAlphaOnWhite(t.success, 0.3);
115
+ const warningTint = dark ? withAlphaOnDark(t.warning, 0.15, bg) : withAlphaOnWhite(t.warning, 0.08);
116
+ const warningBorder = dark ? withAlphaOnDark(t.warning, 0.45, bg) : withAlphaOnWhite(t.warning, 0.3);
117
+ return {
118
+ ...t,
119
+ foregroundSubtle,
120
+ foregroundMuted,
121
+ surface,
122
+ surfaceStrong,
123
+ destructiveTint,
124
+ destructiveBorder,
125
+ successTint,
126
+ successBorder,
127
+ warningTint,
128
+ warningBorder,
129
+ overlay: t.overlay ?? "rgba(0,0,0,0.45)",
130
+ accentResolved: t.accent ?? t.primary,
131
+ accentForegroundResolved: t.accentForeground ?? t.primaryForeground,
132
+ ring: t.accent ?? t.primary,
133
+ input: t.border,
134
+ separator: dark ? lighten(t.border, 0.22) : darken(t.border, 0.16)
135
+ };
136
+ }
137
+
138
+ // src/theme/ThemeProvider.tsx
139
+ var ThemeContext = React3.createContext({
140
+ colors: deriveColors(defaultLight, "light"),
141
+ colorScheme: "light"
142
+ });
143
+ function useTheme() {
144
+ const context = React3.useContext(ThemeContext);
145
+ if (!context) {
146
+ throw new Error("useTheme must be used within a ThemeProvider");
147
+ }
148
+ return context;
149
+ }
150
+ var _haptics = null;
151
+ var _hapticsLoaded = false;
152
+ async function getHaptics() {
153
+ if (reactNative.Platform.OS === "web") return null;
154
+ if (!_hapticsLoaded) {
155
+ _hapticsLoaded = true;
156
+ try {
157
+ _haptics = await import('expo-haptics');
158
+ } catch {
159
+ _haptics = null;
160
+ }
161
+ }
162
+ return _haptics;
163
+ }
164
+ var _pulsar = null;
165
+ var _pulsarChecked = false;
166
+ var _pulsarAvailable = false;
167
+ function isPulsarNativeRegistered() {
168
+ try {
169
+ const g = globalThis;
170
+ if (typeof g.__turboModuleProxy === "function") {
171
+ return g.__turboModuleProxy("RNPulsar") != null;
172
+ }
173
+ return reactNative.NativeModules?.RNPulsar != null;
174
+ } catch {
175
+ return false;
176
+ }
177
+ }
178
+ function getPulsar() {
179
+ if (reactNative.Platform.OS === "web") return null;
180
+ if (!_pulsarChecked) {
181
+ _pulsarChecked = true;
182
+ try {
183
+ if (isPulsarNativeRegistered()) {
184
+ _pulsar = __require("react-native-pulsar");
185
+ _pulsarAvailable = true;
186
+ }
187
+ } catch {
188
+ _pulsar = null;
189
+ _pulsarAvailable = false;
190
+ }
191
+ }
192
+ return _pulsarAvailable ? _pulsar : null;
193
+ }
194
+ function impactMedium() {
195
+ if (reactNative.Platform.OS === "web") return;
196
+ getHaptics().then((h) => {
197
+ if (h) {
198
+ h.impactAsync(h.ImpactFeedbackStyle.Medium);
199
+ } else {
200
+ getPulsar()?.Presets.System.impactMedium();
201
+ }
202
+ });
203
+ }
204
+ var isWeb = reactNative.Platform.OS === "web";
205
+ var s = isWeb ? (n) => n : reactNativeSizeMatters.scale;
206
+ var vs = isWeb ? (n) => n : reactNativeSizeMatters.verticalScale;
207
+ var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
208
+ var mvs = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateVerticalScale;
209
+ var glyphMapOf = (mod) => mod.glyphMap ?? {};
210
+ var ALL_FAMILIES = [
211
+ { name: "Ionicons", component: Ionicons__default.default, getGlyphMap: () => glyphMapOf(Ionicons__default.default) },
212
+ { name: "MaterialIcons", component: MaterialIcons__default.default, getGlyphMap: () => glyphMapOf(MaterialIcons__default.default) },
213
+ { name: "FontAwesome5", component: FontAwesome5__default.default, getGlyphMap: () => glyphMapOf(FontAwesome5__default.default) },
214
+ { name: "Entypo", component: Entypo__default.default, getGlyphMap: () => glyphMapOf(Entypo__default.default) },
215
+ { name: "AntDesign", component: AntDesign__default.default, getGlyphMap: () => glyphMapOf(AntDesign__default.default) },
216
+ { name: "Feather", component: Feather__default.default, getGlyphMap: () => glyphMapOf(Feather__default.default) }
217
+ ];
218
+ var activeFamilies = ALL_FAMILIES;
219
+ var resolvedCache = null;
220
+ function buildCache() {
221
+ const cache = /* @__PURE__ */ new Map();
222
+ for (const family of activeFamilies) {
223
+ const glyphMap = family.getGlyphMap();
224
+ for (const iconName of Object.keys(glyphMap)) {
225
+ cache.set(iconName, family);
226
+ }
227
+ }
228
+ return cache;
229
+ }
230
+ function resolveFamily(name) {
231
+ if (!resolvedCache) {
232
+ resolvedCache = buildCache();
233
+ }
234
+ return resolvedCache.get(name) ?? null;
235
+ }
236
+ function Icon({ name, size, color, family }) {
237
+ let resolved = null;
238
+ if (family) {
239
+ resolved = ALL_FAMILIES.find((f) => f.name === family) ?? null;
240
+ } else {
241
+ resolved = resolveFamily(name);
242
+ }
243
+ if (!resolved) return null;
244
+ const Component = resolved.component;
245
+ return React3__default.default.createElement(Component, { name, size, color });
246
+ }
247
+ function renderIcon(name, size, color) {
248
+ return React3__default.default.createElement(Icon, { name, size, color });
249
+ }
250
+
251
+ // src/tokens.ts
252
+ var RADIUS = {
253
+ md: 14};
254
+ var SHADOWS = {
255
+ md: {
256
+ shadowColor: "#000",
257
+ shadowOffset: { width: 0, height: 2 },
258
+ shadowOpacity: 0.1,
259
+ shadowRadius: 8,
260
+ elevation: 5
261
+ }};
262
+ var TYPOGRAPHY = {
263
+ "button-lg": {
264
+ fontFamily: "Sohne-Medium",
265
+ fontSize: 16,
266
+ fontWeight: "500",
267
+ lineHeight: 22,
268
+ letterSpacing: 0
269
+ },
270
+ "button-sm": {
271
+ fontFamily: "Sohne-Medium",
272
+ fontSize: 14,
273
+ fontWeight: "500",
274
+ lineHeight: 18,
275
+ letterSpacing: 0
276
+ }
277
+ };
278
+ ({
279
+ /** Material-style ease-out — natural deceleration for state changes. */
280
+ standard: reactNativeReanimated.Easing.bezier(0.2, 0, 0, 1),
281
+ /** Strong ease-out for expanding surfaces (Accordion open). */
282
+ expand: reactNativeReanimated.Easing.bezier(0.23, 1, 0.32, 1),
283
+ /** Quick ease-in for collapsing. */
284
+ collapse: reactNativeReanimated.Easing.in(reactNativeReanimated.Easing.ease)
285
+ });
286
+ var PRESS_SCALE = {
287
+ button: 0.95,
288
+ card: 0.98,
289
+ row: 0.97,
290
+ chip: 0.94
291
+ };
292
+ var PressableButton = pressto.createAnimatedPressable((progress) => {
293
+ "worklet";
294
+ const scale2 = 1 - (1 - PRESS_SCALE.button) * progress;
295
+ return { transform: [{ scale: scale2 }] };
296
+ });
297
+ pressto.createAnimatedPressable((progress) => {
298
+ "worklet";
299
+ const scale2 = 1 - (1 - PRESS_SCALE.card) * progress;
300
+ return { transform: [{ scale: scale2 }] };
301
+ });
302
+ pressto.createAnimatedPressable((progress) => {
303
+ "worklet";
304
+ const scale2 = 1 - (1 - PRESS_SCALE.row) * progress;
305
+ return { transform: [{ scale: scale2 }] };
306
+ });
307
+ pressto.createAnimatedPressable((progress) => {
308
+ "worklet";
309
+ const scale2 = 1 - (1 - PRESS_SCALE.chip) * progress;
310
+ return { transform: [{ scale: scale2 }] };
311
+ });
312
+ pressto.createAnimatedPressable((progress) => {
313
+ "worklet";
314
+ const scale2 = 1 - (1 - PRESS_SCALE.button) * progress;
315
+ return { transform: [{ scale: scale2 }] };
316
+ });
317
+
318
+ // src/components/Button/Button.tsx
319
+ var containerSizeStyles = {
320
+ // AUDIT FIX: sm was 40pt — below Apple HIG 44pt minimum touch target.
321
+ sm: { paddingHorizontal: s(16), paddingVertical: vs(12), minHeight: 44 },
322
+ md: { paddingHorizontal: s(24), paddingVertical: vs(14), minHeight: 48 },
323
+ lg: { paddingHorizontal: s(28), paddingVertical: vs(16), minHeight: 56 }
324
+ };
325
+ var labelSizeStyles = {
326
+ sm: { ...TYPOGRAPHY["button-sm"], fontSize: ms(TYPOGRAPHY["button-sm"].fontSize) },
327
+ md: { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize) },
328
+ lg: { ...TYPOGRAPHY["button-lg"], fontSize: ms(TYPOGRAPHY["button-lg"].fontSize + 1), lineHeight: mvs(24) }
329
+ };
330
+ var iconSizeMap = { sm: 16, md: 18, lg: 20 };
331
+ function ButtonBase({
332
+ label,
333
+ variant = "primary",
334
+ size = "md",
335
+ loading = false,
336
+ fullWidth = false,
337
+ icon,
338
+ iconName,
339
+ iconColor,
340
+ iconPosition = "left",
341
+ disabled,
342
+ style,
343
+ onPress,
344
+ accessibilityLabel,
345
+ accessibilityHint
346
+ }) {
347
+ const { colors } = useTheme();
348
+ const isDisabled = disabled || loading;
349
+ const handlePress = () => {
350
+ impactMedium();
351
+ onPress?.();
352
+ };
353
+ const containerVariantStyle = {
354
+ primary: { backgroundColor: colors.primary },
355
+ secondary: { backgroundColor: "transparent", borderWidth: 1.5, borderColor: colors.primary },
356
+ text: { backgroundColor: "transparent" },
357
+ destructive: { backgroundColor: colors.destructive }
358
+ }[variant];
359
+ const labelVariantStyle = {
360
+ primary: { color: colors.primaryForeground },
361
+ secondary: { color: colors.primary },
362
+ // AUDIT FIX: was colors.foreground — visually indistinguishable from plain text,
363
+ // no affordance that it's a CTA. Now uses accentResolved so text-only buttons
364
+ // carry the brand voltage. Falls back to primary when no accent is defined.
365
+ text: { color: colors.accentResolved },
366
+ destructive: { color: colors.destructiveForeground }
367
+ }[variant];
368
+ const textColor = iconColor ?? labelVariantStyle.color;
369
+ const effectiveIcon = iconName ? renderIcon(iconName, iconSizeMap[size], textColor) : typeof icon === "function" ? icon({ label, size, variant, color: textColor }) : icon;
370
+ const spinnerColor = variant === "destructive" ? colors.destructiveForeground : variant === "primary" ? colors.primaryForeground : colors.accentResolved;
371
+ const styleArray = Array.isArray(style) ? style : style ? [style] : [];
372
+ const flatStyle = reactNative.StyleSheet.flatten(styleArray);
373
+ const { flex, ...restStyle } = flatStyle || {};
374
+ return /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: [fullWidth && styles.fullWidth, flex !== void 0 && { flex }] }, /* @__PURE__ */ React3__default.default.createElement(
375
+ PressableButton,
376
+ {
377
+ style: [
378
+ styles.base,
379
+ containerVariantStyle,
380
+ containerSizeStyles[size],
381
+ fullWidth && styles.fullWidth,
382
+ isDisabled && styles.disabled,
383
+ restStyle
384
+ ],
385
+ enabled: !isDisabled,
386
+ onPress: handlePress,
387
+ rippleColor: "transparent",
388
+ touchSoundDisabled: true,
389
+ activateOnHover: true,
390
+ accessibilityRole: "button",
391
+ accessibilityLabel: accessibilityLabel ?? label,
392
+ accessibilityHint,
393
+ accessibilityState: { disabled: isDisabled, busy: loading }
394
+ },
395
+ loading ? /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, /* @__PURE__ */ React3__default.default.createElement(reactNative.ActivityIndicator, { size: "small", color: spinnerColor, style: { marginRight: s(6) } }), /* @__PURE__ */ React3__default.default.createElement(
396
+ reactNative.Text,
397
+ {
398
+ style: [styles.label, labelVariantStyle, labelSizeStyles[size], styles.labelLoading],
399
+ allowFontScaling: true,
400
+ numberOfLines: 1
401
+ },
402
+ label
403
+ )) : /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, effectiveIcon && iconPosition === "left" && /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, effectiveIcon), /* @__PURE__ */ React3__default.default.createElement(
404
+ reactNative.Text,
405
+ {
406
+ style: [styles.label, labelVariantStyle, labelSizeStyles[size], effectiveIcon ? styles.labelWithIcon : void 0],
407
+ allowFontScaling: true,
408
+ numberOfLines: 1
409
+ },
410
+ label
411
+ ), effectiveIcon && iconPosition === "right" && /* @__PURE__ */ React3__default.default.createElement(React3__default.default.Fragment, null, effectiveIcon))
412
+ ));
413
+ }
414
+ var Button = React3__default.default.memo(ButtonBase);
415
+ var styles = reactNative.StyleSheet.create({
416
+ base: {
417
+ borderRadius: RADIUS.md,
418
+ alignItems: "center",
419
+ justifyContent: "center",
420
+ flexDirection: "row"
421
+ },
422
+ fullWidth: {
423
+ width: "100%"
424
+ },
425
+ disabled: {
426
+ opacity: 0.45
427
+ },
428
+ label: {
429
+ fontFamily: "Sohne-Medium",
430
+ flexShrink: 1
431
+ },
432
+ labelWithIcon: {
433
+ marginHorizontal: s(6)
434
+ },
435
+ labelLoading: {
436
+ opacity: 0.6
437
+ }
438
+ });
439
+ var sizePadding = {
440
+ sm: { paddingHorizontal: s(8), paddingVertical: vs(2) },
441
+ md: { paddingHorizontal: s(10), paddingVertical: vs(4) },
442
+ lg: { paddingHorizontal: s(12), paddingVertical: vs(6) }
443
+ };
444
+ var sizeFontSize = {
445
+ sm: { fontSize: ms(11) },
446
+ md: { fontSize: ms(13) },
447
+ lg: { fontSize: ms(15) }
448
+ };
449
+ var sizeIconGap = {
450
+ sm: s(4),
451
+ md: s(6),
452
+ lg: s(6)
453
+ };
454
+ var sizeIconSize = { sm: 10, md: 12, lg: 14 };
455
+ function BadgeBase({ label, children, variant = "default", size = "md", icon, iconName, iconColor, style }) {
456
+ const { colors } = useTheme();
457
+ const containerStyle = {
458
+ default: { backgroundColor: colors.primary },
459
+ secondary: { backgroundColor: colors.surface },
460
+ destructive: { backgroundColor: colors.destructive },
461
+ outline: { backgroundColor: "transparent", borderWidth: 1, borderColor: colors.border },
462
+ success: { backgroundColor: colors.success },
463
+ warning: { backgroundColor: colors.warning },
464
+ successOutline: { backgroundColor: colors.successTint, borderWidth: 1, borderColor: colors.successBorder },
465
+ destructiveOutline: { backgroundColor: colors.destructiveTint, borderWidth: 1, borderColor: colors.destructiveBorder },
466
+ warningOutline: { backgroundColor: colors.warningTint, borderWidth: 1, borderColor: colors.warningBorder }
467
+ }[variant];
468
+ const textColor = {
469
+ default: colors.primaryForeground,
470
+ secondary: colors.foreground,
471
+ destructive: colors.destructiveForeground,
472
+ outline: colors.foreground,
473
+ success: colors.successForeground,
474
+ warning: colors.warningForeground,
475
+ successOutline: colors.success,
476
+ destructiveOutline: colors.destructive,
477
+ warningOutline: colors.warning
478
+ }[variant];
479
+ const effectiveIcon = iconName ? renderIcon(iconName, sizeIconSize[size], iconColor ?? textColor) : icon;
480
+ const content = children ?? label;
481
+ const a11yLabel = typeof content === "string" ? content : label;
482
+ return /* @__PURE__ */ React3__default.default.createElement(
483
+ reactNative.View,
484
+ {
485
+ style: [styles2.container, containerStyle, sizePadding[size], { gap: sizeIconGap[size] }, style],
486
+ accessibilityRole: "text",
487
+ accessibilityLabel: a11yLabel
488
+ },
489
+ effectiveIcon,
490
+ typeof content === "string" ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles2.label, { color: textColor }, sizeFontSize[size]], allowFontScaling: true }, content) : content
491
+ );
492
+ }
493
+ var Badge = React3__default.default.memo(BadgeBase);
494
+ var styles2 = reactNative.StyleSheet.create({
495
+ container: {
496
+ borderRadius: 9999,
497
+ alignSelf: "flex-start",
498
+ flexDirection: "row",
499
+ alignItems: "center"
500
+ },
501
+ label: {
502
+ fontFamily: "Sohne-Medium"
503
+ }
504
+ });
505
+
506
+ // src/components/PricingCard/PricingCard.tsx
507
+ var normalize = (f) => typeof f === "string" ? { label: f, included: true } : { included: true, ...f };
508
+ function PricingCard({
509
+ name,
510
+ price,
511
+ period,
512
+ description,
513
+ features = [],
514
+ ctaLabel,
515
+ onCtaPress,
516
+ badge,
517
+ highlighted = false,
518
+ footnote,
519
+ style
520
+ }) {
521
+ const { colors } = useTheme();
522
+ return /* @__PURE__ */ React3__default.default.createElement(
523
+ reactNative.View,
524
+ {
525
+ style: [
526
+ styles3.card,
527
+ {
528
+ backgroundColor: colors.card,
529
+ borderColor: highlighted ? colors.primary : colors.border,
530
+ borderWidth: highlighted ? 2 : reactNative.StyleSheet.hairlineWidth
531
+ },
532
+ highlighted && SHADOWS.md,
533
+ style
534
+ ],
535
+ accessibilityRole: "summary"
536
+ },
537
+ /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles3.header }, /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles3.name, { color: colors.foreground }], allowFontScaling: true }, name), badge ? /* @__PURE__ */ React3__default.default.createElement(Badge, { label: badge, variant: highlighted ? "default" : "secondary", size: "sm" }) : null),
538
+ /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles3.priceRow }, /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles3.price, { color: colors.foreground }], allowFontScaling: true }, price), period ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles3.period, { color: colors.foregroundMuted }], allowFontScaling: true }, period) : null),
539
+ description ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles3.description, { color: colors.foregroundMuted }], allowFontScaling: true }, description) : null,
540
+ features.length > 0 ? /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { style: styles3.features }, features.map(normalize).map((f, i) => /* @__PURE__ */ React3__default.default.createElement(reactNative.View, { key: i, style: styles3.featureRow }, renderIcon(
541
+ f.included ? "check" : "minus",
542
+ ms(16),
543
+ f.included ? colors.success : colors.foregroundMuted
544
+ ), /* @__PURE__ */ React3__default.default.createElement(
545
+ reactNative.Text,
546
+ {
547
+ style: [
548
+ styles3.featureLabel,
549
+ { color: f.included ? colors.foreground : colors.foregroundMuted },
550
+ !f.included && styles3.featureExcluded
551
+ ],
552
+ allowFontScaling: true
553
+ },
554
+ f.label
555
+ )))) : null,
556
+ ctaLabel ? /* @__PURE__ */ React3__default.default.createElement(
557
+ Button,
558
+ {
559
+ label: ctaLabel,
560
+ variant: highlighted ? "primary" : "secondary",
561
+ fullWidth: true,
562
+ onPress: onCtaPress,
563
+ style: styles3.cta
564
+ }
565
+ ) : null,
566
+ footnote ? /* @__PURE__ */ React3__default.default.createElement(reactNative.Text, { style: [styles3.footnote, { color: colors.foregroundMuted }], allowFontScaling: true }, footnote) : null
567
+ );
568
+ }
569
+ var styles3 = reactNative.StyleSheet.create({
570
+ card: {
571
+ borderRadius: RADIUS.md,
572
+ padding: s(16),
573
+ gap: vs(8)
574
+ },
575
+ header: {
576
+ flexDirection: "row",
577
+ alignItems: "center",
578
+ justifyContent: "space-between",
579
+ gap: s(8)
580
+ },
581
+ name: {
582
+ fontFamily: "Sohne-SemiBold",
583
+ fontSize: ms(16),
584
+ lineHeight: mvs(20)
585
+ },
586
+ priceRow: {
587
+ flexDirection: "row",
588
+ alignItems: "baseline",
589
+ gap: s(3)
590
+ },
591
+ price: {
592
+ fontFamily: "Sohne-Bold",
593
+ fontSize: ms(28),
594
+ lineHeight: mvs(32),
595
+ letterSpacing: -0.5
596
+ },
597
+ period: {
598
+ fontFamily: "Sohne-Regular",
599
+ fontSize: ms(13),
600
+ lineHeight: mvs(16)
601
+ },
602
+ description: {
603
+ fontFamily: "Sohne-Regular",
604
+ fontSize: ms(13),
605
+ lineHeight: mvs(18)
606
+ },
607
+ features: {
608
+ gap: vs(6),
609
+ marginTop: vs(2)
610
+ },
611
+ featureRow: {
612
+ flexDirection: "row",
613
+ alignItems: "center",
614
+ gap: s(6)
615
+ },
616
+ featureLabel: {
617
+ flex: 1,
618
+ fontFamily: "Sohne-Regular",
619
+ fontSize: ms(13),
620
+ lineHeight: mvs(18)
621
+ },
622
+ featureExcluded: {
623
+ textDecorationLine: "line-through"
624
+ },
625
+ cta: {
626
+ marginTop: vs(2)
627
+ },
628
+ footnote: {
629
+ fontFamily: "Sohne-Regular",
630
+ fontSize: ms(11),
631
+ lineHeight: mvs(14),
632
+ textAlign: "center"
633
+ }
634
+ });
635
+
636
+ exports.PricingCard = PricingCard;
@@ -0,0 +1,11 @@
1
+ export { PricingCard } from './chunk-4I7D47FH.mjs';
2
+ import './chunk-TERDKCLE.mjs';
3
+ import './chunk-2TFTAWVJ.mjs';
4
+ import './chunk-3DKJ2GIC.mjs';
5
+ import './chunk-EJ7ZPXOH.mjs';
6
+ import './chunk-DVK4G2GT.mjs';
7
+ import './chunk-QY3X2UYR.mjs';
8
+ import './chunk-T7XZ7H7Y.mjs';
9
+ import './chunk-SOYNZDVY.mjs';
10
+ import './chunk-2CE3TQVY.mjs';
11
+ import './chunk-Y6FXYEAI.mjs';
package/dist/Progress.mjs CHANGED
@@ -1,4 +1,5 @@
1
- export { Progress } from './chunk-63357L2X.mjs';
2
- import './chunk-5IKW3VNC.mjs';
1
+ export { Progress } from './chunk-OB4JUQ3O.mjs';
2
+ import './chunk-DVK4G2GT.mjs';
3
3
  import './chunk-SOYNZDVY.mjs';
4
4
  import './chunk-2CE3TQVY.mjs';
5
+ import './chunk-Y6FXYEAI.mjs';