@metamask-previews/design-system-react-native 0.11.0-preview.fa05289 → 0.13.0-preview.b4e6ece
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/CHANGELOG.md +30 -1
- package/dist/components/AvatarAccount/AvatarAccount.cjs +4 -3
- package/dist/components/AvatarAccount/AvatarAccount.cjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.cjs +9 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.cjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts +2 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts +2 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.constants.mjs +8 -0
- package/dist/components/AvatarAccount/AvatarAccount.constants.mjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.d.cts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.d.mts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.mjs +4 -3
- package/dist/components/AvatarAccount/AvatarAccount.mjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.cjs +3 -3
- package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.cjs +21 -21
- package/dist/components/AvatarBase/AvatarBase.constants.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.d.cts +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.d.cts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.d.mts +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.d.mts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.mjs +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.mjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.d.cts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.d.mts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.types.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.types.d.cts +3 -39
- package/dist/components/AvatarBase/AvatarBase.types.d.cts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.types.d.mts +3 -39
- package/dist/components/AvatarBase/AvatarBase.types.d.mts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.types.mjs.map +1 -1
- package/dist/components/AvatarBase/index.cjs +3 -3
- package/dist/components/AvatarBase/index.cjs.map +1 -1
- package/dist/components/AvatarBase/index.d.cts +1 -1
- package/dist/components/AvatarBase/index.d.cts.map +1 -1
- package/dist/components/AvatarBase/index.d.mts +1 -1
- package/dist/components/AvatarBase/index.d.mts.map +1 -1
- package/dist/components/AvatarBase/index.mjs +1 -1
- package/dist/components/AvatarBase/index.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.types.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts +7 -9
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts +7 -9
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.types.mjs.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.cjs +8 -8
- package/dist/components/BadgeWrapper/BadgeWrapper.cjs.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.d.cts.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.d.mts.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.mjs +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.mjs.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.types.cjs.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.types.d.cts +4 -51
- package/dist/components/BadgeWrapper/BadgeWrapper.types.d.cts.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.types.d.mts +4 -51
- package/dist/components/BadgeWrapper/BadgeWrapper.types.d.mts.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.types.mjs.map +1 -1
- package/dist/components/BadgeWrapper/index.cjs +3 -3
- package/dist/components/BadgeWrapper/index.cjs.map +1 -1
- package/dist/components/BadgeWrapper/index.d.cts +1 -2
- package/dist/components/BadgeWrapper/index.d.cts.map +1 -1
- package/dist/components/BadgeWrapper/index.d.mts +1 -2
- package/dist/components/BadgeWrapper/index.d.mts.map +1 -1
- package/dist/components/BadgeWrapper/index.mjs +1 -1
- package/dist/components/BadgeWrapper/index.mjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +7 -10
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.cts +31 -2
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.mts +31 -2
- package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.mjs +6 -6
- package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.types.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.types.d.cts +3 -8
- package/dist/components/BottomSheet/BottomSheet.types.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.types.d.mts +3 -8
- package/dist/components/BottomSheet/BottomSheet.types.d.mts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.types.mjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +3 -3
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +31 -2
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +31 -2
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +2 -3
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +7 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +7 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -1
- package/dist/components/BottomSheetDialog/index.cjs +2 -5
- package/dist/components/BottomSheetDialog/index.cjs.map +1 -1
- package/dist/components/BottomSheetDialog/index.d.cts +1 -1
- package/dist/components/BottomSheetDialog/index.d.cts.map +1 -1
- package/dist/components/BottomSheetDialog/index.d.mts +1 -1
- package/dist/components/BottomSheetDialog/index.d.mts.map +1 -1
- package/dist/components/BottomSheetDialog/index.mjs +1 -1
- package/dist/components/BottomSheetDialog/index.mjs.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +2 -2
- package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -1
- package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +2 -2
- package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -1
- package/dist/components/BoxHorizontal/BoxHorizontal.cjs +18 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +1 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +7 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +1 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +7 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +1 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.mjs +18 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +1 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs +3 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +1 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +13 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +1 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +13 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +1 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +2 -0
- package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +1 -0
- package/dist/components/BoxHorizontal/index.cjs +6 -0
- package/dist/components/BoxHorizontal/index.cjs.map +1 -0
- package/dist/components/BoxHorizontal/index.d.cts +3 -0
- package/dist/components/BoxHorizontal/index.d.cts.map +1 -0
- package/dist/components/BoxHorizontal/index.d.mts +3 -0
- package/dist/components/BoxHorizontal/index.d.mts.map +1 -0
- package/dist/components/BoxHorizontal/index.mjs +2 -0
- package/dist/components/BoxHorizontal/index.mjs.map +1 -0
- package/dist/components/BoxVertical/BoxVertical.cjs +18 -0
- package/dist/components/BoxVertical/BoxVertical.cjs.map +1 -0
- package/dist/components/BoxVertical/BoxVertical.d.cts +7 -0
- package/dist/components/BoxVertical/BoxVertical.d.cts.map +1 -0
- package/dist/components/BoxVertical/BoxVertical.d.mts +7 -0
- package/dist/components/BoxVertical/BoxVertical.d.mts.map +1 -0
- package/dist/components/BoxVertical/BoxVertical.mjs +18 -0
- package/dist/components/BoxVertical/BoxVertical.mjs.map +1 -0
- package/dist/components/BoxVertical/BoxVertical.types.cjs +3 -0
- package/dist/components/BoxVertical/BoxVertical.types.cjs.map +1 -0
- package/dist/components/BoxVertical/BoxVertical.types.d.cts +13 -0
- package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +1 -0
- package/dist/components/BoxVertical/BoxVertical.types.d.mts +13 -0
- package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +1 -0
- package/dist/components/BoxVertical/BoxVertical.types.mjs +2 -0
- package/dist/components/BoxVertical/BoxVertical.types.mjs.map +1 -0
- package/dist/components/BoxVertical/index.cjs +6 -0
- package/dist/components/BoxVertical/index.cjs.map +1 -0
- package/dist/components/BoxVertical/index.d.cts +3 -0
- package/dist/components/BoxVertical/index.d.cts.map +1 -0
- package/dist/components/BoxVertical/index.d.mts +3 -0
- package/dist/components/BoxVertical/index.d.mts.map +1 -0
- package/dist/components/BoxVertical/index.mjs +2 -0
- package/dist/components/BoxVertical/index.mjs.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.cjs +61 -0
- package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.d.cts +7 -0
- package/dist/components/HeaderRoot/HeaderRoot.d.cts.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.d.mts +7 -0
- package/dist/components/HeaderRoot/HeaderRoot.d.mts.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.mjs +61 -0
- package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.types.cjs +3 -0
- package/dist/components/HeaderRoot/HeaderRoot.types.cjs.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.types.d.cts +60 -0
- package/dist/components/HeaderRoot/HeaderRoot.types.d.cts.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.types.d.mts +60 -0
- package/dist/components/HeaderRoot/HeaderRoot.types.d.mts.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.types.mjs +2 -0
- package/dist/components/HeaderRoot/HeaderRoot.types.mjs.map +1 -0
- package/dist/components/HeaderRoot/index.cjs +6 -0
- package/dist/components/HeaderRoot/index.cjs.map +1 -0
- package/dist/components/HeaderRoot/index.d.cts +3 -0
- package/dist/components/HeaderRoot/index.d.cts.map +1 -0
- package/dist/components/HeaderRoot/index.d.mts +3 -0
- package/dist/components/HeaderRoot/index.d.mts.map +1 -0
- package/dist/components/HeaderRoot/index.mjs +2 -0
- package/dist/components/HeaderRoot/index.mjs.map +1 -0
- package/dist/components/HeaderStandard/HeaderStandard.cjs +101 -0
- package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -0
- package/dist/components/HeaderStandard/HeaderStandard.d.cts +4 -0
- package/dist/components/HeaderStandard/HeaderStandard.d.cts.map +1 -0
- package/dist/components/HeaderStandard/HeaderStandard.d.mts +4 -0
- package/dist/components/HeaderStandard/HeaderStandard.d.mts.map +1 -0
- package/dist/components/HeaderStandard/HeaderStandard.mjs +81 -0
- package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -0
- package/dist/components/HeaderStandard/HeaderStandard.types.cjs +8 -0
- package/dist/components/HeaderStandard/HeaderStandard.types.cjs.map +1 -0
- package/dist/components/HeaderStandard/HeaderStandard.types.d.cts +55 -0
- package/dist/components/HeaderStandard/HeaderStandard.types.d.cts.map +1 -0
- package/dist/components/HeaderStandard/HeaderStandard.types.d.mts +55 -0
- package/dist/components/HeaderStandard/HeaderStandard.types.d.mts.map +1 -0
- package/dist/components/HeaderStandard/HeaderStandard.types.mjs +10 -0
- package/dist/components/HeaderStandard/HeaderStandard.types.mjs.map +1 -0
- package/dist/components/HeaderStandard/index.cjs +6 -0
- package/dist/components/HeaderStandard/index.cjs.map +1 -0
- package/dist/components/HeaderStandard/index.d.cts +3 -0
- package/dist/components/HeaderStandard/index.d.cts.map +1 -0
- package/dist/components/HeaderStandard/index.d.mts +3 -0
- package/dist/components/HeaderStandard/index.d.mts.map +1 -0
- package/dist/components/HeaderStandard/index.mjs +2 -0
- package/dist/components/HeaderStandard/index.mjs.map +1 -0
- package/dist/components/Icon/assets/candlestick.svg +1 -1
- package/dist/components/Input/Input.cjs +4 -3
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.constants.cjs +69 -0
- package/dist/components/Input/Input.constants.cjs.map +1 -0
- package/dist/components/Input/Input.constants.d.cts +11 -0
- package/dist/components/Input/Input.constants.d.cts.map +1 -0
- package/dist/components/Input/Input.constants.d.mts +11 -0
- package/dist/components/Input/Input.constants.d.mts.map +1 -0
- package/dist/components/Input/Input.constants.mjs +66 -0
- package/dist/components/Input/Input.constants.mjs.map +1 -0
- package/dist/components/Input/Input.d.cts.map +1 -1
- package/dist/components/Input/Input.d.mts.map +1 -1
- package/dist/components/Input/Input.mjs +4 -3
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +34 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +13 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +13 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +34 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +40 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +24 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +24 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +40 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.cjs +76 -0
- package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.d.cts +24 -0
- package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.d.mts +24 -0
- package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.mjs +76 -0
- package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.cjs +29 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +177 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +177 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.mjs +26 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +6 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +3 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +3 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +2 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +30 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +16 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +16 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +30 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +1 -0
- package/dist/components/KeyValueRow/index.cjs +12 -0
- package/dist/components/KeyValueRow/index.cjs.map +1 -0
- package/dist/components/KeyValueRow/index.d.cts +3 -0
- package/dist/components/KeyValueRow/index.d.cts.map +1 -0
- package/dist/components/KeyValueRow/index.d.mts +3 -0
- package/dist/components/KeyValueRow/index.d.mts.map +1 -0
- package/dist/components/KeyValueRow/index.mjs +3 -0
- package/dist/components/KeyValueRow/index.mjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.cjs +2 -1
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.cts +1 -2
- package/dist/components/Skeleton/Skeleton.d.cts.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.mts +1 -2
- package/dist/components/Skeleton/Skeleton.d.mts.map +1 -1
- package/dist/components/Skeleton/Skeleton.mjs +1 -2
- package/dist/components/Skeleton/Skeleton.mjs.map +1 -1
- package/dist/components/Skeleton/index.cjs +1 -4
- package/dist/components/Skeleton/index.cjs.map +1 -1
- package/dist/components/Skeleton/index.d.cts +1 -1
- package/dist/components/Skeleton/index.d.cts.map +1 -1
- package/dist/components/Skeleton/index.d.mts +1 -1
- package/dist/components/Skeleton/index.d.mts.map +1 -1
- package/dist/components/Skeleton/index.mjs +1 -1
- package/dist/components/Skeleton/index.mjs.map +1 -1
- package/dist/components/Text/Text.types.cjs.map +1 -1
- package/dist/components/Text/Text.types.d.cts +1 -1
- package/dist/components/Text/Text.types.d.mts +1 -1
- package/dist/components/Text/Text.types.mjs.map +1 -1
- package/dist/components/TextButton/TextButton.cjs +12 -36
- package/dist/components/TextButton/TextButton.cjs.map +1 -1
- package/dist/components/TextButton/TextButton.d.cts.map +1 -1
- package/dist/components/TextButton/TextButton.d.mts.map +1 -1
- package/dist/components/TextButton/TextButton.mjs +14 -38
- package/dist/components/TextButton/TextButton.mjs.map +1 -1
- package/dist/components/TextButton/TextButton.types.cjs.map +1 -1
- package/dist/components/TextButton/TextButton.types.d.cts +8 -60
- package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
- package/dist/components/TextButton/TextButton.types.d.mts +8 -60
- package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
- package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
- package/dist/components/TextButton/index.cjs +1 -3
- package/dist/components/TextButton/index.cjs.map +1 -1
- package/dist/components/TextButton/index.d.cts +0 -1
- package/dist/components/TextButton/index.d.cts.map +1 -1
- package/dist/components/TextButton/index.d.mts +0 -1
- package/dist/components/TextButton/index.d.mts.map +1 -1
- package/dist/components/TextButton/index.mjs +0 -1
- package/dist/components/TextButton/index.mjs.map +1 -1
- package/dist/components/TextField/TextField.cjs +22 -8
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.cts +0 -2
- package/dist/components/TextField/TextField.d.cts.map +1 -1
- package/dist/components/TextField/TextField.d.mts +0 -2
- package/dist/components/TextField/TextField.d.mts.map +1 -1
- package/dist/components/TextField/TextField.mjs +22 -8
- package/dist/components/TextField/TextField.mjs.map +1 -1
- package/dist/components/TextField/TextField.types.cjs +0 -10
- package/dist/components/TextField/TextField.types.cjs.map +1 -1
- package/dist/components/TextField/TextField.types.d.cts +0 -14
- package/dist/components/TextField/TextField.types.d.cts.map +1 -1
- package/dist/components/TextField/TextField.types.d.mts +0 -14
- package/dist/components/TextField/TextField.types.d.mts.map +1 -1
- package/dist/components/TextField/TextField.types.mjs +1 -9
- package/dist/components/TextField/TextField.types.mjs.map +1 -1
- package/dist/components/TextField/index.cjs +1 -3
- package/dist/components/TextField/index.cjs.map +1 -1
- package/dist/components/TextField/index.d.cts +0 -1
- package/dist/components/TextField/index.d.cts.map +1 -1
- package/dist/components/TextField/index.d.mts +0 -1
- package/dist/components/TextField/index.d.mts.map +1 -1
- package/dist/components/TextField/index.mjs +0 -1
- package/dist/components/TextField/index.mjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs +45 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +14 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +14 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs +26 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs +3 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts +17 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts +17 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts.map +1 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs +2 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs.map +1 -0
- package/dist/components/TextFieldSearch/index.cjs +6 -0
- package/dist/components/TextFieldSearch/index.cjs.map +1 -0
- package/dist/components/TextFieldSearch/index.d.cts +3 -0
- package/dist/components/TextFieldSearch/index.d.cts.map +1 -0
- package/dist/components/TextFieldSearch/index.d.mts +3 -0
- package/dist/components/TextFieldSearch/index.d.mts.map +1 -0
- package/dist/components/TextFieldSearch/index.mjs +2 -0
- package/dist/components/TextFieldSearch/index.mjs.map +1 -0
- package/dist/components/Toast/Toast.cjs +2 -2
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.d.cts +1 -2
- package/dist/components/Toast/Toast.d.cts.map +1 -1
- package/dist/components/Toast/Toast.d.mts +1 -2
- package/dist/components/Toast/Toast.d.mts.map +1 -1
- package/dist/components/Toast/Toast.mjs +1 -2
- package/dist/components/Toast/Toast.mjs.map +1 -1
- package/dist/components/Toast/index.cjs +1 -4
- package/dist/components/Toast/index.cjs.map +1 -1
- package/dist/components/Toast/index.d.cts +1 -1
- package/dist/components/Toast/index.d.cts.map +1 -1
- package/dist/components/Toast/index.d.mts +1 -1
- package/dist/components/Toast/index.d.mts.map +1 -1
- package/dist/components/Toast/index.mjs +1 -1
- package/dist/components/Toast/index.mjs.map +1 -1
- package/dist/components/index.cjs +14 -8
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +13 -3
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +13 -3
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +8 -3
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.cjs.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts +2 -5
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts +2 -5
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.mjs.map +1 -1
- package/dist/types/index.cjs +20 -71
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +10 -82
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +10 -82
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +10 -78
- package/dist/types/index.mjs.map +1 -1
- package/package.json +7 -8
- package/dist/components/TextButton/TextButton.constants.cjs +0 -12
- package/dist/components/TextButton/TextButton.constants.cjs.map +0 -1
- package/dist/components/TextButton/TextButton.constants.d.cts +0 -4
- package/dist/components/TextButton/TextButton.constants.d.cts.map +0 -1
- package/dist/components/TextButton/TextButton.constants.d.mts +0 -4
- package/dist/components/TextButton/TextButton.constants.d.mts.map +0 -1
- package/dist/components/TextButton/TextButton.constants.mjs +0 -9
- package/dist/components/TextButton/TextButton.constants.mjs.map +0 -1
- package/dist/components/TextField/TextField.constants.cjs +0 -13
- package/dist/components/TextField/TextField.constants.cjs.map +0 -1
- package/dist/components/TextField/TextField.constants.d.cts +0 -6
- package/dist/components/TextField/TextField.constants.d.cts.map +0 -1
- package/dist/components/TextField/TextField.constants.d.mts +0 -6
- package/dist/components/TextField/TextField.constants.d.mts.map +0 -1
- package/dist/components/TextField/TextField.constants.mjs +0 -10
- package/dist/components/TextField/TextField.constants.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,0BAAsB;AAC9D,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,YAAY,EACZ,SAAS,EAQV,gCAA4B","sourcesContent":["export { KeyValueRow, KeyValueRowStubs } from './KeyValueRow';\nexport {\n KeyValueRowSectionAlignments,\n KeyValueRowFieldIconSides,\n TooltipSizes,\n IconSizes,\n type KeyValueRowTooltip,\n type KeyValueRowField,\n type PreDefinedKeyValueRowLabel,\n type KeyValueRowLabelProps,\n type KeyValueRowRootProps,\n type KeyValueSectionProps,\n type KeyValueRowProps,\n} from './KeyValueRow.types';\n"]}
|
|
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Skeleton = void 0;
|
|
26
27
|
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
27
28
|
const react_1 = __importStar(require("react"));
|
|
28
29
|
const react_native_1 = require("react-native/index.js");
|
|
@@ -82,5 +83,5 @@ const Skeleton = ({ height, width, children, hideChildren = false, style, childr
|
|
|
82
83
|
</react_native_1.View>)}
|
|
83
84
|
</react_native_1.View>);
|
|
84
85
|
};
|
|
85
|
-
exports.
|
|
86
|
+
exports.Skeleton = Skeleton;
|
|
86
87
|
//# sourceMappingURL=Skeleton.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Skeleton.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAiD;AACjD,wDAA8C;AAIvC,MAAM,QAAQ,GAA4B,CAAC,EAChD,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,KAAK,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,IAAI,uBAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,CAAC;IAEhE,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,uBAAQ,CAAC,QAAQ,CAAC;YAChB,uBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;YACF,uBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;SACH,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxB,2EAA2E;YAC3E,IAAI,QAAQ,EAAE;gBACZ,cAAc,EAAE,CAAC;aAClB;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,QAAQ,IAAI,CAAC,CAAC,WAAW,IAAI,YAAY,CAAC,EAAE;YAC9C,cAAc,EAAE,CAAC;SAClB;QAED,OAAO,GAAG,EAAE;YACV,WAAW,CAAC,aAAa,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE1C,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE;QAChC,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;KACxB;IAED,OAAO,CACL,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,WAAW,CAAC;YAChD,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE;YAClC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE;YAChC,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,uBAAQ,CAAC,IAAI,CACZ,IAAI,iBAAiB,CAAC,CACtB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,8CAA8C,CAAC;YACxD,EAAE,OAAO,EAAE,WAAW,EAAE;YACxB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CACF,aAAa,CAAC,MAAM,EAGtB;;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,mBAAI,CACH,IAAI,oBAAoB,CAAC,CACzB,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC;gBACnC,oBAAoB,EAAE,KAAK;aAC5B,CAAC,CACF,aAAa,CAAC,MAAM,CACpB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,CAE/C;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,mBAAI,CAAC,CACR,CACH;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAxFW,QAAA,QAAQ,YAwFnB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nexport const Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,
|
|
1
|
+
{"version":3,"file":"Skeleton.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwF5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,
|
|
1
|
+
{"version":3,"file":"Skeleton.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwF5C,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
|
|
|
8
8
|
import $React, { useEffect, useRef } from "react";
|
|
9
9
|
const React = $importDefault($React);
|
|
10
10
|
import { Animated, View } from "react-native/index.js";
|
|
11
|
-
const Skeleton = ({ height, width, children, hideChildren = false, style, childrenWrapperProps, animatedViewProps, twClassName, autoPlay = true, ...props }) => {
|
|
11
|
+
export const Skeleton = ({ height, width, children, hideChildren = false, style, childrenWrapperProps, animatedViewProps, twClassName, autoPlay = true, ...props }) => {
|
|
12
12
|
const tw = useTailwind();
|
|
13
13
|
const opacityAnim = useRef(new Animated.Value(0.2)).current;
|
|
14
14
|
const hasChildren = children !== null && children !== undefined;
|
|
@@ -64,5 +64,4 @@ const Skeleton = ({ height, width, children, hideChildren = false, style, childr
|
|
|
64
64
|
</View>)}
|
|
65
65
|
</View>);
|
|
66
66
|
};
|
|
67
|
-
export default Skeleton;
|
|
68
67
|
//# sourceMappingURL=Skeleton.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc;;AACjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,8BAAqB;AAI9C,MAAM,QAAQ,GAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"Skeleton.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc;;AACjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,8BAAqB;AAI9C,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAChD,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,KAAK,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,CAAC;IAEhE,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,QAAQ,CAAC,QAAQ,CAAC;YAChB,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;YACF,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;SACH,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxB,2EAA2E;YAC3E,IAAI,QAAQ,EAAE;gBACZ,cAAc,EAAE,CAAC;aAClB;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,QAAQ,IAAI,CAAC,CAAC,WAAW,IAAI,YAAY,CAAC,EAAE;YAC9C,cAAc,EAAE,CAAC;SAClB;QAED,OAAO,GAAG,EAAE;YACV,WAAW,CAAC,aAAa,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE1C,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE;QAChC,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;KACxB;IAED,OAAO,CACL,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,WAAW,CAAC;YAChD,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE;YAClC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE;YAChC,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CAAC,IAAI,CACZ,IAAI,iBAAiB,CAAC,CACtB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,8CAA8C,CAAC;YACxD,EAAE,OAAO,EAAE,WAAW,EAAE;YACxB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CACF,aAAa,CAAC,MAAM,EAGtB;;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,IAAI,CACH,IAAI,oBAAoB,CAAC,CACzB,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC;gBACnC,oBAAoB,EAAE,KAAK;aAC5B,CAAC,CACF,aAAa,CAAC,MAAM,CACpB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,CAE/C;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nexport const Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n"]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.Skeleton = void 0;
|
|
7
4
|
var Skeleton_1 = require("./Skeleton.cjs");
|
|
8
|
-
Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return
|
|
5
|
+
Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return Skeleton_1.Skeleton; } });
|
|
9
6
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAA7B,oGAAA,QAAQ,OAAA","sourcesContent":["export { Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Skeleton } from "./Skeleton.mjs";
|
|
2
2
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB","sourcesContent":["export { Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\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 control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold:
|
|
1
|
+
{"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\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 control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\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 control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold:
|
|
1
|
+
{"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\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 control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\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"]}
|
|
@@ -24,45 +24,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.TextButton = void 0;
|
|
27
|
-
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
28
27
|
const react_1 = __importStar(require("react"));
|
|
29
|
-
const react_native_1 = require("react-native/index.js");
|
|
30
28
|
const types_1 = require("../../types/index.cjs");
|
|
31
|
-
const Icon_1 = require("../Icon/index.cjs");
|
|
32
29
|
const Text_1 = require("../Text/index.cjs");
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
return 'text-primary-inverse';
|
|
46
|
-
}
|
|
47
|
-
return pressed ? 'text-primary-default-pressed' : 'text-primary-default';
|
|
48
|
-
}, [isInverse]);
|
|
49
|
-
const getTextDecoration = (0, react_1.useCallback)((pressed) => isInverse || pressed ? 'underline' : 'no-underline', [isInverse]);
|
|
50
|
-
return (<Text_1.Text>
|
|
51
|
-
<react_native_1.Pressable accessibilityRole={accessibilityRole ?? 'button'} accessibilityLabel={accessibilityLabel} disabled={isDisabled} style={({ pressed }) => [
|
|
52
|
-
{ transform: [{ translateY: baselineOffset }] },
|
|
53
|
-
tw `flex-row items-center ${pressed ? 'bg-pressed' : 'bg-transparent'} ${isDisabled ? 'opacity-50' : 'opacity-100'} ${twClassName}`,
|
|
54
|
-
style,
|
|
55
|
-
]} {...props}>
|
|
56
|
-
{({ pressed }) => (<>
|
|
57
|
-
{startIconName ? (<Icon_1.Icon name={startIconName} size={Icon_1.IconSize.Sm} testID="start-icon" twClassName={`${getTextColor(pressed)} mr-1`} {...startIconProps}/>) : (startAccessory)}
|
|
58
|
-
|
|
59
|
-
<Text_1.Text variant={TextButton_constants_1.MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size]} fontWeight={Text_1.FontWeight.Medium} {...textProps} twClassName={` ${getTextColor(pressed)} ${getTextDecoration(pressed)} ${textProps?.twClassName ?? ''} `}>
|
|
60
|
-
{children}
|
|
61
|
-
</Text_1.Text>
|
|
62
|
-
|
|
63
|
-
{endIconName ? (<Icon_1.Icon name={endIconName} size={Icon_1.IconSize.Sm} testID="end-icon" twClassName={`${getTextColor(pressed)} ml-1`} {...endIconProps}/>) : (endAccessory)}
|
|
64
|
-
</>)}
|
|
65
|
-
</react_native_1.Pressable>
|
|
30
|
+
const TextButton = ({ children, variant = types_1.TextVariant.BodyMd, fontWeight = Text_1.FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
|
|
31
|
+
const [pressed, setPressed] = (0, react_1.useState)(false);
|
|
32
|
+
const handlePressIn = (e) => {
|
|
33
|
+
setPressed(true);
|
|
34
|
+
onPressIn?.(e);
|
|
35
|
+
};
|
|
36
|
+
const handlePressOut = (e) => {
|
|
37
|
+
setPressed(false);
|
|
38
|
+
onPressOut?.(e);
|
|
39
|
+
};
|
|
40
|
+
return (<Text_1.Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? types_1.TextColor.PrimaryDefaultPressed : types_1.TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
|
|
41
|
+
{children}
|
|
66
42
|
</Text_1.Text>);
|
|
67
43
|
};
|
|
68
44
|
exports.TextButton = TextButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAExC,iDAAqD;AACrD,4CAA2C;AAIpC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,mBAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,iBAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,iBAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,iBAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,WAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,UAAU,cA0CrB","sourcesContent":["import React, { useState } from 'react';\n\nimport { TextVariant, TextColor } from '../../types';\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
|
|
@@ -4,46 +4,22 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import {
|
|
8
|
-
import $React, { useCallback } from "react";
|
|
7
|
+
import $React, { useState } from "react";
|
|
9
8
|
const React = $importDefault($React);
|
|
10
|
-
import {
|
|
11
|
-
import { TextButtonSize } from "../../types/index.mjs";
|
|
12
|
-
import { Icon, IconSize } from "../Icon/index.mjs";
|
|
9
|
+
import { TextVariant, TextColor } from "../../types/index.mjs";
|
|
13
10
|
import { Text, FontWeight } from "../Text/index.mjs";
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return 'text-primary-inverse';
|
|
27
|
-
}
|
|
28
|
-
return pressed ? 'text-primary-default-pressed' : 'text-primary-default';
|
|
29
|
-
}, [isInverse]);
|
|
30
|
-
const getTextDecoration = useCallback((pressed) => isInverse || pressed ? 'underline' : 'no-underline', [isInverse]);
|
|
31
|
-
return (<Text>
|
|
32
|
-
<Pressable accessibilityRole={accessibilityRole ?? 'button'} accessibilityLabel={accessibilityLabel} disabled={isDisabled} style={({ pressed }) => [
|
|
33
|
-
{ transform: [{ translateY: baselineOffset }] },
|
|
34
|
-
tw `flex-row items-center ${pressed ? 'bg-pressed' : 'bg-transparent'} ${isDisabled ? 'opacity-50' : 'opacity-100'} ${twClassName}`,
|
|
35
|
-
style,
|
|
36
|
-
]} {...props}>
|
|
37
|
-
{({ pressed }) => (<>
|
|
38
|
-
{startIconName ? (<Icon name={startIconName} size={IconSize.Sm} testID="start-icon" twClassName={`${getTextColor(pressed)} mr-1`} {...startIconProps}/>) : (startAccessory)}
|
|
39
|
-
|
|
40
|
-
<Text variant={MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size]} fontWeight={FontWeight.Medium} {...textProps} twClassName={` ${getTextColor(pressed)} ${getTextDecoration(pressed)} ${textProps?.twClassName ?? ''} `}>
|
|
41
|
-
{children}
|
|
42
|
-
</Text>
|
|
43
|
-
|
|
44
|
-
{endIconName ? (<Icon name={endIconName} size={IconSize.Sm} testID="end-icon" twClassName={`${getTextColor(pressed)} ml-1`} {...endIconProps}/>) : (endAccessory)}
|
|
45
|
-
</>)}
|
|
46
|
-
</Pressable>
|
|
11
|
+
export const TextButton = ({ children, variant = TextVariant.BodyMd, fontWeight = FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
|
|
12
|
+
const [pressed, setPressed] = useState(false);
|
|
13
|
+
const handlePressIn = (e) => {
|
|
14
|
+
setPressed(true);
|
|
15
|
+
onPressIn?.(e);
|
|
16
|
+
};
|
|
17
|
+
const handlePressOut = (e) => {
|
|
18
|
+
setPressed(false);
|
|
19
|
+
onPressOut?.(e);
|
|
20
|
+
};
|
|
21
|
+
return (<Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
|
|
22
|
+
{children}
|
|
47
23
|
</Text>);
|
|
48
24
|
};
|
|
49
25
|
//# sourceMappingURL=TextButton.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAExC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,8BAAoB;AACrD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,0BAAgB;AAI3C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\n\nimport { TextVariant, TextColor } from '../../types';\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.types.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"TextButton.types.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Props for `TextButton`, a text-only control for links and inline actions.\n * Extends {@link Text} props.\n */\nexport type TextButtonProps = Omit<\n TextProps,\n 'children' | 'color' | 'onPress'\n> & {\n /**\n * Content shown as the label.\n */\n children: React.ReactNode;\n /**\n * Called when the user presses the label. Primary interaction for this control.\n */\n onPress?: TextProps['onPress'];\n};\n"]}
|
|
@@ -1,68 +1,16 @@
|
|
|
1
|
-
import type { PressableProps, StyleProp, ViewStyle } from "react-native/index.js";
|
|
2
|
-
import type { TextButtonSize } from "../../types/index.cjs";
|
|
3
|
-
import type { IconProps, IconName } from "../Icon/index.cjs";
|
|
4
1
|
import type { TextProps } from "../Text/index.cjs";
|
|
5
2
|
/**
|
|
6
|
-
* TextButton
|
|
3
|
+
* Props for `TextButton`, a text-only control for links and inline actions.
|
|
4
|
+
* Extends {@link Text} props.
|
|
7
5
|
*/
|
|
8
|
-
export type TextButtonProps = {
|
|
6
|
+
export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & {
|
|
9
7
|
/**
|
|
10
|
-
*
|
|
8
|
+
* Content shown as the label.
|
|
11
9
|
*/
|
|
12
|
-
children:
|
|
10
|
+
children: React.ReactNode;
|
|
13
11
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @default TextButtonSize.BodyMd
|
|
12
|
+
* Called when the user presses the label. Primary interaction for this control.
|
|
17
13
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* Optional props to be passed to the Text component when children is a string
|
|
21
|
-
*/
|
|
22
|
-
textProps?: Omit<Partial<TextProps>, 'children'>;
|
|
23
|
-
/**
|
|
24
|
-
* Optional prop to specify an icon to show at the start of the button
|
|
25
|
-
*/
|
|
26
|
-
startIconName?: IconName;
|
|
27
|
-
/**
|
|
28
|
-
* Optional prop to pass additional properties to the start icon
|
|
29
|
-
*/
|
|
30
|
-
startIconProps?: Partial<IconProps>;
|
|
31
|
-
/**
|
|
32
|
-
* Optional prop for a custom element to show at the start of the button
|
|
33
|
-
*/
|
|
34
|
-
startAccessory?: React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* Optional prop to specify an icon to show at the end of the button
|
|
37
|
-
*/
|
|
38
|
-
endIconName?: IconName;
|
|
39
|
-
/**
|
|
40
|
-
* Optional prop to pass additional properties to the end icon
|
|
41
|
-
*/
|
|
42
|
-
endIconProps?: Partial<IconProps>;
|
|
43
|
-
/**
|
|
44
|
-
* Optional prop for a custom element to show at the end of the button
|
|
45
|
-
*/
|
|
46
|
-
endAccessory?: React.ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
* Optional prop that when true, disables the button
|
|
49
|
-
*
|
|
50
|
-
* @default false
|
|
51
|
-
*/
|
|
52
|
-
isDisabled?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.
|
|
55
|
-
*
|
|
56
|
-
* @default false
|
|
57
|
-
*/
|
|
58
|
-
isInverse?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Optional prop to add twrnc overriding classNames.
|
|
61
|
-
*/
|
|
62
|
-
twClassName?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Optional prop to control the style.
|
|
65
|
-
*/
|
|
66
|
-
style?: StyleProp<ViewStyle>;
|
|
67
|
-
} & Omit<PressableProps, 'disabled'>;
|
|
14
|
+
onPress?: TextProps['onPress'];
|
|
15
|
+
};
|
|
68
16
|
//# sourceMappingURL=TextButton.types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TextButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GAAG;IACF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
|
|
@@ -1,68 +1,16 @@
|
|
|
1
|
-
import type { PressableProps, StyleProp, ViewStyle } from "react-native/index.js";
|
|
2
|
-
import type { TextButtonSize } from "../../types/index.mjs";
|
|
3
|
-
import type { IconProps, IconName } from "../Icon/index.mjs";
|
|
4
1
|
import type { TextProps } from "../Text/index.mjs";
|
|
5
2
|
/**
|
|
6
|
-
* TextButton
|
|
3
|
+
* Props for `TextButton`, a text-only control for links and inline actions.
|
|
4
|
+
* Extends {@link Text} props.
|
|
7
5
|
*/
|
|
8
|
-
export type TextButtonProps = {
|
|
6
|
+
export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & {
|
|
9
7
|
/**
|
|
10
|
-
*
|
|
8
|
+
* Content shown as the label.
|
|
11
9
|
*/
|
|
12
|
-
children:
|
|
10
|
+
children: React.ReactNode;
|
|
13
11
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* @default TextButtonSize.BodyMd
|
|
12
|
+
* Called when the user presses the label. Primary interaction for this control.
|
|
17
13
|
*/
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
* Optional props to be passed to the Text component when children is a string
|
|
21
|
-
*/
|
|
22
|
-
textProps?: Omit<Partial<TextProps>, 'children'>;
|
|
23
|
-
/**
|
|
24
|
-
* Optional prop to specify an icon to show at the start of the button
|
|
25
|
-
*/
|
|
26
|
-
startIconName?: IconName;
|
|
27
|
-
/**
|
|
28
|
-
* Optional prop to pass additional properties to the start icon
|
|
29
|
-
*/
|
|
30
|
-
startIconProps?: Partial<IconProps>;
|
|
31
|
-
/**
|
|
32
|
-
* Optional prop for a custom element to show at the start of the button
|
|
33
|
-
*/
|
|
34
|
-
startAccessory?: React.ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* Optional prop to specify an icon to show at the end of the button
|
|
37
|
-
*/
|
|
38
|
-
endIconName?: IconName;
|
|
39
|
-
/**
|
|
40
|
-
* Optional prop to pass additional properties to the end icon
|
|
41
|
-
*/
|
|
42
|
-
endIconProps?: Partial<IconProps>;
|
|
43
|
-
/**
|
|
44
|
-
* Optional prop for a custom element to show at the end of the button
|
|
45
|
-
*/
|
|
46
|
-
endAccessory?: React.ReactNode;
|
|
47
|
-
/**
|
|
48
|
-
* Optional prop that when true, disables the button
|
|
49
|
-
*
|
|
50
|
-
* @default false
|
|
51
|
-
*/
|
|
52
|
-
isDisabled?: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.
|
|
55
|
-
*
|
|
56
|
-
* @default false
|
|
57
|
-
*/
|
|
58
|
-
isInverse?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Optional prop to add twrnc overriding classNames.
|
|
61
|
-
*/
|
|
62
|
-
twClassName?: string;
|
|
63
|
-
/**
|
|
64
|
-
* Optional prop to control the style.
|
|
65
|
-
*/
|
|
66
|
-
style?: StyleProp<ViewStyle>;
|
|
67
|
-
} & Omit<PressableProps, 'disabled'>;
|
|
14
|
+
onPress?: TextProps['onPress'];
|
|
15
|
+
};
|
|
68
16
|
//# sourceMappingURL=TextButton.types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"TextButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GAAG;IACF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
|