@yahoo/uds-mobile 2.3.3 → 2.4.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 (198) hide show
  1. package/android/build.gradle +39 -0
  2. package/android/src/main/AndroidManifest.xml +1 -0
  3. package/android/src/main/java/com/yahoo/uds/screencornerradius/UDSScreenCornerRadiusModule.kt +44 -0
  4. package/dist/bin/generateTheme.mjs +10 -0
  5. package/dist/bin/mobile/scripts/utils/configToRNMappings.mjs +4 -1
  6. package/dist/components/AndroidBackHandler.cjs +31 -0
  7. package/dist/components/AndroidBackHandler.d.cts +21 -0
  8. package/dist/components/AndroidBackHandler.d.cts.map +1 -0
  9. package/dist/components/AndroidBackHandler.d.ts +21 -0
  10. package/dist/components/AndroidBackHandler.d.ts.map +1 -0
  11. package/dist/components/AndroidBackHandler.js +30 -0
  12. package/dist/components/AndroidBackHandler.js.map +1 -0
  13. package/dist/components/Avatar.cjs +1 -1
  14. package/dist/components/Avatar.js +1 -1
  15. package/dist/components/Badge.cjs +1 -1
  16. package/dist/components/Badge.js +1 -1
  17. package/dist/components/BottomSheet/BottomSheet.cjs +336 -0
  18. package/dist/components/BottomSheet/BottomSheet.d.cts +33 -0
  19. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
  20. package/dist/components/BottomSheet/BottomSheet.d.ts +33 -0
  21. package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -0
  22. package/dist/components/BottomSheet/BottomSheet.js +334 -0
  23. package/dist/components/BottomSheet/BottomSheet.js.map +1 -0
  24. package/dist/components/BottomSheet/BottomSheetContent.cjs +65 -0
  25. package/dist/components/BottomSheet/BottomSheetContent.d.cts +22 -0
  26. package/dist/components/BottomSheet/BottomSheetContent.d.cts.map +1 -0
  27. package/dist/components/BottomSheet/BottomSheetContent.d.ts +22 -0
  28. package/dist/components/BottomSheet/BottomSheetContent.d.ts.map +1 -0
  29. package/dist/components/BottomSheet/BottomSheetContent.js +63 -0
  30. package/dist/components/BottomSheet/BottomSheetContent.js.map +1 -0
  31. package/dist/components/BottomSheet/BottomSheetDismiss.cjs +28 -0
  32. package/dist/components/BottomSheet/BottomSheetDismiss.d.cts +25 -0
  33. package/dist/components/BottomSheet/BottomSheetDismiss.d.cts.map +1 -0
  34. package/dist/components/BottomSheet/BottomSheetDismiss.d.ts +25 -0
  35. package/dist/components/BottomSheet/BottomSheetDismiss.d.ts.map +1 -0
  36. package/dist/components/BottomSheet/BottomSheetDismiss.js +27 -0
  37. package/dist/components/BottomSheet/BottomSheetDismiss.js.map +1 -0
  38. package/dist/components/BottomSheet/BottomSheetHandle.cjs +56 -0
  39. package/dist/components/BottomSheet/BottomSheetHandle.d.cts +14 -0
  40. package/dist/components/BottomSheet/BottomSheetHandle.d.cts.map +1 -0
  41. package/dist/components/BottomSheet/BottomSheetHandle.d.ts +14 -0
  42. package/dist/components/BottomSheet/BottomSheetHandle.d.ts.map +1 -0
  43. package/dist/components/BottomSheet/BottomSheetHandle.js +55 -0
  44. package/dist/components/BottomSheet/BottomSheetHandle.js.map +1 -0
  45. package/dist/components/BottomSheet/BottomSheetHeader.cjs +69 -0
  46. package/dist/components/BottomSheet/BottomSheetHeader.d.cts +16 -0
  47. package/dist/components/BottomSheet/BottomSheetHeader.d.cts.map +1 -0
  48. package/dist/components/BottomSheet/BottomSheetHeader.d.ts +16 -0
  49. package/dist/components/BottomSheet/BottomSheetHeader.d.ts.map +1 -0
  50. package/dist/components/BottomSheet/BottomSheetHeader.js +68 -0
  51. package/dist/components/BottomSheet/BottomSheetHeader.js.map +1 -0
  52. package/dist/components/BottomSheet/BottomSheetInternalProvider.cjs +26 -0
  53. package/dist/components/BottomSheet/BottomSheetInternalProvider.d.cts +23 -0
  54. package/dist/components/BottomSheet/BottomSheetInternalProvider.d.cts.map +1 -0
  55. package/dist/components/BottomSheet/BottomSheetInternalProvider.d.ts +23 -0
  56. package/dist/components/BottomSheet/BottomSheetInternalProvider.d.ts.map +1 -0
  57. package/dist/components/BottomSheet/BottomSheetInternalProvider.js +24 -0
  58. package/dist/components/BottomSheet/BottomSheetInternalProvider.js.map +1 -0
  59. package/dist/components/BottomSheet/BottomSheetProvider.cjs +33 -0
  60. package/dist/components/BottomSheet/BottomSheetProvider.d.cts +24 -0
  61. package/dist/components/BottomSheet/BottomSheetProvider.d.cts.map +1 -0
  62. package/dist/components/BottomSheet/BottomSheetProvider.d.ts +24 -0
  63. package/dist/components/BottomSheet/BottomSheetProvider.d.ts.map +1 -0
  64. package/dist/components/BottomSheet/BottomSheetProvider.js +31 -0
  65. package/dist/components/BottomSheet/BottomSheetProvider.js.map +1 -0
  66. package/dist/components/BottomSheet/BottomSheetTrigger.cjs +28 -0
  67. package/dist/components/BottomSheet/BottomSheetTrigger.d.cts +25 -0
  68. package/dist/components/BottomSheet/BottomSheetTrigger.d.cts.map +1 -0
  69. package/dist/components/BottomSheet/BottomSheetTrigger.d.ts +25 -0
  70. package/dist/components/BottomSheet/BottomSheetTrigger.d.ts.map +1 -0
  71. package/dist/components/BottomSheet/BottomSheetTrigger.js +27 -0
  72. package/dist/components/BottomSheet/BottomSheetTrigger.js.map +1 -0
  73. package/dist/components/BottomSheet/index.cjs +19 -0
  74. package/dist/components/BottomSheet/index.d.cts +11 -0
  75. package/dist/components/BottomSheet/index.d.ts +11 -0
  76. package/dist/components/BottomSheet/index.js +11 -0
  77. package/dist/components/BottomSheet/types.cjs +1 -0
  78. package/dist/components/BottomSheet/types.d.cts +173 -0
  79. package/dist/components/BottomSheet/types.d.cts.map +1 -0
  80. package/dist/components/BottomSheet/types.d.ts +173 -0
  81. package/dist/components/BottomSheet/types.d.ts.map +1 -0
  82. package/dist/components/BottomSheet/types.js +1 -0
  83. package/dist/components/BottomSheet/useBottomSheetDrag.cjs +191 -0
  84. package/dist/components/BottomSheet/useBottomSheetDrag.d.cts +69 -0
  85. package/dist/components/BottomSheet/useBottomSheetDrag.d.cts.map +1 -0
  86. package/dist/components/BottomSheet/useBottomSheetDrag.d.ts +69 -0
  87. package/dist/components/BottomSheet/useBottomSheetDrag.d.ts.map +1 -0
  88. package/dist/components/BottomSheet/useBottomSheetDrag.js +190 -0
  89. package/dist/components/BottomSheet/useBottomSheetDrag.js.map +1 -0
  90. package/dist/components/BottomSheet/useBottomSheetScroll.cjs +61 -0
  91. package/dist/components/BottomSheet/useBottomSheetScroll.d.cts +48 -0
  92. package/dist/components/BottomSheet/useBottomSheetScroll.d.cts.map +1 -0
  93. package/dist/components/BottomSheet/useBottomSheetScroll.d.ts +48 -0
  94. package/dist/components/BottomSheet/useBottomSheetScroll.d.ts.map +1 -0
  95. package/dist/components/BottomSheet/useBottomSheetScroll.js +60 -0
  96. package/dist/components/BottomSheet/useBottomSheetScroll.js.map +1 -0
  97. package/dist/components/BottomSheet/useBottomSheetSnapModel.cjs +142 -0
  98. package/dist/components/BottomSheet/useBottomSheetSnapModel.d.cts +79 -0
  99. package/dist/components/BottomSheet/useBottomSheetSnapModel.d.cts.map +1 -0
  100. package/dist/components/BottomSheet/useBottomSheetSnapModel.d.ts +79 -0
  101. package/dist/components/BottomSheet/useBottomSheetSnapModel.d.ts.map +1 -0
  102. package/dist/components/BottomSheet/useBottomSheetSnapModel.js +140 -0
  103. package/dist/components/BottomSheet/useBottomSheetSnapModel.js.map +1 -0
  104. package/dist/components/BottomSheet/useBottomSheetStore.cjs +79 -0
  105. package/dist/components/BottomSheet/useBottomSheetStore.d.cts +45 -0
  106. package/dist/components/BottomSheet/useBottomSheetStore.d.cts.map +1 -0
  107. package/dist/components/BottomSheet/useBottomSheetStore.d.ts +45 -0
  108. package/dist/components/BottomSheet/useBottomSheetStore.d.ts.map +1 -0
  109. package/dist/components/BottomSheet/useBottomSheetStore.js +77 -0
  110. package/dist/components/BottomSheet/useBottomSheetStore.js.map +1 -0
  111. package/dist/components/BottomSheet/useExpansionMargins.cjs +57 -0
  112. package/dist/components/BottomSheet/useExpansionMargins.d.cts +59 -0
  113. package/dist/components/BottomSheet/useExpansionMargins.d.cts.map +1 -0
  114. package/dist/components/BottomSheet/useExpansionMargins.d.ts +59 -0
  115. package/dist/components/BottomSheet/useExpansionMargins.d.ts.map +1 -0
  116. package/dist/components/BottomSheet/useExpansionMargins.js +56 -0
  117. package/dist/components/BottomSheet/useExpansionMargins.js.map +1 -0
  118. package/dist/components/BottomSheet/useKeyboardAvoidance.cjs +53 -0
  119. package/dist/components/BottomSheet/useKeyboardAvoidance.d.cts +31 -0
  120. package/dist/components/BottomSheet/useKeyboardAvoidance.d.cts.map +1 -0
  121. package/dist/components/BottomSheet/useKeyboardAvoidance.d.ts +31 -0
  122. package/dist/components/BottomSheet/useKeyboardAvoidance.d.ts.map +1 -0
  123. package/dist/components/BottomSheet/useKeyboardAvoidance.js +52 -0
  124. package/dist/components/BottomSheet/useKeyboardAvoidance.js.map +1 -0
  125. package/dist/components/BottomSheet/utils.cjs +77 -0
  126. package/dist/components/BottomSheet/utils.d.cts +50 -0
  127. package/dist/components/BottomSheet/utils.d.cts.map +1 -0
  128. package/dist/components/BottomSheet/utils.d.ts +50 -0
  129. package/dist/components/BottomSheet/utils.d.ts.map +1 -0
  130. package/dist/components/BottomSheet/utils.js +72 -0
  131. package/dist/components/BottomSheet/utils.js.map +1 -0
  132. package/dist/components/Box.cjs +1 -1
  133. package/dist/components/Box.js +1 -1
  134. package/dist/components/Button.cjs +1 -1
  135. package/dist/components/Button.js +1 -1
  136. package/dist/components/Checkbox.cjs +1 -1
  137. package/dist/components/Checkbox.js +1 -1
  138. package/dist/components/Chip.cjs +1 -1
  139. package/dist/components/Chip.js +1 -1
  140. package/dist/components/Icon.cjs +1 -1
  141. package/dist/components/Icon.js +1 -1
  142. package/dist/components/IconButton.cjs +3 -3
  143. package/dist/components/IconButton.js +3 -3
  144. package/dist/components/IconButton.js.map +1 -1
  145. package/dist/components/Image.cjs +1 -1
  146. package/dist/components/Image.js +1 -1
  147. package/dist/components/Input.cjs +1 -1
  148. package/dist/components/Input.js +1 -1
  149. package/dist/components/Link.cjs +1 -1
  150. package/dist/components/Link.js +1 -1
  151. package/dist/components/Pressable.cjs +1 -1
  152. package/dist/components/Pressable.js +1 -1
  153. package/dist/components/Radio.cjs +1 -1
  154. package/dist/components/Radio.js +1 -1
  155. package/dist/components/Screen.cjs +1 -1
  156. package/dist/components/Screen.js +1 -1
  157. package/dist/components/Scrim.cjs +73 -0
  158. package/dist/components/Scrim.d.cts +43 -0
  159. package/dist/components/Scrim.d.cts.map +1 -0
  160. package/dist/components/Scrim.d.ts +43 -0
  161. package/dist/components/Scrim.d.ts.map +1 -0
  162. package/dist/components/Scrim.js +71 -0
  163. package/dist/components/Scrim.js.map +1 -0
  164. package/dist/components/Switch.cjs +1 -1
  165. package/dist/components/Switch.js +1 -1
  166. package/dist/components/Text.cjs +1 -1
  167. package/dist/components/Text.js +1 -1
  168. package/dist/components/UDSProvider.cjs +38 -0
  169. package/dist/components/UDSProvider.d.cts +30 -0
  170. package/dist/components/UDSProvider.d.cts.map +1 -0
  171. package/dist/components/UDSProvider.d.ts +30 -0
  172. package/dist/components/UDSProvider.d.ts.map +1 -0
  173. package/dist/components/UDSProvider.js +37 -0
  174. package/dist/components/UDSProvider.js.map +1 -0
  175. package/dist/native/UDSScreenCornerRadiusModule.cjs +30 -0
  176. package/dist/native/UDSScreenCornerRadiusModule.d.cts +12 -0
  177. package/dist/native/UDSScreenCornerRadiusModule.d.cts.map +1 -0
  178. package/dist/native/UDSScreenCornerRadiusModule.d.ts +12 -0
  179. package/dist/native/UDSScreenCornerRadiusModule.d.ts.map +1 -0
  180. package/dist/native/UDSScreenCornerRadiusModule.js +17 -0
  181. package/dist/native/UDSScreenCornerRadiusModule.js.map +1 -0
  182. package/dist/portal.cjs +81 -0
  183. package/dist/portal.d.cts +18 -0
  184. package/dist/portal.d.cts.map +1 -0
  185. package/dist/portal.d.ts +18 -0
  186. package/dist/portal.d.ts.map +1 -0
  187. package/dist/portal.js +79 -0
  188. package/dist/portal.js.map +1 -0
  189. package/dist/types/dist/index.d.cts.map +1 -1
  190. package/dist/types/dist/index.d.ts.map +1 -1
  191. package/expo-module.config.json +9 -0
  192. package/generated/styles.cjs +10 -0
  193. package/generated/styles.d.ts +15 -2
  194. package/generated/styles.mjs +10 -0
  195. package/generated/unistyles.d.ts +21 -0
  196. package/ios/UDSMobile.podspec +25 -0
  197. package/ios/UDSScreenCornerRadiusModule.swift +218 -0
  198. package/package.json +40 -1
