@metamask-previews/design-system-react-native 0.0.0-preview.6fee845 → 0.0.0-preview.8561168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.ts +3 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.ts.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.js +12 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.js.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.d.ts +5 -0
- package/dist/components/AvatarAccount/AvatarAccount.d.ts.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.js +29 -0
- package/dist/components/AvatarAccount/AvatarAccount.js.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.types.d.ts +20 -0
- package/dist/components/AvatarAccount/AvatarAccount.types.d.ts.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.types.js +9 -0
- package/dist/components/AvatarAccount/AvatarAccount.types.js.map +1 -0
- package/dist/components/AvatarAccount/index.d.ts +5 -0
- package/dist/components/AvatarAccount/index.d.ts.map +1 -0
- package/dist/components/AvatarAccount/index.js +13 -0
- package/dist/components/AvatarAccount/index.js.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.constants.d.ts +3 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.constants.d.ts.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.constants.js +12 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.constants.js.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.d.ts +5 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.d.ts.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.js +53 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.js.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.types.d.ts +12 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.types.d.ts.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.types.js +3 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.types.js.map +1 -0
- package/dist/components/AvatarFavicon/index.d.ts +4 -0
- package/dist/components/AvatarFavicon/index.d.ts.map +1 -0
- package/dist/components/AvatarFavicon/index.js +11 -0
- package/dist/components/AvatarFavicon/index.js.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.ts +9 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.ts.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.js +35 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.js.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.d.ts +5 -0
- package/dist/components/AvatarIcon/AvatarIcon.d.ts.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.js +49 -0
- package/dist/components/AvatarIcon/AvatarIcon.js.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.types.d.ts +28 -0
- package/dist/components/AvatarIcon/AvatarIcon.types.d.ts.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.types.js +12 -0
- package/dist/components/AvatarIcon/AvatarIcon.types.js.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.utilities.d.ts +24 -0
- package/dist/components/AvatarIcon/AvatarIcon.utilities.d.ts.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.utilities.js +30 -0
- package/dist/components/AvatarIcon/AvatarIcon.utilities.js.map +1 -0
- package/dist/components/AvatarIcon/index.d.ts +5 -0
- package/dist/components/AvatarIcon/index.d.ts.map +1 -0
- package/dist/components/AvatarIcon/index.js +13 -0
- package/dist/components/AvatarIcon/index.js.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.constants.d.ts +3 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.constants.d.ts.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.constants.js +12 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.constants.js.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.d.ts +5 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.d.ts.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.js +53 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.js.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.ts +12 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.ts.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.js +3 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.js.map +1 -0
- package/dist/components/AvatarNetwork/index.d.ts +4 -0
- package/dist/components/AvatarNetwork/index.d.ts.map +1 -0
- package/dist/components/AvatarNetwork/index.js +11 -0
- package/dist/components/AvatarNetwork/index.js.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.constants.d.ts +3 -0
- package/dist/components/AvatarToken/AvatarToken.constants.d.ts.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.constants.js +12 -0
- package/dist/components/AvatarToken/AvatarToken.constants.js.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.d.ts +5 -0
- package/dist/components/AvatarToken/AvatarToken.d.ts.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.js +53 -0
- package/dist/components/AvatarToken/AvatarToken.js.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.types.d.ts +12 -0
- package/dist/components/AvatarToken/AvatarToken.types.d.ts.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.types.js +3 -0
- package/dist/components/AvatarToken/AvatarToken.types.js.map +1 -0
- package/dist/components/AvatarToken/index.d.ts +4 -0
- package/dist/components/AvatarToken/index.d.ts.map +1 -0
- package/dist/components/AvatarToken/index.js +11 -0
- package/dist/components/AvatarToken/index.js.map +1 -0
- package/dist/components/Button/Button.constants.d.ts +2 -0
- package/dist/components/Button/Button.constants.d.ts.map +1 -0
- package/dist/components/Button/Button.constants.js +7 -0
- package/dist/components/Button/Button.constants.js.map +1 -0
- package/dist/components/Button/Button.d.ts +5 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.js +25 -0
- package/dist/components/Button/Button.js.map +1 -0
- package/dist/components/Button/Button.types.d.ts +23 -0
- package/dist/components/Button/Button.types.d.ts.map +1 -0
- package/dist/components/Button/Button.types.js +15 -0
- package/dist/components/Button/Button.types.js.map +1 -0
- package/dist/components/Button/index.d.ts +4 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Button/index.js +12 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.constants.d.ts +3 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.constants.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.constants.js +29 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.constants.js.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.ts +5 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.js +97 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.js.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.types.d.ts +17 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.types.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.types.js +3 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.types.js.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.utilities.d.ts +78 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.utilities.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.utilities.js +122 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.utilities.js.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/index.d.ts +4 -0
- package/dist/components/Button/variants/ButtonPrimary/index.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/index.js +11 -0
- package/dist/components/Button/variants/ButtonPrimary/index.js.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.constants.d.ts +3 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.constants.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.constants.js +29 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.constants.js.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.ts +5 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.js +90 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.js.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.types.d.ts +17 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.types.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.types.js +3 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.types.js.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.utilities.d.ts +90 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.utilities.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.utilities.js +145 -0
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.utilities.js.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/index.d.ts +4 -0
- package/dist/components/Button/variants/ButtonSecondary/index.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonSecondary/index.js +11 -0
- package/dist/components/Button/variants/ButtonSecondary/index.js.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.constants.d.ts +3 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.constants.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.constants.js +29 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.constants.js.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.ts +5 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.js +90 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.js.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.types.d.ts +17 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.types.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.types.js +3 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.types.js.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.utilities.d.ts +88 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.utilities.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.utilities.js +147 -0
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.utilities.js.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/index.d.ts +4 -0
- package/dist/components/Button/variants/ButtonTertiary/index.d.ts.map +1 -0
- package/dist/components/Button/variants/ButtonTertiary/index.js +11 -0
- package/dist/components/Button/variants/ButtonTertiary/index.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.constants.d.ts +6 -0
- package/dist/components/ButtonIcon/ButtonIcon.constants.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.constants.js +20 -0
- package/dist/components/ButtonIcon/ButtonIcon.constants.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.d.ts +5 -0
- package/dist/components/ButtonIcon/ButtonIcon.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.js +72 -0
- package/dist/components/ButtonIcon/ButtonIcon.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.types.d.ts +60 -0
- package/dist/components/ButtonIcon/ButtonIcon.types.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.types.js +19 -0
- package/dist/components/ButtonIcon/ButtonIcon.types.js.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.utilities.d.ts +55 -0
- package/dist/components/ButtonIcon/ButtonIcon.utilities.d.ts.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.utilities.js +73 -0
- package/dist/components/ButtonIcon/ButtonIcon.utilities.js.map +1 -0
- package/dist/components/ButtonIcon/index.d.ts +4 -0
- package/dist/components/ButtonIcon/index.d.ts.map +1 -0
- package/dist/components/ButtonIcon/index.js +11 -0
- package/dist/components/ButtonIcon/index.js.map +1 -0
- package/dist/components/Icon/Icon.assets.d.ts +6 -0
- package/dist/components/Icon/Icon.assets.d.ts.map +1 -0
- package/dist/components/Icon/Icon.assets.js +324 -0
- package/dist/components/Icon/Icon.assets.js.map +1 -0
- package/dist/components/Icon/Icon.constants.d.ts +7 -0
- package/dist/components/Icon/Icon.constants.d.ts.map +1 -0
- package/dist/components/Icon/Icon.constants.js +15 -0
- package/dist/components/Icon/Icon.constants.js.map +1 -0
- package/dist/components/Icon/Icon.d.ts +5 -0
- package/dist/components/Icon/Icon.d.ts.map +1 -0
- package/dist/components/Icon/Icon.js +45 -0
- package/dist/components/Icon/Icon.js.map +1 -0
- package/dist/components/Icon/Icon.types.d.ts +254 -0
- package/dist/components/Icon/Icon.types.d.ts.map +1 -0
- package/dist/components/Icon/Icon.types.js +229 -0
- package/dist/components/Icon/Icon.types.js.map +1 -0
- package/dist/components/Icon/Icon.utilities.d.ts +22 -0
- package/dist/components/Icon/Icon.utilities.d.ts.map +1 -0
- package/dist/components/Icon/Icon.utilities.js +31 -0
- package/dist/components/Icon/Icon.utilities.js.map +1 -0
- package/dist/components/Icon/index.d.ts +4 -0
- package/dist/components/Icon/index.d.ts.map +1 -0
- package/dist/components/Icon/index.js +13 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/Text/Text.constants.d.ts +9 -0
- package/dist/components/Text/Text.constants.d.ts.map +1 -0
- package/dist/components/Text/Text.constants.js +21 -0
- package/dist/components/Text/Text.constants.js.map +1 -0
- package/dist/components/Text/Text.d.ts +5 -0
- package/dist/components/Text/Text.d.ts.map +1 -0
- package/dist/components/Text/Text.js +26 -0
- package/dist/components/Text/Text.js.map +1 -0
- package/dist/components/Text/Text.types.d.ts +110 -0
- package/dist/components/Text/Text.types.d.ts.map +1 -0
- package/dist/components/Text/Text.types.js +89 -0
- package/dist/components/Text/Text.types.js.map +1 -0
- package/dist/components/Text/Text.utilities.d.ts +30 -0
- package/dist/components/Text/Text.utilities.d.ts.map +1 -0
- package/dist/components/Text/Text.utilities.js +45 -0
- package/dist/components/Text/Text.utilities.js.map +1 -0
- package/dist/components/Text/index.d.ts +4 -0
- package/dist/components/Text/index.d.ts.map +1 -0
- package/dist/components/Text/index.js +14 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/TextButton/TextButton.constants.d.ts +3 -0
- package/dist/components/TextButton/TextButton.constants.d.ts.map +1 -0
- package/dist/components/TextButton/TextButton.constants.js +29 -0
- package/dist/components/TextButton/TextButton.constants.js.map +1 -0
- package/dist/components/TextButton/TextButton.d.ts +5 -0
- package/dist/components/TextButton/TextButton.d.ts.map +1 -0
- package/dist/components/TextButton/TextButton.js +187 -0
- package/dist/components/TextButton/TextButton.js.map +1 -0
- package/dist/components/TextButton/TextButton.types.d.ts +73 -0
- package/dist/components/TextButton/TextButton.types.d.ts.map +1 -0
- package/dist/components/TextButton/TextButton.types.js +3 -0
- package/dist/components/TextButton/TextButton.types.js.map +1 -0
- package/dist/components/TextButton/TextButton.utilities.d.ts +55 -0
- package/dist/components/TextButton/TextButton.utilities.d.ts.map +1 -0
- package/dist/components/TextButton/TextButton.utilities.js +77 -0
- package/dist/components/TextButton/TextButton.utilities.js.map +1 -0
- package/dist/components/TextButton/index.d.ts +3 -0
- package/dist/components/TextButton/index.d.ts.map +1 -0
- package/dist/components/TextButton/index.js +9 -0
- package/dist/components/TextButton/index.js.map +1 -0
- package/dist/index.d.ts +108 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +70 -1
- package/dist/index.js.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.constants.d.ts +5 -0
- package/dist/primitives/AvatarBase/AvatarBase.constants.d.ts.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.constants.js +25 -0
- package/dist/primitives/AvatarBase/AvatarBase.constants.js.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.d.ts +5 -0
- package/dist/primitives/AvatarBase/AvatarBase.d.ts.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.js +52 -0
- package/dist/primitives/AvatarBase/AvatarBase.js.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.types.d.ts +49 -0
- package/dist/primitives/AvatarBase/AvatarBase.types.d.ts.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.types.js +3 -0
- package/dist/primitives/AvatarBase/AvatarBase.types.js.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.utilities.d.ts +26 -0
- package/dist/primitives/AvatarBase/AvatarBase.utilities.d.ts.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.utilities.js +43 -0
- package/dist/primitives/AvatarBase/AvatarBase.utilities.js.map +1 -0
- package/dist/primitives/AvatarBase/index.d.ts +4 -0
- package/dist/primitives/AvatarBase/index.d.ts.map +1 -0
- package/dist/primitives/AvatarBase/index.js +11 -0
- package/dist/primitives/AvatarBase/index.js.map +1 -0
- package/dist/primitives/Blockies/Blockies.d.ts +5 -0
- package/dist/primitives/Blockies/Blockies.d.ts.map +1 -0
- package/dist/primitives/Blockies/Blockies.js +15 -0
- package/dist/primitives/Blockies/Blockies.js.map +1 -0
- package/dist/primitives/Blockies/Blockies.types.d.ts +15 -0
- package/dist/primitives/Blockies/Blockies.types.d.ts.map +1 -0
- package/dist/primitives/Blockies/Blockies.types.js +3 -0
- package/dist/primitives/Blockies/Blockies.types.js.map +1 -0
- package/dist/primitives/Blockies/index.d.ts +3 -0
- package/dist/primitives/Blockies/index.d.ts.map +1 -0
- package/dist/primitives/Blockies/index.js +9 -0
- package/dist/primitives/Blockies/index.js.map +1 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.d.ts +5 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.d.ts.map +1 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.js +58 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.js.map +1 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.types.d.ts +6 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.types.d.ts.map +1 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.types.js +3 -0
- package/dist/primitives/ButtonAnimated/ButtonAnimated.types.js.map +1 -0
- package/dist/primitives/ButtonAnimated/index.d.ts +3 -0
- package/dist/primitives/ButtonAnimated/index.d.ts.map +1 -0
- package/dist/primitives/ButtonAnimated/index.js +9 -0
- package/dist/primitives/ButtonAnimated/index.js.map +1 -0
- package/dist/primitives/ButtonBase/ButtonBase.constants.d.ts +3 -0
- package/dist/primitives/ButtonBase/ButtonBase.constants.d.ts.map +1 -0
- package/dist/primitives/ButtonBase/ButtonBase.constants.js +32 -0
- package/dist/primitives/ButtonBase/ButtonBase.constants.js.map +1 -0
- package/dist/primitives/ButtonBase/ButtonBase.d.ts +5 -0
- package/dist/primitives/ButtonBase/ButtonBase.d.ts.map +1 -0
- package/dist/primitives/ButtonBase/ButtonBase.js +84 -0
- package/dist/primitives/ButtonBase/ButtonBase.js.map +1 -0
- package/dist/primitives/ButtonBase/ButtonBase.types.d.ts +93 -0
- package/dist/primitives/ButtonBase/ButtonBase.types.d.ts.map +1 -0
- package/dist/primitives/ButtonBase/ButtonBase.types.js +19 -0
- package/dist/primitives/ButtonBase/ButtonBase.types.js.map +1 -0
- package/dist/primitives/ButtonBase/ButtonBase.utilities.d.ts +28 -0
- package/dist/primitives/ButtonBase/ButtonBase.utilities.d.ts.map +1 -0
- package/dist/primitives/ButtonBase/ButtonBase.utilities.js +41 -0
- package/dist/primitives/ButtonBase/ButtonBase.utilities.js.map +1 -0
- package/dist/primitives/ButtonBase/index.d.ts +4 -0
- package/dist/primitives/ButtonBase/index.d.ts.map +1 -0
- package/dist/primitives/ButtonBase/index.js +11 -0
- package/dist/primitives/ButtonBase/index.js.map +1 -0
- package/dist/primitives/ImageOrSvg/ImageOrSvg.d.ts +5 -0
- package/dist/primitives/ImageOrSvg/ImageOrSvg.d.ts.map +1 -0
- package/dist/primitives/ImageOrSvg/ImageOrSvg.js +76 -0
- package/dist/primitives/ImageOrSvg/ImageOrSvg.js.map +1 -0
- package/dist/primitives/ImageOrSvg/ImageOrSvg.types.d.ts +64 -0
- package/dist/primitives/ImageOrSvg/ImageOrSvg.types.d.ts.map +1 -0
- package/dist/primitives/ImageOrSvg/ImageOrSvg.types.js +3 -0
- package/dist/primitives/ImageOrSvg/ImageOrSvg.types.js.map +1 -0
- package/dist/primitives/ImageOrSvg/index.d.ts +3 -0
- package/dist/primitives/ImageOrSvg/index.d.ts.map +1 -0
- package/dist/primitives/ImageOrSvg/index.js +9 -0
- package/dist/primitives/ImageOrSvg/index.js.map +1 -0
- package/dist/primitives/Jazzicon/Jazzicon.d.ts +5 -0
- package/dist/primitives/Jazzicon/Jazzicon.d.ts.map +1 -0
- package/dist/primitives/Jazzicon/Jazzicon.js +14 -0
- package/dist/primitives/Jazzicon/Jazzicon.js.map +1 -0
- package/dist/primitives/Jazzicon/Jazzicon.types.d.ts +11 -0
- package/dist/primitives/Jazzicon/Jazzicon.types.d.ts.map +1 -0
- package/dist/primitives/Jazzicon/Jazzicon.types.js +3 -0
- package/dist/primitives/Jazzicon/Jazzicon.types.js.map +1 -0
- package/dist/primitives/Jazzicon/index.d.ts +3 -0
- package/dist/primitives/Jazzicon/index.d.ts.map +1 -0
- package/dist/primitives/Jazzicon/index.js +9 -0
- package/dist/primitives/Jazzicon/index.js.map +1 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.d.ts +5 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.d.ts.map +1 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.js +15 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.js.map +1 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.types.d.ts +15 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.types.d.ts.map +1 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.types.js +3 -0
- package/dist/primitives/TextOrChildren/TextOrChildren.types.js.map +1 -0
- package/dist/primitives/TextOrChildren/index.d.ts +3 -0
- package/dist/primitives/TextOrChildren/index.d.ts.map +1 -0
- package/dist/primitives/TextOrChildren/index.js +9 -0
- package/dist/primitives/TextOrChildren/index.js.map +1 -0
- package/dist/shared/enums.d.ts +46 -0
- package/dist/shared/enums.d.ts.map +1 -0
- package/dist/shared/enums.js +44 -0
- package/dist/shared/enums.js.map +1 -0
- package/dist/temp-components/Spinner/Spinner.constants.d.ts +3 -0
- package/dist/temp-components/Spinner/Spinner.constants.d.ts.map +1 -0
- package/dist/temp-components/Spinner/Spinner.constants.js +21 -0
- package/dist/temp-components/Spinner/Spinner.constants.js.map +1 -0
- package/dist/temp-components/Spinner/Spinner.d.ts +5 -0
- package/dist/temp-components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/temp-components/Spinner/Spinner.js +68 -0
- package/dist/temp-components/Spinner/Spinner.js.map +1 -0
- package/dist/temp-components/Spinner/Spinner.types.d.ts +30 -0
- package/dist/temp-components/Spinner/Spinner.types.d.ts.map +1 -0
- package/dist/temp-components/Spinner/Spinner.types.js +3 -0
- package/dist/temp-components/Spinner/Spinner.types.js.map +1 -0
- package/dist/temp-components/Spinner/index.d.ts +3 -0
- package/dist/temp-components/Spinner/index.d.ts.map +1 -0
- package/dist/temp-components/Spinner/index.js +9 -0
- package/dist/temp-components/Spinner/index.js.map +1 -0
- package/package.json +29 -14
- package/dist/components/Button.d.ts +0 -6
- package/dist/components/Button.js +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarBase.js","sourceRoot":"","sources":["../../../src/primitives/AvatarBase/AvatarBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAiE;AACjE,8FAA4E;AAC5E,+CAAuC;AACvC,+CAAoC;AAEpC,iEAAyC;AACzC,iEAAkE;AAElE,iEAA+E;AAE/E,MAAM,UAAU,GAAG,CAAC,EAClB,QAAQ,EACR,IAAI,GAAG,+CAAwB,CAAC,IAAI,EACpC,KAAK,GAAG,+CAAwB,CAAC,KAAK,EACtC,YAAY,EACZ,iBAAiB,EACjB,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACQ,EAAE,EAAE;IACpB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,qBAAqB,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACzC,OAAO,IAAA,4DAAqC,EAAC;YAC3C,IAAI;YACJ,KAAK;YACL,WAAW;SACZ,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC;IAE/B,OAAO,CACL,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA,GAAG,qBAAqB,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAC5D;MAAA,CAAC,YAAY,CAAC,CAAC,CAAC,CACd,CAAC,cAAI,CACH,IAAI,+CAAwB,CAAC,iBAAiB,CAAC,CAC/C,IAAI,iBAAiB,CAAC,CAEtB;UAAA,CAAC,YAAY,CACf;QAAA,EAAE,cAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CACH;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\n\nimport Text from '../../components/Text';\nimport { DEFAULT_AVATARBASE_PROPS } from './AvatarBase.constants';\nimport type { AvatarBaseProps } from './AvatarBase.types';\nimport { generateAvatarBaseContainerClassNames } from './AvatarBase.utilities';\n\nconst AvatarBase = ({\n children,\n size = DEFAULT_AVATARBASE_PROPS.size,\n shape = DEFAULT_AVATARBASE_PROPS.shape,\n fallbackText,\n fallbackTextProps,\n twClassName = '',\n style,\n ...props\n}: AvatarBaseProps) => {\n const tw = useTailwind();\n const twContainerClassNames = useMemo(() => {\n return generateAvatarBaseContainerClassNames({\n size,\n shape,\n twClassName,\n });\n }, [size, shape, twClassName]);\n\n return (\n <View style={[tw`${twContainerClassNames}`, style]} {...props}>\n {fallbackText ? (\n <Text\n {...DEFAULT_AVATARBASE_PROPS.fallbackTextProps}\n {...fallbackTextProps}\n >\n {fallbackText}\n </Text>\n ) : (\n children\n )}\n </View>\n );\n};\n\nexport default AvatarBase;\n"]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ViewProps, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
import type { TextProps } from '../../components/Text/Text.types';
|
|
3
|
+
import { AvatarBaseSize, AvatarBaseShape } from '../../shared/enums';
|
|
4
|
+
/**
|
|
5
|
+
* AvatarBase component props.
|
|
6
|
+
*/
|
|
7
|
+
export type AvatarBaseProps = {
|
|
8
|
+
/**
|
|
9
|
+
* Required prop for the content to be rendered within the AvatarBase
|
|
10
|
+
*/
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Optional prop to control the size of the AvatarBase
|
|
14
|
+
* Possible values:
|
|
15
|
+
* AvatarBaseSize.Xs (16px),
|
|
16
|
+
* - AvatarBaseSize.Sm (24px),
|
|
17
|
+
* - AvatarBaseSize.Md (32px).
|
|
18
|
+
* - AvatarBaseSize.Lg (40px),
|
|
19
|
+
* - AvatarBaseSize.Xl (48px),
|
|
20
|
+
* @default AvatarBaseSize.Md
|
|
21
|
+
*/
|
|
22
|
+
size?: AvatarBaseSize;
|
|
23
|
+
/**
|
|
24
|
+
* Optional prop to control the shape of the AvatarBase
|
|
25
|
+
* Possible values:
|
|
26
|
+
* - AvatarBaseShape.Circle
|
|
27
|
+
* - AvatarBaseShape.Square
|
|
28
|
+
* @default AvatarBaseShape.Circle
|
|
29
|
+
*/
|
|
30
|
+
shape?: AvatarBaseShape;
|
|
31
|
+
/**
|
|
32
|
+
* Optional text to be rendered when the content fails to render
|
|
33
|
+
*/
|
|
34
|
+
fallbackText?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Optional props to be passed to the fallbackText when the content
|
|
37
|
+
* fails to render
|
|
38
|
+
*/
|
|
39
|
+
fallbackTextProps?: Omit<TextProps, 'children'>;
|
|
40
|
+
/**
|
|
41
|
+
* Optional prop to add twrnc overriding classNames.
|
|
42
|
+
*/
|
|
43
|
+
twClassName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Optional prop to control the style.
|
|
46
|
+
*/
|
|
47
|
+
style?: StyleProp<ViewStyle>;
|
|
48
|
+
} & ViewProps;
|
|
49
|
+
//# sourceMappingURL=AvatarBase.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarBase.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/AvatarBase/AvatarBase.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IAChD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarBase.types.js","sourceRoot":"","sources":["../../../src/primitives/AvatarBase/AvatarBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ViewProps, StyleProp, ViewStyle } from 'react-native';\nimport type { TextProps } from '../../components/Text/Text.types';\nimport { AvatarBaseSize, AvatarBaseShape } from '../../shared/enums';\n\n/**\n * AvatarBase component props.\n */\nexport type AvatarBaseProps = {\n /**\n * Required prop for the content to be rendered within the AvatarBase\n */\n children?: React.ReactNode;\n /**\n * Optional prop to control the size of the AvatarBase\n * Possible values:\n * AvatarBaseSize.Xs (16px),\n * - AvatarBaseSize.Sm (24px),\n * - AvatarBaseSize.Md (32px).\n * - AvatarBaseSize.Lg (40px),\n * - AvatarBaseSize.Xl (48px),\n * @default AvatarBaseSize.Md\n */\n size?: AvatarBaseSize;\n /**\n * Optional prop to control the shape of the AvatarBase\n * Possible values:\n * - AvatarBaseShape.Circle\n * - AvatarBaseShape.Square\n * @default AvatarBaseShape.Circle\n */\n shape?: AvatarBaseShape;\n /**\n * Optional text to be rendered when the content fails to render\n */\n fallbackText?: string;\n /**\n * Optional props to be passed to the fallbackText when the content\n * fails to render\n */\n fallbackTextProps?: Omit<TextProps, 'children'>;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & ViewProps;\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { AvatarBaseProps } from './AvatarBase.types';
|
|
2
|
+
/**
|
|
3
|
+
* Generates a Tailwind class name string for the base container of an avatar.
|
|
4
|
+
*
|
|
5
|
+
* This function constructs a class name string based on the avatar's `size`,
|
|
6
|
+
* `shape`, and optional additional Tailwind class names.
|
|
7
|
+
*
|
|
8
|
+
* @param size - The size of the avatar, defaulting to `DEFAULT_AVATARBASE_PROPS.size`.
|
|
9
|
+
* @param shape - The shape of the avatar, either `circle` or another defined shape.
|
|
10
|
+
* @param twClassName - Additional Tailwind class names for customization.
|
|
11
|
+
* @returns A string of Tailwind class names representing the avatar's container styles.
|
|
12
|
+
*
|
|
13
|
+
* Example:
|
|
14
|
+
* ```
|
|
15
|
+
* const classNames = generateAvatarBaseContainerClassNames({
|
|
16
|
+
* size: 48,
|
|
17
|
+
* shape: 'circle',
|
|
18
|
+
* twClassName: 'border border-gray-500',
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* console.log(classNames);
|
|
22
|
+
* // Output: "items-center justify-center overflow-hidden bg-background-muted h-[48px] w-[48px] rounded-full border border-gray-500"
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const generateAvatarBaseContainerClassNames: ({ size, shape, twClassName, }: Partial<AvatarBaseProps>) => string;
|
|
26
|
+
//# sourceMappingURL=AvatarBase.utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarBase.utilities.d.ts","sourceRoot":"","sources":["../../../src/primitives/AvatarBase/AvatarBase.utilities.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,qCAAqC,kCAI/C,QAAQ,eAAe,CAAC,KAAG,MAW7B,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateAvatarBaseContainerClassNames = void 0;
|
|
4
|
+
/* eslint-disable jsdoc/check-param-names */
|
|
5
|
+
/* eslint-disable jsdoc/require-param */
|
|
6
|
+
const AvatarBase_constants_1 = require("./AvatarBase.constants");
|
|
7
|
+
const AvatarBase_constants_2 = require("./AvatarBase.constants");
|
|
8
|
+
const enums_1 = require("../../shared/enums");
|
|
9
|
+
/**
|
|
10
|
+
* Generates a Tailwind class name string for the base container of an avatar.
|
|
11
|
+
*
|
|
12
|
+
* This function constructs a class name string based on the avatar's `size`,
|
|
13
|
+
* `shape`, and optional additional Tailwind class names.
|
|
14
|
+
*
|
|
15
|
+
* @param size - The size of the avatar, defaulting to `DEFAULT_AVATARBASE_PROPS.size`.
|
|
16
|
+
* @param shape - The shape of the avatar, either `circle` or another defined shape.
|
|
17
|
+
* @param twClassName - Additional Tailwind class names for customization.
|
|
18
|
+
* @returns A string of Tailwind class names representing the avatar's container styles.
|
|
19
|
+
*
|
|
20
|
+
* Example:
|
|
21
|
+
* ```
|
|
22
|
+
* const classNames = generateAvatarBaseContainerClassNames({
|
|
23
|
+
* size: 48,
|
|
24
|
+
* shape: 'circle',
|
|
25
|
+
* twClassName: 'border border-gray-500',
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* console.log(classNames);
|
|
29
|
+
* // Output: "items-center justify-center overflow-hidden bg-background-muted h-[48px] w-[48px] rounded-full border border-gray-500"
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
const generateAvatarBaseContainerClassNames = ({ size = AvatarBase_constants_1.DEFAULT_AVATARBASE_PROPS.size, shape = AvatarBase_constants_1.DEFAULT_AVATARBASE_PROPS.shape, twClassName = '', }) => {
|
|
33
|
+
const baseStyle = 'items-center justify-center overflow-hidden';
|
|
34
|
+
const fallbackBackgroundStyle = 'bg-background-muted';
|
|
35
|
+
const sizeStyle = `h-[${size}px] w-[${size}px]`;
|
|
36
|
+
const shapeStyle = shape === enums_1.AvatarBaseShape.Circle
|
|
37
|
+
? 'rounded-full'
|
|
38
|
+
: AvatarBase_constants_2.TWCLASSMAP_AVATARBASE_SIZE_SHAPE[size];
|
|
39
|
+
const mergedClassnames = `${baseStyle} ${fallbackBackgroundStyle} ${sizeStyle} ${shapeStyle} ${twClassName}`;
|
|
40
|
+
return mergedClassnames;
|
|
41
|
+
};
|
|
42
|
+
exports.generateAvatarBaseContainerClassNames = generateAvatarBaseContainerClassNames;
|
|
43
|
+
//# sourceMappingURL=AvatarBase.utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarBase.utilities.js","sourceRoot":"","sources":["../../../src/primitives/AvatarBase/AvatarBase.utilities.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,wCAAwC;AACxC,iEAAkE;AAElE,iEAA0E;AAC1E,8CAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACI,MAAM,qCAAqC,GAAG,CAAC,EACpD,IAAI,GAAG,+CAAwB,CAAC,IAAI,EACpC,KAAK,GAAG,+CAAwB,CAAC,KAAK,EACtC,WAAW,GAAG,EAAE,GACS,EAAU,EAAE;IACrC,MAAM,SAAS,GAAG,6CAA6C,CAAC;IAChE,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;IACtD,MAAM,SAAS,GAAG,MAAM,IAAI,UAAU,IAAI,KAAK,CAAC;IAChD,MAAM,UAAU,GACd,KAAK,KAAK,uBAAe,CAAC,MAAM;QAC9B,CAAC,CAAC,cAAc;QAChB,CAAC,CAAC,uDAAgC,CAAC,IAAI,CAAC,CAAC;IAE7C,MAAM,gBAAgB,GAAG,GAAG,SAAS,IAAI,uBAAuB,IAAI,SAAS,IAAI,UAAU,IAAI,WAAW,EAAE,CAAC;IAC7G,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAfW,QAAA,qCAAqC,yCAehD","sourcesContent":["/* eslint-disable jsdoc/check-param-names */\n/* eslint-disable jsdoc/require-param */\nimport { DEFAULT_AVATARBASE_PROPS } from './AvatarBase.constants';\nimport type { AvatarBaseProps } from './AvatarBase.types';\nimport { TWCLASSMAP_AVATARBASE_SIZE_SHAPE } from './AvatarBase.constants';\nimport { AvatarBaseShape } from '../../shared/enums';\n\n/**\n * Generates a Tailwind class name string for the base container of an avatar.\n *\n * This function constructs a class name string based on the avatar's `size`,\n * `shape`, and optional additional Tailwind class names.\n *\n * @param size - The size of the avatar, defaulting to `DEFAULT_AVATARBASE_PROPS.size`.\n * @param shape - The shape of the avatar, either `circle` or another defined shape.\n * @param twClassName - Additional Tailwind class names for customization.\n * @returns A string of Tailwind class names representing the avatar's container styles.\n *\n * Example:\n * ```\n * const classNames = generateAvatarBaseContainerClassNames({\n * size: 48,\n * shape: 'circle',\n * twClassName: 'border border-gray-500',\n * });\n *\n * console.log(classNames);\n * // Output: \"items-center justify-center overflow-hidden bg-background-muted h-[48px] w-[48px] rounded-full border border-gray-500\"\n * ```\n */\nexport const generateAvatarBaseContainerClassNames = ({\n size = DEFAULT_AVATARBASE_PROPS.size,\n shape = DEFAULT_AVATARBASE_PROPS.shape,\n twClassName = '',\n}: Partial<AvatarBaseProps>): string => {\n const baseStyle = 'items-center justify-center overflow-hidden';\n const fallbackBackgroundStyle = 'bg-background-muted';\n const sizeStyle = `h-[${size}px] w-[${size}px]`;\n const shapeStyle =\n shape === AvatarBaseShape.Circle\n ? 'rounded-full'\n : TWCLASSMAP_AVATARBASE_SIZE_SHAPE[size];\n\n const mergedClassnames = `${baseStyle} ${fallbackBackgroundStyle} ${sizeStyle} ${shapeStyle} ${twClassName}`;\n return mergedClassnames;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AvatarBaseSize = exports.default = void 0;
|
|
7
|
+
var AvatarBase_1 = require("./AvatarBase");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(AvatarBase_1).default; } });
|
|
9
|
+
var enums_1 = require("../../shared/enums");
|
|
10
|
+
Object.defineProperty(exports, "AvatarBaseSize", { enumerable: true, get: function () { return enums_1.AvatarBaseSize; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/primitives/AvatarBase/index.ts"],"names":[],"mappings":";;;;;;AAAA,2CAAuC;AAA9B,sHAAA,OAAO,OAAA;AAEhB,4CAAoD;AAA3C,uGAAA,cAAc,OAAA","sourcesContent":["export { default } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase.types';\nexport { AvatarBaseSize } from '../../shared/enums';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.d.ts","sourceRoot":"","sources":["../../../src/primitives/Blockies/Blockies.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,QAAA,MAAM,QAAQ,qCAA2C,aAAa,sBASrE,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const react_native_1 = require("react-native");
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
const Blockies_utilities_1 = require("./Blockies.utilities");
|
|
11
|
+
const Blockies = ({ address, size = 32, ...imageProps }) => {
|
|
12
|
+
return (<react_native_1.Image source={{ uri: (0, Blockies_utilities_1.toDataUrl)(address) }} width={size} height={size} {...imageProps}/>);
|
|
13
|
+
};
|
|
14
|
+
exports.default = Blockies;
|
|
15
|
+
//# sourceMappingURL=Blockies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.js","sourceRoot":"","sources":["../../../src/primitives/Blockies/Blockies.tsx"],"names":[],"mappings":";;;;;AAAA,iEAAiE;AACjE,kDAA0B;AAC1B,+CAAqC;AAErC,aAAa;AACb,6DAAiD;AAIjD,MAAM,QAAQ,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,UAAU,EAAiB,EAAE,EAAE;IACxE,OAAO,CACL,CAAC,oBAAK,CACJ,MAAM,CAAC,CAAC,EAAE,GAAG,EAAE,IAAA,8BAAS,EAAC,OAAO,CAAC,EAAE,CAAC,CACpC,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,MAAM,CAAC,CAAC,IAAI,CAAC,CACb,IAAI,UAAU,CAAC,EACf,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport React from 'react';\nimport { Image } from 'react-native';\n\n// @ts-ignore\nimport { toDataUrl } from './Blockies.utilities';\n\nimport type { BlockiesProps } from './Blockies.types';\n\nconst Blockies = ({ address, size = 32, ...imageProps }: BlockiesProps) => {\n return (\n <Image\n source={{ uri: toDataUrl(address) }}\n width={size}\n height={size}\n {...imageProps}\n />\n );\n};\n\nexport default Blockies;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ImageProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Blockies component props.
|
|
4
|
+
*/
|
|
5
|
+
export type BlockiesProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Required address used as a unique identifier to generate the Blockies.
|
|
8
|
+
*/
|
|
9
|
+
address: string;
|
|
10
|
+
/**
|
|
11
|
+
* Optional prop to control the size of the Blockies.
|
|
12
|
+
*/
|
|
13
|
+
size?: number;
|
|
14
|
+
} & Omit<ImageProps, 'source' | 'width' | 'height'>;
|
|
15
|
+
//# sourceMappingURL=Blockies.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/Blockies/Blockies.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blockies.types.js","sourceRoot":"","sources":["../../../src/primitives/Blockies/Blockies.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ImageProps } from 'react-native';\n\n/**\n * Blockies component props.\n */\nexport type BlockiesProps = {\n /**\n * Required address used as a unique identifier to generate the Blockies.\n */\n address: string;\n /**\n * Optional prop to control the size of the Blockies.\n */\n size?: number;\n} & Omit<ImageProps, 'source' | 'width' | 'height'>;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/Blockies/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var Blockies_1 = require("./Blockies");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Blockies_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/primitives/Blockies/index.ts"],"names":[],"mappings":";;;;;;AAAA,uCAAqC;AAA5B,oHAAA,OAAO,OAAA","sourcesContent":["export { default } from './Blockies';\nexport type { BlockiesProps } from './Blockies.types';\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonAnimatedProps } from './ButtonAnimated.types';
|
|
3
|
+
declare const ButtonAnimated: ({ onPressIn, onPressOut, disabled, ...props }: ButtonAnimatedProps) => React.JSX.Element;
|
|
4
|
+
export default ButtonAnimated;
|
|
5
|
+
//# sourceMappingURL=ButtonAnimated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.d.ts","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/ButtonAnimated.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,QAAA,MAAM,cAAc,kDAKjB,mBAAmB,sBAoCrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const react_1 = __importDefault(require("react"));
|
|
30
|
+
const react_native_1 = require("react-native");
|
|
31
|
+
const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
32
|
+
const ButtonAnimated = ({ onPressIn, onPressOut, disabled, ...props }) => {
|
|
33
|
+
const animation = (0, react_native_reanimated_1.useSharedValue)(1);
|
|
34
|
+
const scaleStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
35
|
+
return {
|
|
36
|
+
transform: [{ scale: animation.value }],
|
|
37
|
+
};
|
|
38
|
+
});
|
|
39
|
+
const onPressInHandler = (event) => {
|
|
40
|
+
animation.value = (0, react_native_reanimated_1.withTiming)(0.97, {
|
|
41
|
+
duration: 100,
|
|
42
|
+
easing: react_native_reanimated_1.Easing.bezier(0.3, 0.8, 0.3, 1),
|
|
43
|
+
});
|
|
44
|
+
onPressIn?.(event);
|
|
45
|
+
};
|
|
46
|
+
const onPressOutHandler = (event) => {
|
|
47
|
+
animation.value = (0, react_native_reanimated_1.withTiming)(1, {
|
|
48
|
+
duration: 100,
|
|
49
|
+
easing: react_native_reanimated_1.Easing.bezier(0.3, 0.8, 0.3, 1),
|
|
50
|
+
});
|
|
51
|
+
onPressOut?.(event);
|
|
52
|
+
};
|
|
53
|
+
return (<react_native_reanimated_1.default.View style={[scaleStyle, { alignItems: 'center', justifyContent: 'center' }]}>
|
|
54
|
+
<react_native_1.Pressable onPressIn={onPressInHandler} onPressOut={onPressOutHandler} disabled={disabled} {...props}/>
|
|
55
|
+
</react_native_reanimated_1.default.View>);
|
|
56
|
+
};
|
|
57
|
+
exports.default = ButtonAnimated;
|
|
58
|
+
//# sourceMappingURL=ButtonAnimated.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.js","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/ButtonAnimated.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAE1B,+CAAyC;AACzC,mFAKiC;AAIjC,MAAM,cAAc,GAAG,CAAC,EACtB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,SAAS,GAAG,IAAA,wCAAc,EAAC,CAAC,CAAC,CAAC;IACpC,MAAM,UAAU,GAAG,IAAA,0CAAgB,EAAC,GAAG,EAAE;QACvC,OAAO;YACL,SAAS,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,KAAK,EAAE,CAAC;SACxC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;QACxD,SAAS,CAAC,KAAK,GAAG,IAAA,oCAAU,EAAC,IAAI,EAAE;YACjC,QAAQ,EAAE,GAAG;YACb,MAAM,EAAE,gCAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;SACxC,CAAC,CAAC;QACH,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,KAA4B,EAAE,EAAE;QACzD,SAAS,CAAC,KAAK,GAAG,IAAA,oCAAU,EAAC,CAAC,EAAE;YAC9B,QAAQ,EAAE,GAAG;YACb,MAAM,EAAE,gCAAM,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;SACxC,CAAC,CAAC;QACH,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,iCAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC,CAAC,UAAU,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,CAAC,CAExE;MAAA,CAAC,wBAAS,CACR,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAC5B,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAC9B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,IAAI,KAAK,CAAC,EAEd;IAAA,EAAE,iCAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,cAAc,CAAC","sourcesContent":["import React from 'react';\nimport type { GestureResponderEvent } from 'react-native';\nimport { Pressable } from 'react-native';\nimport Animated, {\n useSharedValue,\n useAnimatedStyle,\n withTiming,\n Easing,\n} from 'react-native-reanimated';\n\nimport type { ButtonAnimatedProps } from './ButtonAnimated.types';\n\nconst ButtonAnimated = ({\n onPressIn,\n onPressOut,\n disabled,\n ...props\n}: ButtonAnimatedProps) => {\n const animation = useSharedValue(1);\n const scaleStyle = useAnimatedStyle(() => {\n return {\n transform: [{ scale: animation.value }],\n };\n });\n\n const onPressInHandler = (event: GestureResponderEvent) => {\n animation.value = withTiming(0.97, {\n duration: 100,\n easing: Easing.bezier(0.3, 0.8, 0.3, 1),\n });\n onPressIn?.(event);\n };\n\n const onPressOutHandler = (event: GestureResponderEvent) => {\n animation.value = withTiming(1, {\n duration: 100,\n easing: Easing.bezier(0.3, 0.8, 0.3, 1),\n });\n onPressOut?.(event);\n };\n\n return (\n <Animated.View\n style={[scaleStyle, { alignItems: 'center', justifyContent: 'center' }]}\n >\n <Pressable\n onPressIn={onPressInHandler}\n onPressOut={onPressOutHandler}\n disabled={disabled}\n {...props}\n />\n </Animated.View>\n );\n};\n\nexport default ButtonAnimated;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.types.d.ts","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/ButtonAnimated.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonAnimated.types.js","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/ButtonAnimated.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PressableProps } from 'react-native';\n\n/**\n * ButtonAnimated component props.\n */\nexport type ButtonAnimatedProps = PressableProps;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var ButtonAnimated_1 = require("./ButtonAnimated");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(ButtonAnimated_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/primitives/ButtonAnimated/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA2C;AAAlC,0HAAA,OAAO,OAAA","sourcesContent":["export { default } from './ButtonAnimated';\nexport { ButtonAnimatedProps } from './ButtonAnimated.types';\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ButtonBaseProps } from './ButtonBase.types';
|
|
2
|
+
export declare const DEFAULT_BUTTONBASE_PROPS: Pick<ButtonBaseProps, 'textProps' | 'size' | 'isLoading' | 'spinnerProps' | 'startIconProps' | 'endIconProps' | 'isDisabled' | 'isFullWidth'>;
|
|
3
|
+
//# sourceMappingURL=ButtonBase.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonBase.constants.d.ts","sourceRoot":"","sources":["../../../src/primitives/ButtonBase/ButtonBase.constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI1D,eAAO,MAAM,wBAAwB,EAAE,IAAI,CACzC,eAAe,EACb,WAAW,GACX,MAAM,GACN,WAAW,GACX,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,aAAa,CAwBhB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_BUTTONBASE_PROPS = void 0;
|
|
4
|
+
const Icon_1 = require("../../components/Icon");
|
|
5
|
+
const Text_1 = require("../../components/Text");
|
|
6
|
+
const ButtonBase_types_1 = require("./ButtonBase.types");
|
|
7
|
+
// Defaults
|
|
8
|
+
exports.DEFAULT_BUTTONBASE_PROPS = {
|
|
9
|
+
textProps: {
|
|
10
|
+
variant: Text_1.TextVariant.BodyMd,
|
|
11
|
+
fontWeight: Text_1.FontWeight.Medium,
|
|
12
|
+
color: Text_1.TextColor.TextDefault,
|
|
13
|
+
numberOfLines: 1,
|
|
14
|
+
ellipsizeMode: 'clip',
|
|
15
|
+
},
|
|
16
|
+
size: ButtonBase_types_1.ButtonBaseSize.Lg,
|
|
17
|
+
isLoading: false,
|
|
18
|
+
spinnerProps: {
|
|
19
|
+
color: Icon_1.IconColor.IconDefault,
|
|
20
|
+
},
|
|
21
|
+
startIconProps: {
|
|
22
|
+
size: Icon_1.IconSize.Sm,
|
|
23
|
+
testID: 'start-icon',
|
|
24
|
+
},
|
|
25
|
+
endIconProps: {
|
|
26
|
+
size: Icon_1.IconSize.Sm,
|
|
27
|
+
testID: 'end-icon',
|
|
28
|
+
},
|
|
29
|
+
isDisabled: false,
|
|
30
|
+
isFullWidth: false,
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ButtonBase.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonBase.constants.js","sourceRoot":"","sources":["../../../src/primitives/ButtonBase/ButtonBase.constants.ts"],"names":[],"mappings":";;;AAAA,gDAA4D;AAC5D,gDAA2E;AAE3E,yDAAoD;AAEpD,WAAW;AACE,QAAA,wBAAwB,GAUjC;IACF,SAAS,EAAE;QACT,OAAO,EAAE,kBAAW,CAAC,MAAM;QAC3B,UAAU,EAAE,iBAAU,CAAC,MAAM;QAC7B,KAAK,EAAE,gBAAS,CAAC,WAAW;QAC5B,aAAa,EAAE,CAAC;QAChB,aAAa,EAAE,MAAM;KACtB;IACD,IAAI,EAAE,iCAAc,CAAC,EAAE;IACvB,SAAS,EAAE,KAAK;IAChB,YAAY,EAAE;QACZ,KAAK,EAAE,gBAAS,CAAC,WAAW;KAC7B;IACD,cAAc,EAAE;QACd,IAAI,EAAE,eAAQ,CAAC,EAAE;QACjB,MAAM,EAAE,YAAY;KACrB;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,eAAQ,CAAC,EAAE;QACjB,MAAM,EAAE,UAAU;KACnB;IACD,UAAU,EAAE,KAAK;IACjB,WAAW,EAAE,KAAK;CACnB,CAAC","sourcesContent":["import { IconSize, IconColor } from '../../components/Icon';\nimport { TextColor, TextVariant, FontWeight } from '../../components/Text';\nimport type { ButtonBaseProps } from './ButtonBase.types';\nimport { ButtonBaseSize } from './ButtonBase.types';\n\n// Defaults\nexport const DEFAULT_BUTTONBASE_PROPS: Pick<\n ButtonBaseProps,\n | 'textProps'\n | 'size'\n | 'isLoading'\n | 'spinnerProps'\n | 'startIconProps'\n | 'endIconProps'\n | 'isDisabled'\n | 'isFullWidth'\n> = {\n textProps: {\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n },\n size: ButtonBaseSize.Lg,\n isLoading: false,\n spinnerProps: {\n color: IconColor.IconDefault,\n },\n startIconProps: {\n size: IconSize.Sm,\n testID: 'start-icon',\n },\n endIconProps: {\n size: IconSize.Sm,\n testID: 'end-icon',\n },\n isDisabled: false,\n isFullWidth: false,\n};\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ButtonBaseProps } from './ButtonBase.types';
|
|
3
|
+
declare const ButtonBase: ({ children, textProps, size, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, style, ...props }: ButtonBaseProps) => React.JSX.Element;
|
|
4
|
+
export default ButtonBase;
|
|
5
|
+
//# sourceMappingURL=ButtonBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../src/primitives/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAWvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,QAAA,MAAM,UAAU,uNAkBb,eAAe,sBAyEjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */
|
|
30
|
+
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
const react_native_1 = require("react-native");
|
|
33
|
+
const Icon_1 = __importDefault(require("../../components/Icon"));
|
|
34
|
+
const Spinner_1 = __importDefault(require("../../temp-components/Spinner"));
|
|
35
|
+
const ButtonAnimated_1 = __importDefault(require("../ButtonAnimated"));
|
|
36
|
+
const TextOrChildren_1 = __importDefault(require("../TextOrChildren/TextOrChildren"));
|
|
37
|
+
const ButtonBase_constants_1 = require("./ButtonBase.constants");
|
|
38
|
+
const ButtonBase_utilities_1 = require("./ButtonBase.utilities");
|
|
39
|
+
const ButtonBase = ({ children, textProps, size = ButtonBase_constants_1.DEFAULT_BUTTONBASE_PROPS.size, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, style, ...props }) => {
|
|
40
|
+
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
41
|
+
const twContainerClassNames = (0, react_1.useMemo)(() => {
|
|
42
|
+
return (0, ButtonBase_utilities_1.generateButtonBaseContainerClassNames)({
|
|
43
|
+
size,
|
|
44
|
+
twClassName,
|
|
45
|
+
isLoading,
|
|
46
|
+
isDisabled,
|
|
47
|
+
isFullWidth,
|
|
48
|
+
});
|
|
49
|
+
}, [size, twClassName, isLoading, isDisabled, isFullWidth]);
|
|
50
|
+
const finalTextProps = {
|
|
51
|
+
...ButtonBase_constants_1.DEFAULT_BUTTONBASE_PROPS.textProps,
|
|
52
|
+
...textProps,
|
|
53
|
+
};
|
|
54
|
+
const finalStartIconName = startIconName ?? startIconProps?.name;
|
|
55
|
+
const finalStartIconProps = {
|
|
56
|
+
...ButtonBase_constants_1.DEFAULT_BUTTONBASE_PROPS.startIconProps,
|
|
57
|
+
...startIconProps,
|
|
58
|
+
};
|
|
59
|
+
const finalEndIconName = endIconName ?? endIconProps?.name;
|
|
60
|
+
const finalEndIconProps = {
|
|
61
|
+
...ButtonBase_constants_1.DEFAULT_BUTTONBASE_PROPS.endIconProps,
|
|
62
|
+
...endIconProps,
|
|
63
|
+
};
|
|
64
|
+
const finalSpinnerProps = {
|
|
65
|
+
...ButtonBase_constants_1.DEFAULT_BUTTONBASE_PROPS.spinnerProps,
|
|
66
|
+
loadingText,
|
|
67
|
+
loadingTextProps: {
|
|
68
|
+
numberOfLines: 1,
|
|
69
|
+
},
|
|
70
|
+
...spinnerProps,
|
|
71
|
+
};
|
|
72
|
+
return (<ButtonAnimated_1.default disabled={isDisabled || isLoading} accessibilityRole="button" accessible style={[tw `${twContainerClassNames}`, style]} {...props}>
|
|
73
|
+
<react_native_1.View style={tw `absolute inset-0 flex items-center justify-center ${isLoading ? 'opacity-100' : 'opacity-0'}`} testID="spinner-container">
|
|
74
|
+
<Spinner_1.default {...finalSpinnerProps}/>
|
|
75
|
+
</react_native_1.View>
|
|
76
|
+
<react_native_1.View style={tw `flex-row items-center justify-center gap-x-2 ${isLoading ? 'opacity-0' : 'opacity-100'}`} testID="content-container">
|
|
77
|
+
{finalStartIconName ? (<Icon_1.default name={finalStartIconName} {...finalStartIconProps}/>) : (startAccessory)}
|
|
78
|
+
<TextOrChildren_1.default textProps={finalTextProps}>{children}</TextOrChildren_1.default>
|
|
79
|
+
{finalEndIconName ? (<Icon_1.default name={finalEndIconName} {...finalEndIconProps}/>) : (endAccessory)}
|
|
80
|
+
</react_native_1.View>
|
|
81
|
+
</ButtonAnimated_1.default>);
|
|
82
|
+
};
|
|
83
|
+
exports.default = ButtonBase;
|
|
84
|
+
//# sourceMappingURL=ButtonBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonBase.js","sourceRoot":"","sources":["../../../src/primitives/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAAiE;AACjE,8FAA4E;AAC5E,+CAAuC;AACvC,+CAAoC;AAGpC,iEAAyC;AAGzC,4EAAoD;AACpD,uEAA+C;AAC/C,sFAA8D;AAC9D,iEAAkE;AAElE,iEAA+E;AAE/E,MAAM,UAAU,GAAG,CAAC,EAClB,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,+CAAwB,CAAC,IAAI,EACpC,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACQ,EAAE,EAAE;IACpB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,qBAAqB,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QACzC,OAAO,IAAA,4DAAqC,EAAC;YAC3C,IAAI;YACJ,WAAW;YACX,SAAS;YACT,UAAU;YACV,WAAW;SACZ,CAAC,CAAC;IACL,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAC;IAE5D,MAAM,cAAc,GAAyC;QAC3D,GAAG,+CAAwB,CAAC,SAAS;QACrC,GAAG,SAAS;KACb,CAAC;IACF,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,mBAAmB,GAAuB;QAC9C,GAAG,+CAAwB,CAAC,cAAc;QAC1C,GAAG,cAAc;KAClB,CAAC;IAEF,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAC3D,MAAM,iBAAiB,GAAuB;QAC5C,GAAG,+CAAwB,CAAC,YAAY;QACxC,GAAG,YAAY;KAChB,CAAC;IAEF,MAAM,iBAAiB,GAAiB;QACtC,GAAG,+CAAwB,CAAC,YAAY;QACxC,WAAW;QACX,gBAAgB,EAAE;YAChB,aAAa,EAAE,CAAC;SACjB;QACD,GAAG,YAAY;KAChB,CAAC;IAEF,OAAO,CACL,CAAC,wBAAc,CACb,QAAQ,CAAC,CAAC,UAAU,IAAI,SAAS,CAAC,CAClC,iBAAiB,CAAC,QAAQ,CAC1B,UAAU,CACV,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA,GAAG,qBAAqB,EAAE,EAAE,KAAK,CAAC,CAAC,CAC7C,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC,EAAE,CAAA,qDACP,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAC9B,EAAE,CAAC,CACH,MAAM,CAAC,mBAAmB,CAE1B;QAAA,CAAC,iBAAO,CAAC,IAAI,iBAAiB,CAAC,EACjC;MAAA,EAAE,mBAAI,CACN;MAAA,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC,EAAE,CAAA,gDACP,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,aAC5B,EAAE,CAAC,CACH,MAAM,CAAC,mBAAmB,CAE1B;QAAA,CAAC,kBAAkB,CAAC,CAAC,CAAC,CACpB,CAAC,cAAI,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,CAAC,IAAI,mBAAmB,CAAC,EAAG,CAC5D,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CACD;QAAA,CAAC,wBAAc,CAAC,SAAS,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,wBAAc,CACrE;QAAA,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAClB,CAAC,cAAI,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,CAAC,IAAI,iBAAiB,CAAC,EAAG,CACxD,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACH;MAAA,EAAE,mBAAI,CACR;IAAA,EAAE,wBAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,UAAU,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/prefer-nullish-coalescing */\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\n\nimport type { IconProps } from '../../components/Icon';\nimport Icon from '../../components/Icon';\nimport type { TextProps } from '../../components/Text/Text.types';\nimport type { SpinnerProps } from '../../temp-components/Spinner';\nimport Spinner from '../../temp-components/Spinner';\nimport ButtonAnimated from '../ButtonAnimated';\nimport TextOrChildren from '../TextOrChildren/TextOrChildren';\nimport { DEFAULT_BUTTONBASE_PROPS } from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\nimport { generateButtonBaseContainerClassNames } from './ButtonBase.utilities';\n\nconst ButtonBase = ({\n children,\n textProps,\n size = DEFAULT_BUTTONBASE_PROPS.size,\n isLoading,\n loadingText,\n spinnerProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n style,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n const twContainerClassNames = useMemo(() => {\n return generateButtonBaseContainerClassNames({\n size,\n twClassName,\n isLoading,\n isDisabled,\n isFullWidth,\n });\n }, [size, twClassName, isLoading, isDisabled, isFullWidth]);\n\n const finalTextProps: Omit<Partial<TextProps>, 'children'> = {\n ...DEFAULT_BUTTONBASE_PROPS.textProps,\n ...textProps,\n };\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalStartIconProps: Partial<IconProps> = {\n ...DEFAULT_BUTTONBASE_PROPS.startIconProps,\n ...startIconProps,\n };\n\n const finalEndIconName = endIconName ?? endIconProps?.name;\n const finalEndIconProps: Partial<IconProps> = {\n ...DEFAULT_BUTTONBASE_PROPS.endIconProps,\n ...endIconProps,\n };\n\n const finalSpinnerProps: SpinnerProps = {\n ...DEFAULT_BUTTONBASE_PROPS.spinnerProps,\n loadingText,\n loadingTextProps: {\n numberOfLines: 1,\n },\n ...spinnerProps,\n };\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole=\"button\"\n accessible\n style={[tw`${twContainerClassNames}`, style]}\n {...props}\n >\n <View\n style={tw`absolute inset-0 flex items-center justify-center ${\n isLoading ? 'opacity-100' : 'opacity-0'\n }`}\n testID=\"spinner-container\"\n >\n <Spinner {...finalSpinnerProps} />\n </View>\n <View\n style={tw`flex-row items-center justify-center gap-x-2 ${\n isLoading ? 'opacity-0' : 'opacity-100'\n }`}\n testID=\"content-container\"\n >\n {finalStartIconName ? (\n <Icon name={finalStartIconName} {...finalStartIconProps} />\n ) : (\n startAccessory\n )}\n <TextOrChildren textProps={finalTextProps}>{children}</TextOrChildren>\n {finalEndIconName ? (\n <Icon name={finalEndIconName} {...finalEndIconProps} />\n ) : (\n endAccessory\n )}\n </View>\n </ButtonAnimated>\n );\n};\n\nexport default ButtonBase;\n"]}
|