@retray-dev/ui-kit 10.2.0 → 12.2.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 (220) hide show
  1. package/COMPONENTS.md +384 -40
  2. package/README.md +14 -5
  3. package/dist/Accordion.d.mts +6 -0
  4. package/dist/Accordion.d.ts +6 -0
  5. package/dist/Accordion.js +16 -0
  6. package/dist/Accordion.mjs +2 -2
  7. package/dist/AlertBanner.js +2 -0
  8. package/dist/AlertBanner.mjs +2 -2
  9. package/dist/AppHeader.js +2 -0
  10. package/dist/AppHeader.mjs +3 -3
  11. package/dist/Avatar.js +2 -0
  12. package/dist/Avatar.mjs +2 -2
  13. package/dist/Badge.js +2 -0
  14. package/dist/Badge.mjs +2 -2
  15. package/dist/Button.js +17 -17
  16. package/dist/Button.mjs +2 -2
  17. package/dist/Card.js +2 -0
  18. package/dist/Card.mjs +2 -2
  19. package/dist/CategoryStrip.js +2 -0
  20. package/dist/CategoryStrip.mjs +2 -2
  21. package/dist/Checkbox.js +2 -0
  22. package/dist/Checkbox.mjs +2 -2
  23. package/dist/Chip.js +2 -0
  24. package/dist/Chip.mjs +2 -2
  25. package/dist/ConfirmDialog.d.mts +1 -6
  26. package/dist/ConfirmDialog.d.ts +1 -6
  27. package/dist/ConfirmDialog.js +53 -41
  28. package/dist/ConfirmDialog.mjs +3 -3
  29. package/dist/CurrencyDisplay.js +2 -0
  30. package/dist/CurrencyDisplay.mjs +2 -2
  31. package/dist/CurrencyInput.d.mts +3 -8
  32. package/dist/CurrencyInput.d.ts +3 -8
  33. package/dist/CurrencyInput.js +5 -1
  34. package/dist/CurrencyInput.mjs +3 -3
  35. package/dist/DetailRow.js +2 -0
  36. package/dist/DetailRow.mjs +2 -2
  37. package/dist/EmptyState.js +17 -17
  38. package/dist/EmptyState.mjs +3 -3
  39. package/dist/ErrorBoundary.js +2 -0
  40. package/dist/ErrorBoundary.mjs +2 -2
  41. package/dist/Form.js +2 -0
  42. package/dist/Form.mjs +2 -2
  43. package/dist/IconButton.js +2 -0
  44. package/dist/IconButton.mjs +2 -2
  45. package/dist/IconPicker.js +677 -248
  46. package/dist/IconPicker.mjs +3 -2
  47. package/dist/ImageUpload.d.mts +3 -1
  48. package/dist/ImageUpload.d.ts +3 -1
  49. package/dist/ImageUpload.js +10 -3
  50. package/dist/ImageUpload.mjs +3 -3
  51. package/dist/ImageViewer.js +2 -0
  52. package/dist/ImageViewer.mjs +4 -4
  53. package/dist/Input.js +2 -0
  54. package/dist/Input.mjs +2 -2
  55. package/dist/LabelValue.js +2 -0
  56. package/dist/LabelValue.mjs +2 -2
  57. package/dist/ListGroup.js +2 -0
  58. package/dist/ListGroup.mjs +2 -2
  59. package/dist/ListItem.d.mts +7 -7
  60. package/dist/ListItem.d.ts +7 -7
  61. package/dist/ListItem.js +14 -7
  62. package/dist/ListItem.mjs +2 -2
  63. package/dist/MediaCard.js +2 -0
  64. package/dist/MediaCard.mjs +2 -2
  65. package/dist/MenuGroup.js +2 -0
  66. package/dist/MenuGroup.mjs +2 -2
  67. package/dist/MenuItem.js +2 -0
  68. package/dist/MenuItem.mjs +2 -2
  69. package/dist/MonthPicker.js +2 -0
  70. package/dist/MonthPicker.mjs +2 -2
  71. package/dist/NumberStepper.js +2 -0
  72. package/dist/NumberStepper.mjs +2 -2
  73. package/dist/PagerDots.js +2 -0
  74. package/dist/PagerDots.mjs +2 -2
  75. package/dist/Pressable.d.mts +15 -7
  76. package/dist/Pressable.d.ts +15 -7
  77. package/dist/Pressable.js +7 -3
  78. package/dist/Pressable.mjs +1 -1
  79. package/dist/PricingCard.js +17 -17
  80. package/dist/PricingCard.mjs +4 -4
  81. package/dist/Progress.js +2 -0
  82. package/dist/Progress.mjs +2 -2
  83. package/dist/RadioGroup.js +2 -0
  84. package/dist/RadioGroup.mjs +2 -2
  85. package/dist/RetrayProvider.d.mts +1 -1
  86. package/dist/RetrayProvider.d.ts +1 -1
  87. package/dist/RetrayProvider.js +2 -0
  88. package/dist/RetrayProvider.mjs +3 -3
  89. package/dist/Select.js +2 -0
  90. package/dist/Select.mjs +2 -2
  91. package/dist/SelectableCard.d.mts +27 -0
  92. package/dist/SelectableCard.d.ts +27 -0
  93. package/dist/SelectableCard.js +511 -0
  94. package/dist/SelectableCard.mjs +8 -0
  95. package/dist/SelectableGrid.js +2 -0
  96. package/dist/SelectableGrid.mjs +2 -2
  97. package/dist/Separator.js +2 -0
  98. package/dist/Separator.mjs +2 -2
  99. package/dist/Sheet.d.mts +4 -46
  100. package/dist/Sheet.d.ts +4 -46
  101. package/dist/Sheet.js +55 -115
  102. package/dist/Sheet.mjs +2 -3
  103. package/dist/SheetSelect.js +2 -0
  104. package/dist/SheetSelect.mjs +2 -2
  105. package/dist/Skeleton.d.mts +3 -1
  106. package/dist/Skeleton.d.ts +3 -1
  107. package/dist/Skeleton.js +5 -2
  108. package/dist/Skeleton.mjs +2 -2
  109. package/dist/Slider.js +2 -0
  110. package/dist/Slider.mjs +2 -2
  111. package/dist/Spinner.js +2 -0
  112. package/dist/Spinner.mjs +2 -2
  113. package/dist/Stats.d.mts +33 -0
  114. package/dist/Stats.d.ts +33 -0
  115. package/dist/Stats.js +453 -0
  116. package/dist/Stats.mjs +9 -0
  117. package/dist/Switch.js +2 -0
  118. package/dist/Switch.mjs +2 -2
  119. package/dist/TabBar.js +2 -0
  120. package/dist/TabBar.mjs +2 -2
  121. package/dist/Tabs.js +2 -0
  122. package/dist/Tabs.mjs +2 -2
  123. package/dist/Text.d.mts +3 -1
  124. package/dist/Text.d.ts +3 -1
  125. package/dist/Text.js +5 -3
  126. package/dist/Text.mjs +2 -2
  127. package/dist/Textarea.js +2 -0
  128. package/dist/Textarea.mjs +2 -2
  129. package/dist/Toast.js +2 -0
  130. package/dist/Toast.mjs +2 -2
  131. package/dist/Toggle.js +2 -0
  132. package/dist/Toggle.mjs +2 -2
  133. package/dist/{chunk-U2XJFYED.mjs → chunk-2BA3JMKK.mjs} +1 -1
  134. package/dist/{chunk-NMU5FMQJ.mjs → chunk-2HFD4IHU.mjs} +4 -2
  135. package/dist/{chunk-S2R7UVOE.mjs → chunk-2LG326TT.mjs} +1 -1
  136. package/dist/chunk-2P2CB235.mjs +236 -0
  137. package/dist/{chunk-6L4G6PBT.mjs → chunk-3XCFYSX4.mjs} +1 -1
  138. package/dist/{chunk-HTHGSXFG.mjs → chunk-4J2PXL36.mjs} +16 -18
  139. package/dist/{chunk-BEMIQXXU.mjs → chunk-4OORJ2DY.mjs} +1 -1
  140. package/dist/chunk-4XOB5TTD.mjs +166 -0
  141. package/dist/{chunk-FCSSQK3L.mjs → chunk-57V2LXCK.mjs} +1 -1
  142. package/dist/{chunk-6Q64UFIA.mjs → chunk-7AFZWSCI.mjs} +1 -1
  143. package/dist/{chunk-IX3NYLYQ.mjs → chunk-7ELGZ66G.mjs} +1 -1
  144. package/dist/{chunk-GD6KXMG5.mjs → chunk-AENAVIKT.mjs} +1 -1
  145. package/dist/{chunk-ID72TK46.mjs → chunk-BXF4AMHY.mjs} +1 -1
  146. package/dist/{chunk-SOA2Z4RB.mjs → chunk-C43HRKXH.mjs} +1 -1
  147. package/dist/{chunk-TZDGAP5N.mjs → chunk-CF27NBXO.mjs} +11 -6
  148. package/dist/{chunk-SXLKNTA4.mjs → chunk-DF7JA72E.mjs} +1 -1
  149. package/dist/{chunk-AJRVDP2H.mjs → chunk-E5UKLSJZ.mjs} +3 -3
  150. package/dist/{chunk-MBMXYJJV.mjs → chunk-E7NEHHXV.mjs} +7 -3
  151. package/dist/{chunk-VKID2D2I.mjs → chunk-EDLCGYIO.mjs} +13 -8
  152. package/dist/{chunk-BUMAMSTZ.mjs → chunk-ELGEOM7I.mjs} +1 -1
  153. package/dist/{chunk-DYT7BG5I.mjs → chunk-F3YTWO3T.mjs} +1 -1
  154. package/dist/{chunk-VF2ATYN3.mjs → chunk-GH67YXG6.mjs} +1 -1
  155. package/dist/{chunk-WJLKJMKR.mjs → chunk-GUTDFUNF.mjs} +4 -4
  156. package/dist/{chunk-6SECQ2ZF.mjs → chunk-HC4VVCWY.mjs} +2 -2
  157. package/dist/{chunk-A3A6KNQN.mjs → chunk-HEDQPK4I.mjs} +1 -1
  158. package/dist/{chunk-GQYFLP3D.mjs → chunk-IVSRW4HS.mjs} +1 -1
  159. package/dist/{chunk-KOO4WITD.mjs → chunk-KSUWPU2F.mjs} +1 -1
  160. package/dist/{chunk-WBOOUHSS.mjs → chunk-LIS6I5UP.mjs} +1 -1
  161. package/dist/{chunk-X4G6APW6.mjs → chunk-LNPKGWBG.mjs} +1 -1
  162. package/dist/{chunk-T2KCAHOS.mjs → chunk-LOBLCFMN.mjs} +1 -1
  163. package/dist/{chunk-ELXBDILQ.mjs → chunk-LPV4NJJK.mjs} +2 -2
  164. package/dist/{chunk-Y2NS74WS.mjs → chunk-M3C7XM2M.mjs} +53 -99
  165. package/dist/{chunk-BRKYVJVV.mjs → chunk-MEPSKGBO.mjs} +1 -1
  166. package/dist/{chunk-TBNZHU6C.mjs → chunk-MVMGPZN6.mjs} +2 -2
  167. package/dist/{chunk-YJ7I257J.mjs → chunk-NHDI3VQB.mjs} +15 -1
  168. package/dist/{chunk-Z6SFHN6T.mjs → chunk-NJG7DHVF.mjs} +1 -1
  169. package/dist/{chunk-RYZC432S.mjs → chunk-NLZY4TXU.mjs} +1 -1
  170. package/dist/{chunk-ZZ2R6KZ3.mjs → chunk-OLVJFKXS.mjs} +1 -1
  171. package/dist/{chunk-AJ7ZDNBT.mjs → chunk-QDAZGZUF.mjs} +4 -3
  172. package/dist/{chunk-JT7HKXRB.mjs → chunk-QOLWA2PW.mjs} +1 -1
  173. package/dist/{chunk-WYEUNUTP.mjs → chunk-QXDGGOLC.mjs} +38 -25
  174. package/dist/{chunk-JMOZEC77.mjs → chunk-RJNLAH76.mjs} +1 -1
  175. package/dist/{chunk-WF2XDFRK.mjs → chunk-RMRS44MQ.mjs} +1 -1
  176. package/dist/chunk-SAWUXP3A.mjs +1114 -0
  177. package/dist/{chunk-OB4JUQ3O.mjs → chunk-TS7DGUIR.mjs} +1 -1
  178. package/dist/{chunk-AV4EMIRH.mjs → chunk-UBUXUMER.mjs} +1 -1
  179. package/dist/{chunk-IRRY3CRZ.mjs → chunk-ULGNQPNE.mjs} +1 -1
  180. package/dist/{chunk-7LWRKMF5.mjs → chunk-UNNRUJTM.mjs} +1 -1
  181. package/dist/{chunk-TB6SD2FT.mjs → chunk-UQ4742ET.mjs} +1 -1
  182. package/dist/{chunk-MX6HRKMI.mjs → chunk-VJBUCITV.mjs} +1 -1
  183. package/dist/{chunk-2UYENBLV.mjs → chunk-YMYIEVZP.mjs} +1 -1
  184. package/dist/{chunk-SOYNZDVY.mjs → chunk-YTXRIXNZ.mjs} +8 -1
  185. package/dist/{chunk-YFZ3ELX5.mjs → chunk-ZIMY2QUM.mjs} +2 -2
  186. package/dist/{chunk-Z4VHZ7B5.mjs → chunk-ZR6HSEAB.mjs} +1 -1
  187. package/dist/fonts.d.mts +1 -7
  188. package/dist/fonts.d.ts +1 -7
  189. package/dist/fonts.js +0 -2
  190. package/dist/fonts.mjs +1 -2
  191. package/dist/{index-wt-orHUi.d.ts → index-CY34hxPN.d.mts} +1 -0
  192. package/dist/{index-wt-orHUi.d.mts → index-CY34hxPN.d.ts} +1 -0
  193. package/dist/index.d.mts +7 -3
  194. package/dist/index.d.ts +7 -3
  195. package/dist/index.js +1517 -761
  196. package/dist/index.mjs +54 -52
  197. package/package.json +3 -3
  198. package/src/components/Accordion/Accordion.tsx +20 -0
  199. package/src/components/Button/Button.tsx +29 -26
  200. package/src/components/ConfirmDialog/ConfirmDialog.tsx +47 -31
  201. package/src/components/CurrencyInput/CurrencyInput.tsx +4 -7
  202. package/src/components/IconPicker/IconPicker.tsx +124 -112
  203. package/src/components/ImageUpload/ImageUpload.tsx +10 -3
  204. package/src/components/ListItem/ListItem.tsx +43 -28
  205. package/src/components/Pressable/Pressable.tsx +20 -8
  206. package/src/components/SelectableCard/SelectableCard.tsx +304 -0
  207. package/src/components/SelectableCard/index.ts +1 -0
  208. package/src/components/Sheet/Sheet.tsx +72 -173
  209. package/src/components/Skeleton/Skeleton.tsx +5 -2
  210. package/src/components/Stats/Stats.tsx +254 -0
  211. package/src/components/Stats/index.ts +2 -0
  212. package/src/components/Text/Text.tsx +4 -2
  213. package/src/fonts.ts +0 -7
  214. package/src/index.ts +5 -0
  215. package/src/theme/colorUtils.ts +9 -0
  216. package/src/theme/colors.ts +7 -0
  217. package/src/theme/types.ts +4 -1
  218. package/src/utils/curatedIcons.ts +698 -135
  219. package/src/utils/fontGuard.ts +2 -1
  220. package/dist/chunk-53Z3NYGE.mjs +0 -742
