@yahoo/uds-mobile 1.0.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/CONTRIBUTING.md +1174 -0
- package/README.md +614 -0
- package/cli/uds-mobile.js +10 -0
- package/dist/_virtual/rolldown_runtime.cjs +30 -0
- package/dist/bin/generateTheme.mjs +390 -0
- package/dist/bin/mobile/scripts/utils/configToRNMappings.mjs +74 -0
- package/dist/bin/uds/dist/fixtures.mjs +404 -0
- package/dist/bin/uds/dist/tokens/configs/palette/alwaysPalette.mjs +23 -0
- package/dist/bin/uds/dist/tokens/consts/defaultModes.mjs +6 -0
- package/dist/bin/uds/dist/tokens/consts/fontDeclarationsMap.mjs +652 -0
- package/dist/bin/uds-mobile.mjs +256 -0
- package/dist/components/Avatar.cjs +109 -0
- package/dist/components/Avatar.d.cts +60 -0
- package/dist/components/Avatar.d.cts.map +1 -0
- package/dist/components/Avatar.d.mts +60 -0
- package/dist/components/Avatar.d.mts.map +1 -0
- package/dist/components/Avatar.mjs +109 -0
- package/dist/components/Avatar.mjs.map +1 -0
- package/dist/components/Badge.cjs +68 -0
- package/dist/components/Badge.d.cts +43 -0
- package/dist/components/Badge.d.cts.map +1 -0
- package/dist/components/Badge.d.mts +43 -0
- package/dist/components/Badge.d.mts.map +1 -0
- package/dist/components/Badge.mjs +68 -0
- package/dist/components/Badge.mjs.map +1 -0
- package/dist/components/Box.cjs +114 -0
- package/dist/components/Box.d.cts +87 -0
- package/dist/components/Box.d.cts.map +1 -0
- package/dist/components/Box.d.mts +87 -0
- package/dist/components/Box.d.mts.map +1 -0
- package/dist/components/Box.mjs +114 -0
- package/dist/components/Box.mjs.map +1 -0
- package/dist/components/Button.cjs +187 -0
- package/dist/components/Button.d.cts +56 -0
- package/dist/components/Button.d.cts.map +1 -0
- package/dist/components/Button.d.mts +56 -0
- package/dist/components/Button.d.mts.map +1 -0
- package/dist/components/Button.mjs +186 -0
- package/dist/components/Button.mjs.map +1 -0
- package/dist/components/Checkbox.cjs +156 -0
- package/dist/components/Checkbox.d.cts +48 -0
- package/dist/components/Checkbox.d.cts.map +1 -0
- package/dist/components/Checkbox.d.mts +48 -0
- package/dist/components/Checkbox.d.mts.map +1 -0
- package/dist/components/Checkbox.mjs +155 -0
- package/dist/components/Checkbox.mjs.map +1 -0
- package/dist/components/Chip.cjs +124 -0
- package/dist/components/Chip.d.cts +60 -0
- package/dist/components/Chip.d.cts.map +1 -0
- package/dist/components/Chip.d.mts +60 -0
- package/dist/components/Chip.d.mts.map +1 -0
- package/dist/components/Chip.mjs +124 -0
- package/dist/components/Chip.mjs.map +1 -0
- package/dist/components/HStack.cjs +46 -0
- package/dist/components/HStack.d.cts +41 -0
- package/dist/components/HStack.d.cts.map +1 -0
- package/dist/components/HStack.d.mts +41 -0
- package/dist/components/HStack.d.mts.map +1 -0
- package/dist/components/HStack.mjs +46 -0
- package/dist/components/HStack.mjs.map +1 -0
- package/dist/components/Icon.cjs +150 -0
- package/dist/components/Icon.d.cts +90 -0
- package/dist/components/Icon.d.cts.map +1 -0
- package/dist/components/Icon.d.mts +90 -0
- package/dist/components/Icon.d.mts.map +1 -0
- package/dist/components/Icon.mjs +148 -0
- package/dist/components/Icon.mjs.map +1 -0
- package/dist/components/IconButton.cjs +127 -0
- package/dist/components/IconButton.d.cts +46 -0
- package/dist/components/IconButton.d.cts.map +1 -0
- package/dist/components/IconButton.d.mts +46 -0
- package/dist/components/IconButton.d.mts.map +1 -0
- package/dist/components/IconButton.mjs +127 -0
- package/dist/components/IconButton.mjs.map +1 -0
- package/dist/components/IconSlot.cjs +55 -0
- package/dist/components/IconSlot.d.cts +45 -0
- package/dist/components/IconSlot.d.cts.map +1 -0
- package/dist/components/IconSlot.d.mts +45 -0
- package/dist/components/IconSlot.d.mts.map +1 -0
- package/dist/components/IconSlot.mjs +55 -0
- package/dist/components/IconSlot.mjs.map +1 -0
- package/dist/components/Image.cjs +104 -0
- package/dist/components/Image.d.cts +85 -0
- package/dist/components/Image.d.cts.map +1 -0
- package/dist/components/Image.d.mts +85 -0
- package/dist/components/Image.d.mts.map +1 -0
- package/dist/components/Image.mjs +104 -0
- package/dist/components/Image.mjs.map +1 -0
- package/dist/components/Input.cjs +174 -0
- package/dist/components/Input.d.cts +39 -0
- package/dist/components/Input.d.cts.map +1 -0
- package/dist/components/Input.d.mts +39 -0
- package/dist/components/Input.d.mts.map +1 -0
- package/dist/components/Input.mjs +174 -0
- package/dist/components/Input.mjs.map +1 -0
- package/dist/components/Link.cjs +139 -0
- package/dist/components/Link.d.cts +45 -0
- package/dist/components/Link.d.cts.map +1 -0
- package/dist/components/Link.d.mts +45 -0
- package/dist/components/Link.d.mts.map +1 -0
- package/dist/components/Link.mjs +138 -0
- package/dist/components/Link.mjs.map +1 -0
- package/dist/components/Pressable.cjs +120 -0
- package/dist/components/Pressable.d.cts +90 -0
- package/dist/components/Pressable.d.cts.map +1 -0
- package/dist/components/Pressable.d.mts +90 -0
- package/dist/components/Pressable.d.mts.map +1 -0
- package/dist/components/Pressable.mjs +118 -0
- package/dist/components/Pressable.mjs.map +1 -0
- package/dist/components/Radio.cjs +153 -0
- package/dist/components/Radio.d.cts +46 -0
- package/dist/components/Radio.d.cts.map +1 -0
- package/dist/components/Radio.d.mts +46 -0
- package/dist/components/Radio.d.mts.map +1 -0
- package/dist/components/Radio.mjs +152 -0
- package/dist/components/Radio.mjs.map +1 -0
- package/dist/components/Screen.cjs +89 -0
- package/dist/components/Screen.d.cts +53 -0
- package/dist/components/Screen.d.cts.map +1 -0
- package/dist/components/Screen.d.mts +53 -0
- package/dist/components/Screen.d.mts.map +1 -0
- package/dist/components/Screen.mjs +89 -0
- package/dist/components/Screen.mjs.map +1 -0
- package/dist/components/Switch.cjs +172 -0
- package/dist/components/Switch.d.cts +42 -0
- package/dist/components/Switch.d.cts.map +1 -0
- package/dist/components/Switch.d.mts +42 -0
- package/dist/components/Switch.d.mts.map +1 -0
- package/dist/components/Switch.mjs +171 -0
- package/dist/components/Switch.mjs.map +1 -0
- package/dist/components/Text.cjs +107 -0
- package/dist/components/Text.d.cts +96 -0
- package/dist/components/Text.d.cts.map +1 -0
- package/dist/components/Text.d.mts +96 -0
- package/dist/components/Text.d.mts.map +1 -0
- package/dist/components/Text.mjs +107 -0
- package/dist/components/Text.mjs.map +1 -0
- package/dist/components/VStack.cjs +46 -0
- package/dist/components/VStack.d.cts +41 -0
- package/dist/components/VStack.d.cts.map +1 -0
- package/dist/components/VStack.d.mts +41 -0
- package/dist/components/VStack.d.mts.map +1 -0
- package/dist/components/VStack.mjs +46 -0
- package/dist/components/VStack.mjs.map +1 -0
- package/dist/icons/dist/glyphMap.cjs +5475 -0
- package/dist/icons/dist/glyphMap.d.cts +10 -0
- package/dist/icons/dist/glyphMap.d.cts.map +1 -0
- package/dist/icons/dist/glyphMap.d.mts +10 -0
- package/dist/icons/dist/glyphMap.d.mts.map +1 -0
- package/dist/icons/dist/glyphMap.mjs +5474 -0
- package/dist/icons/dist/glyphMap.mjs.map +1 -0
- package/dist/icons/dist/svgMap.cjs +525 -0
- package/dist/icons/dist/svgMap.d.cts +10 -0
- package/dist/icons/dist/svgMap.d.cts.map +1 -0
- package/dist/icons/dist/svgMap.d.mts +10 -0
- package/dist/icons/dist/svgMap.d.mts.map +1 -0
- package/dist/icons/dist/svgMap.mjs +524 -0
- package/dist/icons/dist/svgMap.mjs.map +1 -0
- package/dist/icons/dist/tokens.cjs +13 -0
- package/dist/icons/dist/tokens.mjs +13 -0
- package/dist/icons/dist/tokens.mjs.map +1 -0
- package/dist/icons/dist/types.d.cts +24 -0
- package/dist/icons/dist/types.d.cts.map +1 -0
- package/dist/icons/dist/types.d.mts +24 -0
- package/dist/icons/dist/types.d.mts.map +1 -0
- package/dist/motion.cjs +56 -0
- package/dist/motion.d.cts +46 -0
- package/dist/motion.d.cts.map +1 -0
- package/dist/motion.d.mts +46 -0
- package/dist/motion.d.mts.map +1 -0
- package/dist/motion.mjs +52 -0
- package/dist/motion.mjs.map +1 -0
- package/dist/types.cjs +1 -0
- package/dist/types.d.cts +13 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.mts +13 -0
- package/dist/types.d.mts.map +1 -0
- package/dist/types.mjs +2 -0
- package/dist/uds/dist/components/Box.d.cts +3 -0
- package/dist/uds/dist/components/Box.d.mts +3 -0
- package/dist/uds/dist/components/Divider/Divider.d.cts +3 -0
- package/dist/uds/dist/components/Divider/Divider.d.mts +3 -0
- package/dist/uds/dist/components/Divider/DividerCore.d.cts +4 -0
- package/dist/uds/dist/components/Divider/DividerCore.d.mts +4 -0
- package/dist/uds/dist/components/Divider/DividerInternal.d.cts +4 -0
- package/dist/uds/dist/components/Divider/DividerInternal.d.mts +4 -0
- package/dist/uds/dist/components/Divider/index.d.cts +2 -0
- package/dist/uds/dist/components/Divider/index.d.mts +2 -0
- package/dist/uds/dist/components/FormLabel.d.cts +3 -0
- package/dist/uds/dist/components/FormLabel.d.mts +4 -0
- package/dist/uds/dist/components/HStack.d.cts +4 -0
- package/dist/uds/dist/components/HStack.d.mts +4 -0
- package/dist/uds/dist/components/Icon.d.cts +3 -0
- package/dist/uds/dist/components/Icon.d.mts +3 -0
- package/dist/uds/dist/components/Image.d.cts +2 -0
- package/dist/uds/dist/components/Image.d.mts +3 -0
- package/dist/uds/dist/components/Link.d.cts +3 -0
- package/dist/uds/dist/components/Link.d.mts +3 -0
- package/dist/uds/dist/components/Text.d.cts +3 -0
- package/dist/uds/dist/components/Text.d.mts +3 -0
- package/dist/uds/dist/components/VStack.d.cts +4 -0
- package/dist/uds/dist/components/VStack.d.mts +4 -0
- package/dist/uds/dist/components/client/Avatar/Avatar.d.cts +2 -0
- package/dist/uds/dist/components/client/Avatar/Avatar.d.mts +3 -0
- package/dist/uds/dist/components/client/Avatar/AvatarIcon.d.cts +2 -0
- package/dist/uds/dist/components/client/Avatar/AvatarIcon.d.mts +3 -0
- package/dist/uds/dist/components/client/Avatar/AvatarImage.d.cts +4 -0
- package/dist/uds/dist/components/client/Avatar/AvatarImage.d.mts +5 -0
- package/dist/uds/dist/components/client/Avatar/AvatarText.d.cts +3 -0
- package/dist/uds/dist/components/client/Avatar/AvatarText.d.mts +4 -0
- package/dist/uds/dist/components/client/Avatar/index.d.cts +5 -0
- package/dist/uds/dist/components/client/Avatar/index.d.mts +5 -0
- package/dist/uds/dist/components/client/Badge.d.cts +3 -0
- package/dist/uds/dist/components/client/Badge.d.mts +3 -0
- package/dist/uds/dist/components/client/Button.d.cts +3 -0
- package/dist/uds/dist/components/client/Button.d.mts +3 -0
- package/dist/uds/dist/components/client/Checkbox.d.cts +3 -0
- package/dist/uds/dist/components/client/Checkbox.d.mts +3 -0
- package/dist/uds/dist/components/client/Chip/Chip.d.cts +4 -0
- package/dist/uds/dist/components/client/Chip/Chip.d.mts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipBase.d.cts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipBase.d.mts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipButton.d.cts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipButton.d.mts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipDismissible.d.cts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipDismissible.d.mts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipLink.d.cts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipLink.d.mts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipToggle.d.cts +4 -0
- package/dist/uds/dist/components/client/Chip/ChipToggle.d.mts +4 -0
- package/dist/uds/dist/components/client/Chip/index.d.cts +6 -0
- package/dist/uds/dist/components/client/Chip/index.d.mts +6 -0
- package/dist/uds/dist/components/client/IconButton.d.cts +3 -0
- package/dist/uds/dist/components/client/IconButton.d.mts +3 -0
- package/dist/uds/dist/components/client/Input/Input.d.cts +4 -0
- package/dist/uds/dist/components/client/Input/Input.d.mts +4 -0
- package/dist/uds/dist/components/client/Input/InputHelpText.d.cts +2 -0
- package/dist/uds/dist/components/client/Input/InputHelpText.d.mts +3 -0
- package/dist/uds/dist/components/client/Input/InputHelpTextInternal.d.cts +5 -0
- package/dist/uds/dist/components/client/Input/InputHelpTextInternal.d.mts +6 -0
- package/dist/uds/dist/components/client/Input/index.d.cts +3 -0
- package/dist/uds/dist/components/client/Input/index.d.mts +3 -0
- package/dist/uds/dist/components/client/Menu/Menu.Content.d.cts +4 -0
- package/dist/uds/dist/components/client/Menu/Menu.Content.d.mts +4 -0
- package/dist/uds/dist/components/client/Menu/Menu.Divider.d.cts +3 -0
- package/dist/uds/dist/components/client/Menu/Menu.Divider.d.mts +3 -0
- package/dist/uds/dist/components/client/Menu/Menu.Item.d.cts +4 -0
- package/dist/uds/dist/components/client/Menu/Menu.Item.d.mts +4 -0
- package/dist/uds/dist/components/client/Menu/Menu.ItemCheckbox.d.cts +4 -0
- package/dist/uds/dist/components/client/Menu/Menu.ItemCheckbox.d.mts +4 -0
- package/dist/uds/dist/components/client/Menu/Menu.Provider.d.cts +2 -0
- package/dist/uds/dist/components/client/Menu/Menu.Provider.d.mts +3 -0
- package/dist/uds/dist/components/client/Menu/Menu.Trigger.d.cts +4 -0
- package/dist/uds/dist/components/client/Menu/Menu.Trigger.d.mts +4 -0
- package/dist/uds/dist/components/client/Menu/Menu.d.cts +2 -0
- package/dist/uds/dist/components/client/Menu/Menu.d.mts +2 -0
- package/dist/uds/dist/components/client/Menu/Menu.index.d.cts +7 -0
- package/dist/uds/dist/components/client/Menu/Menu.index.d.mts +7 -0
- package/dist/uds/dist/components/client/Menu/index.d.cts +9 -0
- package/dist/uds/dist/components/client/Menu/index.d.mts +9 -0
- package/dist/uds/dist/components/client/Pressable.d.cts +3 -0
- package/dist/uds/dist/components/client/Pressable.d.mts +3 -0
- package/dist/uds/dist/components/client/Radio/Radio.d.cts +3 -0
- package/dist/uds/dist/components/client/Radio/Radio.d.mts +3 -0
- package/dist/uds/dist/components/client/Radio/RadioGroupProvider.d.cts +3 -0
- package/dist/uds/dist/components/client/Radio/RadioGroupProvider.d.mts +3 -0
- package/dist/uds/dist/components/client/Radio/index.d.cts +3 -0
- package/dist/uds/dist/components/client/Radio/index.d.mts +3 -0
- package/dist/uds/dist/components/client/SpringMotionConfig.d.cts +3 -0
- package/dist/uds/dist/components/client/SpringMotionConfig.d.mts +3 -0
- package/dist/uds/dist/components/client/Switch.d.cts +3 -0
- package/dist/uds/dist/components/client/Switch.d.mts +3 -0
- package/dist/uds/dist/components/client/index.d.cts +33 -0
- package/dist/uds/dist/components/client/index.d.mts +33 -0
- package/dist/uds/dist/components/index.d.cts +40 -0
- package/dist/uds/dist/components/index.d.mts +40 -0
- package/dist/uds/dist/index.d.cts +46 -0
- package/dist/uds/dist/index.d.mts +46 -0
- package/dist/uds/dist/styles/styler.d.cts +2 -0
- package/dist/uds/dist/styles/styler.d.mts +2 -0
- package/dist/uds/dist/styles/stylerTypes.d.cts +2 -0
- package/dist/uds/dist/styles/stylerTypes.d.mts +2 -0
- package/dist/uds/dist/tokens/automation/configs/avatar.d.cts +2 -0
- package/dist/uds/dist/tokens/automation/configs/avatar.d.mts +2 -0
- package/dist/uds/dist/tokens/automation/properties.d.cts +3 -0
- package/dist/uds/dist/tokens/automation/properties.d.mts +3 -0
- package/dist/uds/dist/tokens/automation/types/ComponentConfig.d.cts +3 -0
- package/dist/uds/dist/tokens/automation/types/ComponentConfig.d.mts +3 -0
- package/dist/uds/dist/tokens/configs/motion.cjs +109 -0
- package/dist/uds/dist/tokens/configs/motion.d.cts +20 -0
- package/dist/uds/dist/tokens/configs/motion.d.cts.map +1 -0
- package/dist/uds/dist/tokens/configs/motion.d.mts +20 -0
- package/dist/uds/dist/tokens/configs/motion.d.mts.map +1 -0
- package/dist/uds/dist/tokens/configs/motion.mjs +108 -0
- package/dist/uds/dist/tokens/configs/motion.mjs.map +1 -0
- package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.cts +32 -0
- package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.cts.map +1 -0
- package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.mts +32 -0
- package/dist/uds/dist/tokens/configs/palette/alwaysPalette.d.mts.map +1 -0
- package/dist/uds/dist/tokens/types.d.cts +426 -0
- package/dist/uds/dist/tokens/types.d.cts.map +1 -0
- package/dist/uds/dist/tokens/types.d.mts +426 -0
- package/dist/uds/dist/tokens/types.d.mts.map +1 -0
- package/dist/uds/dist/types.d.cts +2 -0
- package/dist/uds/dist/types.d.mts +2 -0
- package/fonts/centra-no2-black-italic.otf +0 -0
- package/fonts/centra-no2-black.otf +0 -0
- package/fonts/centra-no2-bold-italic.otf +0 -0
- package/fonts/centra-no2-bold.otf +0 -0
- package/fonts/centra-no2-book-italic.otf +0 -0
- package/fonts/centra-no2-book.otf +0 -0
- package/fonts/centra-no2-extrabold-italic.otf +0 -0
- package/fonts/centra-no2-extrabold.otf +0 -0
- package/fonts/centra-no2-hairline-italic.otf +0 -0
- package/fonts/centra-no2-hairline.otf +0 -0
- package/fonts/centra-no2-light-italic.otf +0 -0
- package/fonts/centra-no2-light.otf +0 -0
- package/fonts/centra-no2-medium-italic.otf +0 -0
- package/fonts/centra-no2-medium.otf +0 -0
- package/fonts/centra-no2-thin-italic.otf +0 -0
- package/fonts/centra-no2-thin.otf +0 -0
- package/fonts/gelica-black-italic.otf +0 -0
- package/fonts/gelica-black.otf +0 -0
- package/fonts/gelica-bold-italic.otf +0 -0
- package/fonts/gelica-bold.otf +0 -0
- package/fonts/gelica-extra-light-italic.otf +0 -0
- package/fonts/gelica-extra-light.otf +0 -0
- package/fonts/gelica-light-italic.otf +0 -0
- package/fonts/gelica-light.otf +0 -0
- package/fonts/gelica-medium-italic.otf +0 -0
- package/fonts/gelica-medium.otf +0 -0
- package/fonts/gelica-regular-italic.otf +0 -0
- package/fonts/gelica-regular.otf +0 -0
- package/fonts/gelica-semi-bold-italic.otf +0 -0
- package/fonts/gelica-semi-bold.otf +0 -0
- package/fonts/index.cjs +270 -0
- package/fonts/index.d.ts +10 -0
- package/fonts/index.mjs +272 -0
- package/fonts/inter-black.ttf +0 -0
- package/fonts/inter-bold.ttf +0 -0
- package/fonts/inter-extra-bold.ttf +0 -0
- package/fonts/inter-extra-light.ttf +0 -0
- package/fonts/inter-light.ttf +0 -0
- package/fonts/inter-medium.ttf +0 -0
- package/fonts/inter-regular.ttf +0 -0
- package/fonts/inter-semi-bold.ttf +0 -0
- package/fonts/inter-thin.ttf +0 -0
- package/fonts/roboto-mono-bold-italic.ttf +0 -0
- package/fonts/roboto-mono-bold.ttf +0 -0
- package/fonts/roboto-mono-light-italic.ttf +0 -0
- package/fonts/roboto-mono-light.ttf +0 -0
- package/fonts/roboto-mono-medium-italic.ttf +0 -0
- package/fonts/roboto-mono-medium.ttf +0 -0
- package/fonts/roboto-mono-regular-italic.ttf +0 -0
- package/fonts/roboto-mono-regular.ttf +0 -0
- package/fonts/roboto-mono-thin-italic.ttf +0 -0
- package/fonts/roboto-mono-thin.ttf +0 -0
- package/fonts/uds-icons.ttf +0 -0
- package/fonts/yahoo-product-sans-bold.otf +0 -0
- package/fonts/yahoo-product-sans-extended-black-italic.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-black.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-bold-italic.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-bold.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-light-italic.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-light.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-medium-italic.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-medium.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-regular-italic.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-regular.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-semibold-italic.ttf +0 -0
- package/fonts/yahoo-product-sans-extended-semibold.ttf +0 -0
- package/fonts/yahoo-product-sans-medium.otf +0 -0
- package/fonts/yahoo-product-sans-regular.otf +0 -0
- package/fonts/yahoo-sans-beta-bold.otf +0 -0
- package/fonts/yahoo-sans-beta-medium.otf +0 -0
- package/fonts/yahoo-sans-beta-regular.otf +0 -0
- package/fonts/yahoo-sans-black.otf +0 -0
- package/fonts/yahoo-sans-bold.otf +0 -0
- package/fonts/yahoo-sans-condensed-black.otf +0 -0
- package/fonts/yahoo-sans-condensed-bold.otf +0 -0
- package/fonts/yahoo-sans-condensed-light.otf +0 -0
- package/fonts/yahoo-sans-condensed-medium.otf +0 -0
- package/fonts/yahoo-sans-condensed-regular.otf +0 -0
- package/fonts/yahoo-sans-condensed-xbold.ttf +0 -0
- package/fonts/yahoo-sans-cr4-bold.ttf +0 -0
- package/fonts/yahoo-sans-cr4-medium.ttf +0 -0
- package/fonts/yahoo-sans-cr4-regular.ttf +0 -0
- package/fonts/yahoo-sans-extrabold.otf +0 -0
- package/fonts/yahoo-sans-extralight.otf +0 -0
- package/fonts/yahoo-sans-italic.otf +0 -0
- package/fonts/yahoo-sans-light.otf +0 -0
- package/fonts/yahoo-sans-medium.otf +0 -0
- package/fonts/yahoo-sans-regular-italic.otf +0 -0
- package/fonts/yahoo-sans-regular.otf +0 -0
- package/fonts/yahoo-sans-semibold.otf +0 -0
- package/fonts/yahoo-serif-display-black.otf +0 -0
- package/fonts/yahoo-serif-display-bold.otf +0 -0
- package/fonts/yahoo-serif-display-extrabold.otf +0 -0
- package/fonts/yahoo-serif-display-light.otf +0 -0
- package/fonts/yahoo-serif-display-regular.otf +0 -0
- package/fonts/yahoo-serif-text-bold-italic.ttf +0 -0
- package/fonts/yahoo-serif-text-bold.otf +0 -0
- package/fonts/yahoo-serif-text-italic.otf +0 -0
- package/fonts/yahoo-serif-text-regular.otf +0 -0
- package/fonts/yas-black-italic.otf +0 -0
- package/fonts/yas-black.otf +0 -0
- package/fonts/yas-bold-italic.otf +0 -0
- package/fonts/yas-bold.otf +0 -0
- package/fonts/yas-condensed-black-italic.otf +0 -0
- package/fonts/yas-condensed-black.otf +0 -0
- package/fonts/yas-condensed-bold-italic.otf +0 -0
- package/fonts/yas-condensed-bold.otf +0 -0
- package/fonts/yas-condensed-light-italic.otf +0 -0
- package/fonts/yas-condensed-light.otf +0 -0
- package/fonts/yas-condensed-medium-italic.otf +0 -0
- package/fonts/yas-condensed-medium.otf +0 -0
- package/fonts/yas-condensed-regular-italic.otf +0 -0
- package/fonts/yas-condensed-regular.otf +0 -0
- package/fonts/yas-condensed-semibold-italic.otf +0 -0
- package/fonts/yas-condensed-semibold.otf +0 -0
- package/fonts/yas-extended-black-italic.otf +0 -0
- package/fonts/yas-extended-black.otf +0 -0
- package/fonts/yas-extended-bold-italic.otf +0 -0
- package/fonts/yas-extended-bold.otf +0 -0
- package/fonts/yas-extended-light-italic.otf +0 -0
- package/fonts/yas-extended-light.otf +0 -0
- package/fonts/yas-extended-medium-italic.otf +0 -0
- package/fonts/yas-extended-medium.otf +0 -0
- package/fonts/yas-extended-regular-italic.otf +0 -0
- package/fonts/yas-extended-regular.otf +0 -0
- package/fonts/yas-extended-semibold-italic.otf +0 -0
- package/fonts/yas-extended-semibold.otf +0 -0
- package/fonts/yas-light-italic.otf +0 -0
- package/fonts/yas-light.otf +0 -0
- package/fonts/yas-medium-italic.otf +0 -0
- package/fonts/yas-medium.otf +0 -0
- package/fonts/yas-regular-italic.otf +0 -0
- package/fonts/yas-regular.otf +0 -0
- package/fonts/yas-semibold-italic.otf +0 -0
- package/fonts/yas-semibold.otf +0 -0
- package/generated/styles.cjs +4510 -0
- package/generated/styles.d.cts +1 -0
- package/generated/styles.d.mts +1 -0
- package/generated/styles.d.ts +2965 -0
- package/generated/styles.mjs +4510 -0
- package/generated/unistyles.d.ts +4320 -0
- package/package.json +308 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
3
|
+
const require_components_HStack = require('./HStack.cjs');
|
|
4
|
+
const require_components_VStack = require('./VStack.cjs');
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let react_native = require("react-native");
|
|
7
|
+
let generated_styles = require("../../generated/styles");
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let react_native_unistyles = require("react-native-unistyles");
|
|
10
|
+
|
|
11
|
+
//#region src/components/Screen.tsx
|
|
12
|
+
/**
|
|
13
|
+
* **📱 A screen container with safe area handling**
|
|
14
|
+
*
|
|
15
|
+
* @description
|
|
16
|
+
* A scrollable screen component that handles safe area insets and provides
|
|
17
|
+
* consistent padding and background styling. Uses Unistyles' built-in
|
|
18
|
+
* safe area insets via the `rt` runtime object.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* import { Screen } from '@yahoo/uds-mobile';
|
|
23
|
+
*
|
|
24
|
+
* <Screen backgroundColor="primary" spacingHorizontal="6">
|
|
25
|
+
* <Text>Screen content</Text>
|
|
26
|
+
* </Screen>
|
|
27
|
+
*
|
|
28
|
+
* // With sticky header
|
|
29
|
+
* <Screen
|
|
30
|
+
* stickyHeader={<Text>Header</Text>}
|
|
31
|
+
* stickyHeaderProps={{ backgroundColor: 'secondary' }}
|
|
32
|
+
* >
|
|
33
|
+
* <Text>Content</Text>
|
|
34
|
+
* </Screen>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @usage
|
|
38
|
+
* - Use as the root component for screens
|
|
39
|
+
* - Use stickyHeader for persistent header content
|
|
40
|
+
* - Content is automatically scrollable
|
|
41
|
+
*
|
|
42
|
+
* @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info
|
|
43
|
+
*/
|
|
44
|
+
const Screen = (0, react.memo)(function Screen$1({ children, backgroundColor = "primary", spacingHorizontal = "6", spacingTop = "6", gap, stickyHeader, stickyHeaderProps, style, ref, ...props }) {
|
|
45
|
+
const { style: stickyHeaderStyle, ...stickyHeaderPropsWithoutStyle } = stickyHeaderProps ?? {};
|
|
46
|
+
generated_styles.styles.useVariants({
|
|
47
|
+
backgroundColor,
|
|
48
|
+
flex: "1",
|
|
49
|
+
flexDirection: "column",
|
|
50
|
+
columnGap: gap
|
|
51
|
+
});
|
|
52
|
+
const scrollStyles = (0, react.useMemo)(() => [generated_styles.styles.foundation, style], [generated_styles.styles.foundation, style]);
|
|
53
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_VStack.VStack, {
|
|
54
|
+
backgroundColor: "primary",
|
|
55
|
+
style: screenStyles.wrapper,
|
|
56
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.ScrollView, {
|
|
57
|
+
ref,
|
|
58
|
+
style: scrollStyles,
|
|
59
|
+
stickyHeaderIndices: stickyHeader ? [0] : void 0,
|
|
60
|
+
...props,
|
|
61
|
+
children: [stickyHeader && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_HStack.HStack, {
|
|
62
|
+
spacingHorizontal: "6",
|
|
63
|
+
spacingBottom: "4",
|
|
64
|
+
backgroundColor: "primary",
|
|
65
|
+
justifyContent: "flex-end",
|
|
66
|
+
style: stickyHeaderStyle,
|
|
67
|
+
...stickyHeaderPropsWithoutStyle,
|
|
68
|
+
children: stickyHeader
|
|
69
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_VStack.VStack, {
|
|
70
|
+
flex: "1",
|
|
71
|
+
spacingHorizontal,
|
|
72
|
+
spacingTop,
|
|
73
|
+
gap,
|
|
74
|
+
children
|
|
75
|
+
})]
|
|
76
|
+
})
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
Screen.displayName = "Screen";
|
|
80
|
+
const screenStyles = react_native_unistyles.StyleSheet.create((_theme, rt) => ({ wrapper: {
|
|
81
|
+
flex: 1,
|
|
82
|
+
paddingTop: rt.insets.top,
|
|
83
|
+
paddingBottom: rt.insets.bottom,
|
|
84
|
+
paddingLeft: rt.insets.left,
|
|
85
|
+
paddingRight: rt.insets.right
|
|
86
|
+
} }));
|
|
87
|
+
|
|
88
|
+
//#endregion
|
|
89
|
+
exports.Screen = Screen;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
import { HStackProps } from "./HStack.cjs";
|
|
3
|
+
import * as react1 from "react";
|
|
4
|
+
import { ReactNode, Ref } from "react";
|
|
5
|
+
import { ScrollView, ScrollViewProps } from "react-native";
|
|
6
|
+
import { StyleProps } from "../../generated/styles";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Screen.d.ts
|
|
9
|
+
interface ScreenProps extends ScrollViewProps {
|
|
10
|
+
ref?: Ref<ScrollView>;
|
|
11
|
+
backgroundColor?: StyleProps['backgroundColor'];
|
|
12
|
+
spacingHorizontal?: StyleProps['spacingHorizontal'];
|
|
13
|
+
spacingTop?: StyleProps['spacingTop'];
|
|
14
|
+
gap?: StyleProps['columnGap'];
|
|
15
|
+
stickyHeader?: ReactNode;
|
|
16
|
+
stickyHeaderProps?: HStackProps;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* **📱 A screen container with safe area handling**
|
|
20
|
+
*
|
|
21
|
+
* @description
|
|
22
|
+
* A scrollable screen component that handles safe area insets and provides
|
|
23
|
+
* consistent padding and background styling. Uses Unistyles' built-in
|
|
24
|
+
* safe area insets via the `rt` runtime object.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* import { Screen } from '@yahoo/uds-mobile';
|
|
29
|
+
*
|
|
30
|
+
* <Screen backgroundColor="primary" spacingHorizontal="6">
|
|
31
|
+
* <Text>Screen content</Text>
|
|
32
|
+
* </Screen>
|
|
33
|
+
*
|
|
34
|
+
* // With sticky header
|
|
35
|
+
* <Screen
|
|
36
|
+
* stickyHeader={<Text>Header</Text>}
|
|
37
|
+
* stickyHeaderProps={{ backgroundColor: 'secondary' }}
|
|
38
|
+
* >
|
|
39
|
+
* <Text>Content</Text>
|
|
40
|
+
* </Screen>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @usage
|
|
44
|
+
* - Use as the root component for screens
|
|
45
|
+
* - Use stickyHeader for persistent header content
|
|
46
|
+
* - Content is automatically scrollable
|
|
47
|
+
*
|
|
48
|
+
* @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info
|
|
49
|
+
*/
|
|
50
|
+
declare const Screen: react1.NamedExoticComponent<ScreenProps>;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Screen, type ScreenProps };
|
|
53
|
+
//# sourceMappingURL=Screen.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Screen.d.cts","names":[],"sources":["../../src/components/Screen.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAYU,WAAA,SAAoB;QACtB,IAAI;EADF,eAAY,CAAA,EAGF,UAHE,CAAA,iBAAA,CAAA;EACV,iBAAA,CAAA,EAIU,UAJV,CAAA,mBAAA,CAAA;EAAJ,UAAA,CAAA,EAKO,UALP,CAAA,YAAA,CAAA;EAEY,GAAA,CAAA,EAIZ,UAJY,CAAA,WAAA,CAAA;EAEE,YAAA,CAAA,EAIL,SAJK;EACP,iBAAA,CAAA,EAIO,WAJP;;;;;;AAN8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6CvC,QAAM,MAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
import { HStackProps } from "./HStack.mjs";
|
|
3
|
+
import * as react14 from "react";
|
|
4
|
+
import { ReactNode, Ref } from "react";
|
|
5
|
+
import { ScrollView, ScrollViewProps } from "react-native";
|
|
6
|
+
import { StyleProps } from "../../generated/styles";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Screen.d.ts
|
|
9
|
+
interface ScreenProps extends ScrollViewProps {
|
|
10
|
+
ref?: Ref<ScrollView>;
|
|
11
|
+
backgroundColor?: StyleProps['backgroundColor'];
|
|
12
|
+
spacingHorizontal?: StyleProps['spacingHorizontal'];
|
|
13
|
+
spacingTop?: StyleProps['spacingTop'];
|
|
14
|
+
gap?: StyleProps['columnGap'];
|
|
15
|
+
stickyHeader?: ReactNode;
|
|
16
|
+
stickyHeaderProps?: HStackProps;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* **📱 A screen container with safe area handling**
|
|
20
|
+
*
|
|
21
|
+
* @description
|
|
22
|
+
* A scrollable screen component that handles safe area insets and provides
|
|
23
|
+
* consistent padding and background styling. Uses Unistyles' built-in
|
|
24
|
+
* safe area insets via the `rt` runtime object.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* import { Screen } from '@yahoo/uds-mobile';
|
|
29
|
+
*
|
|
30
|
+
* <Screen backgroundColor="primary" spacingHorizontal="6">
|
|
31
|
+
* <Text>Screen content</Text>
|
|
32
|
+
* </Screen>
|
|
33
|
+
*
|
|
34
|
+
* // With sticky header
|
|
35
|
+
* <Screen
|
|
36
|
+
* stickyHeader={<Text>Header</Text>}
|
|
37
|
+
* stickyHeaderProps={{ backgroundColor: 'secondary' }}
|
|
38
|
+
* >
|
|
39
|
+
* <Text>Content</Text>
|
|
40
|
+
* </Screen>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @usage
|
|
44
|
+
* - Use as the root component for screens
|
|
45
|
+
* - Use stickyHeader for persistent header content
|
|
46
|
+
* - Content is automatically scrollable
|
|
47
|
+
*
|
|
48
|
+
* @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info
|
|
49
|
+
*/
|
|
50
|
+
declare const Screen: react14.NamedExoticComponent<ScreenProps>;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Screen, type ScreenProps };
|
|
53
|
+
//# sourceMappingURL=Screen.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Screen.d.mts","names":[],"sources":["../../src/components/Screen.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAYU,WAAA,SAAoB;QACtB,IAAI;EADF,eAAY,CAAA,EAGF,UAHE,CAAA,iBAAA,CAAA;EACV,iBAAA,CAAA,EAIU,UAJV,CAAA,mBAAA,CAAA;EAAJ,UAAA,CAAA,EAKO,UALP,CAAA,YAAA,CAAA;EAEY,GAAA,CAAA,EAIZ,UAJY,CAAA,WAAA,CAAA;EAEE,YAAA,CAAA,EAIL,SAJK;EACP,iBAAA,CAAA,EAIO,WAJP;;;;;;AAN8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA6CvC,QAAM,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { HStack } from "./HStack.mjs";
|
|
3
|
+
import { VStack } from "./VStack.mjs";
|
|
4
|
+
import { memo, useMemo } from "react";
|
|
5
|
+
import { ScrollView } from "react-native";
|
|
6
|
+
import { styles } from "../../generated/styles";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { StyleSheet } from "react-native-unistyles";
|
|
9
|
+
|
|
10
|
+
//#region src/components/Screen.tsx
|
|
11
|
+
/**
|
|
12
|
+
* **📱 A screen container with safe area handling**
|
|
13
|
+
*
|
|
14
|
+
* @description
|
|
15
|
+
* A scrollable screen component that handles safe area insets and provides
|
|
16
|
+
* consistent padding and background styling. Uses Unistyles' built-in
|
|
17
|
+
* safe area insets via the `rt` runtime object.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { Screen } from '@yahoo/uds-mobile';
|
|
22
|
+
*
|
|
23
|
+
* <Screen backgroundColor="primary" spacingHorizontal="6">
|
|
24
|
+
* <Text>Screen content</Text>
|
|
25
|
+
* </Screen>
|
|
26
|
+
*
|
|
27
|
+
* // With sticky header
|
|
28
|
+
* <Screen
|
|
29
|
+
* stickyHeader={<Text>Header</Text>}
|
|
30
|
+
* stickyHeaderProps={{ backgroundColor: 'secondary' }}
|
|
31
|
+
* >
|
|
32
|
+
* <Text>Content</Text>
|
|
33
|
+
* </Screen>
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @usage
|
|
37
|
+
* - Use as the root component for screens
|
|
38
|
+
* - Use stickyHeader for persistent header content
|
|
39
|
+
* - Content is automatically scrollable
|
|
40
|
+
*
|
|
41
|
+
* @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info
|
|
42
|
+
*/
|
|
43
|
+
const Screen = memo(function Screen$1({ children, backgroundColor = "primary", spacingHorizontal = "6", spacingTop = "6", gap, stickyHeader, stickyHeaderProps, style, ref, ...props }) {
|
|
44
|
+
const { style: stickyHeaderStyle, ...stickyHeaderPropsWithoutStyle } = stickyHeaderProps ?? {};
|
|
45
|
+
styles.useVariants({
|
|
46
|
+
backgroundColor,
|
|
47
|
+
flex: "1",
|
|
48
|
+
flexDirection: "column",
|
|
49
|
+
columnGap: gap
|
|
50
|
+
});
|
|
51
|
+
const scrollStyles = useMemo(() => [styles.foundation, style], [styles.foundation, style]);
|
|
52
|
+
return /* @__PURE__ */ jsx(VStack, {
|
|
53
|
+
backgroundColor: "primary",
|
|
54
|
+
style: screenStyles.wrapper,
|
|
55
|
+
children: /* @__PURE__ */ jsxs(ScrollView, {
|
|
56
|
+
ref,
|
|
57
|
+
style: scrollStyles,
|
|
58
|
+
stickyHeaderIndices: stickyHeader ? [0] : void 0,
|
|
59
|
+
...props,
|
|
60
|
+
children: [stickyHeader && /* @__PURE__ */ jsx(HStack, {
|
|
61
|
+
spacingHorizontal: "6",
|
|
62
|
+
spacingBottom: "4",
|
|
63
|
+
backgroundColor: "primary",
|
|
64
|
+
justifyContent: "flex-end",
|
|
65
|
+
style: stickyHeaderStyle,
|
|
66
|
+
...stickyHeaderPropsWithoutStyle,
|
|
67
|
+
children: stickyHeader
|
|
68
|
+
}), /* @__PURE__ */ jsx(VStack, {
|
|
69
|
+
flex: "1",
|
|
70
|
+
spacingHorizontal,
|
|
71
|
+
spacingTop,
|
|
72
|
+
gap,
|
|
73
|
+
children
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
Screen.displayName = "Screen";
|
|
79
|
+
const screenStyles = StyleSheet.create((_theme, rt) => ({ wrapper: {
|
|
80
|
+
flex: 1,
|
|
81
|
+
paddingTop: rt.insets.top,
|
|
82
|
+
paddingBottom: rt.insets.bottom,
|
|
83
|
+
paddingLeft: rt.insets.left,
|
|
84
|
+
paddingRight: rt.insets.right
|
|
85
|
+
} }));
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { Screen };
|
|
89
|
+
//# sourceMappingURL=Screen.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Screen.mjs","names":["Screen"],"sources":["../../src/components/Screen.tsx"],"sourcesContent":["import type { ReactNode, Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { ScrollViewProps, ViewProps } from 'react-native';\nimport { ScrollView } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\nimport type { HStackProps } from './HStack';\nimport { HStack } from './HStack';\nimport { VStack } from './VStack';\n\ninterface ScreenProps extends ScrollViewProps {\n ref?: Ref<ScrollView>;\n // Background\n backgroundColor?: StyleProps['backgroundColor'];\n // Spacing\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingTop?: StyleProps['spacingTop'];\n gap?: StyleProps['columnGap'];\n // Header\n stickyHeader?: ReactNode;\n stickyHeaderProps?: HStackProps;\n}\n\n/**\n * **📱 A screen container with safe area handling**\n *\n * @description\n * A scrollable screen component that handles safe area insets and provides\n * consistent padding and background styling. Uses Unistyles' built-in\n * safe area insets via the `rt` runtime object.\n *\n * @example\n * ```tsx\n * import { Screen } from '@yahoo/uds-mobile';\n *\n * <Screen backgroundColor=\"primary\" spacingHorizontal=\"6\">\n * <Text>Screen content</Text>\n * </Screen>\n *\n * // With sticky header\n * <Screen\n * stickyHeader={<Text>Header</Text>}\n * stickyHeaderProps={{ backgroundColor: 'secondary' }}\n * >\n * <Text>Content</Text>\n * </Screen>\n * ```\n *\n * @usage\n * - Use as the root component for screens\n * - Use stickyHeader for persistent header content\n * - Content is automatically scrollable\n *\n * @see The {@link https://uds.build/docs/components/screen Screen Docs} for more info\n */\nconst Screen = memo(function Screen({\n children,\n // Background\n backgroundColor = 'primary',\n // Spacing\n spacingHorizontal = '6',\n spacingTop = '6',\n gap,\n // Header\n stickyHeader,\n stickyHeaderProps,\n style,\n ref,\n ...props\n}: ScreenProps) {\n const { style: stickyHeaderStyle, ...stickyHeaderPropsWithoutStyle } = stickyHeaderProps ?? {};\n\n styles.useVariants({\n backgroundColor,\n flex: '1',\n flexDirection: 'column',\n columnGap: gap,\n });\n\n // styles.foundation must be in deps - it returns a new reference when variants change\n const scrollStyles = useMemo(\n () => [styles.foundation as ViewProps['style'], style],\n [styles.foundation, style],\n );\n\n return (\n <VStack backgroundColor=\"primary\" style={screenStyles.wrapper}>\n <ScrollView\n ref={ref}\n style={scrollStyles}\n stickyHeaderIndices={stickyHeader ? [0] : undefined}\n {...props}\n >\n {stickyHeader && (\n <HStack\n spacingHorizontal=\"6\"\n spacingBottom=\"4\"\n backgroundColor=\"primary\"\n justifyContent=\"flex-end\"\n style={stickyHeaderStyle}\n {...stickyHeaderPropsWithoutStyle}\n >\n {stickyHeader}\n </HStack>\n )}\n <VStack flex=\"1\" spacingHorizontal={spacingHorizontal} spacingTop={spacingTop} gap={gap}>\n {children}\n </VStack>\n </ScrollView>\n </VStack>\n );\n});\n\nScreen.displayName = 'Screen';\n\nconst screenStyles = StyleSheet.create((_theme, rt) => ({\n wrapper: {\n flex: 1, // apply insets to the container,\n // so it will add required paddings\n paddingTop: rt.insets.top,\n paddingBottom: rt.insets.bottom,\n paddingLeft: rt.insets.left,\n paddingRight: rt.insets.right,\n },\n}));\n\nexport { Screen, type ScreenProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,MAAM,SAAS,KAAK,SAASA,SAAO,EAClC,UAEA,kBAAkB,WAElB,oBAAoB,KACpB,aAAa,KACb,KAEA,cACA,mBACA,OACA,KACA,GAAG,SACW;CACd,MAAM,EAAE,OAAO,mBAAmB,GAAG,kCAAkC,qBAAqB,EAAE;AAE9F,QAAO,YAAY;EACjB;EACA,MAAM;EACN,eAAe;EACf,WAAW;EACZ,CAAC;CAGF,MAAM,eAAe,cACb,CAAC,OAAO,YAAkC,MAAM,EACtD,CAAC,OAAO,YAAY,MAAM,CAC3B;AAED,QACE,oBAAC;EAAO,iBAAgB;EAAU,OAAO,aAAa;YACpD,qBAAC;GACM;GACL,OAAO;GACP,qBAAqB,eAAe,CAAC,EAAE,GAAG;GAC1C,GAAI;cAEH,gBACC,oBAAC;IACC,mBAAkB;IAClB,eAAc;IACd,iBAAgB;IAChB,gBAAe;IACf,OAAO;IACP,GAAI;cAEH;KACM,EAEX,oBAAC;IAAO,MAAK;IAAuB;IAA+B;IAAiB;IACjF;KACM;IACE;GACN;EAEX;AAEF,OAAO,cAAc;AAErB,MAAM,eAAe,WAAW,QAAQ,QAAQ,QAAQ,EACtD,SAAS;CACP,MAAM;CAEN,YAAY,GAAG,OAAO;CACtB,eAAe,GAAG,OAAO;CACzB,aAAa,GAAG,OAAO;CACvB,cAAc,GAAG,OAAO;CACzB,EACF,EAAE"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
3
|
+
const require_components_IconSlot = require('./IconSlot.cjs');
|
|
4
|
+
const require_components_Text = require('./Text.cjs');
|
|
5
|
+
const require_components_HStack = require('./HStack.cjs');
|
|
6
|
+
let react = require("react");
|
|
7
|
+
let react_native = require("react-native");
|
|
8
|
+
let generated_styles = require("../../generated/styles");
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
|
+
let react_native_unistyles = require("react-native-unistyles");
|
|
11
|
+
let react_native_reanimated = require("react-native-reanimated");
|
|
12
|
+
react_native_reanimated = require_rolldown_runtime.__toESM(react_native_reanimated);
|
|
13
|
+
let react_native_unistyles_reanimated = require("react-native-unistyles/reanimated");
|
|
14
|
+
|
|
15
|
+
//#region src/components/Switch.tsx
|
|
16
|
+
const HANDLE_TRAVEL = {
|
|
17
|
+
md: 20,
|
|
18
|
+
sm: 12
|
|
19
|
+
};
|
|
20
|
+
const ANIMATION_DURATION = 120;
|
|
21
|
+
/**
|
|
22
|
+
* **Switch component for toggling options**
|
|
23
|
+
*
|
|
24
|
+
* @description
|
|
25
|
+
* A switch (also called a toggle) is a binary on/off input control.
|
|
26
|
+
* It allows users to pick between two clearly opposite choices.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import { Switch } from '@yahoo/uds-mobile';
|
|
31
|
+
*
|
|
32
|
+
* <Switch label="Notifications" />
|
|
33
|
+
* <Switch isOn={enabled} onChange={setEnabled} label="Dark mode" />
|
|
34
|
+
* <Switch onIcon="Check" offIcon="Cross" label="Sync" />
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @see The {@link https://uds.build/docs/components/switch Switch Docs} for more info
|
|
38
|
+
*/
|
|
39
|
+
const Switch = (0, react.memo)(function Switch$1({ isOn: isOnProp, defaultIsOn = false, onChange, label, labelPosition = "start", size = "md", onIcon, offIcon, disabled = false, required, accessibilityHint, reduceMotion = false, ref }) {
|
|
40
|
+
const isControlled = isOnProp !== void 0;
|
|
41
|
+
const [internalIsOn, setInternalIsOn] = (0, react.useState)(defaultIsOn);
|
|
42
|
+
const [prefersReducedMotion, setPrefersReducedMotion] = (0, react.useState)(false);
|
|
43
|
+
const isOn = isControlled ? isOnProp : internalIsOn;
|
|
44
|
+
(0, react.useEffect)(() => {
|
|
45
|
+
const checkReducedMotion = async () => {
|
|
46
|
+
setPrefersReducedMotion(await react_native.AccessibilityInfo.isReduceMotionEnabled());
|
|
47
|
+
};
|
|
48
|
+
checkReducedMotion();
|
|
49
|
+
const subscription = react_native.AccessibilityInfo.addEventListener("reduceMotionChanged", setPrefersReducedMotion);
|
|
50
|
+
return () => subscription.remove();
|
|
51
|
+
}, []);
|
|
52
|
+
const animationDuration = reduceMotion || prefersReducedMotion ? 0 : ANIMATION_DURATION;
|
|
53
|
+
const progress = (0, react_native_reanimated.useDerivedValue)(() => (0, react_native_reanimated.withTiming)(isOn ? 1 : 0, { duration: animationDuration }), [isOn, animationDuration]);
|
|
54
|
+
const travelDistance = HANDLE_TRAVEL[size];
|
|
55
|
+
const handlePress = (0, react.useCallback)(() => {
|
|
56
|
+
if (disabled) return;
|
|
57
|
+
const newValue = !isOn;
|
|
58
|
+
if (!isControlled) setInternalIsOn(newValue);
|
|
59
|
+
onChange?.(newValue);
|
|
60
|
+
}, [
|
|
61
|
+
disabled,
|
|
62
|
+
isOn,
|
|
63
|
+
isControlled,
|
|
64
|
+
onChange
|
|
65
|
+
]);
|
|
66
|
+
generated_styles.switchStyles.useVariants({
|
|
67
|
+
size,
|
|
68
|
+
variant: isOn ? "on" : "off"
|
|
69
|
+
});
|
|
70
|
+
const trackBackgroundColor = (0, react_native_unistyles_reanimated.useAnimatedVariantColor)(generated_styles.switchStyles.switch, "backgroundColor");
|
|
71
|
+
const animatedTrackStyle = (0, react_native_reanimated.useAnimatedStyle)(() => {
|
|
72
|
+
"worklet";
|
|
73
|
+
return { backgroundColor: (0, react_native_reanimated.withTiming)(trackBackgroundColor.value, { duration: animationDuration }) };
|
|
74
|
+
});
|
|
75
|
+
const animatedHandleStyle = (0, react_native_reanimated.useAnimatedStyle)(() => {
|
|
76
|
+
"worklet";
|
|
77
|
+
return { transform: [{ translateX: progress.value * travelDistance }] };
|
|
78
|
+
});
|
|
79
|
+
const rootStyle = (0, react.useMemo)(() => [generated_styles.switchStyles.root, switchStaticStyles.root({ disabled })], [generated_styles.switchStyles.root, disabled]);
|
|
80
|
+
const trackStyle = (0, react.useMemo)(() => [
|
|
81
|
+
generated_styles.switchStyles.switch,
|
|
82
|
+
switchStaticStyles.track,
|
|
83
|
+
animatedTrackStyle
|
|
84
|
+
], [generated_styles.switchStyles.switch, animatedTrackStyle]);
|
|
85
|
+
const handleStyle = (0, react.useMemo)(() => [
|
|
86
|
+
generated_styles.switchStyles.handle,
|
|
87
|
+
switchStaticStyles.handle,
|
|
88
|
+
animatedHandleStyle
|
|
89
|
+
], [generated_styles.switchStyles.handle, animatedHandleStyle]);
|
|
90
|
+
const accessibilityLabel = typeof label === "string" ? label : void 0;
|
|
91
|
+
const resolvedAccessibilityHint = accessibilityHint ?? "Double tap to toggle";
|
|
92
|
+
const resolvedLabel = typeof label === "function" ? label() : label;
|
|
93
|
+
const labelContent = resolvedLabel && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_components_HStack.HStack, {
|
|
94
|
+
gap: "2",
|
|
95
|
+
alignItems: "center",
|
|
96
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
|
|
97
|
+
style: generated_styles.switchStyles.text,
|
|
98
|
+
children: resolvedLabel
|
|
99
|
+
}), required && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Text.Text, {
|
|
100
|
+
color: "alert",
|
|
101
|
+
children: "*"
|
|
102
|
+
})]
|
|
103
|
+
});
|
|
104
|
+
const a11yValue = (0, react.useMemo)(() => ({ text: isOn ? "On" : "Off" }), [isOn]);
|
|
105
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native.Pressable, {
|
|
106
|
+
ref,
|
|
107
|
+
onPress: handlePress,
|
|
108
|
+
disabled,
|
|
109
|
+
accessible: true,
|
|
110
|
+
accessibilityRole: "switch",
|
|
111
|
+
accessibilityState: {
|
|
112
|
+
checked: isOn,
|
|
113
|
+
disabled
|
|
114
|
+
},
|
|
115
|
+
accessibilityLabel,
|
|
116
|
+
accessibilityHint: resolvedAccessibilityHint,
|
|
117
|
+
accessibilityValue: a11yValue,
|
|
118
|
+
style: rootStyle,
|
|
119
|
+
children: [
|
|
120
|
+
labelPosition === "end" && labelContent,
|
|
121
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
|
|
122
|
+
style: trackStyle,
|
|
123
|
+
importantForAccessibility: "no-hide-descendants",
|
|
124
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_native_reanimated.default.View, {
|
|
125
|
+
style: handleStyle,
|
|
126
|
+
children: [onIcon && isOn && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
|
|
127
|
+
style: switchStaticStyles.iconContainer,
|
|
128
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
|
|
129
|
+
icon: onIcon,
|
|
130
|
+
variant: "fill",
|
|
131
|
+
style: generated_styles.switchStyles.handleIcon
|
|
132
|
+
})
|
|
133
|
+
}), offIcon && !isOn && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native_reanimated.default.View, {
|
|
134
|
+
style: switchStaticStyles.iconContainer,
|
|
135
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_IconSlot.IconSlot, {
|
|
136
|
+
icon: offIcon,
|
|
137
|
+
variant: "fill",
|
|
138
|
+
style: generated_styles.switchStyles.handleIcon
|
|
139
|
+
})
|
|
140
|
+
})]
|
|
141
|
+
})
|
|
142
|
+
}),
|
|
143
|
+
labelPosition === "start" && labelContent
|
|
144
|
+
]
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
Switch.displayName = "Switch";
|
|
148
|
+
const switchStaticStyles = react_native_unistyles.StyleSheet.create((theme) => ({
|
|
149
|
+
handle: {
|
|
150
|
+
borderRadius: theme.borderRadius.full,
|
|
151
|
+
alignItems: "center",
|
|
152
|
+
justifyContent: "center"
|
|
153
|
+
},
|
|
154
|
+
iconContainer: {
|
|
155
|
+
position: "absolute",
|
|
156
|
+
alignItems: "center",
|
|
157
|
+
justifyContent: "center"
|
|
158
|
+
},
|
|
159
|
+
track: {
|
|
160
|
+
justifyContent: "center",
|
|
161
|
+
borderRadius: theme.borderRadius.full
|
|
162
|
+
},
|
|
163
|
+
root: ({ disabled }) => ({
|
|
164
|
+
flexDirection: "row",
|
|
165
|
+
alignItems: "center",
|
|
166
|
+
alignSelf: "flex-start",
|
|
167
|
+
opacity: disabled ? .5 : 1
|
|
168
|
+
})
|
|
169
|
+
}));
|
|
170
|
+
|
|
171
|
+
//#endregion
|
|
172
|
+
exports.Switch = Switch;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalSwitchProps } from "../uds/dist/tokens/types.cjs";
|
|
3
|
+
import { IconSlotType } from "./IconSlot.cjs";
|
|
4
|
+
import * as react18 from "react";
|
|
5
|
+
import { Ref } from "react";
|
|
6
|
+
import { AccessibilityProps, View } from "react-native";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Switch.d.ts
|
|
9
|
+
interface SwitchProps extends UniversalSwitchProps<IconSlotType> {
|
|
10
|
+
/** Ref to the underlying View */
|
|
11
|
+
ref?: Ref<View>;
|
|
12
|
+
/** Callback when the switch value changes */
|
|
13
|
+
onChange?: (value: boolean) => void;
|
|
14
|
+
/** Whether the switch is disabled */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Whether the switch is required (shows asterisk with label) */
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/** Accessibility hint describing what happens when activated */
|
|
19
|
+
accessibilityHint?: AccessibilityProps['accessibilityHint'];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* **Switch component for toggling options**
|
|
23
|
+
*
|
|
24
|
+
* @description
|
|
25
|
+
* A switch (also called a toggle) is a binary on/off input control.
|
|
26
|
+
* It allows users to pick between two clearly opposite choices.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import { Switch } from '@yahoo/uds-mobile';
|
|
31
|
+
*
|
|
32
|
+
* <Switch label="Notifications" />
|
|
33
|
+
* <Switch isOn={enabled} onChange={setEnabled} label="Dark mode" />
|
|
34
|
+
* <Switch onIcon="Check" offIcon="Cross" label="Sync" />
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @see The {@link https://uds.build/docs/components/switch Switch Docs} for more info
|
|
38
|
+
*/
|
|
39
|
+
declare const Switch: react18.NamedExoticComponent<SwitchProps>;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Switch, type SwitchProps };
|
|
42
|
+
//# sourceMappingURL=Switch.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.cts","names":[],"sources":["../../src/components/Switch.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAeU,WAAA,SAAoB,qBAAqB;;QAE3C,IAAI;EAFF;EAAyC,QAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAAA,IAAA;EAEvC;EAAJ,QAAA,CAAA,EAAA,OAAA;EAQc;EAVQ,QAAA,CAAA,EAAA,OAAA;EAAoB;EAsC5C,iBA8IJ,CAAA,EA1KoB,kBA4BV,CAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;cAAN,QAAM,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
import { UniversalSwitchProps } from "../uds/dist/tokens/types.mjs";
|
|
3
|
+
import { IconSlotType } from "./IconSlot.mjs";
|
|
4
|
+
import * as react16 from "react";
|
|
5
|
+
import { Ref } from "react";
|
|
6
|
+
import { AccessibilityProps, View } from "react-native";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Switch.d.ts
|
|
9
|
+
interface SwitchProps extends UniversalSwitchProps<IconSlotType> {
|
|
10
|
+
/** Ref to the underlying View */
|
|
11
|
+
ref?: Ref<View>;
|
|
12
|
+
/** Callback when the switch value changes */
|
|
13
|
+
onChange?: (value: boolean) => void;
|
|
14
|
+
/** Whether the switch is disabled */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Whether the switch is required (shows asterisk with label) */
|
|
17
|
+
required?: boolean;
|
|
18
|
+
/** Accessibility hint describing what happens when activated */
|
|
19
|
+
accessibilityHint?: AccessibilityProps['accessibilityHint'];
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* **Switch component for toggling options**
|
|
23
|
+
*
|
|
24
|
+
* @description
|
|
25
|
+
* A switch (also called a toggle) is a binary on/off input control.
|
|
26
|
+
* It allows users to pick between two clearly opposite choices.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import { Switch } from '@yahoo/uds-mobile';
|
|
31
|
+
*
|
|
32
|
+
* <Switch label="Notifications" />
|
|
33
|
+
* <Switch isOn={enabled} onChange={setEnabled} label="Dark mode" />
|
|
34
|
+
* <Switch onIcon="Check" offIcon="Cross" label="Sync" />
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @see The {@link https://uds.build/docs/components/switch Switch Docs} for more info
|
|
38
|
+
*/
|
|
39
|
+
declare const Switch: react16.NamedExoticComponent<SwitchProps>;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Switch, type SwitchProps };
|
|
42
|
+
//# sourceMappingURL=Switch.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.mts","names":[],"sources":["../../src/components/Switch.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAeU,WAAA,SAAoB,qBAAqB;;QAE3C,IAAI;EAFF;EAAyC,QAAA,CAAA,EAAA,CAAA,KAAA,EAAA,OAAA,EAAA,GAAA,IAAA;EAEvC;EAAJ,QAAA,CAAA,EAAA,OAAA;EAQc;EAVQ,QAAA,CAAA,EAAA,OAAA;EAAoB;EAsC5C,iBA8IJ,CAAA,EA1KoB,kBA4BV,CAAA,mBAAA,CAAA;;;;;;;;;;;;;;;;;;;;cAAN,QAAM,OAAA,CAAA,qBAAA"}
|