@metamask/design-system-react-native 0.23.0 → 0.25.0
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 +35 -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 +12 -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 +12 -0
- package/dist/components/Icon/Icon.assets.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/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/Input/Input.cjs +25 -14
- package/dist/components/Input/Input.cjs.map +1 -1
- 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 +25 -14
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/SegmentButton/SegmentButton.cjs +86 -0
- package/dist/components/SegmentButton/SegmentButton.cjs.map +1 -0
- package/dist/components/SegmentButton/SegmentButton.d.cts +7 -0
- package/dist/components/SegmentButton/SegmentButton.d.cts.map +1 -0
- package/dist/components/SegmentButton/SegmentButton.d.mts +7 -0
- package/dist/components/SegmentButton/SegmentButton.d.mts.map +1 -0
- package/dist/components/SegmentButton/SegmentButton.mjs +66 -0
- package/dist/components/SegmentButton/SegmentButton.mjs.map +1 -0
- package/dist/components/SegmentButton/SegmentButton.types.cjs +3 -0
- package/dist/components/SegmentButton/SegmentButton.types.cjs.map +1 -0
- package/dist/components/SegmentButton/SegmentButton.types.d.cts +9 -0
- package/dist/components/SegmentButton/SegmentButton.types.d.cts.map +1 -0
- package/dist/components/SegmentButton/SegmentButton.types.d.mts +9 -0
- package/dist/components/SegmentButton/SegmentButton.types.d.mts.map +1 -0
- package/dist/components/SegmentButton/SegmentButton.types.mjs +2 -0
- package/dist/components/SegmentButton/SegmentButton.types.mjs.map +1 -0
- package/dist/components/SegmentButton/index.cjs +8 -0
- package/dist/components/SegmentButton/index.cjs.map +1 -0
- package/dist/components/SegmentButton/index.d.cts +4 -0
- package/dist/components/SegmentButton/index.d.cts.map +1 -0
- package/dist/components/SegmentButton/index.d.mts +4 -0
- package/dist/components/SegmentButton/index.d.mts.map +1 -0
- package/dist/components/SegmentButton/index.mjs +3 -0
- package/dist/components/SegmentButton/index.mjs.map +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.cjs +47 -0
- package/dist/components/SegmentGroup/SegmentGroup.cjs.map +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.d.cts +7 -0
- package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.d.mts +7 -0
- package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.mjs +27 -0
- package/dist/components/SegmentGroup/SegmentGroup.mjs.map +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.types.cjs +3 -0
- package/dist/components/SegmentGroup/SegmentGroup.types.cjs.map +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.types.d.cts +12 -0
- package/dist/components/SegmentGroup/SegmentGroup.types.d.cts.map +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.types.d.mts +12 -0
- package/dist/components/SegmentGroup/SegmentGroup.types.d.mts.map +1 -0
- package/dist/components/SegmentGroup/SegmentGroup.types.mjs +2 -0
- package/dist/components/SegmentGroup/SegmentGroup.types.mjs.map +1 -0
- package/dist/components/SegmentGroup/index.cjs +6 -0
- package/dist/components/SegmentGroup/index.cjs.map +1 -0
- package/dist/components/SegmentGroup/index.d.cts +3 -0
- package/dist/components/SegmentGroup/index.d.cts.map +1 -0
- package/dist/components/SegmentGroup/index.d.mts +3 -0
- package/dist/components/SegmentGroup/index.d.mts.map +1 -0
- package/dist/components/SegmentGroup/index.mjs +2 -0
- package/dist/components/SegmentGroup/index.mjs.map +1 -0
- package/dist/components/SelectButton/SelectButton.cjs +53 -0
- package/dist/components/SelectButton/SelectButton.cjs.map +1 -0
- package/dist/components/SelectButton/SelectButton.constants.cjs +12 -0
- package/dist/components/SelectButton/SelectButton.constants.cjs.map +1 -0
- package/dist/components/SelectButton/SelectButton.constants.d.cts +4 -0
- package/dist/components/SelectButton/SelectButton.constants.d.cts.map +1 -0
- package/dist/components/SelectButton/SelectButton.constants.d.mts +4 -0
- package/dist/components/SelectButton/SelectButton.constants.d.mts.map +1 -0
- package/dist/components/SelectButton/SelectButton.constants.mjs +9 -0
- package/dist/components/SelectButton/SelectButton.constants.mjs.map +1 -0
- package/dist/components/SelectButton/SelectButton.d.cts +7 -0
- package/dist/components/SelectButton/SelectButton.d.cts.map +1 -0
- package/dist/components/SelectButton/SelectButton.d.mts +7 -0
- package/dist/components/SelectButton/SelectButton.d.mts.map +1 -0
- package/dist/components/SelectButton/SelectButton.mjs +53 -0
- package/dist/components/SelectButton/SelectButton.mjs.map +1 -0
- package/dist/components/SelectButton/SelectButton.types.cjs +3 -0
- package/dist/components/SelectButton/SelectButton.types.cjs.map +1 -0
- package/dist/components/SelectButton/SelectButton.types.d.cts +13 -0
- package/dist/components/SelectButton/SelectButton.types.d.cts.map +1 -0
- package/dist/components/SelectButton/SelectButton.types.d.mts +13 -0
- package/dist/components/SelectButton/SelectButton.types.d.mts.map +1 -0
- package/dist/components/SelectButton/SelectButton.types.mjs +2 -0
- package/dist/components/SelectButton/SelectButton.types.mjs.map +1 -0
- package/dist/components/SelectButton/index.cjs +9 -0
- package/dist/components/SelectButton/index.cjs.map +1 -0
- package/dist/components/SelectButton/index.d.cts +4 -0
- package/dist/components/SelectButton/index.d.cts.map +1 -0
- package/dist/components/SelectButton/index.d.mts +4 -0
- package/dist/components/SelectButton/index.d.mts.map +1 -0
- package/dist/components/SelectButton/index.mjs +3 -0
- package/dist/components/SelectButton/index.mjs.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.cjs +4 -4
- package/dist/components/SensitiveText/SensitiveText.cjs.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.d.cts.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.d.mts.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.mjs +1 -1
- package/dist/components/SensitiveText/SensitiveText.mjs.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.types.cjs.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.types.d.cts +6 -34
- package/dist/components/SensitiveText/SensitiveText.types.d.cts.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.types.d.mts +6 -34
- package/dist/components/SensitiveText/SensitiveText.types.d.mts.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.types.mjs.map +1 -1
- package/dist/components/SensitiveText/index.cjs +3 -3
- package/dist/components/SensitiveText/index.cjs.map +1 -1
- package/dist/components/SensitiveText/index.d.cts +1 -1
- package/dist/components/SensitiveText/index.d.cts.map +1 -1
- package/dist/components/SensitiveText/index.d.mts +1 -1
- package/dist/components/SensitiveText/index.d.mts.map +1 -1
- package/dist/components/SensitiveText/index.mjs +1 -1
- package/dist/components/SensitiveText/index.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 +21 -4
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +14 -2
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +14 -2
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +7 -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/package.json +2 -2
- package/dist/components/SensitiveText/SensitiveText.constants.cjs +0 -14
- package/dist/components/SensitiveText/SensitiveText.constants.cjs.map +0 -1
- package/dist/components/SensitiveText/SensitiveText.constants.d.cts +0 -11
- package/dist/components/SensitiveText/SensitiveText.constants.d.cts.map +0 -1
- package/dist/components/SensitiveText/SensitiveText.constants.d.mts +0 -11
- package/dist/components/SensitiveText/SensitiveText.constants.d.mts.map +0 -1
- package/dist/components/SensitiveText/SensitiveText.constants.mjs +0 -11
- package/dist/components/SensitiveText/SensitiveText.constants.mjs.map +0 -1
- 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
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
export {};
|
|
10
2
|
//# sourceMappingURL=HeaderStandard.types.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderStandard.types.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderStandard.types.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { HeaderBaseProps } from '../HeaderBase';\nimport type { HeaderStandardCenterColumnFields } from '../temp-components/HeaderStandardCenterColumn';\n\n/**\n * HeaderStandard component props.\n */\nexport type HeaderStandardProps = HeaderBaseProps &\n HeaderStandardCenterColumnFields & {\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,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.HeaderStandardAnimated = void 0;
|
|
30
|
+
// Third party dependencies.
|
|
31
|
+
const design_tokens_1 = require("@metamask/design-tokens");
|
|
32
|
+
const react_1 = __importDefault(require("react"));
|
|
33
|
+
const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
34
|
+
// External dependencies.
|
|
35
|
+
const HeaderStandard_1 = require("../HeaderStandard/index.cjs");
|
|
36
|
+
const HeaderStandardCenterColumn_1 = require("../temp-components/HeaderStandardCenterColumn/index.cjs");
|
|
37
|
+
const COMPACT_TITLE_ENTER_OFFSET_PX = 8;
|
|
38
|
+
const HeaderStandardAnimated = ({ title, titleProps, subtitle, subtitleProps, scrollY, titleSectionHeight, twClassName = '', ...headerStandardProps }) => {
|
|
39
|
+
const compactTitleProgress = (0, react_native_reanimated_1.useDerivedValue)(() => {
|
|
40
|
+
const hasMeasured = titleSectionHeight.value > 0;
|
|
41
|
+
const isFullyHidden = hasMeasured && scrollY.value >= titleSectionHeight.value;
|
|
42
|
+
return (0, react_native_reanimated_1.withTiming)(isFullyHidden ? 1 : 0, {
|
|
43
|
+
duration: design_tokens_1.AnimationDuration.Fast,
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
const centerAnimatedStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
|
|
47
|
+
const progress = compactTitleProgress.value;
|
|
48
|
+
return {
|
|
49
|
+
opacity: progress,
|
|
50
|
+
transform: [
|
|
51
|
+
{ translateY: (1 - progress) * COMPACT_TITLE_ENTER_OFFSET_PX },
|
|
52
|
+
],
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
return (<HeaderStandard_1.HeaderStandard {...headerStandardProps} twClassName={twClassName}>
|
|
56
|
+
<react_native_reanimated_1.default.View style={centerAnimatedStyle}>
|
|
57
|
+
{title ? (<HeaderStandardCenterColumn_1.HeaderStandardCenterColumn title={title} titleProps={titleProps} subtitle={subtitle} subtitleProps={subtitleProps}/>) : null}
|
|
58
|
+
</react_native_reanimated_1.default.View>
|
|
59
|
+
</HeaderStandard_1.HeaderStandard>);
|
|
60
|
+
};
|
|
61
|
+
exports.HeaderStandardAnimated = HeaderStandardAnimated;
|
|
62
|
+
exports.HeaderStandardAnimated.displayName = 'HeaderStandardAnimated';
|
|
63
|
+
//# sourceMappingURL=HeaderStandardAnimated.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandardAnimated.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/HeaderStandardAnimated.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,2DAA4D;AAC5D,kDAA0B;AAC1B,mFAIiC;AAEjC,yBAAyB;AACzB,gEAAmD;AACnD,wGAA2F;AAK3F,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAEjC,MAAM,sBAAsB,GAA0C,CAAC,EAC5E,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,WAAW,GAAG,EAAE,EAChB,GAAG,mBAAmB,EACvB,EAAE,EAAE;IACH,MAAM,oBAAoB,GAAG,IAAA,yCAAe,EAAC,GAAG,EAAE;QAChD,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,GAAG,CAAC,CAAC;QACjD,MAAM,aAAa,GACjB,WAAW,IAAI,OAAO,CAAC,KAAK,IAAI,kBAAkB,CAAC,KAAK,CAAC;QAC3D,OAAO,IAAA,oCAAU,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACvC,QAAQ,EAAE,iCAAiB,CAAC,IAAI;SACjC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,mBAAmB,GAAG,IAAA,0CAAgB,EAAC,GAAG,EAAE;QAChD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,QAAQ;YACjB,SAAS,EAAE;gBACT,EAAE,UAAU,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,6BAA6B,EAAE;aAC/D;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,+BAAc,CAAC,IAAI,mBAAmB,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAChE;MAAA,CAAC,iCAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,mBAAmB,CAAC,CACxC;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,uDAA0B,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,EAC7B,CACH,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,iCAAQ,CAAC,IAAI,CACjB;IAAA,EAAE,+BAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,sBAAsB,0BA2CjC;AAEF,8BAAsB,CAAC,WAAW,GAAG,wBAAwB,CAAC","sourcesContent":["// Third party dependencies.\nimport { AnimationDuration } from '@metamask/design-tokens';\nimport React from 'react';\nimport Animated, {\n useAnimatedStyle,\n useDerivedValue,\n withTiming,\n} from 'react-native-reanimated';\n\n// External dependencies.\nimport { HeaderStandard } from '../HeaderStandard';\nimport { HeaderStandardCenterColumn } from '../temp-components/HeaderStandardCenterColumn';\n\n// Internal dependencies.\nimport type { HeaderStandardAnimatedProps } from './HeaderStandardAnimated.types';\n\nconst COMPACT_TITLE_ENTER_OFFSET_PX = 8;\n\nexport const HeaderStandardAnimated: React.FC<HeaderStandardAnimatedProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n scrollY,\n titleSectionHeight,\n twClassName = '',\n ...headerStandardProps\n}) => {\n const compactTitleProgress = useDerivedValue(() => {\n const hasMeasured = titleSectionHeight.value > 0;\n const isFullyHidden =\n hasMeasured && scrollY.value >= titleSectionHeight.value;\n return withTiming(isFullyHidden ? 1 : 0, {\n duration: AnimationDuration.Fast,\n });\n });\n\n const centerAnimatedStyle = useAnimatedStyle(() => {\n const progress = compactTitleProgress.value;\n return {\n opacity: progress,\n transform: [\n { translateY: (1 - progress) * COMPACT_TITLE_ENTER_OFFSET_PX },\n ],\n };\n });\n\n return (\n <HeaderStandard {...headerStandardProps} twClassName={twClassName}>\n <Animated.View style={centerAnimatedStyle}>\n {title ? (\n <HeaderStandardCenterColumn\n title={title}\n titleProps={titleProps}\n subtitle={subtitle}\n subtitleProps={subtitleProps}\n />\n ) : null}\n </Animated.View>\n </HeaderStandard>\n );\n};\n\nHeaderStandardAnimated.displayName = 'HeaderStandardAnimated';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandardAnimated.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/HeaderStandardAnimated.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,2BAA2B,EAAE,2CAAuC;AAIlF,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA2CxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandardAnimated.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/HeaderStandardAnimated.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,2BAA2B,EAAE,2CAAuC;AAIlF,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CA2CxE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
// Third party dependencies.
|
|
8
|
+
import { AnimationDuration } from "@metamask/design-tokens";
|
|
9
|
+
import $React from "react";
|
|
10
|
+
const React = $importDefault($React);
|
|
11
|
+
import Animated, { useAnimatedStyle, useDerivedValue, withTiming } from "react-native-reanimated";
|
|
12
|
+
// External dependencies.
|
|
13
|
+
import { HeaderStandard } from "../HeaderStandard/index.mjs";
|
|
14
|
+
import { HeaderStandardCenterColumn } from "../temp-components/HeaderStandardCenterColumn/index.mjs";
|
|
15
|
+
const COMPACT_TITLE_ENTER_OFFSET_PX = 8;
|
|
16
|
+
export const HeaderStandardAnimated = ({ title, titleProps, subtitle, subtitleProps, scrollY, titleSectionHeight, twClassName = '', ...headerStandardProps }) => {
|
|
17
|
+
const compactTitleProgress = useDerivedValue(() => {
|
|
18
|
+
const hasMeasured = titleSectionHeight.value > 0;
|
|
19
|
+
const isFullyHidden = hasMeasured && scrollY.value >= titleSectionHeight.value;
|
|
20
|
+
return withTiming(isFullyHidden ? 1 : 0, {
|
|
21
|
+
duration: AnimationDuration.Fast,
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
const centerAnimatedStyle = useAnimatedStyle(() => {
|
|
25
|
+
const progress = compactTitleProgress.value;
|
|
26
|
+
return {
|
|
27
|
+
opacity: progress,
|
|
28
|
+
transform: [
|
|
29
|
+
{ translateY: (1 - progress) * COMPACT_TITLE_ENTER_OFFSET_PX },
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
return (<HeaderStandard {...headerStandardProps} twClassName={twClassName}>
|
|
34
|
+
<Animated.View style={centerAnimatedStyle}>
|
|
35
|
+
{title ? (<HeaderStandardCenterColumn title={title} titleProps={titleProps} subtitle={subtitle} subtitleProps={subtitleProps}/>) : null}
|
|
36
|
+
</Animated.View>
|
|
37
|
+
</HeaderStandard>);
|
|
38
|
+
};
|
|
39
|
+
HeaderStandardAnimated.displayName = 'HeaderStandardAnimated';
|
|
40
|
+
//# sourceMappingURL=HeaderStandardAnimated.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandardAnimated.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/HeaderStandardAnimated.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EAAE,iBAAiB,EAAE,gCAAgC;AAC5D,OAAO,MAAK,cAAc;;AAC1B,OAAO,QAAQ,EAAE,EACf,gBAAgB,EAChB,eAAe,EACf,UAAU,EACX,gCAAgC;AAEjC,yBAAyB;AACzB,OAAO,EAAE,cAAc,EAAE,oCAA0B;AACnD,OAAO,EAAE,0BAA0B,EAAE,gEAAsD;AAK3F,MAAM,6BAA6B,GAAG,CAAC,CAAC;AAExC,MAAM,CAAC,MAAM,sBAAsB,GAA0C,CAAC,EAC5E,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,OAAO,EACP,kBAAkB,EAClB,WAAW,GAAG,EAAE,EAChB,GAAG,mBAAmB,EACvB,EAAE,EAAE;IACH,MAAM,oBAAoB,GAAG,eAAe,CAAC,GAAG,EAAE;QAChD,MAAM,WAAW,GAAG,kBAAkB,CAAC,KAAK,GAAG,CAAC,CAAC;QACjD,MAAM,aAAa,GACjB,WAAW,IAAI,OAAO,CAAC,KAAK,IAAI,kBAAkB,CAAC,KAAK,CAAC;QAC3D,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE;YACvC,QAAQ,EAAE,iBAAiB,CAAC,IAAI;SACjC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,mBAAmB,GAAG,gBAAgB,CAAC,GAAG,EAAE;QAChD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,KAAK,CAAC;QAC5C,OAAO;YACL,OAAO,EAAE,QAAQ;YACjB,SAAS,EAAE;gBACT,EAAE,UAAU,EAAE,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,6BAA6B,EAAE;aAC/D;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,cAAc,CAAC,IAAI,mBAAmB,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAChE;MAAA,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,mBAAmB,CAAC,CACxC;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,0BAA0B,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,EAC7B,CACH,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,QAAQ,CAAC,IAAI,CACjB;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC;AAEF,sBAAsB,CAAC,WAAW,GAAG,wBAAwB,CAAC","sourcesContent":["// Third party dependencies.\nimport { AnimationDuration } from '@metamask/design-tokens';\nimport React from 'react';\nimport Animated, {\n useAnimatedStyle,\n useDerivedValue,\n withTiming,\n} from 'react-native-reanimated';\n\n// External dependencies.\nimport { HeaderStandard } from '../HeaderStandard';\nimport { HeaderStandardCenterColumn } from '../temp-components/HeaderStandardCenterColumn';\n\n// Internal dependencies.\nimport type { HeaderStandardAnimatedProps } from './HeaderStandardAnimated.types';\n\nconst COMPACT_TITLE_ENTER_OFFSET_PX = 8;\n\nexport const HeaderStandardAnimated: React.FC<HeaderStandardAnimatedProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n scrollY,\n titleSectionHeight,\n twClassName = '',\n ...headerStandardProps\n}) => {\n const compactTitleProgress = useDerivedValue(() => {\n const hasMeasured = titleSectionHeight.value > 0;\n const isFullyHidden =\n hasMeasured && scrollY.value >= titleSectionHeight.value;\n return withTiming(isFullyHidden ? 1 : 0, {\n duration: AnimationDuration.Fast,\n });\n });\n\n const centerAnimatedStyle = useAnimatedStyle(() => {\n const progress = compactTitleProgress.value;\n return {\n opacity: progress,\n transform: [\n { translateY: (1 - progress) * COMPACT_TITLE_ENTER_OFFSET_PX },\n ],\n };\n });\n\n return (\n <HeaderStandard {...headerStandardProps} twClassName={twClassName}>\n <Animated.View style={centerAnimatedStyle}>\n {title ? (\n <HeaderStandardCenterColumn\n title={title}\n titleProps={titleProps}\n subtitle={subtitle}\n subtitleProps={subtitleProps}\n />\n ) : null}\n </Animated.View>\n </HeaderStandard>\n );\n};\n\nHeaderStandardAnimated.displayName = 'HeaderStandardAnimated';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandardAnimated.types.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/HeaderStandardAnimated.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type {\n ScrollHandlerProcessed,\n SharedValue,\n} from 'react-native-reanimated';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from '../HeaderStandard/HeaderStandard.types';\n\n/**\n * HeaderStandardAnimated component props.\n * Extends HeaderStandardProps with scroll-driven animation inputs.\n * Title/subtitle fields come from HeaderStandardCenterColumnFields via HeaderStandardProps.\n * Center content is driven by title/subtitle only; `children` is not supported.\n */\nexport type HeaderStandardAnimatedProps = Omit<\n HeaderStandardProps,\n 'children'\n> & {\n /**\n * Shared value for scroll offset from the ScrollView.\n * Used to drive the center-title animation when scroll passes the title section.\n */\n scrollY: SharedValue<number>;\n /**\n * Shared value for the height of the title section (first child of ScrollView).\n * When scrollY >= titleSectionHeight, the compact center title is shown.\n */\n titleSectionHeight: SharedValue<number>;\n};\n\n/**\n * Return type for useHeaderStandardAnimated hook.\n * onScroll is an animated scroll handler; use with Animated.ScrollView for UI-thread updates.\n */\nexport type UseHeaderStandardAnimatedReturn = {\n scrollY: SharedValue<number>;\n titleSectionHeightSv: SharedValue<number>;\n setTitleSectionHeight: (height: number) => void;\n onScroll: ScrollHandlerProcessed;\n};\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ScrollHandlerProcessed, SharedValue } from "react-native-reanimated";
|
|
2
|
+
import type { HeaderStandardProps } from "../HeaderStandard/HeaderStandard.types.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* HeaderStandardAnimated component props.
|
|
5
|
+
* Extends HeaderStandardProps with scroll-driven animation inputs.
|
|
6
|
+
* Title/subtitle fields come from HeaderStandardCenterColumnFields via HeaderStandardProps.
|
|
7
|
+
* Center content is driven by title/subtitle only; `children` is not supported.
|
|
8
|
+
*/
|
|
9
|
+
export type HeaderStandardAnimatedProps = Omit<HeaderStandardProps, 'children'> & {
|
|
10
|
+
/**
|
|
11
|
+
* Shared value for scroll offset from the ScrollView.
|
|
12
|
+
* Used to drive the center-title animation when scroll passes the title section.
|
|
13
|
+
*/
|
|
14
|
+
scrollY: SharedValue<number>;
|
|
15
|
+
/**
|
|
16
|
+
* Shared value for the height of the title section (first child of ScrollView).
|
|
17
|
+
* When scrollY >= titleSectionHeight, the compact center title is shown.
|
|
18
|
+
*/
|
|
19
|
+
titleSectionHeight: SharedValue<number>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Return type for useHeaderStandardAnimated hook.
|
|
23
|
+
* onScroll is an animated scroll handler; use with Animated.ScrollView for UI-thread updates.
|
|
24
|
+
*/
|
|
25
|
+
export type UseHeaderStandardAnimatedReturn = {
|
|
26
|
+
scrollY: SharedValue<number>;
|
|
27
|
+
titleSectionHeightSv: SharedValue<number>;
|
|
28
|
+
setTitleSectionHeight: (height: number) => void;
|
|
29
|
+
onScroll: ScrollHandlerProcessed;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=HeaderStandardAnimated.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandardAnimated.types.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/HeaderStandardAnimated.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,WAAW,EACZ,gCAAgC;AAGjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mDAA+C;AAElF;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,mBAAmB,EACnB,UAAU,CACX,GAAG;IACF;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B;;;OAGG;IACH,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,sBAAsB,CAAC;CAClC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ScrollHandlerProcessed, SharedValue } from "react-native-reanimated";
|
|
2
|
+
import type { HeaderStandardProps } from "../HeaderStandard/HeaderStandard.types.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* HeaderStandardAnimated component props.
|
|
5
|
+
* Extends HeaderStandardProps with scroll-driven animation inputs.
|
|
6
|
+
* Title/subtitle fields come from HeaderStandardCenterColumnFields via HeaderStandardProps.
|
|
7
|
+
* Center content is driven by title/subtitle only; `children` is not supported.
|
|
8
|
+
*/
|
|
9
|
+
export type HeaderStandardAnimatedProps = Omit<HeaderStandardProps, 'children'> & {
|
|
10
|
+
/**
|
|
11
|
+
* Shared value for scroll offset from the ScrollView.
|
|
12
|
+
* Used to drive the center-title animation when scroll passes the title section.
|
|
13
|
+
*/
|
|
14
|
+
scrollY: SharedValue<number>;
|
|
15
|
+
/**
|
|
16
|
+
* Shared value for the height of the title section (first child of ScrollView).
|
|
17
|
+
* When scrollY >= titleSectionHeight, the compact center title is shown.
|
|
18
|
+
*/
|
|
19
|
+
titleSectionHeight: SharedValue<number>;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Return type for useHeaderStandardAnimated hook.
|
|
23
|
+
* onScroll is an animated scroll handler; use with Animated.ScrollView for UI-thread updates.
|
|
24
|
+
*/
|
|
25
|
+
export type UseHeaderStandardAnimatedReturn = {
|
|
26
|
+
scrollY: SharedValue<number>;
|
|
27
|
+
titleSectionHeightSv: SharedValue<number>;
|
|
28
|
+
setTitleSectionHeight: (height: number) => void;
|
|
29
|
+
onScroll: ScrollHandlerProcessed;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=HeaderStandardAnimated.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandardAnimated.types.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/HeaderStandardAnimated.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,WAAW,EACZ,gCAAgC;AAGjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mDAA+C;AAElF;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,GAAG,IAAI,CAC5C,mBAAmB,EACnB,UAAU,CACX,GAAG;IACF;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B;;;OAGG;IACH,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,oBAAoB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1C,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,sBAAsB,CAAC;CAClC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderStandardAnimated.types.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/HeaderStandardAnimated.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type {\n ScrollHandlerProcessed,\n SharedValue,\n} from 'react-native-reanimated';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from '../HeaderStandard/HeaderStandard.types';\n\n/**\n * HeaderStandardAnimated component props.\n * Extends HeaderStandardProps with scroll-driven animation inputs.\n * Title/subtitle fields come from HeaderStandardCenterColumnFields via HeaderStandardProps.\n * Center content is driven by title/subtitle only; `children` is not supported.\n */\nexport type HeaderStandardAnimatedProps = Omit<\n HeaderStandardProps,\n 'children'\n> & {\n /**\n * Shared value for scroll offset from the ScrollView.\n * Used to drive the center-title animation when scroll passes the title section.\n */\n scrollY: SharedValue<number>;\n /**\n * Shared value for the height of the title section (first child of ScrollView).\n * When scrollY >= titleSectionHeight, the compact center title is shown.\n */\n titleSectionHeight: SharedValue<number>;\n};\n\n/**\n * Return type for useHeaderStandardAnimated hook.\n * onScroll is an animated scroll handler; use with Animated.ScrollView for UI-thread updates.\n */\nexport type UseHeaderStandardAnimatedReturn = {\n scrollY: SharedValue<number>;\n titleSectionHeightSv: SharedValue<number>;\n setTitleSectionHeight: (height: number) => void;\n onScroll: ScrollHandlerProcessed;\n};\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useHeaderStandardAnimated = exports.HeaderStandardAnimated = void 0;
|
|
4
|
+
var HeaderStandardAnimated_1 = require("./HeaderStandardAnimated.cjs");
|
|
5
|
+
Object.defineProperty(exports, "HeaderStandardAnimated", { enumerable: true, get: function () { return HeaderStandardAnimated_1.HeaderStandardAnimated; } });
|
|
6
|
+
var useHeaderStandardAnimated_1 = require("./useHeaderStandardAnimated.cjs");
|
|
7
|
+
Object.defineProperty(exports, "useHeaderStandardAnimated", { enumerable: true, get: function () { return useHeaderStandardAnimated_1.useHeaderStandardAnimated; } });
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/index.ts"],"names":[],"mappings":";;;AAAA,uEAAkE;AAAzD,gIAAA,sBAAsB,OAAA;AAC/B,6EAAwE;AAA/D,sIAAA,yBAAyB,OAAA","sourcesContent":["export { HeaderStandardAnimated } from './HeaderStandardAnimated';\nexport { useHeaderStandardAnimated } from './useHeaderStandardAnimated';\nexport type {\n HeaderStandardAnimatedProps,\n UseHeaderStandardAnimatedReturn,\n} from './HeaderStandardAnimated.types';\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { HeaderStandardAnimated } from "./HeaderStandardAnimated.cjs";
|
|
2
|
+
export { useHeaderStandardAnimated } from "./useHeaderStandardAnimated.cjs";
|
|
3
|
+
export type { HeaderStandardAnimatedProps, UseHeaderStandardAnimatedReturn, } from "./HeaderStandardAnimated.types.cjs";
|
|
4
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,qCAAiC;AAClE,OAAO,EAAE,yBAAyB,EAAE,wCAAoC;AACxE,YAAY,EACV,2BAA2B,EAC3B,+BAA+B,GAChC,2CAAuC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { HeaderStandardAnimated } from "./HeaderStandardAnimated.mjs";
|
|
2
|
+
export { useHeaderStandardAnimated } from "./useHeaderStandardAnimated.mjs";
|
|
3
|
+
export type { HeaderStandardAnimatedProps, UseHeaderStandardAnimatedReturn, } from "./HeaderStandardAnimated.types.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,qCAAiC;AAClE,OAAO,EAAE,yBAAyB,EAAE,wCAAoC;AACxE,YAAY,EACV,2BAA2B,EAC3B,+BAA+B,GAChC,2CAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,qCAAiC;AAClE,OAAO,EAAE,yBAAyB,EAAE,wCAAoC","sourcesContent":["export { HeaderStandardAnimated } from './HeaderStandardAnimated';\nexport { useHeaderStandardAnimated } from './useHeaderStandardAnimated';\nexport type {\n HeaderStandardAnimatedProps,\n UseHeaderStandardAnimatedReturn,\n} from './HeaderStandardAnimated.types';\n"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useHeaderStandardAnimated = exports.updateScrollYFromEvent = void 0;
|
|
4
|
+
// Third party dependencies.
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_native_reanimated_1 = require("react-native-reanimated");
|
|
7
|
+
/**
|
|
8
|
+
* Writes a vertical content offset into the scroll shared value.
|
|
9
|
+
*
|
|
10
|
+
* @param scrollYValue - Shared value for vertical scroll offset.
|
|
11
|
+
* @param contentOffsetY - `contentOffset.y` from the scroll event.
|
|
12
|
+
*/
|
|
13
|
+
function updateScrollYFromEvent(scrollYValue, contentOffsetY) {
|
|
14
|
+
scrollYValue.value = contentOffsetY;
|
|
15
|
+
}
|
|
16
|
+
exports.updateScrollYFromEvent = updateScrollYFromEvent;
|
|
17
|
+
/**
|
|
18
|
+
* Hook for managing HeaderStandardAnimated scroll-linked animations.
|
|
19
|
+
* Use with HeaderStandardAnimated placed outside the ScrollView as a sibling.
|
|
20
|
+
* Use the returned onScroll with Animated.ScrollView for UI-thread scroll updates (zero lag).
|
|
21
|
+
*
|
|
22
|
+
* @returns Object containing scrollY, titleSectionHeightSv, setTitleSectionHeight, and onScroll.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* const { scrollY, onScroll, setTitleSectionHeight, titleSectionHeightSv } =
|
|
27
|
+
* useHeaderStandardAnimated();
|
|
28
|
+
*
|
|
29
|
+
* <Box twClassName="flex-1">
|
|
30
|
+
* <HeaderStandardAnimated
|
|
31
|
+
* scrollY={scrollY}
|
|
32
|
+
* titleSectionHeight={titleSectionHeightSv}
|
|
33
|
+
* title="Market"
|
|
34
|
+
* onBack={handleBack}
|
|
35
|
+
* />
|
|
36
|
+
* <Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>
|
|
37
|
+
* <Box onLayout={(e) => setTitleSectionHeight(e.nativeEvent.layout.height)}>
|
|
38
|
+
* ...first scroll section (layout height drives compact title timing)
|
|
39
|
+
* </Box>
|
|
40
|
+
* {/* page body *\/}
|
|
41
|
+
* </Animated.ScrollView>
|
|
42
|
+
* </Box>
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
function useHeaderStandardAnimated() {
|
|
46
|
+
const scrollYValue = (0, react_native_reanimated_1.useSharedValue)(0);
|
|
47
|
+
const titleSectionHeightSv = (0, react_native_reanimated_1.useSharedValue)(0);
|
|
48
|
+
const setTitleSectionHeight = (0, react_1.useCallback)((height) => {
|
|
49
|
+
titleSectionHeightSv.value = height;
|
|
50
|
+
}, [titleSectionHeightSv]);
|
|
51
|
+
const onScroll = (0, react_native_reanimated_1.useAnimatedScrollHandler)({
|
|
52
|
+
onScroll: (scrollEvent) => updateScrollYFromEvent(scrollYValue, scrollEvent.contentOffset.y),
|
|
53
|
+
});
|
|
54
|
+
return {
|
|
55
|
+
scrollY: scrollYValue,
|
|
56
|
+
titleSectionHeightSv,
|
|
57
|
+
setTitleSectionHeight,
|
|
58
|
+
onScroll,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
exports.useHeaderStandardAnimated = useHeaderStandardAnimated;
|
|
62
|
+
//# sourceMappingURL=useHeaderStandardAnimated.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeaderStandardAnimated.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/useHeaderStandardAnimated.ts"],"names":[],"mappings":";;;AAAA,4BAA4B;AAC5B,iCAAoC;AAEpC,qEAGiC;AAKjC;;;;;GAKG;AACH,SAAgB,sBAAsB,CACpC,YAAiC,EACjC,cAAsB;IAEtB,YAAY,CAAC,KAAK,GAAG,cAAc,CAAC;AACtC,CAAC;AALD,wDAKC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,SAAgB,yBAAyB;IACvC,MAAM,YAAY,GAAG,IAAA,wCAAc,EAAC,CAAC,CAAC,CAAC;IACvC,MAAM,oBAAoB,GAAG,IAAA,wCAAc,EAAC,CAAC,CAAC,CAAC;IAE/C,MAAM,qBAAqB,GAAG,IAAA,mBAAW,EACvC,CAAC,MAAc,EAAE,EAAE;QACjB,oBAAoB,CAAC,KAAK,GAAG,MAAM,CAAC;IACtC,CAAC,EACD,CAAC,oBAAoB,CAAC,CACvB,CAAC;IAEF,MAAM,QAAQ,GAAG,IAAA,kDAAwB,EAAC;QACxC,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE,CACxB,sBAAsB,CAAC,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;KACpE,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,YAAY;QACrB,oBAAoB;QACpB,qBAAqB;QACrB,QAAQ;KACT,CAAC;AACJ,CAAC;AAtBD,8DAsBC","sourcesContent":["// Third party dependencies.\nimport { useCallback } from 'react';\nimport type { SharedValue } from 'react-native-reanimated';\nimport {\n useSharedValue,\n useAnimatedScrollHandler,\n} from 'react-native-reanimated';\n\n// Internal dependencies.\nimport type { UseHeaderStandardAnimatedReturn } from './HeaderStandardAnimated.types';\n\n/**\n * Writes a vertical content offset into the scroll shared value.\n *\n * @param scrollYValue - Shared value for vertical scroll offset.\n * @param contentOffsetY - `contentOffset.y` from the scroll event.\n */\nexport function updateScrollYFromEvent(\n scrollYValue: SharedValue<number>,\n contentOffsetY: number,\n) {\n scrollYValue.value = contentOffsetY;\n}\n\n/**\n * Hook for managing HeaderStandardAnimated scroll-linked animations.\n * Use with HeaderStandardAnimated placed outside the ScrollView as a sibling.\n * Use the returned onScroll with Animated.ScrollView for UI-thread scroll updates (zero lag).\n *\n * @returns Object containing scrollY, titleSectionHeightSv, setTitleSectionHeight, and onScroll.\n *\n * @example\n * ```tsx\n * const { scrollY, onScroll, setTitleSectionHeight, titleSectionHeightSv } =\n * useHeaderStandardAnimated();\n *\n * <Box twClassName=\"flex-1\">\n * <HeaderStandardAnimated\n * scrollY={scrollY}\n * titleSectionHeight={titleSectionHeightSv}\n * title=\"Market\"\n * onBack={handleBack}\n * />\n * <Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>\n * <Box onLayout={(e) => setTitleSectionHeight(e.nativeEvent.layout.height)}>\n * ...first scroll section (layout height drives compact title timing)\n * </Box>\n * {/* page body *\\/}\n * </Animated.ScrollView>\n * </Box>\n * ```\n */\nexport function useHeaderStandardAnimated(): UseHeaderStandardAnimatedReturn {\n const scrollYValue = useSharedValue(0);\n const titleSectionHeightSv = useSharedValue(0);\n\n const setTitleSectionHeight = useCallback(\n (height: number) => {\n titleSectionHeightSv.value = height;\n },\n [titleSectionHeightSv],\n );\n\n const onScroll = useAnimatedScrollHandler({\n onScroll: (scrollEvent) =>\n updateScrollYFromEvent(scrollYValue, scrollEvent.contentOffset.y),\n });\n\n return {\n scrollY: scrollYValue,\n titleSectionHeightSv,\n setTitleSectionHeight,\n onScroll,\n };\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
2
|
+
import type { UseHeaderStandardAnimatedReturn } from "./HeaderStandardAnimated.types.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* Writes a vertical content offset into the scroll shared value.
|
|
5
|
+
*
|
|
6
|
+
* @param scrollYValue - Shared value for vertical scroll offset.
|
|
7
|
+
* @param contentOffsetY - `contentOffset.y` from the scroll event.
|
|
8
|
+
*/
|
|
9
|
+
export declare function updateScrollYFromEvent(scrollYValue: SharedValue<number>, contentOffsetY: number): void;
|
|
10
|
+
/**
|
|
11
|
+
* Hook for managing HeaderStandardAnimated scroll-linked animations.
|
|
12
|
+
* Use with HeaderStandardAnimated placed outside the ScrollView as a sibling.
|
|
13
|
+
* Use the returned onScroll with Animated.ScrollView for UI-thread scroll updates (zero lag).
|
|
14
|
+
*
|
|
15
|
+
* @returns Object containing scrollY, titleSectionHeightSv, setTitleSectionHeight, and onScroll.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* const { scrollY, onScroll, setTitleSectionHeight, titleSectionHeightSv } =
|
|
20
|
+
* useHeaderStandardAnimated();
|
|
21
|
+
*
|
|
22
|
+
* <Box twClassName="flex-1">
|
|
23
|
+
* <HeaderStandardAnimated
|
|
24
|
+
* scrollY={scrollY}
|
|
25
|
+
* titleSectionHeight={titleSectionHeightSv}
|
|
26
|
+
* title="Market"
|
|
27
|
+
* onBack={handleBack}
|
|
28
|
+
* />
|
|
29
|
+
* <Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>
|
|
30
|
+
* <Box onLayout={(e) => setTitleSectionHeight(e.nativeEvent.layout.height)}>
|
|
31
|
+
* ...first scroll section (layout height drives compact title timing)
|
|
32
|
+
* </Box>
|
|
33
|
+
* {/* page body *\/}
|
|
34
|
+
* </Animated.ScrollView>
|
|
35
|
+
* </Box>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function useHeaderStandardAnimated(): UseHeaderStandardAnimatedReturn;
|
|
39
|
+
//# sourceMappingURL=useHeaderStandardAnimated.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeaderStandardAnimated.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/useHeaderStandardAnimated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAO3D,OAAO,KAAK,EAAE,+BAA+B,EAAE,2CAAuC;AAEtF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EACjC,cAAc,EAAE,MAAM,QAGvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,IAAI,+BAA+B,CAsB3E"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { SharedValue } from "react-native-reanimated";
|
|
2
|
+
import type { UseHeaderStandardAnimatedReturn } from "./HeaderStandardAnimated.types.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Writes a vertical content offset into the scroll shared value.
|
|
5
|
+
*
|
|
6
|
+
* @param scrollYValue - Shared value for vertical scroll offset.
|
|
7
|
+
* @param contentOffsetY - `contentOffset.y` from the scroll event.
|
|
8
|
+
*/
|
|
9
|
+
export declare function updateScrollYFromEvent(scrollYValue: SharedValue<number>, contentOffsetY: number): void;
|
|
10
|
+
/**
|
|
11
|
+
* Hook for managing HeaderStandardAnimated scroll-linked animations.
|
|
12
|
+
* Use with HeaderStandardAnimated placed outside the ScrollView as a sibling.
|
|
13
|
+
* Use the returned onScroll with Animated.ScrollView for UI-thread scroll updates (zero lag).
|
|
14
|
+
*
|
|
15
|
+
* @returns Object containing scrollY, titleSectionHeightSv, setTitleSectionHeight, and onScroll.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* const { scrollY, onScroll, setTitleSectionHeight, titleSectionHeightSv } =
|
|
20
|
+
* useHeaderStandardAnimated();
|
|
21
|
+
*
|
|
22
|
+
* <Box twClassName="flex-1">
|
|
23
|
+
* <HeaderStandardAnimated
|
|
24
|
+
* scrollY={scrollY}
|
|
25
|
+
* titleSectionHeight={titleSectionHeightSv}
|
|
26
|
+
* title="Market"
|
|
27
|
+
* onBack={handleBack}
|
|
28
|
+
* />
|
|
29
|
+
* <Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>
|
|
30
|
+
* <Box onLayout={(e) => setTitleSectionHeight(e.nativeEvent.layout.height)}>
|
|
31
|
+
* ...first scroll section (layout height drives compact title timing)
|
|
32
|
+
* </Box>
|
|
33
|
+
* {/* page body *\/}
|
|
34
|
+
* </Animated.ScrollView>
|
|
35
|
+
* </Box>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export declare function useHeaderStandardAnimated(): UseHeaderStandardAnimatedReturn;
|
|
39
|
+
//# sourceMappingURL=useHeaderStandardAnimated.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeaderStandardAnimated.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/useHeaderStandardAnimated.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,gCAAgC;AAO3D,OAAO,KAAK,EAAE,+BAA+B,EAAE,2CAAuC;AAEtF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,EACjC,cAAc,EAAE,MAAM,QAGvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,yBAAyB,IAAI,+BAA+B,CAsB3E"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Third party dependencies.
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useSharedValue, useAnimatedScrollHandler } from "react-native-reanimated";
|
|
4
|
+
/**
|
|
5
|
+
* Writes a vertical content offset into the scroll shared value.
|
|
6
|
+
*
|
|
7
|
+
* @param scrollYValue - Shared value for vertical scroll offset.
|
|
8
|
+
* @param contentOffsetY - `contentOffset.y` from the scroll event.
|
|
9
|
+
*/
|
|
10
|
+
export function updateScrollYFromEvent(scrollYValue, contentOffsetY) {
|
|
11
|
+
scrollYValue.value = contentOffsetY;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Hook for managing HeaderStandardAnimated scroll-linked animations.
|
|
15
|
+
* Use with HeaderStandardAnimated placed outside the ScrollView as a sibling.
|
|
16
|
+
* Use the returned onScroll with Animated.ScrollView for UI-thread scroll updates (zero lag).
|
|
17
|
+
*
|
|
18
|
+
* @returns Object containing scrollY, titleSectionHeightSv, setTitleSectionHeight, and onScroll.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const { scrollY, onScroll, setTitleSectionHeight, titleSectionHeightSv } =
|
|
23
|
+
* useHeaderStandardAnimated();
|
|
24
|
+
*
|
|
25
|
+
* <Box twClassName="flex-1">
|
|
26
|
+
* <HeaderStandardAnimated
|
|
27
|
+
* scrollY={scrollY}
|
|
28
|
+
* titleSectionHeight={titleSectionHeightSv}
|
|
29
|
+
* title="Market"
|
|
30
|
+
* onBack={handleBack}
|
|
31
|
+
* />
|
|
32
|
+
* <Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>
|
|
33
|
+
* <Box onLayout={(e) => setTitleSectionHeight(e.nativeEvent.layout.height)}>
|
|
34
|
+
* ...first scroll section (layout height drives compact title timing)
|
|
35
|
+
* </Box>
|
|
36
|
+
* {/* page body *\/}
|
|
37
|
+
* </Animated.ScrollView>
|
|
38
|
+
* </Box>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export function useHeaderStandardAnimated() {
|
|
42
|
+
const scrollYValue = useSharedValue(0);
|
|
43
|
+
const titleSectionHeightSv = useSharedValue(0);
|
|
44
|
+
const setTitleSectionHeight = useCallback((height) => {
|
|
45
|
+
titleSectionHeightSv.value = height;
|
|
46
|
+
}, [titleSectionHeightSv]);
|
|
47
|
+
const onScroll = useAnimatedScrollHandler({
|
|
48
|
+
onScroll: (scrollEvent) => updateScrollYFromEvent(scrollYValue, scrollEvent.contentOffset.y),
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
scrollY: scrollYValue,
|
|
52
|
+
titleSectionHeightSv,
|
|
53
|
+
setTitleSectionHeight,
|
|
54
|
+
onScroll,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=useHeaderStandardAnimated.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHeaderStandardAnimated.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandardAnimated/useHeaderStandardAnimated.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,OAAO,EAAE,WAAW,EAAE,cAAc;AAEpC,OAAO,EACL,cAAc,EACd,wBAAwB,EACzB,gCAAgC;AAKjC;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CACpC,YAAiC,EACjC,cAAsB;IAEtB,YAAY,CAAC,KAAK,GAAG,cAAc,CAAC;AACtC,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,yBAAyB;IACvC,MAAM,YAAY,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,oBAAoB,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAE/C,MAAM,qBAAqB,GAAG,WAAW,CACvC,CAAC,MAAc,EAAE,EAAE;QACjB,oBAAoB,CAAC,KAAK,GAAG,MAAM,CAAC;IACtC,CAAC,EACD,CAAC,oBAAoB,CAAC,CACvB,CAAC;IAEF,MAAM,QAAQ,GAAG,wBAAwB,CAAC;QACxC,QAAQ,EAAE,CAAC,WAAW,EAAE,EAAE,CACxB,sBAAsB,CAAC,YAAY,EAAE,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;KACpE,CAAC,CAAC;IAEH,OAAO;QACL,OAAO,EAAE,YAAY;QACrB,oBAAoB;QACpB,qBAAqB;QACrB,QAAQ;KACT,CAAC;AACJ,CAAC","sourcesContent":["// Third party dependencies.\nimport { useCallback } from 'react';\nimport type { SharedValue } from 'react-native-reanimated';\nimport {\n useSharedValue,\n useAnimatedScrollHandler,\n} from 'react-native-reanimated';\n\n// Internal dependencies.\nimport type { UseHeaderStandardAnimatedReturn } from './HeaderStandardAnimated.types';\n\n/**\n * Writes a vertical content offset into the scroll shared value.\n *\n * @param scrollYValue - Shared value for vertical scroll offset.\n * @param contentOffsetY - `contentOffset.y` from the scroll event.\n */\nexport function updateScrollYFromEvent(\n scrollYValue: SharedValue<number>,\n contentOffsetY: number,\n) {\n scrollYValue.value = contentOffsetY;\n}\n\n/**\n * Hook for managing HeaderStandardAnimated scroll-linked animations.\n * Use with HeaderStandardAnimated placed outside the ScrollView as a sibling.\n * Use the returned onScroll with Animated.ScrollView for UI-thread scroll updates (zero lag).\n *\n * @returns Object containing scrollY, titleSectionHeightSv, setTitleSectionHeight, and onScroll.\n *\n * @example\n * ```tsx\n * const { scrollY, onScroll, setTitleSectionHeight, titleSectionHeightSv } =\n * useHeaderStandardAnimated();\n *\n * <Box twClassName=\"flex-1\">\n * <HeaderStandardAnimated\n * scrollY={scrollY}\n * titleSectionHeight={titleSectionHeightSv}\n * title=\"Market\"\n * onBack={handleBack}\n * />\n * <Animated.ScrollView onScroll={onScroll} scrollEventThrottle={16}>\n * <Box onLayout={(e) => setTitleSectionHeight(e.nativeEvent.layout.height)}>\n * ...first scroll section (layout height drives compact title timing)\n * </Box>\n * {/* page body *\\/}\n * </Animated.ScrollView>\n * </Box>\n * ```\n */\nexport function useHeaderStandardAnimated(): UseHeaderStandardAnimatedReturn {\n const scrollYValue = useSharedValue(0);\n const titleSectionHeightSv = useSharedValue(0);\n\n const setTitleSectionHeight = useCallback(\n (height: number) => {\n titleSectionHeightSv.value = height;\n },\n [titleSectionHeightSv],\n );\n\n const onScroll = useAnimatedScrollHandler({\n onScroll: (scrollEvent) =>\n updateScrollYFromEvent(scrollYValue, scrollEvent.contentOffset.y),\n });\n\n return {\n scrollY: scrollYValue,\n titleSectionHeightSv,\n setTitleSectionHeight,\n onScroll,\n };\n}\n"]}
|
|
@@ -129,6 +129,7 @@ const gift_svg_1 = __importDefault(require("./assets/gift.svg"));
|
|
|
129
129
|
const global_search_svg_1 = __importDefault(require("./assets/global-search.svg"));
|
|
130
130
|
const global_svg_1 = __importDefault(require("./assets/global.svg"));
|
|
131
131
|
const graph_svg_1 = __importDefault(require("./assets/graph.svg"));
|
|
132
|
+
const group_svg_1 = __importDefault(require("./assets/group.svg"));
|
|
132
133
|
const hardware_svg_1 = __importDefault(require("./assets/hardware.svg"));
|
|
133
134
|
const hash_tag_svg_1 = __importDefault(require("./assets/hash-tag.svg"));
|
|
134
135
|
const heart_filled_svg_1 = __importDefault(require("./assets/heart-filled.svg"));
|
|
@@ -147,6 +148,7 @@ const last_page_svg_1 = __importDefault(require("./assets/last-page.svg"));
|
|
|
147
148
|
const light_filled_svg_1 = __importDefault(require("./assets/light-filled.svg"));
|
|
148
149
|
const light_svg_1 = __importDefault(require("./assets/light.svg"));
|
|
149
150
|
const link_svg_1 = __importDefault(require("./assets/link.svg"));
|
|
151
|
+
const list_arrow_svg_1 = __importDefault(require("./assets/list-arrow.svg"));
|
|
150
152
|
const loading_svg_1 = __importDefault(require("./assets/loading.svg"));
|
|
151
153
|
const location_svg_1 = __importDefault(require("./assets/location.svg"));
|
|
152
154
|
const lock_slash_svg_1 = __importDefault(require("./assets/lock-slash.svg"));
|
|
@@ -172,6 +174,8 @@ const monitor_svg_1 = __importDefault(require("./assets/monitor.svg"));
|
|
|
172
174
|
const more_horizontal_svg_1 = __importDefault(require("./assets/more-horizontal.svg"));
|
|
173
175
|
const more_vertical_svg_1 = __importDefault(require("./assets/more-vertical.svg"));
|
|
174
176
|
const mountain_flag_svg_1 = __importDefault(require("./assets/mountain-flag.svg"));
|
|
177
|
+
const musd_filled_svg_1 = __importDefault(require("./assets/musd-filled.svg"));
|
|
178
|
+
const musd_svg_1 = __importDefault(require("./assets/musd.svg"));
|
|
175
179
|
const music_note_svg_1 = __importDefault(require("./assets/music-note.svg"));
|
|
176
180
|
const no_photography_svg_1 = __importDefault(require("./assets/no-photography.svg"));
|
|
177
181
|
const notification_svg_1 = __importDefault(require("./assets/notification.svg"));
|
|
@@ -181,12 +185,14 @@ const password_check_svg_1 = __importDefault(require("./assets/password-check.sv
|
|
|
181
185
|
const pending_svg_1 = __importDefault(require("./assets/pending.svg"));
|
|
182
186
|
const people_svg_1 = __importDefault(require("./assets/people.svg"));
|
|
183
187
|
const person_cancel_svg_1 = __importDefault(require("./assets/person-cancel.svg"));
|
|
188
|
+
const pie_chart_svg_1 = __importDefault(require("./assets/pie-chart.svg"));
|
|
184
189
|
const pin_svg_1 = __importDefault(require("./assets/pin.svg"));
|
|
185
190
|
const plant_svg_1 = __importDefault(require("./assets/plant.svg"));
|
|
186
191
|
const plug_svg_1 = __importDefault(require("./assets/plug.svg"));
|
|
187
192
|
const plus_and_minus_svg_1 = __importDefault(require("./assets/plus-and-minus.svg"));
|
|
188
193
|
const policy_alert_svg_1 = __importDefault(require("./assets/policy-alert.svg"));
|
|
189
194
|
const pop_up_svg_1 = __importDefault(require("./assets/pop-up.svg"));
|
|
195
|
+
const predictions_svg_1 = __importDefault(require("./assets/predictions.svg"));
|
|
190
196
|
const print_svg_1 = __importDefault(require("./assets/print.svg"));
|
|
191
197
|
const priority_high_svg_1 = __importDefault(require("./assets/priority-high.svg"));
|
|
192
198
|
const privacy_tip_svg_1 = __importDefault(require("./assets/privacy-tip.svg"));
|
|
@@ -416,6 +422,7 @@ exports.assetByIconName = {
|
|
|
416
422
|
GlobalSearch: global_search_svg_1.default,
|
|
417
423
|
Global: global_svg_1.default,
|
|
418
424
|
Graph: graph_svg_1.default,
|
|
425
|
+
Group: group_svg_1.default,
|
|
419
426
|
Hardware: hardware_svg_1.default,
|
|
420
427
|
HashTag: hash_tag_svg_1.default,
|
|
421
428
|
HeartFilled: heart_filled_svg_1.default,
|
|
@@ -434,6 +441,7 @@ exports.assetByIconName = {
|
|
|
434
441
|
LightFilled: light_filled_svg_1.default,
|
|
435
442
|
Light: light_svg_1.default,
|
|
436
443
|
Link: link_svg_1.default,
|
|
444
|
+
ListArrow: list_arrow_svg_1.default,
|
|
437
445
|
Loading: loading_svg_1.default,
|
|
438
446
|
Location: location_svg_1.default,
|
|
439
447
|
LockSlash: lock_slash_svg_1.default,
|
|
@@ -459,6 +467,8 @@ exports.assetByIconName = {
|
|
|
459
467
|
MoreHorizontal: more_horizontal_svg_1.default,
|
|
460
468
|
MoreVertical: more_vertical_svg_1.default,
|
|
461
469
|
MountainFlag: mountain_flag_svg_1.default,
|
|
470
|
+
MusdFilled: musd_filled_svg_1.default,
|
|
471
|
+
Musd: musd_svg_1.default,
|
|
462
472
|
MusicNote: music_note_svg_1.default,
|
|
463
473
|
NoPhotography: no_photography_svg_1.default,
|
|
464
474
|
Notification: notification_svg_1.default,
|
|
@@ -468,12 +478,14 @@ exports.assetByIconName = {
|
|
|
468
478
|
Pending: pending_svg_1.default,
|
|
469
479
|
People: people_svg_1.default,
|
|
470
480
|
PersonCancel: person_cancel_svg_1.default,
|
|
481
|
+
PieChart: pie_chart_svg_1.default,
|
|
471
482
|
Pin: pin_svg_1.default,
|
|
472
483
|
Plant: plant_svg_1.default,
|
|
473
484
|
Plug: plug_svg_1.default,
|
|
474
485
|
PlusAndMinus: plus_and_minus_svg_1.default,
|
|
475
486
|
PolicyAlert: policy_alert_svg_1.default,
|
|
476
487
|
PopUp: pop_up_svg_1.default,
|
|
488
|
+
Predictions: predictions_svg_1.default,
|
|
477
489
|
Print: print_svg_1.default,
|
|
478
490
|
PriorityHigh: priority_high_svg_1.default,
|
|
479
491
|
PrivacyTip: privacy_tip_svg_1.default,
|