package/dist/Sheet.d.ts CHANGED
@@ -18,72 +18,30 @@ interface SheetProps {
18
18
  open: boolean;
19
19
  onClose: () => void;
20
20
  title?: string;
21
- /** Secondary text below title. */
22
21
  subtitle?: string;
23
- /** @deprecated Use `subtitle` instead. */
24
- description?: string;
25
- /** Show an X close button in the header. */
26
22
  showCloseButton?: boolean;
27
23
  children?: React.ReactNode;
28
- /** Style for the inner content container. */
29
24
  style?: ViewStyle;
30
- /** Style for the content wrapper (outside the scroll container). */
31
25
  contentStyle?: ViewStyle;
32
- /** Render children inside BottomSheetScrollView. */
26
+ /** Render children inside BottomSheetScrollView instead of BottomSheetView. */
33
27
  scrollable?: boolean;
34
- /** Cap sheet height (dp). Children scroll when content exceeds this value. */
28
+ /** Cap sheet height (dp). Content scrolls when exceeding this value. Requires `scrollable`. */
35
29
  maxHeight?: number;
36
- /**
37
- * Keyboard behavior — how the sheet responds to keyboard appearance.
38
- * - 'interactive': offset sheet by keyboard size (default, works on both platforms)
39
- * - 'fillParent': extend sheet to fill parent view (can cause restore issues with dynamic sizing)
40
- * - 'extend': extend sheet to maximum snap point
41
- *
42
- * Default: 'interactive' on both platforms.
43
- */
44
30
  keyboardBehavior?: 'extend' | 'fillParent' | 'interactive';
45
- /**
46
- * Keyboard blur behavior — what happens when keyboard dismisses.
47
- * - 'none': do nothing
48
- * - 'restore': restore sheet to previous position (default)
49
- */
50
31
  keyboardBlurBehavior?: 'none' | 'restore';
51
- /**
52
- * Blur keyboard when user starts dragging the sheet down.
53
- * Default: true (recommended for better UX)
54
- */
55
32
  enableBlurKeyboardOnGesture?: boolean;
56
- /**
57
- * Android-only: defines keyboard input mode.
58
- * - 'adjustPan': pan the sheet content (default, fixes restore issues with dynamic sizing)
59
- * - 'adjustResize': resize the sheet container (can cause transparent gap on dismiss)
60
- */
61
33
  android_keyboardInputMode?: 'adjustPan' | 'adjustResize';
62
- /** Sticky footer rendered below the scroll area. */
63
34
  footer?: React.ReactNode;
64
35
  /**
65
- * Array of snap points for the sheet (e.g., ['50%', '85%'] or [200, 500]).
36
+ * Array of snap points (e.g., ['50%', '85%'] or [200, 500]).
66
37
  * When provided, disables enableDynamicSizing.
67
- * When omitted, sheet uses dynamic sizing (auto-fits content).
68
38
  */
69
39
  snapPoints?: (string | number)[];
70
- /**
71
- * When true, render as a centered modal dialog on wide screens (width ≥
72
- * `BREAKPOINTS.wide`) instead of a bottom sheet. On narrow screens it stays a
73
- * bottom sheet. Use for store/category/picker dialogs that should feel native
74
- * on tablets and web.
75
- *
76
- * Note: the centered-dialog path uses a plain RN `Modal`, so `SheetTextInput`
77
- * is not required there — use a regular `TextInput`.
78
- */
79
- responsive?: boolean;
80
- /** Max width of the centered dialog (dp). Only applies when `responsive`. Defaults to 480. */
81
- dialogMaxWidth?: number;
82
40
  }
