@yahoo/uds-mobile 1.3.0-beta.8 → 1.3.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 (183) hide show
  1. package/dist/_virtual/{rolldown_runtime.cjs → _rolldown/runtime.cjs} +2 -2
  2. package/dist/bin/fixtures/dist/index.mjs +25 -1
  3. package/dist/bin/generateTheme.mjs +5 -5
  4. package/dist/bin/uds-mobile.mjs +10 -10
  5. package/dist/components/Avatar.cjs +13 -4
  6. package/dist/components/Avatar.d.cts +11 -3
  7. package/dist/components/Avatar.d.cts.map +1 -1
  8. package/dist/components/Avatar.d.mts +11 -3
  9. package/dist/components/Avatar.d.mts.map +1 -1
  10. package/dist/components/Avatar.mjs +11 -3
  11. package/dist/components/Avatar.mjs.map +1 -1
  12. package/dist/components/Badge.cjs +15 -4
  13. package/dist/components/Badge.d.cts +24 -6
  14. package/dist/components/Badge.d.cts.map +1 -1
  15. package/dist/components/Badge.d.mts +24 -6
  16. package/dist/components/Badge.d.mts.map +1 -1
  17. package/dist/components/Badge.mjs +13 -3
  18. package/dist/components/Badge.mjs.map +1 -1
  19. package/dist/components/Box.cjs +15 -11
  20. package/dist/components/Box.d.cts +15 -10
  21. package/dist/components/Box.d.cts.map +1 -1
  22. package/dist/components/Box.d.mts +15 -10
  23. package/dist/components/Box.d.mts.map +1 -1
  24. package/dist/components/Box.mjs +13 -10
  25. package/dist/components/Box.mjs.map +1 -1
  26. package/dist/components/Button.cjs +15 -5
  27. package/dist/components/Button.d.cts +21 -6
  28. package/dist/components/Button.d.cts.map +1 -1
  29. package/dist/components/Button.d.mts +21 -6
  30. package/dist/components/Button.d.mts.map +1 -1
  31. package/dist/components/Button.mjs +12 -3
  32. package/dist/components/Button.mjs.map +1 -1
  33. package/dist/components/Checkbox.cjs +16 -7
  34. package/dist/components/Checkbox.d.cts +14 -5
  35. package/dist/components/Checkbox.d.cts.map +1 -1
  36. package/dist/components/Checkbox.d.mts +14 -5
  37. package/dist/components/Checkbox.d.mts.map +1 -1
  38. package/dist/components/Checkbox.mjs +13 -5
  39. package/dist/components/Checkbox.mjs.map +1 -1
  40. package/dist/components/Chip.cjs +21 -4
  41. package/dist/components/Chip.d.cts +28 -6
  42. package/dist/components/Chip.d.cts.map +1 -1
  43. package/dist/components/Chip.d.mts +28 -6
  44. package/dist/components/Chip.d.mts.map +1 -1
  45. package/dist/components/Chip.mjs +19 -3
  46. package/dist/components/Chip.mjs.map +1 -1
  47. package/dist/components/HStack.cjs +9 -6
  48. package/dist/components/HStack.d.cts +9 -5
  49. package/dist/components/HStack.d.cts.map +1 -1
  50. package/dist/components/HStack.d.mts +9 -5
  51. package/dist/components/HStack.d.mts.map +1 -1
  52. package/dist/components/HStack.mjs +7 -5
  53. package/dist/components/HStack.mjs.map +1 -1
  54. package/dist/components/Icon.cjs +17 -6
  55. package/dist/components/Icon.d.cts +14 -3
  56. package/dist/components/Icon.d.cts.map +1 -1
  57. package/dist/components/Icon.d.mts +14 -3
  58. package/dist/components/Icon.d.mts.map +1 -1
  59. package/dist/components/Icon.mjs +15 -5
  60. package/dist/components/Icon.mjs.map +1 -1
  61. package/dist/components/IconButton.cjs +24 -5
  62. package/dist/components/IconButton.d.cts +28 -8
  63. package/dist/components/IconButton.d.cts.map +1 -1
  64. package/dist/components/IconButton.d.mts +28 -8
  65. package/dist/components/IconButton.d.mts.map +1 -1
  66. package/dist/components/IconButton.mjs +22 -4
  67. package/dist/components/IconButton.mjs.map +1 -1
  68. package/dist/components/IconSlot.cjs +9 -3
  69. package/dist/components/IconSlot.d.cts +7 -2
  70. package/dist/components/IconSlot.d.cts.map +1 -1
  71. package/dist/components/IconSlot.d.mts +7 -2
  72. package/dist/components/IconSlot.d.mts.map +1 -1
  73. package/dist/components/IconSlot.mjs +7 -2
  74. package/dist/components/IconSlot.mjs.map +1 -1
  75. package/dist/components/Image.cjs +19 -4
  76. package/dist/components/Image.d.cts +18 -3
  77. package/dist/components/Image.d.cts.map +1 -1
  78. package/dist/components/Image.d.mts +18 -3
  79. package/dist/components/Image.d.mts.map +1 -1
  80. package/dist/components/Image.mjs +17 -3
  81. package/dist/components/Image.mjs.map +1 -1
  82. package/dist/components/Input.cjs +20 -7
  83. package/dist/components/Input.d.cts +19 -6
  84. package/dist/components/Input.d.cts.map +1 -1
  85. package/dist/components/Input.d.mts +19 -6
  86. package/dist/components/Input.d.mts.map +1 -1
  87. package/dist/components/Input.mjs +18 -6
  88. package/dist/components/Input.mjs.map +1 -1
  89. package/dist/components/Link.cjs +20 -5
  90. package/dist/components/Link.d.cts +21 -4
  91. package/dist/components/Link.d.cts.map +1 -1
  92. package/dist/components/Link.d.mts +21 -4
  93. package/dist/components/Link.d.mts.map +1 -1
  94. package/dist/components/Link.mjs +17 -3
  95. package/dist/components/Link.mjs.map +1 -1
  96. package/dist/components/Pressable.cjs +18 -6
  97. package/dist/components/Pressable.d.cts +18 -5
  98. package/dist/components/Pressable.d.cts.map +1 -1
  99. package/dist/components/Pressable.d.mts +18 -5
  100. package/dist/components/Pressable.d.mts.map +1 -1
  101. package/dist/components/Pressable.mjs +15 -4
  102. package/dist/components/Pressable.mjs.map +1 -1
  103. package/dist/components/Radio.cjs +16 -7
  104. package/dist/components/Radio.d.cts +14 -5
  105. package/dist/components/Radio.d.cts.map +1 -1
  106. package/dist/components/Radio.d.mts +14 -5
  107. package/dist/components/Radio.d.mts.map +1 -1
  108. package/dist/components/Radio.mjs +13 -5
  109. package/dist/components/Radio.mjs.map +1 -1
  110. package/dist/components/Screen.cjs +10 -4
  111. package/dist/components/Screen.d.cts +15 -3
  112. package/dist/components/Screen.d.cts.map +1 -1
  113. package/dist/components/Screen.d.mts +15 -3
  114. package/dist/components/Screen.d.mts.map +1 -1
  115. package/dist/components/Screen.mjs +8 -3
  116. package/dist/components/Screen.mjs.map +1 -1
  117. package/dist/components/Switch.cjs +21 -5
  118. package/dist/components/Switch.d.cts +18 -3
  119. package/dist/components/Switch.d.cts.map +1 -1
  120. package/dist/components/Switch.d.mts +18 -3
  121. package/dist/components/Switch.d.mts.map +1 -1
  122. package/dist/components/Switch.mjs +18 -3
  123. package/dist/components/Switch.mjs.map +1 -1
  124. package/dist/components/Text.cjs +17 -7
  125. package/dist/components/Text.d.cts +18 -6
  126. package/dist/components/Text.d.cts.map +1 -1
  127. package/dist/components/Text.d.mts +18 -6
  128. package/dist/components/Text.d.mts.map +1 -1
  129. package/dist/components/Text.mjs +15 -6
  130. package/dist/components/Text.mjs.map +1 -1
  131. package/dist/components/VStack.cjs +9 -6
  132. package/dist/components/VStack.d.cts +9 -5
  133. package/dist/components/VStack.d.cts.map +1 -1
  134. package/dist/components/VStack.d.mts +9 -5
  135. package/dist/components/VStack.d.mts.map +1 -1
  136. package/dist/components/VStack.mjs +7 -5
  137. package/dist/components/VStack.mjs.map +1 -1
  138. package/dist/icons/dist/glyphMap.cjs +2 -2
  139. package/dist/icons/dist/glyphMap.d.cts +0 -2
  140. package/dist/icons/dist/glyphMap.d.cts.map +1 -1
  141. package/dist/icons/dist/glyphMap.d.mts +0 -2
  142. package/dist/icons/dist/glyphMap.d.mts.map +1 -1
  143. package/dist/icons/dist/glyphMap.mjs +2 -2
  144. package/dist/icons/dist/glyphMap.mjs.map +1 -1
  145. package/dist/icons/dist/svgMap.cjs +2 -2
  146. package/dist/icons/dist/svgMap.d.cts +0 -2
  147. package/dist/icons/dist/svgMap.d.cts.map +1 -1
  148. package/dist/icons/dist/svgMap.d.mts +0 -2
  149. package/dist/icons/dist/svgMap.d.mts.map +1 -1
  150. package/dist/icons/dist/svgMap.mjs +2 -2
  151. package/dist/icons/dist/svgMap.mjs.map +1 -1
  152. package/dist/icons/dist/tokens.cjs +2 -2
  153. package/dist/icons/dist/tokens.mjs +2 -2
  154. package/dist/icons/dist/tokens.mjs.map +1 -1
  155. package/dist/motion-tokens/dist/index.cjs +1 -1
  156. package/dist/motion-tokens/dist/index.d.cts +1 -3
  157. package/dist/motion-tokens/dist/index.d.cts.map +1 -1
  158. package/dist/motion-tokens/dist/index.d.mts +1 -3
  159. package/dist/motion-tokens/dist/index.d.mts.map +1 -1
  160. package/dist/motion-tokens/dist/index.mjs +1 -1
  161. package/dist/motion.cjs +2 -1
  162. package/dist/motion.d.cts +0 -1
  163. package/dist/motion.d.cts.map +1 -1
  164. package/dist/motion.d.mts +0 -1
  165. package/dist/motion.d.mts.map +1 -1
  166. package/dist/motion.mjs +1 -1
  167. package/dist/types/dist/index.d.cts +1 -3
  168. package/dist/types/dist/index.d.cts.map +1 -1
  169. package/dist/types/dist/index.d.mts +1 -3
  170. package/dist/types/dist/index.d.mts.map +1 -1
  171. package/dist/types.cjs +1 -1
  172. package/dist/types.d.cts +0 -3
  173. package/dist/types.d.cts.map +1 -1
  174. package/dist/types.d.mts +0 -3
  175. package/dist/types.d.mts.map +1 -1
  176. package/dist/types.mjs +1 -1
  177. package/fonts/index.cjs +205 -205
  178. package/fonts/index.mjs +205 -205
  179. package/generated/styles.cjs +119 -23
  180. package/generated/styles.d.ts +48 -1
  181. package/generated/styles.mjs +119 -23
  182. package/generated/unistyles.d.ts +97 -18
  183. package/package.json +1 -41