@@ -0,0 +1,52 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ import { useEffect } from "react";
3
+ import { Keyboard, Platform } from "react-native";
4
+ import { withTiming } from "react-native-reanimated";
5
+
6
+ //#region src/components/BottomSheet/useKeyboardAvoidance.ts
7
+ /** Duration (ms) for the keyboard offset animation. */
8
+ const KEYBOARD_ANIMATION_DURATION = 250;
9
+ /**
10
+ * Offsets the sheet's `translateY` when the software keyboard opens or closes.
11
+ *
12
+ * - **iOS**: Listens to `keyboardWillShow` / `keyboardWillHide` for smoother,
13
+ * synchronous animation with the keyboard.
14
+ * - **Android**: Listens to `keyboardDidShow` / `keyboardDidHide` (will-events
15
+ * are not available on Android).
16
+ *
17
+ * Captures `translateY` before the offset and restores it when the keyboard hides.
18
+ */
19
+ function useKeyboardAvoidance({ isOpen, translateY, isAnimating }) {
20
+ useEffect(() => {
21
+ if (!isOpen) return;
22
+ let preKeyboardTranslateY = null;
23
+ const showEvent = Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow";
24
+ const hideEvent = Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide";
25
+ const showSub = Keyboard.addListener(showEvent, (event) => {
26
+ const keyboardHeight = event.endCoordinates.height;
27
+ if (keyboardHeight <= 0) return;
28
+ if (preKeyboardTranslateY === null) preKeyboardTranslateY = translateY.value;
29
+ isAnimating.value = false;
30
+ const target = preKeyboardTranslateY - keyboardHeight;
31
+ translateY.value = withTiming(Math.max(0, target), { duration: KEYBOARD_ANIMATION_DURATION });
32
+ });
33
+ const hideSub = Keyboard.addListener(hideEvent, () => {
34
+ if (preKeyboardTranslateY !== null) {
35
+ translateY.value = withTiming(preKeyboardTranslateY, { duration: KEYBOARD_ANIMATION_DURATION });
36
+ preKeyboardTranslateY = null;
37
+ }
38
+ });
39
+ return () => {
40
+ showSub.remove();
41
+ hideSub.remove();
42
+ };
43
+ }, [
44
+ isOpen,
45
+ translateY,
46
+ isAnimating
47
+ ]);
48
+ }
49
+
50
+ //#endregion
51
+ export { useKeyboardAvoidance };
52
+ //# sourceMappingURL=useKeyboardAvoidance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useKeyboardAvoidance.js","names":[],"sources":["../../../src/components/BottomSheet/useKeyboardAvoidance.ts"],"sourcesContent":["import { useEffect } from 'react';\nimport { Keyboard, Platform } from 'react-native';\nimport type { SharedValue } from 'react-native-reanimated';\nimport { withTiming } from 'react-native-reanimated';\n\n/** Duration (ms) for the keyboard offset animation. */\nconst KEYBOARD_ANIMATION_DURATION = 250;\n\n/** @internal */\ninterface UseKeyboardAvoidanceParams {\n /** Whether the sheet is currently open. */\n isOpen: boolean;\n /** The sheet's animated translateY shared value. */\n translateY: SharedValue<number>;\n /** Whether the sheet is currently animating (snap/close spring). */\n isAnimating: SharedValue<boolean>;\n}\n\n/**\n * Offsets the sheet's `translateY` when the software keyboard opens or closes.\n *\n * - **iOS**: Listens to `keyboardWillShow` / `keyboardWillHide` for smoother,\n * synchronous animation with the keyboard.\n * - **Android**: Listens to `keyboardDidShow` / `keyboardDidHide` (will-events\n * are not available on Android).\n *\n * Captures `translateY` before the offset and restores it when the keyboard hides.\n */\nfunction useKeyboardAvoidance({ isOpen, translateY, isAnimating }: UseKeyboardAvoidanceParams) {\n useEffect(() => {\n if (!isOpen) {\n return;\n }\n\n // Store the translateY before keyboard offset so we can restore it.\n let preKeyboardTranslateY: number | null = null;\n\n const showEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const hideEvent = Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide';\n\n const showSub = Keyboard.addListener(showEvent, (event) => {\n const keyboardHeight = event.endCoordinates.height;\n if (keyboardHeight <= 0) {\n return;\n }\n\n // Capture current position before offsetting.\n if (preKeyboardTranslateY === null) {\n preKeyboardTranslateY = translateY.value;\n }\n\n // Clear isAnimating so a cancelled snap/close spring doesn't leave\n // drag permanently blocked. The keyboard animation takes over translateY.\n isAnimating.value = false;\n\n // Move sheet up by keyboard height.\n const target = preKeyboardTranslateY - keyboardHeight;\n // Clamp to 0 so the sheet doesn't go above the screen.\n const clamped = Math.max(0, target);\n translateY.value = withTiming(clamped, { duration: KEYBOARD_ANIMATION_DURATION });\n });\n\n const hideSub = Keyboard.addListener(hideEvent, () => {\n if (preKeyboardTranslateY !== null) {\n translateY.value = withTiming(preKeyboardTranslateY, {\n duration: KEYBOARD_ANIMATION_DURATION,\n });\n preKeyboardTranslateY = null;\n }\n });\n\n return () => {\n showSub.remove();\n hideSub.remove();\n };\n }, [isOpen, translateY, isAnimating]);\n}\n\nexport { useKeyboardAvoidance };\n"],"mappings":";;;;;;;AAMA,MAAM,8BAA8B;;;;;;;;;;;AAsBpC,SAAS,qBAAqB,EAAE,QAAQ,YAAY,eAA2C;AAC7F,iBAAgB;AACd,MAAI,CAAC,OACH;EAIF,IAAI,wBAAuC;EAE3C,MAAM,YAAY,SAAS,OAAO,QAAQ,qBAAqB;EAC/D,MAAM,YAAY,SAAS,OAAO,QAAQ,qBAAqB;EAE/D,MAAM,UAAU,SAAS,YAAY,YAAY,UAAU;GACzD,MAAM,iBAAiB,MAAM,eAAe;AAC5C,OAAI,kBAAkB,EACpB;AAIF,OAAI,0BAA0B,KAC5B,yBAAwB,WAAW;AAKrC,eAAY,QAAQ;GAGpB,MAAM,SAAS,wBAAwB;AAGvC,cAAW,QAAQ,WADH,KAAK,IAAI,GAAG,OAAO,EACI,EAAE,UAAU,6BAA6B,CAAC;IACjF;EAEF,MAAM,UAAU,SAAS,YAAY,iBAAiB;AACpD,OAAI,0BAA0B,MAAM;AAClC,eAAW,QAAQ,WAAW,uBAAuB,EACnD,UAAU,6BACX,CAAC;AACF,4BAAwB;;IAE1B;AAEF,eAAa;AACX,WAAQ,QAAQ;AAChB,WAAQ,QAAQ;;IAEjB;EAAC;EAAQ;EAAY;EAAY,CAAC"}
@@ -0,0 +1,77 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+
4
+ //#region src/components/BottomSheet/utils.ts
5
+ /** Default snap point used when neither `snapPoints` nor `height` is specified. */
6
+ const DEFAULT_SNAP_POINT = "40%";
7
+ /**
8
+ * Resolves a {@link BottomSheetHeight} string to a pixel value.
9
+ *
10
+ * @param height - A percentage (`'50%'`) or pixel (`'300px'`) string.
11
+ * @param containerHeightPx - The container height in pixels (used for `%` values).
12
+ * @returns The resolved height in pixels, or `0` if the format is invalid.
13
+ */
14
+ function resolveHeightToPx(height, containerHeightPx) {
15
+ "worklet";
16
+ const trimmed = height.trim();
17
+ if (trimmed.endsWith("%")) {
18
+ const pct = Number.parseFloat(trimmed.slice(0, -1));
19
+ if (Number.isFinite(pct)) return pct / 100 * containerHeightPx;
20
+ }
21
+ if (trimmed.endsWith("px")) {
22
+ const px = Number.parseFloat(trimmed.slice(0, -2));
23
+ if (Number.isFinite(px)) return px;
24
+ }
25
+ return 0;
26
+ }
27
+ /**
28
+ * Clamps an index into the valid range `[0, length - 1]`.
29
+ *
30
+ * @param index - The index to clamp.
31
+ * @param length - The length of the array.
32
+ * @returns The clamped index.
33
+ */
34
+ function clampIndex(index, length) {
35
+ "worklet";
36
+ if (length <= 0) return 0;
37
+ return Math.max(0, Math.min(index, length - 1));
38
+ }
39
+ /**
40
+ * Clamps a numeric value to `[min, max]`.
41
+ *
42
+ * @param value - The value to clamp.
43
+ * @param min - Lower bound.
44
+ * @param max - Upper bound.
45
+ * @returns The clamped value.
46
+ */
47
+ function clamp(value, min, max) {
48
+ "worklet";
49
+ return Math.max(min, Math.min(max, value));
50
+ }
51
+ /**
52
+ * Resolves an array of snap points into pixel heights and translateY positions.
53
+ *
54
+ * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`
55
+ *
56
+ * @param snapPoints - Array of snap point height strings.
57
+ * @param containerHeightPx - Container height in pixels.
58
+ * @param bottomInsetPx - Bottom inset (margin + safe area) in pixels.
59
+ * @param maxHeightPx - Maximum allowed sheet height in pixels.
60
+ * @returns Object containing `heightsPx`, `translateYs`, and `closedTranslateY`.
61
+ */
62
+ function resolveSnapPositions(snapPoints, containerHeightPx, bottomInsetPx, maxHeightPx) {
63
+ "worklet";
64
+ const heightsPx = snapPoints.map((sp) => clamp(resolveHeightToPx(sp, containerHeightPx), 0, maxHeightPx));
65
+ return {
66
+ heightsPx,
67
+ translateYs: heightsPx.map((h) => containerHeightPx - h - bottomInsetPx),
68
+ closedTranslateY: containerHeightPx + bottomInsetPx
69
+ };
70
+ }
71
+
72
+ //#endregion
73
+ exports.DEFAULT_SNAP_POINT = DEFAULT_SNAP_POINT;
74
+ exports.clamp = clamp;
75
+ exports.clampIndex = clampIndex;
76
+ exports.resolveHeightToPx = resolveHeightToPx;
77
+ exports.resolveSnapPositions = resolveSnapPositions;
@@ -0,0 +1,50 @@
1
+
2
+ import { BottomSheetHeight } from "./types.cjs";
3
+
4
+ //#region src/components/BottomSheet/utils.d.ts
5
+ /** Default snap point used when neither `snapPoints` nor `height` is specified. */
6
+ declare const DEFAULT_SNAP_POINT: BottomSheetHeight;
7
+ /**
8
+ * Resolves a {@link BottomSheetHeight} string to a pixel value.
9
+ *
10
+ * @param height - A percentage (`'50%'`) or pixel (`'300px'`) string.
11
+ * @param containerHeightPx - The container height in pixels (used for `%` values).
12
+ * @returns The resolved height in pixels, or `0` if the format is invalid.
13
+ */
14
+ declare function resolveHeightToPx(height: BottomSheetHeight, containerHeightPx: number): number;
15
+ /**
16
+ * Clamps an index into the valid range `[0, length - 1]`.
17
+ *
18
+ * @param index - The index to clamp.
19
+ * @param length - The length of the array.
20
+ * @returns The clamped index.
21
+ */
22
+ declare function clampIndex(index: number, length: number): number;
23
+ /**
24
+ * Clamps a numeric value to `[min, max]`.
25
+ *
26
+ * @param value - The value to clamp.
27
+ * @param min - Lower bound.
28
+ * @param max - Upper bound.
29
+ * @returns The clamped value.
30
+ */
31
+ declare function clamp(value: number, min: number, max: number): number;
32
+ /**
33
+ * Resolves an array of snap points into pixel heights and translateY positions.
34
+ *
35
+ * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`
36
+ *
37
+ * @param snapPoints - Array of snap point height strings.
38
+ * @param containerHeightPx - Container height in pixels.
39
+ * @param bottomInsetPx - Bottom inset (margin + safe area) in pixels.
40
+ * @param maxHeightPx - Maximum allowed sheet height in pixels.
41
+ * @returns Object containing `heightsPx`, `translateYs`, and `closedTranslateY`.
42
+ */
43
+ declare function resolveSnapPositions(snapPoints: BottomSheetHeight[], containerHeightPx: number, bottomInsetPx: number, maxHeightPx: number): {
44
+ heightsPx: number[];
45
+ translateYs: number[];
46
+ closedTranslateY: number;
47
+ };
48
+ //#endregion
49
+ export { DEFAULT_SNAP_POINT, clamp, clampIndex, resolveHeightToPx, resolveSnapPositions };
50
+ //# sourceMappingURL=utils.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.cts","names":[],"sources":["../../../src/components/BottomSheet/utils.ts"],"mappings":";;;;;cAGM,kBAAA,EAAoB,iBAAA;AAHuB;;;;;AAGE;;AAHF,iBAYxC,iBAAA,CAAkB,MAAA,EAAQ,iBAAA,EAAmB,iBAAA;;;;;;;AAAyB;iBA4BtE,UAAA,CAAW,KAAA,UAAe,MAAA;;;;AAAc;;;;;iBAgBxC,KAAA,CAAM,KAAA,UAAe,GAAA,UAAa,GAAA;;;;AAAW;;;;;;;;iBAgB7C,oBAAA,CACP,UAAA,EAAY,iBAAA,IACZ,iBAAA,UACA,aAAA,UACA,WAAA"}
@@ -0,0 +1,50 @@
1
+
2
+ import { BottomSheetHeight } from "./types.js";
3
+
4
+ //#region src/components/BottomSheet/utils.d.ts
5
+ /** Default snap point used when neither `snapPoints` nor `height` is specified. */
6
+ declare const DEFAULT_SNAP_POINT: BottomSheetHeight;
7
+ /**
8
+ * Resolves a {@link BottomSheetHeight} string to a pixel value.
9
+ *
10
+ * @param height - A percentage (`'50%'`) or pixel (`'300px'`) string.
11
+ * @param containerHeightPx - The container height in pixels (used for `%` values).
12
+ * @returns The resolved height in pixels, or `0` if the format is invalid.
13
+ */
14
+ declare function resolveHeightToPx(height: BottomSheetHeight, containerHeightPx: number): number;
15
+ /**
16
+ * Clamps an index into the valid range `[0, length - 1]`.
17
+ *
18
+ * @param index - The index to clamp.
19
+ * @param length - The length of the array.
20
+ * @returns The clamped index.
21
+ */
22
+ declare function clampIndex(index: number, length: number): number;
23
+ /**
24
+ * Clamps a numeric value to `[min, max]`.
25
+ *
26
+ * @param value - The value to clamp.
27
+ * @param min - Lower bound.
28
+ * @param max - Upper bound.
29
+ * @returns The clamped value.
30
+ */
31
+ declare function clamp(value: number, min: number, max: number): number;
32
+ /**
33
+ * Resolves an array of snap points into pixel heights and translateY positions.
34
+ *
35
+ * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`
36
+ *
37
+ * @param snapPoints - Array of snap point height strings.
38
+ * @param containerHeightPx - Container height in pixels.
39
+ * @param bottomInsetPx - Bottom inset (margin + safe area) in pixels.
40
+ * @param maxHeightPx - Maximum allowed sheet height in pixels.
41
+ * @returns Object containing `heightsPx`, `translateYs`, and `closedTranslateY`.
42
+ */
43
+ declare function resolveSnapPositions(snapPoints: BottomSheetHeight[], containerHeightPx: number, bottomInsetPx: number, maxHeightPx: number): {
44
+ heightsPx: number[];
45
+ translateYs: number[];
46
+ closedTranslateY: number;
47
+ };
48
+ //#endregion
49
+ export { DEFAULT_SNAP_POINT, clamp, clampIndex, resolveHeightToPx, resolveSnapPositions };
50
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../../../src/components/BottomSheet/utils.ts"],"mappings":";;;;;cAGM,kBAAA,EAAoB,iBAAA;AAHuB;;;;;AAGE;;AAHF,iBAYxC,iBAAA,CAAkB,MAAA,EAAQ,iBAAA,EAAmB,iBAAA;;;;;;;AAAyB;iBA4BtE,UAAA,CAAW,KAAA,UAAe,MAAA;;;;AAAc;;;;;iBAgBxC,KAAA,CAAM,KAAA,UAAe,GAAA,UAAa,GAAA;;;;AAAW;;;;;;;;iBAgB7C,oBAAA,CACP,UAAA,EAAY,iBAAA,IACZ,iBAAA,UACA,aAAA,UACA,WAAA"}
@@ -0,0 +1,72 @@
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ //#region src/components/BottomSheet/utils.ts
3
+ /** Default snap point used when neither `snapPoints` nor `height` is specified. */
4
+ const DEFAULT_SNAP_POINT = "40%";
5
+ /**
6
+ * Resolves a {@link BottomSheetHeight} string to a pixel value.
7
+ *
8
+ * @param height - A percentage (`'50%'`) or pixel (`'300px'`) string.
9
+ * @param containerHeightPx - The container height in pixels (used for `%` values).
10
+ * @returns The resolved height in pixels, or `0` if the format is invalid.
11
+ */
12
+ function resolveHeightToPx(height, containerHeightPx) {
13
+ "worklet";
14
+ const trimmed = height.trim();
15
+ if (trimmed.endsWith("%")) {
16
+ const pct = Number.parseFloat(trimmed.slice(0, -1));
17
+ if (Number.isFinite(pct)) return pct / 100 * containerHeightPx;
18
+ }
19
+ if (trimmed.endsWith("px")) {
20
+ const px = Number.parseFloat(trimmed.slice(0, -2));
21
+ if (Number.isFinite(px)) return px;
22
+ }
23
+ return 0;
24
+ }
25
+ /**
26
+ * Clamps an index into the valid range `[0, length - 1]`.
27
+ *
28
+ * @param index - The index to clamp.
29
+ * @param length - The length of the array.
30
+ * @returns The clamped index.
31
+ */
32
+ function clampIndex(index, length) {
33
+ "worklet";
34
+ if (length <= 0) return 0;
35
+ return Math.max(0, Math.min(index, length - 1));
36
+ }
37
+ /**
38
+ * Clamps a numeric value to `[min, max]`.
39
+ *
40
+ * @param value - The value to clamp.
41
+ * @param min - Lower bound.
42
+ * @param max - Upper bound.
43
+ * @returns The clamped value.
44
+ */
45
+ function clamp(value, min, max) {
46
+ "worklet";
47
+ return Math.max(min, Math.min(max, value));
48
+ }
49
+ /**
50
+ * Resolves an array of snap points into pixel heights and translateY positions.
51
+ *
52
+ * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`
53
+ *
54
+ * @param snapPoints - Array of snap point height strings.
55
+ * @param containerHeightPx - Container height in pixels.
56
+ * @param bottomInsetPx - Bottom inset (margin + safe area) in pixels.
57
+ * @param maxHeightPx - Maximum allowed sheet height in pixels.
58
+ * @returns Object containing `heightsPx`, `translateYs`, and `closedTranslateY`.
59
+ */
60
+ function resolveSnapPositions(snapPoints, containerHeightPx, bottomInsetPx, maxHeightPx) {
61
+ "worklet";
62
+ const heightsPx = snapPoints.map((sp) => clamp(resolveHeightToPx(sp, containerHeightPx), 0, maxHeightPx));
63
+ return {
64
+ heightsPx,
65
+ translateYs: heightsPx.map((h) => containerHeightPx - h - bottomInsetPx),
66
+ closedTranslateY: containerHeightPx + bottomInsetPx
67
+ };
68
+ }
69
+
70
+ //#endregion
71
+ export { DEFAULT_SNAP_POINT, clamp, clampIndex, resolveHeightToPx, resolveSnapPositions };
72
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":[],"sources":["../../../src/components/BottomSheet/utils.ts"],"sourcesContent":["import type { BottomSheetHeight } from './types';\n\n/** Default snap point used when neither `snapPoints` nor `height` is specified. */\nconst DEFAULT_SNAP_POINT: BottomSheetHeight = '40%';\n\n/**\n * Resolves a {@link BottomSheetHeight} string to a pixel value.\n *\n * @param height - A percentage (`'50%'`) or pixel (`'300px'`) string.\n * @param containerHeightPx - The container height in pixels (used for `%` values).\n * @returns The resolved height in pixels, or `0` if the format is invalid.\n */\nfunction resolveHeightToPx(height: BottomSheetHeight, containerHeightPx: number): number {\n 'worklet';\n const trimmed = (height as string).trim();\n\n if (trimmed.endsWith('%')) {\n const pct = Number.parseFloat(trimmed.slice(0, -1));\n if (Number.isFinite(pct)) {\n return (pct / 100) * containerHeightPx;\n }\n }\n\n if (trimmed.endsWith('px')) {\n const px = Number.parseFloat(trimmed.slice(0, -2));\n if (Number.isFinite(px)) {\n return px;\n }\n }\n\n return 0;\n}\n\n/**\n * Clamps an index into the valid range `[0, length - 1]`.\n *\n * @param index - The index to clamp.\n * @param length - The length of the array.\n * @returns The clamped index.\n */\nfunction clampIndex(index: number, length: number): number {\n 'worklet';\n if (length <= 0) {\n return 0;\n }\n return Math.max(0, Math.min(index, length - 1));\n}\n\n/**\n * Clamps a numeric value to `[min, max]`.\n *\n * @param value - The value to clamp.\n * @param min - Lower bound.\n * @param max - Upper bound.\n * @returns The clamped value.\n */\nfunction clamp(value: number, min: number, max: number): number {\n 'worklet';\n return Math.max(min, Math.min(max, value));\n}\n\n/**\n * Resolves an array of snap points into pixel heights and translateY positions.\n *\n * Position model: `translateY = containerHeight - snapHeightPx - bottomInsetPx`\n *\n * @param snapPoints - Array of snap point height strings.\n * @param containerHeightPx - Container height in pixels.\n * @param bottomInsetPx - Bottom inset (margin + safe area) in pixels.\n * @param maxHeightPx - Maximum allowed sheet height in pixels.\n * @returns Object containing `heightsPx`, `translateYs`, and `closedTranslateY`.\n */\nfunction resolveSnapPositions(\n snapPoints: BottomSheetHeight[],\n containerHeightPx: number,\n bottomInsetPx: number,\n maxHeightPx: number,\n) {\n 'worklet';\n const heightsPx = snapPoints.map((sp) =>\n clamp(resolveHeightToPx(sp, containerHeightPx), 0, maxHeightPx),\n );\n const translateYs = heightsPx.map((h) => containerHeightPx - h - bottomInsetPx);\n const closedTranslateY = containerHeightPx + bottomInsetPx;\n\n return { heightsPx, translateYs, closedTranslateY };\n}\n\nexport { clamp, clampIndex, DEFAULT_SNAP_POINT, resolveHeightToPx, resolveSnapPositions };\n"],"mappings":";;;AAGA,MAAM,qBAAwC;;;;;;;;AAS9C,SAAS,kBAAkB,QAA2B,mBAAmC;AACvF;CACA,MAAM,UAAW,OAAkB,MAAM;AAEzC,KAAI,QAAQ,SAAS,IAAI,EAAE;EACzB,MAAM,MAAM,OAAO,WAAW,QAAQ,MAAM,GAAG,GAAG,CAAC;AACnD,MAAI,OAAO,SAAS,IAAI,CACtB,QAAQ,MAAM,MAAO;;AAIzB,KAAI,QAAQ,SAAS,KAAK,EAAE;EAC1B,MAAM,KAAK,OAAO,WAAW,QAAQ,MAAM,GAAG,GAAG,CAAC;AAClD,MAAI,OAAO,SAAS,GAAG,CACrB,QAAO;;AAIX,QAAO;;;;;;;;;AAUT,SAAS,WAAW,OAAe,QAAwB;AACzD;AACA,KAAI,UAAU,EACZ,QAAO;AAET,QAAO,KAAK,IAAI,GAAG,KAAK,IAAI,OAAO,SAAS,EAAE,CAAC;;;;;;;;;;AAWjD,SAAS,MAAM,OAAe,KAAa,KAAqB;AAC9D;AACA,QAAO,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,MAAM,CAAC;;;;;;;;;;;;;AAc5C,SAAS,qBACP,YACA,mBACA,eACA,aACA;AACA;CACA,MAAM,YAAY,WAAW,KAAK,OAChC,MAAM,kBAAkB,IAAI,kBAAkB,EAAE,GAAG,YAAY,CAChE;AAID,QAAO;EAAE;EAAW,aAHA,UAAU,KAAK,MAAM,oBAAoB,IAAI,cAAc;EAG9C,kBAFR,oBAAoB;EAEM"}
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
4
4
  let react = require("react");