83
41
  declare function SheetHeader({ children, style }: SheetHeaderProps): React.JSX.Element;
84
42
  declare function SheetContent({ children, style }: SheetContentProps): React.JSX.Element;
85
43
  declare function SheetFooter({ children, style }: SheetFooterProps): React.JSX.Element;
86
- declare function Sheet({ open, onClose, title, subtitle, description, showCloseButton, children, style, contentStyle, scrollable, maxHeight, keyboardBehavior, keyboardBlurBehavior, enableBlurKeyboardOnGesture, android_keyboardInputMode, footer, snapPoints, responsive, dialogMaxWidth, }: SheetProps): React.JSX.Element;
44
+ declare function Sheet({ open, onClose, title, subtitle, showCloseButton, children, style, contentStyle, scrollable, maxHeight, keyboardBehavior, keyboardBlurBehavior, enableBlurKeyboardOnGesture, android_keyboardInputMode, footer, snapPoints, }: SheetProps): React.JSX.Element;
87
45
  declare namespace Sheet {
88
46
  var Header: typeof SheetHeader;
89
47
  var Content: typeof SheetContent;
package/dist/Sheet.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var React2 = require('react');
4
4
  var reactNative = require('react-native');
5
- var BottomSheet = require('@gorhom/bottom-sheet');
5
+ var bottomSheet = require('@gorhom/bottom-sheet');
6
6
  var reactNativeSafeAreaContext = require('react-native-safe-area-context');
7
7
  var vectorIcons = require('@expo/vector-icons');
8
8
  var reactNativeSizeMatters = require('react-native-size-matters');
@@ -10,7 +10,6 @@ var reactNativeSizeMatters = require('react-native-size-matters');
10
10
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
11
 
12
12
  var React2__default = /*#__PURE__*/_interopDefault(React2);
13
- var BottomSheet__default = /*#__PURE__*/_interopDefault(BottomSheet);
14
13
 
15
14
  var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
16
15
  get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
@@ -152,6 +151,7 @@ function deriveColors(t, scheme) {
152
151
  const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
153
152
  const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
154
153
  const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
154
+ const skeleton = dark ? lighten(bg, -0.1) : darken(bg, 0.1);
155
155
  const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
156
156
  const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
157
157
  const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
@@ -164,6 +164,7 @@ function deriveColors(t, scheme) {
164
164
  foregroundMuted,
165
165
  surface,
166
166
  surfaceStrong,
167
+ skeleton,
167
168
  destructiveTint,
168
169
  destructiveBorder,
169
170
  successTint,
@@ -197,26 +198,7 @@ var vs = isWeb ? (n) => n : reactNativeSizeMatters.verticalScale;
197
198
  var ms = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateScale;
198
199
  var mvs = isWeb ? (n, _factor) => n : reactNativeSizeMatters.moderateVerticalScale;
199
200
 
200
- // src/tokens.ts
201
- var RADIUS = {
202
- lg: 20};
203
- var SHADOWS = {
204
- xl: {
205
- shadowColor: "#000",
206
- shadowOffset: { width: 0, height: 12 },
207
- shadowOpacity: 0.24,
208
- shadowRadius: 24,
209
- elevation: 18
210
- }
211
- };
212
- var BREAKPOINTS = {
213
- wide: 700
214
- };
215
-
216
201
  // src/components/Sheet/Sheet.tsx
217
- var SCREEN_HEIGHT = reactNative.Dimensions.get("window").height;
218
- var DEFAULT_MAX_HEIGHT = SCREEN_HEIGHT * 0.85;
219
- var isAndroid = reactNative.Platform.OS === "android";
220
202
  function SheetHeader({ children, style }) {
221
203
  return /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: [styles.header, style] }, children);
222
204
  }
@@ -232,45 +214,51 @@ function Sheet({
232
214
  onClose,
233
215
  title,
234
216
  subtitle,
235
- description,
236
217
  showCloseButton = false,
237
218
  children,
238
219
  style,
239
220
  contentStyle,
240
- scrollable,
221
+ scrollable = false,
241
222
  maxHeight,
242
- keyboardBehavior,
223
+ keyboardBehavior = "interactive",
243
224
  keyboardBlurBehavior = "restore",
244
225
  enableBlurKeyboardOnGesture = true,
245
226
  android_keyboardInputMode = "adjustPan",
246
227
  footer,
247
- snapPoints,
248
- responsive = false,
249
- dialogMaxWidth = 480
228
+ snapPoints
250
229
  }) {
251
230
  const { colors } = useTheme();
252
231
  const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
253
- const { width: windowWidth } = reactNative.useWindowDimensions();
254
232
  const ref = React2.useRef(null);
255
- const asDialog = responsive && windowWidth >= BREAKPOINTS.wide;
256
- const effectiveKeyboardBehavior = keyboardBehavior ?? "interactive";
233
+ const wasOpened = React2.useRef(false);
234
+ const isPresentedRef = React2.useRef(false);
235
+ const name = React2.useId();
236
+ const handleDismiss = React2.useCallback(() => {
237
+ isPresentedRef.current = false;
238
+ onClose?.();
239
+ }, [onClose]);
257
240
  React2.useEffect(() => {
258
- if (open) {
241
+ if (open && !isPresentedRef.current) {
259
242
  impactMedium();
260
- ref.current?.snapToIndex(0);
261
- } else {
262
- ref.current?.close();
243
+ ref.current?.present();
244
+ wasOpened.current = true;
245
+ isPresentedRef.current = true;
246
+ } else if (!open && wasOpened.current && isPresentedRef.current) {
247
+ ref.current?.dismiss();
263
248
  }
264
249
  }, [open]);
265
- const renderBackdrop = React2.useCallback((props) => /* @__PURE__ */ React2__default.default.createElement(
266
- BottomSheet.BottomSheetBackdrop,
267
- {
268
- ...props,
269
- disappearsOnIndex: -1,
270
- appearsOnIndex: 0,
271
- pressBehavior: "close"
272
- }
273
- ), []);
250
+ const renderBackdrop = React2.useCallback(
251
+ (props) => /* @__PURE__ */ React2__default.default.createElement(
252
+ bottomSheet.BottomSheetBackdrop,
253
+ {
254
+ ...props,
255
+ disappearsOnIndex: -1,
256
+ appearsOnIndex: 0,
257
+ pressBehavior: "close"
258
+ }
259
+ ),
260
+ []
261
+ );
274
262
  const childArray = React2__default.default.Children.toArray(children);
275
263
  const customHeader = childArray.find((child) => React2__default.default.isValidElement(child) && child.type === SheetHeader);
276
264
  const customContent = childArray.find((child) => React2__default.default.isValidElement(child) && child.type === SheetContent);
@@ -278,8 +266,7 @@ function Sheet({
278
266
  const filteredChildren = customHeader || customContent || customFooter ? childArray.filter(
279
267
  (child) => !React2__default.default.isValidElement(child) || child.type !== SheetHeader && child.type !== SheetContent && child.type !== SheetFooter
280
268
  ) : children;
281
- const effectiveSubtitle = subtitle ?? description;
282
- const showHeader = !!(title || effectiveSubtitle || showCloseButton) && !customHeader;
269
+ const showHeader = !!(title || subtitle || showCloseButton) && !customHeader;
283
270
  const headerNode = customHeader ? customHeader : showHeader ? /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: [styles.header, { backgroundColor: colors.card }], accessibilityRole: "header" }, /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: styles.headerRow }, title ? /* @__PURE__ */ React2__default.default.createElement(reactNative.Text, { style: [styles.title, { color: colors.foreground }], allowFontScaling: true }, title) : /* @__PURE__ */ React2__default.default.createElement(reactNative.View, { style: { flex: 1 } }), showCloseButton ? /* @__PURE__ */ React2__default.default.createElement(
284
271
  reactNative.TouchableOpacity,
285
272
  {
@@ -292,77 +279,49 @@ function Sheet({
292
279
  hitSlop: { top: 12, bottom: 12, left: 12, right: 12 }
293
280
  },
294
281
  /* @__PURE__ */ React2__default.default.createElement(vectorIcons.AntDesign, { name: "close", size: ms(18), color: colors.foregroundMuted })
295
- ) : null), effectiveSubtitle ? /* @__PURE__ */ React2__default.default.createElement(reactNative.Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, effectiveSubtitle) : null) : null;
282
+ ) : null), subtitle ? /* @__PURE__ */ React2__default.default.createElement(reactNative.Text, { style: [styles.subtitle, { color: colors.foregroundMuted }], allowFontScaling: true }, subtitle) : null) : null;
296
283
  const contentNode = customContent ? customContent : filteredChildren;