@@ -2,33 +2,40 @@
2
2
  import { ButtonVariantFlat, IconButtonSize, IconVariant } from "../types/dist/index.mjs";
3
3
  import { IconName } from "./Icon.mjs";
4
4
  import { PressableProps as PressableProps$1 } from "./Pressable.mjs";
5
- import * as react6 from "react";
5
+ import * as react from "react";
6
6
  import { Ref } from "react";
7
7
  import { View } from "react-native";
8
8
 
9
9
  //#region src/components/IconButton.d.ts
10
10
  interface IconButtonProps extends Omit<PressableProps$1, 'children'> {
11
- /** Icon to render from the icons package. */
11
+ /** Icon to render from the icons package */
12
12
  name: IconName;
13
- /** @default 'primary' */
13
+ /** The visual style variant @default 'primary' */
14
14
  variant?: ButtonVariantFlat;
15
- /** @default 'md' */
15
+ /** The size of the button @default 'md' */
16
16
  size?: IconButtonSize;
17
- /** @default 'outline' */
17
+ /** The icon style variant @default 'outline' */
18
18
  iconVariant?: IconVariant;
19
+ /** Shows a loading spinner and disables the button */
19
20
  loading?: boolean;
20
21
  /**
21
22
  * Disable motion effects (scale on press, icon animations)
22
23
  * @default false
23
24
  */
24
25
  disableEffects?: boolean;
26
+ /** Ref to the underlying View */
25
27
  ref?: Ref<View>;
26
28
  }
27
29
  /**
28
30
  * **An icon button element that can be used to trigger an action**
29
31
  *
30
- * Features animated scale effect on press and smooth color transitions
31
- * matching the web UDS IconButton behavior.
32
+ * @description
33
+ * An icon-only button for actions where space is limited. Features animated
34
+ * scale effect on press and smooth color transitions matching the web UDS
35
+ * IconButton behavior.
36
+ *
37
+ * @category Interactive
38
+ * @platform mobile
32
39
  *
33
40
  * @example
34
41
  * ```tsx
@@ -38,8 +45,21 @@ interface IconButtonProps extends Omit<PressableProps$1, 'children'> {
38
45
  * <IconButton name="Close" variant="secondary" size="sm" />
39
46
  * <IconButton name="Settings" loading />
40
47
  * ```
48
+ *
49
+ * @usage
50
+ * - Use for toolbar actions
51
+ * - Use for closing modals/dialogs
52
+ * - Always provide accessibilityLabel for screen readers
53
+ *
54
+ * @accessibility
55
+ * - Sets `accessibilityRole="button"` automatically
56
+ * - Announces loading state to screen readers
57
+ * - **Always** provide `accessibilityLabel` since there's no visible text
58
+ *
59
+ * @see {@link Button} for buttons with text labels
60
+ * @see {@link Icon} for non-interactive icons
41
61
  */
42
- declare const IconButton: react6.NamedExoticComponent<IconButtonProps>;
62
+ declare const IconButton: react.NamedExoticComponent<IconButtonProps>;
43
63
  //#endregion
44
64
  export { IconButton, type IconButtonProps };
45
65
  //# sourceMappingURL=IconButton.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.mts","names":[],"sources":["../../src/components/IconButton.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;UA6CU,eAAA,SAAwB,KAAK;;QAE/B;EAFE;EAA6B,OAAA,CAAA,EAI3B,iBAJ2B;EAE/B;EAEI,IAAA,CAAA,EAEH,cAFG;EAEH;EAEO,WAAA,CAAA,EAAA,WAAA;EAOJ,OAAA,CAAA,EAAA,OAAA;EAAJ;;;AAf8B;;QAe9B,IAAI;;;;;;;;;;;;;;;;;cAsBN,YAAU,MAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"IconButton.d.mts","names":[],"sources":["../../src/components/IconButton.tsx"],"mappings":";;;;;;;;;UA6CU,eAAA,SAAwB,IAAA,CAAK,gBAAA;;EAErC,IAAA,EAAM,QAAA;EAFE;EAIR,OAAA,GAAU,iBAAA;;EAEV,IAAA,GAAO,cAAA;EAJD;EAMN,WAAA,GAAc,WAAA;EAFP;EAIP,OAAA;EAOU;;;;EAFV,cAAA;EAfgC;EAiBhC,GAAA,GAAM,GAAA,CAAI,IAAA;AAAA;;;;;;;;;;;;;;;AAAI;;;;;;;;;;;;;;;;;;;cAwCV,UAAA,EAAU,KAAA,CAAA,oBAAA,CAAA,eAAA"}