5
5
  let react_native = require("react-native");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
6
7
  let generated_styles = require("../../generated/styles");
7
8
  let react_native_unistyles = require("react-native-unistyles");
8
- let react_jsx_runtime = require("react/jsx-runtime");
9
9
 
10
10
  //#region src/components/Box.tsx
11
11
  let BlurView = null;
@@ -1,9 +1,9 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  import { memo, useEffect, useMemo, useRef, useState } from "react";
3
3
  import { Platform, View } from "react-native";
4
+ import { jsx } from "react/jsx-runtime";
4
5
  import { styles } from "../../generated/styles";
5
6
  import { StyleSheet as StyleSheet$1, useUnistyles } from "react-native-unistyles";
6
- import { jsx } from "react/jsx-runtime";
7
7
 
8
8
  //#region src/components/Box.tsx
9
9
  let BlurView = null;
@@ -8,8 +8,8 @@ const require_components_Text = require('./Text.cjs');
8
8
  const require_components_Pressable = require('./Pressable.cjs');
9
9
  let react = require("react");
10
10
  let react_native = require("react-native");
11
- let generated_styles = require("../../generated/styles");
12
11
  let react_jsx_runtime = require("react/jsx-runtime");
12
+ let generated_styles = require("../../generated/styles");
13
13
  let react_native_reanimated = require("react-native-reanimated");
