@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,81 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
// Third party dependencies.
|
|
8
|
+
import $React, { useMemo } from "react";
|
|
9
|
+
const React = $importDefault($React);
|
|
10
|
+
// External dependencies.
|
|
11
|
+
import { BoxAlignItems } from "../Box/index.mjs";
|
|
12
|
+
import { BoxVertical } from "../BoxVertical/index.mjs";
|
|
13
|
+
import { HeaderBase } from "../HeaderBase/index.mjs";
|
|
14
|
+
import { IconName } from "../Icon/index.mjs";
|
|
15
|
+
import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
16
|
+
import { FontWeight, TextColor, TextVariant } from "../Text/index.mjs";
|
|
17
|
+
export const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children, onBack, backButtonProps, onClose, closeButtonProps, endButtonIconProps, startButtonIconProps, twClassName = '', testID, ...headerBaseProps }) => {
|
|
18
|
+
const resolvedStartButtonIconProps = useMemo(() => {
|
|
19
|
+
if (startButtonIconProps) {
|
|
20
|
+
return startButtonIconProps;
|
|
21
|
+
}
|
|
22
|
+
if (onBack || backButtonProps) {
|
|
23
|
+
const startProps = {
|
|
24
|
+
iconName: IconName.ArrowLeft,
|
|
25
|
+
...(backButtonProps ?? {}),
|
|
26
|
+
onPress: backButtonProps?.onPress ?? onBack,
|
|
27
|
+
};
|
|
28
|
+
return startProps;
|
|
29
|
+
}
|
|
30
|
+
return undefined;
|
|
31
|
+
}, [onBack, backButtonProps, startButtonIconProps]);
|
|
32
|
+
const resolvedEndButtonIconProps = useMemo(() => {
|
|
33
|
+
const props = [];
|
|
34
|
+
if (onClose || closeButtonProps) {
|
|
35
|
+
const closeProps = {
|
|
36
|
+
iconName: IconName.Close,
|
|
37
|
+
...(closeButtonProps || {}),
|
|
38
|
+
onPress: closeButtonProps?.onPress ?? onClose,
|
|
39
|
+
};
|
|
40
|
+
props.push(closeProps);
|
|
41
|
+
}
|
|
42
|
+
if (endButtonIconProps) {
|
|
43
|
+
props.push(...endButtonIconProps);
|
|
44
|
+
}
|
|
45
|
+
return props.length > 0 ? props : undefined;
|
|
46
|
+
}, [endButtonIconProps, onClose, closeButtonProps]);
|
|
47
|
+
const renderContent = () => {
|
|
48
|
+
if (children) {
|
|
49
|
+
return children;
|
|
50
|
+
}
|
|
51
|
+
if (title) {
|
|
52
|
+
let subtitleTextProps;
|
|
53
|
+
if (subtitle && typeof subtitle === 'string') {
|
|
54
|
+
const { twClassName: subtitleTwClassName, ...subtitleTextRest } = subtitleProps ?? {};
|
|
55
|
+
subtitleTextProps = {
|
|
56
|
+
variant: TextVariant.BodySm,
|
|
57
|
+
color: TextColor.TextAlternative,
|
|
58
|
+
...subtitleTextRest,
|
|
59
|
+
twClassName: ['-mt-0.5', subtitleTwClassName]
|
|
60
|
+
.filter(Boolean)
|
|
61
|
+
.join(' '),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return (<BoxVertical alignItems={BoxAlignItems.Center} textProps={{
|
|
65
|
+
variant: TextVariant.BodyMd,
|
|
66
|
+
fontWeight: FontWeight.Bold,
|
|
67
|
+
...titleProps,
|
|
68
|
+
}} bottomAccessory={subtitle ? (<TextOrChildren textProps={subtitleTextProps}>
|
|
69
|
+
{subtitle}
|
|
70
|
+
</TextOrChildren>) : undefined}>
|
|
71
|
+
{title}
|
|
72
|
+
</BoxVertical>);
|
|
73
|
+
}
|
|
74
|
+
return null;
|
|
75
|
+
};
|
|
76
|
+
return (<HeaderBase testID={testID} startButtonIconProps={resolvedStartButtonIconProps} endButtonIconProps={resolvedEndButtonIconProps} {...headerBaseProps} twClassName={`px-2 ${twClassName}`}>
|
|
77
|
+
{renderContent()}
|
|
78
|
+
</HeaderBase>);
|
|
79
|
+
};
|
|
80
|
+
HeaderStandard.displayName = 'HeaderStandard';
|
|
81
|
+
//# sourceMappingURL=HeaderStandard.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandard.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AAEvC,yBAAyB;AACzB,OAAO,EAAE,aAAa,EAAE,yBAAe;AACvC,OAAO,EAAE,WAAW,EAAE,iCAAuB;AAE7C,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,0BAAgB;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,OAAO,CAAC,GA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{ useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxVertical } from '../BoxVertical';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxVertical\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxVertical>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
// Third party dependencies.
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
//# sourceMappingURL=HeaderStandard.types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandard.types.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":";;;;;AAAA,4BAA4B;AAC5B,kDAA0B","sourcesContent":["// Third party dependencies.\nimport React from 'react';\n\n// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { HeaderBaseProps } from '../HeaderBase';\nimport type { TextProps } from '../Text';\n\n/**\n * HeaderStandard component props.\n */\nexport type HeaderStandardProps = HeaderBaseProps & {\n /**\n * Title to display in the header. Can be a string or a React node.\n * Used as children if children prop is not provided.\n * When string: rendered with TextVariant.BodyMd and FontWeight.Bold by default; titleProps apply.\n * When node: rendered as-is; titleProps are not applied.\n */\n title?: string | React.ReactNode;\n /**\n * Additional props to pass to the title Text component.\n * Props are spread to the Text component and can override default values.\n * Only applied when title is a string.\n */\n titleProps?: Partial<TextProps>;\n /**\n * Subtitle to display below the title. Can be a string or a React node.\n * When string: rendered with TextVariant.BodySm and TextColor.TextAlternative by default; subtitleProps apply.\n * When node: rendered as-is; subtitleProps are not applied (add spacing on your root if needed, e.g. twClassName).\n */\n subtitle?: string | React.ReactNode;\n /**\n * Additional props to pass to the subtitle Text component.\n * Props are spread to the Text component and can override default values.\n * Only applied when subtitle is a string.\n */\n subtitleProps?: Partial<TextProps>;\n /**\n * Callback when the back button is pressed.\n * If provided, a back button will be rendered as startButtonIconProps.\n */\n onBack?: () => void;\n /**\n * Additional props to pass to the back ButtonIcon.\n * If provided, a back button will be rendered as startButtonIconProps with these props spread.\n */\n backButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n /**\n * Callback when the close button is pressed.\n * If provided, a close button will be added to endButtonIconProps.\n */\n onClose?: () => void;\n /**\n * Additional props to pass to the close ButtonIcon.\n * If provided, a close button will be added to endButtonIconProps with these props spread.\n */\n closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n};\n"]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ButtonIconProps } from "../ButtonIcon/index.cjs";
|
|
3
|
+
import type { HeaderBaseProps } from "../HeaderBase/index.cjs";
|
|
4
|
+
import type { TextProps } from "../Text/index.cjs";
|
|
5
|
+
/**
|
|
6
|
+
* HeaderStandard component props.
|
|
7
|
+
*/
|
|
8
|
+
export type HeaderStandardProps = HeaderBaseProps & {
|
|
9
|
+
/**
|
|
10
|
+
* Title to display in the header. Can be a string or a React node.
|
|
11
|
+
* Used as children if children prop is not provided.
|
|
12
|
+
* When string: rendered with TextVariant.BodyMd and FontWeight.Bold by default; titleProps apply.
|
|
13
|
+
* When node: rendered as-is; titleProps are not applied.
|
|
14
|
+
*/
|
|
15
|
+
title?: string | React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Additional props to pass to the title Text component.
|
|
18
|
+
* Props are spread to the Text component and can override default values.
|
|
19
|
+
* Only applied when title is a string.
|
|
20
|
+
*/
|
|
21
|
+
titleProps?: Partial<TextProps>;
|
|
22
|
+
/**
|
|
23
|
+
* Subtitle to display below the title. Can be a string or a React node.
|
|
24
|
+
* When string: rendered with TextVariant.BodySm and TextColor.TextAlternative by default; subtitleProps apply.
|
|
25
|
+
* When node: rendered as-is; subtitleProps are not applied (add spacing on your root if needed, e.g. twClassName).
|
|
26
|
+
*/
|
|
27
|
+
subtitle?: string | React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Additional props to pass to the subtitle Text component.
|
|
30
|
+
* Props are spread to the Text component and can override default values.
|
|
31
|
+
* Only applied when subtitle is a string.
|
|
32
|
+
*/
|
|
33
|
+
subtitleProps?: Partial<TextProps>;
|
|
34
|
+
/**
|
|
35
|
+
* Callback when the back button is pressed.
|
|
36
|
+
* If provided, a back button will be rendered as startButtonIconProps.
|
|
37
|
+
*/
|
|
38
|
+
onBack?: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* Additional props to pass to the back ButtonIcon.
|
|
41
|
+
* If provided, a back button will be rendered as startButtonIconProps with these props spread.
|
|
42
|
+
*/
|
|
43
|
+
backButtonProps?: Omit<ButtonIconProps, 'iconName'>;
|
|
44
|
+
/**
|
|
45
|
+
* Callback when the close button is pressed.
|
|
46
|
+
* If provided, a close button will be added to endButtonIconProps.
|
|
47
|
+
*/
|
|
48
|
+
onClose?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Additional props to pass to the close ButtonIcon.
|
|
51
|
+
* If provided, a close button will be added to endButtonIconProps with these props spread.
|
|
52
|
+
*/
|
|
53
|
+
closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=HeaderStandard.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandard.types.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG;IAClD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACpC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CACtD,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ButtonIconProps } from "../ButtonIcon/index.mjs";
|
|
3
|
+
import type { HeaderBaseProps } from "../HeaderBase/index.mjs";
|
|
4
|
+
import type { TextProps } from "../Text/index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* HeaderStandard component props.
|
|
7
|
+
*/
|
|
8
|
+
export type HeaderStandardProps = HeaderBaseProps & {
|
|
9
|
+
/**
|
|
10
|
+
* Title to display in the header. Can be a string or a React node.
|
|
11
|
+
* Used as children if children prop is not provided.
|
|
12
|
+
* When string: rendered with TextVariant.BodyMd and FontWeight.Bold by default; titleProps apply.
|
|
13
|
+
* When node: rendered as-is; titleProps are not applied.
|
|
14
|
+
*/
|
|
15
|
+
title?: string | React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Additional props to pass to the title Text component.
|
|
18
|
+
* Props are spread to the Text component and can override default values.
|
|
19
|
+
* Only applied when title is a string.
|
|
20
|
+
*/
|
|
21
|
+
titleProps?: Partial<TextProps>;
|
|
22
|
+
/**
|
|
23
|
+
* Subtitle to display below the title. Can be a string or a React node.
|
|
24
|
+
* When string: rendered with TextVariant.BodySm and TextColor.TextAlternative by default; subtitleProps apply.
|
|
25
|
+
* When node: rendered as-is; subtitleProps are not applied (add spacing on your root if needed, e.g. twClassName).
|
|
26
|
+
*/
|
|
27
|
+
subtitle?: string | React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Additional props to pass to the subtitle Text component.
|
|
30
|
+
* Props are spread to the Text component and can override default values.
|
|
31
|
+
* Only applied when subtitle is a string.
|
|
32
|
+
*/
|
|
33
|
+
subtitleProps?: Partial<TextProps>;
|
|
34
|
+
/**
|
|
35
|
+
* Callback when the back button is pressed.
|
|
36
|
+
* If provided, a back button will be rendered as startButtonIconProps.
|
|
37
|
+
*/
|
|
38
|
+
onBack?: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* Additional props to pass to the back ButtonIcon.
|
|
41
|
+
* If provided, a back button will be rendered as startButtonIconProps with these props spread.
|
|
42
|
+
*/
|
|
43
|
+
backButtonProps?: Omit<ButtonIconProps, 'iconName'>;
|
|
44
|
+
/**
|
|
45
|
+
* Callback when the close button is pressed.
|
|
46
|
+
* If provided, a close button will be added to endButtonIconProps.
|
|
47
|
+
*/
|
|
48
|
+
onClose?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Additional props to pass to the close ButtonIcon.
|
|
51
|
+
* If provided, a close button will be added to endButtonIconProps with these props spread.
|
|
52
|
+
*/
|
|
53
|
+
closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=HeaderStandard.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandard.types.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG;IAClD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACpC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CACtD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
// Third party dependencies.
|
|
8
|
+
import $React from "react";
|
|
9
|
+
const React = $importDefault($React);
|
|
10
|
+
//# sourceMappingURL=HeaderStandard.types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandard.types.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,MAAK,cAAc","sourcesContent":["// Third party dependencies.\nimport React from 'react';\n\n// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { HeaderBaseProps } from '../HeaderBase';\nimport type { TextProps } from '../Text';\n\n/**\n * HeaderStandard component props.\n */\nexport type HeaderStandardProps = HeaderBaseProps & {\n /**\n * Title to display in the header. Can be a string or a React node.\n * Used as children if children prop is not provided.\n * When string: rendered with TextVariant.BodyMd and FontWeight.Bold by default; titleProps apply.\n * When node: rendered as-is; titleProps are not applied.\n */\n title?: string | React.ReactNode;\n /**\n * Additional props to pass to the title Text component.\n * Props are spread to the Text component and can override default values.\n * Only applied when title is a string.\n */\n titleProps?: Partial<TextProps>;\n /**\n * Subtitle to display below the title. Can be a string or a React node.\n * When string: rendered with TextVariant.BodySm and TextColor.TextAlternative by default; subtitleProps apply.\n * When node: rendered as-is; subtitleProps are not applied (add spacing on your root if needed, e.g. twClassName).\n */\n subtitle?: string | React.ReactNode;\n /**\n * Additional props to pass to the subtitle Text component.\n * Props are spread to the Text component and can override default values.\n * Only applied when subtitle is a string.\n */\n subtitleProps?: Partial<TextProps>;\n /**\n * Callback when the back button is pressed.\n * If provided, a back button will be rendered as startButtonIconProps.\n */\n onBack?: () => void;\n /**\n * Additional props to pass to the back ButtonIcon.\n * If provided, a back button will be rendered as startButtonIconProps with these props spread.\n */\n backButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n /**\n * Callback when the close button is pressed.\n * If provided, a close button will be added to endButtonIconProps.\n */\n onClose?: () => void;\n /**\n * Additional props to pass to the close ButtonIcon.\n * If provided, a close button will be added to endButtonIconProps with these props spread.\n */\n closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HeaderStandard = void 0;
|
|
4
|
+
var HeaderStandard_1 = require("./HeaderStandard.cjs");
|
|
5
|
+
Object.defineProperty(exports, "HeaderStandard", { enumerable: true, get: function () { return HeaderStandard_1.HeaderStandard; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/index.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAAzC,gHAAA,cAAc,OAAA","sourcesContent":["export { HeaderStandard } from './HeaderStandard';\nexport type { HeaderStandardProps } from './HeaderStandard.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAClD,YAAY,EAAE,mBAAmB,EAAE,mCAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAClD,YAAY,EAAE,mBAAmB,EAAE,mCAA+B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB","sourcesContent":["export { HeaderStandard } from './HeaderStandard';\nexport type { HeaderStandardProps } from './HeaderStandard.types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="m9
|
|
1
|
+
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g><path d="m9.49932 5.33142h-1.66714v1.66714h-1.66714v10.00284h1.66714v1.6672h1.66714v-1.6672h1.66718v-10.00284h-1.66718zm0 10.00288h-1.66714v-6.66859h1.66714z"/><path d="m17.835 8.66571h-1.6671v-3.33429h-1.6671v3.33429h-1.6672v5.83499h1.6672v4.1679h1.6671v-4.1679h1.6671zm-1.6671 4.16789h-1.6671v-2.5008h1.6671z"/></g></svg>
|
|
@@ -7,6 +7,7 @@ const react_1 = require("react");
|
|
|
7
7
|
const react_native_1 = require("react-native/index.js");
|
|
8
8
|
const types_1 = require("../../types/index.cjs");
|
|
9
9
|
const Text_constants_1 = require("../Text/Text.constants.cjs");
|
|
10
|
+
const Input_constants_1 = require("./Input.constants.cjs");
|
|
10
11
|
exports.Input = (0, react_1.forwardRef)(({ style, textVariant = types_1.TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadonly = false, value, placeholder, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
|
|
11
12
|
const [isFocused, setIsFocused] = (0, react_1.useState)(autoFocus);
|
|
12
13
|
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
@@ -22,11 +23,10 @@ exports.Input = (0, react_1.forwardRef)(({ style, textVariant = types_1.TextVari
|
|
|
22
23
|
// the controlled value is empty. This keeps the iOS lineHeight workaround
|
|
23
24
|
// scoped to the placeholder-visible state without affecting typed text.
|
|
24
25
|
const isPlaceholderVisible = hasPlaceholder && value === '';
|
|
25
|
-
const inputStyle = (0, react_1.useMemo)(() => tw.style(
|
|
26
|
+
const inputStyle = (0, react_1.useMemo)(() => tw.style(fontClass, 'text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
|
|
26
27
|
!isDisabled &&
|
|
27
28
|
isFocused &&
|
|
28
29
|
'border-primary-default', twClassName), [
|
|
29
|
-
textVariant,
|
|
30
30
|
fontClass,
|
|
31
31
|
isStateStylesDisabled,
|
|
32
32
|
isDisabled,
|
|
@@ -34,6 +34,7 @@ exports.Input = (0, react_1.forwardRef)(({ style, textVariant = types_1.TextVari
|
|
|
34
34
|
twClassName,
|
|
35
35
|
tw,
|
|
36
36
|
]);
|
|
37
|
+
const variantTextStyle = (0, react_1.useMemo)(() => Input_constants_1.MAP_TEXT_VARIANT_INPUT_METRICS[textVariant], [textVariant]);
|
|
37
38
|
/* istanbul ignore next: handler body covered by focus/blur tests */
|
|
38
39
|
const onBlurHandler = (0, react_1.useCallback)((e) => {
|
|
39
40
|
if (!isDisabled) {
|
|
@@ -50,12 +51,12 @@ exports.Input = (0, react_1.forwardRef)(({ style, textVariant = types_1.TextVari
|
|
|
50
51
|
}, [isDisabled, onFocus]);
|
|
51
52
|
const resolvedStyle = [
|
|
52
53
|
inputStyle,
|
|
54
|
+
variantTextStyle,
|
|
53
55
|
// iOS-only workaround: when a placeholder is visible, native iOS
|
|
54
56
|
// TextInput can render placeholder text vertically offset.
|
|
55
57
|
// Keep this iOS-only because lineHeight: 0 can collapse text on Android.
|
|
56
58
|
react_native_1.Platform.OS === 'ios' &&
|
|
57
59
|
isPlaceholderVisible && { lineHeight: 0 },
|
|
58
|
-
react_native_1.Platform.OS === 'ios' && { textAlignVertical: 'center' },
|
|
59
60
|
style,
|
|
60
61
|
].filter(Boolean);
|
|
61
62
|
return (<react_native_1.TextInput ref={ref} placeholderTextColor={placeholderTextColor} {...props} placeholder={placeholder} value={value} style={resolvedStyle} editable={!isDisabled && !isReadonly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";;;AAAA,8FAIuD;AACvD,oEAAyE;AACzE,iCAAmE;AACnE,wDAAmD;AAEnD,iDAAsD;AACtD,+DAGgC;
|
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E;QACpD,KAAK;KACN,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAElB,OAAO,CACL,CAAC,wBAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAC3C,IAAI,KAAK,CAAC,CACV,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,QAAQ,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask-previews/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask-previews/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport { MAP_TEXT_VARIANT_INPUT_METRICS } from './Input.constants';\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n value,\n placeholder,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n const hasPlaceholder =\n placeholder !== undefined && placeholder !== null && placeholder !== '';\n // Only apply placeholder-mode styling when a placeholder is present and\n // the controlled value is empty. This keeps the iOS lineHeight workaround\n // scoped to the placeholder-visible state without affecting typed text.\n const isPlaceholderVisible = hasPlaceholder && value === '';\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n const variantTextStyle = useMemo(\n () => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant],\n [textVariant],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n const resolvedStyle = [\n inputStyle,\n variantTextStyle,\n // iOS-only workaround: when a placeholder is visible, native iOS\n // TextInput can render placeholder text vertically offset.\n // Keep this iOS-only because lineHeight: 0 can collapse text on Android.\n Platform.OS === 'ios' &&\n isPlaceholderVisible && { lineHeight: 0 as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n placeholderTextColor={placeholderTextColor}\n {...props}\n placeholder={placeholder}\n value={value}\n style={resolvedStyle}\n editable={!isDisabled && !isReadonly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAP_TEXT_VARIANT_INPUT_METRICS = void 0;
|
|
4
|
+
const design_tokens_1 = require("@metamask-previews/design-tokens");
|
|
5
|
+
const types_1 = require("../../types/index.cjs");
|
|
6
|
+
/**
|
|
7
|
+
* Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.
|
|
8
|
+
* React Native `TextInput` aligns single-line text more predictably when line height is not set
|
|
9
|
+
* from the design-system paragraph specs (matches legacy / temp Input.styles behavior).
|
|
10
|
+
*/
|
|
11
|
+
exports.MAP_TEXT_VARIANT_INPUT_METRICS = {
|
|
12
|
+
[types_1.TextVariant.DisplayLg]: {
|
|
13
|
+
fontSize: design_tokens_1.typography.sDisplayLG.fontSize,
|
|
14
|
+
letterSpacing: design_tokens_1.typography.sDisplayLG.letterSpacing,
|
|
15
|
+
},
|
|
16
|
+
[types_1.TextVariant.DisplayMd]: {
|
|
17
|
+
fontSize: design_tokens_1.typography.sDisplayMD.fontSize,
|
|
18
|
+
letterSpacing: design_tokens_1.typography.sDisplayMD.letterSpacing,
|
|
19
|
+
},
|
|
20
|
+
[types_1.TextVariant.HeadingLg]: {
|
|
21
|
+
fontSize: design_tokens_1.typography.sHeadingLG.fontSize,
|
|
22
|
+
letterSpacing: design_tokens_1.typography.sHeadingLG.letterSpacing,
|
|
23
|
+
},
|
|
24
|
+
[types_1.TextVariant.HeadingMd]: {
|
|
25
|
+
fontSize: design_tokens_1.typography.sHeadingMD.fontSize,
|
|
26
|
+
letterSpacing: design_tokens_1.typography.sHeadingMD.letterSpacing,
|
|
27
|
+
},
|
|
28
|
+
[types_1.TextVariant.HeadingSm]: {
|
|
29
|
+
fontSize: design_tokens_1.typography.sHeadingSM.fontSize,
|
|
30
|
+
letterSpacing: design_tokens_1.typography.sHeadingSM.letterSpacing,
|
|
31
|
+
},
|
|
32
|
+
[types_1.TextVariant.BodyLg]: {
|
|
33
|
+
fontSize: design_tokens_1.typography.sBodyLGMedium.fontSize,
|
|
34
|
+
letterSpacing: design_tokens_1.typography.sBodyLGMedium.letterSpacing,
|
|
35
|
+
},
|
|
36
|
+
[types_1.TextVariant.BodyMd]: {
|
|
37
|
+
fontSize: design_tokens_1.typography.sBodyMD.fontSize,
|
|
38
|
+
letterSpacing: design_tokens_1.typography.sBodyMD.letterSpacing,
|
|
39
|
+
},
|
|
40
|
+
[types_1.TextVariant.BodySm]: {
|
|
41
|
+
fontSize: design_tokens_1.typography.sBodySM.fontSize,
|
|
42
|
+
letterSpacing: design_tokens_1.typography.sBodySM.letterSpacing,
|
|
43
|
+
},
|
|
44
|
+
[types_1.TextVariant.BodyXs]: {
|
|
45
|
+
fontSize: design_tokens_1.typography.sBodyXS.fontSize,
|
|
46
|
+
letterSpacing: design_tokens_1.typography.sBodyXS.letterSpacing,
|
|
47
|
+
},
|
|
48
|
+
[types_1.TextVariant.PageHeading]: {
|
|
49
|
+
fontSize: design_tokens_1.typography.sPageHeading.fontSize,
|
|
50
|
+
letterSpacing: design_tokens_1.typography.sPageHeading.letterSpacing,
|
|
51
|
+
},
|
|
52
|
+
[types_1.TextVariant.SectionHeading]: {
|
|
53
|
+
fontSize: design_tokens_1.typography.sSectionHeading.fontSize,
|
|
54
|
+
letterSpacing: design_tokens_1.typography.sSectionHeading.letterSpacing,
|
|
55
|
+
},
|
|
56
|
+
[types_1.TextVariant.ButtonLabelMd]: {
|
|
57
|
+
fontSize: design_tokens_1.typography.sButtonLabelMd.fontSize,
|
|
58
|
+
letterSpacing: design_tokens_1.typography.sButtonLabelMd.letterSpacing,
|
|
59
|
+
},
|
|
60
|
+
[types_1.TextVariant.ButtonLabelLg]: {
|
|
61
|
+
fontSize: design_tokens_1.typography.sButtonLabelLg.fontSize,
|
|
62
|
+
letterSpacing: design_tokens_1.typography.sButtonLabelLg.letterSpacing,
|
|
63
|
+
},
|
|
64
|
+
[types_1.TextVariant.AmountDisplayLg]: {
|
|
65
|
+
fontSize: design_tokens_1.typography.sAmountDisplayLg.fontSize,
|
|
66
|
+
letterSpacing: design_tokens_1.typography.sAmountDisplayLg.letterSpacing,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=Input.constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.constants.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":";;;AAAA,oEAA8D;AAE9D,iDAA0C;AAE1C;;;;GAIG;AACU,QAAA,8BAA8B,GAGvC;IACF,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,0BAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,0BAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,mBAAW,CA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QAAQ,EAAE,0BAAU,CAAC,gBAAgB,CAAC,QAAQ;QAC9C,aAAa,EAAE,0BAAU,CAAC,gBAAgB,CAAC,aAAa;KACzD;CACF,CAAC","sourcesContent":["import { typography } from '@metamask-previews/design-tokens';\n\nimport { TextVariant } from '../../types';\n\n/**\n * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.\n * React Native `TextInput` aligns single-line text more predictably when line height is not set\n * from the design-system paragraph specs (matches legacy / temp Input.styles behavior).\n */\nexport const MAP_TEXT_VARIANT_INPUT_METRICS: Record<\n TextVariant,\n { fontSize: number; letterSpacing: number }\n> = {\n [TextVariant.DisplayLg]: {\n fontSize: typography.sDisplayLG.fontSize,\n letterSpacing: typography.sDisplayLG.letterSpacing,\n },\n [TextVariant.DisplayMd]: {\n fontSize: typography.sDisplayMD.fontSize,\n letterSpacing: typography.sDisplayMD.letterSpacing,\n },\n [TextVariant.HeadingLg]: {\n fontSize: typography.sHeadingLG.fontSize,\n letterSpacing: typography.sHeadingLG.letterSpacing,\n },\n [TextVariant.HeadingMd]: {\n fontSize: typography.sHeadingMD.fontSize,\n letterSpacing: typography.sHeadingMD.letterSpacing,\n },\n [TextVariant.HeadingSm]: {\n fontSize: typography.sHeadingSM.fontSize,\n letterSpacing: typography.sHeadingSM.letterSpacing,\n },\n [TextVariant.BodyLg]: {\n fontSize: typography.sBodyLGMedium.fontSize,\n letterSpacing: typography.sBodyLGMedium.letterSpacing,\n },\n [TextVariant.BodyMd]: {\n fontSize: typography.sBodyMD.fontSize,\n letterSpacing: typography.sBodyMD.letterSpacing,\n },\n [TextVariant.BodySm]: {\n fontSize: typography.sBodySM.fontSize,\n letterSpacing: typography.sBodySM.letterSpacing,\n },\n [TextVariant.BodyXs]: {\n fontSize: typography.sBodyXS.fontSize,\n letterSpacing: typography.sBodyXS.letterSpacing,\n },\n [TextVariant.PageHeading]: {\n fontSize: typography.sPageHeading.fontSize,\n letterSpacing: typography.sPageHeading.letterSpacing,\n },\n [TextVariant.SectionHeading]: {\n fontSize: typography.sSectionHeading.fontSize,\n letterSpacing: typography.sSectionHeading.letterSpacing,\n },\n [TextVariant.ButtonLabelMd]: {\n fontSize: typography.sButtonLabelMd.fontSize,\n letterSpacing: typography.sButtonLabelMd.letterSpacing,\n },\n [TextVariant.ButtonLabelLg]: {\n fontSize: typography.sButtonLabelLg.fontSize,\n letterSpacing: typography.sButtonLabelLg.letterSpacing,\n },\n [TextVariant.AmountDisplayLg]: {\n fontSize: typography.sAmountDisplayLg.fontSize,\n letterSpacing: typography.sAmountDisplayLg.letterSpacing,\n },\n};\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextVariant } from "../../types/index.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.
|
|
4
|
+
* React Native `TextInput` aligns single-line text more predictably when line height is not set
|
|
5
|
+
* from the design-system paragraph specs (matches legacy / temp Input.styles behavior).
|
|
6
|
+
*/
|
|
7
|
+
export declare const MAP_TEXT_VARIANT_INPUT_METRICS: Record<TextVariant, {
|
|
8
|
+
fontSize: number;
|
|
9
|
+
letterSpacing: number;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=Input.constants.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CACjD,WAAW,EACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CA0D5C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TextVariant } from "../../types/index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.
|
|
4
|
+
* React Native `TextInput` aligns single-line text more predictably when line height is not set
|
|
5
|
+
* from the design-system paragraph specs (matches legacy / temp Input.styles behavior).
|
|
6
|
+
*/
|
|
7
|
+
export declare const MAP_TEXT_VARIANT_INPUT_METRICS: Record<TextVariant, {
|
|
8
|
+
fontSize: number;
|
|
9
|
+
letterSpacing: number;
|
|
10
|
+
}>;
|
|
11
|
+
//# sourceMappingURL=Input.constants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,EAAE,MAAM,CACjD,WAAW,EACX;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CA0D5C,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { typography } from "@metamask-previews/design-tokens";
|
|
2
|
+
import { TextVariant } from "../../types/index.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.
|
|
5
|
+
* React Native `TextInput` aligns single-line text more predictably when line height is not set
|
|
6
|
+
* from the design-system paragraph specs (matches legacy / temp Input.styles behavior).
|
|
7
|
+
*/
|
|
8
|
+
export const MAP_TEXT_VARIANT_INPUT_METRICS = {
|
|
9
|
+
[TextVariant.DisplayLg]: {
|
|
10
|
+
fontSize: typography.sDisplayLG.fontSize,
|
|
11
|
+
letterSpacing: typography.sDisplayLG.letterSpacing,
|
|
12
|
+
},
|
|
13
|
+
[TextVariant.DisplayMd]: {
|
|
14
|
+
fontSize: typography.sDisplayMD.fontSize,
|
|
15
|
+
letterSpacing: typography.sDisplayMD.letterSpacing,
|
|
16
|
+
},
|
|
17
|
+
[TextVariant.HeadingLg]: {
|
|
18
|
+
fontSize: typography.sHeadingLG.fontSize,
|
|
19
|
+
letterSpacing: typography.sHeadingLG.letterSpacing,
|
|
20
|
+
},
|
|
21
|
+
[TextVariant.HeadingMd]: {
|
|
22
|
+
fontSize: typography.sHeadingMD.fontSize,
|
|
23
|
+
letterSpacing: typography.sHeadingMD.letterSpacing,
|
|
24
|
+
},
|
|
25
|
+
[TextVariant.HeadingSm]: {
|
|
26
|
+
fontSize: typography.sHeadingSM.fontSize,
|
|
27
|
+
letterSpacing: typography.sHeadingSM.letterSpacing,
|
|
28
|
+
},
|
|
29
|
+
[TextVariant.BodyLg]: {
|
|
30
|
+
fontSize: typography.sBodyLGMedium.fontSize,
|
|
31
|
+
letterSpacing: typography.sBodyLGMedium.letterSpacing,
|
|
32
|
+
},
|
|
33
|
+
[TextVariant.BodyMd]: {
|
|
34
|
+
fontSize: typography.sBodyMD.fontSize,
|
|
35
|
+
letterSpacing: typography.sBodyMD.letterSpacing,
|
|
36
|
+
},
|
|
37
|
+
[TextVariant.BodySm]: {
|
|
38
|
+
fontSize: typography.sBodySM.fontSize,
|
|
39
|
+
letterSpacing: typography.sBodySM.letterSpacing,
|
|
40
|
+
},
|
|
41
|
+
[TextVariant.BodyXs]: {
|
|
42
|
+
fontSize: typography.sBodyXS.fontSize,
|
|
43
|
+
letterSpacing: typography.sBodyXS.letterSpacing,
|
|
44
|
+
},
|
|
45
|
+
[TextVariant.PageHeading]: {
|
|
46
|
+
fontSize: typography.sPageHeading.fontSize,
|
|
47
|
+
letterSpacing: typography.sPageHeading.letterSpacing,
|
|
48
|
+
},
|
|
49
|
+
[TextVariant.SectionHeading]: {
|
|
50
|
+
fontSize: typography.sSectionHeading.fontSize,
|
|
51
|
+
letterSpacing: typography.sSectionHeading.letterSpacing,
|
|
52
|
+
},
|
|
53
|
+
[TextVariant.ButtonLabelMd]: {
|
|
54
|
+
fontSize: typography.sButtonLabelMd.fontSize,
|
|
55
|
+
letterSpacing: typography.sButtonLabelMd.letterSpacing,
|
|
56
|
+
},
|
|
57
|
+
[TextVariant.ButtonLabelLg]: {
|
|
58
|
+
fontSize: typography.sButtonLabelLg.fontSize,
|
|
59
|
+
letterSpacing: typography.sButtonLabelLg.letterSpacing,
|
|
60
|
+
},
|
|
61
|
+
[TextVariant.AmountDisplayLg]: {
|
|
62
|
+
fontSize: typography.sAmountDisplayLg.fontSize,
|
|
63
|
+
letterSpacing: typography.sAmountDisplayLg.letterSpacing,
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=Input.constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.constants.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yCAAyC;AAE9D,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAGvC;IACF,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,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vD;IACD,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE;QAC7B,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ;QAC9C,aAAa,EAAE,UAAU,CAAC,gBAAgB,CAAC,aAAa;KACzD;CACF,CAAC","sourcesContent":["import { typography } from '@metamask-previews/design-tokens';\n\nimport { TextVariant } from '../../types';\n\n/**\n * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.\n * React Native `TextInput` aligns single-line text more predictably when line height is not set\n * from the design-system paragraph specs (matches legacy / temp Input.styles behavior).\n */\nexport const MAP_TEXT_VARIANT_INPUT_METRICS: Record<\n TextVariant,\n { fontSize: number; letterSpacing: number }\n> = {\n [TextVariant.DisplayLg]: {\n fontSize: typography.sDisplayLG.fontSize,\n letterSpacing: typography.sDisplayLG.letterSpacing,\n },\n [TextVariant.DisplayMd]: {\n fontSize: typography.sDisplayMD.fontSize,\n letterSpacing: typography.sDisplayMD.letterSpacing,\n },\n [TextVariant.HeadingLg]: {\n fontSize: typography.sHeadingLG.fontSize,\n letterSpacing: typography.sHeadingLG.letterSpacing,\n },\n [TextVariant.HeadingMd]: {\n fontSize: typography.sHeadingMD.fontSize,\n letterSpacing: typography.sHeadingMD.letterSpacing,\n },\n [TextVariant.HeadingSm]: {\n fontSize: typography.sHeadingSM.fontSize,\n letterSpacing: typography.sHeadingSM.letterSpacing,\n },\n [TextVariant.BodyLg]: {\n fontSize: typography.sBodyLGMedium.fontSize,\n letterSpacing: typography.sBodyLGMedium.letterSpacing,\n },\n [TextVariant.BodyMd]: {\n fontSize: typography.sBodyMD.fontSize,\n letterSpacing: typography.sBodyMD.letterSpacing,\n },\n [TextVariant.BodySm]: {\n fontSize: typography.sBodySM.fontSize,\n letterSpacing: typography.sBodySM.letterSpacing,\n },\n [TextVariant.BodyXs]: {\n fontSize: typography.sBodyXS.fontSize,\n letterSpacing: typography.sBodyXS.letterSpacing,\n },\n [TextVariant.PageHeading]: {\n fontSize: typography.sPageHeading.fontSize,\n letterSpacing: typography.sPageHeading.letterSpacing,\n },\n [TextVariant.SectionHeading]: {\n fontSize: typography.sSectionHeading.fontSize,\n letterSpacing: typography.sSectionHeading.letterSpacing,\n },\n [TextVariant.ButtonLabelMd]: {\n fontSize: typography.sButtonLabelMd.fontSize,\n letterSpacing: typography.sButtonLabelMd.letterSpacing,\n },\n [TextVariant.ButtonLabelLg]: {\n fontSize: typography.sButtonLabelLg.fontSize,\n letterSpacing: typography.sButtonLabelLg.letterSpacing,\n },\n [TextVariant.AmountDisplayLg]: {\n fontSize: typography.sAmountDisplayLg.fontSize,\n letterSpacing: typography.sAmountDisplayLg.letterSpacing,\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;
|
|
1
|
+
{"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;AAStD,eAAO,MAAM,KAAK;;;;;;;6CAqHjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;
|
|
1
|
+
{"version":3,"file":"Input.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;AAStD,eAAO,MAAM,KAAK;;;;;;;6CAqHjB,CAAC"}
|