@yahoo/uds-mobile 2.7.1 → 2.9.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.
- package/dist/_virtual/_rolldown/runtime.cjs +12 -22
- package/dist/_virtual/_rolldown/runtime.js +6 -11
- package/dist/bin/fixtures/dist/index.mjs +17 -20
- package/dist/bin/fonts/dist/index.mjs +22 -13
- package/dist/bin/generateTheme.mjs +2 -5
- package/dist/bin/mobile/scripts/utils/configToRNMappings.mjs +1 -2
- package/dist/bin/modes/dist/index.mjs +1 -2
- package/dist/bin/palette/dist/index.mjs +15 -4
- package/dist/bin/uds-mobile.mjs +1 -3
- package/dist/components/AndroidBackHandler.cjs +3 -5
- package/dist/components/AndroidBackHandler.js +1 -2
- package/dist/components/AndroidBackHandler.js.map +1 -1
- package/dist/components/Avatar.cjs +6 -8
- package/dist/components/Avatar.d.cts +2 -2
- package/dist/components/Avatar.d.cts.map +1 -1
- package/dist/components/Avatar.d.ts +2 -2
- package/dist/components/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar.js +1 -2
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Badge.cjs +6 -8
- package/dist/components/Badge.d.cts +2 -2
- package/dist/components/Badge.d.cts.map +1 -1
- package/dist/components/Badge.d.ts +2 -2
- package/dist/components/Badge.d.ts.map +1 -1
- package/dist/components/Badge.js +1 -2
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/Banner/Banner.cjs +7 -9
- package/dist/components/Banner/Banner.d.cts +2 -2
- package/dist/components/Banner/Banner.d.cts.map +1 -1
- package/dist/components/Banner/Banner.d.ts +2 -2
- package/dist/components/Banner/Banner.d.ts.map +1 -1
- package/dist/components/Banner/Banner.js +1 -2
- package/dist/components/Banner/Banner.js.map +1 -1
- package/dist/components/Banner/BannerContent.cjs +3 -5
- package/dist/components/Banner/BannerContent.d.cts +2 -2
- package/dist/components/Banner/BannerContent.d.cts.map +1 -1
- package/dist/components/Banner/BannerContent.d.ts +2 -2
- package/dist/components/Banner/BannerContent.d.ts.map +1 -1
- package/dist/components/Banner/BannerContent.js +1 -2
- package/dist/components/Banner/BannerContent.js.map +1 -1
- package/dist/components/Banner/BannerDescription.cjs +4 -6
- package/dist/components/Banner/BannerDescription.d.cts +2 -2
- package/dist/components/Banner/BannerDescription.d.cts.map +1 -1
- package/dist/components/Banner/BannerDescription.d.ts +2 -2
- package/dist/components/Banner/BannerDescription.d.ts.map +1 -1
- package/dist/components/Banner/BannerDescription.js +1 -2
- package/dist/components/Banner/BannerDescription.js.map +1 -1
- package/dist/components/Banner/BannerTitle.cjs +4 -6
- package/dist/components/Banner/BannerTitle.d.cts +2 -2
- package/dist/components/Banner/BannerTitle.d.cts.map +1 -1
- package/dist/components/Banner/BannerTitle.d.ts +2 -2
- package/dist/components/Banner/BannerTitle.d.ts.map +1 -1
- package/dist/components/Banner/BannerTitle.js +1 -2
- package/dist/components/Banner/BannerTitle.js.map +1 -1
- package/dist/components/Banner/index.cjs +6 -7
- package/dist/components/Banner/index.js +1 -2
- package/dist/components/Banner/utils.cjs +3 -5
- package/dist/components/Banner/utils.js +1 -2
- package/dist/components/Banner/utils.js.map +1 -1
- package/dist/components/BlurTarget.cjs +3 -5
- package/dist/components/BlurTarget.d.cts +2 -2
- package/dist/components/BlurTarget.d.cts.map +1 -1
- package/dist/components/BlurTarget.d.ts +2 -2
- package/dist/components/BlurTarget.d.ts.map +1 -1
- package/dist/components/BlurTarget.js +1 -2
- package/dist/components/BlurTarget.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +16 -18
- package/dist/components/BottomSheet/BottomSheet.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.js +1 -2
- package/dist/components/BottomSheet/BottomSheet.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetContent.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetContent.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetContent.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetContent.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetContent.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetContent.js +1 -2
- package/dist/components/BottomSheet/BottomSheetContent.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetDismiss.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetDismiss.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetDismiss.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetDismiss.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetDismiss.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetDismiss.js +1 -2
- package/dist/components/BottomSheet/BottomSheetDismiss.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHandle.cjs +5 -7
- package/dist/components/BottomSheet/BottomSheetHandle.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetHandle.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHandle.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetHandle.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHandle.js +1 -2
- package/dist/components/BottomSheet/BottomSheetHandle.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHeader.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetHeader.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetHeader.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHeader.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetHeader.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetHeader.js +1 -2
- package/dist/components/BottomSheet/BottomSheetHeader.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetInternalProvider.cjs +3 -5
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetInternalProvider.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetInternalProvider.js +1 -2
- package/dist/components/BottomSheet/BottomSheetInternalProvider.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetProvider.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetProvider.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetProvider.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetProvider.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetProvider.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetProvider.js +1 -2
- package/dist/components/BottomSheet/BottomSheetProvider.js.map +1 -1
- package/dist/components/BottomSheet/BottomSheetTrigger.cjs +4 -6
- package/dist/components/BottomSheet/BottomSheetTrigger.d.cts +2 -2
- package/dist/components/BottomSheet/BottomSheetTrigger.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetTrigger.d.ts +2 -2
- package/dist/components/BottomSheet/BottomSheetTrigger.d.ts.map +1 -1
- package/dist/components/BottomSheet/BottomSheetTrigger.js +1 -2
- package/dist/components/BottomSheet/BottomSheetTrigger.js.map +1 -1
- package/dist/components/BottomSheet/index.cjs +10 -11
- package/dist/components/BottomSheet/index.js +1 -2
- package/dist/components/BottomSheet/useBottomSheetDrag.cjs +4 -6
- package/dist/components/BottomSheet/useBottomSheetDrag.js +1 -2
- package/dist/components/BottomSheet/useBottomSheetDrag.js.map +1 -1
- package/dist/components/BottomSheet/useBottomSheetScroll.cjs +4 -6
- package/dist/components/BottomSheet/useBottomSheetScroll.d.cts +5 -5
- package/dist/components/BottomSheet/useBottomSheetScroll.d.ts +5 -5
- package/dist/components/BottomSheet/useBottomSheetScroll.js +1 -2
- package/dist/components/BottomSheet/useBottomSheetScroll.js.map +1 -1
- package/dist/components/BottomSheet/useBottomSheetSnapModel.cjs +6 -8
- package/dist/components/BottomSheet/useBottomSheetSnapModel.js +3 -4
- package/dist/components/BottomSheet/useBottomSheetSnapModel.js.map +1 -1
- package/dist/components/BottomSheet/useBottomSheetStore.cjs +3 -5
- package/dist/components/BottomSheet/useBottomSheetStore.js +1 -2
- package/dist/components/BottomSheet/useBottomSheetStore.js.map +1 -1
- package/dist/components/BottomSheet/useExpansionMargins.cjs +4 -6
- package/dist/components/BottomSheet/useExpansionMargins.js +1 -2
- package/dist/components/BottomSheet/useExpansionMargins.js.map +1 -1
- package/dist/components/BottomSheet/useKeyboardAvoidance.cjs +3 -5
- package/dist/components/BottomSheet/useKeyboardAvoidance.js +1 -2
- package/dist/components/BottomSheet/useKeyboardAvoidance.js.map +1 -1
- package/dist/components/BottomSheet/utils.cjs +2 -4
- package/dist/components/BottomSheet/utils.js +1 -1
- package/dist/components/BottomSheet/utils.js.map +1 -1
- package/dist/components/Box.cjs +3 -5
- package/dist/components/Box.d.cts +2 -2
- package/dist/components/Box.d.cts.map +1 -1
- package/dist/components/Box.d.ts +2 -2
- package/dist/components/Box.d.ts.map +1 -1
- package/dist/components/Box.js +1 -2
- package/dist/components/Box.js.map +1 -1
- package/dist/components/Button.cjs +8 -10
- package/dist/components/Button.d.cts +2 -2
- package/dist/components/Button.d.cts.map +1 -1
- package/dist/components/Button.d.ts +2 -2
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +1 -2
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Checkbox.cjs +9 -11
- package/dist/components/Checkbox.d.cts +2 -2
- package/dist/components/Checkbox.d.cts.map +1 -1
- package/dist/components/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox.d.ts.map +1 -1
- package/dist/components/Checkbox.js +1 -2
- package/dist/components/Checkbox.js.map +1 -1
- package/dist/components/Chip.cjs +7 -9
- package/dist/components/Chip.d.cts +2 -2
- package/dist/components/Chip.d.cts.map +1 -1
- package/dist/components/Chip.d.ts +2 -2
- package/dist/components/Chip.d.ts.map +1 -1
- package/dist/components/Chip.js +1 -2
- package/dist/components/Chip.js.map +1 -1
- package/dist/components/HStack.cjs +4 -6
- package/dist/components/HStack.d.cts +2 -2
- package/dist/components/HStack.d.cts.map +1 -1
- package/dist/components/HStack.d.ts +2 -2
- package/dist/components/HStack.d.ts.map +1 -1
- package/dist/components/HStack.js +1 -2
- package/dist/components/HStack.js.map +1 -1
- package/dist/components/Icon.cjs +3 -5
- package/dist/components/Icon.d.cts +4 -4
- package/dist/components/Icon.d.cts.map +1 -1
- package/dist/components/Icon.d.ts +4 -4
- package/dist/components/Icon.d.ts.map +1 -1
- package/dist/components/Icon.js +1 -2
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/IconButton.cjs +7 -9
- package/dist/components/IconButton.d.cts +2 -2
- package/dist/components/IconButton.d.cts.map +1 -1
- package/dist/components/IconButton.d.ts +2 -2
- package/dist/components/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton.js +1 -2
- package/dist/components/IconButton.js.map +1 -1
- package/dist/components/IconSlot.cjs +4 -6
- package/dist/components/IconSlot.d.cts +2 -2
- package/dist/components/IconSlot.d.cts.map +1 -1
- package/dist/components/IconSlot.d.ts +2 -2
- package/dist/components/IconSlot.d.ts.map +1 -1
- package/dist/components/IconSlot.js +1 -2
- package/dist/components/IconSlot.js.map +1 -1
- package/dist/components/Image.cjs +3 -5
- package/dist/components/Image.d.cts +2 -2
- package/dist/components/Image.d.cts.map +1 -1
- package/dist/components/Image.d.ts +2 -2
- package/dist/components/Image.d.ts.map +1 -1
- package/dist/components/Image.js +1 -2
- package/dist/components/Image.js.map +1 -1
- package/dist/components/Input.cjs +7 -9
- package/dist/components/Input.d.cts +2 -2
- package/dist/components/Input.d.cts.map +1 -1
- package/dist/components/Input.d.ts +2 -2
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +1 -2
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Link.cjs +4 -6
- package/dist/components/Link.d.cts +2 -2
- package/dist/components/Link.d.cts.map +1 -1
- package/dist/components/Link.d.ts +2 -2
- package/dist/components/Link.d.ts.map +1 -1
- package/dist/components/Link.js +1 -2
- package/dist/components/Link.js.map +1 -1
- package/dist/components/Pressable.cjs +3 -5
- package/dist/components/Pressable.d.cts +4 -4
- package/dist/components/Pressable.d.cts.map +1 -1
- package/dist/components/Pressable.d.ts +4 -4
- package/dist/components/Pressable.d.ts.map +1 -1
- package/dist/components/Pressable.js +1 -2
- package/dist/components/Pressable.js.map +1 -1
- package/dist/components/Radio.cjs +8 -10
- package/dist/components/Radio.d.cts +2 -2
- package/dist/components/Radio.d.cts.map +1 -1
- package/dist/components/Radio.d.ts +2 -2
- package/dist/components/Radio.d.ts.map +1 -1
- package/dist/components/Radio.js +1 -2
- package/dist/components/Radio.js.map +1 -1
- package/dist/components/Screen.cjs +5 -7
- package/dist/components/Screen.d.cts +2 -2
- package/dist/components/Screen.d.cts.map +1 -1
- package/dist/components/Screen.d.ts +2 -2
- package/dist/components/Screen.d.ts.map +1 -1
- package/dist/components/Screen.js +1 -2
- package/dist/components/Screen.js.map +1 -1
- package/dist/components/Scrim.cjs +4 -6
- package/dist/components/Scrim.d.cts +2 -2
- package/dist/components/Scrim.d.cts.map +1 -1
- package/dist/components/Scrim.d.ts +2 -2
- package/dist/components/Scrim.d.ts.map +1 -1
- package/dist/components/Scrim.js +1 -2
- package/dist/components/Scrim.js.map +1 -1
- package/dist/components/Switch.cjs +6 -8
- package/dist/components/Switch.d.cts +2 -2
- package/dist/components/Switch.d.cts.map +1 -1
- package/dist/components/Switch.d.ts +2 -2
- package/dist/components/Switch.d.ts.map +1 -1
- package/dist/components/Switch.js +1 -2
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Text.cjs +3 -5
- package/dist/components/Text.d.cts +2 -2
- package/dist/components/Text.d.cts.map +1 -1
- package/dist/components/Text.d.ts +2 -2
- package/dist/components/Text.d.ts.map +1 -1
- package/dist/components/Text.js +1 -2
- package/dist/components/Text.js.map +1 -1
- package/dist/components/UDSProvider.cjs +4 -6
- package/dist/components/UDSProvider.d.cts +2 -2
- package/dist/components/UDSProvider.d.cts.map +1 -1
- package/dist/components/UDSProvider.d.ts +2 -2
- package/dist/components/UDSProvider.d.ts.map +1 -1
- package/dist/components/UDSProvider.js +1 -2
- package/dist/components/UDSProvider.js.map +1 -1
- package/dist/components/VStack.cjs +4 -6
- package/dist/components/VStack.d.cts +2 -2
- package/dist/components/VStack.d.cts.map +1 -1
- package/dist/components/VStack.d.ts +2 -2
- package/dist/components/VStack.d.ts.map +1 -1
- package/dist/components/VStack.js +1 -2
- package/dist/components/VStack.js.map +1 -1
- package/dist/jest/index.cjs +8 -10
- package/dist/jest/index.js +1 -2
- package/dist/jest/index.js.map +1 -1
- package/dist/jest/mocks/icons.cjs +8 -11
- package/dist/jest/mocks/icons.js +1 -2
- package/dist/jest/mocks/icons.js.map +1 -1
- package/dist/jest/mocks/react-native.cjs +6 -5
- package/dist/jest/mocks/react-native.js +1 -2
- package/dist/jest/mocks/react-native.js.map +1 -1
- package/dist/jest/mocks/reanimated.cjs +11 -10
- package/dist/jest/mocks/reanimated.js +1 -2
- package/dist/jest/mocks/reanimated.js.map +1 -1
- package/dist/jest/mocks/styles.cjs +8 -11
- package/dist/jest/mocks/styles.js +1 -2
- package/dist/jest/mocks/styles.js.map +1 -1
- package/dist/jest/mocks/svg.cjs +11 -10
- package/dist/jest/mocks/svg.js +2 -3
- package/dist/jest/mocks/svg.js.map +1 -1
- package/dist/jest/mocks/unistyles.cjs +8 -11
- package/dist/jest/mocks/unistyles.js +1 -2
- package/dist/jest/mocks/unistyles.js.map +1 -1
- package/dist/jest/setup.cjs +6 -8
- package/dist/jest/setup.js +1 -2
- package/dist/jest/setup.js.map +1 -1
- package/dist/motion-tokens/dist/index.cjs +1 -3
- package/dist/motion-tokens/dist/index.js +1 -1
- package/dist/motion-tokens/dist/index.js.map +1 -1
- package/dist/motion.cjs +3 -5
- package/dist/motion.js +1 -2
- package/dist/motion.js.map +1 -1
- package/dist/native/UDSScreenCornerRadiusModule.cjs +2 -4
- package/dist/native/UDSScreenCornerRadiusModule.js +1 -1
- package/dist/portal.cjs +3 -5
- package/dist/portal.d.cts +2 -2
- package/dist/portal.d.cts.map +1 -1
- package/dist/portal.d.ts +2 -2
- package/dist/portal.d.ts.map +1 -1
- package/dist/portal.js +1 -2
- package/dist/portal.js.map +1 -1
- package/fonts/uds-icons.ttf +0 -0
- package/package.json +1 -1
package/dist/components/Text.cjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let react_native = require("react-native");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
let generated_styles = require("../../generated/styles");
|
|
8
|
-
|
|
9
8
|
//#region src/components/Text.tsx
|
|
10
9
|
/**
|
|
11
10
|
* **📝 A text component with UDS styling**
|
|
@@ -112,6 +111,5 @@ const Text = (0, react.memo)(function Text({ color = "primary", variant = "body1
|
|
|
112
111
|
});
|
|
113
112
|
});
|
|
114
113
|
Text.displayName = "Text";
|
|
115
|
-
|
|
116
114
|
//#endregion
|
|
117
|
-
exports.Text = Text;
|
|
115
|
+
exports.Text = Text;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import * as react from "react";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
import { Ref } from "react";
|
|
4
4
|
import { Text as Text$1, TextProps as TextProps$1, TextStyle } from "react-native";
|
|
5
5
|
import { StyleProps } from "../../generated/styles";
|
|
@@ -102,7 +102,7 @@ interface TextProps extends TextProps$1 {
|
|
|
102
102
|
*
|
|
103
103
|
* @see {@link Link} for interactive text links
|
|
104
104
|
*/
|
|
105
|
-
declare const Text: react.NamedExoticComponent<TextProps>;
|
|
105
|
+
declare const Text: _$react.NamedExoticComponent<TextProps>;
|
|
106
106
|
//#endregion
|
|
107
107
|
export { Text, type TextProps };
|
|
108
108
|
//# sourceMappingURL=Text.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.cts","names":[],"sources":["../../src/components/Text.tsx"],"mappings":";;;;;;;KASK,WAAA,GAAc,OAAA,CACjB,UAAA;AAAA,KAMG,kBAAA;AAAA,UAEK,SAAA,SAAkB,WAAA;EATZ;EAWd,GAAA,GAAM,GAAA,CAAI,MAAA;EAXO;EAajB,KAAA,GAAQ,UAAA;EANL;EAQH,OAAA,GAAU,WAAA;;EAEV,UAAA,GAAa,UAAA;EAVQ;EAYrB,QAAA,GAAW,UAAA;EAVO;EAYlB,UAAA,GAAa,UAAA;EAVH;EAYV,UAAA,GAAa,UAAA;EAVL;EAYR,aAAA,GAAgB,UAAA;EARH;EAUb,SAAA,GAAY,UAAA;EANC;EAQb,aAAA,GAAgB,UAAA;EAJA;EAMhB,kBAAA,GAAqB,kBAAA;EAErB,eAAA,GAAkB,UAAA;EAElB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EAEpB,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;EAEb,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;EAEZ,UAAA,GAAa,UAAA;EAEb,aAAA,GAAgB,SAAA;EAEhB,MAAA;EACA,KAAA;EACA,SAAA;EACA,SAAA;EACA,QAAA;EACA,QAAA;EAEA,mBAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCI,IAAA,EAAI,
|
|
1
|
+
{"version":3,"file":"Text.d.cts","names":[],"sources":["../../src/components/Text.tsx"],"mappings":";;;;;;;KASK,WAAA,GAAc,OAAA,CACjB,UAAA;AAAA,KAMG,kBAAA;AAAA,UAEK,SAAA,SAAkB,WAAA;EATZ;EAWd,GAAA,GAAM,GAAA,CAAI,MAAA;EAXO;EAajB,KAAA,GAAQ,UAAA;EANL;EAQH,OAAA,GAAU,WAAA;;EAEV,UAAA,GAAa,UAAA;EAVQ;EAYrB,QAAA,GAAW,UAAA;EAVO;EAYlB,UAAA,GAAa,UAAA;EAVH;EAYV,UAAA,GAAa,UAAA;EAVL;EAYR,aAAA,GAAgB,UAAA;EARH;EAUb,SAAA,GAAY,UAAA;EANC;EAQb,aAAA,GAAgB,UAAA;EAJA;EAMhB,kBAAA,GAAqB,kBAAA;EAErB,eAAA,GAAkB,UAAA;EAElB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EAEpB,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;EAEb,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;EAEZ,UAAA,GAAa,UAAA;EAEb,aAAA,GAAgB,SAAA;EAEhB,MAAA;EACA,KAAA;EACA,SAAA;EACA,SAAA;EACA,QAAA;EACA,QAAA;EAEA,mBAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCI,IAAA,EAAI,OAAA,CAAA,oBAAA,CAAA,SAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import * as react from "react";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
import { Ref } from "react";
|
|
4
4
|
import { Text as Text$1, TextProps as TextProps$1, TextStyle } from "react-native";
|
|
5
5
|
import { StyleProps } from "../../generated/styles";
|
|
@@ -102,7 +102,7 @@ interface TextProps extends TextProps$1 {
|
|
|
102
102
|
*
|
|
103
103
|
* @see {@link Link} for interactive text links
|
|
104
104
|
*/
|
|
105
|
-
declare const Text: react.NamedExoticComponent<TextProps>;
|
|
105
|
+
declare const Text: _$react.NamedExoticComponent<TextProps>;
|
|
106
106
|
//#endregion
|
|
107
107
|
export { Text, type TextProps };
|
|
108
108
|
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.d.ts","names":[],"sources":["../../src/components/Text.tsx"],"mappings":";;;;;;;KASK,WAAA,GAAc,OAAA,CACjB,UAAA;AAAA,KAMG,kBAAA;AAAA,UAEK,SAAA,SAAkB,WAAA;EATZ;EAWd,GAAA,GAAM,GAAA,CAAI,MAAA;EAXO;EAajB,KAAA,GAAQ,UAAA;EANL;EAQH,OAAA,GAAU,WAAA;;EAEV,UAAA,GAAa,UAAA;EAVQ;EAYrB,QAAA,GAAW,UAAA;EAVO;EAYlB,UAAA,GAAa,UAAA;EAVH;EAYV,UAAA,GAAa,UAAA;EAVL;EAYR,aAAA,GAAgB,UAAA;EARH;EAUb,SAAA,GAAY,UAAA;EANC;EAQb,aAAA,GAAgB,UAAA;EAJA;EAMhB,kBAAA,GAAqB,kBAAA;EAErB,eAAA,GAAkB,UAAA;EAElB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EAEpB,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;EAEb,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;EAEZ,UAAA,GAAa,UAAA;EAEb,aAAA,GAAgB,SAAA;EAEhB,MAAA;EACA,KAAA;EACA,SAAA;EACA,SAAA;EACA,QAAA;EACA,QAAA;EAEA,mBAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCI,IAAA,EAAI,
|
|
1
|
+
{"version":3,"file":"Text.d.ts","names":[],"sources":["../../src/components/Text.tsx"],"mappings":";;;;;;;KASK,WAAA,GAAc,OAAA,CACjB,UAAA;AAAA,KAMG,kBAAA;AAAA,UAEK,SAAA,SAAkB,WAAA;EATZ;EAWd,GAAA,GAAM,GAAA,CAAI,MAAA;EAXO;EAajB,KAAA,GAAQ,UAAA;EANL;EAQH,OAAA,GAAU,WAAA;;EAEV,UAAA,GAAa,UAAA;EAVQ;EAYrB,QAAA,GAAW,UAAA;EAVO;EAYlB,UAAA,GAAa,UAAA;EAVH;EAYV,UAAA,GAAa,UAAA;EAVL;EAYR,aAAA,GAAgB,UAAA;EARH;EAUb,SAAA,GAAY,UAAA;EANC;EAQb,aAAA,GAAgB,UAAA;EAJA;EAMhB,kBAAA,GAAqB,kBAAA;EAErB,eAAA,GAAkB,UAAA;EAElB,YAAA,GAAe,UAAA;EACf,oBAAA,GAAuB,UAAA;EACvB,kBAAA,GAAqB,UAAA;EACrB,uBAAA,GAA0B,UAAA;EAC1B,qBAAA,GAAwB,UAAA;EACxB,WAAA,GAAc,UAAA;EACd,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EACpB,WAAA,GAAc,UAAA;EACd,mBAAA,GAAsB,UAAA;EACtB,qBAAA,GAAwB,UAAA;EACxB,gBAAA,GAAmB,UAAA;EACnB,cAAA,GAAiB,UAAA;EACjB,cAAA,GAAiB,UAAA;EACjB,iBAAA,GAAoB,UAAA;EAEpB,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;EAEb,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;EAEZ,UAAA,GAAa,UAAA;EAEb,aAAA,GAAgB,SAAA;EAEhB,MAAA;EACA,KAAA;EACA,SAAA;EACA,SAAA;EACA,QAAA;EACA,QAAA;EAEA,mBAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCI,IAAA,EAAI,OAAA,CAAA,oBAAA,CAAA,SAAA"}
|
package/dist/components/Text.js
CHANGED
|
@@ -3,7 +3,6 @@ import { memo, useMemo } from "react";
|
|
|
3
3
|
import { Text as Text$1 } from "react-native";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import { styles } from "../../generated/styles";
|
|
6
|
-
|
|
7
6
|
//#region src/components/Text.tsx
|
|
8
7
|
/**
|
|
9
8
|
* **📝 A text component with UDS styling**
|
|
@@ -110,7 +109,7 @@ const Text = memo(function Text({ color = "primary", variant = "body1", fontFami
|
|
|
110
109
|
});
|
|
111
110
|
});
|
|
112
111
|
Text.displayName = "Text";
|
|
113
|
-
|
|
114
112
|
//#endregion
|
|
115
113
|
export { Text };
|
|
114
|
+
|
|
116
115
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","names":["RNText"],"sources":["../../src/components/Text.tsx"],"sourcesContent":["import type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { StyleProp, TextProps as RNTextProps, TextStyle } from 'react-native';\nimport { Text as RNText } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\n\n// TextVariant is a subset of fontFamily that represents typography variants\ntype TextVariant = Exclude<\n StyleProps['fontFamily'],\n 'sans' | 'sans-alt' | 'serif' | 'serif-alt' | 'mono' | 'icons'\n>;\n\n// React Native text decoration line values\n// See: https://reactnative.dev/docs/text-style-props#textdecorationline\ntype TextDecorationLine = 'none' | 'underline' | 'line-through' | 'underline line-through';\n\ninterface TextProps extends RNTextProps {\n /** Ref to the underlying Text element */\n ref?: Ref<RNText>;\n /** Text color from the theme palette */\n color?: StyleProps['color'];\n /** Typography variant - sets fontSize, lineHeight, letterSpacing, and fontFamily together */\n variant?: TextVariant;\n /** Override the fontFamily independently */\n fontFamily?: StyleProps['fontFamily'];\n /** Override the fontSize independently */\n fontSize?: StyleProps['fontSize'];\n /** Set font weight (not derived from variant) */\n fontWeight?: StyleProps['fontWeight'];\n /** Override the lineHeight independently */\n lineHeight?: StyleProps['lineHeight'];\n /** Override the letterSpacing independently */\n letterSpacing?: StyleProps['letterSpacing'];\n /** Text alignment (left, center, right) */\n textAlign?: StyleProps['textAlign'];\n /** Set text transform (not derived from variant) */\n textTransform?: StyleProps['textTransform'];\n /** Text decoration (underline, line-through, etc.) */\n textDecorationLine?: TextDecorationLine;\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 // 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\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 // Flex\n flexShrink?: StyleProps['flexShrink'];\n // Vertical Alignment\n verticalAlign?: TextStyle['textAlignVertical'];\n // Size\n height?: number | `${number}%`;\n width?: number | `${number}%`;\n minHeight?: number | `${number}%`;\n maxHeight?: number | `${number}%`;\n minWidth?: number | `${number}%`;\n maxWidth?: number | `${number}%`;\n // Dangerously set props\n dangerouslySetColor?: string;\n}\n\n/**\n * **📝 A text component with UDS styling**\n *\n * @description\n * A styled text component that supports UDS typography variants and colors.\n *\n * @category Display\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Text } from '@yahoo/uds-mobile';\n *\n * <Text variant=\"body1\" color=\"primary\">Hello, World!</Text>\n * <Text variant=\"display1\" fontWeight=\"bold\">Heading</Text>\n * <Text variant=\"label1\" color=\"secondary\">Caption text</Text>\n * ```\n *\n * @usage\n * - Use variant prop to set typography (display1, body1, label1, etc.)\n * - Use color prop to set text color from the palette\n * - Use fontWeight to override the variant's default weight\n *\n * @accessibility\n * - Text is readable by screen readers by default\n * - Use appropriate variant sizes for readability\n * - Ensure sufficient color contrast with background\n *\n * @see {@link Link} for interactive text links\n */\nconst Text = memo(function Text({\n // Text-specific\n color = 'primary',\n variant = 'body1',\n fontFamily = variant,\n fontSize = variant,\n fontWeight,\n lineHeight = variant,\n letterSpacing = variant,\n textAlign,\n textTransform,\n textDecorationLine,\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 // Spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n // Offset\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n // Flex\n flexShrink,\n // Vertical Alignment\n verticalAlign,\n // Size\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n // Dangerously set props\n dangerouslySetColor,\n ref,\n // Rest\n ...props\n}: TextProps) {\n styles.useVariants({\n // Text styles\n color,\n fontFamily,\n fontSize,\n fontWeight,\n lineHeight,\n letterSpacing,\n textAlign,\n textTransform,\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 // Spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n // Offset\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n // Flex\n flexShrink,\n });\n\n // styles.foundation must be in deps - it returns a new reference when variants change.\n const computedStyle: StyleProp<TextStyle> = useMemo(\n () => [\n textDecorationLine ? { textDecorationLine } : undefined,\n dangerouslySetColor ? { color: dangerouslySetColor } : undefined,\n verticalAlign ? { textAlignVertical: verticalAlign } : undefined,\n height ? { height } : undefined,\n minHeight ? { minHeight } : undefined,\n maxHeight ? { maxHeight } : undefined,\n width ? { width } : undefined,\n minWidth ? { minWidth } : undefined,\n maxWidth ? { maxWidth } : undefined,\n styles.foundation,\n style,\n ],\n [\n textDecorationLine,\n dangerouslySetColor,\n verticalAlign,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n style,\n styles.foundation,\n ],\n );\n\n return <RNText ref={ref} style={computedStyle} {...props} />;\n});\n\nText.displayName = 'Text';\n\nexport { Text, type TextProps };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.js","names":["RNText"],"sources":["../../src/components/Text.tsx"],"sourcesContent":["import type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { StyleProp, TextProps as RNTextProps, TextStyle } from 'react-native';\nimport { Text as RNText } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\n\n// TextVariant is a subset of fontFamily that represents typography variants\ntype TextVariant = Exclude<\n StyleProps['fontFamily'],\n 'sans' | 'sans-alt' | 'serif' | 'serif-alt' | 'mono' | 'icons'\n>;\n\n// React Native text decoration line values\n// See: https://reactnative.dev/docs/text-style-props#textdecorationline\ntype TextDecorationLine = 'none' | 'underline' | 'line-through' | 'underline line-through';\n\ninterface TextProps extends RNTextProps {\n /** Ref to the underlying Text element */\n ref?: Ref<RNText>;\n /** Text color from the theme palette */\n color?: StyleProps['color'];\n /** Typography variant - sets fontSize, lineHeight, letterSpacing, and fontFamily together */\n variant?: TextVariant;\n /** Override the fontFamily independently */\n fontFamily?: StyleProps['fontFamily'];\n /** Override the fontSize independently */\n fontSize?: StyleProps['fontSize'];\n /** Set font weight (not derived from variant) */\n fontWeight?: StyleProps['fontWeight'];\n /** Override the lineHeight independently */\n lineHeight?: StyleProps['lineHeight'];\n /** Override the letterSpacing independently */\n letterSpacing?: StyleProps['letterSpacing'];\n /** Text alignment (left, center, right) */\n textAlign?: StyleProps['textAlign'];\n /** Set text transform (not derived from variant) */\n textTransform?: StyleProps['textTransform'];\n /** Text decoration (underline, line-through, etc.) */\n textDecorationLine?: TextDecorationLine;\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 // 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\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 // Flex\n flexShrink?: StyleProps['flexShrink'];\n // Vertical Alignment\n verticalAlign?: TextStyle['textAlignVertical'];\n // Size\n height?: number | `${number}%`;\n width?: number | `${number}%`;\n minHeight?: number | `${number}%`;\n maxHeight?: number | `${number}%`;\n minWidth?: number | `${number}%`;\n maxWidth?: number | `${number}%`;\n // Dangerously set props\n dangerouslySetColor?: string;\n}\n\n/**\n * **📝 A text component with UDS styling**\n *\n * @description\n * A styled text component that supports UDS typography variants and colors.\n *\n * @category Display\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { Text } from '@yahoo/uds-mobile';\n *\n * <Text variant=\"body1\" color=\"primary\">Hello, World!</Text>\n * <Text variant=\"display1\" fontWeight=\"bold\">Heading</Text>\n * <Text variant=\"label1\" color=\"secondary\">Caption text</Text>\n * ```\n *\n * @usage\n * - Use variant prop to set typography (display1, body1, label1, etc.)\n * - Use color prop to set text color from the palette\n * - Use fontWeight to override the variant's default weight\n *\n * @accessibility\n * - Text is readable by screen readers by default\n * - Use appropriate variant sizes for readability\n * - Ensure sufficient color contrast with background\n *\n * @see {@link Link} for interactive text links\n */\nconst Text = memo(function Text({\n // Text-specific\n color = 'primary',\n variant = 'body1',\n fontFamily = variant,\n fontSize = variant,\n fontWeight,\n lineHeight = variant,\n letterSpacing = variant,\n textAlign,\n textTransform,\n textDecorationLine,\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 // Spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n // Offset\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n // Flex\n flexShrink,\n // Vertical Alignment\n verticalAlign,\n // Size\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n // Dangerously set props\n dangerouslySetColor,\n ref,\n // Rest\n ...props\n}: TextProps) {\n styles.useVariants({\n // Text styles\n color,\n fontFamily,\n fontSize,\n fontWeight,\n lineHeight,\n letterSpacing,\n textAlign,\n textTransform,\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 // Spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n // Offset\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n // Flex\n flexShrink,\n });\n\n // styles.foundation must be in deps - it returns a new reference when variants change.\n const computedStyle: StyleProp<TextStyle> = useMemo(\n () => [\n textDecorationLine ? { textDecorationLine } : undefined,\n dangerouslySetColor ? { color: dangerouslySetColor } : undefined,\n verticalAlign ? { textAlignVertical: verticalAlign } : undefined,\n height ? { height } : undefined,\n minHeight ? { minHeight } : undefined,\n maxHeight ? { maxHeight } : undefined,\n width ? { width } : undefined,\n minWidth ? { minWidth } : undefined,\n maxWidth ? { maxWidth } : undefined,\n styles.foundation,\n style,\n ],\n [\n textDecorationLine,\n dangerouslySetColor,\n verticalAlign,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n style,\n styles.foundation,\n ],\n );\n\n return <RNText ref={ref} style={computedStyle} {...props} />;\n});\n\nText.displayName = 'Text';\n\nexport { Text, type TextProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0HA,MAAM,OAAO,KAAK,SAAS,KAAK,EAE9B,QAAQ,WACR,UAAU,SACV,aAAa,SACb,WAAW,SACX,YACA,aAAa,SACb,gBAAgB,SAChB,WACA,eACA,oBACA,OAEA,iBAEA,cACA,sBACA,oBACA,yBACA,uBACA,aACA,kBACA,gBACA,gBACA,mBACA,aACA,qBACA,uBACA,kBACA,gBACA,gBACA,mBAEA,SACA,mBACA,iBACA,eACA,YACA,cACA,YAEA,QACA,gBACA,kBACA,cACA,WACA,aACA,WAEA,YAEA,eAEA,QACA,WACA,WACA,OACA,UACA,UAEA,qBACA,KAEA,GAAG,SACS;AACZ,QAAO,YAAY;EAEjB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACD,CAAC;AAgCF,QAAO,oBAACA,QAAD;EAAa;EAAK,OA7BmB,cACpC;GACJ,qBAAqB,EAAE,oBAAoB,GAAG,KAAA;GAC9C,sBAAsB,EAAE,OAAO,qBAAqB,GAAG,KAAA;GACvD,gBAAgB,EAAE,mBAAmB,eAAe,GAAG,KAAA;GACvD,SAAS,EAAE,QAAQ,GAAG,KAAA;GACtB,YAAY,EAAE,WAAW,GAAG,KAAA;GAC5B,YAAY,EAAE,WAAW,GAAG,KAAA;GAC5B,QAAQ,EAAE,OAAO,GAAG,KAAA;GACpB,WAAW,EAAE,UAAU,GAAG,KAAA;GAC1B,WAAW,EAAE,UAAU,GAAG,KAAA;GAC1B,OAAO;GACP;GACD,EACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO;GACR,CAG0C;EAAE,GAAI;EAAS,CAAA;EAC5D;AAEF,KAAK,cAAc"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
4
|
-
const require_portal = require(
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_portal = require("../portal.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let react_native = require("react-native");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let react_native_gesture_handler = require("react-native-gesture-handler");
|
|
9
|
-
|
|
10
9
|
//#region src/components/UDSProvider.tsx
|
|
11
10
|
/**
|
|
12
11
|
* Root provider for UDS Mobile.
|
|
@@ -33,6 +32,5 @@ const UDSProvider = (0, react.memo)(function UDSProvider({ children }) {
|
|
|
33
32
|
});
|
|
34
33
|
});
|
|
35
34
|
const styles = react_native.StyleSheet.create({ root: { flex: 1 } });
|
|
36
|
-
|
|
37
35
|
//#endregion
|
|
38
|
-
exports.UDSProvider = UDSProvider;
|
|
36
|
+
exports.UDSProvider = UDSProvider;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import * as react from "react";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/UDSProvider.d.ts
|
|
@@ -24,7 +24,7 @@ interface UDSProviderProps {
|
|
|
24
24
|
* }
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
declare const UDSProvider: react.NamedExoticComponent<UDSProviderProps>;
|
|
27
|
+
declare const UDSProvider: _$react.NamedExoticComponent<UDSProviderProps>;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { UDSProvider, type UDSProviderProps };
|
|
30
30
|
//# sourceMappingURL=UDSProvider.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UDSProvider.d.cts","names":[],"sources":["../../src/components/UDSProvider.tsx"],"mappings":";;;;;UAOU,gBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAR2B;;;;;AAQlB;;;;;;;;;;;;;AARkB,cA6BjC,WAAA,EAAW,
|
|
1
|
+
{"version":3,"file":"UDSProvider.d.cts","names":[],"sources":["../../src/components/UDSProvider.tsx"],"mappings":";;;;;UAOU,gBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAR2B;;;;;AAQlB;;;;;;;;;;;;;AARkB,cA6BjC,WAAA,EAAW,OAAA,CAAA,oBAAA,CAAA,gBAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import * as react from "react";
|
|
2
|
+
import * as _$react from "react";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/UDSProvider.d.ts
|
|
@@ -24,7 +24,7 @@ interface UDSProviderProps {
|
|
|
24
24
|
* }
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
declare const UDSProvider: react.NamedExoticComponent<UDSProviderProps>;
|
|
27
|
+
declare const UDSProvider: _$react.NamedExoticComponent<UDSProviderProps>;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { UDSProvider, type UDSProviderProps };
|
|
30
30
|
//# sourceMappingURL=UDSProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UDSProvider.d.ts","names":[],"sources":["../../src/components/UDSProvider.tsx"],"mappings":";;;;;UAOU,gBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAR2B;;;;;AAQlB;;;;;;;;;;;;;AARkB,cA6BjC,WAAA,EAAW,
|
|
1
|
+
{"version":3,"file":"UDSProvider.d.ts","names":[],"sources":["../../src/components/UDSProvider.tsx"],"mappings":";;;;;UAOU,gBAAA;EACR,QAAA,EAAU,SAAA;AAAA;AAR2B;;;;;AAQlB;;;;;;;;;;;;;AARkB,cA6BjC,WAAA,EAAW,OAAA,CAAA,oBAAA,CAAA,gBAAA"}
|
|
@@ -4,7 +4,6 @@ import { memo } from "react";
|
|
|
4
4
|
import { StyleSheet } from "react-native";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
7
|
-
|
|
8
7
|
//#region src/components/UDSProvider.tsx
|
|
9
8
|
/**
|
|
10
9
|
* Root provider for UDS Mobile.
|
|
@@ -31,7 +30,7 @@ const UDSProvider = memo(function UDSProvider({ children }) {
|
|
|
31
30
|
});
|
|
32
31
|
});
|
|
33
32
|
const styles = StyleSheet.create({ root: { flex: 1 } });
|
|
34
|
-
|
|
35
33
|
//#endregion
|
|
36
34
|
export { UDSProvider };
|
|
35
|
+
|
|
37
36
|
//# sourceMappingURL=UDSProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UDSProvider.js","names":[],"sources":["../../src/components/UDSProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { memo } from 'react';\nimport { StyleSheet } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\n\nimport { PortalProvider } from '../portal';\n\ninterface UDSProviderProps {\n children: ReactNode;\n}\n\n/**\n * Root provider for UDS Mobile.\n *\n * Place this at the top of your app layout:\n *\n * @example\n * ```tsx\n * import { UDSProvider } from '@yahoo/uds-mobile/UDSProvider';\n *\n * export default function RootLayout() {\n * return (\n * <UDSProvider>\n * <Stack />\n * </UDSProvider>\n * );\n * }\n * ```\n */\nconst UDSProvider = memo(function UDSProvider({ children }: UDSProviderProps) {\n return (\n <GestureHandlerRootView style={styles.root}>\n <PortalProvider>{children}</PortalProvider>\n </GestureHandlerRootView>\n );\n});\n\nconst styles = StyleSheet.create({\n root: {\n flex: 1,\n },\n});\n\nexport { UDSProvider };\nexport type { UDSProviderProps };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"UDSProvider.js","names":[],"sources":["../../src/components/UDSProvider.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { memo } from 'react';\nimport { StyleSheet } from 'react-native';\nimport { GestureHandlerRootView } from 'react-native-gesture-handler';\n\nimport { PortalProvider } from '../portal';\n\ninterface UDSProviderProps {\n children: ReactNode;\n}\n\n/**\n * Root provider for UDS Mobile.\n *\n * Place this at the top of your app layout:\n *\n * @example\n * ```tsx\n * import { UDSProvider } from '@yahoo/uds-mobile/UDSProvider';\n *\n * export default function RootLayout() {\n * return (\n * <UDSProvider>\n * <Stack />\n * </UDSProvider>\n * );\n * }\n * ```\n */\nconst UDSProvider = memo(function UDSProvider({ children }: UDSProviderProps) {\n return (\n <GestureHandlerRootView style={styles.root}>\n <PortalProvider>{children}</PortalProvider>\n </GestureHandlerRootView>\n );\n});\n\nconst styles = StyleSheet.create({\n root: {\n flex: 1,\n },\n});\n\nexport { UDSProvider };\nexport type { UDSProviderProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,cAAc,KAAK,SAAS,YAAY,EAAE,YAA8B;AAC5E,QACE,oBAAC,wBAAD;EAAwB,OAAO,OAAO;YACpC,oBAAC,gBAAD,EAAiB,UAA0B,CAAA;EACpB,CAAA;EAE3B;AAEF,MAAM,SAAS,WAAW,OAAO,EAC/B,MAAM,EACJ,MAAM,GACP,EACF,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
|
|
4
|
-
const require_components_Box = require(
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
4
|
+
const require_components_Box = require("./Box.cjs");
|
|
5
5
|
let react = require("react");
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
|
|
8
7
|
//#region src/components/VStack.tsx
|
|
9
8
|
/**
|
|
10
9
|
* **📦 A vertical stack layout component**
|
|
@@ -44,6 +43,5 @@ const VStack = (0, react.memo)(function VStack({ gap, children, ref, ...props })
|
|
|
44
43
|
});
|
|
45
44
|
});
|
|
46
45
|
VStack.displayName = "VStack";
|
|
47
|
-
|
|
48
46
|
//#endregion
|
|
49
|
-
exports.VStack = VStack;
|
|
47
|
+
exports.VStack = VStack;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { BoxProps } from "./Box.cjs";
|
|
3
|
-
import * as react from "react";
|
|
3
|
+
import * as _$react from "react";
|
|
4
4
|
import { Ref } from "react";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
import { StyleProps } from "../../generated/styles";
|
|
@@ -39,7 +39,7 @@ interface VStackProps extends Omit<BoxProps, 'ref'> {
|
|
|
39
39
|
* @see {@link HStack} for horizontal layouts
|
|
40
40
|
* @see {@link Box} for custom flex layouts
|
|
41
41
|
*/
|
|
42
|
-
declare const VStack: react.NamedExoticComponent<VStackProps>;
|
|
42
|
+
declare const VStack: _$react.NamedExoticComponent<VStackProps>;
|
|
43
43
|
//#endregion
|
|
44
44
|
export { VStack, type VStackProps };
|
|
45
45
|
//# sourceMappingURL=VStack.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VStack.d.cts","names":[],"sources":["../../src/components/VStack.tsx"],"mappings":";;;;;;;;UAQU,WAAA,SAAoB,IAAA,CAAK,QAAA;;EAEjC,GAAA,GAAM,UAAA;EAFE;EAIR,GAAA,GAAM,GAAA,CAAI,IAAA;AAAA;;;;;;;;;;;;;;;;;AAAI;;;;;;;;;;;cA8BV,MAAA,EAAM,
|
|
1
|
+
{"version":3,"file":"VStack.d.cts","names":[],"sources":["../../src/components/VStack.tsx"],"mappings":";;;;;;;;UAQU,WAAA,SAAoB,IAAA,CAAK,QAAA;;EAEjC,GAAA,GAAM,UAAA;EAFE;EAIR,GAAA,GAAM,GAAA,CAAI,IAAA;AAAA;;;;;;;;;;;;;;;;;AAAI;;;;;;;;;;;cA8BV,MAAA,EAAM,OAAA,CAAA,oBAAA,CAAA,WAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
import { BoxProps } from "./Box.js";
|
|
3
|
-
import * as react from "react";
|
|
3
|
+
import * as _$react from "react";
|
|
4
4
|
import { Ref } from "react";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
import { StyleProps } from "../../generated/styles";
|
|
@@ -39,7 +39,7 @@ interface VStackProps extends Omit<BoxProps, 'ref'> {
|
|
|
39
39
|
* @see {@link HStack} for horizontal layouts
|
|
40
40
|
* @see {@link Box} for custom flex layouts
|
|
41
41
|
*/
|
|
42
|
-
declare const VStack: react.NamedExoticComponent<VStackProps>;
|
|
42
|
+
declare const VStack: _$react.NamedExoticComponent<VStackProps>;
|
|
43
43
|
//#endregion
|
|
44
44
|
export { VStack, type VStackProps };
|
|
45
45
|
//# sourceMappingURL=VStack.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VStack.d.ts","names":[],"sources":["../../src/components/VStack.tsx"],"mappings":";;;;;;;;UAQU,WAAA,SAAoB,IAAA,CAAK,QAAA;;EAEjC,GAAA,GAAM,UAAA;EAFE;EAIR,GAAA,GAAM,GAAA,CAAI,IAAA;AAAA;;;;;;;;;;;;;;;;;AAAI;;;;;;;;;;;cA8BV,MAAA,EAAM,
|
|
1
|
+
{"version":3,"file":"VStack.d.ts","names":[],"sources":["../../src/components/VStack.tsx"],"mappings":";;;;;;;;UAQU,WAAA,SAAoB,IAAA,CAAK,QAAA;;EAEjC,GAAA,GAAM,UAAA;EAFE;EAIR,GAAA,GAAM,GAAA,CAAI,IAAA;AAAA;;;;;;;;;;;;;;;;;AAAI;;;;;;;;;;;cA8BV,MAAA,EAAM,OAAA,CAAA,oBAAA,CAAA,WAAA"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { Box } from "./Box.js";
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
6
5
|
//#region src/components/VStack.tsx
|
|
7
6
|
/**
|
|
8
7
|
* **📦 A vertical stack layout component**
|
|
@@ -42,7 +41,7 @@ const VStack = memo(function VStack({ gap, children, ref, ...props }) {
|
|
|
42
41
|
});
|
|
43
42
|
});
|
|
44
43
|
VStack.displayName = "VStack";
|
|
45
|
-
|
|
46
44
|
//#endregion
|
|
47
45
|
export { VStack };
|
|
46
|
+
|
|
48
47
|
//# sourceMappingURL=VStack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VStack.js","names":[],"sources":["../../src/components/VStack.tsx"],"sourcesContent":["import type { Ref } from 'react';\nimport { memo } from 'react';\nimport type { View } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport type { BoxProps } from './Box';\nimport { Box } from './Box';\n\ninterface VStackProps extends Omit<BoxProps, 'ref'> {\n /** Gap between child elements */\n gap?: StyleProps['rowGap'];\n /** Ref to the underlying View */\n ref?: Ref<View>;\n}\n\n/**\n * **📦 A vertical stack layout component**\n *\n * @description\n * A convenience component for creating vertical layouts. It's a Box with\n * `flexDirection=\"column\"` preset.\n *\n * @category Layout\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { VStack } from '@yahoo/uds-mobile';\n *\n * <VStack gap=\"4\" alignItems=\"stretch\">\n * <Text>Item 1</Text>\n * <Text>Item 2</Text>\n * </VStack>\n * ```\n *\n * @usage\n * - Use for vertical arrangements of elements\n * - Use gap prop for consistent spacing between children\n *\n * @see {@link HStack} for horizontal layouts\n * @see {@link Box} for custom flex layouts\n */\nconst VStack = memo(function VStack({ gap, children, ref, ...props }: VStackProps) {\n return (\n <Box ref={ref} flexDirection=\"column\" columnGap={gap} rowGap={gap} {...props}>\n {children}\n </Box>\n );\n});\n\nVStack.displayName = 'VStack';\n\nexport { VStack, type VStackProps };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"VStack.js","names":[],"sources":["../../src/components/VStack.tsx"],"sourcesContent":["import type { Ref } from 'react';\nimport { memo } from 'react';\nimport type { View } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport type { BoxProps } from './Box';\nimport { Box } from './Box';\n\ninterface VStackProps extends Omit<BoxProps, 'ref'> {\n /** Gap between child elements */\n gap?: StyleProps['rowGap'];\n /** Ref to the underlying View */\n ref?: Ref<View>;\n}\n\n/**\n * **📦 A vertical stack layout component**\n *\n * @description\n * A convenience component for creating vertical layouts. It's a Box with\n * `flexDirection=\"column\"` preset.\n *\n * @category Layout\n * @platform mobile\n *\n * @example\n * ```tsx\n * import { VStack } from '@yahoo/uds-mobile';\n *\n * <VStack gap=\"4\" alignItems=\"stretch\">\n * <Text>Item 1</Text>\n * <Text>Item 2</Text>\n * </VStack>\n * ```\n *\n * @usage\n * - Use for vertical arrangements of elements\n * - Use gap prop for consistent spacing between children\n *\n * @see {@link HStack} for horizontal layouts\n * @see {@link Box} for custom flex layouts\n */\nconst VStack = memo(function VStack({ gap, children, ref, ...props }: VStackProps) {\n return (\n <Box ref={ref} flexDirection=\"column\" columnGap={gap} rowGap={gap} {...props}>\n {children}\n </Box>\n );\n});\n\nVStack.displayName = 'VStack';\n\nexport { VStack, type VStackProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,SAAS,KAAK,SAAS,OAAO,EAAE,KAAK,UAAU,KAAK,GAAG,SAAsB;AACjF,QACE,oBAAC,KAAD;EAAU;EAAK,eAAc;EAAS,WAAW;EAAK,QAAQ;EAAK,GAAI;EACpE;EACG,CAAA;EAER;AAEF,OAAO,cAAc"}
|
package/dist/jest/index.cjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
const require_jest_mocks_icons = require(
|
|
4
|
-
const require_jest_mocks_reanimated = require(
|
|
5
|
-
const require_jest_mocks_styles = require(
|
|
6
|
-
const require_jest_mocks_svg = require(
|
|
7
|
-
const require_jest_mocks_unistyles = require(
|
|
8
|
-
const require_jest_setup = require(
|
|
9
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_jest_mocks_icons = require("./mocks/icons.cjs");
|
|
4
|
+
const require_jest_mocks_reanimated = require("./mocks/reanimated.cjs");
|
|
5
|
+
const require_jest_mocks_styles = require("./mocks/styles.cjs");
|
|
6
|
+
const require_jest_mocks_svg = require("./mocks/svg.cjs");
|
|
7
|
+
const require_jest_mocks_unistyles = require("./mocks/unistyles.cjs");
|
|
8
|
+
const require_jest_setup = require("./setup.cjs");
|
|
10
9
|
//#region src/jest/index.ts
|
|
11
10
|
/**
|
|
12
11
|
* Jest testing support for UDS Mobile.
|
|
@@ -20,8 +19,7 @@ const mocks = {
|
|
|
20
19
|
styles: require_jest_mocks_styles.styles_exports
|
|
21
20
|
};
|
|
22
21
|
require_jest_setup.setupUDSMobileJest();
|
|
23
|
-
|
|
24
22
|
//#endregion
|
|
25
23
|
exports.mocks = mocks;
|
|
26
24
|
exports.resetSetupState = require_jest_setup.resetSetupState;
|
|
27
|
-
exports.setupUDSMobileJest = require_jest_setup.setupUDSMobileJest;
|
|
25
|
+
exports.setupUDSMobileJest = require_jest_setup.setupUDSMobileJest;
|
package/dist/jest/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import { styles_exports } from "./mocks/styles.js";
|
|
|
5
5
|
import { svg_exports } from "./mocks/svg.js";
|
|
6
6
|
import { unistyles_exports } from "./mocks/unistyles.js";
|
|
7
7
|
import { resetSetupState, setupUDSMobileJest } from "./setup.js";
|
|
8
|
-
|
|
9
8
|
//#region src/jest/index.ts
|
|
10
9
|
/**
|
|
11
10
|
* Jest testing support for UDS Mobile.
|
|
@@ -19,7 +18,7 @@ const mocks = {
|
|
|
19
18
|
styles: styles_exports
|
|
20
19
|
};
|
|
21
20
|
setupUDSMobileJest();
|
|
22
|
-
|
|
23
21
|
//#endregion
|
|
24
22
|
export { mocks, resetSetupState, setupUDSMobileJest };
|
|
23
|
+
|
|
25
24
|
//# sourceMappingURL=index.js.map
|
package/dist/jest/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/jest/index.ts"],"sourcesContent":["/**\n * Jest testing support for UDS Mobile.\n * Mocks native dependencies so real components can be tested.\n */\n\nimport * as icons from './mocks/icons';\nimport * as reanimated from './mocks/reanimated';\nimport * as styles from './mocks/styles';\nimport * as svg from './mocks/svg';\nimport * as unistyles from './mocks/unistyles';\nimport { resetSetupState, setupUDSMobileJest } from './setup';\n\nconst mocks = {\n unistyles,\n reanimated,\n svg,\n icons,\n styles,\n};\n\n// Auto-run setup when this module is imported\nsetupUDSMobileJest();\n\nexport { mocks, resetSetupState, setupUDSMobileJest };\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/jest/index.ts"],"sourcesContent":["/**\n * Jest testing support for UDS Mobile.\n * Mocks native dependencies so real components can be tested.\n */\n\nimport * as icons from './mocks/icons';\nimport * as reanimated from './mocks/reanimated';\nimport * as styles from './mocks/styles';\nimport * as svg from './mocks/svg';\nimport * as unistyles from './mocks/unistyles';\nimport { resetSetupState, setupUDSMobileJest } from './setup';\n\nconst mocks = {\n unistyles,\n reanimated,\n svg,\n icons,\n styles,\n};\n\n// Auto-run setup when this module is imported\nsetupUDSMobileJest();\n\nexport { mocks, resetSetupState, setupUDSMobileJest };\n"],"mappings":";;;;;;;;;;;;AAYA,MAAM,QAAQ;CACZ,WAAA;CACA,YAAA;CACA,KAAA;CACA,OAAA;CACA,QAAA;CACD;AAGD,oBAAoB"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value:
|
|
3
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
4
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
5
3
|
//#region src/jest/mocks/icons.ts
|
|
6
|
-
var icons_exports = /* @__PURE__ */
|
|
4
|
+
var icons_exports = /* @__PURE__ */ require("../../_virtual/_rolldown/runtime.cjs").__exportAll({
|
|
7
5
|
ICON_SIZE_MAP: () => ICON_SIZE_MAP,
|
|
8
6
|
glyphMap: () => glyphMap,
|
|
9
7
|
glyphNames: () => glyphNames,
|
|
@@ -41,16 +39,15 @@ const glyphMap = glyphMapProxy;
|
|
|
41
39
|
const glyphNames = [];
|
|
42
40
|
const svgMap = svgMapProxy;
|
|
43
41
|
const svgGlyphNames = [];
|
|
44
|
-
|
|
45
42
|
//#endregion
|
|
46
43
|
exports.ICON_SIZE_MAP = ICON_SIZE_MAP;
|
|
47
44
|
exports.glyphMap = glyphMap;
|
|
48
45
|
exports.glyphNames = glyphNames;
|
|
49
|
-
Object.defineProperty(exports,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
Object.defineProperty(exports, "icons_exports", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function() {
|
|
49
|
+
return icons_exports;
|
|
50
|
+
}
|
|
54
51
|
});
|
|
55
52
|
exports.svgGlyphNames = svgGlyphNames;
|
|
56
|
-
exports.svgMap = svgMap;
|
|
53
|
+
exports.svgMap = svgMap;
|
package/dist/jest/mocks/icons.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
2
|
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
3
|
-
|
|
4
3
|
//#region src/jest/mocks/icons.ts
|
|
5
4
|
var icons_exports = /* @__PURE__ */ __exportAll({
|
|
6
5
|
ICON_SIZE_MAP: () => ICON_SIZE_MAP,
|
|
@@ -40,7 +39,7 @@ const glyphMap = glyphMapProxy;
|
|
|
40
39
|
const glyphNames = [];
|
|
41
40
|
const svgMap = svgMapProxy;
|
|
42
41
|
const svgGlyphNames = [];
|
|
43
|
-
|
|
44
42
|
//#endregion
|
|
45
43
|
export { ICON_SIZE_MAP, glyphMap, glyphNames, icons_exports, svgGlyphNames, svgMap };
|
|
44
|
+
|
|
46
45
|
//# sourceMappingURL=icons.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","names":[],"sources":["../../../src/jest/mocks/icons.ts"],"sourcesContent":["/**\n * Jest mock for @yahoo/uds-icons.\n *\n * Provides proxy-based mocks for glyph and SVG maps\n * so any icon name returns a valid placeholder.\n */\n\n// Proxy that returns a placeholder glyph character for any icon name\nconst glyphMapProxy = new Proxy(\n {},\n {\n get: (_target, prop) => {\n // Return a placeholder glyph character\n // Using a simple character that works in Jest/JSDOM\n if (typeof prop === 'string') {\n return '\\uE000'; // Private use area character\n }\n return undefined;\n },\n has: () => true,\n ownKeys: () => [],\n },\n);\n\n// Proxy that returns placeholder SVG content for any icon name\nconst svgMapProxy = new Proxy(\n {},\n {\n get: (_target, prop) => {\n // Return minimal valid SVG for any key\n if (typeof prop === 'string') {\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><rect width=\"24\" height=\"24\" fill=\"currentColor\"/></svg>';\n }\n return undefined;\n },\n has: () => true,\n ownKeys: () => [],\n },\n);\n\n// Icon size mapping (matches actual package)\nexport const ICON_SIZE_MAP = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 48,\n} as const;\n\n// Export glyph map and names\nexport const glyphMap = glyphMapProxy;\nexport const glyphNames: string[] = [];\n\n// Export SVG map and names\nexport const svgMap = svgMapProxy;\nexport const svgGlyphNames: string[] = [];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"icons.js","names":[],"sources":["../../../src/jest/mocks/icons.ts"],"sourcesContent":["/**\n * Jest mock for @yahoo/uds-icons.\n *\n * Provides proxy-based mocks for glyph and SVG maps\n * so any icon name returns a valid placeholder.\n */\n\n// Proxy that returns a placeholder glyph character for any icon name\nconst glyphMapProxy = new Proxy(\n {},\n {\n get: (_target, prop) => {\n // Return a placeholder glyph character\n // Using a simple character that works in Jest/JSDOM\n if (typeof prop === 'string') {\n return '\\uE000'; // Private use area character\n }\n return undefined;\n },\n has: () => true,\n ownKeys: () => [],\n },\n);\n\n// Proxy that returns placeholder SVG content for any icon name\nconst svgMapProxy = new Proxy(\n {},\n {\n get: (_target, prop) => {\n // Return minimal valid SVG for any key\n if (typeof prop === 'string') {\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><rect width=\"24\" height=\"24\" fill=\"currentColor\"/></svg>';\n }\n return undefined;\n },\n has: () => true,\n ownKeys: () => [],\n },\n);\n\n// Icon size mapping (matches actual package)\nexport const ICON_SIZE_MAP = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 48,\n} as const;\n\n// Export glyph map and names\nexport const glyphMap = glyphMapProxy;\nexport const glyphNames: string[] = [];\n\n// Export SVG map and names\nexport const svgMap = svgMapProxy;\nexport const svgGlyphNames: string[] = [];\n"],"mappings":";;;;;;;;;;;;;;;;AAQA,MAAM,gBAAgB,IAAI,MACxB,EAAE,EACF;CACE,MAAM,SAAS,SAAS;AAGtB,MAAI,OAAO,SAAS,SAClB,QAAO;;CAIX,WAAW;CACX,eAAe,EAAE;CAClB,CACF;AAGD,MAAM,cAAc,IAAI,MACtB,EAAE,EACF;CACE,MAAM,SAAS,SAAS;AAEtB,MAAI,OAAO,SAAS,SAClB,QAAO;;CAIX,WAAW;CACX,eAAe,EAAE;CAClB,CACF;AAGD,MAAa,gBAAgB;CAC3B,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAGD,MAAa,WAAW;AACxB,MAAa,aAAuB,EAAE;AAGtC,MAAa,SAAS;AACtB,MAAa,gBAA0B,EAAE"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperties(exports, {
|
|
3
|
-
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
7
|
let react = require("react");
|
|
5
8
|
react = require_runtime.__toESM(react);
|
|
6
|
-
|
|
7
9
|
//#region src/jest/mocks/react-native.tsx
|
|
8
10
|
global.__DEV__ = true;
|
|
9
11
|
function createMockComponent(name) {
|
|
@@ -177,7 +179,6 @@ const ReactNative = {
|
|
|
177
179
|
useColorScheme,
|
|
178
180
|
useWindowDimensions
|
|
179
181
|
};
|
|
180
|
-
|
|
181
182
|
//#endregion
|
|
182
183
|
exports.AccessibilityInfo = AccessibilityInfo;
|
|
183
184
|
exports.ActivityIndicator = ActivityIndicator;
|
|
@@ -209,4 +210,4 @@ exports.TouchableWithoutFeedback = TouchableWithoutFeedback;
|
|
|
209
210
|
exports.View = View;
|
|
210
211
|
exports.default = ReactNative;
|
|
211
212
|
exports.useColorScheme = useColorScheme;
|
|
212
|
-
exports.useWindowDimensions = useWindowDimensions;
|
|
213
|
+
exports.useWindowDimensions = useWindowDimensions;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
2
|
import React, { forwardRef } from "react";
|
|
3
|
-
|
|
4
3
|
//#region src/jest/mocks/react-native.tsx
|
|
5
4
|
global.__DEV__ = true;
|
|
6
5
|
function createMockComponent(name) {
|
|
@@ -174,7 +173,7 @@ const ReactNative = {
|
|
|
174
173
|
useColorScheme,
|
|
175
174
|
useWindowDimensions
|
|
176
175
|
};
|
|
177
|
-
|
|
178
176
|
//#endregion
|
|
179
177
|
export { AccessibilityInfo, ActivityIndicator, Animated, AppState, Appearance, Dimensions, FlatList, Image, Keyboard, KeyboardAvoidingView, Linking, Modal, NativeEventEmitter, PixelRatio, Platform, Pressable, RefreshControl, SafeAreaView, ScrollView, SectionList, StyleSheet, Switch, Text, TextInput, TouchableHighlight, TouchableOpacity, TouchableWithoutFeedback, View, ReactNative as default, useColorScheme, useWindowDimensions };
|
|
178
|
+
|
|
180
179
|
//# sourceMappingURL=react-native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-native.js","names":[],"sources":["../../../src/jest/mocks/react-native.tsx"],"sourcesContent":["/**\n * Jest mock for react-native core components.\n *\n * Provides simple mock implementations for React Native components\n * that work in a Jest environment without native modules.\n */\n\n/// <reference types=\"jest\" />\n\nimport type { ReactNode } from 'react';\nimport React, { forwardRef } from 'react';\n\n// Set up React Native globals\ndeclare const global: { __DEV__?: boolean };\nglobal.__DEV__ = true;\n\ninterface MockComponentProps {\n children?: ReactNode;\n style?: object;\n testID?: string;\n accessibilityRole?: string;\n accessibilityLabel?: string;\n [key: string]: unknown;\n}\n\n// Create a simple mock component factory\nfunction createMockComponent(name: string) {\n const MockComponent = forwardRef<unknown, MockComponentProps>(({ children, ...props }, ref) => {\n return React.createElement(name, { ...props, ref }, children as ReactNode);\n });\n MockComponent.displayName = name;\n return MockComponent;\n}\n\n// Component mocks\nconst View = createMockComponent('View');\nconst Text = createMockComponent('Text');\nconst Image = createMockComponent('Image');\nconst ScrollView = createMockComponent('ScrollView');\nconst TextInput = createMockComponent('TextInput');\nconst TouchableOpacity = createMockComponent('TouchableOpacity');\nconst TouchableHighlight = createMockComponent('TouchableHighlight');\nconst TouchableWithoutFeedback = createMockComponent('TouchableWithoutFeedback');\nconst Pressable = createMockComponent('Pressable');\nconst FlatList = createMockComponent('FlatList');\nconst SectionList = createMockComponent('SectionList');\nconst ActivityIndicator = createMockComponent('ActivityIndicator');\nconst SafeAreaView = createMockComponent('SafeAreaView');\nconst Modal = createMockComponent('Modal');\nconst Switch = createMockComponent('Switch');\nconst RefreshControl = createMockComponent('RefreshControl');\nconst KeyboardAvoidingView = createMockComponent('KeyboardAvoidingView');\n\n// StyleSheet mock\nconst StyleSheet = {\n create: <T extends Record<string, object>>(styles: T): T => styles,\n flatten: (style: object | object[]): object => {\n if (Array.isArray(style)) {\n return Object.assign({}, ...style);\n }\n return style || {};\n },\n compose: (style1: object, style2: object): object[] => [style1, style2],\n hairlineWidth: 1,\n absoluteFill: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 },\n absoluteFillObject: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 },\n};\n\n// Platform mock\nconst Platform = {\n OS: 'ios' as const,\n Version: 17,\n select: <T extends Record<string, unknown>>(config: T): T[keyof T] | undefined => {\n return (config.ios ?? config.default) as T[keyof T] | undefined;\n },\n isTV: false,\n isPad: false,\n isVision: false,\n isTesting: true,\n constants: {\n reactNativeVersion: { major: 0, minor: 83, patch: 0 },\n },\n};\n\n// Dimensions mock\nconst SCREEN_WIDTH = 375;\nconst SCREEN_HEIGHT = 812;\n\nconst Dimensions = {\n get: (_dim: 'window' | 'screen') => ({\n width: SCREEN_WIDTH,\n height: SCREEN_HEIGHT,\n scale: 2,\n fontScale: 1,\n }),\n set: jest.fn(),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n removeEventListener: jest.fn(),\n};\n\n// PixelRatio mock\nconst PixelRatio = {\n get: () => 2,\n getFontScale: () => 1,\n getPixelSizeForLayoutSize: (size: number) => size * 2,\n roundToNearestPixel: (size: number) => Math.round(size * 2) / 2,\n};\n\n// Animated mock (basic - reanimated provides more complete implementation)\nconst Animated = {\n View: createMockComponent('Animated.View'),\n Text: createMockComponent('Animated.Text'),\n Image: createMockComponent('Animated.Image'),\n ScrollView: createMockComponent('Animated.ScrollView'),\n Value: class {\n _value: number;\n constructor(value: number) {\n this._value = value;\n }\n },\n timing: jest.fn(() => ({ start: jest.fn() })),\n spring: jest.fn(() => ({ start: jest.fn() })),\n createAnimatedComponent: (Component: React.ComponentType) => Component,\n};\n\n// Keyboard mock\nconst Keyboard = {\n dismiss: jest.fn(),\n addListener: jest.fn(() => ({ remove: jest.fn() })),\n removeListener: jest.fn(),\n isVisible: jest.fn(() => false),\n};\n\n// Linking mock\nconst Linking = {\n openURL: jest.fn().mockResolvedValue(true),\n canOpenURL: jest.fn().mockResolvedValue(true),\n getInitialURL: jest.fn().mockResolvedValue(null),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n};\n\n// AppState mock\nconst AppState = {\n currentState: 'active',\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n removeEventListener: jest.fn(),\n};\n\n// AccessibilityInfo mock\nconst AccessibilityInfo = {\n isReduceMotionEnabled: jest.fn().mockResolvedValue(false),\n isScreenReaderEnabled: jest.fn().mockResolvedValue(false),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n};\n\n// NativeEventEmitter mock\nclass NativeEventEmitter {\n addListener = jest.fn(() => ({ remove: jest.fn() }));\n removeListener = jest.fn();\n removeAllListeners = jest.fn();\n}\n\n// Appearance mock\nconst Appearance = {\n getColorScheme: () => 'light' as const,\n addChangeListener: jest.fn(() => ({ remove: jest.fn() })),\n removeChangeListener: jest.fn(),\n};\n\n// useColorScheme hook mock\nconst useColorScheme = () => 'light' as const;\n\n// useWindowDimensions hook mock\nconst useWindowDimensions = () => ({\n width: SCREEN_WIDTH,\n height: SCREEN_HEIGHT,\n scale: 2,\n fontScale: 1,\n});\n\n// Default export for compatibility\nconst ReactNative = {\n View,\n Text,\n Image,\n ScrollView,\n TextInput,\n TouchableOpacity,\n TouchableHighlight,\n TouchableWithoutFeedback,\n Pressable,\n FlatList,\n SectionList,\n ActivityIndicator,\n SafeAreaView,\n Modal,\n Switch,\n RefreshControl,\n KeyboardAvoidingView,\n StyleSheet,\n Platform,\n Dimensions,\n PixelRatio,\n Animated,\n Keyboard,\n Linking,\n AppState,\n AccessibilityInfo,\n NativeEventEmitter,\n Appearance,\n useColorScheme,\n useWindowDimensions,\n};\n\n// Named exports\nexport {\n AccessibilityInfo,\n ActivityIndicator,\n Animated,\n Appearance,\n AppState,\n Dimensions,\n FlatList,\n Image,\n Keyboard,\n KeyboardAvoidingView,\n Linking,\n Modal,\n NativeEventEmitter,\n PixelRatio,\n Platform,\n Pressable,\n RefreshControl,\n SafeAreaView,\n ScrollView,\n SectionList,\n StyleSheet,\n Switch,\n Text,\n TextInput,\n TouchableHighlight,\n TouchableOpacity,\n TouchableWithoutFeedback,\n useColorScheme,\n useWindowDimensions,\n View,\n};\n\nexport default ReactNative;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-native.js","names":[],"sources":["../../../src/jest/mocks/react-native.tsx"],"sourcesContent":["/**\n * Jest mock for react-native core components.\n *\n * Provides simple mock implementations for React Native components\n * that work in a Jest environment without native modules.\n */\n\n/// <reference types=\"jest\" />\n\nimport type { ReactNode } from 'react';\nimport React, { forwardRef } from 'react';\n\n// Set up React Native globals\ndeclare const global: { __DEV__?: boolean };\nglobal.__DEV__ = true;\n\ninterface MockComponentProps {\n children?: ReactNode;\n style?: object;\n testID?: string;\n accessibilityRole?: string;\n accessibilityLabel?: string;\n [key: string]: unknown;\n}\n\n// Create a simple mock component factory\nfunction createMockComponent(name: string) {\n const MockComponent = forwardRef<unknown, MockComponentProps>(({ children, ...props }, ref) => {\n return React.createElement(name, { ...props, ref }, children as ReactNode);\n });\n MockComponent.displayName = name;\n return MockComponent;\n}\n\n// Component mocks\nconst View = createMockComponent('View');\nconst Text = createMockComponent('Text');\nconst Image = createMockComponent('Image');\nconst ScrollView = createMockComponent('ScrollView');\nconst TextInput = createMockComponent('TextInput');\nconst TouchableOpacity = createMockComponent('TouchableOpacity');\nconst TouchableHighlight = createMockComponent('TouchableHighlight');\nconst TouchableWithoutFeedback = createMockComponent('TouchableWithoutFeedback');\nconst Pressable = createMockComponent('Pressable');\nconst FlatList = createMockComponent('FlatList');\nconst SectionList = createMockComponent('SectionList');\nconst ActivityIndicator = createMockComponent('ActivityIndicator');\nconst SafeAreaView = createMockComponent('SafeAreaView');\nconst Modal = createMockComponent('Modal');\nconst Switch = createMockComponent('Switch');\nconst RefreshControl = createMockComponent('RefreshControl');\nconst KeyboardAvoidingView = createMockComponent('KeyboardAvoidingView');\n\n// StyleSheet mock\nconst StyleSheet = {\n create: <T extends Record<string, object>>(styles: T): T => styles,\n flatten: (style: object | object[]): object => {\n if (Array.isArray(style)) {\n return Object.assign({}, ...style);\n }\n return style || {};\n },\n compose: (style1: object, style2: object): object[] => [style1, style2],\n hairlineWidth: 1,\n absoluteFill: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 },\n absoluteFillObject: { position: 'absolute', left: 0, right: 0, top: 0, bottom: 0 },\n};\n\n// Platform mock\nconst Platform = {\n OS: 'ios' as const,\n Version: 17,\n select: <T extends Record<string, unknown>>(config: T): T[keyof T] | undefined => {\n return (config.ios ?? config.default) as T[keyof T] | undefined;\n },\n isTV: false,\n isPad: false,\n isVision: false,\n isTesting: true,\n constants: {\n reactNativeVersion: { major: 0, minor: 83, patch: 0 },\n },\n};\n\n// Dimensions mock\nconst SCREEN_WIDTH = 375;\nconst SCREEN_HEIGHT = 812;\n\nconst Dimensions = {\n get: (_dim: 'window' | 'screen') => ({\n width: SCREEN_WIDTH,\n height: SCREEN_HEIGHT,\n scale: 2,\n fontScale: 1,\n }),\n set: jest.fn(),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n removeEventListener: jest.fn(),\n};\n\n// PixelRatio mock\nconst PixelRatio = {\n get: () => 2,\n getFontScale: () => 1,\n getPixelSizeForLayoutSize: (size: number) => size * 2,\n roundToNearestPixel: (size: number) => Math.round(size * 2) / 2,\n};\n\n// Animated mock (basic - reanimated provides more complete implementation)\nconst Animated = {\n View: createMockComponent('Animated.View'),\n Text: createMockComponent('Animated.Text'),\n Image: createMockComponent('Animated.Image'),\n ScrollView: createMockComponent('Animated.ScrollView'),\n Value: class {\n _value: number;\n constructor(value: number) {\n this._value = value;\n }\n },\n timing: jest.fn(() => ({ start: jest.fn() })),\n spring: jest.fn(() => ({ start: jest.fn() })),\n createAnimatedComponent: (Component: React.ComponentType) => Component,\n};\n\n// Keyboard mock\nconst Keyboard = {\n dismiss: jest.fn(),\n addListener: jest.fn(() => ({ remove: jest.fn() })),\n removeListener: jest.fn(),\n isVisible: jest.fn(() => false),\n};\n\n// Linking mock\nconst Linking = {\n openURL: jest.fn().mockResolvedValue(true),\n canOpenURL: jest.fn().mockResolvedValue(true),\n getInitialURL: jest.fn().mockResolvedValue(null),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n};\n\n// AppState mock\nconst AppState = {\n currentState: 'active',\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n removeEventListener: jest.fn(),\n};\n\n// AccessibilityInfo mock\nconst AccessibilityInfo = {\n isReduceMotionEnabled: jest.fn().mockResolvedValue(false),\n isScreenReaderEnabled: jest.fn().mockResolvedValue(false),\n addEventListener: jest.fn(() => ({ remove: jest.fn() })),\n};\n\n// NativeEventEmitter mock\nclass NativeEventEmitter {\n addListener = jest.fn(() => ({ remove: jest.fn() }));\n removeListener = jest.fn();\n removeAllListeners = jest.fn();\n}\n\n// Appearance mock\nconst Appearance = {\n getColorScheme: () => 'light' as const,\n addChangeListener: jest.fn(() => ({ remove: jest.fn() })),\n removeChangeListener: jest.fn(),\n};\n\n// useColorScheme hook mock\nconst useColorScheme = () => 'light' as const;\n\n// useWindowDimensions hook mock\nconst useWindowDimensions = () => ({\n width: SCREEN_WIDTH,\n height: SCREEN_HEIGHT,\n scale: 2,\n fontScale: 1,\n});\n\n// Default export for compatibility\nconst ReactNative = {\n View,\n Text,\n Image,\n ScrollView,\n TextInput,\n TouchableOpacity,\n TouchableHighlight,\n TouchableWithoutFeedback,\n Pressable,\n FlatList,\n SectionList,\n ActivityIndicator,\n SafeAreaView,\n Modal,\n Switch,\n RefreshControl,\n KeyboardAvoidingView,\n StyleSheet,\n Platform,\n Dimensions,\n PixelRatio,\n Animated,\n Keyboard,\n Linking,\n AppState,\n AccessibilityInfo,\n NativeEventEmitter,\n Appearance,\n useColorScheme,\n useWindowDimensions,\n};\n\n// Named exports\nexport {\n AccessibilityInfo,\n ActivityIndicator,\n Animated,\n Appearance,\n AppState,\n Dimensions,\n FlatList,\n Image,\n Keyboard,\n KeyboardAvoidingView,\n Linking,\n Modal,\n NativeEventEmitter,\n PixelRatio,\n Platform,\n Pressable,\n RefreshControl,\n SafeAreaView,\n ScrollView,\n SectionList,\n StyleSheet,\n Switch,\n Text,\n TextInput,\n TouchableHighlight,\n TouchableOpacity,\n TouchableWithoutFeedback,\n useColorScheme,\n useWindowDimensions,\n View,\n};\n\nexport default ReactNative;\n"],"mappings":";;;AAcA,OAAO,UAAU;AAYjB,SAAS,oBAAoB,MAAc;CACzC,MAAM,gBAAgB,YAAyC,EAAE,UAAU,GAAG,SAAS,QAAQ;AAC7F,SAAO,MAAM,cAAc,MAAM;GAAE,GAAG;GAAO;GAAK,EAAE,SAAsB;GAC1E;AACF,eAAc,cAAc;AAC5B,QAAO;;AAIT,MAAM,OAAO,oBAAoB,OAAO;AACxC,MAAM,OAAO,oBAAoB,OAAO;AACxC,MAAM,QAAQ,oBAAoB,QAAQ;AAC1C,MAAM,aAAa,oBAAoB,aAAa;AACpD,MAAM,YAAY,oBAAoB,YAAY;AAClD,MAAM,mBAAmB,oBAAoB,mBAAmB;AAChE,MAAM,qBAAqB,oBAAoB,qBAAqB;AACpE,MAAM,2BAA2B,oBAAoB,2BAA2B;AAChF,MAAM,YAAY,oBAAoB,YAAY;AAClD,MAAM,WAAW,oBAAoB,WAAW;AAChD,MAAM,cAAc,oBAAoB,cAAc;AACtD,MAAM,oBAAoB,oBAAoB,oBAAoB;AAClE,MAAM,eAAe,oBAAoB,eAAe;AACxD,MAAM,QAAQ,oBAAoB,QAAQ;AAC1C,MAAM,SAAS,oBAAoB,SAAS;AAC5C,MAAM,iBAAiB,oBAAoB,iBAAiB;AAC5D,MAAM,uBAAuB,oBAAoB,uBAAuB;AAGxE,MAAM,aAAa;CACjB,SAA2C,WAAiB;CAC5D,UAAU,UAAqC;AAC7C,MAAI,MAAM,QAAQ,MAAM,CACtB,QAAO,OAAO,OAAO,EAAE,EAAE,GAAG,MAAM;AAEpC,SAAO,SAAS,EAAE;;CAEpB,UAAU,QAAgB,WAA6B,CAAC,QAAQ,OAAO;CACvE,eAAe;CACf,cAAc;EAAE,UAAU;EAAY,MAAM;EAAG,OAAO;EAAG,KAAK;EAAG,QAAQ;EAAG;CAC5E,oBAAoB;EAAE,UAAU;EAAY,MAAM;EAAG,OAAO;EAAG,KAAK;EAAG,QAAQ;EAAG;CACnF;AAGD,MAAM,WAAW;CACf,IAAI;CACJ,SAAS;CACT,SAA4C,WAAsC;AAChF,SAAQ,OAAO,OAAO,OAAO;;CAE/B,MAAM;CACN,OAAO;CACP,UAAU;CACV,WAAW;CACX,WAAW,EACT,oBAAoB;EAAE,OAAO;EAAG,OAAO;EAAI,OAAO;EAAG,EACtD;CACF;AAGD,MAAM,eAAe;AACrB,MAAM,gBAAgB;AAEtB,MAAM,aAAa;CACjB,MAAM,UAA+B;EACnC,OAAO;EACP,QAAQ;EACR,OAAO;EACP,WAAW;EACZ;CACD,KAAK,KAAK,IAAI;CACd,kBAAkB,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACxD,qBAAqB,KAAK,IAAI;CAC/B;AAGD,MAAM,aAAa;CACjB,WAAW;CACX,oBAAoB;CACpB,4BAA4B,SAAiB,OAAO;CACpD,sBAAsB,SAAiB,KAAK,MAAM,OAAO,EAAE,GAAG;CAC/D;AAGD,MAAM,WAAW;CACf,MAAM,oBAAoB,gBAAgB;CAC1C,MAAM,oBAAoB,gBAAgB;CAC1C,OAAO,oBAAoB,iBAAiB;CAC5C,YAAY,oBAAoB,sBAAsB;CACtD,OAAO,MAAM;EACX;EACA,YAAY,OAAe;AACzB,QAAK,SAAS;;;CAGlB,QAAQ,KAAK,UAAU,EAAE,OAAO,KAAK,IAAI,EAAE,EAAE;CAC7C,QAAQ,KAAK,UAAU,EAAE,OAAO,KAAK,IAAI,EAAE,EAAE;CAC7C,0BAA0B,cAAmC;CAC9D;AAGD,MAAM,WAAW;CACf,SAAS,KAAK,IAAI;CAClB,aAAa,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACnD,gBAAgB,KAAK,IAAI;CACzB,WAAW,KAAK,SAAS,MAAM;CAChC;AAGD,MAAM,UAAU;CACd,SAAS,KAAK,IAAI,CAAC,kBAAkB,KAAK;CAC1C,YAAY,KAAK,IAAI,CAAC,kBAAkB,KAAK;CAC7C,eAAe,KAAK,IAAI,CAAC,kBAAkB,KAAK;CAChD,kBAAkB,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACzD;AAGD,MAAM,WAAW;CACf,cAAc;CACd,kBAAkB,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACxD,qBAAqB,KAAK,IAAI;CAC/B;AAGD,MAAM,oBAAoB;CACxB,uBAAuB,KAAK,IAAI,CAAC,kBAAkB,MAAM;CACzD,uBAAuB,KAAK,IAAI,CAAC,kBAAkB,MAAM;CACzD,kBAAkB,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACzD;AAGD,IAAM,qBAAN,MAAyB;CACvB,cAAc,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACpD,iBAAiB,KAAK,IAAI;CAC1B,qBAAqB,KAAK,IAAI;;AAIhC,MAAM,aAAa;CACjB,sBAAsB;CACtB,mBAAmB,KAAK,UAAU,EAAE,QAAQ,KAAK,IAAI,EAAE,EAAE;CACzD,sBAAsB,KAAK,IAAI;CAChC;AAGD,MAAM,uBAAuB;AAG7B,MAAM,6BAA6B;CACjC,OAAO;CACP,QAAQ;CACR,OAAO;CACP,WAAW;CACZ;AAGD,MAAM,cAAc;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
-
Object.defineProperties(exports, {
|
|
3
|
-
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
4
7
|
let react = require("react");
|
|
5
8
|
react = require_runtime.__toESM(react);
|
|
6
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
-
|
|
8
10
|
//#region src/jest/mocks/reanimated.tsx
|
|
9
11
|
var reanimated_exports = /* @__PURE__ */ require_runtime.__exportAll({
|
|
10
12
|
Animated: () => Animated,
|
|
@@ -206,7 +208,6 @@ const measure = jest.fn(() => ({
|
|
|
206
208
|
pageY: 0
|
|
207
209
|
}));
|
|
208
210
|
const scrollTo = jest.fn();
|
|
209
|
-
|
|
210
211
|
//#endregion
|
|
211
212
|
exports.Animated = Animated;
|
|
212
213
|
exports.default = Animated;
|
|
@@ -224,11 +225,11 @@ exports.interpolate = interpolate;
|
|
|
224
225
|
exports.interpolateColor = interpolateColor;
|
|
225
226
|
exports.isWorklet = isWorklet;
|
|
226
227
|
exports.measure = measure;
|
|
227
|
-
Object.defineProperty(exports,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
228
|
+
Object.defineProperty(exports, "reanimated_exports", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function() {
|
|
231
|
+
return reanimated_exports;
|
|
232
|
+
}
|
|
232
233
|
});
|
|
233
234
|
exports.runOnJS = runOnJS;
|
|
234
235
|
exports.runOnUI = runOnUI;
|
|
@@ -246,4 +247,4 @@ exports.withDelay = withDelay;
|
|
|
246
247
|
exports.withRepeat = withRepeat;
|
|
247
248
|
exports.withSequence = withSequence;
|
|
248
249
|
exports.withSpring = withSpring;
|
|
249
|
-
exports.withTiming = withTiming;
|
|
250
|
+
exports.withTiming = withTiming;
|