297
284
  const effectiveFooter = customFooter ? customFooter : footer;
298
- const renderFooter = React2.useCallback((props) => {
299
- if (!effectiveFooter) return null;
300
- return /* @__PURE__ */ React2__default.default.createElement(BottomSheet.BottomSheetFooter, { ...props }, effectiveFooter);
301
- }, [effectiveFooter]);
302
- if (asDialog) {
303
- return /* @__PURE__ */ React2__default.default.createElement(reactNative.Modal, { visible: open, transparent: true, animationType: "fade", onRequestClose: onClose }, /* @__PURE__ */ React2__default.default.createElement(reactNative.Pressable, { style: styles.dialogBackdrop, onPress: onClose, accessibilityRole: "button", accessibilityLabel: "Close" }, /* @__PURE__ */ React2__default.default.createElement(
304
- reactNative.Pressable,
305
- {
306
- style: [
307
- styles.dialogCard,
308
- { backgroundColor: colors.card, maxWidth: dialogMaxWidth, maxHeight: SCREEN_HEIGHT * 0.85 }
309
- ],
310
- onPress: () => {
311
- }
312
- },
313
- headerNode,
314
- /* @__PURE__ */ React2__default.default.createElement(
315
- reactNative.ScrollView,
316
- {
317
- contentContainerStyle: [styles.dialogContent, style],
318
- style: contentStyle,
319
- showsVerticalScrollIndicator: true,
320
- bounces: false
321
- },
322
- contentNode
323
- ),
324
- effectiveFooter
325
- )));
326
- }
327
- const useScroll = scrollable || !!maxHeight;
328
- const effectiveMaxHeight = maxHeight ?? DEFAULT_MAX_HEIGHT;
285
+ const renderFooter = React2.useCallback(
286
+ (props) => {
287
+ if (!effectiveFooter) return null;
288
+ return /* @__PURE__ */ React2__default.default.createElement(bottomSheet.BottomSheetFooter, { ...props }, effectiveFooter);
289
+ },
290
+ [effectiveFooter]
291
+ );
329
292
  const useDynamicSizing = !snapPoints;