14
14
  react_native_reanimated = require_runtime.__toESM(react_native_reanimated);
15
15
  let react_native_unistyles_reanimated = require("react-native-unistyles/reanimated");
@@ -6,8 +6,8 @@ import { Text as Text$1 } from "./Text.js";
6
6
  import { AnimatedPressable } from "./Pressable.js";
7
7
  import { isValidElement, memo, useCallback, useMemo, useState } from "react";
8
8
  import { ActivityIndicator } from "react-native";
9
- import { buttonStyles } from "../../generated/styles";
10
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { buttonStyles } from "../../generated/styles";
11
11
  import Animated, { Easing, interpolate, useAnimatedStyle, useDerivedValue, useSharedValue, withSpring, withTiming } from "react-native-reanimated";
12
12
  import { useAnimatedTheme } from "react-native-unistyles/reanimated";
13
13
 
@@ -8,8 +8,8 @@ const require_components_Text = require('./Text.cjs');
8
8
  const require_components_HStack = require('./HStack.cjs');
9
9
  const require_components_Pressable = require('./Pressable.cjs');
10
10
  let react = require("react");
11
- let generated_styles = require("../../generated/styles");
12
11
  let react_jsx_runtime = require("react/jsx-runtime");
12
+ let generated_styles = require("../../generated/styles");
13
13
  let react_native_reanimated = require("react-native-reanimated");
