@metamask-previews/design-system-react-native 0.22.0-preview.f515a62 → 0.24.0-preview.178e60f
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 +36 -1
- package/dist/components/AvatarGroup/AvatarGroup.cjs +11 -12
- package/dist/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.constants.cjs +11 -12
- package/dist/components/AvatarGroup/AvatarGroup.constants.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.cts +1 -2
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.cts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.mts +1 -2
- package/dist/components/AvatarGroup/AvatarGroup.constants.d.mts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.constants.mjs +1 -2
- package/dist/components/AvatarGroup/AvatarGroup.constants.mjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.cts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.mts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.mjs +2 -3
- package/dist/components/AvatarGroup/AvatarGroup.mjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.types.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.types.d.cts +7 -24
- package/dist/components/AvatarGroup/AvatarGroup.types.d.cts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.types.d.mts +7 -24
- package/dist/components/AvatarGroup/AvatarGroup.types.d.mts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.types.mjs.map +1 -1
- package/dist/components/AvatarGroup/index.cjs +3 -3
- package/dist/components/AvatarGroup/index.cjs.map +1 -1
- package/dist/components/AvatarGroup/index.d.cts +1 -1
- package/dist/components/AvatarGroup/index.d.cts.map +1 -1
- package/dist/components/AvatarGroup/index.d.mts +1 -1
- package/dist/components/AvatarGroup/index.d.mts.map +1 -1
- package/dist/components/AvatarGroup/index.mjs +1 -1
- package/dist/components/AvatarGroup/index.mjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.cjs +1 -2
- package/dist/components/AvatarIcon/AvatarIcon.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +10 -11
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.cts +1 -2
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.cts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.mts +1 -2
- package/dist/components/AvatarIcon/AvatarIcon.constants.d.mts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +1 -2
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.d.cts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.d.mts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.mjs +1 -2
- package/dist/components/AvatarIcon/AvatarIcon.mjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.cjs +1 -2
- package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.cjs +8 -9
- package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts +1 -2
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts +1 -2
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.mjs +1 -2
- package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.mjs +1 -2
- package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.cjs +3 -12
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.mjs +3 -12
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.types.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.types.d.cts +2 -7
- package/dist/components/BannerBase/BannerBase.types.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.types.d.mts +2 -7
- package/dist/components/BannerBase/BannerBase.types.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.types.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs +1 -17
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.cts.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.mts.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs +1 -17
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs +1 -17
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.cts.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.mts.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs +1 -17
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +1 -17
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.cts.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.mts.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +1 -17
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.cjs +42 -28
- package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.cjs +31 -1
- package/dist/components/ButtonBase/ButtonBase.constants.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.cts +6 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.mts +6 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.mjs +29 -1
- package/dist/components/ButtonBase/ButtonBase.constants.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.cts +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.mts +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.mjs +45 -31
- package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.d.cts +12 -0
- package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.d.mts +12 -0
- package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
- package/dist/components/ButtonSemantic/ButtonSemantic.cjs +1 -17
- package/dist/components/ButtonSemantic/ButtonSemantic.cjs.map +1 -1
- package/dist/components/ButtonSemantic/ButtonSemantic.d.cts.map +1 -1
- package/dist/components/ButtonSemantic/ButtonSemantic.d.mts.map +1 -1
- package/dist/components/ButtonSemantic/ButtonSemantic.mjs +1 -17
- package/dist/components/ButtonSemantic/ButtonSemantic.mjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.cjs +2 -26
- package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.d.cts.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.d.mts.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.mjs +2 -26
- package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.types.cjs +0 -5
- package/dist/components/HeaderStandard/HeaderStandard.types.cjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.types.d.cts +2 -28
- package/dist/components/HeaderStandard/HeaderStandard.types.d.cts.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.types.d.mts +2 -28
- package/dist/components/HeaderStandard/HeaderStandard.types.d.mts.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.types.mjs +1 -9
- package/dist/components/HeaderStandard/HeaderStandard.types.mjs.map +1 -1
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.cjs +63 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.cjs.map +1 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.d.cts +4 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.d.cts.map +1 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.d.mts +4 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.d.mts.map +1 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.mjs +40 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.mjs.map +1 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.cjs +3 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.cjs.map +1 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.d.cts +31 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.d.cts.map +1 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.d.mts +31 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.d.mts.map +1 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.mjs +2 -0
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.mjs.map +1 -0
- package/dist/components/HeaderStandardAnimated/index.cjs +8 -0
- package/dist/components/HeaderStandardAnimated/index.cjs.map +1 -0
- package/dist/components/HeaderStandardAnimated/index.d.cts +4 -0
- package/dist/components/HeaderStandardAnimated/index.d.cts.map +1 -0
- package/dist/components/HeaderStandardAnimated/index.d.mts +4 -0
- package/dist/components/HeaderStandardAnimated/index.d.mts.map +1 -0
- package/dist/components/HeaderStandardAnimated/index.mjs +3 -0
- package/dist/components/HeaderStandardAnimated/index.mjs.map +1 -0
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs +62 -0
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs.map +1 -0
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts +39 -0
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts.map +1 -0
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts +39 -0
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts.map +1 -0
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs +57 -0
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs.map +1 -0
- package/dist/components/Icon/Icon.assets.cjs +14 -0
- package/dist/components/Icon/Icon.assets.cjs.map +1 -1
- package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
- package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
- package/dist/components/Icon/Icon.assets.mjs +14 -0
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/Icon.cjs +2 -2
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.cts.map +1 -1
- package/dist/components/Icon/Icon.d.mts.map +1 -1
- package/dist/components/Icon/Icon.mjs +1 -1
- package/dist/components/Icon/Icon.mjs.map +1 -1
- package/dist/components/Icon/assets/candlestick.svg +1 -1
- package/dist/components/Icon/assets/group.svg +1 -0
- package/dist/components/Icon/assets/list-arrow.svg +1 -0
- package/dist/components/Icon/assets/merge.svg +1 -0
- package/dist/components/Icon/assets/musd-filled.svg +1 -0
- package/dist/components/Icon/assets/musd.svg +1 -0
- package/dist/components/Icon/assets/pie-chart.svg +1 -0
- package/dist/components/Icon/assets/predictions.svg +1 -0
- package/dist/components/Icon/index.cjs +4 -4
- package/dist/components/Icon/index.cjs.map +1 -1
- package/dist/components/Icon/index.d.cts +1 -1
- package/dist/components/Icon/index.d.cts.map +1 -1
- package/dist/components/Icon/index.d.mts +1 -1
- package/dist/components/Icon/index.d.mts.map +1 -1
- package/dist/components/Icon/index.mjs +1 -1
- package/dist/components/Icon/index.mjs.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.cjs +8 -9
- package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.d.cts +1 -2
- package/dist/components/IconAlert/IconAlert.constants.d.cts.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.d.mts +1 -2
- package/dist/components/IconAlert/IconAlert.constants.d.mts.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs +1 -2
- package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -1
- package/dist/components/Input/Input.cjs +35 -25
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.cts +1 -7
- package/dist/components/Input/Input.d.cts.map +1 -1
- package/dist/components/Input/Input.d.mts +1 -7
- package/dist/components/Input/Input.d.mts.map +1 -1
- package/dist/components/Input/Input.mjs +36 -26
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/Input.types.cjs.map +1 -1
- package/dist/components/Input/Input.types.d.cts +2 -30
- package/dist/components/Input/Input.types.d.cts.map +1 -1
- package/dist/components/Input/Input.types.d.mts +2 -30
- package/dist/components/Input/Input.types.d.mts.map +1 -1
- package/dist/components/Input/Input.types.mjs.map +1 -1
- package/dist/components/Tag/Tag.constants.cjs +5 -6
- package/dist/components/Tag/Tag.constants.cjs.map +1 -1
- package/dist/components/Tag/Tag.constants.d.cts +1 -2
- package/dist/components/Tag/Tag.constants.d.cts.map +1 -1
- package/dist/components/Tag/Tag.constants.d.mts +1 -2
- package/dist/components/Tag/Tag.constants.d.mts.map +1 -1
- package/dist/components/Tag/Tag.constants.mjs +1 -2
- package/dist/components/Tag/Tag.constants.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs +38 -0
- package/dist/components/TextArea/TextArea.cjs.map +1 -0
- package/dist/components/TextArea/TextArea.d.cts +166 -0
- package/dist/components/TextArea/TextArea.d.cts.map +1 -0
- package/dist/components/TextArea/TextArea.d.mts +166 -0
- package/dist/components/TextArea/TextArea.d.mts.map +1 -0
- package/dist/components/TextArea/TextArea.mjs +35 -0
- package/dist/components/TextArea/TextArea.mjs.map +1 -0
- package/dist/components/TextArea/TextArea.types.cjs +3 -0
- package/dist/components/TextArea/TextArea.types.cjs.map +1 -0
- package/dist/components/TextArea/TextArea.types.d.cts +63 -0
- package/dist/components/TextArea/TextArea.types.d.cts.map +1 -0
- package/dist/components/TextArea/TextArea.types.d.mts +63 -0
- package/dist/components/TextArea/TextArea.types.d.mts.map +1 -0
- package/dist/components/TextArea/TextArea.types.mjs +2 -0
- package/dist/components/TextArea/TextArea.types.mjs.map +1 -0
- package/dist/components/TextArea/index.cjs +6 -0
- package/dist/components/TextArea/index.cjs.map +1 -0
- package/dist/components/TextArea/index.d.cts +3 -0
- package/dist/components/TextArea/index.d.cts.map +1 -0
- package/dist/components/TextArea/index.d.mts +3 -0
- package/dist/components/TextArea/index.d.mts.map +1 -0
- package/dist/components/TextArea/index.mjs +2 -0
- package/dist/components/TextArea/index.mjs.map +1 -0
- package/dist/components/TextField/TextField.cjs +1 -2
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.cts +8 -2
- package/dist/components/TextField/TextField.d.cts.map +1 -1
- package/dist/components/TextField/TextField.d.mts +8 -2
- package/dist/components/TextField/TextField.d.mts.map +1 -1
- package/dist/components/TextField/TextField.mjs +1 -2
- package/dist/components/TextField/TextField.mjs.map +1 -1
- package/dist/components/TextField/TextField.types.cjs.map +1 -1
- package/dist/components/TextField/TextField.types.d.cts +5 -1
- package/dist/components/TextField/TextField.types.d.cts.map +1 -1
- package/dist/components/TextField/TextField.types.d.mts +5 -1
- package/dist/components/TextField/TextField.types.d.mts.map +1 -1
- package/dist/components/TextField/TextField.types.mjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +8 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +8 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
- package/dist/components/Toast/Toast.cjs +43 -52
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.constants.cjs +8 -1
- package/dist/components/Toast/Toast.constants.cjs.map +1 -1
- package/dist/components/Toast/Toast.constants.d.cts +5 -0
- package/dist/components/Toast/Toast.constants.d.cts.map +1 -1
- package/dist/components/Toast/Toast.constants.d.mts +5 -0
- package/dist/components/Toast/Toast.constants.d.mts.map +1 -1
- package/dist/components/Toast/Toast.constants.mjs +7 -0
- package/dist/components/Toast/Toast.constants.mjs.map +1 -1
- package/dist/components/Toast/Toast.d.cts +2 -17
- package/dist/components/Toast/Toast.d.cts.map +1 -1
- package/dist/components/Toast/Toast.d.mts +2 -17
- package/dist/components/Toast/Toast.d.mts.map +1 -1
- package/dist/components/Toast/Toast.mjs +40 -30
- package/dist/components/Toast/Toast.mjs.map +1 -1
- package/dist/components/Toast/Toast.types.cjs +9 -14
- package/dist/components/Toast/Toast.types.cjs.map +1 -1
- package/dist/components/Toast/Toast.types.d.cts +29 -91
- package/dist/components/Toast/Toast.types.d.cts.map +1 -1
- package/dist/components/Toast/Toast.types.d.mts +29 -91
- package/dist/components/Toast/Toast.types.d.mts.map +1 -1
- package/dist/components/Toast/Toast.types.mjs +8 -13
- package/dist/components/Toast/Toast.types.mjs.map +1 -1
- package/dist/components/Toast/Toaster.cjs +142 -0
- package/dist/components/Toast/Toaster.cjs.map +1 -0
- package/dist/components/Toast/Toaster.d.cts +11 -0
- package/dist/components/Toast/Toaster.d.cts.map +1 -0
- package/dist/components/Toast/Toaster.d.mts +11 -0
- package/dist/components/Toast/Toaster.d.mts.map +1 -0
- package/dist/components/Toast/Toaster.mjs +123 -0
- package/dist/components/Toast/Toaster.mjs.map +1 -0
- package/dist/components/Toast/index.cjs +5 -3
- package/dist/components/Toast/index.cjs.map +1 -1
- package/dist/components/Toast/index.d.cts +3 -2
- package/dist/components/Toast/index.d.cts.map +1 -1
- package/dist/components/Toast/index.d.mts +3 -2
- package/dist/components/Toast/index.d.mts.map +1 -1
- package/dist/components/Toast/index.mjs +2 -1
- package/dist/components/Toast/index.mjs.map +1 -1
- package/dist/components/index.cjs +12 -4
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +8 -2
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +8 -2
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +4 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs +36 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts +4 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts +4 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs +36 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs +8 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.cts +39 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.cts.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.mts +39 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.mts.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.mjs +10 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.mjs.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/index.cjs +6 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/index.cjs.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.cts +3 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.cts.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.mts +3 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.mts.map +1 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/index.mjs +2 -0
- package/dist/components/temp-components/HeaderStandardCenterColumn/index.mjs.map +1 -0
- package/dist/types/index.cjs +3 -15
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +0 -10
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +0 -10
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +0 -11
- package/dist/types/index.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/components/Toast/ToastView.cjs +0 -174
- package/dist/components/Toast/ToastView.cjs.map +0 -1
- package/dist/components/Toast/ToastView.d.cts +0 -7
- package/dist/components/Toast/ToastView.d.cts.map +0 -1
- package/dist/components/Toast/ToastView.d.mts +0 -7
- package/dist/components/Toast/ToastView.d.mts.map +0 -1
- package/dist/components/Toast/ToastView.mjs +0 -155
- package/dist/components/Toast/ToastView.mjs.map +0 -1
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { View } from "react-native/index.js";
|
|
3
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<import("@metamask-previews/design-system-shared").InputPropsShared, "isStateStylesDisabled"> & {
|
|
4
|
+
isError?: boolean | undefined;
|
|
5
|
+
inputElement?: import("react").ReactNode;
|
|
6
|
+
} & {
|
|
7
|
+
onChangeText?: ((text: string) => void) | undefined;
|
|
8
|
+
onFocus?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputFocusEventData>) => void) | undefined;
|
|
9
|
+
onBlur?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputFocusEventData>) => void) | undefined;
|
|
10
|
+
inputProps?: {
|
|
11
|
+
children?: import("react").ReactNode;
|
|
12
|
+
hitSlop?: number | import("react-native").Insets | null | undefined;
|
|
13
|
+
id?: string | undefined;
|
|
14
|
+
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
15
|
+
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
|
|
16
|
+
pointerEvents?: "box-none" | "none" | "box-only" | "auto" | undefined;
|
|
17
|
+
removeClippedSubviews?: boolean | undefined;
|
|
18
|
+
testID?: string | undefined;
|
|
19
|
+
nativeID?: string | undefined;
|
|
20
|
+
collapsable?: boolean | undefined;
|
|
21
|
+
collapsableChildren?: boolean | undefined;
|
|
22
|
+
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
23
|
+
focusable?: boolean | undefined;
|
|
24
|
+
tabIndex?: 0 | -1 | undefined;
|
|
25
|
+
shouldRasterizeIOS?: boolean | undefined;
|
|
26
|
+
isTVSelectable?: boolean | undefined;
|
|
27
|
+
hasTVPreferredFocus?: boolean | undefined;
|
|
28
|
+
tvParallaxShiftDistanceX?: number | undefined;
|
|
29
|
+
tvParallaxShiftDistanceY?: number | undefined;
|
|
30
|
+
tvParallaxTiltAngle?: number | undefined;
|
|
31
|
+
tvParallaxMagnification?: number | undefined;
|
|
32
|
+
onStartShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
33
|
+
onMoveShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
34
|
+
onResponderEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
35
|
+
onResponderGrant?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
36
|
+
onResponderReject?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
37
|
+
onResponderMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
38
|
+
onResponderRelease?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
39
|
+
onResponderStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
40
|
+
onResponderTerminationRequest?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
41
|
+
onResponderTerminate?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
42
|
+
onStartShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
43
|
+
onMoveShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
44
|
+
onTouchStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
45
|
+
onTouchMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
46
|
+
onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
47
|
+
onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
48
|
+
onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
49
|
+
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
50
|
+
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
51
|
+
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
52
|
+
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
53
|
+
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
54
|
+
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
55
|
+
onPointerCancel?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
56
|
+
onPointerCancelCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
57
|
+
onPointerDown?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
58
|
+
onPointerDownCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
59
|
+
onPointerUp?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
60
|
+
onPointerUpCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
61
|
+
accessible?: boolean | undefined;
|
|
62
|
+
accessibilityActions?: readonly Readonly<{
|
|
63
|
+
name: string;
|
|
64
|
+
label?: string | undefined;
|
|
65
|
+
}>[] | undefined;
|
|
66
|
+
accessibilityLabel?: string | undefined;
|
|
67
|
+
'aria-label'?: string | undefined;
|
|
68
|
+
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
69
|
+
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
70
|
+
'aria-busy'?: boolean | undefined;
|
|
71
|
+
'aria-checked'?: boolean | "mixed" | undefined;
|
|
72
|
+
'aria-disabled'?: boolean | undefined;
|
|
73
|
+
'aria-expanded'?: boolean | undefined;
|
|
74
|
+
'aria-selected'?: boolean | undefined;
|
|
75
|
+
accessibilityHint?: string | undefined;
|
|
76
|
+
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
77
|
+
'aria-valuemax'?: number | undefined;
|
|
78
|
+
'aria-valuemin'?: number | undefined;
|
|
79
|
+
'aria-valuenow'?: number | undefined;
|
|
80
|
+
'aria-valuetext'?: string | undefined;
|
|
81
|
+
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
|
|
82
|
+
importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
|
|
83
|
+
'aria-hidden'?: boolean | undefined;
|
|
84
|
+
'aria-modal'?: boolean | undefined;
|
|
85
|
+
role?: import("react-native").Role | undefined;
|
|
86
|
+
accessibilityLabelledBy?: string | string[] | undefined;
|
|
87
|
+
'aria-labelledby'?: string | undefined;
|
|
88
|
+
accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
|
|
89
|
+
'aria-live'?: "polite" | "assertive" | "off" | undefined;
|
|
90
|
+
accessibilityElementsHidden?: boolean | undefined;
|
|
91
|
+
accessibilityViewIsModal?: boolean | undefined;
|
|
92
|
+
onAccessibilityEscape?: (() => void) | undefined;
|
|
93
|
+
onAccessibilityTap?: (() => void) | undefined;
|
|
94
|
+
onMagicTap?: (() => void) | undefined;
|
|
95
|
+
accessibilityIgnoresInvertColors?: boolean | undefined;
|
|
96
|
+
accessibilityLanguage?: string | undefined;
|
|
97
|
+
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
98
|
+
accessibilityLargeContentTitle?: string | undefined;
|
|
99
|
+
twClassName?: string | undefined;
|
|
100
|
+
onPress?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
101
|
+
onPressIn?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
102
|
+
onPressOut?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").NativeTouchEvent>) => void) | undefined;
|
|
103
|
+
allowFontScaling?: boolean | undefined;
|
|
104
|
+
numberOfLines?: number | undefined;
|
|
105
|
+
maxFontSizeMultiplier?: number | null | undefined;
|
|
106
|
+
lineBreakStrategyIOS?: "none" | "standard" | "hangul-word" | "push-out" | undefined;
|
|
107
|
+
selectionColor?: import("react-native").ColorValue | undefined;
|
|
108
|
+
textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
|
|
109
|
+
rejectResponderTermination?: boolean | null | undefined;
|
|
110
|
+
onChange?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputChangeEventData>) => void) | undefined;
|
|
111
|
+
autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
|
|
112
|
+
autoComplete?: "off" | "name" | "email" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "url" | "username" | "username-new" | undefined;
|
|
113
|
+
autoCorrect?: boolean | undefined;
|
|
114
|
+
blurOnSubmit?: boolean | undefined;
|
|
115
|
+
submitBehavior?: import("react-native").SubmitBehavior | undefined;
|
|
116
|
+
caretHidden?: boolean | undefined;
|
|
117
|
+
contextMenuHidden?: boolean | undefined;
|
|
118
|
+
keyboardType?: import("react-native").KeyboardTypeOptions | undefined;
|
|
119
|
+
inputMode?: import("react-native").InputModeOptions | undefined;
|
|
120
|
+
maxLength?: number | undefined;
|
|
121
|
+
onContentSizeChange?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputContentSizeChangeEventData>) => void) | undefined;
|
|
122
|
+
onEndEditing?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputEndEditingEventData>) => void) | undefined;
|
|
123
|
+
onSelectionChange?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputSelectionChangeEventData>) => void) | undefined;
|
|
124
|
+
onSubmitEditing?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputSubmitEditingEventData>) => void) | undefined;
|
|
125
|
+
onScroll?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputScrollEventData>) => void) | undefined;
|
|
126
|
+
onKeyPress?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputKeyPressEventData>) => void) | undefined;
|
|
127
|
+
readOnly?: boolean | undefined;
|
|
128
|
+
returnKeyType?: import("react-native").ReturnKeyTypeOptions | undefined;
|
|
129
|
+
enterKeyHint?: import("react-native").EnterKeyHintTypeOptions | undefined;
|
|
130
|
+
secureTextEntry?: boolean | undefined;
|
|
131
|
+
selectTextOnFocus?: boolean | undefined;
|
|
132
|
+
selection?: {
|
|
133
|
+
start: number;
|
|
134
|
+
end?: number | undefined;
|
|
135
|
+
} | undefined;
|
|
136
|
+
textAlign?: "center" | "left" | "right" | undefined;
|
|
137
|
+
inputAccessoryViewID?: string | undefined;
|
|
138
|
+
clearButtonMode?: "never" | "while-editing" | "unless-editing" | "always" | undefined;
|
|
139
|
+
clearTextOnFocus?: boolean | undefined;
|
|
140
|
+
dataDetectorTypes?: import("react-native").DataDetectorTypes | import("react-native").DataDetectorTypes[] | undefined;
|
|
141
|
+
enablesReturnKeyAutomatically?: boolean | undefined;
|
|
142
|
+
keyboardAppearance?: "default" | "light" | "dark" | undefined;
|
|
143
|
+
passwordRules?: string | null | undefined;
|
|
144
|
+
selectionState?: import("react-native").DocumentSelectionState | undefined;
|
|
145
|
+
spellCheck?: boolean | undefined;
|
|
146
|
+
textContentType?: "none" | "name" | "nickname" | "password" | "username" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "creditCardExpiration" | "creditCardExpirationMonth" | "creditCardExpirationYear" | "creditCardSecurityCode" | "creditCardType" | "creditCardName" | "creditCardGivenName" | "creditCardMiddleName" | "creditCardFamilyName" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "namePrefix" | "nameSuffix" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "newPassword" | "oneTimeCode" | "birthdate" | "birthdateDay" | "birthdateMonth" | "birthdateYear" | undefined;
|
|
147
|
+
scrollEnabled?: boolean | undefined;
|
|
148
|
+
smartInsertDelete?: boolean | undefined;
|
|
149
|
+
cursorColor?: import("react-native").ColorValue | null | undefined;
|
|
150
|
+
selectionHandleColor?: import("react-native").ColorValue | null | undefined;
|
|
151
|
+
importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants" | undefined;
|
|
152
|
+
disableFullscreenUI?: boolean | undefined;
|
|
153
|
+
inlineImageLeft?: string | undefined;
|
|
154
|
+
inlineImagePadding?: number | undefined;
|
|
155
|
+
returnKeyLabel?: string | undefined;
|
|
156
|
+
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
157
|
+
textAlignVertical?: "auto" | "center" | "top" | "bottom" | undefined;
|
|
158
|
+
showSoftInputOnFocus?: boolean | undefined;
|
|
159
|
+
verticalAlign?: "auto" | "middle" | "top" | "bottom" | undefined;
|
|
160
|
+
} | undefined;
|
|
161
|
+
inputRef?: import("react").Ref<import("react-native").TextInput> | undefined;
|
|
162
|
+
twClassName?: string | undefined;
|
|
163
|
+
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
164
|
+
testID?: string | undefined;
|
|
165
|
+
} & Omit<import("../Box/index.mjs").BoxProps, "children" | "style" | "testID" | "accessible" | "twClassName" | "onBlur" | "onFocus" | "isDisabled" | "value" | "autoFocus" | "onChangeText" | "placeholder" | "textVariant" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & import("react").RefAttributes<View>>;
|
|
166
|
+
//# sourceMappingURL=TextArea.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAQpC,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iUAyGpB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
|
|
2
|
+
import { forwardRef, useCallback, useEffect, useState } from "react";
|
|
3
|
+
import { View } from "react-native/index.js";
|
|
4
|
+
import { Box } from "../Box/index.mjs";
|
|
5
|
+
import { Input } from "../Input/index.mjs";
|
|
6
|
+
export const TextArea = forwardRef(({ value, onChangeText, placeholder, isReadOnly, onBlur, onFocus, autoFocus = false, inputProps, inputRef, isDisabled = false, isError = false, textVariant, inputElement, style, twClassName, testID, ...props }, ref) => {
|
|
7
|
+
const [isFocused, setIsFocused] = useState(autoFocus);
|
|
8
|
+
const tw = useTailwind();
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (isDisabled || isReadOnly) {
|
|
11
|
+
setIsFocused(false);
|
|
12
|
+
}
|
|
13
|
+
}, [isDisabled, isReadOnly]);
|
|
14
|
+
const { twClassName: inputTwClassNameFromProps, ...inputRestWithoutTwClassName } = inputProps ?? {};
|
|
15
|
+
const onBlurHandler = useCallback((e) => {
|
|
16
|
+
if (!isDisabled) {
|
|
17
|
+
setIsFocused(false);
|
|
18
|
+
onBlur?.(e);
|
|
19
|
+
}
|
|
20
|
+
}, [isDisabled, onBlur]);
|
|
21
|
+
const onFocusHandler = useCallback((e) => {
|
|
22
|
+
if (!isDisabled) {
|
|
23
|
+
setIsFocused(true);
|
|
24
|
+
onFocus?.(e);
|
|
25
|
+
}
|
|
26
|
+
}, [isDisabled, onFocus]);
|
|
27
|
+
return (<Box ref={ref} {...props} testID={testID} accessible={false} style={[
|
|
28
|
+
tw.style('rounded-lg', 'min-h-24', 'border', 'px-4', 'py-3', 'bg-muted', isDisabled && 'border-muted', !isDisabled && isError && 'border-error-default', !isDisabled && !isError && isFocused && 'border-default', !isDisabled && !isError && !isFocused && 'border-muted', isDisabled && 'opacity-50', twClassName),
|
|
29
|
+
style,
|
|
30
|
+
]}>
|
|
31
|
+
{inputElement || (<Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} textVariant={textVariant} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled multiline textAlignVertical="top" twClassName={`min-h-[88px] w-full flex-1 self-stretch bg-transparent border-0 py-1${inputTwClassNameFromProps ? ` ${inputTwClassNameFromProps}` : ''}`}/>)}
|
|
32
|
+
</Box>);
|
|
33
|
+
});
|
|
34
|
+
TextArea.displayName = 'TextArea';
|
|
35
|
+
//# sourceMappingURL=TextArea.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,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,CAAC,CAAC,EAChE,EAAE,CAAC,EACH,CACH,CACH;MAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport { forwardRef, useCallback, useEffect, useState } from 'react';\nimport { View } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Input } from '../Input';\nimport type { InputProps } from '../Input/Input.types';\n\nimport type { TextAreaProps } from './TextArea.types';\n\nexport const TextArea = forwardRef<View, TextAreaProps>(\n (\n {\n value,\n onChangeText,\n placeholder,\n isReadOnly,\n onBlur,\n onFocus,\n autoFocus = false,\n inputProps,\n inputRef,\n isDisabled = false,\n isError = false,\n textVariant,\n inputElement,\n style,\n twClassName,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n\n useEffect(() => {\n if (isDisabled || isReadOnly) {\n setIsFocused(false);\n }\n }, [isDisabled, isReadOnly]);\n\n const {\n twClassName: inputTwClassNameFromProps,\n ...inputRestWithoutTwClassName\n } = inputProps ?? {};\n\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 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\n return (\n <Box\n ref={ref}\n {...props}\n testID={testID}\n accessible={false}\n style={[\n tw.style(\n 'rounded-lg',\n 'min-h-24',\n 'border',\n 'px-4',\n 'py-3',\n 'bg-muted',\n isDisabled && 'border-muted',\n !isDisabled && isError && 'border-error-default',\n !isDisabled && !isError && isFocused && 'border-default',\n !isDisabled && !isError && !isFocused && 'border-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n style,\n ]}\n >\n {inputElement || (\n <Input\n {...inputRestWithoutTwClassName}\n ref={inputRef}\n value={value}\n onChangeText={onChangeText}\n placeholder={placeholder}\n isReadOnly={isReadOnly}\n textVariant={textVariant}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n multiline\n textAlignVertical=\"top\"\n twClassName={`min-h-[88px] w-full flex-1 self-stretch bg-transparent border-0 py-1${\n inputTwClassNameFromProps ? ` ${inputTwClassNameFromProps}` : ''\n }`}\n />\n )}\n </Box>\n );\n },\n);\n\nTextArea.displayName = 'TextArea';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.types.cjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextAreaPropsShared } from '@metamask-previews/design-system-shared';\nimport type { Ref } from 'react';\nimport type { StyleProp, TextInput, ViewStyle } from 'react-native';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { InputProps } from '../Input/Input.types';\n\n/**\n * Additional props merged onto the inner `Input` (`../Input/Input.tsx`).\n *\n * TextArea owns `value`, `onChangeText`, `placeholder`, `isReadOnly`, `onFocus`,\n * `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on), and inner\n * layout (merged with any `twClassName` you pass here). `placeholderTextColor` is\n * omitted (Input sets it from theme).\n */\ntype TextAreaInputProps = Omit<\n InputProps,\n | 'autoFocus'\n | 'isDisabled'\n | 'isReadOnly'\n | 'isStateStylesDisabled'\n | 'multiline'\n | 'onBlur'\n | 'onChangeText'\n | 'onFocus'\n | 'placeholder'\n | 'placeholderTextColor'\n | 'style'\n | 'textVariant'\n | 'value'\n>;\n\n/**\n * React Native `TextArea` props between `TextAreaPropsShared` and the root\n * `Box`: typed focus/blur handlers, `inputProps`, container styling, and\n * `testID`.\n */\nexport type TextAreaBaseProps = TextAreaPropsShared & {\n /**\n * Called when the inner `TextInput` value changes (React Native naming).\n */\n onChangeText?: (text: string) => void;\n /**\n * Called when the inner input receives focus (composed with TextArea border state).\n */\n onFocus?: InputProps['onFocus'];\n /**\n * Called when the inner input loses focus (composed with TextArea border state).\n */\n onBlur?: InputProps['onBlur'];\n /**\n * Additional props for the inner `Input`. Do not pass `placeholder`, `isReadOnly`, `onFocus`, `onBlur`, or `multiline` here;\n * use the TextArea-level props where applicable. For accessibility, prefer `accessibilityLabel` and `accessibilityHint` on\n * `inputProps`. `placeholderTextColor` is omitted from the type; the inner `Input` sets it from the theme.\n */\n inputProps?: TextAreaInputProps;\n /**\n * Ref to the inner `TextInput`. The component `ref` targets the root `Box` (`View`).\n */\n inputRef?: Ref<TextInput>;\n /**\n * Optional twrnc classes for the root `Box`.\n */\n twClassName?: string;\n /**\n * Optional style for the root `Box`.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional test id for the root `Box`.\n */\n testID?: string;\n};\n\ntype TextAreaReservedBoxKeys =\n | keyof TextAreaBaseProps\n | 'accessible'\n | 'children'\n | 'style';\n\n/**\n * TextArea props: `TextAreaBaseProps` plus remaining `BoxProps` at the top\n * level, excluding keys reserved by TextArea.\n */\nexport type TextAreaProps = TextAreaBaseProps &\n Omit<BoxProps, TextAreaReservedBoxKeys>;\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { TextAreaPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { Ref } from "react";
|
|
3
|
+
import type { StyleProp, TextInput, ViewStyle } from "react-native/index.js";
|
|
4
|
+
import type { BoxProps } from "../Box/Box.types.cjs";
|
|
5
|
+
import type { InputProps } from "../Input/Input.types.cjs";
|
|
6
|
+
/**
|
|
7
|
+
* Additional props merged onto the inner `Input` (`../Input/Input.tsx`).
|
|
8
|
+
*
|
|
9
|
+
* TextArea owns `value`, `onChangeText`, `placeholder`, `isReadOnly`, `onFocus`,
|
|
10
|
+
* `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on), and inner
|
|
11
|
+
* layout (merged with any `twClassName` you pass here). `placeholderTextColor` is
|
|
12
|
+
* omitted (Input sets it from theme).
|
|
13
|
+
*/
|
|
14
|
+
type TextAreaInputProps = Omit<InputProps, 'autoFocus' | 'isDisabled' | 'isReadOnly' | 'isStateStylesDisabled' | 'multiline' | 'onBlur' | 'onChangeText' | 'onFocus' | 'placeholder' | 'placeholderTextColor' | 'style' | 'textVariant' | 'value'>;
|
|
15
|
+
/**
|
|
16
|
+
* React Native `TextArea` props between `TextAreaPropsShared` and the root
|
|
17
|
+
* `Box`: typed focus/blur handlers, `inputProps`, container styling, and
|
|
18
|
+
* `testID`.
|
|
19
|
+
*/
|
|
20
|
+
export type TextAreaBaseProps = TextAreaPropsShared & {
|
|
21
|
+
/**
|
|
22
|
+
* Called when the inner `TextInput` value changes (React Native naming).
|
|
23
|
+
*/
|
|
24
|
+
onChangeText?: (text: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Called when the inner input receives focus (composed with TextArea border state).
|
|
27
|
+
*/
|
|
28
|
+
onFocus?: InputProps['onFocus'];
|
|
29
|
+
/**
|
|
30
|
+
* Called when the inner input loses focus (composed with TextArea border state).
|
|
31
|
+
*/
|
|
32
|
+
onBlur?: InputProps['onBlur'];
|
|
33
|
+
/**
|
|
34
|
+
* Additional props for the inner `Input`. Do not pass `placeholder`, `isReadOnly`, `onFocus`, `onBlur`, or `multiline` here;
|
|
35
|
+
* use the TextArea-level props where applicable. For accessibility, prefer `accessibilityLabel` and `accessibilityHint` on
|
|
36
|
+
* `inputProps`. `placeholderTextColor` is omitted from the type; the inner `Input` sets it from the theme.
|
|
37
|
+
*/
|
|
38
|
+
inputProps?: TextAreaInputProps;
|
|
39
|
+
/**
|
|
40
|
+
* Ref to the inner `TextInput`. The component `ref` targets the root `Box` (`View`).
|
|
41
|
+
*/
|
|
42
|
+
inputRef?: Ref<TextInput>;
|
|
43
|
+
/**
|
|
44
|
+
* Optional twrnc classes for the root `Box`.
|
|
45
|
+
*/
|
|
46
|
+
twClassName?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Optional style for the root `Box`.
|
|
49
|
+
*/
|
|
50
|
+
style?: StyleProp<ViewStyle>;
|
|
51
|
+
/**
|
|
52
|
+
* Optional test id for the root `Box`.
|
|
53
|
+
*/
|
|
54
|
+
testID?: string;
|
|
55
|
+
};
|
|
56
|
+
type TextAreaReservedBoxKeys = keyof TextAreaBaseProps | 'accessible' | 'children' | 'style';
|
|
57
|
+
/**
|
|
58
|
+
* TextArea props: `TextAreaBaseProps` plus remaining `BoxProps` at the top
|
|
59
|
+
* level, excluding keys reserved by TextArea.
|
|
60
|
+
*/
|
|
61
|
+
export type TextAreaProps = TextAreaBaseProps & Omit<BoxProps, TextAreaReservedBoxKeys>;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=TextArea.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gDAAgD;AACnF,OAAO,KAAK,EAAE,GAAG,EAAE,cAAc;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEpE,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,iCAA6B;AAEvD;;;;;;;GAOG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAC5B,UAAU,EACR,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,uBAAuB,GACvB,WAAW,GACX,QAAQ,GACR,cAAc,GACd,SAAS,GACT,aAAa,GACb,sBAAsB,GACtB,OAAO,GACP,aAAa,GACb,OAAO,CACV,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG;IACpD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC9B;;;;OAIG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,uBAAuB,GACxB,MAAM,iBAAiB,GACvB,YAAY,GACZ,UAAU,GACV,OAAO,CAAC;AAEZ;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { TextAreaPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { Ref } from "react";
|
|
3
|
+
import type { StyleProp, TextInput, ViewStyle } from "react-native/index.js";
|
|
4
|
+
import type { BoxProps } from "../Box/Box.types.mjs";
|
|
5
|
+
import type { InputProps } from "../Input/Input.types.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Additional props merged onto the inner `Input` (`../Input/Input.tsx`).
|
|
8
|
+
*
|
|
9
|
+
* TextArea owns `value`, `onChangeText`, `placeholder`, `isReadOnly`, `onFocus`,
|
|
10
|
+
* `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on), and inner
|
|
11
|
+
* layout (merged with any `twClassName` you pass here). `placeholderTextColor` is
|
|
12
|
+
* omitted (Input sets it from theme).
|
|
13
|
+
*/
|
|
14
|
+
type TextAreaInputProps = Omit<InputProps, 'autoFocus' | 'isDisabled' | 'isReadOnly' | 'isStateStylesDisabled' | 'multiline' | 'onBlur' | 'onChangeText' | 'onFocus' | 'placeholder' | 'placeholderTextColor' | 'style' | 'textVariant' | 'value'>;
|
|
15
|
+
/**
|
|
16
|
+
* React Native `TextArea` props between `TextAreaPropsShared` and the root
|
|
17
|
+
* `Box`: typed focus/blur handlers, `inputProps`, container styling, and
|
|
18
|
+
* `testID`.
|
|
19
|
+
*/
|
|
20
|
+
export type TextAreaBaseProps = TextAreaPropsShared & {
|
|
21
|
+
/**
|
|
22
|
+
* Called when the inner `TextInput` value changes (React Native naming).
|
|
23
|
+
*/
|
|
24
|
+
onChangeText?: (text: string) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Called when the inner input receives focus (composed with TextArea border state).
|
|
27
|
+
*/
|
|
28
|
+
onFocus?: InputProps['onFocus'];
|
|
29
|
+
/**
|
|
30
|
+
* Called when the inner input loses focus (composed with TextArea border state).
|
|
31
|
+
*/
|
|
32
|
+
onBlur?: InputProps['onBlur'];
|
|
33
|
+
/**
|
|
34
|
+
* Additional props for the inner `Input`. Do not pass `placeholder`, `isReadOnly`, `onFocus`, `onBlur`, or `multiline` here;
|
|
35
|
+
* use the TextArea-level props where applicable. For accessibility, prefer `accessibilityLabel` and `accessibilityHint` on
|
|
36
|
+
* `inputProps`. `placeholderTextColor` is omitted from the type; the inner `Input` sets it from the theme.
|
|
37
|
+
*/
|
|
38
|
+
inputProps?: TextAreaInputProps;
|
|
39
|
+
/**
|
|
40
|
+
* Ref to the inner `TextInput`. The component `ref` targets the root `Box` (`View`).
|
|
41
|
+
*/
|
|
42
|
+
inputRef?: Ref<TextInput>;
|
|
43
|
+
/**
|
|
44
|
+
* Optional twrnc classes for the root `Box`.
|
|
45
|
+
*/
|
|
46
|
+
twClassName?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Optional style for the root `Box`.
|
|
49
|
+
*/
|
|
50
|
+
style?: StyleProp<ViewStyle>;
|
|
51
|
+
/**
|
|
52
|
+
* Optional test id for the root `Box`.
|
|
53
|
+
*/
|
|
54
|
+
testID?: string;
|
|
55
|
+
};
|
|
56
|
+
type TextAreaReservedBoxKeys = keyof TextAreaBaseProps | 'accessible' | 'children' | 'style';
|
|
57
|
+
/**
|
|
58
|
+
* TextArea props: `TextAreaBaseProps` plus remaining `BoxProps` at the top
|
|
59
|
+
* level, excluding keys reserved by TextArea.
|
|
60
|
+
*/
|
|
61
|
+
export type TextAreaProps = TextAreaBaseProps & Omit<BoxProps, TextAreaReservedBoxKeys>;
|
|
62
|
+
export {};
|
|
63
|
+
//# sourceMappingURL=TextArea.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gDAAgD;AACnF,OAAO,KAAK,EAAE,GAAG,EAAE,cAAc;AACjC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEpE,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,iCAA6B;AAEvD;;;;;;;GAOG;AACH,KAAK,kBAAkB,GAAG,IAAI,CAC5B,UAAU,EACR,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,uBAAuB,GACvB,WAAW,GACX,QAAQ,GACR,cAAc,GACd,SAAS,GACT,aAAa,GACb,sBAAsB,GACtB,OAAO,GACP,aAAa,GACb,OAAO,CACV,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG;IACpD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;IAChC;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC9B;;;;OAIG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,uBAAuB,GACxB,MAAM,iBAAiB,GACvB,YAAY,GACZ,UAAU,GACV,OAAO,CAAC;AAEZ;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAC3C,IAAI,CAAC,QAAQ,EAAE,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.types.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/TextArea.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextAreaPropsShared } from '@metamask-previews/design-system-shared';\nimport type { Ref } from 'react';\nimport type { StyleProp, TextInput, ViewStyle } from 'react-native';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { InputProps } from '../Input/Input.types';\n\n/**\n * Additional props merged onto the inner `Input` (`../Input/Input.tsx`).\n *\n * TextArea owns `value`, `onChangeText`, `placeholder`, `isReadOnly`, `onFocus`,\n * `onBlur`, `isDisabled`, `autoFocus`, `textVariant`, multiline (always on), and inner\n * layout (merged with any `twClassName` you pass here). `placeholderTextColor` is\n * omitted (Input sets it from theme).\n */\ntype TextAreaInputProps = Omit<\n InputProps,\n | 'autoFocus'\n | 'isDisabled'\n | 'isReadOnly'\n | 'isStateStylesDisabled'\n | 'multiline'\n | 'onBlur'\n | 'onChangeText'\n | 'onFocus'\n | 'placeholder'\n | 'placeholderTextColor'\n | 'style'\n | 'textVariant'\n | 'value'\n>;\n\n/**\n * React Native `TextArea` props between `TextAreaPropsShared` and the root\n * `Box`: typed focus/blur handlers, `inputProps`, container styling, and\n * `testID`.\n */\nexport type TextAreaBaseProps = TextAreaPropsShared & {\n /**\n * Called when the inner `TextInput` value changes (React Native naming).\n */\n onChangeText?: (text: string) => void;\n /**\n * Called when the inner input receives focus (composed with TextArea border state).\n */\n onFocus?: InputProps['onFocus'];\n /**\n * Called when the inner input loses focus (composed with TextArea border state).\n */\n onBlur?: InputProps['onBlur'];\n /**\n * Additional props for the inner `Input`. Do not pass `placeholder`, `isReadOnly`, `onFocus`, `onBlur`, or `multiline` here;\n * use the TextArea-level props where applicable. For accessibility, prefer `accessibilityLabel` and `accessibilityHint` on\n * `inputProps`. `placeholderTextColor` is omitted from the type; the inner `Input` sets it from the theme.\n */\n inputProps?: TextAreaInputProps;\n /**\n * Ref to the inner `TextInput`. The component `ref` targets the root `Box` (`View`).\n */\n inputRef?: Ref<TextInput>;\n /**\n * Optional twrnc classes for the root `Box`.\n */\n twClassName?: string;\n /**\n * Optional style for the root `Box`.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional test id for the root `Box`.\n */\n testID?: string;\n};\n\ntype TextAreaReservedBoxKeys =\n | keyof TextAreaBaseProps\n | 'accessible'\n | 'children'\n | 'style';\n\n/**\n * TextArea props: `TextAreaBaseProps` plus remaining `BoxProps` at the top\n * level, excluding keys reserved by TextArea.\n */\nexport type TextAreaProps = TextAreaBaseProps &\n Omit<BoxProps, TextAreaReservedBoxKeys>;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextArea = void 0;
|
|
4
|
+
var TextArea_1 = require("./TextArea.cjs");
|
|
5
|
+
Object.defineProperty(exports, "TextArea", { enumerable: true, get: function () { return TextArea_1.TextArea; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/TextArea/index.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAA7B,oGAAA,QAAQ,OAAA","sourcesContent":["export { TextArea } from './TextArea';\nexport type { TextAreaProps } from './TextArea.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/TextArea/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB","sourcesContent":["export { TextArea } from './TextArea';\nexport type { TextAreaProps } from './TextArea.types';\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TextField = void 0;
|
|
4
|
-
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
5
4
|
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const react_native_1 = require("react-native/index.js");
|
|
@@ -28,7 +27,7 @@ exports.TextField = (0, react_1.forwardRef)(({ value, onChangeText, placeholder,
|
|
|
28
27
|
style,
|
|
29
28
|
]}>
|
|
30
29
|
{startAccessory}
|
|
31
|
-
{inputElement || (<Input_1.Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly}
|
|
30
|
+
{inputElement || (<Input_1.Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled twClassName={`min-h-0 flex-1 justify-center h-[46px] bg-transparent border-0${inputTwClassNameFromProps ? ` ${inputTwClassNameFromProps}` : ''}`} numberOfLines={1} multiline={false}/>)}
|
|
32
31
|
{endAccessory}
|
|
33
32
|
</Box_1.Box>);
|
|
34
33
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.cjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"TextField.cjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";;;AAAA,8FAA4E;AAC5E,iCAA0D;AAC1D,wDAAoC;AAEpC,0CAA6B;AAC7B,8CAAiC;AAKpB,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CACE,EACE,KAAK,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,MAAM,EACN,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,KAAK,EACL,WAAW,EACX,MAAM,EACN,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,EACJ,WAAW,EAAE,yBAAyB,EACtC,GAAG,2BAA2B,EAC/B,GAA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YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,qBAAqB,CACrB,WAAW,CAAC,CAAC,iEACX,yBAAyB,CAAC,CAAC,CAAC,IAAI,yBAAyB,EAAE,CAAC,CAAC,CAAC,EAChE,EAAE,CAAC,CACH,aAAa,CAAC,CAAC,CAAC,CAAC,CACjB,SAAS,CAAC,CAAC,KAAK,CAAC,EACjB,CACH,CACD;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport { forwardRef, useCallback, useState } from 'react';\nimport { View } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Input } from '../Input';\nimport type { InputProps } from '../Input/Input.types';\n\nimport type { TextFieldProps } from './TextField.types';\n\nexport const TextField = forwardRef<View, TextFieldProps>(\n (\n {\n value,\n onChangeText,\n placeholder,\n isReadOnly,\n onBlur,\n onFocus,\n autoFocus = false,\n inputProps,\n inputRef,\n isDisabled = false,\n isError = false,\n inputElement,\n startAccessory,\n endAccessory,\n style,\n twClassName,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n\n const {\n twClassName: inputTwClassNameFromProps,\n ...inputRestWithoutTwClassName\n } = inputProps ?? {};\n\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 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\n return (\n <Box\n ref={ref}\n {...props}\n testID={testID}\n accessible={false}\n style={[\n tw.style(\n 'flex-row',\n 'items-center',\n 'gap-3',\n 'rounded-lg',\n 'h-12',\n 'border',\n 'px-4',\n 'bg-muted',\n isDisabled && 'border-muted',\n !isDisabled && isError && 'border-error-default',\n !isDisabled && !isError && isFocused && 'border-default',\n !isDisabled && !isError && !isFocused && 'border-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n style,\n ]}\n >\n {startAccessory}\n {inputElement || (\n <Input\n {...inputRestWithoutTwClassName}\n ref={inputRef}\n value={value}\n onChangeText={onChangeText}\n placeholder={placeholder}\n isReadOnly={isReadOnly}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n twClassName={`min-h-0 flex-1 justify-center h-[46px] bg-transparent border-0${\n inputTwClassNameFromProps ? ` ${inputTwClassNameFromProps}` : ''\n }`}\n numberOfLines={1}\n multiline={false}\n />\n )}\n {endAccessory}\n </Box>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"]}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from "react-native/index.js";
|
|
3
|
-
export declare const TextField: import("react").ForwardRefExoticComponent<import("@metamask-previews/design-system-shared").
|
|
3
|
+
export declare const TextField: import("react").ForwardRefExoticComponent<Omit<import("@metamask-previews/design-system-shared").InputPropsShared, "textVariant" | "isStateStylesDisabled"> & {
|
|
4
|
+
isError?: boolean | undefined;
|
|
5
|
+
startAccessory?: import("react").ReactNode;
|
|
6
|
+
endAccessory?: import("react").ReactNode;
|
|
7
|
+
inputElement?: import("react").ReactNode;
|
|
8
|
+
} & {
|
|
9
|
+
onChangeText?: ((text: string) => void) | undefined;
|
|
4
10
|
onFocus?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputFocusEventData>) => void) | undefined;
|
|
5
11
|
onBlur?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputFocusEventData>) => void) | undefined;
|
|
6
12
|
inputProps?: {
|
|
@@ -159,5 +165,5 @@ export declare const TextField: import("react").ForwardRefExoticComponent<import
|
|
|
159
165
|
twClassName?: string | undefined;
|
|
160
166
|
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
161
167
|
testID?: string | undefined;
|
|
162
|
-
} & Omit<import("../Box/index.cjs").BoxProps, "children" | "style" | "testID" | "accessible" | "twClassName" | "onBlur" | "onFocus" |
|
|
168
|
+
} & Omit<import("../Box/index.cjs").BoxProps, "children" | "style" | "testID" | "accessible" | "twClassName" | "onBlur" | "onFocus" | "startAccessory" | "endAccessory" | "isDisabled" | "value" | "autoFocus" | "onChangeText" | "placeholder" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & import("react").RefAttributes<View>>;
|
|
163
169
|
//# sourceMappingURL=TextField.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TextField.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAQpC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qVAuGrB,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { View } from "react-native/index.js";
|
|
3
|
-
export declare const TextField: import("react").ForwardRefExoticComponent<import("@metamask-previews/design-system-shared").
|
|
3
|
+
export declare const TextField: import("react").ForwardRefExoticComponent<Omit<import("@metamask-previews/design-system-shared").InputPropsShared, "textVariant" | "isStateStylesDisabled"> & {
|
|
4
|
+
isError?: boolean | undefined;
|
|
5
|
+
startAccessory?: import("react").ReactNode;
|
|
6
|
+
endAccessory?: import("react").ReactNode;
|
|
7
|
+
inputElement?: import("react").ReactNode;
|
|
8
|
+
} & {
|
|
9
|
+
onChangeText?: ((text: string) => void) | undefined;
|
|
4
10
|
onFocus?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputFocusEventData>) => void) | undefined;
|
|
5
11
|
onBlur?: ((e: import("react-native").NativeSyntheticEvent<import("react-native").TextInputFocusEventData>) => void) | undefined;
|
|
6
12
|
inputProps?: {
|
|
@@ -159,5 +165,5 @@ export declare const TextField: import("react").ForwardRefExoticComponent<import
|
|
|
159
165
|
twClassName?: string | undefined;
|
|
160
166
|
style?: import("react-native").StyleProp<import("react-native").ViewStyle>;
|
|
161
167
|
testID?: string | undefined;
|
|
162
|
-
} & Omit<import("../Box/index.mjs").BoxProps, "children" | "style" | "testID" | "accessible" | "twClassName" | "onBlur" | "onFocus" |
|
|
168
|
+
} & Omit<import("../Box/index.mjs").BoxProps, "children" | "style" | "testID" | "accessible" | "twClassName" | "onBlur" | "onFocus" | "startAccessory" | "endAccessory" | "isDisabled" | "value" | "autoFocus" | "onChangeText" | "placeholder" | "isReadOnly" | "isError" | "inputElement" | "inputProps" | "inputRef"> & import("react").RefAttributes<View>>;
|
|
163
169
|
//# sourceMappingURL=TextField.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.mts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TextField.d.mts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAQpC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qVAuGrB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TextVariant } from "@metamask-previews/design-system-shared";
|
|
2
1
|
import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
|
|
3
2
|
import { forwardRef, useCallback, useState } from "react";
|
|
4
3
|
import { View } from "react-native/index.js";
|
|
@@ -25,7 +24,7 @@ export const TextField = forwardRef(({ value, onChangeText, placeholder, isReadO
|
|
|
25
24
|
style,
|
|
26
25
|
]}>
|
|
27
26
|
{startAccessory}
|
|
28
|
-
{inputElement || (<Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly}
|
|
27
|
+
{inputElement || (<Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled twClassName={`min-h-0 flex-1 justify-center h-[46px] bg-transparent border-0${inputTwClassNameFromProps ? ` ${inputTwClassNameFromProps}` : ''}`} numberOfLines={1} multiline={false}/>)}
|
|
29
28
|
{endAccessory}
|
|
30
29
|
</Box>);
|
|
31
30
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.mjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"TextField.mjs","sourceRoot":"","sources":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,YAAY,CACf;MAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport { forwardRef, useCallback, useState } from 'react';\nimport { View } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Input } from '../Input';\nimport type { InputProps } from '../Input/Input.types';\n\nimport type { TextFieldProps } from './TextField.types';\n\nexport const TextField = forwardRef<View, TextFieldProps>(\n (\n {\n value,\n onChangeText,\n placeholder,\n isReadOnly,\n onBlur,\n onFocus,\n autoFocus = false,\n inputProps,\n inputRef,\n isDisabled = false,\n isError = false,\n inputElement,\n startAccessory,\n endAccessory,\n style,\n twClassName,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n\n const {\n twClassName: inputTwClassNameFromProps,\n ...inputRestWithoutTwClassName\n } = inputProps ?? {};\n\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 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\n return (\n <Box\n ref={ref}\n {...props}\n testID={testID}\n accessible={false}\n style={[\n tw.style(\n 'flex-row',\n 'items-center',\n 'gap-3',\n 'rounded-lg',\n 'h-12',\n 'border',\n 'px-4',\n 'bg-muted',\n isDisabled && 'border-muted',\n !isDisabled && isError && 'border-error-default',\n !isDisabled && !isError && isFocused && 'border-default',\n !isDisabled && !isError && !isFocused && 'border-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n style,\n ]}\n >\n {startAccessory}\n {inputElement || (\n <Input\n {...inputRestWithoutTwClassName}\n ref={inputRef}\n value={value}\n onChangeText={onChangeText}\n placeholder={placeholder}\n isReadOnly={isReadOnly}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n twClassName={`min-h-0 flex-1 justify-center h-[46px] bg-transparent border-0${\n inputTwClassNameFromProps ? ` ${inputTwClassNameFromProps}` : ''\n }`}\n numberOfLines={1}\n multiline={false}\n />\n )}\n {endAccessory}\n </Box>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"]}
|