330
293
  return /* @__PURE__ */ React2__default.default.createElement(
331
- BottomSheet__default.default,
294
+ bottomSheet.BottomSheetModal,
332
295
  {
333
296
  ref,
334
- index: -1,
335
- onClose,
297
+ name,
298
+ onDismiss: handleDismiss,
336
299
  enableDynamicSizing: useDynamicSizing,
337
300
  snapPoints,
338
- maxDynamicContentSize: useDynamicSizing ? effectiveMaxHeight : void 0,
301
+ maxDynamicContentSize: useDynamicSizing && maxHeight ? maxHeight : void 0,
339
302
  backdropComponent: renderBackdrop,
340
303
  footerComponent: effectiveFooter ? renderFooter : void 0,
341
- backgroundStyle: [styles.background, { backgroundColor: colors.card }],
342
- handleIndicatorStyle: [styles.handle, { backgroundColor: colors.border }],
304
+ backgroundStyle: { ...styles.background, backgroundColor: colors.card },
305
+ handleIndicatorStyle: { ...styles.handle, backgroundColor: colors.border },
343
306
  enablePanDownToClose: true,
344
307
  topInset: insets.top,
345
- keyboardBehavior: effectiveKeyboardBehavior,
308
+ keyboardBehavior,
346
309
  keyboardBlurBehavior,
347
310
  android_keyboardInputMode,
348
311
  enableBlurKeyboardOnGesture
349
312
  },
350
- useScroll ? /* @__PURE__ */ React2__default.default.createElement(
351
- BottomSheet.BottomSheetScrollView,
313
+ scrollable ? /* @__PURE__ */ React2__default.default.createElement(
314
+ bottomSheet.BottomSheetScrollView,
352
315
  {
353
- contentContainerStyle: [
354
- styles.scrollContent,
355
- style
356
- ],
316
+ contentContainerStyle: [styles.scrollContent, style],
357
317
  style: contentStyle,
358
318
  showsVerticalScrollIndicator: true,
359
- indicatorStyle: "black",
360
- persistentScrollbar: isAndroid,
319
+ bounces: false,
361
320
  stickyHeaderIndices: headerNode ? [0] : void 0
362
321
  },
363
322
  headerNode,
364
323
  contentNode
365
- ) : /* @__PURE__ */ React2__default.default.createElement(BottomSheet.BottomSheetView, { style: [styles.content, contentStyle, style] }, headerNode, contentNode)
324
+ ) : /* @__PURE__ */ React2__default.default.createElement(bottomSheet.BottomSheetView, { style: [styles.content, contentStyle, style] }, headerNode, contentNode)
366
325
  );
