@metamask-previews/design-system-react-native 0.0.0-preview.52473ea → 0.0.0-preview.7652fa4
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 +2 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.ts.map +1 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.js +19 -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 +2 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.constants.d.ts.map +1 -0
- package/dist/components/AvatarFavicon/AvatarFavicon.constants.js +14 -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/AvatarGroup/AvatarGroup.constants.d.ts +13 -0
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.constants.js +168 -0
- package/dist/components/AvatarGroup/AvatarGroup.constants.js.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +5 -0
- package/dist/components/AvatarGroup/AvatarGroup.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.js +80 -0
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts +70 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.js +14 -0
- package/dist/components/AvatarGroup/AvatarGroup.types.js.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.utilities.d.ts +48 -0
- package/dist/components/AvatarGroup/AvatarGroup.utilities.d.ts.map +1 -0
- package/dist/components/AvatarGroup/AvatarGroup.utilities.js +72 -0
- package/dist/components/AvatarGroup/AvatarGroup.utilities.js.map +1 -0
- package/dist/components/AvatarGroup/index.d.ts +5 -0
- package/dist/components/AvatarGroup/index.d.ts.map +1 -0
- package/dist/components/AvatarGroup/index.js +13 -0
- package/dist/components/AvatarGroup/index.js.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.ts +7 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.ts.map +1 -0
- package/dist/components/AvatarIcon/AvatarIcon.constants.js +29 -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 +51 -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 +31 -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 +2 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.constants.d.ts.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.constants.js +14 -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 +2 -0
- package/dist/components/AvatarToken/AvatarToken.constants.d.ts.map +1 -0
- package/dist/components/AvatarToken/AvatarToken.constants.js +14 -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/BadgeCount/BadgeCount.constants.d.ts +6 -0
- package/dist/components/BadgeCount/BadgeCount.constants.d.ts.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.constants.js +19 -0
- package/dist/components/BadgeCount/BadgeCount.constants.js.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.d.ts +5 -0
- package/dist/components/BadgeCount/BadgeCount.d.ts.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.js +53 -0
- package/dist/components/BadgeCount/BadgeCount.js.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.types.d.ts +46 -0
- package/dist/components/BadgeCount/BadgeCount.types.d.ts.map +1 -0
- package/dist/components/BadgeCount/BadgeCount.types.js +15 -0
- package/dist/components/BadgeCount/BadgeCount.types.js.map +1 -0
- package/dist/components/BadgeCount/index.d.ts +4 -0
- package/dist/components/BadgeCount/index.d.ts.map +1 -0
- package/dist/components/BadgeCount/index.js +11 -0
- package/dist/components/BadgeCount/index.js.map +1 -0
- package/dist/components/BadgeIcon/BadgeIcon.d.ts +5 -0
- package/dist/components/BadgeIcon/BadgeIcon.d.ts.map +1 -0
- package/dist/components/BadgeIcon/BadgeIcon.js +49 -0
- package/dist/components/BadgeIcon/BadgeIcon.js.map +1 -0
- package/dist/components/BadgeIcon/BadgeIcon.types.d.ts +20 -0
- package/dist/components/BadgeIcon/BadgeIcon.types.d.ts.map +1 -0
- package/dist/components/BadgeIcon/BadgeIcon.types.js +3 -0
- package/dist/components/BadgeIcon/BadgeIcon.types.js.map +1 -0
- package/dist/components/BadgeIcon/index.d.ts +3 -0
- package/dist/components/BadgeIcon/index.d.ts.map +1 -0
- package/dist/components/BadgeIcon/index.js +9 -0
- package/dist/components/BadgeIcon/index.js.map +1 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.d.ts +5 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.d.ts.map +1 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.js +34 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.js.map +1 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.types.d.ts +3 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.types.d.ts.map +1 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.types.js +3 -0
- package/dist/components/BadgeNetwork/BadgeNetwork.types.js.map +1 -0
- package/dist/components/BadgeNetwork/index.d.ts +3 -0
- package/dist/components/BadgeNetwork/index.d.ts.map +1 -0
- package/dist/components/BadgeNetwork/index.js +9 -0
- package/dist/components/BadgeNetwork/index.js.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.constants.d.ts +4 -0
- package/dist/components/BadgeStatus/BadgeStatus.constants.d.ts.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.constants.js +17 -0
- package/dist/components/BadgeStatus/BadgeStatus.constants.js.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.d.ts +5 -0
- package/dist/components/BadgeStatus/BadgeStatus.d.ts.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.js +34 -0
- package/dist/components/BadgeStatus/BadgeStatus.js.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.types.d.ts +57 -0
- package/dist/components/BadgeStatus/BadgeStatus.types.d.ts.map +1 -0
- package/dist/components/BadgeStatus/BadgeStatus.types.js +29 -0
- package/dist/components/BadgeStatus/BadgeStatus.types.js.map +1 -0
- package/dist/components/BadgeStatus/index.d.ts +4 -0
- package/dist/components/BadgeStatus/index.d.ts.map +1 -0
- package/dist/components/BadgeStatus/index.js +12 -0
- package/dist/components/BadgeStatus/index.js.map +1 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.d.ts +5 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.d.ts.map +1 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.js +108 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.js.map +1 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.types.d.ts +81 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.types.d.ts.map +1 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.types.js +19 -0
- package/dist/components/BadgeWrapper/BadgeWrapper.types.js.map +1 -0
- package/dist/components/BadgeWrapper/index.d.ts +4 -0
- package/dist/components/BadgeWrapper/index.d.ts.map +1 -0
- package/dist/components/BadgeWrapper/index.js +12 -0
- package/dist/components/BadgeWrapper/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 +328 -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 +256 -0
- package/dist/components/Icon/Icon.types.d.ts.map +1 -0
- package/dist/components/Icon/Icon.types.js +231 -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 +136 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +88 -0
- package/dist/index.js.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.constants.d.ts +6 -0
- package/dist/primitives/AvatarBase/AvatarBase.constants.d.ts.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.constants.js +34 -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 +55 -0
- package/dist/primitives/AvatarBase/AvatarBase.js.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.types.d.ts +61 -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 +30 -0
- package/dist/primitives/AvatarBase/AvatarBase.utilities.d.ts.map +1 -0
- package/dist/primitives/AvatarBase/AvatarBase.utilities.js +60 -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 +47 -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 +33 -16
- package/dist/index.cjs +0 -13
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -8
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.mts +0 -8
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -10
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* eslint-disable import/prefer-default-export */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SAMPLE_TEXT_PROPS = exports.MAPPING_FONTWEIGHT_TO_FONTFAMILYSTYLECLASSNAME = exports.DEFAULT_TEXT_COLOR = exports.DEFAULT_TEXT_VARIANT = void 0;
|
|
5
|
+
const Text_types_1 = require("./Text.types");
|
|
6
|
+
// Defaults
|
|
7
|
+
exports.DEFAULT_TEXT_VARIANT = Text_types_1.TextVariant.BodyMd;
|
|
8
|
+
exports.DEFAULT_TEXT_COLOR = Text_types_1.TextColor.TextDefault;
|
|
9
|
+
// Mappings
|
|
10
|
+
exports.MAPPING_FONTWEIGHT_TO_FONTFAMILYSTYLECLASSNAME = {
|
|
11
|
+
[Text_types_1.FontWeight.Regular]: '',
|
|
12
|
+
[Text_types_1.FontWeight.Medium]: '-medium',
|
|
13
|
+
[Text_types_1.FontWeight.Bold]: '-bold',
|
|
14
|
+
};
|
|
15
|
+
// Sample consts
|
|
16
|
+
exports.SAMPLE_TEXT_PROPS = {
|
|
17
|
+
variant: exports.DEFAULT_TEXT_VARIANT,
|
|
18
|
+
children: 'Sample Text',
|
|
19
|
+
color: exports.DEFAULT_TEXT_COLOR,
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=Text.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.constants.js","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";AAAA,iDAAiD;;;AAGjD,6CAAkE;AAElE,WAAW;AACE,QAAA,oBAAoB,GAAG,wBAAW,CAAC,MAAM,CAAC;AAC1C,QAAA,kBAAkB,GAAG,sBAAS,CAAC,WAAW,CAAC;AAExD,WAAW;AACE,QAAA,8CAA8C,GAEvD;IACF,CAAC,uBAAU,CAAC,OAAO,CAAC,EAAE,EAAE;IACxB,CAAC,uBAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,uBAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEF,gBAAgB;AACH,QAAA,iBAAiB,GAAc;IAC1C,OAAO,EAAE,4BAAoB;IAC7B,QAAQ,EAAE,aAAa;IACvB,KAAK,EAAE,0BAAkB;CAC1B,CAAC","sourcesContent":["/* eslint-disable import/prefer-default-export */\n\nimport type { TextProps } from './Text.types';\nimport { FontWeight, TextColor, TextVariant } from './Text.types';\n\n// Defaults\nexport const DEFAULT_TEXT_VARIANT = TextVariant.BodyMd;\nexport const DEFAULT_TEXT_COLOR = TextColor.TextDefault;\n\n// Mappings\nexport const MAPPING_FONTWEIGHT_TO_FONTFAMILYSTYLECLASSNAME: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\n// Sample consts\nexport const SAMPLE_TEXT_PROPS: TextProps = {\n variant: DEFAULT_TEXT_VARIANT,\n children: 'Sample Text',\n color: DEFAULT_TEXT_COLOR,\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4B7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const react_native_1 = require("react-native");
|
|
9
|
+
const Text_constants_1 = require("./Text.constants");
|
|
10
|
+
const Text_types_1 = require("./Text.types");
|
|
11
|
+
const Text_utilities_1 = require("./Text.utilities");
|
|
12
|
+
const Text = ({ variant = Text_constants_1.DEFAULT_TEXT_VARIANT, color = Text_constants_1.DEFAULT_TEXT_COLOR, style, children, fontWeight = Text_types_1.FontWeight.Regular, fontStyle = Text_types_1.FontStyle.Normal, twClassName = '', ...props }) => {
|
|
13
|
+
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
14
|
+
const mergedClassnames = (0, Text_utilities_1.generateTextClassNames)({
|
|
15
|
+
variant,
|
|
16
|
+
color,
|
|
17
|
+
fontWeight,
|
|
18
|
+
fontStyle,
|
|
19
|
+
twClassName,
|
|
20
|
+
});
|
|
21
|
+
return (<react_native_1.Text accessibilityRole="text" {...props} style={[tw `${mergedClassnames}`, style]}>
|
|
22
|
+
{children}
|
|
23
|
+
</react_native_1.Text>);
|
|
24
|
+
};
|
|
25
|
+
exports.default = Text;
|
|
26
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAA8C;AAE9C,qDAA4E;AAE5E,6CAAqD;AACrD,qDAA0D;AAE1D,MAAM,IAAI,GAAwB,CAAC,EACjC,OAAO,GAAG,qCAAoB,EAC9B,KAAK,GAAG,mCAAkB,EAC1B,KAAK,EACL,QAAQ,EACR,UAAU,GAAG,uBAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,sBAAS,CAAC,MAAM,EAC5B,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,gBAAgB,GAAG,IAAA,uCAAsB,EAAC;QAC9C,OAAO;QACP,KAAK;QACL,UAAU;QACV,SAAS;QACT,WAAW;KACZ,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,mBAAM,CACL,iBAAiB,CAAC,MAAM,CACxB,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA,GAAG,gBAAgB,EAAE,EAAE,KAAK,CAAC,CAAC,CAExC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,mBAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport { DEFAULT_TEXT_COLOR, DEFAULT_TEXT_VARIANT } from './Text.constants';\nimport type { TextProps } from './Text.types';\nimport { FontWeight, FontStyle } from './Text.types';\nimport { generateTextClassNames } from './Text.utilities';\n\nconst Text: React.FC<TextProps> = ({\n variant = DEFAULT_TEXT_VARIANT,\n color = DEFAULT_TEXT_COLOR,\n style,\n children,\n fontWeight = FontWeight.Regular,\n fontStyle = FontStyle.Normal,\n twClassName = '',\n ...props\n}) => {\n const tw = useTailwind();\n const mergedClassnames = generateTextClassNames({\n variant,\n color,\n fontWeight,\n fontStyle,\n twClassName,\n });\n\n return (\n <RNText\n accessibilityRole=\"text\"\n {...props}\n style={[tw`${mergedClassnames}`, style]}\n >\n {children}\n </RNText>\n );\n};\n\nexport default Text;\n"]}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { TextProps as RNTextProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Text component variants.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum TextVariant {
|
|
6
|
+
DisplayMd = "display-md",
|
|
7
|
+
HeadingLg = "heading-lg",
|
|
8
|
+
HeadingMd = "heading-md",
|
|
9
|
+
HeadingSm = "heading-sm",
|
|
10
|
+
BodyLg = "body-lg",
|
|
11
|
+
BodyMd = "body-md",
|
|
12
|
+
BodySm = "body-sm",
|
|
13
|
+
BodyXs = "body-xs"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Text colors
|
|
17
|
+
*/
|
|
18
|
+
export declare enum TextColor {
|
|
19
|
+
/** For default neutral text. */
|
|
20
|
+
TextDefault = "text-text-default",
|
|
21
|
+
/** For softer contrast neutral text */
|
|
22
|
+
TextAlternative = "text-text-alternative",
|
|
23
|
+
/** For the softest contrast neutral text (not accessible) */
|
|
24
|
+
TextMuted = "text-text-muted",
|
|
25
|
+
/** For elements used on top of overlay/alternative. */
|
|
26
|
+
OverlayInverse = "text-overlay-inverse",
|
|
27
|
+
/** For interactive, active, and selected semantics. */
|
|
28
|
+
PrimaryDefault = "text-primary-default",
|
|
29
|
+
/** For softer variants of primary text. */
|
|
30
|
+
PrimaryAlternative = "text-primary-alternative",
|
|
31
|
+
/** For elements used on top of primary/default. */
|
|
32
|
+
PrimaryInverse = "text-primary-inverse",
|
|
33
|
+
/** For primary text in a pressed state. */
|
|
34
|
+
PrimaryDefaultPressed = "text-primary-defaultPressed",
|
|
35
|
+
/** For critical alert text. */
|
|
36
|
+
ErrorDefault = "text-error-default",
|
|
37
|
+
/** For stronger contrast error text. */
|
|
38
|
+
ErrorAlternative = "text-error-alternative",
|
|
39
|
+
/** For elements used on top of error/default. */
|
|
40
|
+
ErrorInverse = "text-error-inverse",
|
|
41
|
+
/** For critical alert text in a pressed state. */
|
|
42
|
+
ErrorDefaultPressed = "text-error-defaultPressed",
|
|
43
|
+
/** For caution alert text. */
|
|
44
|
+
WarningDefault = "text-warning-default",
|
|
45
|
+
/** For elements used on top of warning/default. */
|
|
46
|
+
WarningInverse = "text-warning-inverse",
|
|
47
|
+
/** For caution text in a pressed state. */
|
|
48
|
+
WarningDefaultPressed = "text-warning-defaultPressed",
|
|
49
|
+
/** For positive semantic text. */
|
|
50
|
+
SuccessDefault = "text-success-default",
|
|
51
|
+
/** For elements used on top of success/default. */
|
|
52
|
+
SuccessInverse = "text-success-inverse",
|
|
53
|
+
/** For positive text in a pressed state. */
|
|
54
|
+
SuccessDefaultPressed = "text-success-defaultPressed",
|
|
55
|
+
/** For informational read-only text. */
|
|
56
|
+
InfoDefault = "text-info-default",
|
|
57
|
+
/** For elements used on top of info/default. */
|
|
58
|
+
InfoInverse = "text-info-inverse",
|
|
59
|
+
/** Make the text color transparent. */
|
|
60
|
+
Transparent = "text-transparent"
|
|
61
|
+
}
|
|
62
|
+
export declare enum FontWeight {
|
|
63
|
+
/**
|
|
64
|
+
* Weight - 700
|
|
65
|
+
*/
|
|
66
|
+
Bold = "700",
|
|
67
|
+
/**
|
|
68
|
+
* Weight - 500
|
|
69
|
+
*/
|
|
70
|
+
Medium = "500",
|
|
71
|
+
/**
|
|
72
|
+
* Weight - 400
|
|
73
|
+
*/
|
|
74
|
+
Regular = "400"
|
|
75
|
+
}
|
|
76
|
+
export declare enum FontStyle {
|
|
77
|
+
Italic = "italic",
|
|
78
|
+
Normal = "normal"
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Text component props.
|
|
82
|
+
*/
|
|
83
|
+
export type TextProps = {
|
|
84
|
+
/**
|
|
85
|
+
* Optional enum to select between Typography variants.
|
|
86
|
+
* @default BodyMD
|
|
87
|
+
*/
|
|
88
|
+
variant?: TextVariant;
|
|
89
|
+
/**
|
|
90
|
+
* Text to be displayed.
|
|
91
|
+
*/
|
|
92
|
+
children: React.ReactNode;
|
|
93
|
+
/**
|
|
94
|
+
* Optional prop to add color to text.
|
|
95
|
+
*/
|
|
96
|
+
color?: TextColor;
|
|
97
|
+
/**
|
|
98
|
+
* Optional prop to adjust the weight of the font.
|
|
99
|
+
*/
|
|
100
|
+
fontWeight?: FontWeight;
|
|
101
|
+
/**
|
|
102
|
+
* Optional prop to adjust the style of the font.
|
|
103
|
+
*/
|
|
104
|
+
fontStyle?: FontStyle;
|
|
105
|
+
/**
|
|
106
|
+
* Optional prop to add twrnc overriding classNames.
|
|
107
|
+
*/
|
|
108
|
+
twClassName?: string;
|
|
109
|
+
} & RNTextProps;
|
|
110
|
+
//# sourceMappingURL=Text.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.types.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,cAAc,CAAC;AAE7D;;GAEG;AACH,oBAAY,WAAW;IAErB,SAAS,eAAe;IAGxB,SAAS,eAAe;IACxB,SAAS,eAAe;IACxB,SAAS,eAAe;IAGxB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;IAClB,MAAM,YAAY;CACnB;AAED;;GAEG;AACH,oBAAY,SAAS;IACnB,gCAAgC;IAChC,WAAW,sBAAsB;IACjC,uCAAuC;IACvC,eAAe,0BAA0B;IACzC,6DAA6D;IAC7D,SAAS,oBAAoB;IAC7B,uDAAuD;IACvD,cAAc,yBAAyB;IACvC,uDAAuD;IACvD,cAAc,yBAAyB;IACvC,2CAA2C;IAC3C,kBAAkB,6BAA6B;IAC/C,mDAAmD;IACnD,cAAc,yBAAyB;IACvC,2CAA2C;IAC3C,qBAAqB,gCAAgC;IACrD,+BAA+B;IAC/B,YAAY,uBAAuB;IACnC,wCAAwC;IACxC,gBAAgB,2BAA2B;IAC3C,iDAAiD;IACjD,YAAY,uBAAuB;IACnC,kDAAkD;IAClD,mBAAmB,8BAA8B;IACjD,8BAA8B;IAC9B,cAAc,yBAAyB;IACvC,mDAAmD;IACnD,cAAc,yBAAyB;IACvC,2CAA2C;IAC3C,qBAAqB,gCAAgC;IACrD,kCAAkC;IAClC,cAAc,yBAAyB;IACvC,mDAAmD;IACnD,cAAc,yBAAyB;IACvC,4CAA4C;IAC5C,qBAAqB,gCAAgC;IACrD,wCAAwC;IACxC,WAAW,sBAAsB;IACjC,gDAAgD;IAChD,WAAW,sBAAsB;IACjC,uCAAuC;IACvC,WAAW,qBAAqB;CACjC;AAED,oBAAY,UAAU;IACpB;;OAEG;IACH,IAAI,QAAQ;IACZ;;OAEG;IACH,MAAM,QAAQ;IACd;;OAEG;IACH,OAAO,QAAQ;CAChB;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AACD;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,WAAW,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FontStyle = exports.FontWeight = exports.TextColor = exports.TextVariant = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Text component variants.
|
|
6
|
+
*/
|
|
7
|
+
var TextVariant;
|
|
8
|
+
(function (TextVariant) {
|
|
9
|
+
// Display Sizes
|
|
10
|
+
TextVariant["DisplayMd"] = "display-md";
|
|
11
|
+
// Heading Sizes
|
|
12
|
+
TextVariant["HeadingLg"] = "heading-lg";
|
|
13
|
+
TextVariant["HeadingMd"] = "heading-md";
|
|
14
|
+
TextVariant["HeadingSm"] = "heading-sm";
|
|
15
|
+
// Body Sizes
|
|
16
|
+
TextVariant["BodyLg"] = "body-lg";
|
|
17
|
+
TextVariant["BodyMd"] = "body-md";
|
|
18
|
+
TextVariant["BodySm"] = "body-sm";
|
|
19
|
+
TextVariant["BodyXs"] = "body-xs";
|
|
20
|
+
})(TextVariant || (exports.TextVariant = TextVariant = {}));
|
|
21
|
+
/**
|
|
22
|
+
* Text colors
|
|
23
|
+
*/
|
|
24
|
+
var TextColor;
|
|
25
|
+
(function (TextColor) {
|
|
26
|
+
/** For default neutral text. */
|
|
27
|
+
TextColor["TextDefault"] = "text-text-default";
|
|
28
|
+
/** For softer contrast neutral text */
|
|
29
|
+
TextColor["TextAlternative"] = "text-text-alternative";
|
|
30
|
+
/** For the softest contrast neutral text (not accessible) */
|
|
31
|
+
TextColor["TextMuted"] = "text-text-muted";
|
|
32
|
+
/** For elements used on top of overlay/alternative. */
|
|
33
|
+
TextColor["OverlayInverse"] = "text-overlay-inverse";
|
|
34
|
+
/** For interactive, active, and selected semantics. */
|
|
35
|
+
TextColor["PrimaryDefault"] = "text-primary-default";
|
|
36
|
+
/** For softer variants of primary text. */
|
|
37
|
+
TextColor["PrimaryAlternative"] = "text-primary-alternative";
|
|
38
|
+
/** For elements used on top of primary/default. */
|
|
39
|
+
TextColor["PrimaryInverse"] = "text-primary-inverse";
|
|
40
|
+
/** For primary text in a pressed state. */
|
|
41
|
+
TextColor["PrimaryDefaultPressed"] = "text-primary-defaultPressed";
|
|
42
|
+
/** For critical alert text. */
|
|
43
|
+
TextColor["ErrorDefault"] = "text-error-default";
|
|
44
|
+
/** For stronger contrast error text. */
|
|
45
|
+
TextColor["ErrorAlternative"] = "text-error-alternative";
|
|
46
|
+
/** For elements used on top of error/default. */
|
|
47
|
+
TextColor["ErrorInverse"] = "text-error-inverse";
|
|
48
|
+
/** For critical alert text in a pressed state. */
|
|
49
|
+
TextColor["ErrorDefaultPressed"] = "text-error-defaultPressed";
|
|
50
|
+
/** For caution alert text. */
|
|
51
|
+
TextColor["WarningDefault"] = "text-warning-default";
|
|
52
|
+
/** For elements used on top of warning/default. */
|
|
53
|
+
TextColor["WarningInverse"] = "text-warning-inverse";
|
|
54
|
+
/** For caution text in a pressed state. */
|
|
55
|
+
TextColor["WarningDefaultPressed"] = "text-warning-defaultPressed";
|
|
56
|
+
/** For positive semantic text. */
|
|
57
|
+
TextColor["SuccessDefault"] = "text-success-default";
|
|
58
|
+
/** For elements used on top of success/default. */
|
|
59
|
+
TextColor["SuccessInverse"] = "text-success-inverse";
|
|
60
|
+
/** For positive text in a pressed state. */
|
|
61
|
+
TextColor["SuccessDefaultPressed"] = "text-success-defaultPressed";
|
|
62
|
+
/** For informational read-only text. */
|
|
63
|
+
TextColor["InfoDefault"] = "text-info-default";
|
|
64
|
+
/** For elements used on top of info/default. */
|
|
65
|
+
TextColor["InfoInverse"] = "text-info-inverse";
|
|
66
|
+
/** Make the text color transparent. */
|
|
67
|
+
TextColor["Transparent"] = "text-transparent";
|
|
68
|
+
})(TextColor || (exports.TextColor = TextColor = {}));
|
|
69
|
+
var FontWeight;
|
|
70
|
+
(function (FontWeight) {
|
|
71
|
+
/**
|
|
72
|
+
* Weight - 700
|
|
73
|
+
*/
|
|
74
|
+
FontWeight["Bold"] = "700";
|
|
75
|
+
/**
|
|
76
|
+
* Weight - 500
|
|
77
|
+
*/
|
|
78
|
+
FontWeight["Medium"] = "500";
|
|
79
|
+
/**
|
|
80
|
+
* Weight - 400
|
|
81
|
+
*/
|
|
82
|
+
FontWeight["Regular"] = "400";
|
|
83
|
+
})(FontWeight || (exports.FontWeight = FontWeight = {}));
|
|
84
|
+
var FontStyle;
|
|
85
|
+
(function (FontStyle) {
|
|
86
|
+
FontStyle["Italic"] = "italic";
|
|
87
|
+
FontStyle["Normal"] = "normal";
|
|
88
|
+
})(FontStyle || (exports.FontStyle = FontStyle = {}));
|
|
89
|
+
//# sourceMappingURL=Text.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.types.js","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":";;;AAIA;;GAEG;AACH,IAAY,WAcX;AAdD,WAAY,WAAW;IACrB,gBAAgB;IAChB,uCAAwB,CAAA;IAExB,gBAAgB;IAChB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IACxB,uCAAwB,CAAA;IAExB,aAAa;IACb,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;IAClB,iCAAkB,CAAA;AACpB,CAAC,EAdW,WAAW,2BAAX,WAAW,QActB;AAED;;GAEG;AACH,IAAY,SA2CX;AA3CD,WAAY,SAAS;IACnB,gCAAgC;IAChC,8CAAiC,CAAA;IACjC,uCAAuC;IACvC,sDAAyC,CAAA;IACzC,6DAA6D;IAC7D,0CAA6B,CAAA;IAC7B,uDAAuD;IACvD,oDAAuC,CAAA;IACvC,uDAAuD;IACvD,oDAAuC,CAAA;IACvC,2CAA2C;IAC3C,4DAA+C,CAAA;IAC/C,mDAAmD;IACnD,oDAAuC,CAAA;IACvC,2CAA2C;IAC3C,kEAAqD,CAAA;IACrD,+BAA+B;IAC/B,gDAAmC,CAAA;IACnC,wCAAwC;IACxC,wDAA2C,CAAA;IAC3C,iDAAiD;IACjD,gDAAmC,CAAA;IACnC,kDAAkD;IAClD,8DAAiD,CAAA;IACjD,8BAA8B;IAC9B,oDAAuC,CAAA;IACvC,mDAAmD;IACnD,oDAAuC,CAAA;IACvC,2CAA2C;IAC3C,kEAAqD,CAAA;IACrD,kCAAkC;IAClC,oDAAuC,CAAA;IACvC,mDAAmD;IACnD,oDAAuC,CAAA;IACvC,4CAA4C;IAC5C,kEAAqD,CAAA;IACrD,wCAAwC;IACxC,8CAAiC,CAAA;IACjC,gDAAgD;IAChD,8CAAiC,CAAA;IACjC,uCAAuC;IACvC,6CAAgC,CAAA;AAClC,CAAC,EA3CW,SAAS,yBAAT,SAAS,QA2CpB;AAED,IAAY,UAaX;AAbD,WAAY,UAAU;IACpB;;OAEG;IACH,0BAAY,CAAA;IACZ;;OAEG;IACH,4BAAc,CAAA;IACd;;OAEG;IACH,6BAAe,CAAA;AACjB,CAAC,EAbW,UAAU,0BAAV,UAAU,QAarB;AAED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,8BAAiB,CAAA;AACnB,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB","sourcesContent":["/* eslint-disable @typescript-eslint/no-shadow */\n// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\n/**\n * Text component variants.\n */\nexport enum TextVariant {\n // Display Sizes\n DisplayMd = 'display-md',\n\n // Heading Sizes\n HeadingLg = 'heading-lg',\n HeadingMd = 'heading-md',\n HeadingSm = 'heading-sm',\n\n // Body Sizes\n BodyLg = 'body-lg',\n BodyMd = 'body-md',\n BodySm = 'body-sm',\n BodyXs = 'body-xs',\n}\n\n/**\n * Text colors\n */\nexport enum TextColor {\n /** For default neutral text. */\n TextDefault = 'text-text-default',\n /** For softer contrast neutral text */\n TextAlternative = 'text-text-alternative',\n /** For the softest contrast neutral text (not accessible) */\n TextMuted = 'text-text-muted',\n /** For elements used on top of overlay/alternative. */\n OverlayInverse = 'text-overlay-inverse',\n /** For interactive, active, and selected semantics. */\n PrimaryDefault = 'text-primary-default',\n /** For softer variants of primary text. */\n PrimaryAlternative = 'text-primary-alternative',\n /** For elements used on top of primary/default. */\n PrimaryInverse = 'text-primary-inverse',\n /** For primary text in a pressed state. */\n PrimaryDefaultPressed = 'text-primary-defaultPressed',\n /** For critical alert text. */\n ErrorDefault = 'text-error-default',\n /** For stronger contrast error text. */\n ErrorAlternative = 'text-error-alternative',\n /** For elements used on top of error/default. */\n ErrorInverse = 'text-error-inverse',\n /** For critical alert text in a pressed state. */\n ErrorDefaultPressed = 'text-error-defaultPressed',\n /** For caution alert text. */\n WarningDefault = 'text-warning-default',\n /** For elements used on top of warning/default. */\n WarningInverse = 'text-warning-inverse',\n /** For caution text in a pressed state. */\n WarningDefaultPressed = 'text-warning-defaultPressed',\n /** For positive semantic text. */\n SuccessDefault = 'text-success-default',\n /** For elements used on top of success/default. */\n SuccessInverse = 'text-success-inverse',\n /** For positive text in a pressed state. */\n SuccessDefaultPressed = 'text-success-defaultPressed',\n /** For informational read-only text. */\n InfoDefault = 'text-info-default',\n /** For elements used on top of info/default. */\n InfoInverse = 'text-info-inverse',\n /** Make the text color transparent. */\n Transparent = 'text-transparent',\n}\n\nexport enum FontWeight {\n /**\n * Weight - 700\n */\n Bold = '700',\n /**\n * Weight - 500\n */\n Medium = '500',\n /**\n * Weight - 400\n */\n Regular = '400',\n}\n\nexport enum FontStyle {\n Italic = 'italic',\n Normal = 'normal',\n}\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to adjust the weight of the font.\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TextProps } from './Text.types';
|
|
2
|
+
/**
|
|
3
|
+
* Generates a combined string of Tailwind CSS class names for the Text component
|
|
4
|
+
* based on the provided props. This utility simplifies the process of combining
|
|
5
|
+
* typography, color, font weight, and style classes, ensuring consistency with the
|
|
6
|
+
* design system.
|
|
7
|
+
*
|
|
8
|
+
* @param variant - Specifies the typography variant (e.g., body, heading, display).
|
|
9
|
+
* @param color - Specifies the text color based on the design system's color tokens.
|
|
10
|
+
* @param fontWeight - Specifies the font weight (e.g., regular, bold).
|
|
11
|
+
* @param fontStyle - Specifies the font style (e.g., normal, italic).
|
|
12
|
+
* @param twClassName - Additional custom Tailwind class names to be appended to the generated classes.
|
|
13
|
+
* @returns A string of combined Tailwind CSS class names.
|
|
14
|
+
*
|
|
15
|
+
* Example:
|
|
16
|
+
* ```
|
|
17
|
+
* const classNames = generateTextClassNames({
|
|
18
|
+
* variant: TextVariant.BodyMd,
|
|
19
|
+
* color: TextColor.PrimaryDefault,
|
|
20
|
+
* fontWeight: FontWeight.Bold,
|
|
21
|
+
* fontStyle: FontStyle.Italic,
|
|
22
|
+
* twClassName: 'text-center underline',
|
|
23
|
+
* });
|
|
24
|
+
*
|
|
25
|
+
* console.log(classNames);
|
|
26
|
+
* // Output: "text-body-md font-body-md-bold-italic text-primary-default text-center underline"
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare const generateTextClassNames: ({ variant, color, fontWeight, fontStyle, twClassName, }: Partial<TextProps>) => string;
|
|
30
|
+
//# sourceMappingURL=Text.utilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.utilities.d.ts","sourceRoot":"","sources":["../../../src/components/Text/Text.utilities.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,sBAAsB,4DAMhC,QAAQ,SAAS,CAAC,KAAG,MAavB,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateTextClassNames = void 0;
|
|
4
|
+
/* eslint-disable jsdoc/check-param-names */
|
|
5
|
+
/* eslint-disable jsdoc/require-param */
|
|
6
|
+
const Text_constants_1 = require("./Text.constants");
|
|
7
|
+
const Text_types_1 = require("./Text.types");
|
|
8
|
+
/**
|
|
9
|
+
* Generates a combined string of Tailwind CSS class names for the Text component
|
|
10
|
+
* based on the provided props. This utility simplifies the process of combining
|
|
11
|
+
* typography, color, font weight, and style classes, ensuring consistency with the
|
|
12
|
+
* design system.
|
|
13
|
+
*
|
|
14
|
+
* @param variant - Specifies the typography variant (e.g., body, heading, display).
|
|
15
|
+
* @param color - Specifies the text color based on the design system's color tokens.
|
|
16
|
+
* @param fontWeight - Specifies the font weight (e.g., regular, bold).
|
|
17
|
+
* @param fontStyle - Specifies the font style (e.g., normal, italic).
|
|
18
|
+
* @param twClassName - Additional custom Tailwind class names to be appended to the generated classes.
|
|
19
|
+
* @returns A string of combined Tailwind CSS class names.
|
|
20
|
+
*
|
|
21
|
+
* Example:
|
|
22
|
+
* ```
|
|
23
|
+
* const classNames = generateTextClassNames({
|
|
24
|
+
* variant: TextVariant.BodyMd,
|
|
25
|
+
* color: TextColor.PrimaryDefault,
|
|
26
|
+
* fontWeight: FontWeight.Bold,
|
|
27
|
+
* fontStyle: FontStyle.Italic,
|
|
28
|
+
* twClassName: 'text-center underline',
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* console.log(classNames);
|
|
32
|
+
* // Output: "text-body-md font-body-md-bold-italic text-primary-default text-center underline"
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
const generateTextClassNames = ({ variant = Text_constants_1.DEFAULT_TEXT_VARIANT, color = Text_constants_1.DEFAULT_TEXT_COLOR, fontWeight = Text_types_1.FontWeight.Regular, fontStyle = Text_types_1.FontStyle.Normal, twClassName = '', }) => {
|
|
36
|
+
const fontWeightStyleClassname = Text_constants_1.MAPPING_FONTWEIGHT_TO_FONTFAMILYSTYLECLASSNAME[fontWeight];
|
|
37
|
+
const isItalic = fontStyle === Text_types_1.FontStyle.Italic;
|
|
38
|
+
const textClassname = `text-${variant}`;
|
|
39
|
+
const fontFamilyClassname = `font-${variant}${fontWeightStyleClassname}${isItalic ? '-italic' : ''}`;
|
|
40
|
+
const textColorClassname = `${color}`;
|
|
41
|
+
const mergedClassnames = `${textClassname} ${fontFamilyClassname} ${textColorClassname} ${twClassName}`.trim();
|
|
42
|
+
return mergedClassnames;
|
|
43
|
+
};
|
|
44
|
+
exports.generateTextClassNames = generateTextClassNames;
|
|
45
|
+
//# sourceMappingURL=Text.utilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.utilities.js","sourceRoot":"","sources":["../../../src/components/Text/Text.utilities.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,wCAAwC;AACxC,qDAI0B;AAE1B,6CAAqD;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACI,MAAM,sBAAsB,GAAG,CAAC,EACrC,OAAO,GAAG,qCAAoB,EAC9B,KAAK,GAAG,mCAAkB,EAC1B,UAAU,GAAG,uBAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,sBAAS,CAAC,MAAM,EAC5B,WAAW,GAAG,EAAE,GACG,EAAU,EAAE;IAC/B,MAAM,wBAAwB,GAC5B,+DAA8C,CAAC,UAAU,CAAC,CAAC;IAC7D,MAAM,QAAQ,GAAG,SAAS,KAAK,sBAAS,CAAC,MAAM,CAAC;IAChD,MAAM,aAAa,GAAG,QAAQ,OAAO,EAAE,CAAC;IACxC,MAAM,mBAAmB,GAAG,QAAQ,OAAO,GAAG,wBAAwB,GACpE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EACzB,EAAE,CAAC;IACH,MAAM,kBAAkB,GAAG,GAAG,KAAK,EAAE,CAAC;IACtC,MAAM,gBAAgB,GACpB,GAAG,aAAa,IAAI,mBAAmB,IAAI,kBAAkB,IAAI,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IAExF,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAnBW,QAAA,sBAAsB,0BAmBjC","sourcesContent":["/* eslint-disable jsdoc/check-param-names */\n/* eslint-disable jsdoc/require-param */\nimport {\n DEFAULT_TEXT_COLOR,\n DEFAULT_TEXT_VARIANT,\n MAPPING_FONTWEIGHT_TO_FONTFAMILYSTYLECLASSNAME,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\nimport { FontWeight, FontStyle } from './Text.types';\n\n/**\n * Generates a combined string of Tailwind CSS class names for the Text component\n * based on the provided props. This utility simplifies the process of combining\n * typography, color, font weight, and style classes, ensuring consistency with the\n * design system.\n *\n * @param variant - Specifies the typography variant (e.g., body, heading, display).\n * @param color - Specifies the text color based on the design system's color tokens.\n * @param fontWeight - Specifies the font weight (e.g., regular, bold).\n * @param fontStyle - Specifies the font style (e.g., normal, italic).\n * @param twClassName - Additional custom Tailwind class names to be appended to the generated classes.\n * @returns A string of combined Tailwind CSS class names.\n *\n * Example:\n * ```\n * const classNames = generateTextClassNames({\n * variant: TextVariant.BodyMd,\n * color: TextColor.PrimaryDefault,\n * fontWeight: FontWeight.Bold,\n * fontStyle: FontStyle.Italic,\n * twClassName: 'text-center underline',\n * });\n *\n * console.log(classNames);\n * // Output: \"text-body-md font-body-md-bold-italic text-primary-default text-center underline\"\n * ```\n */\nexport const generateTextClassNames = ({\n variant = DEFAULT_TEXT_VARIANT,\n color = DEFAULT_TEXT_COLOR,\n fontWeight = FontWeight.Regular,\n fontStyle = FontStyle.Normal,\n twClassName = '',\n}: Partial<TextProps>): string => {\n const fontWeightStyleClassname =\n MAPPING_FONTWEIGHT_TO_FONTFAMILYSTYLECLASSNAME[fontWeight];\n const isItalic = fontStyle === FontStyle.Italic;\n const textClassname = `text-${variant}`;\n const fontFamilyClassname = `font-${variant}${fontWeightStyleClassname}${\n isItalic ? '-italic' : ''\n }`;\n const textColorClassname = `${color}`;\n const mergedClassnames =\n `${textClassname} ${fontFamilyClassname} ${textColorClassname} ${twClassName}`.trim();\n\n return mergedClassnames;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,YAAY,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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.FontStyle = exports.FontWeight = exports.TextColor = exports.TextVariant = exports.default = void 0;
|
|
7
|
+
var Text_1 = require("./Text");
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(Text_1).default; } });
|
|
9
|
+
var Text_types_1 = require("./Text.types");
|
|
10
|
+
Object.defineProperty(exports, "TextVariant", { enumerable: true, get: function () { return Text_types_1.TextVariant; } });
|
|
11
|
+
Object.defineProperty(exports, "TextColor", { enumerable: true, get: function () { return Text_types_1.TextColor; } });
|
|
12
|
+
Object.defineProperty(exports, "FontWeight", { enumerable: true, get: function () { return Text_types_1.FontWeight; } });
|
|
13
|
+
Object.defineProperty(exports, "FontStyle", { enumerable: true, get: function () { return Text_types_1.FontStyle; } });
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAiC;AAAxB,gHAAA,OAAO,OAAA;AAEhB,2CAA6E;AAApE,yGAAA,WAAW,OAAA;AAAE,uGAAA,SAAS,OAAA;AAAE,wGAAA,UAAU,OAAA;AAAE,uGAAA,SAAS,OAAA","sourcesContent":["export { default } from './Text';\nexport type { TextProps } from './Text.types';\nexport { TextVariant, TextColor, FontWeight, FontStyle } from './Text.types';\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TextButtonProps } from './TextButton.types';
|
|
2
|
+
export declare const DEFAULT_TEXTBUTTON_PROPS: Required<Pick<TextButtonProps, 'textProps' | 'isLoading' | 'loadingText' | 'spinnerProps' | 'startIconProps' | 'endIconProps' | 'isDisabled' | 'isInverse'>>;
|
|
3
|
+
//# sourceMappingURL=TextButton.constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextButton.constants.d.ts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.constants.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAC7C,IAAI,CACF,eAAe,EACb,WAAW,GACX,WAAW,GACX,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,cAAc,GACd,YAAY,GACZ,WAAW,CACd,CAsBF,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_TEXTBUTTON_PROPS = void 0;
|
|
4
|
+
const Icon_1 = require("../Icon");
|
|
5
|
+
const Text_1 = require("../Text");
|
|
6
|
+
// Defaults
|
|
7
|
+
exports.DEFAULT_TEXTBUTTON_PROPS = {
|
|
8
|
+
textProps: {
|
|
9
|
+
variant: Text_1.TextVariant.BodyMd,
|
|
10
|
+
fontWeight: Text_1.FontWeight.Medium,
|
|
11
|
+
color: Text_1.TextColor.PrimaryDefault,
|
|
12
|
+
},
|
|
13
|
+
isLoading: false,
|
|
14
|
+
loadingText: 'Loading',
|
|
15
|
+
spinnerProps: {
|
|
16
|
+
color: Icon_1.IconColor.IconDefault,
|
|
17
|
+
},
|
|
18
|
+
startIconProps: {
|
|
19
|
+
size: Icon_1.IconSize.Sm,
|
|
20
|
+
testID: 'start-icon',
|
|
21
|
+
},
|
|
22
|
+
endIconProps: {
|
|
23
|
+
size: Icon_1.IconSize.Sm,
|
|
24
|
+
testID: 'end-icon',
|
|
25
|
+
},
|
|
26
|
+
isDisabled: false,
|
|
27
|
+
isInverse: false,
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=TextButton.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextButton.constants.js","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.constants.ts"],"names":[],"mappings":";;;AAAA,kCAA8C;AAC9C,kCAA6D;AAG7D,WAAW;AACE,QAAA,wBAAwB,GAYjC;IACF,SAAS,EAAE;QACT,OAAO,EAAE,kBAAW,CAAC,MAAM;QAC3B,UAAU,EAAE,iBAAU,CAAC,MAAM;QAC7B,KAAK,EAAE,gBAAS,CAAC,cAAc;KAChC;IACD,SAAS,EAAE,KAAK;IAChB,WAAW,EAAE,SAAS;IACtB,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,SAAS,EAAE,KAAK;CACjB,CAAC","sourcesContent":["import { IconSize, IconColor } from '../Icon';\nimport { TextColor, TextVariant, FontWeight } from '../Text';\nimport type { TextButtonProps } from './TextButton.types';\n\n// Defaults\nexport const DEFAULT_TEXTBUTTON_PROPS: Required<\n Pick<\n TextButtonProps,\n | 'textProps'\n | 'isLoading'\n | 'loadingText'\n | 'spinnerProps'\n | 'startIconProps'\n | 'endIconProps'\n | 'isDisabled'\n | 'isInverse'\n >\n> = {\n textProps: {\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.PrimaryDefault,\n },\n isLoading: false,\n loadingText: 'Loading',\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 isInverse: false,\n};\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TextButtonProps } from './TextButton.types';
|
|
3
|
+
declare const TextButton: ({ children, textProps, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isInverse, onPress, onPressIn, onPressOut, onLongPress, twClassName, accessibilityRole, accessibilityLabel, style, ...props }: TextButtonProps) => React.JSX.Element;
|
|
4
|
+
export default TextButton;
|
|
5
|
+
//# sourceMappingURL=TextButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextButton.d.ts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAWjD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAM1D,QAAA,MAAM,UAAU,mSAuBb,eAAe,sBAmMjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|