@@ -1,4 +1,4 @@
1
- /*! © 2026 Yahoo, Inc. UDS Mobile v1.3.0-beta.7 */
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  import { SCALE_EFFECTS } from "../motion-tokens/dist/index.mjs";
3
3
  import { BUTTON_SPRING_CONFIG } from "../motion.mjs";
4
4
  import { Icon } from "./Icon.mjs";
@@ -22,8 +22,13 @@ function interpolateShadowAlpha(shadow, alpha) {
22
22
  /**
23
23
  * **An icon button element that can be used to trigger an action**
24
24
  *
25
- * Features animated scale effect on press and smooth color transitions
26
- * matching the web UDS IconButton behavior.
25
+ * @description
26
+ * An icon-only button for actions where space is limited. Features animated
27
+ * scale effect on press and smooth color transitions matching the web UDS
28
+ * IconButton behavior.
29
+ *
30
+ * @category Interactive
31
+ * @platform mobile
27
32
  *
28
33
  * @example
29
34
  * ```tsx
@@ -33,8 +38,21 @@ function interpolateShadowAlpha(shadow, alpha) {
33
38
  * <IconButton name="Close" variant="secondary" size="sm" />
34
39
  * <IconButton name="Settings" loading />
35
40
  * ```
41
+ *
42
+ * @usage
43
+ * - Use for toolbar actions
44
+ * - Use for closing modals/dialogs
45
+ * - Always provide accessibilityLabel for screen readers
46
+ *
47
+ * @accessibility
48
+ * - Sets `accessibilityRole="button"` automatically
49
+ * - Announces loading state to screen readers
50
+ * - **Always** provide `accessibilityLabel` since there's no visible text
51
+ *
52
+ * @see {@link Button} for buttons with text labels
53
+ * @see {@link Icon} for non-interactive icons
36
54
  */
37
- const IconButton = memo(function IconButton$1({ name, variant = "primary", size = "md", iconVariant = "outline", loading, disabled, style, accessibilityLabel, accessibilityHint, disableEffects = false, onPressIn, onPressOut, ref, ...props }) {
55
+ const IconButton = memo(function IconButton({ name, variant = "primary", size = "md", iconVariant = "outline", loading, disabled, style, accessibilityLabel, accessibilityHint, disableEffects = false, onPressIn, onPressOut, ref, ...props }) {
38
56
  const isDisabled = disabled || loading;
39
57
  const shouldAnimate = !disableEffects && !isDisabled;
40
58
  const [pressed, setPressed] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.mjs","names":["IconButton","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, alpha: number): string {\n 'worklet';\n if (!shadow || 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 /** @default 'primary' */\n variant?: ButtonVariantFlat;\n /** @default 'md' */\n size?: IconButtonSize;\n /** @default 'outline' */\n iconVariant?: IconVariant;\n loading?: boolean;\n /**\n * Disable motion effects (scale on press, icon animations)\n * @default false\n */\n disableEffects?: boolean;\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 * Features animated scale effect on press and smooth color transitions\n * matching the web UDS IconButton behavior.\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 */\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 =\n (components[`button/variant/${variant}/root/pressed`]?.boxShadow as string) ?? '';\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 boxShadow: interpolateShadowAlpha(shadowPressed, pressProgress.value),\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,QAAgB,OAAuB;AACrE;AACA,KAAI,CAAC,UAAU,SAAS,EACtB,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;;;;;;;;;;;;;;;;;AA4CJ,MAAM,aAAa,KAAK,SAASA,aAAW,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,k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AoB,UAAU,GAAG,sBAAsB,GAAG,aAAa;EACpD;EACnB,mBAAkB;EAClB,oBAAoB;EACpB,OAAO;GACL,iBAAiB;GACjB,aAAa;GACbC,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.mjs","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, alpha: number): string {\n 'worklet';\n if (!shadow || 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 =\n (components[`button/variant/${variant}/root/pressed`]?.boxShadow as string) ?? '';\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 boxShadow: interpolateShadowAlpha(shadowPressed, pressProgress.value),\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,QAAgB,OAAuB;AACrE;AACA,KAAI,CAAC,UAAU,SAAS,EACtB,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,CA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Ae,cAAc,MAAM;GACtE;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,5 +1,6 @@
1
- /*! © 2026 Yahoo, Inc. UDS Mobile v1.3.0-beta.7 */
2
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
4
  const require_components_Icon = require('./Icon.cjs');
4
5
  let react = require("react");
5
6
  let react_jsx_runtime = require("react/jsx-runtime");
@@ -14,6 +15,9 @@ let lodash_es = require("lodash-es");
14
15
  * consumers to pass in a standard UDS icon name, an Icon component, or a render function
15
16
  * for custom rendering.
16
17
  *
18
+ * @category Utility
19
+ * @platform mobile
20
+ *
17
21
  * @example
18
22
  * ```tsx
19
23
  * import { IconSlot } from '@yahoo/uds-mobile';
@@ -32,8 +36,10 @@ let lodash_es = require("lodash-es");
32
36
  * - Pass icon name for simple usage
33
37
  * - Pass Icon component for custom props
34
38
  * - Pass function for dynamic rendering
39
+ *
40
+ * @see {@link Icon} for direct icon rendering
35
41
  */
36
- const IconSlot = (0, react.memo)(function IconSlot$1({ icon, ref, ...props }) {
42
+ const IconSlot = (0, react.memo)(function IconSlot({ icon, ref, ...props }) {
37
43
  if (!icon) return null;
38
44
  if (typeof icon === "string") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
39
45
  ref,
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { IconName, IconProps } from "./Icon.cjs";
3
- import * as react18 from "react";
3
+ import * as react from "react";
4
4
  import { ReactElement, Ref } from "react";
5
5
  import { Text } from "react-native";
6
6
 
@@ -20,6 +20,9 @@ interface IconSlotProps extends IconPropsWithoutName {
20
20
  * consumers to pass in a standard UDS icon name, an Icon component, or a render function
21
21
  * for custom rendering.
22
22
  *
23
+ * @category Utility
24
+ * @platform mobile
25
+ *
23
26
  * @example
24
27
  * ```tsx
25
28
  * import { IconSlot } from '@yahoo/uds-mobile';
@@ -38,8 +41,10 @@ interface IconSlotProps extends IconPropsWithoutName {
38
41
  * - Pass icon name for simple usage
39
42
  * - Pass Icon component for custom props
40
43
  * - Pass function for dynamic rendering
44
+ *
45
+ * @see {@link Icon} for direct icon rendering
41
46
  */
42
- declare const IconSlot: react18.NamedExoticComponent<IconSlotProps>;
47
+ declare const IconSlot: react.NamedExoticComponent<IconSlotProps>;
43
48
  //#endregion
44
49
  export { IconSlot, type IconSlotProps, type IconSlotType };
45
50
  //# sourceMappingURL=IconSlot.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconSlot.d.cts","names":[],"sources":["../../src/components/IconSlot.tsx"],"sourcesContent":[],"mappings":";;;;;;;KAOK,oBAAA,GAAuB,KAAK;KAE5B,YAAA,GACD,WACA,aAAa,0BACA,yBAAyB,aAAa;UAE7C,aAAA,SAAsB;EAP3B,GAAA,CAAA,EAQG,GARH,CAQO,IARP,CAAA;EAEA;EACD,IAAA,CAAA,EAOK,YAPL;;;;;;;AAEkD;;;;;;AAEF;;;;;;;;;;;;;;;;cAkC9C,UAAQ,OAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"IconSlot.d.cts","names":[],"sources":["../../src/components/IconSlot.tsx"],"mappings":";;;;;;;KAOK,oBAAA,GAAuB,IAAA,CAAK,SAAA;AAAA,KAE5B,YAAA,GACD,QAAA,GACA,YAAA,CAAa,SAAA,MACX,SAAA,EAAW,oBAAA,KAAyB,YAAA,CAAa,SAAA;AAAA,UAE7C,aAAA,SAAsB,oBAAA;EAC9B,GAAA,GAAM,GAAA,CAAI,IAAA;EARa;EAUvB,IAAA,GAAO,YAAA;AAAA;;AAViC;;;;;;;;;;;;;;;;;;;;AAKsB;;;;;;;;;;;cAyC1D,QAAA,EAAQ,KAAA,CAAA,oBAAA,CAAA,aAAA"}
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { IconName, IconProps } from "./Icon.mjs";
3
- import * as react8 from "react";
3
+ import * as react from "react";
4
4
  import { ReactElement, Ref } from "react";
5
5
  import { Text } from "react-native";
6
6
 
@@ -20,6 +20,9 @@ interface IconSlotProps extends IconPropsWithoutName {
20
20
  * consumers to pass in a standard UDS icon name, an Icon component, or a render function
21
21
  * for custom rendering.
22
22
  *
23
+ * @category Utility
24
+ * @platform mobile
25
+ *
23
26
  * @example
24
27
  * ```tsx
25
28
  * import { IconSlot } from '@yahoo/uds-mobile';
@@ -38,8 +41,10 @@ interface IconSlotProps extends IconPropsWithoutName {
38
41
  * - Pass icon name for simple usage
39
42
  * - Pass Icon component for custom props
40
43
  * - Pass function for dynamic rendering
44
+ *
45
+ * @see {@link Icon} for direct icon rendering
41
46
  */
42
- declare const IconSlot: react8.NamedExoticComponent<IconSlotProps>;
47
+ declare const IconSlot: react.NamedExoticComponent<IconSlotProps>;
43
48
  //#endregion
44
49
  export { IconSlot, type IconSlotProps, type IconSlotType };
45
50
  //# sourceMappingURL=IconSlot.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconSlot.d.mts","names":[],"sources":["../../src/components/IconSlot.tsx"],"sourcesContent":[],"mappings":";;;;;;;KAOK,oBAAA,GAAuB,KAAK;KAE5B,YAAA,GACD,WACA,aAAa,0BACA,yBAAyB,aAAa;UAE7C,aAAA,SAAsB;EAP3B,GAAA,CAAA,EAQG,GARH,CAQO,IARP,CAAA;EAEA;EACD,IAAA,CAAA,EAOK,YAPL;;;;;;;AAEkD;;;;;;AAEF;;;;;;;;;;;;;;;;cAkC9C,UAAQ,MAAA,CAAA,qBAAA"}
1
+ {"version":3,"file":"IconSlot.d.mts","names":[],"sources":["../../src/components/IconSlot.tsx"],"mappings":";;;;;;;KAOK,oBAAA,GAAuB,IAAA,CAAK,SAAA;AAAA,KAE5B,YAAA,GACD,QAAA,GACA,YAAA,CAAa,SAAA,MACX,SAAA,EAAW,oBAAA,KAAyB,YAAA,CAAa,SAAA;AAAA,UAE7C,aAAA,SAAsB,oBAAA;EAC9B,GAAA,GAAM,GAAA,CAAI,IAAA;EARa;EAUvB,IAAA,GAAO,YAAA;AAAA;;AAViC;;;;;;;;;;;;;;;;;;;;AAKsB;;;;;;;;;;;cAyC1D,QAAA,EAAQ,KAAA,CAAA,oBAAA,CAAA,aAAA"}
@@ -1,4 +1,4 @@
1
- /*! © 2026 Yahoo, Inc. UDS Mobile v1.3.0-beta.7 */
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
2
  import { Icon } from "./Icon.mjs";
3
3
  import { cloneElement, isValidElement, memo } from "react";
4
4
  import { jsx } from "react/jsx-runtime";
@@ -13,6 +13,9 @@ import { isFunction } from "lodash-es";
13
13
  * consumers to pass in a standard UDS icon name, an Icon component, or a render function
14
14
  * for custom rendering.
15
15
  *
16
+ * @category Utility
17
+ * @platform mobile
18
+ *
16
19
  * @example
17
20
  * ```tsx
18
21
  * import { IconSlot } from '@yahoo/uds-mobile';
@@ -31,8 +34,10 @@ import { isFunction } from "lodash-es";
31
34
  * - Pass icon name for simple usage
32
35
  * - Pass Icon component for custom props
33
36
  * - Pass function for dynamic rendering
37
+ *
38
+ * @see {@link Icon} for direct icon rendering
34
39
  */
35
- const IconSlot = memo(function IconSlot$1({ icon, ref, ...props }) {
40
+ const IconSlot = memo(function IconSlot({ icon, ref, ...props }) {
36
41
  if (!icon) return null;
37
42
  if (typeof icon === "string") return /* @__PURE__ */ jsx(Icon, {
38
43
  ref,
@@ -1 +1 @@
1
- {"version":3,"file":"IconSlot.mjs","names":["IconSlot"],"sources":["../../src/components/IconSlot.tsx"],"sourcesContent":["import { isFunction } from 'lodash-es';\nimport type { ReactElement, Ref } from 'react';\nimport { cloneElement, isValidElement, memo } from 'react';\nimport type { Text as RNText } from 'react-native';\n\nimport type { IconName, IconProps } from './Icon';\nimport { Icon } from './Icon';\ntype IconPropsWithoutName = Omit<IconProps, 'name'>;\n\ntype IconSlotType =\n | IconName\n | ReactElement<IconProps>\n | ((iconProps: IconPropsWithoutName) => ReactElement<IconProps>);\n\ninterface IconSlotProps extends IconPropsWithoutName {\n ref?: Ref<RNText>;\n /** The icon to render. Can be a UDS icon, an Icon component, ReactNode, or a function that returns a ReactNode. */\n icon?: IconSlotType;\n /** Props to spread onto the icon. */\n}\n\n/**\n * **🔌 A helper container to render icons flexibly**\n *\n * @description\n * Useful in components that use icons and have a startIcon and endIcon. It allows\n * consumers to pass in a standard UDS icon name, an Icon component, or a render function\n * for custom rendering.\n *\n * @example\n * ```tsx\n * import { IconSlot } from '@yahoo/uds-mobile';\n *\n * // Using icon name (preferred - stable reference, no useMemo needed)\n * <IconSlot icon=\"Info\" size=\"md\" variant=\"fill\" />\n *\n * // Using Icon component\n * <IconSlot icon={<Icon name=\"Info\" variant=\"fill\" />} />\n *\n * // Using render function\n * <IconSlot icon={(props) => <Icon name=\"Info\" {...props} variant=\"fill\" />} />\n * ```\n *\n * @usage\n * - Pass icon name for simple usage\n * - Pass Icon component for custom props\n * - Pass function for dynamic rendering\n */\nconst IconSlot = memo(function IconSlot({ icon, ref, ...props }: IconSlotProps) {\n if (!icon) {\n return null;\n }\n\n if (typeof icon === 'string') {\n return <Icon ref={ref} name={icon} {...props} />;\n }\n\n if (isFunction(icon)) {\n const iconEl = icon(props);\n return isValidElement(iconEl) ? cloneElement(iconEl, { ...props } as Partial<IconProps>) : null;\n }\n\n return isValidElement(icon)\n ? cloneElement(icon, {\n ...props,\n ...icon.props, // user's props on <Icon>\n } as Partial<IconProps>)\n : null;\n});\n\nIconSlot.displayName = 'IconSlot';\n\nexport { IconSlot, type IconSlotProps, type IconSlotType };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,MAAM,WAAW,KAAK,SAASA,WAAS,EAAE,MAAM,KAAK,GAAG,SAAwB;AAC9E,KAAI,CAAC,KACH,QAAO;AAGT,KAAI,OAAO,SAAS,SAClB,QAAO,oBAAC;EAAU;EAAK,MAAM;EAAM,GAAI;GAAS;AAGlD,KAAI,WAAW,KAAK,EAAE;EACpB,MAAM,SAAS,KAAK,MAAM;AAC1B,SAAO,eAAe,OAAO,GAAG,aAAa,QAAQ,EAAE,GAAG,OAAO,CAAuB,GAAG;;AAG7F,QAAO,eAAe,KAAK,GACvB,aAAa,MAAM;EACjB,GAAG;EACH,GAAG,KAAK;EACT,CAAuB,GACxB;EACJ;AAEF,SAAS,cAAc"}
1
+ {"version":3,"file":"IconSlot.mjs","names":[],"sources":["../../src/components/IconSlot.tsx"],"sourcesContent":["import { isFunction } from 'lodash-es';\nimport type { ReactElement, Ref } from 'react';\nimport { cloneElement, isValidElement, memo } from 'react';\nimport type { Text as RNText } from 'react-native';\n\nimport type { IconName, IconProps } from './Icon';\nimport { Icon } from './Icon';\ntype IconPropsWithoutName = Omit<IconProps, 'name'>;\n\ntype IconSlotType =\n | IconName\n | ReactElement<IconProps>\n | ((iconProps: IconPropsWithoutName) => ReactElement<IconProps>);\n\ninterface IconSlotProps extends IconPropsWithoutName {\n ref?: Ref<RNText>;\n /** The icon to render. Can be a UDS icon, an Icon component, ReactNode, or a function that returns a ReactNode. */\n icon?: IconSlotType;\n /** Props to spread onto the icon. */\n}\n\n/**\n * **🔌 A helper container to render icons flexibly**\n *\n * @description\n * Useful in components that use icons and have a startIcon and endIcon. It allows\n * consumers to pass in a standard UDS icon name, an Icon component, or a render function\n * for custom rendering.\n *\n * @category Utility\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { IconSlot } from '@yahoo/uds-mobile';\n *\n * // Using icon name (preferred - stable reference, no useMemo needed)\n * <IconSlot icon=\"Info\" size=\"md\" variant=\"fill\" />\n *\n * // Using Icon component\n * <IconSlot icon={<Icon name=\"Info\" variant=\"fill\" />} />\n *\n * // Using render function\n * <IconSlot icon={(props) => <Icon name=\"Info\" {...props} variant=\"fill\" />} />\n * ```\n *\n * @usage\n * - Pass icon name for simple usage\n * - Pass Icon component for custom props\n * - Pass function for dynamic rendering\n *\n * @see {@link Icon} for direct icon rendering\n */\nconst IconSlot = memo(function IconSlot({ icon, ref, ...props }: IconSlotProps) {\n if (!icon) {\n return null;\n }\n\n if (typeof icon === 'string') {\n return <Icon ref={ref} name={icon} {...props} />;\n }\n\n if (isFunction(icon)) {\n const iconEl = icon(props);\n return isValidElement(iconEl) ? cloneElement(iconEl, { ...props } as Partial<IconProps>) : null;\n }\n\n return isValidElement(icon)\n ? cloneElement(icon, {\n ...props,\n ...icon.props, // user's props on <Icon>\n } as Partial<IconProps>)\n : null;\n});\n\nIconSlot.displayName = 'IconSlot';\n\nexport { IconSlot, type IconSlotProps, type IconSlotType };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,MAAM,WAAW,KAAK,SAAS,SAAS,EAAE,MAAM,KAAK,GAAG,SAAwB;AAC9E,KAAI,CAAC,KACH,QAAO;AAGT,KAAI,OAAO,SAAS,SAClB,QAAO,oBAAC;EAAU;EAAK,MAAM;EAAM,GAAI;GAAS;AAGlD,KAAI,WAAW,KAAK,EAAE;EACpB,MAAM,SAAS,KAAK,MAAM;AAC1B,SAAO,eAAe,OAAO,GAAG,aAAa,QAAQ,EAAE,GAAG,OAAO,CAAuB,GAAG;;AAG7F,QAAO,eAAe,KAAK,GACvB,aAAa,MAAM;EACjB,GAAG;EACH,GAAG,KAAK;EACT,CAAuB,GACxB;EACJ;AAEF,SAAS,cAAc"}
@@ -1,5 +1,6 @@
1
- /*! © 2026 Yahoo, Inc. UDS Mobile v1.3.0-beta.7 */
2
- const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
1
+ /*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
+ const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
3
4
  let react = require("react");
4
5
  let react_native = require("react-native");
5
6
  let generated_styles = require("../../generated/styles");
@@ -19,15 +20,29 @@ const CONTENT_FIT_TO_RESIZE_MODE = {
19
20
  * @description
20
21
  * Wrapper for the React Native Image component with UDS styling props.
21
22
  *
23
+ * @category Display
24
+ * @platform mobile
25
+ *
22
26
  * @example
23
27
  * ```tsx
24
- * import { Image } from '~/components/ui/Image';
28
+ * import { Image } from '@yahoo/uds-mobile';
25
29
  *
26
30
  * <Image src="https://example.com/image.png" width={200} height={150} />
27
31
  * <Image src={require('./local-image.png')} contentFit="cover" borderRadius="md" />
28
32
  * ```
33
+ *
34
+ * @usage
35
+ * - Use for displaying remote or local images
36
+ * - Use contentFit to control how the image fills its container
37
+ * - All Box styling props are supported
38
+ *
39
+ * @accessibility
40
+ * - Always provide `alt` prop for screen reader description
41
+ * - Alt text should describe the image content meaningfully
42
+ *
43
+ * @see {@link Avatar} for user profile images
29
44
  */
30
- const Image = (0, react.memo)(function Image$1({ src, alt, width, height, contentFit = "cover", style, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, display, overflow, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ref, ...props }) {
45
+ const Image = (0, react.memo)(function Image({ src, alt, width, height, contentFit = "cover", style, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, display, overflow, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ref, ...props }) {
31
46
  generated_styles.styles.useVariants({
32
47
  backgroundColor,
33
48
  borderRadius,
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { UniversalImageProps } from "../types/dist/index.cjs";
3
- import * as react19 from "react";
3
+ import * as react from "react";
4
4
  import { Ref } from "react";
5
5
  import { Image as Image$1, ImageProps as ImageProps$1 } from "react-native";
6
6
  import { StyleProps } from "../../generated/styles";
@@ -8,6 +8,7 @@ import { StyleProps } from "../../generated/styles";
8
8
  //#region src/components/Image.d.ts
9
9
  type ContentFit = NonNullable<UniversalImageProps['contentFit']>;
10
10
  interface ImageProps extends Omit<ImageProps$1, 'source' | 'src' | 'width' | 'height' | 'borderRadius'> {
11
+ /** Ref to the underlying Image element */
11
12
  ref?: Ref<Image$1>;
12
13
  /** Image source URL or require() */
13
14
  src: UniversalImageProps['src'];
@@ -71,15 +72,29 @@ interface ImageProps extends Omit<ImageProps$1, 'source' | 'src' | 'width' | 'he
71
72
  * @description
72
73
  * Wrapper for the React Native Image component with UDS styling props.
73
74
  *
75
+ * @category Display
76
+ * @platform mobile
77
+ *
74
78
  * @example
75
79
  * ```tsx
76
- * import { Image } from '~/components/ui/Image';
80
+ * import { Image } from '@yahoo/uds-mobile';
77
81
  *
78
82
  * <Image src="https://example.com/image.png" width={200} height={150} />
79
83
  * <Image src={require('./local-image.png')} contentFit="cover" borderRadius="md" />
80
84
  * ```
85
+ *
86
+ * @usage
87
+ * - Use for displaying remote or local images
88
+ * - Use contentFit to control how the image fills its container
89
+ * - All Box styling props are supported
90
+ *
91
+ * @accessibility
92
+ * - Always provide `alt` prop for screen reader description
93
+ * - Alt text should describe the image content meaningfully
94
+ *
95
+ * @see {@link Avatar} for user profile images
81
96
  */
82
- declare const Image: react19.NamedExoticComponent<ImageProps>;
97
+ declare const Image: react.NamedExoticComponent<ImageProps>;
83
98
  //#endregion
84
99
  export { Image, type ImageProps };
85
100
  //# sourceMappingURL=Image.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.cts","names":[],"sources":["../../src/components/Image.tsx"],"sourcesContent":[],"mappings":";;;;;;;;KASK,UAAA,GAAa,YAAY;UAUpB,UAAA,SAAmB,KAC3B;EAXG,GAAA,CAAA,EAcG,GAdH,CAcO,OAdG,CAAA;EAUL;EACR,GAAA,EAKK,mBALL,CAAA,KAAA,CAAA;EAGU;EAAJ,GAAA,CAAA,EAAA,MAAA;EAED;EAQQ,KAAA,CAAA,EAAA,MAAA;EAEK;EAEH,MAAA,CAAA,EAAA,MAAA;EACQ;EACF,UAAA,CAAA,EANR,UAMQ;EACK,eAAA,CAAA,EALR,UAKQ,CAAA,iBAAA,CAAA;EACF,YAAA,CAAA,EAJT,UAIS,CAAA,cAAA,CAAA;EACV,oBAAA,CAAA,EAJS,UAIT,CAAA,sBAAA,CAAA;EACK,kBAAA,CAAA,EAJE,UAIF,CAAA,oBAAA,CAAA;EACF,uBAAA,CAAA,EAJS,UAIT,CAAA,yBAAA,CAAA;EACA,qBAAA,CAAA,EAJO,UAIP,CAAA,uBAAA,CAAA;EACG,WAAA,CAAA,EAJN,UAIM,CAAA,aAAA,CAAA;EACN,gBAAA,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UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EAEpB,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,SAAA,GAAY,UAAA;EACZ,IAAA,GAAO,UAAA;EACP,aAAA,GAAgB,UAAA;EAChB,QAAA,GAAW,UAAA;EACX,UAAA,GAAa,UAAA;EACb,QAAA,GAAW,UAAA;EACX,cAAA,GAAiB,UAAA;EAEjB,OAAA,GAAU,UAAA;EACV,QAAA,GAAW,UAAA;EAEX,OAAA,GAAU,UAAA;EACV,iBAAA,GAAoB,UAAA;EACpB,eAAA,GAAkB,UAAA;EAClB,aAAA,GAAgB,UAAA;EAChB,UAAA,GAAa,UAAA;EACb,YAAA,GAAe,UAAA;EACf,UAAA,GAAa,UAAA;EACb,MAAA,GAAS,UAAA;EACT,cAAA,GAAiB,UAAA;EACjB,gBAAA,GAAmB,UAAA;EACnB,YAAA,GAAe,UAAA;EACf,SAAA,GAAY,UAAA;EACZ,WAAA,GAAc,UAAA;EACd,SAAA,GAAY,UAAA;EACZ,SAAA,GAAY,UAAA;EACZ,MAAA,GAAS,UAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BL,KAAA,EAAK,KAAA,CAAA,oBAAA,CAAA,UAAA"}
@@ -1,6 +1,6 @@
1
1
 
2
2
  import { UniversalImageProps } from "../types/dist/index.mjs";
3
- import * as react10 from "react";
3
+ import * as react from "react";
4
4
  import { Ref } from "react";
5
5
  import { Image as Image$1, ImageProps as ImageProps$1 } from "react-native";
6
6
  import { StyleProps } from "../../generated/styles";
@@ -8,6 +8,7 @@ import { StyleProps } from "../../generated/styles";
8
8
  //#region src/components/Image.d.ts
9
9
  type ContentFit = NonNullable<UniversalImageProps['contentFit']>;
10
10
  interface ImageProps extends Omit<ImageProps$1, 'source' | 'src' | 'width' | 'height' | 'borderRadius'> {
11
+ /** Ref to the underlying Image element */
11
12
  ref?: Ref<Image$1>;
12
13
  /** Image source URL or require() */
13
14
  src: UniversalImageProps['src'];
@@ -71,15 +72,29 @@ interface ImageProps extends Omit<ImageProps$1, 'source' | 'src' | 'width' | 'he
71
72
  * @description
72
73
  * Wrapper for the React Native Image component with UDS styling props.
73
74
  *
75
+ * @category Display
76
+ * @platform mobile
77
+ *
74
78
  * @example
75
79
  * ```tsx
76
- * import { Image } from '~/components/ui/Image';
80
+ * import { Image } from '@yahoo/uds-mobile';
77
81
  *
78
82
  * <Image src="https://example.com/image.png" width={200} height={150} />
79
83
  * <Image src={require('./local-image.png')} contentFit="cover" borderRadius="md" />
80
84
  * ```
85
+ *
86
+ * @usage
87
+ * - Use for displaying remote or local images
88
+ * - Use contentFit to control how the image fills its container
89
+ * - All Box styling props are supported
90
+ *
91
+ * @accessibility
92
+ * - Always provide `alt` prop for screen reader description
93
+ * - Alt text should describe the image content meaningfully
94
+ *
95
+ * @see {@link Avatar} for user profile images
81
96
  */
82
- declare const Image: react10.NamedExoticComponent<ImageProps>;
97
+ declare const Image: react.NamedExoticComponent<ImageProps>;
83
98
  //#endregion
84
99
  export { Image, type ImageProps };
85
100
  //# sourceMappingURL=Image.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.mts","names":[],"sources":["../../src/components/Image.tsx"],"sourcesContent":[],"mappings":";;;;;;;;KASK,UAAA,GAAa,YAAY;UAUpB,UAAA,SAAmB,KAC3B;EAXG,GAAA,CAAA,EAcG,GAdH,CAcO,OAdG,CAAA;EAUL;EACR,GAAA,EAKK,mBALL,CAAA,KAAA,CAAA;EAGU;EAAJ,GAAA,CAAA,EAAA,MAAA;EAED;EAQQ,KAAA,CAAA,EAAA,MAAA;EAEK;EAEH,MAAA,CAAA,EAAA,MAAA;EACQ;EACF,UAAA,CAAA,EANR,UAMQ;EACK,eAAA,CAAA,EALR,UAKQ,CAAA,iBAAA,CAAA;EACF,YAAA,CAAA,EA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 /*! © 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
4
  import { styles } from "../../generated/styles";
@@ -18,15 +18,29 @@ const CONTENT_FIT_TO_RESIZE_MODE = {
18
18
  * @description
19
19
  * Wrapper for the React Native Image component with UDS styling props.
20
20
  *
21
+ * @category Display
22
+ * @platform mobile
23
+ *
21
24
  * @example
22
25
  * ```tsx
23
- * import { Image } from '~/components/ui/Image';
26
+ * import { Image } from '@yahoo/uds-mobile';
24
27
  *
25
28
  * <Image src="https://example.com/image.png" width={200} height={150} />
26
29
  * <Image src={require('./local-image.png')} contentFit="cover" borderRadius="md" />
27
30
  * ```
31
+ *
32
+ * @usage
33
+ * - Use for displaying remote or local images
34
+ * - Use contentFit to control how the image fills its container
35
+ * - All Box styling props are supported
36
+ *
37
+ * @accessibility
38
+ * - Always provide `alt` prop for screen reader description
39
+ * - Alt text should describe the image content meaningfully
40
+ *
41
+ * @see {@link Avatar} for user profile images
28
42
  */
29
- const Image = memo(function Image$2({ src, alt, width, height, contentFit = "cover", style, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, display, overflow, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ref, ...props }) {
43
+ const Image = memo(function Image({ src, alt, width, height, contentFit = "cover", style, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, display, overflow, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, ref, ...props }) {
30
44
  styles.useVariants({
31
45
  backgroundColor,
32
46
  borderRadius,
@@ -1 +1 @@
1
- {"version":3,"file":"Image.mjs","names":["CONTENT_FIT_TO_RESIZE_MODE: Record<ContentFit, ImageStyle['resizeMode']>","Image","RNImage"],"sources":["../../src/components/Image.tsx"],"sourcesContent":["import type { UniversalImageProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { ImageProps as RNImageProps, ImageStyle } from 'react-native';\nimport { Image as RNImage } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\n\ntype ContentFit = NonNullable<UniversalImageProps['contentFit']>;\n\nconst CONTENT_FIT_TO_RESIZE_MODE: Record<ContentFit, ImageStyle['resizeMode']> = {\n cover: 'cover',\n contain: 'contain',\n fill: 'stretch',\n none: 'center',\n 'scale-down': 'contain',\n};\n\ninterface ImageProps extends Omit<\n RNImageProps,\n 'source' | 'src' | 'width' | 'height' | 'borderRadius'\n> {\n ref?: Ref<RNImage>;\n /** Image source URL or require() */\n src: UniversalImageProps['src'];\n /** Alt text for accessibility */\n alt?: string;\n /** Image width */\n width?: number;\n /** Image height */\n height?: number;\n /** How to fit the image within its container */\n contentFit?: ContentFit;\n // Background\n backgroundColor?: StyleProps['backgroundColor'];\n // Border\n borderRadius?: StyleProps['borderRadius'];\n borderTopStartRadius?: StyleProps['borderTopStartRadius'];\n borderTopEndRadius?: StyleProps['borderTopEndRadius'];\n borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];\n borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];\n borderColor?: StyleProps['borderColor'];\n borderStartColor?: StyleProps['borderStartColor'];\n borderEndColor?: StyleProps['borderEndColor'];\n borderTopColor?: StyleProps['borderTopColor'];\n borderBottomColor?: StyleProps['borderBottomColor'];\n borderWidth?: StyleProps['borderWidth'];\n borderVerticalWidth?: StyleProps['borderVerticalWidth'];\n borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];\n borderStartWidth?: StyleProps['borderStartWidth'];\n borderEndWidth?: StyleProps['borderEndWidth'];\n borderTopWidth?: StyleProps['borderTopWidth'];\n borderBottomWidth?: StyleProps['borderBottomWidth'];\n // Flex\n alignContent?: StyleProps['alignContent'];\n alignItems?: StyleProps['alignItems'];\n alignSelf?: StyleProps['alignSelf'];\n flex?: StyleProps['flex'];\n flexDirection?: StyleProps['flexDirection'];\n flexGrow?: StyleProps['flexGrow'];\n flexShrink?: StyleProps['flexShrink'];\n flexWrap?: StyleProps['flexWrap'];\n justifyContent?: StyleProps['justifyContent'];\n // Layout\n display?: StyleProps['display'];\n overflow?: StyleProps['overflow'];\n // Spacing\n spacing?: StyleProps['spacing'];\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingVertical?: StyleProps['spacingVertical'];\n spacingBottom?: StyleProps['spacingBottom'];\n spacingEnd?: StyleProps['spacingEnd'];\n spacingStart?: StyleProps['spacingStart'];\n spacingTop?: StyleProps['spacingTop'];\n offset?: StyleProps['offset'];\n offsetVertical?: StyleProps['offsetVertical'];\n offsetHorizontal?: StyleProps['offsetHorizontal'];\n offsetBottom?: StyleProps['offsetBottom'];\n offsetEnd?: StyleProps['offsetEnd'];\n offsetStart?: StyleProps['offsetStart'];\n offsetTop?: StyleProps['offsetTop'];\n columnGap?: StyleProps['columnGap'];\n rowGap?: StyleProps['rowGap'];\n}\n\n/**\n * **A component for displaying images**\n *\n * @description\n * Wrapper for the React Native Image component with UDS styling props.\n *\n * @example\n * ```tsx\n * import { Image } from '~/components/ui/Image';\n *\n * <Image src=\"https://example.com/image.png\" width={200} height={150} />\n * <Image src={require('./local-image.png')} contentFit=\"cover\" borderRadius=\"md\" />\n * ```\n */\nconst Image = memo(function Image({\n src,\n alt,\n width,\n height,\n contentFit = 'cover',\n style,\n // background\n backgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // layout\n display,\n overflow,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n ref,\n ...props\n}: ImageProps) {\n // Apply styles using useVariants\n styles.useVariants({\n backgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // layout\n display,\n overflow,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n });\n\n const source = useMemo(() => (typeof src === 'string' ? { uri: src } : src), [src]);\n\n // styles.foundation must be in deps - it returns a new reference when variants change\n const imageStyles = useMemo(\n () => [styles.foundation as ImageStyle, { width, height }, style],\n [styles.foundation, width, height, style],\n );\n\n return (\n <RNImage\n ref={ref}\n source={source}\n accessibilityLabel={alt}\n resizeMode={CONTENT_FIT_TO_RESIZE_MODE[contentFit]}\n style={imageStyles}\n {...props}\n />\n );\n});\n\nImage.displayName = 'Image';\n\nexport { Image, type ImageProps };\n"],"mappings":";;;;;;;AAWA,MAAMA,6BAA2E;CAC/E,OAAO;CACP,SAAS;CACT,MAAM;CACN,MAAM;CACN,cAAc;CACf;;;;;;;;;;;;;;;AAmFD,MAAM,QAAQ,KAAK,SAASC,QAAM,EAChC,KACA,KACA,OACA,QACA,aAAa,SACb,OAEA,iBAEA,cACA,sBACA,oBACA,yBACA,uBACA,aACA,kBACA,gBACA,gBACA,mBACA,aACA,qBACA,uBACA,kBACA,gBACA,gBACA,mBAEA,cACA,YACA,WACA,MACA,eACA,UACA,YACA,UACA,gBAEA,SACA,UAEA,SACA,mBACA,iBACA,eACA,YACA,cACA,YACA,QACA,gBACA,kBACA,cACA,WACA,aACA,WACA,WACA,QACA,KACA,GAAG,SACU;AAEb,QAAO,YAAY;EACjB;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,SAAS,cAAe,OAAO,QAAQ,WAAW,EAAE,KAAK,KAAK,GAAG,KAAM,CAAC,IAAI,CAAC;CAGnF,MAAM,cAAc,cACZ;EAAC,OAAO;EAA0B;GAAE;GAAO;GAAQ;EAAE;EAAM,EACjE;EAAC,OAAO;EAAY;EAAO;EAAQ;EAAM,CAC1C;AAED,QACE,oBAACC;EACM;EACG;EACR,oBAAoB;EACpB,YAAY,2BAA2B;EACvC,OAAO;EACP,GAAI;GACJ;EAEJ;AAEF,MAAM,cAAc"}
1
+ {"version":3,"file":"Image.mjs","names":["RNImage"],"sources":["../../src/components/Image.tsx"],"sourcesContent":["import type { UniversalImageProps } from '@yahoo/uds-types';\nimport type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { ImageProps as RNImageProps, ImageStyle } from 'react-native';\nimport { Image as RNImage } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\n\ntype ContentFit = NonNullable<UniversalImageProps['contentFit']>;\n\nconst CONTENT_FIT_TO_RESIZE_MODE: Record<ContentFit, ImageStyle['resizeMode']> = {\n cover: 'cover',\n contain: 'contain',\n fill: 'stretch',\n none: 'center',\n 'scale-down': 'contain',\n};\n\ninterface ImageProps extends Omit<\n RNImageProps,\n 'source' | 'src' | 'width' | 'height' | 'borderRadius'\n> {\n /** Ref to the underlying Image element */\n ref?: Ref<RNImage>;\n /** Image source URL or require() */\n src: UniversalImageProps['src'];\n /** Alt text for accessibility */\n alt?: string;\n /** Image width */\n width?: number;\n /** Image height */\n height?: number;\n /** How to fit the image within its container */\n contentFit?: ContentFit;\n // Background\n backgroundColor?: StyleProps['backgroundColor'];\n // Border\n borderRadius?: StyleProps['borderRadius'];\n borderTopStartRadius?: StyleProps['borderTopStartRadius'];\n borderTopEndRadius?: StyleProps['borderTopEndRadius'];\n borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];\n borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];\n borderColor?: StyleProps['borderColor'];\n borderStartColor?: StyleProps['borderStartColor'];\n borderEndColor?: StyleProps['borderEndColor'];\n borderTopColor?: StyleProps['borderTopColor'];\n borderBottomColor?: StyleProps['borderBottomColor'];\n borderWidth?: StyleProps['borderWidth'];\n borderVerticalWidth?: StyleProps['borderVerticalWidth'];\n borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];\n borderStartWidth?: StyleProps['borderStartWidth'];\n borderEndWidth?: StyleProps['borderEndWidth'];\n borderTopWidth?: StyleProps['borderTopWidth'];\n borderBottomWidth?: StyleProps['borderBottomWidth'];\n // Flex\n alignContent?: StyleProps['alignContent'];\n alignItems?: StyleProps['alignItems'];\n alignSelf?: StyleProps['alignSelf'];\n flex?: StyleProps['flex'];\n flexDirection?: StyleProps['flexDirection'];\n flexGrow?: StyleProps['flexGrow'];\n flexShrink?: StyleProps['flexShrink'];\n flexWrap?: StyleProps['flexWrap'];\n justifyContent?: StyleProps['justifyContent'];\n // Layout\n display?: StyleProps['display'];\n overflow?: StyleProps['overflow'];\n // Spacing\n spacing?: StyleProps['spacing'];\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingVertical?: StyleProps['spacingVertical'];\n spacingBottom?: StyleProps['spacingBottom'];\n spacingEnd?: StyleProps['spacingEnd'];\n spacingStart?: StyleProps['spacingStart'];\n spacingTop?: StyleProps['spacingTop'];\n offset?: StyleProps['offset'];\n offsetVertical?: StyleProps['offsetVertical'];\n offsetHorizontal?: StyleProps['offsetHorizontal'];\n offsetBottom?: StyleProps['offsetBottom'];\n offsetEnd?: StyleProps['offsetEnd'];\n offsetStart?: StyleProps['offsetStart'];\n offsetTop?: StyleProps['offsetTop'];\n columnGap?: StyleProps['columnGap'];\n rowGap?: StyleProps['rowGap'];\n}\n\n/**\n * **A component for displaying images**\n *\n * @description\n * Wrapper for the React Native Image component with UDS styling props.\n *\n * @category Display\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Image } from '@yahoo/uds-mobile';\n *\n * <Image src=\"https://example.com/image.png\" width={200} height={150} />\n * <Image src={require('./local-image.png')} contentFit=\"cover\" borderRadius=\"md\" />\n * ```\n *\n * @usage\n * - Use for displaying remote or local images\n * - Use contentFit to control how the image fills its container\n * - All Box styling props are supported\n *\n * @accessibility\n * - Always provide `alt` prop for screen reader description\n * - Alt text should describe the image content meaningfully\n *\n * @see {@link Avatar} for user profile images\n */\nconst Image = memo(function Image({\n src,\n alt,\n width,\n height,\n contentFit = 'cover',\n style,\n // background\n backgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // layout\n display,\n overflow,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n ref,\n ...props\n}: ImageProps) {\n // Apply styles using useVariants\n styles.useVariants({\n backgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // layout\n display,\n overflow,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n });\n\n const source = useMemo(() => (typeof src === 'string' ? { uri: src } : src), [src]);\n\n // styles.foundation must be in deps - it returns a new reference when variants change\n const imageStyles = useMemo(\n () => [styles.foundation as ImageStyle, { width, height }, style],\n [styles.foundation, width, height, style],\n );\n\n return (\n <RNImage\n ref={ref}\n source={source}\n accessibilityLabel={alt}\n resizeMode={CONTENT_FIT_TO_RESIZE_MODE[contentFit]}\n style={imageStyles}\n {...props}\n />\n );\n});\n\nImage.displayName = 'Image';\n\nexport { Image, type ImageProps };\n"],"mappings":";;;;;;;AAWA,MAAM,6BAA2E;CAC/E,OAAO;CACP,SAAS;CACT,MAAM;CACN,MAAM;CACN,cAAc;CACf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkGD,MAAM,QAAQ,KAAK,SAAS,MAAM,EAChC,KACA,KACA,OACA,QACA,aAAa,SACb,OAEA,iBAEA,cACA,sBACA,oBACA,yBACA,uBACA,aACA,kBACA,gBACA,gBACA,mBACA,aACA,qBACA,uBACA,kBACA,gBACA,gBACA,mBAEA,cACA,YACA,WACA,MACA,eACA,UACA,YACA,UACA,gBAEA,SACA,UAEA,SACA,mBACA,iBACA,eACA,YACA,cACA,YACA,QACA,gBACA,kBACA,cACA,WACA,aACA,WACA,WACA,QACA,KACA,GAAG,SACU;AAEb,QAAO,YAAY;EACjB;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,SAAS,cAAe,OAAO,QAAQ,WAAW,EAAE,KAAK,KAAK,GAAG,KAAM,CAAC,IAAI,CAAC;CAGnF,MAAM,cAAc,cACZ;EAAC,OAAO;EAA0B;GAAE;GAAO;GAAQ;EAAE;EAAM,EACjE;EAAC,OAAO;EAAY;EAAO;EAAQ;EAAM,CAC1C;AAED,QACE,oBAACA;EACM;EACG;EACR,oBAAoB;EACpB,YAAY,2BAA2B;EACvC,OAAO;EACP,GAAI;GACJ;EAEJ;AAEF,MAAM,cAAc"}