367
326
  }
368
327
  Sheet.Header = SheetHeader;
@@ -409,8 +368,7 @@ var styles = reactNative.StyleSheet.create({
409
368
  },
410
369
  scrollContent: {
411
370
  paddingHorizontal: s(16),
412
- paddingBottom: vs(32),
413
- paddingRight: s(16)
371
+ paddingBottom: vs(32)
414
372
  },
415
373
  sheetContent: {
416
374
  gap: vs(16)
@@ -421,33 +379,15 @@ var styles = reactNative.StyleSheet.create({
421
379
  borderTopWidth: 1,
422
380
  flexDirection: "row",
423
381
  gap: s(12)
424
- },
425
- dialogBackdrop: {
426
- flex: 1,
427
- backgroundColor: "rgba(0,0,0,0.5)",
428
- alignItems: "center",
429
- justifyContent: "center",
430
- padding: s(24)
431
- },
432
- dialogCard: {
433
- width: "100%",
434
- borderRadius: RADIUS.lg,
435
- paddingTop: vs(16),
436
- overflow: "hidden",
437
- ...SHADOWS.xl
438
- },
439
- dialogContent: {
440
- paddingHorizontal: s(16),
441
- paddingBottom: vs(16)
442
382
  }
443
383
  });
444
384
 
445
385
  Object.defineProperty(exports, "BottomSheetModalProvider", {
446
386
  enumerable: true,
447
- get: function () { return BottomSheet.BottomSheetModalProvider; }
387
+ get: function () { return bottomSheet.BottomSheetModalProvider; }
448
388
  });
449
389
  Object.defineProperty(exports, "SheetTextInput", {
450
390
  enumerable: true,
451
- get: function () { return BottomSheet.BottomSheetTextInput; }
391
+ get: function () { return bottomSheet.BottomSheetTextInput; }
452
392
  });
453
393
  exports.Sheet = Sheet;
package/dist/Sheet.mjs CHANGED
@@ -1,6 +1,5 @@
1
- export { BottomSheetModalProvider, Sheet, BottomSheetTextInput as SheetTextInput } from './chunk-Y2NS74WS.mjs';
1
+ export { BottomSheetModalProvider, Sheet, BottomSheetTextInput as SheetTextInput } from './chunk-M3C7XM2M.mjs';
2
2
  import './chunk-EJ7ZPXOH.mjs';
3
- import './chunk-QY3X2UYR.mjs';
4
- import './chunk-SOYNZDVY.mjs';
3
+ import './chunk-YTXRIXNZ.mjs';
5
4
  import './chunk-2CE3TQVY.mjs';
6
5
  import './chunk-Y6FXYEAI.mjs';
@@ -163,6 +163,7 @@ function deriveColors(t, scheme) {
163
163
  const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
164
164
  const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
165
165
  const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
166
+ const skeleton = dark ? lighten(bg, -0.1) : darken(bg, 0.1);
166
167
  const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
167
168
  const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
168
169
  const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
@@ -175,6 +176,7 @@ function deriveColors(t, scheme) {
175
176
  foregroundMuted,
176
177
  surface,
177
178
  surfaceStrong,
179
+ skeleton,
178
180
  destructiveTint,
179
181
  destructiveBorder,
180
182
  successTint,
@@ -1,9 +1,9 @@
1
- export { SheetSelect } from './chunk-KOO4WITD.mjs';
1
+ export { SheetSelect } from './chunk-KSUWPU2F.mjs';
2
2
  import './chunk-3DKJ2GIC.mjs';
3
3
  import './chunk-EJ7ZPXOH.mjs';
4
4
  import './chunk-DVK4G2GT.mjs';
5
5
  import './chunk-QY3X2UYR.mjs';
6
6
  import './chunk-KA7LTET3.mjs';
7
- import './chunk-SOYNZDVY.mjs';
7
+ import './chunk-YTXRIXNZ.mjs';
8
8
  import './chunk-2CE3TQVY.mjs';
9
9
  import './chunk-Y6FXYEAI.mjs';
@@ -10,9 +10,11 @@ interface SkeletonProps {
10
10
  preset?: SkeletonPreset;
11
11
  /** Only used with `preset='circle'` — overrides the diameter. Defaults to 40. */
12
12
  diameter?: number;
13
+ /** Override the skeleton background color. Defaults to `colors.skeleton`. */
14
+ backgroundColor?: string;
13
15
  style?: ViewStyle;
14
16
  }
15
- declare function Skeleton({ width, height, borderRadius, preset, diameter, style, }: SkeletonProps): React.JSX.Element;
17
+ declare function Skeleton({ width, height, borderRadius, preset, diameter, backgroundColor, style, }: SkeletonProps): React.JSX.Element;
16
18
  declare namespace Skeleton {
17
19
  var MediaCard: typeof MediaCardSkeleton;
18
20
  var ListItem: typeof ListItemSkeleton;
@@ -10,9 +10,11 @@ interface SkeletonProps {
10
10
  preset?: SkeletonPreset;
11
11
  /** Only used with `preset='circle'` — overrides the diameter. Defaults to 40. */
12
12
  diameter?: number;
13
+ /** Override the skeleton background color. Defaults to `colors.skeleton`. */
14
+ backgroundColor?: string;
13
15
  style?: ViewStyle;
14
16
  }
15
- declare function Skeleton({ width, height, borderRadius, preset, diameter, style, }: SkeletonProps): React.JSX.Element;
17
+ declare function Skeleton({ width, height, borderRadius, preset, diameter, backgroundColor, style, }: SkeletonProps): React.JSX.Element;
16
18
  declare namespace Skeleton {
17
19
  var MediaCard: typeof MediaCardSkeleton;
18
20
  var ListItem: typeof ListItemSkeleton;
package/dist/Skeleton.js CHANGED
@@ -92,6 +92,7 @@ function deriveColors(t, scheme) {
92
92
  const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
93
93
  const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
94
94
  const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
95
+ const skeleton = dark ? lighten(bg, -0.1) : darken(bg, 0.1);
95
96
  const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
96
97
  const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
97
98
  const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
@@ -104,6 +105,7 @@ function deriveColors(t, scheme) {
104
105
  foregroundMuted,
105
106
  surface,
106
107
  surfaceStrong,
108
+ skeleton,
107
109
  destructiveTint,
108
110
  destructiveBorder,
109
111
  successTint,
@@ -159,12 +161,13 @@ function Skeleton({
159
161
  borderRadius = 6,
160
162
  preset = "base",
161
163
  diameter = 40,
164
+ backgroundColor,
162
165
  style
163
166
  }) {
164
167
  const { colors, colorScheme } = useTheme();
165
168
  const shimmer = Animated.useSharedValue(0);
166
169
  const [containerWidth, setContainerWidth] = React2.useState(300);
167
- const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(255,255,255,0.7)";
170
+ const shimmerHighlight = colorScheme === "dark" ? "rgba(255,255,255,0.08)" : "rgba(0,0,0,0.07)";
168
171
  React2.useEffect(() => {
169
172
  shimmer.value = Animated.withRepeat(
170
173
  Animated.withTiming(1, { duration: TIMINGS.shimmer.duration, easing: Animated.Easing.linear }),
@@ -183,7 +186,7 @@ function Skeleton({
183
186
  {
184
187
  style: [
185
188
  styles.base,
186
- { width: resolvedWidth, height: resolvedHeight, borderRadius: resolvedRadius, backgroundColor: colors.surface },
189
+ { width: resolvedWidth, height: resolvedHeight, borderRadius: resolvedRadius, backgroundColor: backgroundColor ?? colors.skeleton },
187
190
  style
188
191
  ],
189
192
  onLayout: (e) => setContainerWidth(e.nativeEvent.layout.width),
package/dist/Skeleton.mjs CHANGED
@@ -1,6 +1,6 @@
1
- export { Skeleton } from './chunk-AJ7ZDNBT.mjs';
1
+ export { Skeleton } from './chunk-QDAZGZUF.mjs';
2
2
  import './chunk-DVK4G2GT.mjs';
3
3
  import './chunk-QY3X2UYR.mjs';
4
- import './chunk-SOYNZDVY.mjs';
4
+ import './chunk-YTXRIXNZ.mjs';
5
5
  import './chunk-2CE3TQVY.mjs';
6
6
  import './chunk-Y6FXYEAI.mjs';
package/dist/Slider.js CHANGED
@@ -150,6 +150,7 @@ function deriveColors(t, scheme) {
150
150
  const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
151
151
  const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
152
152
  const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
153
+ const skeleton = dark ? lighten(bg, -0.1) : darken(bg, 0.1);
153
154
  const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
154
155
  const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
155
156
  const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
@@ -162,6 +163,7 @@ function deriveColors(t, scheme) {
162
163
  foregroundMuted,
163
164
  surface,
164
165
  surfaceStrong,
166
+ skeleton,
165
167
  destructiveTint,
166
168
  destructiveBorder,
167
169
  successTint,
package/dist/Slider.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { Slider } from './chunk-JMOZEC77.mjs';
1
+ export { Slider } from './chunk-RJNLAH76.mjs';
2
2
  import './chunk-EJ7ZPXOH.mjs';
3
- import './chunk-SOYNZDVY.mjs';
3
+ import './chunk-YTXRIXNZ.mjs';
4
4
  import './chunk-2CE3TQVY.mjs';
5
5
  import './chunk-Y6FXYEAI.mjs';
package/dist/Spinner.js CHANGED
@@ -89,6 +89,7 @@ function deriveColors(t, scheme) {
89
89
  const foregroundMuted = mixWithBackground(t.foreground, bg, 0.62);
90
90
  const surface = dark ? lighten(bg, -0.06) : darken(bg, 0.04);
91
91
  const surfaceStrong = dark ? lighten(bg, -0.12) : darken(bg, 0.08);
92
+ const skeleton = dark ? lighten(bg, -0.1) : darken(bg, 0.1);
92
93
  const destructiveTint = dark ? withAlphaOnDark(t.destructive, 0.15, bg) : withAlphaOnWhite(t.destructive, 0.08);
93
94
  const destructiveBorder = dark ? withAlphaOnDark(t.destructive, 0.45, bg) : withAlphaOnWhite(t.destructive, 0.3);
94
95
  const successTint = dark ? withAlphaOnDark(t.success, 0.15, bg) : withAlphaOnWhite(t.success, 0.08);
@@ -101,6 +102,7 @@ function deriveColors(t, scheme) {
101
102
  foregroundMuted,
102
103
  surface,
103
104
  surfaceStrong,
105
+ skeleton,
104
106
  destructiveTint,
105
107
  destructiveBorder,
106
108
  successTint,
package/dist/Spinner.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { Spinner } from './chunk-WBOOUHSS.mjs';
2
- import './chunk-SOYNZDVY.mjs';
1
+ export { Spinner } from './chunk-LIS6I5UP.mjs';
2
+ import './chunk-YTXRIXNZ.mjs';
3
3
  import './chunk-2CE3TQVY.mjs';
4
4
  import './chunk-Y6FXYEAI.mjs';
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { ViewStyle } from 'react-native';
3
+
4
+ type StatsVariant = 'elevated' | 'outlined' | 'filled';
5
+ type StatsSize = 'default' | 'compact';
6
+ interface StatsProps {
7
+ value: string;
8
+ label: string;
9
+ description?: string;
10
+ icon?: React.ReactNode;
11
+ iconName?: string;
12
+ iconColor?: string;
13
+ variant?: StatsVariant;
14
+ /** `'compact'` reduces everything proportionally for tight grids. */
15
+ size?: StatsSize;
16
+ onPress?: () => void;
17
+ style?: ViewStyle;
18
+ accessibilityLabel?: string;
19
+ }
20
+ interface StatsGroupProps {
21
+ children: React.ReactNode;
22
+ gap?: number;
23
+ style?: ViewStyle;
24
+ }
25
+ declare function StatsComponent({ value, label, description, icon, iconName, iconColor, variant, size, onPress, style, accessibilityLabel, }: StatsProps): React.JSX.Element;
26
+ declare function StatsGroup({ children, gap, style }: StatsGroupProps): React.JSX.Element;
27
+ declare const Stats: React.NamedExoticComponent<StatsProps> & {
28
+ readonly type: typeof StatsComponent;
29
+ } & {
30
+ Group: typeof StatsGroup;
31
+ };
32
+
33
+ export { Stats, type StatsGroupProps, type StatsProps, type StatsVariant };
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ import { ViewStyle } from 'react-native';
3
+
4
+ type StatsVariant = 'elevated' | 'outlined' | 'filled';
5
+ type StatsSize = 'default' | 'compact';
6
+ interface StatsProps {
7
+ value: string;
8
+ label: string;
9
+ description?: string;
10
+ icon?: React.ReactNode;
11
+ iconName?: string;
12
+ iconColor?: string;
13
+ variant?: StatsVariant;
14
+ /** `'compact'` reduces everything proportionally for tight grids. */
15
+ size?: StatsSize;
16
+ onPress?: () => void;
17
+ style?: ViewStyle;
18
+ accessibilityLabel?: string;
19
+ }
20
+ interface StatsGroupProps {
21
+ children: React.ReactNode;
22
+ gap?: number;
23
+ style?: ViewStyle;
24
+ }
25
+ declare function StatsComponent({ value, label, description, icon, iconName, iconColor, variant, size, onPress, style, accessibilityLabel, }: StatsProps): React.JSX.Element;
26
+ declare function StatsGroup({ children, gap, style }: StatsGroupProps): React.JSX.Element;
27
+ declare const Stats: React.NamedExoticComponent<StatsProps> & {
28
+ readonly type: typeof StatsComponent;
29
+ } & {
30
+ Group: typeof StatsGroup;
31
+ };
32
+
33
+ export { Stats, type StatsGroupProps, type StatsProps, type StatsVariant };