@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,43 @@
|
|
|
1
|
+
|
|
2
|
+
import { BadgeSize, BadgeVariant } from "../uds/dist/tokens/types.cjs";
|
|
3
|
+
import { IconSlotType } from "./IconSlot.cjs";
|
|
4
|
+
import * as react14 from "react";
|
|
5
|
+
import { Ref } from "react";
|
|
6
|
+
import { View, ViewProps } from "react-native";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Badge.d.ts
|
|
9
|
+
interface BadgeProps extends ViewProps {
|
|
10
|
+
/** @default 'primary' */
|
|
11
|
+
variant?: BadgeVariant;
|
|
12
|
+
/** @default 'md' */
|
|
13
|
+
size?: BadgeSize;
|
|
14
|
+
minWidth?: number;
|
|
15
|
+
/** @default 200 */
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
startIcon?: IconSlotType;
|
|
18
|
+
endIcon?: IconSlotType;
|
|
19
|
+
dangerouslySetBackgroundColor?: string;
|
|
20
|
+
dangerouslySetColor?: string;
|
|
21
|
+
dangerouslySetBorderColor?: string;
|
|
22
|
+
dangerouslySetIconColor?: string;
|
|
23
|
+
ref?: Ref<View>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* **A badge component for status indicators**
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* Badges show notifications, counts, or status information on navigation items and icons.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* import { Badge } from '~/components/ui/Badge';
|
|
34
|
+
*
|
|
35
|
+
* <Badge>Label</Badge>
|
|
36
|
+
* <Badge variant="brand" size="sm">New</Badge>
|
|
37
|
+
* <Badge variant="alert" startIcon="Warning">Error</Badge>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare const Badge: react14.NamedExoticComponent<BadgeProps>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Badge, type BadgeProps };
|
|
43
|
+
//# sourceMappingURL=Badge.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.cts","names":[],"sources":["../../src/components/Badge.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAWU,UAAA,SAAmB;;YAEjB;EAFF;EAEE,IAAA,CAAA,EAEH,SAFG;EAEH,QAAA,CAAA,EAAA,MAAA;EAIK;EACF,QAAA,CAAA,EAAA,MAAA;EAKA,SAAA,CAAA,EANE,YAMF;EAAJ,OAAA,CAAA,EALI,YAKJ;EAdqB,6BAAA,CAAA,EAAA,MAAA;EAAS,mBAAA,CAAA,EAAA,MAAA;EAgChC,yBAAK,CAAA,EAAA,MAAA;;QAlBH,IAAI;;;;;;;;;;;;;;;;;cAkBN,OAAK,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
import { BadgeSize, BadgeVariant } from "../uds/dist/tokens/types.mjs";
|
|
3
|
+
import { IconSlotType } from "./IconSlot.mjs";
|
|
4
|
+
import * as react6 from "react";
|
|
5
|
+
import { Ref } from "react";
|
|
6
|
+
import { View, ViewProps } from "react-native";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Badge.d.ts
|
|
9
|
+
interface BadgeProps extends ViewProps {
|
|
10
|
+
/** @default 'primary' */
|
|
11
|
+
variant?: BadgeVariant;
|
|
12
|
+
/** @default 'md' */
|
|
13
|
+
size?: BadgeSize;
|
|
14
|
+
minWidth?: number;
|
|
15
|
+
/** @default 200 */
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
startIcon?: IconSlotType;
|
|
18
|
+
endIcon?: IconSlotType;
|
|
19
|
+
dangerouslySetBackgroundColor?: string;
|
|
20
|
+
dangerouslySetColor?: string;
|
|
21
|
+
dangerouslySetBorderColor?: string;
|
|
22
|
+
dangerouslySetIconColor?: string;
|
|
23
|
+
ref?: Ref<View>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* **A badge component for status indicators**
|
|
27
|
+
*
|
|
28
|
+
* @description
|
|
29
|
+
* Badges show notifications, counts, or status information on navigation items and icons.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* import { Badge } from '~/components/ui/Badge';
|
|
34
|
+
*
|
|
35
|
+
* <Badge>Label</Badge>
|
|
36
|
+
* <Badge variant="brand" size="sm">New</Badge>
|
|
37
|
+
* <Badge variant="alert" startIcon="Warning">Error</Badge>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
declare const Badge: react6.NamedExoticComponent<BadgeProps>;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { Badge, type BadgeProps };
|
|
43
|
+
//# sourceMappingURL=Badge.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.mts","names":[],"sources":["../../src/components/Badge.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UAWU,UAAA,SAAmB;;YAEjB;EAFF;EAEE,IAAA,CAAA,EAEH,SAFG;EAEH,QAAA,CAAA,EAAA,MAAA;EAIK;EACF,QAAA,CAAA,EAAA,MAAA;EAKA,SAAA,CAAA,EANE,YAMF;EAAJ,OAAA,CAAA,EALI,YAKJ;EAdqB,6BAAA,CAAA,EAAA,MAAA;EAAS,mBAAA,CAAA,EAAA,MAAA;EAgChC,yBAAK,CAAA,EAAA,MAAA;;QAlBH,IAAI;;;;;;;;;;;;;;;;;cAkBN,OAAK,MAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { IconSlot } from "./IconSlot.mjs";
|
|
3
|
+
import { Text } from "./Text.mjs";
|
|
4
|
+
import { HStack } from "./HStack.mjs";
|
|
5
|
+
import { memo, useMemo } from "react";
|
|
6
|
+
import { badgeStyles } from "../../generated/styles";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/components/Badge.tsx
|
|
10
|
+
/**
|
|
11
|
+
* **A badge component for status indicators**
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* Badges show notifications, counts, or status information on navigation items and icons.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { Badge } from '~/components/ui/Badge';
|
|
19
|
+
*
|
|
20
|
+
* <Badge>Label</Badge>
|
|
21
|
+
* <Badge variant="brand" size="sm">New</Badge>
|
|
22
|
+
* <Badge variant="alert" startIcon="Warning">Error</Badge>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
const Badge = memo(function Badge$1({ variant = "primary", size = "md", minWidth, maxWidth = 200, startIcon, endIcon, dangerouslySetBackgroundColor, dangerouslySetColor, dangerouslySetIconColor, dangerouslySetBorderColor, children, style, ref, ...rest }) {
|
|
26
|
+
badgeStyles.useVariants({
|
|
27
|
+
size,
|
|
28
|
+
variant
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ jsxs(HStack, {
|
|
31
|
+
ref,
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
overflow: "hidden",
|
|
34
|
+
alignSelf: "flex-start",
|
|
35
|
+
maxWidth,
|
|
36
|
+
minWidth,
|
|
37
|
+
dangerouslySetBackgroundColor,
|
|
38
|
+
dangerouslySetBorderColor,
|
|
39
|
+
style: useMemo(() => [badgeStyles.root, style], [style, badgeStyles.root]),
|
|
40
|
+
...rest,
|
|
41
|
+
children: [
|
|
42
|
+
startIcon && /* @__PURE__ */ jsx(IconSlot, {
|
|
43
|
+
icon: startIcon,
|
|
44
|
+
variant: "fill",
|
|
45
|
+
dangerouslySetColor: dangerouslySetIconColor,
|
|
46
|
+
style: badgeStyles.icon
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ jsx(Text, {
|
|
49
|
+
numberOfLines: 1,
|
|
50
|
+
flexShrink: "1",
|
|
51
|
+
dangerouslySetColor,
|
|
52
|
+
style: badgeStyles.text,
|
|
53
|
+
children
|
|
54
|
+
}),
|
|
55
|
+
endIcon && /* @__PURE__ */ jsx(IconSlot, {
|
|
56
|
+
icon: endIcon,
|
|
57
|
+
variant: "fill",
|
|
58
|
+
dangerouslySetColor: dangerouslySetIconColor,
|
|
59
|
+
style: badgeStyles.icon
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
Badge.displayName = "Badge";
|
|
65
|
+
|
|
66
|
+
//#endregion
|
|
67
|
+
export { Badge };
|
|
68
|
+
//# sourceMappingURL=Badge.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.mjs","names":["Badge"],"sources":["../../src/components/Badge.tsx"],"sourcesContent":["import type { BadgeSize, BadgeVariant } from '@yahoo/uds/tokens';\nimport type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { View, ViewProps } from 'react-native';\n\nimport { badgeStyles } from '../../generated/styles';\nimport { HStack } from './HStack';\nimport type { IconSlotType } from './IconSlot';\nimport { IconSlot } from './IconSlot';\nimport { Text } from './Text';\n\ninterface BadgeProps extends ViewProps {\n /** @default 'primary' */\n variant?: BadgeVariant;\n /** @default 'md' */\n size?: BadgeSize;\n minWidth?: number;\n /** @default 200 */\n maxWidth?: number;\n startIcon?: IconSlotType;\n endIcon?: IconSlotType;\n dangerouslySetBackgroundColor?: string;\n dangerouslySetColor?: string;\n dangerouslySetBorderColor?: string;\n dangerouslySetIconColor?: string;\n ref?: Ref<View>;\n}\n\n/**\n * **A badge component for status indicators**\n *\n * @description\n * Badges show notifications, counts, or status information on navigation items and icons.\n *\n * @example\n * ```tsx\n * import { Badge } from '~/components/ui/Badge';\n *\n * <Badge>Label</Badge>\n * <Badge variant=\"brand\" size=\"sm\">New</Badge>\n * <Badge variant=\"alert\" startIcon=\"Warning\">Error</Badge>\n * ```\n */\nconst Badge = memo(function Badge({\n variant = 'primary',\n size = 'md',\n minWidth,\n maxWidth = 200,\n startIcon,\n endIcon,\n dangerouslySetBackgroundColor,\n dangerouslySetColor,\n dangerouslySetIconColor,\n dangerouslySetBorderColor,\n children,\n style,\n ref,\n ...rest\n}: BadgeProps) {\n badgeStyles.useVariants({ size, variant });\n const rootStyles = useMemo(() => [badgeStyles.root, style], [style, badgeStyles.root]);\n\n return (\n <HStack\n ref={ref}\n alignItems=\"center\"\n overflow=\"hidden\"\n alignSelf=\"flex-start\"\n maxWidth={maxWidth}\n minWidth={minWidth}\n dangerouslySetBackgroundColor={dangerouslySetBackgroundColor}\n dangerouslySetBorderColor={dangerouslySetBorderColor}\n // Cannot memoize - styles contain theme-reactive values\n style={rootStyles}\n {...rest}\n >\n {startIcon && (\n <IconSlot\n icon={startIcon}\n variant=\"fill\"\n dangerouslySetColor={dangerouslySetIconColor}\n style={badgeStyles.icon}\n />\n )}\n <Text\n numberOfLines={1}\n flexShrink=\"1\"\n dangerouslySetColor={dangerouslySetColor}\n style={badgeStyles.text}\n >\n {children}\n </Text>\n {endIcon && (\n <IconSlot\n icon={endIcon}\n variant=\"fill\"\n dangerouslySetColor={dangerouslySetIconColor}\n style={badgeStyles.icon}\n />\n )}\n </HStack>\n );\n});\n\nBadge.displayName = 'Badge';\n\nexport { Badge, type BadgeProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,MAAM,QAAQ,KAAK,SAASA,QAAM,EAChC,UAAU,WACV,OAAO,MACP,UACA,WAAW,KACX,WACA,SACA,+BACA,qBACA,yBACA,2BACA,UACA,OACA,KACA,GAAG,QACU;AACb,aAAY,YAAY;EAAE;EAAM;EAAS,CAAC;AAG1C,QACE,qBAAC;EACM;EACL,YAAW;EACX,UAAS;EACT,WAAU;EACA;EACA;EACqB;EACJ;EAE3B,OAbe,cAAc,CAAC,YAAY,MAAM,MAAM,EAAE,CAAC,OAAO,YAAY,KAAK,CAAC;EAclF,GAAI;;GAEH,aACC,oBAAC;IACC,MAAM;IACN,SAAQ;IACR,qBAAqB;IACrB,OAAO,YAAY;KACnB;GAEJ,oBAAC;IACC,eAAe;IACf,YAAW;IACU;IACrB,OAAO,YAAY;IAElB;KACI;GACN,WACC,oBAAC;IACC,MAAM;IACN,SAAQ;IACR,qBAAqB;IACrB,OAAO,YAAY;KACnB;;GAEG;EAEX;AAEF,MAAM,cAAc"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
|
|
3
|
+
let react = require("react");
|
|
4
|
+
let react_native = require("react-native");
|
|
5
|
+
let generated_styles = require("../../generated/styles");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
|
|
8
|
+
//#region src/components/Box.tsx
|
|
9
|
+
/**
|
|
10
|
+
* **📦 A layout component that can be used to compose other components**
|
|
11
|
+
*
|
|
12
|
+
* @description
|
|
13
|
+
* The most simple component we ship - a div. But with all the power of the UDS design system.
|
|
14
|
+
* By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
|
|
15
|
+
* consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import { Box } from '@yahoo/uds';
|
|
20
|
+
*
|
|
21
|
+
* <Box backgroundColor="primary" spacing="6">
|
|
22
|
+
* Any kind of content can go here!
|
|
23
|
+
* </Box>
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* @usage
|
|
27
|
+
* - If you need to div-like container to apply padding, shapes, or other styling.
|
|
28
|
+
* - If you're creating card components.
|
|
29
|
+
*
|
|
30
|
+
* @see The {@link https://uds.build/docs/components/box Box Docs} for more info
|
|
31
|
+
*
|
|
32
|
+
* @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
|
|
33
|
+
*/
|
|
34
|
+
const Box = (0, react.memo)(function Box$1({ backgroundColor, dangerouslySetBackgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, dangerouslySetBorderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, display = "flex", overflow, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, width, height, minWidth, maxWidth, minHeight, maxHeight, style, ref, ...props }) {
|
|
35
|
+
const variants = {
|
|
36
|
+
backgroundColor,
|
|
37
|
+
borderRadius,
|
|
38
|
+
borderTopStartRadius,
|
|
39
|
+
borderTopEndRadius,
|
|
40
|
+
borderBottomStartRadius,
|
|
41
|
+
borderBottomEndRadius,
|
|
42
|
+
borderColor,
|
|
43
|
+
borderStartColor,
|
|
44
|
+
borderEndColor,
|
|
45
|
+
borderTopColor,
|
|
46
|
+
borderBottomColor,
|
|
47
|
+
borderWidth,
|
|
48
|
+
borderVerticalWidth,
|
|
49
|
+
borderHorizontalWidth,
|
|
50
|
+
borderStartWidth,
|
|
51
|
+
borderEndWidth,
|
|
52
|
+
borderTopWidth,
|
|
53
|
+
borderBottomWidth,
|
|
54
|
+
alignContent,
|
|
55
|
+
alignItems,
|
|
56
|
+
alignSelf,
|
|
57
|
+
flex,
|
|
58
|
+
flexDirection,
|
|
59
|
+
flexGrow,
|
|
60
|
+
flexShrink,
|
|
61
|
+
flexWrap,
|
|
62
|
+
justifyContent,
|
|
63
|
+
display,
|
|
64
|
+
overflow,
|
|
65
|
+
spacing,
|
|
66
|
+
spacingHorizontal,
|
|
67
|
+
spacingVertical,
|
|
68
|
+
spacingBottom,
|
|
69
|
+
spacingEnd,
|
|
70
|
+
spacingStart,
|
|
71
|
+
spacingTop,
|
|
72
|
+
offset,
|
|
73
|
+
offsetVertical,
|
|
74
|
+
offsetHorizontal,
|
|
75
|
+
offsetBottom,
|
|
76
|
+
offsetEnd,
|
|
77
|
+
offsetStart,
|
|
78
|
+
offsetTop,
|
|
79
|
+
columnGap,
|
|
80
|
+
rowGap
|
|
81
|
+
};
|
|
82
|
+
generated_styles.styles.useVariants(variants);
|
|
83
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_native.View, {
|
|
84
|
+
ref,
|
|
85
|
+
style: (0, react.useMemo)(() => [
|
|
86
|
+
dangerouslySetBackgroundColor ? { backgroundColor: dangerouslySetBackgroundColor } : void 0,
|
|
87
|
+
dangerouslySetBorderColor ? { borderColor: dangerouslySetBorderColor } : void 0,
|
|
88
|
+
width ? { width } : void 0,
|
|
89
|
+
height ? { height } : void 0,
|
|
90
|
+
minWidth ? { minWidth } : void 0,
|
|
91
|
+
maxWidth ? { maxWidth } : void 0,
|
|
92
|
+
minHeight ? { minHeight } : void 0,
|
|
93
|
+
maxHeight ? { maxHeight } : void 0,
|
|
94
|
+
generated_styles.styles.foundation,
|
|
95
|
+
style
|
|
96
|
+
], [
|
|
97
|
+
dangerouslySetBackgroundColor,
|
|
98
|
+
dangerouslySetBorderColor,
|
|
99
|
+
width,
|
|
100
|
+
height,
|
|
101
|
+
minWidth,
|
|
102
|
+
maxWidth,
|
|
103
|
+
minHeight,
|
|
104
|
+
maxHeight,
|
|
105
|
+
generated_styles.styles.foundation,
|
|
106
|
+
style
|
|
107
|
+
]),
|
|
108
|
+
...props
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
Box.displayName = "Box";
|
|
112
|
+
|
|
113
|
+
//#endregion
|
|
114
|
+
exports.Box = Box;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
|
|
2
|
+
import { SizeProps } from "../types.cjs";
|
|
3
|
+
import * as react17 from "react";
|
|
4
|
+
import { Ref } from "react";
|
|
5
|
+
import { View, ViewProps } from "react-native";
|
|
6
|
+
import { StyleProps } from "../../generated/styles";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Box.d.ts
|
|
9
|
+
interface BoxProps extends ViewProps, SizeProps {
|
|
10
|
+
ref?: Ref<View>;
|
|
11
|
+
backgroundColor?: StyleProps['backgroundColor'];
|
|
12
|
+
borderRadius?: StyleProps['borderRadius'];
|
|
13
|
+
borderTopStartRadius?: StyleProps['borderTopStartRadius'];
|
|
14
|
+
borderTopEndRadius?: StyleProps['borderTopEndRadius'];
|
|
15
|
+
borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];
|
|
16
|
+
borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];
|
|
17
|
+
borderColor?: StyleProps['borderColor'];
|
|
18
|
+
borderStartColor?: StyleProps['borderStartColor'];
|
|
19
|
+
borderEndColor?: StyleProps['borderEndColor'];
|
|
20
|
+
borderTopColor?: StyleProps['borderTopColor'];
|
|
21
|
+
borderBottomColor?: StyleProps['borderBottomColor'];
|
|
22
|
+
borderWidth?: StyleProps['borderWidth'];
|
|
23
|
+
borderVerticalWidth?: StyleProps['borderVerticalWidth'];
|
|
24
|
+
borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];
|
|
25
|
+
borderStartWidth?: StyleProps['borderStartWidth'];
|
|
26
|
+
borderEndWidth?: StyleProps['borderEndWidth'];
|
|
27
|
+
borderTopWidth?: StyleProps['borderTopWidth'];
|
|
28
|
+
borderBottomWidth?: StyleProps['borderBottomWidth'];
|
|
29
|
+
alignContent?: StyleProps['alignContent'];
|
|
30
|
+
alignItems?: StyleProps['alignItems'];
|
|
31
|
+
alignSelf?: StyleProps['alignSelf'];
|
|
32
|
+
flex?: StyleProps['flex'];
|
|
33
|
+
flexDirection?: StyleProps['flexDirection'];
|
|
34
|
+
flexGrow?: StyleProps['flexGrow'];
|
|
35
|
+
flexShrink?: StyleProps['flexShrink'];
|
|
36
|
+
flexWrap?: StyleProps['flexWrap'];
|
|
37
|
+
justifyContent?: StyleProps['justifyContent'];
|
|
38
|
+
display?: StyleProps['display'];
|
|
39
|
+
overflow?: StyleProps['overflow'];
|
|
40
|
+
spacing?: StyleProps['spacing'];
|
|
41
|
+
spacingHorizontal?: StyleProps['spacingHorizontal'];
|
|
42
|
+
spacingVertical?: StyleProps['spacingVertical'];
|
|
43
|
+
spacingBottom?: StyleProps['spacingBottom'];
|
|
44
|
+
spacingEnd?: StyleProps['spacingEnd'];
|
|
45
|
+
spacingStart?: StyleProps['spacingStart'];
|
|
46
|
+
spacingTop?: StyleProps['spacingTop'];
|
|
47
|
+
offset?: StyleProps['offset'];
|
|
48
|
+
offsetVertical?: StyleProps['offsetVertical'];
|
|
49
|
+
offsetHorizontal?: StyleProps['offsetHorizontal'];
|
|
50
|
+
offsetBottom?: StyleProps['offsetBottom'];
|
|
51
|
+
offsetEnd?: StyleProps['offsetEnd'];
|
|
52
|
+
offsetStart?: StyleProps['offsetStart'];
|
|
53
|
+
offsetTop?: StyleProps['offsetTop'];
|
|
54
|
+
columnGap?: StyleProps['columnGap'];
|
|
55
|
+
rowGap?: StyleProps['rowGap'];
|
|
56
|
+
dangerouslySetBackgroundColor?: string;
|
|
57
|
+
dangerouslySetBorderColor?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* **📦 A layout component that can be used to compose other components**
|
|
61
|
+
*
|
|
62
|
+
* @description
|
|
63
|
+
* The most simple component we ship - a div. But with all the power of the UDS design system.
|
|
64
|
+
* By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
|
|
65
|
+
* consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* import { Box } from '@yahoo/uds';
|
|
70
|
+
*
|
|
71
|
+
* <Box backgroundColor="primary" spacing="6">
|
|
72
|
+
* Any kind of content can go here!
|
|
73
|
+
* </Box>
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @usage
|
|
77
|
+
* - If you need to div-like container to apply padding, shapes, or other styling.
|
|
78
|
+
* - If you're creating card components.
|
|
79
|
+
*
|
|
80
|
+
* @see The {@link https://uds.build/docs/components/box Box Docs} for more info
|
|
81
|
+
*
|
|
82
|
+
* @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
|
|
83
|
+
*/
|
|
84
|
+
declare const Box: react17.NamedExoticComponent<BoxProps>;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { Box, type BoxProps };
|
|
87
|
+
//# sourceMappingURL=Box.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.d.cts","names":[],"sources":["../../src/components/Box.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UASU,QAAA,SAAiB,WAAW;QAC9B,IAAI;EADF,eAAS,CAAA,EAEC,UAFD,CAAA,iBAAA,CAAA;EACP,YAAA,CAAA,EAEK,UAFL,CAAA,cAAA,CAAA;EAAJ,oBAAA,CAAA,EAGiB,UAHjB,CAAA,sBAAA,CAAA;EACY,kBAAA,CAAA,EAGG,UAHH,CAAA,oBAAA,CAAA;EACH,uBAAA,CAAA,EAGW,UAHX,CAAA,yBAAA,CAAA;EACQ,qBAAA,CAAA,EAGC,UAHD,CAAA,uBAAA,CAAA;EACF,WAAA,CAAA,EAGP,UAHO,CAAA,aAAA,CAAA;EACK,gBAAA,CAAA,EAGP,UAHO,CAAA,kBAAA,CAAA;EACF,cAAA,CAAA,EAGP,UAHO,CAAA,gBAAA,CAAA;EACV,cAAA,CAAA,EAGG,UAHH,CAAA,gBAAA,CAAA;EACK,iBAAA,CAAA,EAGC,UAHD,CAAA,mBAAA,CAAA;EACF,WAAA,CAAA,EAGH,UAHG,CAAA,aAAA,CAAA;EACA,mBAAA,CAAA,EAGK,UAHL,CAAA,qBAAA,CAAA;EACG,qBAAA,CAAA,EAGI,UAHJ,CAAA,uBAAA,CAAA;EACN,gBAAA,CAAA,EAGK,UAHL,CAAA,kBAAA,CAAA;EACQ,cAAA,CAAA,EAGL,UAHK,CAAA,gBAAA,CAAA;EACE,cAAA,CAAA,EAGP,UAHO,CAAA,gBAAA,CAAA;EACL,iBAAA,CAAA,EAGC,UAHD,CAAA,mBAAA,CAAA;EACF,YAAA,CAAA,EAGF,UAHE,CAAA,cAAA,CAAA;EACA,UAAA,CAAA,EAGJ,UAHI,CAAA,YAAA,CAAA;EACG,SAAA,CAAA,EAGR,UAHQ,CAAA,WAAA,CAAA;EACL,IAAA,CAAA,EAGR,UAHQ,CAAA,MAAA,CAAA;EACF,aAAA,CAAA,EAGG,UAHH,CAAA,eAAA,CAAA;EACD,QAAA,CAAA,EAGD,UAHC,CAAA,UAAA,CAAA;EACL,UAAA,CAAA,EAGM,UAHN,CAAA,YAAA,CAAA;EACS,QAAA,CAAA,EAGL,UAHK,CAAA,UAAA,CAAA;EACL,cAAA,CAAA,EAGM,UAHN,CAAA,gBAAA,CAAA;EACE,OAAA,CAAA,EAIH,UAJG,CAAA,SAAA,CAAA;EACF,QAAA,CAAA,EAIA,UAJA,CAAA,UAAA,CAAA;EACM,OAAA,CAAA,EAOP,UAPO,CAAA,SAAA,CAAA;EAEP,iBAAA,CAAA,EAMU,UANV,CAAA,mBAAA,CAAA;EACC,eAAA,CAAA,EAMO,UANP,CAAA,iBAAA,CAAA;EAID,aAAA,CAAA,EAGM,UAHN,CAAA,eAAA,CAAA;EACU,UAAA,CAAA,EAGP,UAHO,CAAA,YAAA,CAAA;EACF,YAAA,CAAA,EAGH,UAHG,CAAA,cAAA,CAAA;EACF,UAAA,CAAA,EAGH,UAHG,CAAA,YAAA,CAAA;EACH,MAAA,CAAA,EAGJ,UAHI,CAAA,QAAA,CAAA;EACE,cAAA,CAAA,EAGE,UAHF,CAAA,gBAAA,CAAA;EACF,gBAAA,CAAA,EAGM,UAHN,CAAA,kBAAA,CAAA;EACJ,YAAA,CAAA,EAGM,UAHN,CAAA,cAAA,CAAA;EACQ,SAAA,CAAA,EAGL,UAHK,CAAA,WAAA,CAAA;EACE,WAAA,CAAA,EAGL,UAHK,CAAA,aAAA,CAAA;EACJ,SAAA,CAAA,EAGH,UAHG,CAAA,WAAA,CAAA;EACH,SAAA,CAAA,EAGA,UAHA,CAAA,WAAA,CAAA;EACE,MAAA,CAAA,EAGL,UAHK,CAAA,QAAA,CAAA;EACF,6BAAA,CAAA,EAAA,MAAA;EACA,yBAAA,CAAA,EAAA,MAAA;;;;;AAjDiC;;;;;;;;;;;;;;;;;;;;;;cAgFzC,KAAG,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
|
|
2
|
+
import { SizeProps } from "../types.mjs";
|
|
3
|
+
import * as react10 from "react";
|
|
4
|
+
import { Ref } from "react";
|
|
5
|
+
import { View, ViewProps } from "react-native";
|
|
6
|
+
import { StyleProps } from "../../generated/styles";
|
|
7
|
+
|
|
8
|
+
//#region src/components/Box.d.ts
|
|
9
|
+
interface BoxProps extends ViewProps, SizeProps {
|
|
10
|
+
ref?: Ref<View>;
|
|
11
|
+
backgroundColor?: StyleProps['backgroundColor'];
|
|
12
|
+
borderRadius?: StyleProps['borderRadius'];
|
|
13
|
+
borderTopStartRadius?: StyleProps['borderTopStartRadius'];
|
|
14
|
+
borderTopEndRadius?: StyleProps['borderTopEndRadius'];
|
|
15
|
+
borderBottomStartRadius?: StyleProps['borderBottomStartRadius'];
|
|
16
|
+
borderBottomEndRadius?: StyleProps['borderBottomEndRadius'];
|
|
17
|
+
borderColor?: StyleProps['borderColor'];
|
|
18
|
+
borderStartColor?: StyleProps['borderStartColor'];
|
|
19
|
+
borderEndColor?: StyleProps['borderEndColor'];
|
|
20
|
+
borderTopColor?: StyleProps['borderTopColor'];
|
|
21
|
+
borderBottomColor?: StyleProps['borderBottomColor'];
|
|
22
|
+
borderWidth?: StyleProps['borderWidth'];
|
|
23
|
+
borderVerticalWidth?: StyleProps['borderVerticalWidth'];
|
|
24
|
+
borderHorizontalWidth?: StyleProps['borderHorizontalWidth'];
|
|
25
|
+
borderStartWidth?: StyleProps['borderStartWidth'];
|
|
26
|
+
borderEndWidth?: StyleProps['borderEndWidth'];
|
|
27
|
+
borderTopWidth?: StyleProps['borderTopWidth'];
|
|
28
|
+
borderBottomWidth?: StyleProps['borderBottomWidth'];
|
|
29
|
+
alignContent?: StyleProps['alignContent'];
|
|
30
|
+
alignItems?: StyleProps['alignItems'];
|
|
31
|
+
alignSelf?: StyleProps['alignSelf'];
|
|
32
|
+
flex?: StyleProps['flex'];
|
|
33
|
+
flexDirection?: StyleProps['flexDirection'];
|
|
34
|
+
flexGrow?: StyleProps['flexGrow'];
|
|
35
|
+
flexShrink?: StyleProps['flexShrink'];
|
|
36
|
+
flexWrap?: StyleProps['flexWrap'];
|
|
37
|
+
justifyContent?: StyleProps['justifyContent'];
|
|
38
|
+
display?: StyleProps['display'];
|
|
39
|
+
overflow?: StyleProps['overflow'];
|
|
40
|
+
spacing?: StyleProps['spacing'];
|
|
41
|
+
spacingHorizontal?: StyleProps['spacingHorizontal'];
|
|
42
|
+
spacingVertical?: StyleProps['spacingVertical'];
|
|
43
|
+
spacingBottom?: StyleProps['spacingBottom'];
|
|
44
|
+
spacingEnd?: StyleProps['spacingEnd'];
|
|
45
|
+
spacingStart?: StyleProps['spacingStart'];
|
|
46
|
+
spacingTop?: StyleProps['spacingTop'];
|
|
47
|
+
offset?: StyleProps['offset'];
|
|
48
|
+
offsetVertical?: StyleProps['offsetVertical'];
|
|
49
|
+
offsetHorizontal?: StyleProps['offsetHorizontal'];
|
|
50
|
+
offsetBottom?: StyleProps['offsetBottom'];
|
|
51
|
+
offsetEnd?: StyleProps['offsetEnd'];
|
|
52
|
+
offsetStart?: StyleProps['offsetStart'];
|
|
53
|
+
offsetTop?: StyleProps['offsetTop'];
|
|
54
|
+
columnGap?: StyleProps['columnGap'];
|
|
55
|
+
rowGap?: StyleProps['rowGap'];
|
|
56
|
+
dangerouslySetBackgroundColor?: string;
|
|
57
|
+
dangerouslySetBorderColor?: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* **📦 A layout component that can be used to compose other components**
|
|
61
|
+
*
|
|
62
|
+
* @description
|
|
63
|
+
* The most simple component we ship - a div. But with all the power of the UDS design system.
|
|
64
|
+
* By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
|
|
65
|
+
* consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* ```tsx
|
|
69
|
+
* import { Box } from '@yahoo/uds';
|
|
70
|
+
*
|
|
71
|
+
* <Box backgroundColor="primary" spacing="6">
|
|
72
|
+
* Any kind of content can go here!
|
|
73
|
+
* </Box>
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @usage
|
|
77
|
+
* - If you need to div-like container to apply padding, shapes, or other styling.
|
|
78
|
+
* - If you're creating card components.
|
|
79
|
+
*
|
|
80
|
+
* @see The {@link https://uds.build/docs/components/box Box Docs} for more info
|
|
81
|
+
*
|
|
82
|
+
* @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
|
|
83
|
+
*/
|
|
84
|
+
declare const Box: react10.NamedExoticComponent<BoxProps>;
|
|
85
|
+
//#endregion
|
|
86
|
+
export { Box, type BoxProps };
|
|
87
|
+
//# sourceMappingURL=Box.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.d.mts","names":[],"sources":["../../src/components/Box.tsx"],"sourcesContent":[],"mappings":";;;;;;;;UASU,QAAA,SAAiB,WAAW;QAC9B,IAAI;EADF,eAAS,CAAA,EAEC,UAFD,CAAA,iBAAA,CAAA;EACP,YAAA,CAAA,EAEK,UAFL,CAAA,cAAA,CAAA;EAAJ,oBAAA,CAAA,EAGiB,UAHjB,CAAA,sBAAA,CAAA;EACY,kBAAA,CAAA,EAGG,UAHH,CAAA,oBAAA,CAAA;EACH,uBAAA,CAAA,EAGW,UAHX,CAAA,yBAAA,CAAA;EACQ,qBAAA,CAAA,EAGC,UAHD,CAAA,uBAAA,CAAA;EACF,WAAA,CAAA,EAGP,UAHO,CAAA,aAAA,CAAA;EACK,gBAAA,CAAA,EAGP,UAHO,CAAA,kBAAA,CAAA;EACF,cAAA,CAAA,EAGP,UAHO,CAAA,gBAAA,CAAA;EACV,cAAA,CAAA,EAGG,UAHH,CAAA,gBAAA,CAAA;EACK,iBAAA,CAAA,EAGC,UAHD,CAAA,mBAAA,CAAA;EACF,WAAA,CAAA,EAGH,UAHG,CAAA,aAAA,CAAA;EACA,mBAAA,CAAA,EAGK,UAHL,CAAA,qBAAA,CAAA;EACG,qBAAA,CAAA,EAGI,UAHJ,CAAA,uBAAA,CAAA;EACN,gBAAA,CAAA,EAGK,UAHL,CAAA,kBAAA,CAAA;EACQ,cAAA,CAAA,EAGL,UAHK,CAAA,gBAAA,CAAA;EACE,cAAA,CAAA,EAGP,UAHO,CAAA,gBAAA,CAAA;EACL,iBAAA,CAAA,EAGC,UAHD,CAAA,mBAAA,CAAA;EACF,YAAA,CAAA,EAGF,UAHE,CAAA,cAAA,CAAA;EACA,UAAA,CAAA,EAGJ,UAHI,CAAA,YAAA,CAAA;EACG,SAAA,CAAA,EAGR,UAHQ,CAAA,WAAA,CAAA;EACL,IAAA,CAAA,EAGR,UAHQ,CAAA,MAAA,CAAA;EACF,aAAA,CAAA,EAGG,UAHH,CAAA,eAAA,CAAA;EACD,QAAA,CAAA,EAGD,UAHC,CAAA,UAAA,CAAA;EACL,UAAA,CAAA,EAGM,UAHN,CAAA,YAAA,CAAA;EACS,QAAA,CAAA,EAGL,UAHK,CAAA,UAAA,CAAA;EACL,cAAA,CAAA,EAGM,UAHN,CAAA,gBAAA,CAAA;EACE,OAAA,CAAA,EAIH,UAJG,CAAA,SAAA,CAAA;EACF,QAAA,CAAA,EAIA,UAJA,CAAA,UAAA,CAAA;EACM,OAAA,CAAA,EAOP,UAPO,CAAA,SAAA,CAAA;EAEP,iBAAA,CAAA,EAMU,UANV,CAAA,mBAAA,CAAA;EACC,eAAA,CAAA,EAMO,UANP,CAAA,iBAAA,CAAA;EAID,aAAA,CAAA,EAGM,UAHN,CAAA,eAAA,CAAA;EACU,UAAA,CAAA,EAGP,UAHO,CAAA,YAAA,CAAA;EACF,YAAA,CAAA,EAGH,UAHG,CAAA,cAAA,CAAA;EACF,UAAA,CAAA,EAGH,UAHG,CAAA,YAAA,CAAA;EACH,MAAA,CAAA,EAGJ,UAHI,CAAA,QAAA,CAAA;EACE,cAAA,CAAA,EAGE,UAHF,CAAA,gBAAA,CAAA;EACF,gBAAA,CAAA,EAGM,UAHN,CAAA,kBAAA,CAAA;EACJ,YAAA,CAAA,EAGM,UAHN,CAAA,cAAA,CAAA;EACQ,SAAA,CAAA,EAGL,UAHK,CAAA,WAAA,CAAA;EACE,WAAA,CAAA,EAGL,UAHK,CAAA,aAAA,CAAA;EACJ,SAAA,CAAA,EAGH,UAHG,CAAA,WAAA,CAAA;EACH,SAAA,CAAA,EAGA,UAHA,CAAA,WAAA,CAAA;EACE,MAAA,CAAA,EAGL,UAHK,CAAA,QAAA,CAAA;EACF,6BAAA,CAAA,EAAA,MAAA;EACA,yBAAA,CAAA,EAAA,MAAA;;;;;AAjDiC;;;;;;;;;;;;;;;;;;;;;;cAgFzC,KAAG,OAAA,CAAA,qBAAA"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/*! © 2026 Yahoo, Inc. UDS Mobile v0.0.0-development */
|
|
2
|
+
import { memo, useMemo } from "react";
|
|
3
|
+
import { View } from "react-native";
|
|
4
|
+
import { styles } from "../../generated/styles";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/components/Box.tsx
|
|
8
|
+
/**
|
|
9
|
+
* **📦 A layout component that can be used to compose other components**
|
|
10
|
+
*
|
|
11
|
+
* @description
|
|
12
|
+
* The most simple component we ship - a div. But with all the power of the UDS design system.
|
|
13
|
+
* By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,
|
|
14
|
+
* consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { Box } from '@yahoo/uds';
|
|
19
|
+
*
|
|
20
|
+
* <Box backgroundColor="primary" spacing="6">
|
|
21
|
+
* Any kind of content can go here!
|
|
22
|
+
* </Box>
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @usage
|
|
26
|
+
* - If you need to div-like container to apply padding, shapes, or other styling.
|
|
27
|
+
* - If you're creating card components.
|
|
28
|
+
*
|
|
29
|
+
* @see The {@link https://uds.build/docs/components/box Box Docs} for more info
|
|
30
|
+
*
|
|
31
|
+
* @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)
|
|
32
|
+
*/
|
|
33
|
+
const Box = memo(function Box$1({ backgroundColor, dangerouslySetBackgroundColor, borderRadius, borderTopStartRadius, borderTopEndRadius, borderBottomStartRadius, borderBottomEndRadius, borderColor, dangerouslySetBorderColor, borderStartColor, borderEndColor, borderTopColor, borderBottomColor, borderWidth, borderVerticalWidth, borderHorizontalWidth, borderStartWidth, borderEndWidth, borderTopWidth, borderBottomWidth, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, flexWrap, justifyContent, display = "flex", overflow, spacing, spacingHorizontal, spacingVertical, spacingBottom, spacingEnd, spacingStart, spacingTop, offset, offsetVertical, offsetHorizontal, offsetBottom, offsetEnd, offsetStart, offsetTop, columnGap, rowGap, width, height, minWidth, maxWidth, minHeight, maxHeight, style, ref, ...props }) {
|
|
34
|
+
const variants = {
|
|
35
|
+
backgroundColor,
|
|
36
|
+
borderRadius,
|
|
37
|
+
borderTopStartRadius,
|
|
38
|
+
borderTopEndRadius,
|
|
39
|
+
borderBottomStartRadius,
|
|
40
|
+
borderBottomEndRadius,
|
|
41
|
+
borderColor,
|
|
42
|
+
borderStartColor,
|
|
43
|
+
borderEndColor,
|
|
44
|
+
borderTopColor,
|
|
45
|
+
borderBottomColor,
|
|
46
|
+
borderWidth,
|
|
47
|
+
borderVerticalWidth,
|
|
48
|
+
borderHorizontalWidth,
|
|
49
|
+
borderStartWidth,
|
|
50
|
+
borderEndWidth,
|
|
51
|
+
borderTopWidth,
|
|
52
|
+
borderBottomWidth,
|
|
53
|
+
alignContent,
|
|
54
|
+
alignItems,
|
|
55
|
+
alignSelf,
|
|
56
|
+
flex,
|
|
57
|
+
flexDirection,
|
|
58
|
+
flexGrow,
|
|
59
|
+
flexShrink,
|
|
60
|
+
flexWrap,
|
|
61
|
+
justifyContent,
|
|
62
|
+
display,
|
|
63
|
+
overflow,
|
|
64
|
+
spacing,
|
|
65
|
+
spacingHorizontal,
|
|
66
|
+
spacingVertical,
|
|
67
|
+
spacingBottom,
|
|
68
|
+
spacingEnd,
|
|
69
|
+
spacingStart,
|
|
70
|
+
spacingTop,
|
|
71
|
+
offset,
|
|
72
|
+
offsetVertical,
|
|
73
|
+
offsetHorizontal,
|
|
74
|
+
offsetBottom,
|
|
75
|
+
offsetEnd,
|
|
76
|
+
offsetStart,
|
|
77
|
+
offsetTop,
|
|
78
|
+
columnGap,
|
|
79
|
+
rowGap
|
|
80
|
+
};
|
|
81
|
+
styles.useVariants(variants);
|
|
82
|
+
return /* @__PURE__ */ jsx(View, {
|
|
83
|
+
ref,
|
|
84
|
+
style: useMemo(() => [
|
|
85
|
+
dangerouslySetBackgroundColor ? { backgroundColor: dangerouslySetBackgroundColor } : void 0,
|
|
86
|
+
dangerouslySetBorderColor ? { borderColor: dangerouslySetBorderColor } : void 0,
|
|
87
|
+
width ? { width } : void 0,
|
|
88
|
+
height ? { height } : void 0,
|
|
89
|
+
minWidth ? { minWidth } : void 0,
|
|
90
|
+
maxWidth ? { maxWidth } : void 0,
|
|
91
|
+
minHeight ? { minHeight } : void 0,
|
|
92
|
+
maxHeight ? { maxHeight } : void 0,
|
|
93
|
+
styles.foundation,
|
|
94
|
+
style
|
|
95
|
+
], [
|
|
96
|
+
dangerouslySetBackgroundColor,
|
|
97
|
+
dangerouslySetBorderColor,
|
|
98
|
+
width,
|
|
99
|
+
height,
|
|
100
|
+
minWidth,
|
|
101
|
+
maxWidth,
|
|
102
|
+
minHeight,
|
|
103
|
+
maxHeight,
|
|
104
|
+
styles.foundation,
|
|
105
|
+
style
|
|
106
|
+
]),
|
|
107
|
+
...props
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
Box.displayName = "Box";
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
export { Box };
|
|
114
|
+
//# sourceMappingURL=Box.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Box.mjs","names":["Box"],"sources":["../../src/components/Box.tsx"],"sourcesContent":["import type { Ref } from 'react';\nimport { memo, useMemo } from 'react';\nimport type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\n\nimport type { StyleProps } from '../../generated/styles';\nimport { styles } from '../../generated/styles';\nimport type { SizeProps } from '../types';\n\ninterface BoxProps extends ViewProps, SizeProps {\n ref?: Ref<View>;\n backgroundColor?: StyleProps['backgroundColor'];\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 alignContent?: StyleProps['alignContent'];\n alignItems?: StyleProps['alignItems'];\n alignSelf?: StyleProps['alignSelf'];\n flex?: StyleProps['flex'];\n flexDirection?: StyleProps['flexDirection'];\n flexGrow?: StyleProps['flexGrow'];\n flexShrink?: StyleProps['flexShrink'];\n flexWrap?: StyleProps['flexWrap'];\n justifyContent?: StyleProps['justifyContent'];\n // flexBasis?: StyleProps['flexBasis'];\n display?: StyleProps['display'];\n overflow?: StyleProps['overflow'];\n // overflowX?: StyleProps['overflowX'];\n // overflowY?: StyleProps['overflowY'];\n // position?: StyleProps['position'];\n spacing?: StyleProps['spacing'];\n spacingHorizontal?: StyleProps['spacingHorizontal'];\n spacingVertical?: StyleProps['spacingVertical'];\n spacingBottom?: StyleProps['spacingBottom'];\n spacingEnd?: StyleProps['spacingEnd'];\n spacingStart?: StyleProps['spacingStart'];\n spacingTop?: StyleProps['spacingTop'];\n offset?: StyleProps['offset'];\n offsetVertical?: StyleProps['offsetVertical'];\n offsetHorizontal?: StyleProps['offsetHorizontal'];\n offsetBottom?: StyleProps['offsetBottom'];\n offsetEnd?: StyleProps['offsetEnd'];\n offsetStart?: StyleProps['offsetStart'];\n offsetTop?: StyleProps['offsetTop'];\n columnGap?: StyleProps['columnGap'];\n rowGap?: StyleProps['rowGap'];\n dangerouslySetBackgroundColor?: string;\n dangerouslySetBorderColor?: string;\n}\n\n/**\n * **📦 A layout component that can be used to compose other components**\n *\n * @description\n * The most simple component we ship - a div. But with all the power of the UDS design system.\n * By default, `Box` is a flexbox container. When working with vertical or horizontal layouts,\n * consider using [VStack](./v-stack) or [HStack](./h-stack) respectively.\n *\n * @example\n * ```tsx\n * import { Box } from '@yahoo/uds';\n *\n * <Box backgroundColor=\"primary\" spacing=\"6\">\n * Any kind of content can go here!\n * </Box>\n * ```\n *\n * @usage\n * - If you need to div-like container to apply padding, shapes, or other styling.\n * - If you're creating card components.\n *\n * @see The {@link https://uds.build/docs/components/box Box Docs} for more info\n *\n * @related [HStack](https://uds.build/docs/components/h-stack), [VStack](https://uds.build/docs/components/v-stack)\n */\nconst Box = memo(function Box({\n // background\n backgroundColor,\n dangerouslySetBackgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n borderColor,\n dangerouslySetBorderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // flexBasis,\n // layout\n display = 'flex',\n overflow,\n // overflowX,\n // overflowY,\n // position,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n // size\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n // // shadow\n // dropShadow,\n // insetShadow,\n // // nested border radius\n // nestedBorderRadius,\n // nestedBorderRadiusSize = nestedBorderRadius ? borderRadius : undefined,\n // nestedBorderRadiusSpacing = nestedBorderRadius ? spacing : undefined,\n // nestedBorderRadiusWidth = nestedBorderRadius ? borderWidth : undefined,\n // style - extracted to merge with variants\n style,\n ref,\n // rest\n ...props\n}: BoxProps) {\n const variants = {\n // background\n backgroundColor,\n // border\n borderRadius,\n borderTopStartRadius,\n borderTopEndRadius,\n borderBottomStartRadius,\n borderBottomEndRadius,\n // nestedBorderRadius,\n // nestedBorderRadiusSize,\n // nestedBorderRadiusSpacing,\n // nestedBorderRadiusWidth,\n borderColor,\n borderStartColor,\n borderEndColor,\n borderTopColor,\n borderBottomColor,\n borderWidth,\n borderVerticalWidth,\n borderHorizontalWidth,\n borderStartWidth,\n borderEndWidth,\n borderTopWidth,\n borderBottomWidth,\n // flex\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n flexWrap,\n justifyContent,\n // flexBasis,\n // layout\n display,\n overflow,\n // overflowX,\n // overflowY,\n // position,\n // spacing\n spacing,\n spacingHorizontal,\n spacingVertical,\n spacingBottom,\n spacingEnd,\n spacingStart,\n spacingTop,\n offset,\n offsetVertical,\n offsetHorizontal,\n offsetBottom,\n offsetEnd,\n offsetStart,\n offsetTop,\n columnGap,\n rowGap,\n // rest\n };\n\n styles.useVariants(variants);\n\n // styles.foundation must be in deps - it returns a new reference when variants change\n const boxStyles = useMemo(\n () => [\n dangerouslySetBackgroundColor\n ? { backgroundColor: dangerouslySetBackgroundColor }\n : undefined,\n dangerouslySetBorderColor ? { borderColor: dangerouslySetBorderColor } : undefined,\n width ? { width } : undefined,\n height ? { height } : undefined,\n minWidth ? { minWidth } : undefined,\n maxWidth ? { maxWidth } : undefined,\n minHeight ? { minHeight } : undefined,\n maxHeight ? { maxHeight } : undefined,\n styles.foundation,\n style,\n ],\n [\n dangerouslySetBackgroundColor,\n dangerouslySetBorderColor,\n width,\n height,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n styles.foundation,\n style,\n ],\n );\n\n // Merge variant styles with user-provided style prop\n // User styles come last so they can override variant styles if needed\n return <View ref={ref} style={boxStyles} {...props} />;\n});\n\nBox.displayName = 'Box';\n\nexport { Box, type BoxProps };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA,MAAM,MAAM,KAAK,SAASA,MAAI,EAE5B,iBACA,+BAEA,cACA,sBACA,oBACA,yBACA,uBACA,aACA,2BACA,kBACA,gBACA,gBACA,mBACA,aACA,qBACA,uBACA,kBACA,gBACA,gBACA,mBAEA,cACA,YACA,WACA,MACA,eACA,UACA,YACA,UACA,gBAGA,UAAU,QACV,UAKA,SACA,mBACA,iBACA,eACA,YACA,cACA,YACA,QACA,gBACA,kBACA,cACA,WACA,aACA,WACA,WACA,QAEA,OACA,QACA,UACA,UACA,WACA,WAUA,OACA,KAEA,GAAG,SACQ;CACX,MAAM,WAAW;EAEf;EAEA;EACA;EACA;EACA;EACA;EAKA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EAKA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAED;AAED,QAAO,YAAY,SAAS;AAkC5B,QAAO,oBAAC;EAAU;EAAK,OA/BL,cACV;GACJ,gCACI,EAAE,iBAAiB,+BAA+B,GAClD;GACJ,4BAA4B,EAAE,aAAa,2BAA2B,GAAG;GACzE,QAAQ,EAAE,OAAO,GAAG;GACpB,SAAS,EAAE,QAAQ,GAAG;GACtB,WAAW,EAAE,UAAU,GAAG;GAC1B,WAAW,EAAE,UAAU,GAAG;GAC1B,YAAY,EAAE,WAAW,GAAG;GAC5B,YAAY,EAAE,WAAW,GAAG;GAC5B,OAAO;GACP;GACD,EACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA,OAAO;GACP;GACD,CACF;EAIwC,GAAI;GAAS;EACtD;AAEF,IAAI,cAAc"}
|