14
14
  react_native_reanimated = require_runtime.__toESM(react_native_reanimated);
15
15
 
@@ -6,8 +6,8 @@ import { Text } from "./Text.js";
6
6
  import { HStack } from "./HStack.js";
7
7
  import { Pressable } from "./Pressable.js";
8
8
  import { isValidElement, memo, useCallback, useId, useMemo, useState } from "react";
9
- import { checkboxStyles } from "../../generated/styles";
10
9
  import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { checkboxStyles } from "../../generated/styles";
11
11
  import Animated, { useAnimatedStyle, useDerivedValue, withSpring } from "react-native-reanimated";
12
12
 
13
13
  //#region src/components/Checkbox.tsx
@@ -6,8 +6,8 @@ const require_components_Text = require('./Text.cjs');
6
6
  const require_components_HStack = require('./HStack.cjs');
7
7
  const require_components_Pressable = require('./Pressable.cjs');
8
8
  let react = require("react");
9
- let generated_styles = require("../../generated/styles");
10
9
  let react_jsx_runtime = require("react/jsx-runtime");
10
+ let generated_styles = require("../../generated/styles");
11
11
 
12
12
  //#region src/components/Chip.tsx
13
13
  /**
@@ -4,8 +4,8 @@ import { Text } from "./Text.js";
4
4
  import { HStack } from "./HStack.js";
5
5
  import { Pressable } from "./Pressable.js";
6
6
  import { memo, useCallback, useMemo } from "react";
7
- import { chipStyles } from "../../generated/styles";
8
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { chipStyles } from "../../generated/styles";
9
9
 
10
10
  //#region src/components/Chip.tsx
11
11
  /**
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
4
4
  let react = require("react");
5
5
  let react_native = require("react-native");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
6
7
  let generated_styles = require("../../generated/styles");
7
8
  let react_native_unistyles = require("react-native-unistyles");
8
- let react_jsx_runtime = require("react/jsx-runtime");
9
9
  let _yahoo_uds_icons_glyphMap = require("@yahoo/uds-icons/glyphMap");
10
10
  let _yahoo_uds_icons_svgMap = require("@yahoo/uds-icons/svgMap");
11
11
  let _yahoo_uds_icons_tokens = require("@yahoo/uds-icons/tokens");
@@ -1,9 +1,9 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  import { memo, useMemo } from "react";
3
3
  import { Text, View } from "react-native";
4
+ import { jsx } from "react/jsx-runtime";
4
5
  import { styles } from "../../generated/styles";
5
6
  import { useUnistyles } from "react-native-unistyles";
6
- import { jsx } from "react/jsx-runtime";
7
7
  import { glyphMap, glyphNames } from "@yahoo/uds-icons/glyphMap";
8
8
  import { svgGlyphNames, svgMap } from "@yahoo/uds-icons/svgMap";
9
9
  import { ICON_SIZE_MAP } from "@yahoo/uds-icons/tokens";
@@ -7,8 +7,8 @@ const require_components_Icon = require('./Icon.cjs');
7
7
  const require_components_Pressable = require('./Pressable.cjs');
8
8
  let react = require("react");
9
9
  let react_native = require("react-native");
10
- let generated_styles = require("../../generated/styles");
11
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
+ let generated_styles = require("../../generated/styles");
12
12
  let react_native_reanimated = require("react-native-reanimated");
13
13
  let react_native_unistyles_reanimated = require("react-native-unistyles/reanimated");
14
14
 
@@ -132,12 +132,12 @@ const IconButton = (0, react.memo)(function IconButton({ name, variant = "primar
132
132
  ],
133
133
  ...props,
134
134
  children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.ActivityIndicator, {
135
- size: generated_styles.buttonStyles.icon.fontSize,
135
+ size: generated_styles.iconButtonStyles.icon.fontSize,
136
136
  color: generated_styles.buttonStyles.icon.color
137
137
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
138
138
  name,
139
139
  variant: iconVariant,
140
- style: generated_styles.buttonStyles.icon
140
+ style: [generated_styles.iconButtonStyles.icon, generated_styles.buttonStyles.icon]
141
141
  })
142
142
  });
143
143
  });
@@ -5,8 +5,8 @@ import { Icon } from "./Icon.js";
5
5
  import { AnimatedPressable } from "./Pressable.js";
6
6
  import { memo, useCallback, useMemo, useState } from "react";
7
7
  import { ActivityIndicator } from "react-native";
8
- import { buttonStyles, iconButtonStyles, styles } from "../../generated/styles";
9
8
  import { jsx } from "react/jsx-runtime";
9
+ import { buttonStyles, iconButtonStyles, styles } from "../../generated/styles";
10
10
  import { Easing, useAnimatedStyle, useDerivedValue, useSharedValue, withSpring, withTiming } from "react-native-reanimated";
11
11
  import { useAnimatedTheme, useAnimatedVariantColor } from "react-native-unistyles/reanimated";
12
12
 
@@ -130,12 +130,12 @@ const IconButton = memo(function IconButton({ name, variant = "primary", size =
130
130
  ],
131
131
  ...props,
132
132
  children: loading ? /* @__PURE__ */ jsx(ActivityIndicator, {
133
- size: buttonStyles.icon.fontSize,
133
+ size: iconButtonStyles.icon.fontSize,
134
134
  color: buttonStyles.icon.color
135
135
  }) : /* @__PURE__ */ jsx(Icon, {
136
136
  name,
137
137
  variant: iconVariant,
138
- style: buttonStyles.icon
138
+ style: [iconButtonStyles.icon, buttonStyles.icon]
139
139
  })
