@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 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.d.cts","names":[],"sources":["../../src/components/Icon.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAkCK,QAAA,GAAW,YAAY;UAElB,SAAA,SAAkB,KAAK;QACzB,IAAI;;EAHP,IAAA,EAKG,QALK;EAEH;EAAuB,IAAA,CAAA,EAKxB,QALwB;EACrB;EAAJ,KAAA,CAAA,EAME,UANF,CAAA,OAAA,CAAA;EAEA;EAEC,OAAA,CAAA,EAIG,WAJH;EAEC,eAAA,CAAA,EAIU,UAJV,CAAA,iBAAA,CAAA;EAEE,YAAA,CAAA,EAIK,UAJL,CAAA,cAAA,CAAA;EAEQ,oBAAA,CAAA,EAGK,UAHL,CAAA,sBAAA,CAAA;EAEH,kBAAA,CAAA,EAEM,UAFN,CAAA,oBAAA,CAAA;EACQ,uBAAA,CAAA,EAEG,UAFH,CAAA,yBAAA,CAAA;EACF,qBAAA,CAAA,EAEG,UAFH,CAAA,uBAAA,CAAA;EACK,WAAA,CAAA,EAEZ,UAFY,CAAA,aAAA,CAAA;EACF,gBAAA,CAAA,EAEL,UAFK,CAAA,kBAAA,CAAA;EACV,cAAA,CAAA,EAEG,UAFH,CAAA,gBAAA,CAAA;EACK,cAAA,CAAA,EAEF,UAFE,CAAA,gBAAA,CAAA;EACF,iBAAA,CAAA,EAEG,UAFH,CAAA,mBAAA,CAAA;EACA,WAAA,CAAA,EAEH,UAFG,CAAA,aAAA,CAAA;EACG,mBAAA,CAAA,EAEE,UAFF,CAAA,qBAAA,CAAA;EACN,qBAAA,CAAA,EAEU,UAFV,CAAA,uBAAA,CAAA;EACQ,gBAAA,CAAA,EAEH,UAFG,CAAA,kBAAA,CAAA;EACE,cAAA,CAAA,EAEP,UAFO,CAAA,gBAAA,CAAA;EACL,cAAA,CAAA,EAEF,UAFE,CAAA,gBAAA,CAAA;EACF,iBAAA,CAAA,EAEG,UAFH,CAAA,mBAAA,CAAA;EACA,UAAA,CAAA,EAGJ,UAHI,CAAA,YAAA,CAAA;EACG,YAAA,CAAA,EAIL,UAJK,CAAA,cAAA,CAAA;EAEP,UAAA,CAAA,EAGA,UAHA,CAAA,YAAA,CAAA;EAEE,UAAA,CAAA,EAEF,UAFE,CAAA,YAAA,CAAA;EACF,aAAA,CAAA,EAEG,UAFH,CAAA,eAAA,CAAA;EACA,iBAAA,CAAA,EAEO,UAFP,CAAA,mBAAA,CAAA;EACG,eAAA,CAAA,EAEE,UAFF,CAAA,iBAAA,CAAA;EACI,OAAA,CAAA,EAEV,UAFU,CAAA,SAAA,CAAA;EACF,WAAA,CAAA,EAGJ,UAHI,CAAA,aAAA,CAAA;EACR,SAAA,CAAA,EAGE,UAHF,CAAA,WAAA,CAAA;EAEI,SAAA,CAAA,EAEF,UAFE,CAAA,WAAA,CAAA;EACF,YAAA,CAAA,EAEG,UAFH,CAAA,cAAA,CAAA;EACA,gBAAA,CAAA,EAEO,UAFP,CAAA,kBAAA,CAAA;EACG,cAAA,CAAA,EAEE,UAFF,CAAA,gBAAA,CAAA;EACI,MAAA,CAAA,EAEV,UAFU,CAAA,QAAA,CAAA;EACF;EACR,mBAAA,CAAA,EAAA,MAAA;EAMS;EAAV,kBAAA,CAAA,EAAA,MAAA;EArDkB;EAAI,KAAA,CAAA,EAqDtB,SArDsB,CAqDZ,SArDY,CAAA;AAAA;AAuQhC;AACA;;;;;;;;;;;;;;;;;;;;;cAdM,MAAI,OAAA,CAAA,qBAAA;cAaG;cACA"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconSize, IconVariant } from "../icons/dist/types.mjs";
|
|
3
|
+
import "../uds/dist/index.mjs";
|
|
4
|
+
import { GlyphName } from "../icons/dist/glyphMap.mjs";
|
|
5
|
+
import { SvgGlyphName } from "../icons/dist/svgMap.mjs";
|
|
6
|
+
import * as react18 from "react";
|
|
7
|
+
import { Ref } from "react";
|
|
8
|
+
import { StyleProp, Text, TextProps, TextStyle } from "react-native";
|
|
9
|
+
import { StyleProps } from "../../generated/styles";
|
|
10
|
+
|
|
11
|
+
//#region src/components/Icon.d.ts
|
|
12
|
+
type IconName = GlyphName | SvgGlyphName;
|
|
13
|
+
interface IconProps extends Omit<TextProps, 'style'> {
|
|
14
|
+
ref?: Ref<Text>;
|
|
15
|
+
/** The icon name */
|
|
16
|
+
name: IconName;
|
|
17
|
+
/** Icon size */
|
|
18
|
+
size?: IconSize;
|
|
19
|
+
/** Icon color */
|
|
20
|
+
color?: StyleProps['color'];
|
|
21
|
+
/** Icon variant (outline, fill, multicolor) */
|
|
22
|
+
variant?: IconVariant;
|
|
23
|
+
backgroundColor?: StyleProps['backgroundColor'];
|
|
24
|
+
borderRadius?: StyleProps['borderRadius'];
|
|
25
|
+
borderTopStartRadius?: StyleProps['borderTopStartRadius'];
|
|
26
|
+
borderTopEndRadius?: StyleProps['borderTopEndRadius'];
|
|
27
|
+
borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];
|
|
28
|
+
borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];
|
|
29
|
+
borderColor?: StyleProps['borderColor'];
|
|
30
|
+
borderStartColor?: StyleProps['borderStartColor'];
|
|
31
|
+
borderEndColor?: StyleProps['borderEndColor'];
|
|
32
|
+
borderTopColor?: StyleProps['borderTopColor'];
|
|
33
|
+
borderBottomColor?: StyleProps['borderBottomColor'];
|
|
34
|
+
borderWidth?: StyleProps['borderWidth'];
|
|
35
|
+
borderVerticalWidth?: StyleProps['borderVerticalWidth'];
|
|
36
|
+
borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];
|
|
37
|
+
borderStartWidth?: StyleProps['borderStartWidth'];
|
|
38
|
+
borderEndWidth?: StyleProps['borderEndWidth'];
|
|
39
|
+
borderTopWidth?: StyleProps['borderTopWidth'];
|
|
40
|
+
borderBottomWidth?: StyleProps['borderBottomWidth'];
|
|
41
|
+
flexShrink?: StyleProps['flexShrink'];
|
|
42
|
+
spacingStart?: StyleProps['spacingStart'];
|
|
43
|
+
spacingEnd?: StyleProps['spacingEnd'];
|
|
44
|
+
spacingTop?: StyleProps['spacingTop'];
|
|
45
|
+
spacingBottom?: StyleProps['spacingBottom'];
|
|
46
|
+
spacingHorizontal?: StyleProps['spacingHorizontal'];
|
|
47
|
+
spacingVertical?: StyleProps['spacingVertical'];
|
|
48
|
+
spacing?: StyleProps['spacing'];
|
|
49
|
+
offsetStart?: StyleProps['offsetStart'];
|
|
50
|
+
offsetEnd?: StyleProps['offsetEnd'];
|
|
51
|
+
offsetTop?: StyleProps['offsetTop'];
|
|
52
|
+
offsetBottom?: StyleProps['offsetBottom'];
|
|
53
|
+
offsetHorizontal?: StyleProps['offsetHorizontal'];
|
|
54
|
+
offsetVertical?: StyleProps['offsetVertical'];
|
|
55
|
+
offset?: StyleProps['offset'];
|
|
56
|
+
/** Icon color override */
|
|
57
|
+
dangerouslySetColor?: string;
|
|
58
|
+
/** Icon font size override */
|
|
59
|
+
dangerouslySetSize?: number;
|
|
60
|
+
/** Optional style override */
|
|
61
|
+
style?: StyleProp<TextStyle>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* **🎨 An icon component using UDS icon fonts**
|
|
65
|
+
*
|
|
66
|
+
* @description
|
|
67
|
+
* Renders icons from the UDS icon library. Supports multiple variants
|
|
68
|
+
* (outline, fill, multicolor) and sizes.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```tsx
|
|
72
|
+
* import { Icon } from '@yahoo/uds-mobile';
|
|
73
|
+
*
|
|
74
|
+
* <Icon name="ChevronRight" size="md" color="primary" />
|
|
75
|
+
* <Icon name="Star" variant="fill" color="accent" />
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @usage
|
|
79
|
+
* - Use name prop to specify the icon
|
|
80
|
+
* - Use variant prop for outline/fill/multicolor
|
|
81
|
+
* - Use size prop for icon size (xs, sm, md, lg, xl)
|
|
82
|
+
*
|
|
83
|
+
* @see The {@link https://uds.build/docs/components/icon Icon Docs} for more info
|
|
84
|
+
*/
|
|
85
|
+
declare const Icon: react18.NamedExoticComponent<IconProps>;
|
|
86
|
+
declare const iconNames: readonly ["A11Y", "Accessible", "AccountRecover", "AccountRefresh", "AccountSwitchAlt", "AccountSwitcher", "AcousticGuitar", "Add", "AddBell", "AddCalendar", "AddCheckCircle", "AddCircle", "AddContactCard", "AddDocument", "AddFace", "AddFolder", "AddPaperPlane", "AddPeople", "AddQuestion", "AddSearch", "AddSquare", "AffiliateLink", "AirQuality", "Airplane", "AirplaneLanding", "AirplaneTakeOff", "AngledSquareOnSquare", "AnyFile", "AppSwitcher", "AquariusAstrology", "Archive", "AriesAstrology", "ArrowDown", "ArrowDownCircle", "ArrowLeft", "ArrowLineDown", "ArrowLineUp", "ArrowRight", "ArrowUp", "Article", "ArtisticGymnastics", "Ascender", "AudioFile", "Authenticator", "AutoDownload", "AutoSaveOffline", "AutoSaveSync", "AutoSaveUpload", "AutoSaveUploadFail", "AutoSaved", "BabyBottle", "BackTimeTen", "Badge", "Balance", "BallInWater", "Barometer", "BaseBallBat", "Baseball", "Basketball", "BasketballHoop", "BeachUmbrella", "Bed", "Bell", "Below", "BigDownArrow", "BigLeftArrow", "BigRightArrow", "BigRightStraightArrow", "BigUpArrow", "Bike", "Bingo", "Binoculars", "BlackJack", "Bold", "Bolt", "Bookmark", "BottomLine", "BowAndArrow", "BoxCircle", "BoxFront", "BoxOnBox", "BoxingGlove", "Browser", "BubbleZone", "Building", "BulletPointContainer", "BulletPoints", "Bullseye", "BusFront", "BusinessBag", "Cake", "Calendar", "CalendarClock", "CalendarConfirm", "CalendarFile", "CalendarICSFile", "CalendarRightArrow", "Camera", "CancerAstrology", "Canoe", "CapriconAstrology", "Car", "CardsCheck", "Cash", "CelebrityStar", "CenterAlignment", "ChatAi", "Check", "CheckBookmark", "CheckBox", "CheckCircle", "CheckDocuments", "CheckEnvelope", "CheckPeople", "CheckSpeechBubble", "CheckVoteBallot", "Checklist", "ChevronDown", "ChevronLeft", "ChevronLeftPeople", "ChevronRight", "ChevronRightPeople", "ChevronUp", "Circle", "ClearText", "Clipboard", "Clock", "Clone", "ClosedCaption", "Cloud", "CloudDay", "CloudNight", "Cocktails", "Coffee", "CoffeeTakeout", "Cog", "Coin", "CollapseColumn", "Command", "Compass", "ComputerChip", "Connection", "ConnectionScreen", "ContactBook", "ContactCard", "Convert", "ConvertAlt", "ConvertLeft", "ConvertRight", "Cookies", "Coupon", "CreditCard", "CreditCardPayment", "CrescentMoon", "Cricket", "Cross", "CrossCircle", "CrossEnvelope", "CrossPeople", "CrossShield", "Crossword", "Cycling", "DOCFile", "DailyFantasy", "DaisyFlower", "Dandelion", "DataBook", "DataCloud", "DataSilo", "DataStorage", "Debug", "DeleteTab", "DeliveryPackage", "Dense", "DenyCircle", "Descender", "Desktop", "DiagonalKey", "DiagonalLeftDown", "DiagonalLeftUp", "DiagonalRightDown", "DiagonalRightUp", "Diamond", "Dice", "Dining", "Direction", "DiscoBall", "Document", "DocumentImageRectangle", "DocumentImageSquare", "DocumentRectangle", "DollarCircleArrows", "DotEnvelope", "DotTwoRings", "DoubleBigLeftArrow", "DoubleChevronLeft", "DoubleChevronRight", "DownCurveArrow", "Download", "DownloadCircle", "DownloadComplete", "DownloadInProgressCircle", "DraftDocument", "DragVertical", "Dusk", "Easel", "Eclipse", "Edit", "EmailVerification", "Emails", "Embed", "EntertainmentTv", "Envelope", "Error", "ExpandArrowLeft", "ExpandArrowRight", "ExpandColumn", "Eye", "EyeSearch", "EyeShut", "FaceID", "FallLeaf", "Family", "FastForward", "FencingEpee", "FilmReel", "FilmRoll", "FingerPointLeftArrow", "FingerPointRightArrow", "FingerPrint", "Fire", "FirstAidKit", "FirstQuarter", "FiveCircles", "Flag", "FlameTorch", "Fog", "FogDay", "Folder", "Font", "Football", "FootballHelmet", "ForestTree", "FourBoxes", "FourCorners", "FourCornersMusicNote", "FourLinesSpread", "FourThreeRatio", "FullMoon", "GIF", "GeminiAstrology", "GiftBox", "GolfTee", "GraduationHat", "Graph", "Gymnastics", "HalfStar", "HalfSun", "HappyFace", "HazeDay", "HazeNight", "Heading2", "Heading3", "Headline1", "HeadlineDocumentSquare", "Headphone", "HeadphonesMic", "Heart", "HeartArrow", "HeartPulse", "HeavyRain", "HeavyRainDay", "HeavyRainLightning", "HeavyRainLightningDay", "HeavyRainLightningNight", "HeavyRainNight", "Help", "Highlighter", "History", "HockeyWithPuck", "Home", "HorseHeadBridle", "HotTub", "Hurricane", "Ice", "Id", "Image", "ImageFile", "ImageGallery", "Inbox", "InboxDownArrow", "InboxUpArrow", "IndentRight", "Infinity", "Info", "InstitutionalWesternBank", "Italics", "JoyfulFace", "JudoUniform", "Keyboard", "KeylineShapes", "Kick", "KnightChessPiece", "Laptop", "LaptopWithPhone", "LayoutBottom", "LayoutDefault", "LayoutFourColumn", "LayoutGrid", "LayoutPerfectGrid", "LayoutRight", "LayoutThreeColumn", "LayoutThreeRows", "LayoutTwoColumn", "LeftAlign", "LeftCurveArrow", "LeftPageArrow", "LeoAstrology", "Letter", "LetterColor", "LetterSize", "LibraAstrology", "LifeRing", "Lightbulb", "Lightning", "LightningDay", "LightningNight", "Link", "LiquidDrop", "Live", "Livestream", "Location", "LocationCircle", "LocationMap", "Lock", "LogIn", "LogOut", "Lollipop", "LoveEnvelope", "LoyaltyCard", "MagicWand", "MagnifyingGlass", "Mahjong", "MakeupBeauty", "Mannequin", "Medal", "MedicineBottle", "MedicinePill", "Megaphone", "Microphone", "Microscope", "Minus", "MinusBox", "MinusCircle", "MinusPeople", "MinusSearch", "MmaGlove", "MmaRing", "MobileNumber", "MobilePhone", "More", "MoreVertical", "NeutralFace", "NewMoon", "Newsletter", "Night", "NineSixteenRatio", "NoBell", "NoConnectionScreen", "NoEye", "NoHeart", "NoImage", "NoPeople", "NoShield", "NoSmoking", "NoSquare", "NoStar", "NoVideoCamera", "NoWifi", "NotificationBell", "Null", "NumberedList", "OnTop", "OneOneRatio", "OpenBook", "OpenEnvelope", "OrderedList", "OutdentLeft", "PDF", "PPT", "PaperPlane", "PaperPlaneDiagonal", "Paperclip", "Paragraph", "ParagraphLeftIdent", "ParagraphRightIdent", "Parking", "ParkingSquare", "PassKey", "Password", "Pause", "Payments", "Payphone", "PayphoneFace", "Pencil", "PencilLines", "People", "Person", "PersonClimbing", "PersonShield", "Pets", "Phone", "PieChart", "Pin", "PingPong", "PiscesAstrology", "PlainText", "Play", "PlayCircle", "Pool", "PowerSwitch", "Preferences", "PreferencesAlt", "Printer", "Priority", "Profile", "Progress", "ProgressWithCheck", "Pulse", "PuzzlePiece", "QrCode", "QuestionBubble", "QuoteCircle", "QuoteSquare", "RAW", "RTF", "RTFOff", "RacingFlag", "Radar", "RadioCircle", "RainDay", "RainNight", "Receipt", "Receipts", "RedoPencil", "Refresh", "Restaurant", "RetailTag", "RightAlign", "RightCurveArrow", "RightPageArrow", "RobotHead", "Running", "SadFace", "SadderFace", "SagittariusAstrology", "SailBoat", "Satellite", "ScaleDown", "ScanQrCode", "Scissors", "ScorpioAstrology", "SearchConfirm", "SearchEnvelope", "SearchWorldWithLines", "SecurityKey", "SendToSelf", "Server", "SettingsAlt", "SettingsCogPeople", "Shapes", "Share", "Shield", "ShieldCheck", "ShieldSlash", "ShockedFace", "ShoppingBag", "ShoppingBasket", "ShoppingCart", "Shuttlecock", "SixteenNineRatio", "Skateboard", "SkipTimeTen", "Skull", "Slideshow", "SmallSquareInsideBigSquare", "SmartWatch", "SmileFace", "SmileFaceLife", "Sms", "SmsVerificationCode", "Sneaker", "SneakerAlt", "Snippet", "Snow", "SnowDay", "SnowNight", "Snowflake", "Soccer", "Solitaire", "SoundLow", "SoundOff", "SoundOn", "Spa", "Sparkle", "SparkleFootballBall", "SparkleTennisBall", "SpecialCharacter", "SpeechBubble", "SpeechBubbleStar", "SportsBook", "SportsSparkle", "SprinkleDay", "SprinkleNight", "Square", "Stadium", "Star", "StarArticle", "StarMedal", "StarTrophy", "StatePrivacyControls", "StockTrends", "Stopwatch", "Store", "Strikethrough", "Sun", "Sunrise", "Sunset", "SurfboardOnSand", "Swimming", "Sync", "Tab", "Tablet", "TaurusAstrology", "TechnicalRoute", "Television", "TennisBall", "TennisRacketBall", "ThirdQuarter", "ThreeCircles", "ThreeFourRatio", "ThreeLines", "ThreeLinesSpread", "ThumbsDown", "ThumbsUp", "Thumbtack", "ThumbtackDiagonal", "TimePaperPlane", "Tornado", "Trading", "TrafficSignRightTurn", "Trampoline", "Transactions", "Trash", "Trending", "TrendingCircle", "Trophy", "TruckRight", "Tshirt", "Tsunami", "Tub", "TwoArrowsDiagonalInwards", "TwoArrowsDiagonalOutwards", "TwoCorners", "TwoHorizontalRectangles", "TwoLinesContainer", "TwoMasks", "TwoRectangles", "TwoSparkles", "TwoSquares", "TwoThirdsColumn", "Underline", "Unlock", "UnorderedList", "UpCurveArrow", "UpDownChevron", "UpDownShortArrows", "UpFolder", "Upload", "Verification", "VideoCamera", "VideoFile", "VirgoAstrology", "Virus", "Volleyball", "Walking", "Wallet", "WaningCrescent", "WaningGibbous", "Warning", "WaxingCrescent", "WaxingGibbous", "Web", "Weights", "Wifi", "Wind", "WindCloud", "WindCloudDay", "WindCloudNight", "Wine", "WorldWithLines", "Wrench", "WrestlingHeadGear", "WritingAi", "XLSFile", "YEP", "ZIP"];
|
|
87
|
+
declare const multicolorIconNames: readonly ["Cloud", "CloudDay", "CloudNight", "Cold", "Dreary", "Dusk", "Eclipse", "FirstQuarter", "Fog", "FogDay", "FogNight", "FullMoon", "HalfSun", "HazeDay", "HazeNight", "HeavyRain", "HeavyRainDay", "HeavyRainLightning", "HeavyRainLightningDay", "HeavyRainLightningNight", "HeavyRainNight", "Hot", "Hurricane", "Ice", "IntermittentCloudsNight", "IntermittentCloudsSunny", "Lightning", "LightningDay", "LightningNight", "MostlyNightFlurries", "Night", "PartlyCloudyNight", "PartlyFlurries", "PartlyNightFlurries", "PartlySunny", "Rain", "RainDay", "RainNight", "Sleet", "Snow", "SnowDay", "Snowflake", "SprinkleDay", "SprinkleNight", "Sun", "Sunrise", "Sunset", "ThirdQuarter", "Tornado", "WaningCrescent", "WaningGibbous", "WaxingCrescent", "WaxingGibbous", "Wind", "WindCloud", "WindCloudDay", "WindCloudNight"];
|
|
88
|
+
//#endregion
|
|
89
|
+
export { Icon, type IconName, type IconProps, iconNames, multicolorIconNames };
|
|
90
|
+
//# sourceMappingURL=Icon.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.d.mts","names":[],"sources":["../../src/components/Icon.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;;KAkCK,QAAA,GAAW,YAAY;UAElB,SAAA,SAAkB,KAAK;QACzB,IAAI;;EAHP,IAAA,EAKG,QALK;EAEH;EAAuB,IAAA,CAAA,EAKxB,QALwB;EACrB;EAAJ,KAAA,CAAA,EAME,UANF,CAAA,OAAA,CAAA;EAEA;EAEC,OAAA,CAAA,EAIG,WAJH;EAEC,eAAA,CAAA,EAIU,UAJV,CAAA,iBAAA,CAAA;EAEE,YAAA,CAAA,EAIK,UAJL,CAAA,cAAA,CAAA;EAEQ,oBAAA,CAAA,EAGK,UAHL,CAAA,sBAAA,CAAA;EAEH,kBAAA,CAAA,EAEM,UAFN,CAAA,oBAAA,CAAA;EACQ,uBAAA,CAAA,EAEG,UAFH,CAAA,yBAAA,CAAA;EACF,qBAAA,CAAA,EAEG,UAFH,CAAA,uBAAA,CAAA;EACK,WAAA,CAAA,EAEZ,UAFY,CAAA,aAAA,CAAA;EACF,gBAAA,CAAA,EAEL,UAFK,CAAA,kBAAA,CAAA;EACV,cAAA,CAAA,EAEG,UAFH,CAAA,gBAAA,CAAA;EACK,cAAA,CAAA,EAEF,UAFE,CAAA,gBAAA,CAAA;EACF,iBAAA,CAAA,EAEG,UAFH,CAAA,mBAAA,CAAA;EACA,WAAA,CAAA,EAEH,UAFG,CAAA,aAAA,CAAA;EACG,mBAAA,CAAA,EAEE,UAFF,CAAA,qBAAA,CAAA;EACN,qBAAA,CAAA,EAEU,UAFV,CAAA,uBAAA,CAAA;EACQ,gBAAA,CAAA,EAEH,UAFG,CAAA,kBAAA,CAAA;EACE,cAAA,CAAA,EAEP,UAFO,CAAA,gBAAA,CAAA;EACL,cAAA,CAAA,EAEF,UAFE,CAAA,gBAAA,CAAA;EACF,iBAAA,CAAA,EAEG,UAFH,CAAA,mBAAA,CAAA;EACA,UAAA,CAAA,EAGJ,UAHI,CAAA,YAAA,CAAA;EACG,YAAA,CAAA,EAIL,UAJK,CAAA,cAAA,CAAA;EAEP,UAAA,CAAA,EAGA,UAHA,CAAA,YAAA,CAAA;EAEE,UAAA,CAAA,EAEF,UAFE,CAAA,YAAA,CAAA;EACF,aAAA,CAAA,EAEG,UAFH,CAAA,eAAA,CAAA;EACA,iBAAA,CAAA,EAEO,UAFP,CAAA,mBAAA,CAAA;EACG,eAAA,CAAA,EAEE,UAFF,CAAA,iBAAA,CAAA;EACI,OAAA,CAAA,EAEV,UAFU,CAAA,SAAA,CAAA;EACF,WAAA,CAAA,EAGJ,UAHI,CAAA,aAAA,CAAA;EACR,SAAA,CAAA,EAGE,UAHF,CAAA,WAAA,CAAA;EAEI,SAAA,CAAA,EAEF,UAFE,CAAA,WAAA,CAAA;EACF,YAAA,CAAA,EAEG,UAFH,CAAA,cAAA,CAAA;EACA,gBAAA,CAAA,EAEO,UAFP,CAAA,kBAAA,CAAA;EACG,cAAA,CAAA,EAEE,UAFF,CAAA,gBAAA,CAAA;EACI,MAAA,CAAA,EAEV,UAFU,CAAA,QAAA,CAAA;EACF;EACR,mBAAA,CAAA,EAAA,MAAA;EAMS;EAAV,kBAAA,CAAA,EAAA,MAAA;EArDkB;EAAI,KAAA,CAAA,EAqDtB,SArDsB,CAqDZ,SArDY,CAAA;AAAA;AAuQhC;AACA;;;;;;;;;;;;;;;;;;;;;cAdM,MAAI,OAAA,CAAA,qBAAA;cAaG;cACA"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { glyphMap, glyphNames } from "../icons/dist/glyphMap.mjs";
|
|
3
|
+
import { svgGlyphNames, svgMap } from "../icons/dist/svgMap.mjs";
|
|
4
|
+
import { ICON_SIZE_MAP } from "../icons/dist/tokens.mjs";
|
|
5
|
+
import { memo, useMemo } from "react";
|
|
6
|
+
import { Text, View } from "react-native";
|
|
7
|
+
import { styles } from "../../generated/styles";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
import { SvgXml } from "react-native-svg";
|
|
10
|
+
import { useUnistyles } from "react-native-unistyles";
|
|
11
|
+
|
|
12
|
+
//#region src/components/Icon.tsx
|
|
13
|
+
const DEFAULT_PROPS = {
|
|
14
|
+
size: "md",
|
|
15
|
+
color: "primary",
|
|
16
|
+
variant: "outline",
|
|
17
|
+
flexShrink: "0"
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Separate component for multicolor SVG icons.
|
|
21
|
+
* Uses useUnistyles() for reactive theme access - isolated here so
|
|
22
|
+
* glyph-based icons don't pay the hook overhead.
|
|
23
|
+
*/
|
|
24
|
+
const MulticolorIcon = memo(function MulticolorIcon$1({ name, size = DEFAULT_PROPS.size, flexShrink = DEFAULT_PROPS.flexShrink, backgroundColor, dangerouslySetSize }) {
|
|
25
|
+
const { rt } = useUnistyles();
|
|
26
|
+
const colorScheme = rt.themeName === "dark" ? "dark" : "light";
|
|
27
|
+
const pixelSize = ICON_SIZE_MAP[size];
|
|
28
|
+
const svgKey = `${name}-${colorScheme}-${pixelSize}`;
|
|
29
|
+
const svgContent = svgMap[svgKey];
|
|
30
|
+
if (!svgContent) {
|
|
31
|
+
console.warn(`Multicolor icon "${svgKey}" not found`);
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
styles.useVariants({
|
|
35
|
+
flexShrink,
|
|
36
|
+
backgroundColor
|
|
37
|
+
});
|
|
38
|
+
return /* @__PURE__ */ jsx(View, {
|
|
39
|
+
style: styles.foundation,
|
|
40
|
+
children: /* @__PURE__ */ jsx(SvgXml, {
|
|
41
|
+
xml: svgContent,
|
|
42
|
+
width: dangerouslySetSize ?? pixelSize,
|
|
43
|
+
height: dangerouslySetSize ?? pixelSize
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
const OutlineOrFillIcon = memo(function OutlineOrFillIcon$1({ name, size = DEFAULT_PROPS.size, color = DEFAULT_PROPS.color, variant = DEFAULT_PROPS.variant, backgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, flexShrink = "0", spacingStart, spacingEnd, spacingTop, spacingBottom, spacingHorizontal, spacingVertical, spacing, offsetStart, offsetEnd, offsetTop, offsetBottom, offsetHorizontal, offsetVertical, offset, dangerouslySetColor, dangerouslySetSize, style, ref, ...props }) {
|
|
48
|
+
const pixelSize = ICON_SIZE_MAP[size];
|
|
49
|
+
styles.useVariants({
|
|
50
|
+
color,
|
|
51
|
+
backgroundColor,
|
|
52
|
+
borderRadius,
|
|
53
|
+
borderTopStartRadius,
|
|
54
|
+
borderTopEndRadius,
|
|
55
|
+
borderBottomStartRadius,
|
|
56
|
+
borderBottomEndRadius,
|
|
57
|
+
borderColor,
|
|
58
|
+
borderStartColor,
|
|
59
|
+
borderEndColor,
|
|
60
|
+
borderTopColor,
|
|
61
|
+
borderBottomColor,
|
|
62
|
+
borderWidth,
|
|
63
|
+
borderVerticalWidth,
|
|
64
|
+
borderHorizontalWidth,
|
|
65
|
+
borderStartWidth,
|
|
66
|
+
borderEndWidth,
|
|
67
|
+
borderTopWidth,
|
|
68
|
+
borderBottomWidth,
|
|
69
|
+
flexShrink,
|
|
70
|
+
spacingStart,
|
|
71
|
+
spacingEnd,
|
|
72
|
+
spacingTop,
|
|
73
|
+
spacingBottom,
|
|
74
|
+
spacingHorizontal,
|
|
75
|
+
spacingVertical,
|
|
76
|
+
spacing,
|
|
77
|
+
offsetStart,
|
|
78
|
+
offsetEnd,
|
|
79
|
+
offsetTop,
|
|
80
|
+
offsetBottom,
|
|
81
|
+
offsetHorizontal,
|
|
82
|
+
offsetVertical,
|
|
83
|
+
offset
|
|
84
|
+
});
|
|
85
|
+
const glyph = glyphMap[`${name}-${variant}-${pixelSize}`];
|
|
86
|
+
return /* @__PURE__ */ jsx(Text, {
|
|
87
|
+
ref,
|
|
88
|
+
accessibilityRole: "image",
|
|
89
|
+
accessibilityLabel: name,
|
|
90
|
+
style: useMemo(() => [
|
|
91
|
+
{
|
|
92
|
+
fontFamily: "uds-icons",
|
|
93
|
+
textAlign: "center",
|
|
94
|
+
textAlignVertical: "center"
|
|
95
|
+
},
|
|
96
|
+
styles.foundation,
|
|
97
|
+
dangerouslySetColor ? { color: dangerouslySetColor } : void 0,
|
|
98
|
+
dangerouslySetSize ? {
|
|
99
|
+
fontSize: dangerouslySetSize,
|
|
100
|
+
lineHeight: dangerouslySetSize
|
|
101
|
+
} : void 0,
|
|
102
|
+
style
|
|
103
|
+
], [
|
|
104
|
+
dangerouslySetColor,
|
|
105
|
+
dangerouslySetSize,
|
|
106
|
+
style,
|
|
107
|
+
styles.foundation
|
|
108
|
+
]),
|
|
109
|
+
...props,
|
|
110
|
+
children: glyph
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
/**
|
|
114
|
+
* **🎨 An icon component using UDS icon fonts**
|
|
115
|
+
*
|
|
116
|
+
* @description
|
|
117
|
+
* Renders icons from the UDS icon library. Supports multiple variants
|
|
118
|
+
* (outline, fill, multicolor) and sizes.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```tsx
|
|
122
|
+
* import { Icon } from '@yahoo/uds-mobile';
|
|
123
|
+
*
|
|
124
|
+
* <Icon name="ChevronRight" size="md" color="primary" />
|
|
125
|
+
* <Icon name="Star" variant="fill" color="accent" />
|
|
126
|
+
* ```
|
|
127
|
+
*
|
|
128
|
+
* @usage
|
|
129
|
+
* - Use name prop to specify the icon
|
|
130
|
+
* - Use variant prop for outline/fill/multicolor
|
|
131
|
+
* - Use size prop for icon size (xs, sm, md, lg, xl)
|
|
132
|
+
*
|
|
133
|
+
* @see The {@link https://uds.build/docs/components/icon Icon Docs} for more info
|
|
134
|
+
*/
|
|
135
|
+
const Icon = memo(function Icon$1({ variant, ...props }) {
|
|
136
|
+
if (variant === "multicolor") return /* @__PURE__ */ jsx(MulticolorIcon, { ...props });
|
|
137
|
+
return /* @__PURE__ */ jsx(OutlineOrFillIcon, {
|
|
138
|
+
variant,
|
|
139
|
+
...props
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
Icon.displayName = "Icon";
|
|
143
|
+
const iconNames = glyphNames;
|
|
144
|
+
const multicolorIconNames = svgGlyphNames;
|
|
145
|
+
|
|
146
|
+
//#endregion
|
|
147
|
+
export { Icon, iconNames, multicolorIconNames };
|
|
148
|
+
//# sourceMappingURL=Icon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.mjs","names":["MulticolorIcon","OutlineOrFillIcon","Icon"],"sources":["../../src/components/Icon.tsx"],"sourcesContent":["import type { IconSize, IconVariant } from '@yahoo/uds';\nimport type { GlyphName } from '@yahoo/uds-icons/glyphMap';\nimport { glyphMap, glyphNames } from '@yahoo/uds-icons/glyphMap';\nimport type { SvgGlyphKey, SvgGlyphName } from '@yahoo/uds-icons/svgMap';\nimport { svgGlyphNames, svgMap } from '@yahoo/uds-icons/svgMap';\nimport { ICON_SIZE_MAP } from '@yahoo/uds-icons/tokens';\nimport type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type {\n StyleProp,\n Text as RNText,\n TextProps as RNTextProps,\n TextStyle,\n ViewProps,\n} from 'react-native';\nimport { Text, View } from 'react-native';\nimport { SvgXml } from 'react-native-svg';\n// eslint-disable-next-line uds/no-use-unistyles\nimport { useUnistyles } from 'react-native-unistyles';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\n\nconst DEFAULT_PROPS = {\n size: 'md',\n color: 'primary',\n variant: 'outline',\n flexShrink: '0',\n} as const;\n\n/* -------------------------------------------------------------------------- */\n/* Icon Props */\n/* -------------------------------------------------------------------------- */\n\ntype IconName = GlyphName | SvgGlyphName;\n\ninterface IconProps extends Omit<RNTextProps, 'style'> {\n ref?: Ref<RNText>;\n /** The icon name */\n name: IconName;\n /** Icon size */\n size?: IconSize;\n /** Icon color */\n color?: StyleProps['color'];\n /** Icon variant (outline, fill, multicolor) */\n variant?: IconVariant;\n // Background\n backgroundColor?: StyleProps['backgroundColor'];\n // Border\n borderRadius?: StyleProps['borderRadius'];\n borderTopStartRadius?: StyleProps['borderTopStartRadius'];\n borderTopEndRadius?: StyleProps['borderTopEndRadius'];\n borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];\n borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];\n borderColor?: StyleProps['borderColor'];\n borderStartColor?: StyleProps['borderStartColor'];\n borderEndColor?: StyleProps['borderEndColor'];\n borderTopColor?: StyleProps['borderTopColor'];\n borderBottomColor?: StyleProps['borderBottomColor'];\n borderWidth?: StyleProps['borderWidth'];\n borderVerticalWidth?: StyleProps['borderVerticalWidth'];\n borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];\n borderStartWidth?: StyleProps['borderStartWidth'];\n borderEndWidth?: StyleProps['borderEndWidth'];\n borderTopWidth?: StyleProps['borderTopWidth'];\n borderBottomWidth?: StyleProps['borderBottomWidth'];\n // Flex\n flexShrink?: StyleProps['flexShrink'];\n // Spacing\n spacingStart?: StyleProps['spacingStart'];\n spacingEnd?: StyleProps['spacingEnd'];\n spacingTop?: StyleProps['spacingTop'];\n spacingBottom?: StyleProps['spacingBottom'];\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingVertical?: StyleProps['spacingVertical'];\n spacing?: StyleProps['spacing'];\n // Offset\n offsetStart?: StyleProps['offsetStart'];\n offsetEnd?: StyleProps['offsetEnd'];\n offsetTop?: StyleProps['offsetTop'];\n offsetBottom?: StyleProps['offsetBottom'];\n offsetHorizontal?: StyleProps['offsetHorizontal'];\n offsetVertical?: StyleProps['offsetVertical'];\n offset?: StyleProps['offset'];\n /** Icon color override */\n dangerouslySetColor?: string;\n /** Icon font size override */\n dangerouslySetSize?: number;\n /** Optional style override */\n style?: StyleProp<TextStyle>;\n}\n\n/* -------------------------------------------------------------------------- */\n/* Multicolor Icon */\n/* -------------------------------------------------------------------------- */\n\n/**\n * Separate component for multicolor SVG icons.\n * Uses useUnistyles() for reactive theme access - isolated here so\n * glyph-based icons don't pay the hook overhead.\n */\nconst MulticolorIcon = memo(function MulticolorIcon({\n name,\n size = DEFAULT_PROPS.size,\n flexShrink = DEFAULT_PROPS.flexShrink,\n backgroundColor,\n dangerouslySetSize,\n}: Omit<IconProps, 'variant'>) {\n // Reactive theme subscription - only multicolor icons need this\n const { rt } = useUnistyles();\n const colorScheme = rt.themeName === 'dark' ? 'dark' : 'light';\n\n const pixelSize = ICON_SIZE_MAP[size];\n const svgKey = `${name}-${colorScheme}-${pixelSize}` as SvgGlyphKey;\n const svgContent = svgMap[svgKey];\n\n if (!svgContent) {\n console.warn(`Multicolor icon \"${svgKey}\" not found`);\n return null;\n }\n\n styles.useVariants({\n flexShrink,\n backgroundColor,\n });\n\n return (\n <View style={styles.foundation as ViewProps['style']}>\n <SvgXml\n xml={svgContent}\n width={dangerouslySetSize ?? pixelSize}\n height={dangerouslySetSize ?? pixelSize}\n />\n </View>\n );\n});\n\nconst OutlineOrFillIcon = memo(function OutlineOrFillIcon({\n name,\n size = DEFAULT_PROPS.size,\n color = DEFAULT_PROPS.color,\n variant = DEFAULT_PROPS.variant,\n // Background\n backgroundColor,\n // Border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // Flex\n flexShrink = '0',\n // Spacing\n spacingStart,\n spacingEnd,\n spacingTop,\n spacingBottom,\n spacingHorizontal,\n spacingVertical,\n spacing,\n // Offset\n offsetStart,\n offsetEnd,\n offsetTop,\n offsetBottom,\n offsetHorizontal,\n offsetVertical,\n offset,\n // Dangerously set props\n dangerouslySetColor,\n dangerouslySetSize,\n style,\n ref,\n ...props\n}: Omit<IconProps, 'variant'> & { variant?: 'outline' | 'fill' }) {\n const pixelSize = ICON_SIZE_MAP[size];\n // Glyph-based icons - no useUnistyles needed, styles.useVariants is reactive\n styles.useVariants({\n color,\n backgroundColor,\n // Border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // Flex\n flexShrink,\n // Spacing\n spacingStart,\n spacingEnd,\n spacingTop,\n spacingBottom,\n spacingHorizontal,\n spacingVertical,\n spacing,\n // Offset\n offsetStart,\n offsetEnd,\n offsetTop,\n offsetBottom,\n offsetHorizontal,\n offsetVertical,\n offset,\n });\n const glyphName = `${name}-${variant}-${pixelSize}`;\n const glyph = (glyphMap as Record<string, string>)[glyphName];\n const textStyles: StyleProp<TextStyle> = useMemo(\n () => [\n {\n fontFamily: 'uds-icons',\n textAlign: 'center',\n textAlignVertical: 'center',\n },\n styles.foundation,\n dangerouslySetColor ? { color: dangerouslySetColor } : undefined,\n dangerouslySetSize\n ? {\n fontSize: dangerouslySetSize,\n lineHeight: dangerouslySetSize,\n }\n : undefined,\n style,\n ],\n [dangerouslySetColor, dangerouslySetSize, style, styles.foundation],\n );\n\n return (\n <Text\n ref={ref}\n accessibilityRole=\"image\"\n accessibilityLabel={name}\n style={textStyles}\n {...props}\n >\n {glyph}\n </Text>\n );\n});\n\n/**\n * **🎨 An icon component using UDS icon fonts**\n *\n * @description\n * Renders icons from the UDS icon library. Supports multiple variants\n * (outline, fill, multicolor) and sizes.\n *\n * @example\n * ```tsx\n * import { Icon } from '@yahoo/uds-mobile';\n *\n * <Icon name=\"ChevronRight\" size=\"md\" color=\"primary\" />\n * <Icon name=\"Star\" variant=\"fill\" color=\"accent\" />\n * ```\n *\n * @usage\n * - Use name prop to specify the icon\n * - Use variant prop for outline/fill/multicolor\n * - Use size prop for icon size (xs, sm, md, lg, xl)\n *\n * @see The {@link https://uds.build/docs/components/icon Icon Docs} for more info\n */\nconst Icon = memo(function Icon({ variant, ...props }: IconProps) {\n // Delegate to MulticolorIcon for SVG-based icons (has its own useUnistyles)\n if (variant === 'multicolor') {\n return <MulticolorIcon {...props} />;\n }\n\n return <OutlineOrFillIcon variant={variant} {...props} />;\n});\n\nIcon.displayName = 'Icon';\n\nexport { Icon };\nexport type { IconName, IconProps };\nexport const iconNames = glyphNames;\nexport const multicolorIconNames = svgGlyphNames;\n"],"mappings":";;;;;;;;;;;;AAuBA,MAAM,gBAAgB;CACpB,MAAM;CACN,OAAO;CACP,SAAS;CACT,YAAY;CACb;;;;;;AAyED,MAAM,iBAAiB,KAAK,SAASA,iBAAe,EAClD,MACA,OAAO,cAAc,MACrB,aAAa,cAAc,YAC3B,iBACA,sBAC6B;CAE7B,MAAM,EAAE,OAAO,cAAc;CAC7B,MAAM,cAAc,GAAG,cAAc,SAAS,SAAS;CAEvD,MAAM,YAAY,cAAc;CAChC,MAAM,SAAS,GAAG,KAAK,GAAG,YAAY,GAAG;CACzC,MAAM,aAAa,OAAO;AAE1B,KAAI,CAAC,YAAY;AACf,UAAQ,KAAK,oBAAoB,OAAO,aAAa;AACrD,SAAO;;AAGT,QAAO,YAAY;EACjB;EACA;EACD,CAAC;AAEF,QACE,oBAAC;EAAK,OAAO,OAAO;YAClB,oBAAC;GACC,KAAK;GACL,OAAO,sBAAsB;GAC7B,QAAQ,sBAAsB;IAC9B;GACG;EAET;AAEF,MAAM,oBAAoB,KAAK,SAASC,oBAAkB,EACxD,MACA,OAAO,cAAc,MACrB,QAAQ,cAAc,OACtB,UAAU,cAAc,SAExB,iBAEA,cACA,sBACA,oBACA,yBACA,uBACA,aACA,kBACA,gBACA,gBACA,mBACA,aACA,qBACA,uBACA,kBACA,gBACA,gBACA,mBAEA,aAAa,KAEb,cACA,YACA,YACA,eACA,mBACA,iBACA,SAEA,aACA,WACA,WACA,cACA,kBACA,gBACA,QAEA,qBACA,oBACA,OACA,KACA,GAAG,SAC6D;CAChE,MAAM,YAAY,cAAc;AAEhC,QAAO,YAAY;EACjB;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CAAC;CAEF,MAAM,QAAS,SADG,GAAG,KAAK,GAAG,QAAQ,GAAG;AAsBxC,QACE,oBAAC;EACM;EACL,mBAAkB;EAClB,oBAAoB;EACpB,OAzBqC,cACjC;GACJ;IACE,YAAY;IACZ,WAAW;IACX,mBAAmB;IACpB;GACD,OAAO;GACP,sBAAsB,EAAE,OAAO,qBAAqB,GAAG;GACvD,qBACI;IACE,UAAU;IACV,YAAY;IACb,GACD;GACJ;GACD,EACD;GAAC;GAAqB;GAAoB;GAAO,OAAO;GAAW,CACpE;EAQG,GAAI;YAEH;GACI;EAET;;;;;;;;;;;;;;;;;;;;;;;AAwBF,MAAM,OAAO,KAAK,SAASC,OAAK,EAAE,SAAS,GAAG,SAAoB;AAEhE,KAAI,YAAY,aACd,QAAO,oBAAC,kBAAe,GAAI,QAAS;AAGtC,QAAO,oBAAC;EAA2B;EAAS,GAAI;GAAS;EACzD;AAEF,KAAK,cAAc;AAInB,MAAa,YAAY;AACzB,MAAa,sBAAsB"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
3
|
+
const require_motion = require('../uds/dist/tokens/configs/motion.cjs');
|
|
4
|
+
const require_motion$1 = require('../motion.cjs');
|
|
5
|
+
const require_components_Icon = require('./Icon.cjs');
|
|
6
|
+
const require_components_Pressable = require('./Pressable.cjs');
|
|
7
|
+
let react = require("react");
|
|
8
|
+
let react_native = require("react-native");
|
|
9
|
+
let generated_styles = require("../../generated/styles");
|
|
10
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
11
|
+
let react_native_reanimated = require("react-native-reanimated");
|
|
12
|
+
let react_native_unistyles_reanimated = require("react-native-unistyles/reanimated");
|
|
13
|
+
|
|
14
|
+
//#region src/components/IconButton.tsx
|
|
15
|
+
function interpolateShadowAlpha(shadow, alpha) {
|
|
16
|
+
"worklet";
|
|
17
|
+
if (!shadow || alpha >= 1) return shadow;
|
|
18
|
+
if (alpha <= 0) return "";
|
|
19
|
+
return shadow.replace(/rgba\(([^,]+),\s*([^,]+),\s*([^,]+),\s*([^)]+)\)/g, (_, r, g, b, a) => {
|
|
20
|
+
return `rgba(${r}, ${g}, ${b}, ${(parseFloat(a) * alpha).toFixed(3)})`;
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* **An icon button element that can be used to trigger an action**
|
|
25
|
+
*
|
|
26
|
+
* Features animated scale effect on press and smooth color transitions
|
|
27
|
+
* matching the web UDS IconButton behavior.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* import { IconButton } from '@yahoo/uds-mobile';
|
|
32
|
+
*
|
|
33
|
+
* <IconButton name="Add" onPress={() => console.log('pressed')} />
|
|
34
|
+
* <IconButton name="Close" variant="secondary" size="sm" />
|
|
35
|
+
* <IconButton name="Settings" loading />
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
const IconButton = (0, react.memo)(function IconButton$1({ name, variant = "primary", size = "md", iconVariant = "outline", loading, disabled, style, accessibilityLabel, accessibilityHint, disableEffects = false, onPressIn, onPressOut, ref, ...props }) {
|
|
39
|
+
const isDisabled = disabled || loading;
|
|
40
|
+
const shouldAnimate = !disableEffects && !isDisabled;
|
|
41
|
+
const [pressed, setPressed] = (0, react.useState)(false);
|
|
42
|
+
generated_styles.iconButtonStyles.useVariants({ size });
|
|
43
|
+
generated_styles.buttonStyles.useVariants({
|
|
44
|
+
variant,
|
|
45
|
+
disabled: isDisabled,
|
|
46
|
+
pressed
|
|
47
|
+
});
|
|
48
|
+
const backgroundColor = (0, react_native_unistyles_reanimated.useAnimatedVariantColor)(generated_styles.buttonStyles.root, "backgroundColor");
|
|
49
|
+
const borderColor = (0, react_native_unistyles_reanimated.useAnimatedVariantColor)(generated_styles.buttonStyles.root, "borderColor");
|
|
50
|
+
const animatedTheme = (0, react_native_unistyles_reanimated.useAnimatedTheme)();
|
|
51
|
+
const scale = (0, react_native_reanimated.useSharedValue)(require_motion.SCALE_EFFECTS.none);
|
|
52
|
+
const handlePressIn = (0, react.useCallback)((event) => {
|
|
53
|
+
setPressed(true);
|
|
54
|
+
if (shouldAnimate) scale.value = (0, react_native_reanimated.withSpring)(require_motion.SCALE_EFFECTS.down, require_motion$1.BUTTON_SPRING_CONFIG);
|
|
55
|
+
onPressIn?.(event);
|
|
56
|
+
}, [
|
|
57
|
+
shouldAnimate,
|
|
58
|
+
scale,
|
|
59
|
+
onPressIn
|
|
60
|
+
]);
|
|
61
|
+
const handlePressOut = (0, react.useCallback)((event) => {
|
|
62
|
+
setPressed(false);
|
|
63
|
+
if (shouldAnimate) scale.value = (0, react_native_reanimated.withSpring)(require_motion.SCALE_EFFECTS.none, require_motion$1.BUTTON_SPRING_CONFIG);
|
|
64
|
+
onPressOut?.(event);
|
|
65
|
+
}, [
|
|
66
|
+
shouldAnimate,
|
|
67
|
+
scale,
|
|
68
|
+
onPressOut
|
|
69
|
+
]);
|
|
70
|
+
const a11yState = (0, react.useMemo)(() => ({
|
|
71
|
+
disabled: isDisabled,
|
|
72
|
+
busy: loading
|
|
73
|
+
}), [isDisabled, loading]);
|
|
74
|
+
const pressProgress = (0, react_native_reanimated.useDerivedValue)(() => (0, react_native_reanimated.withTiming)(pressed ? 1 : 0, {
|
|
75
|
+
duration: 220,
|
|
76
|
+
easing: react_native_reanimated.Easing.bezier(0, 0, .2, 1)
|
|
77
|
+
}), [pressed]);
|
|
78
|
+
const animatedRootStyle = (0, react_native_reanimated.useAnimatedStyle)(() => {
|
|
79
|
+
const shadowPressed = animatedTheme.value.components[`button/variant/${variant}/root/pressed`]?.boxShadow ?? "";
|
|
80
|
+
return {
|
|
81
|
+
transform: [{ scale: scale.value }],
|
|
82
|
+
backgroundColor: (0, react_native_reanimated.withTiming)(backgroundColor.value, {
|
|
83
|
+
duration: 220,
|
|
84
|
+
easing: react_native_reanimated.Easing.bezier(0, 0, .2, 1)
|
|
85
|
+
}),
|
|
86
|
+
borderColor: (0, react_native_reanimated.withTiming)(borderColor.value, {
|
|
87
|
+
duration: 220,
|
|
88
|
+
easing: react_native_reanimated.Easing.bezier(0, 0, .2, 1)
|
|
89
|
+
}),
|
|
90
|
+
boxShadow: interpolateShadowAlpha(shadowPressed, pressProgress.value)
|
|
91
|
+
};
|
|
92
|
+
});
|
|
93
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Pressable.AnimatedPressable, {
|
|
94
|
+
ref,
|
|
95
|
+
disabled: isDisabled,
|
|
96
|
+
onPressIn: handlePressIn,
|
|
97
|
+
onPressOut: handlePressOut,
|
|
98
|
+
flexDirection: "row",
|
|
99
|
+
alignItems: "center",
|
|
100
|
+
justifyContent: "center",
|
|
101
|
+
overflow: "hidden",
|
|
102
|
+
accessibilityLabel: loading ? `${accessibilityLabel ?? ""}, loading` : accessibilityLabel,
|
|
103
|
+
accessibilityHint,
|
|
104
|
+
accessibilityRole: "button",
|
|
105
|
+
accessibilityState: a11yState,
|
|
106
|
+
style: [
|
|
107
|
+
generated_styles.iconButtonStyles.root,
|
|
108
|
+
generated_styles.buttonStyles.root,
|
|
109
|
+
generated_styles.styles.foundation,
|
|
110
|
+
animatedRootStyle,
|
|
111
|
+
typeof style === "function" ? style({ pressed }) : style
|
|
112
|
+
],
|
|
113
|
+
...props,
|
|
114
|
+
children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.ActivityIndicator, {
|
|
115
|
+
size: generated_styles.buttonStyles.icon.fontSize,
|
|
116
|
+
color: generated_styles.buttonStyles.icon.color
|
|
117
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_components_Icon.Icon, {
|
|
118
|
+
name,
|
|
119
|
+
variant: iconVariant,
|
|
120
|
+
style: generated_styles.buttonStyles.icon
|
|
121
|
+
})
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
IconButton.displayName = "IconButton";
|
|
125
|
+
|
|
126
|
+
//#endregion
|
|
127
|
+
exports.IconButton = IconButton;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconVariant } from "../icons/dist/types.cjs";
|
|
3
|
+
import { ButtonVariantFlat, IconButtonSize } from "../uds/dist/tokens/types.cjs";
|
|
4
|
+
import { IconName } from "./Icon.cjs";
|
|
5
|
+
import { PressableProps as PressableProps$1 } from "./Pressable.cjs";
|
|
6
|
+
import * as react10 from "react";
|
|
7
|
+
import { Ref } from "react";
|
|
8
|
+
import { View } from "react-native";
|
|
9
|
+
|
|
10
|
+
//#region src/components/IconButton.d.ts
|
|
11
|
+
interface IconButtonProps extends Omit<PressableProps$1, 'children'> {
|
|
12
|
+
/** Icon to render from the icons package. */
|
|
13
|
+
name: IconName;
|
|
14
|
+
/** @default 'primary' */
|
|
15
|
+
variant?: ButtonVariantFlat;
|
|
16
|
+
/** @default 'md' */
|
|
17
|
+
size?: IconButtonSize;
|
|
18
|
+
/** @default 'outline' */
|
|
19
|
+
iconVariant?: IconVariant;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Disable motion effects (scale on press, icon animations)
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
disableEffects?: boolean;
|
|
26
|
+
ref?: Ref<View>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* **An icon button element that can be used to trigger an action**
|
|
30
|
+
*
|
|
31
|
+
* Features animated scale effect on press and smooth color transitions
|
|
32
|
+
* matching the web UDS IconButton behavior.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* import { IconButton } from '@yahoo/uds-mobile';
|
|
37
|
+
*
|
|
38
|
+
* <IconButton name="Add" onPress={() => console.log('pressed')} />
|
|
39
|
+
* <IconButton name="Close" variant="secondary" size="sm" />
|
|
40
|
+
* <IconButton name="Settings" loading />
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare const IconButton: react10.NamedExoticComponent<IconButtonProps>;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { IconButton, type IconButtonProps };
|
|
46
|
+
//# sourceMappingURL=IconButton.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.cts","names":[],"sources":["../../src/components/IconButton.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;UA6CU,eAAA,SAAwB,KAAK;;QAE/B;;EAFE,OAAA,CAAA,EAIE,iBAJc;EAAa;EAE/B,IAAA,CAAA,EAIC,cAJD;EAEI;EAEH,WAAA,CAAA,EAEO,WAFP;EAEO,OAAA,CAAA,EAAA,OAAA;EAOJ;;;;EAsBN,cA0HJ,CAAA,EAAA,OAAA;QAhJM,IAAI;;;;;;;;;;;;;;;;;cAsBN,YAAU,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
import { IconVariant } from "../icons/dist/types.mjs";
|
|
3
|
+
import { ButtonVariantFlat, IconButtonSize } from "../uds/dist/tokens/types.mjs";
|
|
4
|
+
import { IconName } from "./Icon.mjs";
|
|
5
|
+
import { PressableProps as PressableProps$1 } from "./Pressable.mjs";
|
|
6
|
+
import * as react19 from "react";
|
|
7
|
+
import { Ref } from "react";
|
|
8
|
+
import { View } from "react-native";
|
|
9
|
+
|
|
10
|
+
//#region src/components/IconButton.d.ts
|
|
11
|
+
interface IconButtonProps extends Omit<PressableProps$1, 'children'> {
|
|
12
|
+
/** Icon to render from the icons package. */
|
|
13
|
+
name: IconName;
|
|
14
|
+
/** @default 'primary' */
|
|
15
|
+
variant?: ButtonVariantFlat;
|
|
16
|
+
/** @default 'md' */
|
|
17
|
+
size?: IconButtonSize;
|
|
18
|
+
/** @default 'outline' */
|
|
19
|
+
iconVariant?: IconVariant;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Disable motion effects (scale on press, icon animations)
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
disableEffects?: boolean;
|
|
26
|
+
ref?: Ref<View>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* **An icon button element that can be used to trigger an action**
|
|
30
|
+
*
|
|
31
|
+
* Features animated scale effect on press and smooth color transitions
|
|
32
|
+
* matching the web UDS IconButton behavior.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* import { IconButton } from '@yahoo/uds-mobile';
|
|
37
|
+
*
|
|
38
|
+
* <IconButton name="Add" onPress={() => console.log('pressed')} />
|
|
39
|
+
* <IconButton name="Close" variant="secondary" size="sm" />
|
|
40
|
+
* <IconButton name="Settings" loading />
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare const IconButton: react19.NamedExoticComponent<IconButtonProps>;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { IconButton, type IconButtonProps };
|
|
46
|
+
//# sourceMappingURL=IconButton.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.d.mts","names":[],"sources":["../../src/components/IconButton.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;;UA6CU,eAAA,SAAwB,KAAK;;QAE/B;;EAFE,OAAA,CAAA,EAIE,iBAJc;EAAa;EAE/B,IAAA,CAAA,EAIC,cAJD;EAEI;EAEH,WAAA,CAAA,EAEO,WAFP;EAEO,OAAA,CAAA,EAAA,OAAA;EAOJ;;;;EAsBN,cA0HJ,CAAA,EAAA,OAAA;QAhJM,IAAI;;;;;;;;;;;;;;;;;cAsBN,YAAU,OAAA,CAAA,qBAAA"}
|