140
140
  });
141
141
  });
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.js","names":["foundationStyles"],"sources":["../../src/components/IconButton.tsx"],"sourcesContent":["import type { ButtonVariantFlat, IconButtonSize, IconVariant } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { memo, useCallback, useMemo, useState } from 'react';\nimport type { View } from 'react-native';\nimport { ActivityIndicator } from 'react-native';\nimport {\n Easing,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n withSpring,\n withTiming,\n} from 'react-native-reanimated';\nimport { useAnimatedTheme, useAnimatedVariantColor } from 'react-native-unistyles/reanimated';\n\nimport { buttonStyles, iconButtonStyles, styles as foundationStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport type { IconName } from './Icon';\nimport { Icon } from './Icon';\nimport type { PressableProps } from './Pressable';\nimport { AnimatedPressable } from './Pressable';\n\n/* -------------------------------------------------------------------------- */\n/* Animation Helpers */\n/* -------------------------------------------------------------------------- */\n\nfunction interpolateShadowAlpha(shadow: string | undefined, alpha: number): string {\n 'worklet';\n if (!shadow) {\n return '';\n }\n if (alpha >= 1) {\n return shadow;\n }\n if (alpha <= 0) {\n return '';\n }\n\n return shadow.replace(/rgba\\(([^,]+),\\s*([^,]+),\\s*([^,]+),\\s*([^)]+)\\)/g, (_, r, g, b, a) => {\n const newAlpha = parseFloat(a) * alpha;\n return `rgba(${r}, ${g}, ${b}, ${newAlpha.toFixed(3)})`;\n });\n}\n\n/* -------------------------------------------------------------------------- */\n/* IconButton Props */\n/* -------------------------------------------------------------------------- */\n\ninterface IconButtonProps extends Omit<PressableProps, 'children'> {\n /** Icon to render from the icons package */\n name: IconName;\n /** The visual style variant @default 'primary' */\n variant?: ButtonVariantFlat;\n /** The size of the button @default 'md' */\n size?: IconButtonSize;\n /** The icon style variant @default 'outline' */\n iconVariant?: IconVariant;\n /** Shows a loading spinner and disables the button */\n loading?: boolean;\n /**\n * Disable motion effects (scale on press, icon animations)\n * @default false\n */\n disableEffects?: boolean;\n /** Ref to the underlying View */\n ref?: Ref<View>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* IconButton Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **An icon button element that can be used to trigger an action**\n *\n * @description\n * An icon-only button for actions where space is limited. Features animated\n * scale effect on press and smooth color transitions matching the web UDS\n * IconButton behavior.\n *\n * @category Interactive\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { IconButton } from '@yahoo/uds-mobile';\n *\n * <IconButton name=\"Add\" onPress={() => console.log('pressed')} />\n * <IconButton name=\"Close\" variant=\"secondary\" size=\"sm\" />\n * <IconButton name=\"Settings\" loading />\n * ```\n *\n * @usage\n * - Use for toolbar actions\n * - Use for closing modals/dialogs\n * - Always provide accessibilityLabel for screen readers\n *\n * @accessibility\n * - Sets `accessibilityRole=\"button\"` automatically\n * - Announces loading state to screen readers\n * - **Always** provide `accessibilityLabel` since there's no visible text\n *\n * @see {@link Button} for buttons with text labels\n * @see {@link Icon} for non-interactive icons\n */\nconst IconButton = memo(function IconButton({\n name,\n variant = 'primary',\n size = 'md',\n iconVariant = 'outline',\n loading,\n disabled,\n style,\n accessibilityLabel,\n accessibilityHint,\n disableEffects = false,\n onPressIn,\n onPressOut,\n ref,\n ...props\n}: IconButtonProps) {\n const isDisabled = disabled || loading;\n const shouldAnimate = !disableEffects && !isDisabled;\n\n /* --------------------------------- State ---------------------------------- */\n const [pressed, setPressed] = useState(false);\n\n // Apply layer-based styles with compound variant support\n iconButtonStyles.useVariants({ size });\n buttonStyles.useVariants({ variant, disabled: isDisabled, pressed });\n\n // Animate colors using Unistyles' useAnimatedVariantColor\n const backgroundColor = useAnimatedVariantColor(buttonStyles.root, 'backgroundColor');\n const borderColor = useAnimatedVariantColor(buttonStyles.root, 'borderColor');\n\n // Get animated theme for boxShadow\n const animatedTheme = useAnimatedTheme();\n\n /* ------------------------------- Animation -------------------------------- */\n const scale = useSharedValue<number>(SCALE_EFFECTS.none);\n\n const handlePressIn = useCallback<NonNullable<PressableProps['onPressIn']>>(\n (event) => {\n setPressed(true);\n if (shouldAnimate) {\n scale.value = withSpring(SCALE_EFFECTS.down, BUTTON_SPRING_CONFIG);\n }\n onPressIn?.(event);\n },\n [shouldAnimate, scale, onPressIn],\n );\n\n const handlePressOut = useCallback<NonNullable<PressableProps['onPressOut']>>(\n (event) => {\n setPressed(false);\n if (shouldAnimate) {\n scale.value = withSpring(SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG);\n }\n onPressOut?.(event);\n },\n [shouldAnimate, scale, onPressOut],\n );\n\n const a11yState = useMemo(() => ({ disabled: isDisabled, busy: loading }), [isDisabled, loading]);\n\n /* --------------------------------- Styles --------------------------------- */\n // Animate pressed state for shadow\n const pressProgress = useDerivedValue(\n () => withTiming(pressed ? 1 : 0, { duration: 220, easing: Easing.bezier(0, 0, 0.2, 1) }),\n [pressed],\n );\n\n // Animate using Unistyles' variant color system + boxShadow from theme\n const animatedRootStyle = useAnimatedStyle(() => {\n // Get boxShadow from theme using flattened path (no camelCase conversion needed!)\n const components = animatedTheme.value.components as unknown as Record<\n string,\n Record<string, unknown>\n >;\n const shadowPressed = components[`button/variant/${variant}/root/pressed`]?.boxShadow as\n | string\n | undefined;\n\n return {\n transform: [{ scale: scale.value }],\n backgroundColor: withTiming(backgroundColor.value, {\n duration: 220,\n easing: Easing.bezier(0, 0, 0.2, 1),\n }),\n borderColor: withTiming(borderColor.value, {\n duration: 220,\n easing: Easing.bezier(0, 0, 0.2, 1),\n }),\n // Only animate shadow if the theme defines one for this variant\n ...(shadowPressed && {\n boxShadow: interpolateShadowAlpha(shadowPressed, pressProgress.value),\n }),\n };\n });\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <AnimatedPressable\n ref={ref}\n disabled={isDisabled}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n overflow=\"hidden\"\n accessibilityLabel={loading ? `${accessibilityLabel ?? ''}, loading` : accessibilityLabel}\n accessibilityHint={accessibilityHint}\n accessibilityRole=\"button\"\n accessibilityState={a11yState}\n style={[\n iconButtonStyles.root,\n buttonStyles.root,\n foundationStyles.foundation,\n animatedRootStyle,\n typeof style === 'function' ? style({ pressed }) : style,\n ]}\n {...props}\n >\n {loading ? (\n <ActivityIndicator size={buttonStyles.icon.fontSize} color={buttonStyles.icon.color} />\n ) : (\n <Icon name={name} variant={iconVariant} style={buttonStyles.icon} />\n )}\n </AnimatedPressable>\n );\n});\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton, type IconButtonProps };\n"],"mappings":";;;;;;;;;;;;;AA0BA,SAAS,uBAAuB,QAA4B,OAAuB;AACjF;AACA,KAAI,CAAC,OACH,QAAO;AAET,KAAI,SAAS,EACX,QAAO;AAET,KAAI,SAAS,EACX,QAAO;AAGT,QAAO,OAAO,QAAQ,sDAAsD,GAAG,GAAG,GAAG,GAAG,MAAM;AAE5F,SAAO,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KADZ,WAAW,EAAE,GAAG,OACS,QAAQ,EAAE,CAAC;GACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEJ,MAAM,aAAa,KAAK,SAAS,WAAW,EAC1C,MACA,UAAU,WACV,OAAO,MACP,cAAc,WACd,SACA,UACA,OACA,oBACA,mBACA,iBAAiB,OACjB,WACA,YACA,KACA,GAAG,SACe;CAClB,MAAM,aAAa,YAAY;CAC/B,MAAM,gBAAgB,CAAC,kBAAkB,CAAC;CAG1C,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;AAG7C,kBAAiB,YAAY,EAAE,MAAM,CAAC;AACtC,cAAa,YAAY;EAAE;EAAS,UAAU;EAAY;EAAS,CAAC;CAGpE,MAAM,kBAAkB,wBAAwB,aAAa,MAAM,kBAAkB;CACrF,MAAM,cAAc,wBAAwB,aAAa,MAAM,cAAc;CAG7E,MAAM,gBAAgB,kBAAkB;CAGxC,MAAM,QAAQ,eAAuB,cAAc,KAAK;CAExD,MAAM,gBAAgB,aACnB,UAAU;AACT,aAAW,KAAK;AAChB,MAAI,cACF,OAAM,QAAQ,WAAW,cAAc,MAAM,qBAAqB;AAEpE,cAAY,MAAM;IAEpB;EAAC;EAAe;EAAO;EAAU,CAClC;CAED,MAAM,iBAAiB,aACpB,UAAU;AACT,aAAW,MAAM;AACjB,MAAI,cACF,OAAM,QAAQ,WAAW,cAAc,MAAM,qBAAqB;AAEpE,eAAa,MAAM;IAErB;EAAC;EAAe;EAAO;EAAW,CACnC;CAED,MAAM,YAAY,eAAe;EAAE,UAAU;EAAY,MAAM;EAAS,GAAG,CAAC,YAAY,QAAQ,CAAC;CAIjG,MAAM,gBAAgB,sBACd,WAAW,UAAU,IAAI,GAAG;EAAE,UAAU;EAAK,QAAQ,OAAO,OAAO,GAAG,GAAG,IAAK,EAAE;EAAE,CAAC,EACzF,CAAC,QAAQ,CACV;CAGD,MAAM,oBAAoB,uBAAuB;EAM/C,MAAM,gBAJa,cAAc,MAAM,WAIN,kBAAkB,QAAQ,iBAAiB;AAI5E,SAAO;GACL,WAAW,CAAC,EAAE,OAAO,MAAM,OAAO,CAAC;GACnC,iBAAiB,WAAW,gBAAgB,OAAO;IACjD,UAAU;IACV,QAAQ,OAAO,OAAO,GAAG,GAAG,IAAK,EAAE;IACpC,CAAC;GACF,aAAa,WAAW,YAAY,OAAO;IACzC,UAAU;IACV,QAAQ,OAAO,OAAO,GAAG,GAAG,IAAK,EAAE;IACpC,CAAC;GAEF,GAAI,iBAAiB,EACnB,WAAW,uBAAuB,eAAe,cAAc,MAAM,EACtE;GACF;GACD;AAGF,QACE,oBAAC;EACM;EACL,UAAU;EACV,WAAW;EACX,YAAY;EACZ,eAAc;EACd,YAAW;EACX,gBAAe;EACf,UAAS;EACT,oBAAoB,UAAU,GAAG,sBAAsB,GAAG,aAAa;EACpD;EACnB,mBAAkB;EAClB,oBAAoB;EACpB,OAAO;GACL,iBAAiB;GACjB,aAAa;GACbA,OAAiB;GACjB;GACA,OAAO,UAAU,aAAa,MAAM,EAAE,SAAS,CAAC,GAAG;GACpD;EACD,GAAI;YAEH,UACC,oBAAC;GAAkB,MAAM,aAAa,KAAK;GAAU,OAAO,aAAa,KAAK;IAAS,GAEvF,oBAAC;GAAW;GAAM,SAAS;GAAa,OAAO,aAAa;IAAQ;GAEpD;EAEtB;AAEF,WAAW,cAAc"}
1
+ {"version":3,"file":"IconButton.js","names":["foundationStyles"],"sources":["../../src/components/IconButton.tsx"],"sourcesContent":["import type { ButtonVariantFlat, IconButtonSize, IconVariant } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { memo, useCallback, useMemo, useState } from 'react';\nimport type { View } from 'react-native';\nimport { ActivityIndicator } from 'react-native';\nimport {\n Easing,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n withSpring,\n withTiming,\n} from 'react-native-reanimated';\nimport { useAnimatedTheme, useAnimatedVariantColor } from 'react-native-unistyles/reanimated';\n\nimport { buttonStyles, iconButtonStyles, styles as foundationStyles } from '../../generated/styles';\nimport { BUTTON_SPRING_CONFIG, SCALE_EFFECTS } from '../motion';\nimport type { IconName } from './Icon';\nimport { Icon } from './Icon';\nimport type { PressableProps } from './Pressable';\nimport { AnimatedPressable } from './Pressable';\n\n/* -------------------------------------------------------------------------- */\n/* Animation Helpers */\n/* -------------------------------------------------------------------------- */\n\nfunction interpolateShadowAlpha(shadow: string | undefined, alpha: number): string {\n 'worklet';\n if (!shadow) {\n return '';\n }\n if (alpha >= 1) {\n return shadow;\n }\n if (alpha <= 0) {\n return '';\n }\n\n return shadow.replace(/rgba\\(([^,]+),\\s*([^,]+),\\s*([^,]+),\\s*([^)]+)\\)/g, (_, r, g, b, a) => {\n const newAlpha = parseFloat(a) * alpha;\n return `rgba(${r}, ${g}, ${b}, ${newAlpha.toFixed(3)})`;\n });\n}\n\n/* -------------------------------------------------------------------------- */\n/* IconButton Props */\n/* -------------------------------------------------------------------------- */\n\ninterface IconButtonProps extends Omit<PressableProps, 'children'> {\n /** Icon to render from the icons package */\n name: IconName;\n /** The visual style variant @default 'primary' */\n variant?: ButtonVariantFlat;\n /** The size of the button @default 'md' */\n size?: IconButtonSize;\n /** The icon style variant @default 'outline' */\n iconVariant?: IconVariant;\n /** Shows a loading spinner and disables the button */\n loading?: boolean;\n /**\n * Disable motion effects (scale on press, icon animations)\n * @default false\n */\n disableEffects?: boolean;\n /** Ref to the underlying View */\n ref?: Ref<View>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* IconButton Component */\n/* -------------------------------------------------------------------------- */\n\n/**\n * **An icon button element that can be used to trigger an action**\n *\n * @description\n * An icon-only button for actions where space is limited. Features animated\n * scale effect on press and smooth color transitions matching the web UDS\n * IconButton behavior.\n *\n * @category Interactive\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { IconButton } from '@yahoo/uds-mobile';\n *\n * <IconButton name=\"Add\" onPress={() => console.log('pressed')} />\n * <IconButton name=\"Close\" variant=\"secondary\" size=\"sm\" />\n * <IconButton name=\"Settings\" loading />\n * ```\n *\n * @usage\n * - Use for toolbar actions\n * - Use for closing modals/dialogs\n * - Always provide accessibilityLabel for screen readers\n *\n * @accessibility\n * - Sets `accessibilityRole=\"button\"` automatically\n * - Announces loading state to screen readers\n * - **Always** provide `accessibilityLabel` since there's no visible text\n *\n * @see {@link Button} for buttons with text labels\n * @see {@link Icon} for non-interactive icons\n */\nconst IconButton = memo(function IconButton({\n name,\n variant = 'primary',\n size = 'md',\n iconVariant = 'outline',\n loading,\n disabled,\n style,\n accessibilityLabel,\n accessibilityHint,\n disableEffects = false,\n onPressIn,\n onPressOut,\n ref,\n ...props\n}: IconButtonProps) {\n const isDisabled = disabled || loading;\n const shouldAnimate = !disableEffects && !isDisabled;\n\n /* --------------------------------- State ---------------------------------- */\n const [pressed, setPressed] = useState(false);\n\n // Apply layer-based styles with compound variant support\n iconButtonStyles.useVariants({ size });\n buttonStyles.useVariants({ variant, disabled: isDisabled, pressed });\n\n // Animate colors using Unistyles' useAnimatedVariantColor\n const backgroundColor = useAnimatedVariantColor(buttonStyles.root, 'backgroundColor');\n const borderColor = useAnimatedVariantColor(buttonStyles.root, 'borderColor');\n\n // Get animated theme for boxShadow\n const animatedTheme = useAnimatedTheme();\n\n /* ------------------------------- Animation -------------------------------- */\n const scale = useSharedValue<number>(SCALE_EFFECTS.none);\n\n const handlePressIn = useCallback<NonNullable<PressableProps['onPressIn']>>(\n (event) => {\n setPressed(true);\n if (shouldAnimate) {\n scale.value = withSpring(SCALE_EFFECTS.down, BUTTON_SPRING_CONFIG);\n }\n onPressIn?.(event);\n },\n [shouldAnimate, scale, onPressIn],\n );\n\n const handlePressOut = useCallback<NonNullable<PressableProps['onPressOut']>>(\n (event) => {\n setPressed(false);\n if (shouldAnimate) {\n scale.value = withSpring(SCALE_EFFECTS.none, BUTTON_SPRING_CONFIG);\n }\n onPressOut?.(event);\n },\n [shouldAnimate, scale, onPressOut],\n );\n\n const a11yState = useMemo(() => ({ disabled: isDisabled, busy: loading }), [isDisabled, loading]);\n\n /* --------------------------------- Styles --------------------------------- */\n // Animate pressed state for shadow\n const pressProgress = useDerivedValue(\n () => withTiming(pressed ? 1 : 0, { duration: 220, easing: Easing.bezier(0, 0, 0.2, 1) }),\n [pressed],\n );\n\n // Animate using Unistyles' variant color system + boxShadow from theme\n const animatedRootStyle = useAnimatedStyle(() => {\n // Get boxShadow from theme using flattened path (no camelCase conversion needed!)\n const components = animatedTheme.value.components as unknown as Record<\n string,\n Record<string, unknown>\n >;\n const shadowPressed = components[`button/variant/${variant}/root/pressed`]?.boxShadow as\n | string\n | undefined;\n\n return {\n transform: [{ scale: scale.value }],\n backgroundColor: withTiming(backgroundColor.value, {\n duration: 220,\n easing: Easing.bezier(0, 0, 0.2, 1),\n }),\n borderColor: withTiming(borderColor.value, {\n duration: 220,\n easing: Easing.bezier(0, 0, 0.2, 1),\n }),\n // Only animate shadow if the theme defines one for this variant\n ...(shadowPressed && {\n boxShadow: interpolateShadowAlpha(shadowPressed, pressProgress.value),\n }),\n };\n });\n\n /* --------------------------------- Render --------------------------------- */\n return (\n <AnimatedPressable\n ref={ref}\n disabled={isDisabled}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n overflow=\"hidden\"\n accessibilityLabel={loading ? `${accessibilityLabel ?? ''}, loading` : accessibilityLabel}\n accessibilityHint={accessibilityHint}\n accessibilityRole=\"button\"\n accessibilityState={a11yState}\n style={[\n iconButtonStyles.root,\n buttonStyles.root,\n foundationStyles.foundation,\n animatedRootStyle,\n typeof style === 'function' ? style({ pressed }) : style,\n ]}\n {...props}\n >\n {loading ? (\n <ActivityIndicator size={iconButtonStyles.icon.fontSize} color={buttonStyles.icon.color} />\n ) : (\n <Icon\n name={name}\n variant={iconVariant}\n style={[iconButtonStyles.icon, buttonStyles.icon]}\n />\n )}\n </AnimatedPressable>\n );\n});\n\nIconButton.displayName = 'IconButton';\n\nexport { IconButton, type IconButtonProps };\n"],"mappings":";;;;;;;;;;;;;AA0BA,SAAS,uBAAuB,QAA4B,OAAuB;AACjF;AACA,KAAI,CAAC,OACH,QAAO;AAET,KAAI,SAAS,EACX,QAAO;AAET,KAAI,SAAS,EACX,QAAO;AAGT,QAAO,OAAO,QAAQ,sDAAsD,GAAG,GAAG,GAAG,GAAG,MAAM;AAE5F,SAAO,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,KADZ,WAAW,EAAE,GAAG,OACS,QAAQ,EAAE,CAAC;GACrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgEJ,MAAM,aAAa,KAAK,SAAS,WAAW,EAC1C,MACA,UAAU,WACV,OAAO,MACP,cAAc,WACd,SACA,UACA,OACA,oBACA,mBACA,iBAAiB,OACjB,WACA,YACA,KACA,GAAG,SACe;CAClB,MAAM,aAAa,YAAY;CAC/B,MAAM,gBAAgB,CAAC,kBAAkB,CAAC;CAG1C,MAAM,CAAC,SAAS,cAAc,SAAS,MAAM;AAG7C,kBAAiB,YAAY,EAAE,MAAM,CAAC;AACtC,cAAa,YAAY;EAAE;EAAS,UAAU;EAAY;EAAS,CAAC;CAGpE,MAAM,kBAAkB,wBAAwB,aAAa,MAAM,kBAAkB;CACrF,MAAM,cAAc,wBAAwB,aAAa,MAAM,cAAc;CAG7E,MAAM,gBAAgB,kBAAkB;CAGxC,MAAM,QAAQ,eAAuB,cAAc,KAAK;CAExD,MAAM,gBAAgB,aACnB,UAAU;AACT,aAAW,KAAK;AAChB,MAAI,cACF,OAAM,QAAQ,WAAW,cAAc,MAAM,qBAAqB;AAEpE,cAAY,MAAM;IAEpB;EAAC;EAAe;EAAO;EAAU,CAClC;CAED,MAAM,iBAAiB,aACpB,UAAU;AACT,aAAW,MAAM;AACjB,MAAI,cACF,OAAM,QAAQ,WAAW,cAAc,MAAM,qBAAqB;AAEpE,eAAa,MAAM;IAErB;EAAC;EAAe;EAAO;EAAW,CACnC;CAED,MAAM,YAAY,eAAe;EAAE,UAAU;EAAY,MAAM;EAAS,GAAG,CAAC,YAAY,QAAQ,CAAC;CAIjG,MAAM,gBAAgB,sBACd,WAAW,UAAU,IAAI,GAAG;EAAE,UAAU;EAAK,QAAQ,OAAO,OAAO,GAAG,GAAG,IAAK,EAAE;EAAE,CAAC,EACzF,CAAC,QAAQ,CACV;CAGD,MAAM,oBAAoB,uBAAuB;EAM/C,MAAM,gBAJa,cAAc,MAAM,WAIN,kBAAkB,QAAQ,iBAAiB;AAI5E,SAAO;GACL,WAAW,CAAC,EAAE,OAAO,MAAM,OAAO,CAAC;GACnC,iBAAiB,WAAW,gBAAgB,OAAO;IACjD,UAAU;IACV,QAAQ,OAAO,OAAO,GAAG,GAAG,IAAK,EAAE;IACpC,CAAC;GACF,aAAa,WAAW,YAAY,OAAO;IACzC,UAAU;IACV,QAAQ,OAAO,OAAO,GAAG,GAAG,IAAK,EAAE;IACpC,CAAC;GAEF,GAAI,iBAAiB,EACnB,WAAW,uBAAuB,eAAe,cAAc,MAAM,EACtE;GACF;GACD;AAGF,QACE,oBAAC;EACM;EACL,UAAU;EACV,WAAW;EACX,YAAY;EACZ,eAAc;EACd,YAAW;EACX,gBAAe;EACf,UAAS;EACT,oBAAoB,UAAU,GAAG,sBAAsB,GAAG,aAAa;EACpD;EACnB,mBAAkB;EAClB,oBAAoB;EACpB,OAAO;GACL,iBAAiB;GACjB,aAAa;GACbA,OAAiB;GACjB;GACA,OAAO,UAAU,aAAa,MAAM,EAAE,SAAS,CAAC,GAAG;GACpD;EACD,GAAI;YAEH,UACC,oBAAC;GAAkB,MAAM,iBAAiB,KAAK;GAAU,OAAO,aAAa,KAAK;IAAS,GAE3F,oBAAC;GACO;GACN,SAAS;GACT,OAAO,CAAC,iBAAiB,MAAM,aAAa,KAAK;IACjD;GAEc;EAEtB;AAEF,WAAW,cAAc"}
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
4
4
  let react = require("react");
5
5
  let react_native = require("react-native");
6
- let generated_styles = require("../../generated/styles");
7
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
+ let generated_styles = require("../../generated/styles");
8
8
 
9
9
  //#region src/components/Image.tsx
10
10
  const CONTENT_FIT_TO_RESIZE_MODE = {
@@ -1,8 +1,8 @@
1
1
  /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  import { memo, useMemo } from "react";
3
3
  import { Image as Image$1 } from "react-native";
4
- import { styles } from "../../generated/styles";
5
4
  import { jsx } from "react/jsx-runtime";
5
+ import { styles } from "../../generated/styles";
6
6
 
7
7
  //#region src/components/Image.tsx
8
8
  const CONTENT_FIT_TO_RESIZE_MODE = {
@@ -7,8 +7,8 @@ const require_components_HStack = require('./HStack.cjs');
7
7
  const require_components_VStack = require('./VStack.cjs');
8
8
  let react = require("react");
9
9
  let react_native = require("react-native");
10
- let generated_styles = require("../../generated/styles");
11
10
  let react_jsx_runtime = require("react/jsx-runtime");
11
+ let generated_styles = require("../../generated/styles");
12
12
  let lodash_es = require("lodash-es");
13
13
 
14
14
  //#region src/components/Input.tsx
@@ -5,8 +5,8 @@ import { HStack } from "./HStack.js";
5
5
  import { VStack } from "./VStack.js";
6
6
  import { memo, useCallback, useId, useMemo, useState } from "react";
7
7
  import { TextInput, View } from "react-native";
8
- import { inputStyles } from "../../generated/styles";
9
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { inputStyles } from "../../generated/styles";
10
10
  import { isFunction } from "lodash-es";
11
11
 
12
12
  //#region src/components/Input.tsx
@@ -4,8 +4,8 @@ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
4
4
  const require_components_IconSlot = require('./IconSlot.cjs');
5
5
  let react = require("react");
6
6
  let react_native = require("react-native");
7
- let generated_styles = require("../../generated/styles");
8
7
  let react_jsx_runtime = require("react/jsx-runtime");
8
+ let generated_styles = require("../../generated/styles");
9
9
  let react_native_reanimated = require("react-native-reanimated");
10
10
  react_native_reanimated = require_runtime.__toESM(react_native_reanimated);
11
11
  let react_native_unistyles_reanimated = require("react-native-unistyles/reanimated");
@@ -2,8 +2,8 @@
2
2
  import { IconSlot } from "./IconSlot.js";
3
3
  import { memo, useCallback, useMemo, useState } from "react";
4
4
  import { Text } from "react-native";
5
- import { linkStyles } from "../../generated/styles";
6
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { linkStyles } from "../../generated/styles";
7
7
  import Animated, { Easing, interpolateColor, useAnimatedStyle, useDerivedValue, withTiming } from "react-native-reanimated";
8
8
  import { useAnimatedTheme } from "react-native-unistyles/reanimated";
9
9
 
@@ -3,8 +3,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
3
  const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
4
4
  let react = require("react");
5
5
  let react_native = require("react-native");
6
- let generated_styles = require("../../generated/styles");
7
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
+ let generated_styles = require("../../generated/styles");
8
8
  let react_native_reanimated = require("react-native-reanimated");
9
9
  react_native_reanimated = require_runtime.__toESM(react_native_reanimated);
10
10