@metamask-previews/design-system-react-native 0.56.0-preview.12867efa → 0.56.1-preview-00dfeb8
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 +11 -1
- package/dist/components/ActionListItem/ActionListItem.cjs +17 -7
- package/dist/components/ActionListItem/ActionListItem.cjs.map +1 -1
- package/dist/components/ActionListItem/ActionListItem.mjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.cjs.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.d.cts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.d.mts.map +1 -1
- package/dist/components/AvatarAccount/AvatarAccount.mjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.cjs +16 -16
- package/dist/components/AvatarBase/AvatarBase.constants.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.constants.mjs +16 -16
- package/dist/components/AvatarBase/AvatarBase.constants.mjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.d.cts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.d.mts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +17 -7
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.cjs +17 -7
- package/dist/components/AvatarGroup/AvatarGroup.cjs.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.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +4 -4
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +4 -4
- 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/AvatarNetwork/AvatarNetwork.cjs +17 -7
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +17 -7
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.cjs +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.mjs +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.d.cts.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.d.mts.map +1 -1
- package/dist/components/BadgeNetwork/BadgeNetwork.d.cts.map +1 -1
- package/dist/components/BadgeNetwork/BadgeNetwork.d.mts.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.constants.cjs +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.constants.cjs.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.constants.mjs +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.constants.mjs.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.d.cts.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.d.mts.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.d.cts.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.d.mts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.cjs +17 -7
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.cjs +17 -7
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.cts +8 -8
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.d.mts +8 -8
- package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
- package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +17 -7
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +6 -6
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +6 -6
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
- package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -1
- package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -1
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs +17 -7
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs.map +1 -1
- package/dist/components/Box/Box.cjs +17 -7
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.d.cts +1 -1
- package/dist/components/Box/Box.d.mts +1 -1
- package/dist/components/BoxColumn/BoxColumn.cjs +13 -0
- package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.d.cts +13 -0
- package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.d.mts +13 -0
- package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.mjs +13 -0
- package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.types.d.cts +2 -0
- package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.types.d.mts +2 -0
- package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -1
- package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -1
- package/dist/components/BoxRow/BoxRow.cjs +13 -0
- package/dist/components/BoxRow/BoxRow.cjs.map +1 -1
- package/dist/components/BoxRow/BoxRow.d.cts +13 -0
- package/dist/components/BoxRow/BoxRow.d.cts.map +1 -1
- package/dist/components/BoxRow/BoxRow.d.mts +13 -0
- package/dist/components/BoxRow/BoxRow.d.mts.map +1 -1
- package/dist/components/BoxRow/BoxRow.mjs +13 -0
- package/dist/components/BoxRow/BoxRow.mjs.map +1 -1
- package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -1
- package/dist/components/BoxRow/BoxRow.types.d.cts +2 -0
- package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -1
- package/dist/components/BoxRow/BoxRow.types.d.mts +2 -0
- package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -1
- package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.d.cts.map +1 -1
- package/dist/components/Button/Button.d.mts.map +1 -1
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs +17 -7
- 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.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs +17 -7
- 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.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +17 -7
- 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.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.cjs +27 -13
- package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.cjs +2 -2
- package/dist/components/ButtonBase/ButtonBase.constants.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.constants.mjs +2 -2
- package/dist/components/ButtonBase/ButtonBase.constants.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.mjs +11 -7
- 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 +3 -4
- package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.d.mts +3 -4
- package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
- package/dist/components/ButtonHero/ButtonHero.cjs.map +1 -1
- package/dist/components/ButtonHero/ButtonHero.mjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.cjs +17 -7
- package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
- package/dist/components/ButtonSemantic/ButtonSemantic.cjs +17 -7
- 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/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.mjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.cjs +17 -7
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.cts +5 -6
- package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.mts +5 -6
- package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
- package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
- package/dist/components/Content/Content.cjs +40 -32
- package/dist/components/Content/Content.cjs.map +1 -1
- package/dist/components/Content/Content.d.cts.map +1 -1
- package/dist/components/Content/Content.d.mts.map +1 -1
- package/dist/components/Content/Content.mjs +40 -32
- package/dist/components/Content/Content.mjs.map +1 -1
- package/dist/components/FilterButton/FilterButton.cjs +17 -7
- package/dist/components/FilterButton/FilterButton.cjs.map +1 -1
- package/dist/components/FilterButton/FilterButton.mjs.map +1 -1
- package/dist/components/FilterButtonGroup/FilterButtonGroup.cjs +17 -7
- package/dist/components/FilterButtonGroup/FilterButtonGroup.cjs.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.cjs +17 -7
- package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -1
- package/dist/components/HeaderRoot/HeaderRoot.cjs +8 -5
- package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
- package/dist/components/HeaderRoot/HeaderRoot.d.cts.map +1 -1
- package/dist/components/HeaderRoot/HeaderRoot.d.mts.map +1 -1
- package/dist/components/HeaderRoot/HeaderRoot.mjs +8 -5
- package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.cjs +17 -7
- package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.cjs +17 -7
- package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.cjs.map +1 -1
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs +1 -2
- package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs.map +1 -1
- package/dist/components/HeaderSubpage/HeaderSubpage.cjs +17 -7
- package/dist/components/HeaderSubpage/HeaderSubpage.cjs.map +1 -1
- package/dist/components/HeaderSubpage/HeaderSubpage.mjs.map +1 -1
- package/dist/components/HelpText/HelpText.cjs.map +1 -1
- package/dist/components/HelpText/HelpText.mjs.map +1 -1
- package/dist/components/Icon/Icon.constants.cjs +4 -4
- package/dist/components/Icon/Icon.constants.cjs.map +1 -1
- package/dist/components/Icon/Icon.constants.mjs +4 -4
- package/dist/components/Icon/Icon.constants.mjs.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/assets/musd-filled.svg +1 -1
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.d.cts +1 -1
- package/dist/components/Input/Input.d.mts +1 -1
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.cjs +21 -12
- package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.mjs +22 -13
- package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.cjs +19 -10
- package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.mjs +20 -11
- package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
- package/dist/components/KeyValueSelect/KeyValueSelect.cjs +17 -7
- package/dist/components/KeyValueSelect/KeyValueSelect.cjs.map +1 -1
- package/dist/components/KeyValueSelect/KeyValueSelect.d.cts +5 -5
- package/dist/components/KeyValueSelect/KeyValueSelect.d.mts +5 -5
- package/dist/components/KeyValueSelect/KeyValueSelect.mjs.map +1 -1
- package/dist/components/ListItem/ListItem.cjs +4 -3
- package/dist/components/ListItem/ListItem.cjs.map +1 -1
- package/dist/components/ListItem/ListItem.d.cts.map +1 -1
- package/dist/components/ListItem/ListItem.d.mts.map +1 -1
- package/dist/components/ListItem/ListItem.mjs +5 -4
- package/dist/components/ListItem/ListItem.mjs.map +1 -1
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.cjs.map +1 -1
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.mjs.map +1 -1
- package/dist/components/MainActionButton/MainActionButton.d.cts.map +1 -1
- package/dist/components/MainActionButton/MainActionButton.d.mts.map +1 -1
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.cts.map +1 -1
- package/dist/components/RadioButton/RadioButton.d.mts.map +1 -1
- package/dist/components/RadioButton/RadioButton.mjs.map +1 -1
- package/dist/components/SectionDivider/SectionDivider.cjs +17 -7
- package/dist/components/SectionDivider/SectionDivider.cjs.map +1 -1
- package/dist/components/SectionDivider/SectionDivider.d.cts +1 -1
- package/dist/components/SectionDivider/SectionDivider.d.mts +1 -1
- package/dist/components/SectionDivider/SectionDivider.mjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs +17 -10
- package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.cts +2 -2
- package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.mts +2 -2
- package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.mjs +18 -11
- package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.d.cts +5 -5
- package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.d.mts +5 -5
- package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.cjs +17 -7
- package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
- package/dist/components/SelectButton/SelectButton.cjs.map +1 -1
- package/dist/components/SelectButton/SelectButton.mjs.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.cjs +17 -7
- package/dist/components/SensitiveText/SensitiveText.cjs.map +1 -1
- package/dist/components/SensitiveText/SensitiveText.mjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +17 -7
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.mjs.map +1 -1
- package/dist/components/Slider/Slider.cjs +17 -7
- package/dist/components/Slider/Slider.cjs.map +1 -1
- package/dist/components/Slider/Slider.constants.cjs +5 -6
- package/dist/components/Slider/Slider.constants.cjs.map +1 -1
- package/dist/components/Slider/Slider.constants.d.cts +5 -6
- package/dist/components/Slider/Slider.constants.d.cts.map +1 -1
- package/dist/components/Slider/Slider.constants.d.mts +5 -6
- package/dist/components/Slider/Slider.constants.d.mts.map +1 -1
- package/dist/components/Slider/Slider.constants.mjs +5 -6
- package/dist/components/Slider/Slider.constants.mjs.map +1 -1
- package/dist/components/Slider/Slider.mjs.map +1 -1
- package/dist/components/Slider/Slider.types.cjs.map +1 -1
- package/dist/components/Slider/Slider.types.d.cts +4 -5
- package/dist/components/Slider/Slider.types.d.cts.map +1 -1
- package/dist/components/Slider/Slider.types.d.mts +4 -5
- package/dist/components/Slider/Slider.types.d.mts.map +1 -1
- package/dist/components/Slider/Slider.types.mjs.map +1 -1
- package/dist/components/Slider/Slider.utilities.cjs +55 -26
- package/dist/components/Slider/Slider.utilities.cjs.map +1 -1
- package/dist/components/Slider/Slider.utilities.d.cts +24 -3
- package/dist/components/Slider/Slider.utilities.d.cts.map +1 -1
- package/dist/components/Slider/Slider.utilities.d.mts +24 -3
- package/dist/components/Slider/Slider.utilities.d.mts.map +1 -1
- package/dist/components/Slider/Slider.utilities.mjs +38 -8
- package/dist/components/Slider/Slider.utilities.mjs.map +1 -1
- package/dist/components/Slider/useSliderGesture.cjs +1 -2
- package/dist/components/Slider/useSliderGesture.cjs.map +1 -1
- package/dist/components/Slider/useSliderGesture.mjs.map +1 -1
- package/dist/components/Spinner/Spinner.cjs +95 -0
- package/dist/components/Spinner/Spinner.cjs.map +1 -0
- package/dist/components/Spinner/Spinner.d.cts.map +1 -0
- package/dist/components/Spinner/Spinner.d.mts.map +1 -0
- package/dist/components/Spinner/Spinner.mjs +65 -0
- package/dist/components/Spinner/Spinner.mjs.map +1 -0
- package/dist/components/Spinner/Spinner.types.cjs.map +1 -0
- package/dist/components/{temp-components/Spinner → Spinner}/Spinner.types.d.cts +2 -2
- package/dist/components/Spinner/Spinner.types.d.cts.map +1 -0
- package/dist/components/{temp-components/Spinner → Spinner}/Spinner.types.d.mts +2 -2
- package/dist/components/Spinner/Spinner.types.d.mts.map +1 -0
- package/dist/components/Spinner/Spinner.types.mjs.map +1 -0
- package/dist/components/Spinner/index.cjs.map +1 -0
- package/dist/components/Spinner/index.d.cts.map +1 -0
- package/dist/components/Spinner/index.d.mts.map +1 -0
- package/dist/components/Spinner/index.mjs.map +1 -0
- package/dist/components/Switch/Switch.d.cts.map +1 -1
- package/dist/components/Switch/Switch.d.mts.map +1 -1
- package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -1
- package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -1
- package/dist/components/Tag/Tag.cjs +12 -18
- package/dist/components/Tag/Tag.cjs.map +1 -1
- package/dist/components/Tag/Tag.d.cts.map +1 -1
- package/dist/components/Tag/Tag.d.mts.map +1 -1
- package/dist/components/Tag/Tag.mjs +13 -19
- package/dist/components/Tag/Tag.mjs.map +1 -1
- package/dist/components/Text/Text.cjs +17 -7
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.cts +131 -130
- package/dist/components/TextArea/TextArea.d.cts.map +1 -1
- package/dist/components/TextArea/TextArea.d.mts +131 -130
- package/dist/components/TextArea/TextArea.d.mts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/TextButton/TextButton.cjs +17 -7
- package/dist/components/TextButton/TextButton.cjs.map +1 -1
- package/dist/components/TextButton/TextButton.mjs.map +1 -1
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.cts +136 -135
- package/dist/components/TextField/TextField.d.cts.map +1 -1
- package/dist/components/TextField/TextField.d.mts +136 -135
- package/dist/components/TextField/TextField.d.mts.map +1 -1
- package/dist/components/TextField/TextField.mjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs +17 -7
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +136 -136
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +136 -136
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.cjs +20 -18
- package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.d.cts +3 -3
- package/dist/components/TitleAlert/TitleAlert.d.cts.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.d.mts +3 -3
- package/dist/components/TitleAlert/TitleAlert.d.mts.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.mjs +21 -19
- package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.types.cjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.types.d.cts +6 -7
- package/dist/components/TitleAlert/TitleAlert.types.d.cts.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.types.d.mts +6 -7
- package/dist/components/TitleAlert/TitleAlert.types.d.mts.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.types.mjs.map +1 -1
- package/dist/components/TitleHub/TitleHub.cjs +22 -13
- package/dist/components/TitleHub/TitleHub.cjs.map +1 -1
- package/dist/components/TitleHub/TitleHub.d.cts +3 -3
- package/dist/components/TitleHub/TitleHub.d.cts.map +1 -1
- package/dist/components/TitleHub/TitleHub.d.mts +3 -3
- package/dist/components/TitleHub/TitleHub.d.mts.map +1 -1
- package/dist/components/TitleHub/TitleHub.mjs +23 -14
- package/dist/components/TitleHub/TitleHub.mjs.map +1 -1
- package/dist/components/TitleHub/TitleHub.types.cjs.map +1 -1
- package/dist/components/TitleHub/TitleHub.types.d.cts +10 -10
- package/dist/components/TitleHub/TitleHub.types.d.cts.map +1 -1
- package/dist/components/TitleHub/TitleHub.types.d.mts +10 -10
- package/dist/components/TitleHub/TitleHub.types.d.mts.map +1 -1
- package/dist/components/TitleHub/TitleHub.types.mjs.map +1 -1
- package/dist/components/TitleStandard/TitleStandard.cjs +15 -9
- package/dist/components/TitleStandard/TitleStandard.cjs.map +1 -1
- package/dist/components/TitleStandard/TitleStandard.d.cts +2 -2
- package/dist/components/TitleStandard/TitleStandard.d.cts.map +1 -1
- package/dist/components/TitleStandard/TitleStandard.d.mts +2 -2
- package/dist/components/TitleStandard/TitleStandard.d.mts.map +1 -1
- package/dist/components/TitleStandard/TitleStandard.mjs +16 -10
- package/dist/components/TitleStandard/TitleStandard.mjs.map +1 -1
- package/dist/components/TitleStandard/TitleStandard.types.cjs.map +1 -1
- package/dist/components/TitleStandard/TitleStandard.types.d.cts +7 -7
- package/dist/components/TitleStandard/TitleStandard.types.d.cts.map +1 -1
- package/dist/components/TitleStandard/TitleStandard.types.d.mts +7 -7
- package/dist/components/TitleStandard/TitleStandard.types.d.mts.map +1 -1
- package/dist/components/TitleStandard/TitleStandard.types.mjs.map +1 -1
- package/dist/components/TitleSubpage/TitleSubpage.cjs +31 -18
- package/dist/components/TitleSubpage/TitleSubpage.cjs.map +1 -1
- package/dist/components/TitleSubpage/TitleSubpage.d.cts +3 -3
- package/dist/components/TitleSubpage/TitleSubpage.d.cts.map +1 -1
- package/dist/components/TitleSubpage/TitleSubpage.d.mts +3 -3
- package/dist/components/TitleSubpage/TitleSubpage.d.mts.map +1 -1
- package/dist/components/TitleSubpage/TitleSubpage.mjs +32 -19
- package/dist/components/TitleSubpage/TitleSubpage.mjs.map +1 -1
- package/dist/components/TitleSubpage/TitleSubpage.types.cjs.map +1 -1
- package/dist/components/TitleSubpage/TitleSubpage.types.d.cts +8 -9
- package/dist/components/TitleSubpage/TitleSubpage.types.d.cts.map +1 -1
- package/dist/components/TitleSubpage/TitleSubpage.types.d.mts +8 -9
- package/dist/components/TitleSubpage/TitleSubpage.types.d.mts.map +1 -1
- package/dist/components/TitleSubpage/TitleSubpage.types.mjs.map +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.mjs.map +1 -1
- package/dist/components/Toast/Toaster.cjs +17 -7
- package/dist/components/Toast/Toaster.cjs.map +1 -1
- package/dist/components/Toast/Toaster.d.cts +1 -1
- package/dist/components/Toast/Toaster.d.cts.map +1 -1
- package/dist/components/Toast/Toaster.d.mts +1 -1
- package/dist/components/Toast/Toaster.d.mts.map +1 -1
- package/dist/components/Toast/Toaster.mjs.map +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +2 -2
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/Blockies/Blockies.d.cts.map +1 -1
- package/dist/components/temp-components/Blockies/Blockies.d.mts.map +1 -1
- package/dist/components/temp-components/Blockies/Blockies.utilities.cjs +2 -2
- package/dist/components/temp-components/Blockies/Blockies.utilities.cjs.map +1 -1
- package/dist/components/temp-components/Blockies/Blockies.utilities.mjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +17 -7
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts.map +1 -1
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs +10 -9
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs.map +1 -1
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts.map +1 -1
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts.map +1 -1
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs +10 -8
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs.map +1 -1
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs +0 -5
- package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.cjs +17 -7
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.cjs.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.d.cts.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.d.mts.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.mjs.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.cjs +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.cjs.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.d.cts.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.d.mts.map +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.mjs +1 -1
- package/dist/components/temp-components/Jazzicon/Jazzicon.mjs.map +1 -1
- package/dist/components/temp-components/Maskicon/Maskicon.cjs +17 -7
- package/dist/components/temp-components/Maskicon/Maskicon.cjs.map +1 -1
- package/dist/components/temp-components/Maskicon/Maskicon.d.cts.map +1 -1
- package/dist/components/temp-components/Maskicon/Maskicon.d.mts.map +1 -1
- package/dist/components/temp-components/Maskicon/Maskicon.mjs.map +1 -1
- package/dist/components/temp-components/Maskicon/Maskicon.utilities.cjs +4 -5
- package/dist/components/temp-components/Maskicon/Maskicon.utilities.cjs.map +1 -1
- package/dist/components/temp-components/Maskicon/Maskicon.utilities.mjs.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.cjs +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.cjs.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.d.cts.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.d.mts.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.mjs +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.mjs.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.cjs.map +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts +1 -1
- package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.mjs.map +1 -1
- package/dist/test-utils/createRenderer.cjs +17 -11
- package/dist/test-utils/createRenderer.cjs.map +1 -1
- package/dist/test-utils/createRenderer.d.cts.map +1 -1
- package/dist/test-utils/createRenderer.d.mts.map +1 -1
- package/package.json +5 -5
- package/dist/components/temp-components/Spinner/Spinner.cjs +0 -68
- package/dist/components/temp-components/Spinner/Spinner.cjs.map +0 -1
- package/dist/components/temp-components/Spinner/Spinner.d.cts.map +0 -1
- package/dist/components/temp-components/Spinner/Spinner.d.mts.map +0 -1
- package/dist/components/temp-components/Spinner/Spinner.mjs +0 -48
- package/dist/components/temp-components/Spinner/Spinner.mjs.map +0 -1
- package/dist/components/temp-components/Spinner/Spinner.types.cjs.map +0 -1
- package/dist/components/temp-components/Spinner/Spinner.types.d.cts.map +0 -1
- package/dist/components/temp-components/Spinner/Spinner.types.d.mts.map +0 -1
- package/dist/components/temp-components/Spinner/Spinner.types.mjs.map +0 -1
- package/dist/components/temp-components/Spinner/index.cjs.map +0 -1
- package/dist/components/temp-components/Spinner/index.d.cts.map +0 -1
- package/dist/components/temp-components/Spinner/index.d.mts.map +0 -1
- package/dist/components/temp-components/Spinner/index.mjs.map +0 -1
- /package/dist/components/{temp-components/Spinner → Spinner}/Spinner.d.cts +0 -0
- /package/dist/components/{temp-components/Spinner → Spinner}/Spinner.d.mts +0 -0
- /package/dist/components/{temp-components/Spinner → Spinner}/Spinner.types.cjs +0 -0
- /package/dist/components/{temp-components/Spinner → Spinner}/Spinner.types.mjs +0 -0
- /package/dist/components/{temp-components/Spinner → Spinner}/index.cjs +0 -0
- /package/dist/components/{temp-components/Spinner → Spinner}/index.d.cts +0 -0
- /package/dist/components/{temp-components/Spinner → Spinner}/index.d.mts +0 -0
- /package/dist/components/{temp-components/Spinner → Spinner}/index.mjs +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,gBAAgB,EACjB,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAOzC,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ListItem.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EACjB,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAOzC,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,OAAO,E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C,CAC7B,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAC/C,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,EAC3C,CACH,CAAC;IAEF,MAAM,WAAW,GAAG,iBAAiB,CAAC,CAAC,CAAC,CACtC,CAAC,GAAG,CACF,aAAa,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,mBAAmB,CAAC,CAChC,GAAG,CAAC,CAAC,YAAY,CAAC,CAElB;MAAA,CAAC,cAAc,CACf;MAAA,CAAC,OAAO,CACR;MAAA,CAAC,YAAY,CACf;IAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CAAC;IAEF,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,CACL,CAAC,SAAS,CACR,iBAAiB,CAAC,CAAC,iBAAiB,IAAI,QAAQ,CAAC,CACjD,KAAK,CAAC,CAAC,iBAAiB,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,WAAW,CACZ;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,KAAK,CAAC,CAClC;MAAA,CAAC,WAAW,CACZ;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n ContentVariant,\n mergeTwClassName,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\nimport type {\n PressableStateCallbackType,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport { Box } from '../Box';\nimport { Content } from '../Content';\n\nimport type { ListItemProps } from './ListItem.types';\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n isInteractive = false,\n twClassName,\n style,\n startAccessory,\n endAccessory,\n accessoryGap = 0,\n variant = ContentVariant.TwoLines,\n avatar,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n accessibilityRole,\n ...props\n}) => {\n const tw = useTailwind();\n const isMultiLine = variant === ContentVariant.MultiLine;\n let rootSizeClassName = 'min-h-[72px] justify-center';\n if (variant === ContentVariant.OneLine) {\n rootSizeClassName = 'min-h-[48px] justify-center';\n } else if (isMultiLine) {\n rootSizeClassName = 'min-h-[88px] justify-start';\n }\n const accessoryAlignItems = isMultiLine\n ? BoxAlignItems.Start\n : BoxAlignItems.Center;\n\n const rootBaseClassName = mergeTwClassName(\n 'w-full px-4 py-3',\n rootSizeClassName,\n );\n const rootTwClassName = mergeTwClassName(rootBaseClassName, twClassName);\n\n const wrapperStyle = style\n ? [tw.style(rootTwClassName), style]\n : tw.style(rootTwClassName);\n\n const getPressableStyle = ({\n pressed,\n }: PressableStateCallbackType): StyleProp<ViewStyle> => {\n const baseStyle = tw.style(rootTwClassName, pressed && 'bg-pressed');\n\n if (!style) {\n return baseStyle;\n }\n\n const userStyle = typeof style === 'function' ? style({ pressed }) : style;\n\n return [baseStyle, userStyle];\n };\n\n const hasRowAccessories = Boolean(startAccessory) || Boolean(endAccessory);\n\n const content = (\n <Content\n twClassName={hasRowAccessories ? 'flex-1 min-w-0' : undefined}\n variant={variant}\n avatar={avatar}\n title={title}\n titleProps={titleProps}\n titleStartAccessory={titleStartAccessory}\n titleEndAccessory={titleEndAccessory}\n description={description}\n descriptionProps={descriptionProps}\n descriptionStartAccessory={descriptionStartAccessory}\n descriptionEndAccessory={descriptionEndAccessory}\n value={value}\n valueProps={valueProps}\n valueStartAccessory={valueStartAccessory}\n valueEndAccessory={valueEndAccessory}\n subvalue={subvalue}\n subvalueProps={subvalueProps}\n subvalueStartAccessory={subvalueStartAccessory}\n subvalueEndAccessory={subvalueEndAccessory}\n />\n );\n\n const listContent = hasRowAccessories ? (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={accessoryAlignItems}\n gap={accessoryGap}\n >\n {startAccessory}\n {content}\n {endAccessory}\n </Box>\n ) : (\n content\n );\n\n if (isInteractive) {\n return (\n <Pressable\n accessibilityRole={accessibilityRole ?? 'button'}\n style={getPressableStyle}\n {...props}\n >\n {listContent}\n {children}\n </Pressable>\n );\n }\n\n return (\n <Box style={wrapperStyle} {...props}>\n {listContent}\n {children}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemMultiSelect.cjs","sourceRoot":"","sources":["../../../src/components/ListItemMultiSelect/ListItemMultiSelect.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAA2E;AAC3E,kDAA0B;AAE1B,oDAAuC;AACvC,oDAAuC;AAIvC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AAE5B,MAAM,mBAAmB,GAAG,CAAC,EAClC,UAAU,EACV,YAAY,GAAG,CAAC,EAChB,WAAW,EACX,GAAG,KAAK,EACiB,EAAE,EAAE;IAC7B,MAAM,mBAAmB,GAAG,UAAU;QACpC,CAAC,CAAC,IAAA,uCAAgB,EAAC,qBAAqB,EAAE,WAAW,CAAC;QACtD,CAAC,CAAC,WAAW,CAAC;IAEhB,OAAO,CACL,CAAC,mBAAQ,CACP,aAAa,CACb,WAAW,CAAC,CAAC,mBAAmB,CAAC,CACjC,YAAY,CAAC,CACX,CAAC,mBAAQ,CACP,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,KAAK,CAAC,EAAE,CACR,aAAa,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ListItemMultiSelect.cjs","sourceRoot":"","sources":["../../../src/components/ListItemMultiSelect/ListItemMultiSelect.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAA2E;AAC3E,kDAA0B;AAE1B,oDAAuC;AACvC,oDAAuC;AAIvC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AAE5B,MAAM,mBAAmB,GAAG,CAAC,EAClC,UAAU,EACV,YAAY,GAAG,CAAC,EAChB,WAAW,EACX,GAAG,KAAK,EACiB,EAAE,EAAE;IAC7B,MAAM,mBAAmB,GAAG,UAAU;QACpC,CAAC,CAAC,IAAA,uCAAgB,EAAC,qBAAqB,EAAE,WAAW,CAAC;QACtD,CAAC,CAAC,WAAW,CAAC;IAEhB,OAAO,CACL,CAAC,mBAAQ,CACP,aAAa,CACb,WAAW,CAAC,CAAC,mBAAmB,CAAC,CACjC,YAAY,CAAC,CACX,CAAC,mBAAQ,CACP,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,KAAK,CAAC,EAAE,CACR,aAAa,CAAC,MAAM,EAExB,CAAC,CACD,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,mBAAmB,uBA0B9B;AAEF,2BAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC","sourcesContent":["import { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Checkbox } from '../Checkbox';\nimport { ListItem } from '../ListItem';\n\nimport type { ListItemMultiSelectProps } from './ListItemMultiSelect.types';\n\nconst noopChange = () => undefined;\n\nexport const ListItemMultiSelect = ({\n isSelected,\n accessoryGap = 3,\n twClassName,\n ...props\n}: ListItemMultiSelectProps) => {\n const resolvedTwClassName = isSelected\n ? mergeTwClassName('bg-background-muted', twClassName)\n : twClassName;\n\n return (\n <ListItem\n isInteractive\n twClassName={resolvedTwClassName}\n endAccessory={\n <Checkbox\n isSelected={isSelected}\n onChange={noopChange}\n label=\"\"\n pointerEvents=\"none\"\n />\n }\n accessoryGap={accessoryGap}\n {...props}\n />\n );\n};\n\nListItemMultiSelect.displayName = 'ListItemMultiSelect';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemMultiSelect.mjs","sourceRoot":"","sources":["../../../src/components/ListItemMultiSelect/ListItemMultiSelect.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,gDAAgD;AAC3E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AACvC,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAIvC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AAEnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,UAAU,EACV,YAAY,GAAG,CAAC,EAChB,WAAW,EACX,GAAG,KAAK,EACiB,EAAE,EAAE;IAC7B,MAAM,mBAAmB,GAAG,UAAU;QACpC,CAAC,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,WAAW,CAAC;QACtD,CAAC,CAAC,WAAW,CAAC;IAEhB,OAAO,CACL,CAAC,QAAQ,CACP,aAAa,CACb,WAAW,CAAC,CAAC,mBAAmB,CAAC,CACjC,YAAY,CAAC,CACX,CAAC,QAAQ,CACP,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,KAAK,CAAC,EAAE,CACR,aAAa,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"ListItemMultiSelect.mjs","sourceRoot":"","sources":["../../../src/components/ListItemMultiSelect/ListItemMultiSelect.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,gDAAgD;AAC3E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AACvC,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAIvC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AAEnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,UAAU,EACV,YAAY,GAAG,CAAC,EAChB,WAAW,EACX,GAAG,KAAK,EACiB,EAAE,EAAE;IAC7B,MAAM,mBAAmB,GAAG,UAAU;QACpC,CAAC,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,WAAW,CAAC;QACtD,CAAC,CAAC,WAAW,CAAC;IAEhB,OAAO,CACL,CAAC,QAAQ,CACP,aAAa,CACb,WAAW,CAAC,CAAC,mBAAmB,CAAC,CACjC,YAAY,CAAC,CACX,CAAC,QAAQ,CACP,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,KAAK,CAAC,EAAE,CACR,aAAa,CAAC,MAAM,EAExB,CAAC,CACD,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC","sourcesContent":["import { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Checkbox } from '../Checkbox';\nimport { ListItem } from '../ListItem';\n\nimport type { ListItemMultiSelectProps } from './ListItemMultiSelect.types';\n\nconst noopChange = () => undefined;\n\nexport const ListItemMultiSelect = ({\n isSelected,\n accessoryGap = 3,\n twClassName,\n ...props\n}: ListItemMultiSelectProps) => {\n const resolvedTwClassName = isSelected\n ? mergeTwClassName('bg-background-muted', twClassName)\n : twClassName;\n\n return (\n <ListItem\n isInteractive\n twClassName={resolvedTwClassName}\n endAccessory={\n <Checkbox\n isSelected={isSelected}\n onChange={noopChange}\n label=\"\"\n pointerEvents=\"none\"\n />\n }\n accessoryGap={accessoryGap}\n {...props}\n />\n );\n};\n\nListItemMultiSelect.displayName = 'ListItemMultiSelect';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainActionButton.d.cts","sourceRoot":"","sources":["../../../src/components/MainActionButton/MainActionButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MainActionButton.d.cts","sourceRoot":"","sources":["../../../src/components/MainActionButton/MainActionButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB,GAAI,sHAY9B,qBAAqB,sBA8CvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainActionButton.d.mts","sourceRoot":"","sources":["../../../src/components/MainActionButton/MainActionButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MainActionButton.d.mts","sourceRoot":"","sources":["../../../src/components/MainActionButton/MainActionButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB,GAAI,sHAY9B,qBAAqB,sBA8CvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAsD;AAEtD,gFAAmE;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"RadioButton.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAsD;AAEtD,gFAAmE;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,2BAA2B,CAAC;IACrC,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACD,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAC7B,UAAmB,EACnB,QAAiB,EACT,EAAE;IACV,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AAEK,MAAM,WAAW,GAAG,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,UAAU,EACV,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,QAAQ,GAAG,KAAK,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACS,EAAE,EAAE;IACrB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,OAAO,CACL,CAAC,mBAAI,CACH,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,uBAAuB,EACvB,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,EACzC,WAAW,CACZ;YACD,KAAK;SACN,CA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["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-icon-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-icon-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.d.cts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"RadioButton.d.cts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,GAAI,6JAazB,gBAAgB,sBA0DlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.d.mts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"RadioButton.d.mts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,GAAI,6JAazB,gBAAgB,sBA0DlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,qBAAqB;AAEtD,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE;
|
|
1
|
+
{"version":3,"file":"RadioButton.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,qBAAqB;AAEtD,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,2BAA2B,CAAC;IACrC,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACD,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAC7B,UAAmB,EACnB,QAAiB,EACT,EAAE;IACV,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,iBAAiB,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,UAAU,EACV,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,QAAQ,GAAG,KAAK,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACS,EAAE,EAAE;IACrB,MAAM,EAA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EAAE,MAAM,EAAE,CAAC,CAChE;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,cAAc,CAAC,CAClB,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,gBAAgB,CACpB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-icon-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-icon-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
exports.SectionDivider = void 0;
|
|
27
37
|
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionDivider.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SectionDivider.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAAyE;AACzE,8FAA4E;AAC5E,+CAA0C;AAG1C,0CAA6B;AAIhB,QAAA,cAAc,GAAG,IAAA,kBAAU,EACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACZ,cAAc,GAAG,YAAY,CAAC;IAChC,CAAC;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACnB,cAAc,GAAG,UAAU,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,CACL,CAAC,SAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,qCAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { View } from "react-native";
|
|
3
3
|
export declare const SectionDivider: React.ForwardRefExoticComponent<import("@metamask-previews/design-system-shared").BoxPropsShared & import("react-native").ViewProps & {
|
|
4
|
-
twClassName?: string
|
|
4
|
+
twClassName?: string;
|
|
5
5
|
} & React.RefAttributes<View>>;
|
|
6
6
|
//# sourceMappingURL=SectionDivider.d.cts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { View } from "react-native";
|
|
3
3
|
export declare const SectionDivider: React.ForwardRefExoticComponent<import("@metamask-previews/design-system-shared").BoxPropsShared & import("react-native").ViewProps & {
|
|
4
|
-
twClassName?: string
|
|
4
|
+
twClassName?: string;
|
|
5
5
|
} & React.RefAttributes<View>>;
|
|
6
6
|
//# sourceMappingURL=SectionDivider.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionDivider.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,gDA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,CAAC,GAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
|
|
@@ -9,19 +9,19 @@ const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-t
|
|
|
9
9
|
const react_1 = __importDefault(require("react"));
|
|
10
10
|
const react_native_1 = require("react-native");
|
|
11
11
|
const Box_1 = require("../Box/index.cjs");
|
|
12
|
-
const BoxRow_1 = require("../BoxRow/index.cjs");
|
|
13
12
|
const Icon_1 = require("../Icon/index.cjs");
|
|
13
|
+
const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
|
|
14
14
|
/**
|
|
15
15
|
* Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
|
|
16
16
|
* When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
|
|
17
|
-
* Otherwise, remaining `View` props are forwarded to the outer {@link
|
|
17
|
+
* Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.
|
|
18
18
|
*
|
|
19
19
|
* @param sectionHeaderProps - Component props
|
|
20
20
|
* @param sectionHeaderProps.title - Title content for the inner row (required)
|
|
21
21
|
* @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)
|
|
22
22
|
* @param sectionHeaderProps.children - Optional full-width content below the header row
|
|
23
23
|
* @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
|
|
24
|
-
* @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `
|
|
24
|
+
* @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`
|
|
25
25
|
* @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
|
|
26
26
|
* @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
|
|
27
27
|
* @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
|
|
@@ -42,20 +42,25 @@ const SectionHeader = (sectionHeaderProps) => {
|
|
|
42
42
|
const resolvedStartAccessory = startIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={startIconName}/>) : (startAccessory);
|
|
43
43
|
const resolvedEndAccessory = resolvedEndIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconAlternative} twClassName="shrink-0" {...endIconProps} name={resolvedEndIconName}/>) : (endAccessory);
|
|
44
44
|
const hasAccessories = Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);
|
|
45
|
-
const titleRow = title ? (<
|
|
45
|
+
const titleRow = title ? (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} {...titleWrapperProps} twClassName={(0, design_system_shared_1.mergeTwClassName)(hasAccessories ? 'w-full shrink min-w-0' : '', titleWrapperProps?.twClassName)}>
|
|
46
|
+
<TextOrChildren_1.TextOrChildren textProps={{
|
|
46
47
|
variant: design_system_shared_1.TextVariant.HeadingMd,
|
|
47
48
|
color: design_system_shared_1.TextColor.TextDefault,
|
|
48
49
|
...titleProps,
|
|
49
50
|
}}>
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
{title}
|
|
52
|
+
</TextOrChildren_1.TextOrChildren>
|
|
53
|
+
{titleAccessory}
|
|
54
|
+
</Box_1.Box>) : null;
|
|
52
55
|
let mainContent = null;
|
|
53
56
|
if (titleRow) {
|
|
54
57
|
mainContent = hasAccessories ? (<Box_1.Box twClassName="shrink min-w-0">{titleRow}</Box_1.Box>) : (titleRow);
|
|
55
58
|
}
|
|
56
|
-
const headerRow = (<
|
|
59
|
+
const headerRow = (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1}>
|
|
60
|
+
{resolvedStartAccessory}
|
|
57
61
|
{mainContent}
|
|
58
|
-
|
|
62
|
+
{resolvedEndAccessory}
|
|
63
|
+
</Box_1.Box>);
|
|
59
64
|
const body = children ? (<Box_1.Box gap={1}>
|
|
60
65
|
{headerRow}
|
|
61
66
|
{children}
|
|
@@ -77,9 +82,11 @@ const SectionHeader = (sectionHeaderProps) => {
|
|
|
77
82
|
{children}
|
|
78
83
|
</Box_1.Box>);
|
|
79
84
|
}
|
|
80
|
-
return (<
|
|
85
|
+
return (<Box_1.Box {...props} flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} style={style} twClassName={(0, design_system_shared_1.mergeTwClassName)('px-4 pb-2 pt-3', twClassName)}>
|
|
86
|
+
{resolvedStartAccessory}
|
|
81
87
|
{mainContent}
|
|
82
|
-
|
|
88
|
+
{resolvedEndAccessory}
|
|
89
|
+
</Box_1.Box>);
|
|
83
90
|
};
|
|
84
91
|
exports.SectionHeader = SectionHeader;
|
|
85
92
|
exports.SectionHeader.displayName = 'SectionHeader';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAOiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAyC;AAEzC,0CAA6B;AAC7B,gDAAmC;AACnC,4CAA+B;AAI/B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACI,MAAM,aAAa,GAAiC,CACzD,kBAAkB,EAClB,EAAE;IACF,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACT,GAAG,kBAAkB,CAAC;IAEvB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,mBAAmB,GACvB,WAAW;QACX,CAAC,aAAa,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,+BAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAErE,MAAM,sBAAsB,GAAG,aAAa,CAAC,CAAC,CAAC,CAC7C,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gCAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,I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ED,IAAI,QAAQ,EAAE;QACZ,OAAO,CACL,CAAC,SAAG,CACF,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAE7D;QAAA,CAAC,SAAS,CACV;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,SAAG,CAAC,CACP,CAAC;KACH;IAED,OAAO,CACL,CAAC,eAAM,CACL,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAC7D,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;MAAA,CAAC,WAAW,CACd;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAvJW,QAAA,aAAa,iBAuJxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon } from '../Icon';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.\n * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param sectionHeaderProps - Component props\n * @param sectionHeaderProps.title - Title content for the inner row (required)\n * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)\n * @param sectionHeaderProps.children - Optional full-width content below the header row\n * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set\n * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param sectionHeaderProps.endIconName - Optional end icon on the outer header row (trailing chevrons, disclosure arrows); takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided\n * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`\n * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press\n * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)\n * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = (\n sectionHeaderProps,\n) => {\n const {\n title,\n children,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n isInteractive,\n twClassName = '',\n style,\n ...props\n } = sectionHeaderProps;\n\n const tw = useTailwind();\n const resolvedEndIconName =\n endIconName ??\n (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);\n\n const resolvedStartAccessory = startIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={startIconName}\n />\n ) : (\n startAccessory\n );\n\n const resolvedEndAccessory = resolvedEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={resolvedEndIconName}\n />\n ) : (\n endAccessory\n );\n\n const hasAccessories =\n Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);\n\n const titleRow = title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n twClassName={mergeTwClassName(\n hasAccessories ? 'w-full shrink min-w-0' : '',\n titleWrapperProps?.twClassName,\n )}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null;\n\n let mainContent = null;\n if (titleRow) {\n mainContent = hasAccessories ? (\n <Box twClassName=\"shrink min-w-0\">{titleRow}</Box>\n ) : (\n titleRow\n );\n }\n\n const headerRow = (\n <BoxRow\n gap={1}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {mainContent}\n </BoxRow>\n );\n\n const body = children ? (\n <Box gap={1}>\n {headerRow}\n {children}\n </Box>\n ) : (\n headerRow\n );\n\n if (isInteractive) {\n const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;\n const isDisabled = Boolean(disabled);\n\n return (\n <Pressable\n accessibilityRole={accessibilityRole}\n style={({ pressed }) => {\n const baseStyle = tw.style(\n 'px-4 pb-2 pt-3',\n twClassName,\n pressed && !isDisabled && 'opacity-70',\n );\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;\n }}\n {...props}\n >\n {body}\n </Pressable>\n );\n }\n\n if (children) {\n return (\n <Box\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {headerRow}\n {children}\n </Box>\n );\n }\n\n return (\n <BoxRow\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {mainContent}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
|
|
1
|
+
{"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,kFASiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAyC;AAEzC,0CAA6B;AAC7B,4CAA+B;AAC/B,gFAAmE;AAInE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACI,MAAM,aAAa,GAAiC,CACzD,kBAAkB,EAClB,EAAE;IACF,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACT,GAAG,kBAAkB,CAAC;IAEvB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,mBAAmB,GACvB,WAAW;QACX,CAAC,aAAa,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,+BAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAErE,MAAM,sBAAsB,GAAG,aAAa,CAAC,CAAC,CAAC,CAC7C,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gCAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,CACnB,IAAI,CAAC,CAAC,aAAa,CAAC,EACpB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CAAC;IAEF,MAAM,oBAAoB,GAAG,mBAAmB,CAAC,CAAC,CAAC,CACjD,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,C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CAAC;IACJ,CAAC;IAED,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CACL,CAAC,SAAG,CACF,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAE7D;QAAA,CAAC,SAAS,CACV;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,SAAG,CAAC,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,SAAG,CACF,IAAI,KAAK,CAAC,CACV,aAAa,CAAC,CAAC,uCAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAE7D;MAAA,CAAC,sBAAsB,CACvB;MAAA,CAAC,WAAW,CACZ;MAAA,CAAC,oBAAoB,CACvB;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAhKW,QAAA,aAAa,iBAgKxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Icon } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.\n * Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.\n *\n * @param sectionHeaderProps - Component props\n * @param sectionHeaderProps.title - Title content for the inner row (required)\n * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)\n * @param sectionHeaderProps.children - Optional full-width content below the header row\n * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`\n * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set\n * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param sectionHeaderProps.endIconName - Optional end icon on the outer header row (trailing chevrons, disclosure arrows); takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided\n * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`\n * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press\n * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)\n * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = (\n sectionHeaderProps,\n) => {\n const {\n title,\n children,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n isInteractive,\n twClassName = '',\n style,\n ...props\n } = sectionHeaderProps;\n\n const tw = useTailwind();\n const resolvedEndIconName =\n endIconName ??\n (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);\n\n const resolvedStartAccessory = startIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={startIconName}\n />\n ) : (\n startAccessory\n );\n\n const resolvedEndAccessory = resolvedEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={resolvedEndIconName}\n />\n ) : (\n endAccessory\n );\n\n const hasAccessories =\n Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);\n\n const titleRow = title ? (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n {...titleWrapperProps}\n twClassName={mergeTwClassName(\n hasAccessories ? 'w-full shrink min-w-0' : '',\n titleWrapperProps?.twClassName,\n )}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n {titleAccessory}\n </Box>\n ) : null;\n\n let mainContent = null;\n if (titleRow) {\n mainContent = hasAccessories ? (\n <Box twClassName=\"shrink min-w-0\">{titleRow}</Box>\n ) : (\n titleRow\n );\n }\n\n const headerRow = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n {resolvedStartAccessory}\n {mainContent}\n {resolvedEndAccessory}\n </Box>\n );\n\n const body = children ? (\n <Box gap={1}>\n {headerRow}\n {children}\n </Box>\n ) : (\n headerRow\n );\n\n if (isInteractive) {\n const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;\n const isDisabled = Boolean(disabled);\n\n return (\n <Pressable\n accessibilityRole={accessibilityRole}\n style={({ pressed }) => {\n const baseStyle = tw.style(\n 'px-4 pb-2 pt-3',\n twClassName,\n pressed && !isDisabled && 'opacity-70',\n );\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;\n }}\n {...props}\n >\n {body}\n </Pressable>\n );\n }\n\n if (children) {\n return (\n <Box\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {headerRow}\n {children}\n </Box>\n );\n }\n\n return (\n <Box\n {...props}\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {resolvedStartAccessory}\n {mainContent}\n {resolvedEndAccessory}\n </Box>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
|
|
@@ -3,14 +3,14 @@ import type { SectionHeaderProps } from "./SectionHeader.types.cjs";
|
|
|
3
3
|
/**
|
|
4
4
|
* Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
|
|
5
5
|
* When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
|
|
6
|
-
* Otherwise, remaining `View` props are forwarded to the outer {@link
|
|
6
|
+
* Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.
|
|
7
7
|
*
|
|
8
8
|
* @param sectionHeaderProps - Component props
|
|
9
9
|
* @param sectionHeaderProps.title - Title content for the inner row (required)
|
|
10
10
|
* @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)
|
|
11
11
|
* @param sectionHeaderProps.children - Optional full-width content below the header row
|
|
12
12
|
* @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
|
|
13
|
-
* @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `
|
|
13
|
+
* @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`
|
|
14
14
|
* @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
|
|
15
15
|
* @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
|
|
16
16
|
* @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgKtD,CAAC"}
|
|
@@ -3,14 +3,14 @@ import type { SectionHeaderProps } from "./SectionHeader.types.mjs";
|
|
|
3
3
|
/**
|
|
4
4
|
* Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
|
|
5
5
|
* When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
|
|
6
|
-
* Otherwise, remaining `View` props are forwarded to the outer {@link
|
|
6
|
+
* Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.
|
|
7
7
|
*
|
|
8
8
|
* @param sectionHeaderProps - Component props
|
|
9
9
|
* @param sectionHeaderProps.title - Title content for the inner row (required)
|
|
10
10
|
* @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)
|
|
11
11
|
* @param sectionHeaderProps.children - Optional full-width content below the header row
|
|
12
12
|
* @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
|
|
13
|
-
* @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `
|
|
13
|
+
* @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`
|
|
14
14
|
* @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
|
|
15
15
|
* @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
|
|
16
16
|
* @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgKtD,CAAC"}
|
|
@@ -4,25 +4,25 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { IconColor, IconName, IconSize, mergeTwClassName, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
|
|
7
|
+
import { BoxAlignItems, BoxFlexDirection, IconColor, IconName, IconSize, mergeTwClassName, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
|
|
8
8
|
import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
|
|
9
9
|
import $React from "react";
|
|
10
10
|
const React = $importDefault($React);
|
|
11
11
|
import { Pressable } from "react-native";
|
|
12
12
|
import { Box } from "../Box/index.mjs";
|
|
13
|
-
import { BoxRow } from "../BoxRow/index.mjs";
|
|
14
13
|
import { Icon } from "../Icon/index.mjs";
|
|
14
|
+
import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
15
15
|
/**
|
|
16
16
|
* Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
|
|
17
17
|
* When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
|
|
18
|
-
* Otherwise, remaining `View` props are forwarded to the outer {@link
|
|
18
|
+
* Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.
|
|
19
19
|
*
|
|
20
20
|
* @param sectionHeaderProps - Component props
|
|
21
21
|
* @param sectionHeaderProps.title - Title content for the inner row (required)
|
|
22
22
|
* @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)
|
|
23
23
|
* @param sectionHeaderProps.children - Optional full-width content below the header row
|
|
24
24
|
* @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
|
|
25
|
-
* @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `
|
|
25
|
+
* @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`
|
|
26
26
|
* @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
|
|
27
27
|
* @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
|
|
28
28
|
* @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
|
|
@@ -43,20 +43,25 @@ export const SectionHeader = (sectionHeaderProps) => {
|
|
|
43
43
|
const resolvedStartAccessory = startIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={startIconName}/>) : (startAccessory);
|
|
44
44
|
const resolvedEndAccessory = resolvedEndIconName ? (<Icon size={IconSize.Md} color={IconColor.IconAlternative} twClassName="shrink-0" {...endIconProps} name={resolvedEndIconName}/>) : (endAccessory);
|
|
45
45
|
const hasAccessories = Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);
|
|
46
|
-
const titleRow = title ? (<
|
|
46
|
+
const titleRow = title ? (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} {...titleWrapperProps} twClassName={mergeTwClassName(hasAccessories ? 'w-full shrink min-w-0' : '', titleWrapperProps?.twClassName)}>
|
|
47
|
+
<TextOrChildren textProps={{
|
|
47
48
|
variant: TextVariant.HeadingMd,
|
|
48
49
|
color: TextColor.TextDefault,
|
|
49
50
|
...titleProps,
|
|
50
51
|
}}>
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
{title}
|
|
53
|
+
</TextOrChildren>
|
|
54
|
+
{titleAccessory}
|
|
55
|
+
</Box>) : null;
|
|
53
56
|
let mainContent = null;
|
|
54
57
|
if (titleRow) {
|
|
55
58
|
mainContent = hasAccessories ? (<Box twClassName="shrink min-w-0">{titleRow}</Box>) : (titleRow);
|
|
56
59
|
}
|
|
57
|
-
const headerRow = (<
|
|
60
|
+
const headerRow = (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1}>
|
|
61
|
+
{resolvedStartAccessory}
|
|
58
62
|
{mainContent}
|
|
59
|
-
|
|
63
|
+
{resolvedEndAccessory}
|
|
64
|
+
</Box>);
|
|
60
65
|
const body = children ? (<Box gap={1}>
|
|
61
66
|
{headerRow}
|
|
62
67
|
{children}
|
|
@@ -78,9 +83,11 @@ export const SectionHeader = (sectionHeaderProps) => {
|
|
|
78
83
|
{children}
|
|
79
84
|
</Box>);
|
|
80
85
|
}
|
|
81
|
-
return (<
|
|
86
|
+
return (<Box {...props} flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} style={style} twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}>
|
|
87
|
+
{resolvedStartAccessory}
|
|
82
88
|
{mainContent}
|
|
83
|
-
|
|
89
|
+
{resolvedEndAccessory}
|
|
90
|
+
</Box>);
|
|
84
91
|
};
|
|
85
92
|
SectionHeader.displayName = 'SectionHeader';
|
|
86
93
|
//# sourceMappingURL=SectionHeader.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,E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ACX;MAAA,EAAE,GAAG,CAAC,CACP,CAAC;KACH;IAED,OAAO,CACL,CAAC,MAAM,CACL,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAC7D,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;MAAA,CAAC,WAAW,CACd;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon } from '../Icon';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.\n * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param sectionHeaderProps - Component props\n * @param sectionHeaderProps.title - Title content for the inner row (required)\n * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)\n * @param sectionHeaderProps.children - Optional full-width content below the header row\n * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set\n * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param sectionHeaderProps.endIconName - Optional end icon on the outer header row (trailing chevrons, disclosure arrows); takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided\n * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`\n * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press\n * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)\n * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = (\n sectionHeaderProps,\n) => {\n const {\n title,\n children,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n isInteractive,\n twClassName = '',\n style,\n ...props\n } = sectionHeaderProps;\n\n const tw = useTailwind();\n const resolvedEndIconName =\n endIconName ??\n (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);\n\n const resolvedStartAccessory = startIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={startIconName}\n />\n ) : (\n startAccessory\n );\n\n const resolvedEndAccessory = resolvedEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={resolvedEndIconName}\n />\n ) : (\n endAccessory\n );\n\n const hasAccessories =\n Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);\n\n const titleRow = title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n twClassName={mergeTwClassName(\n hasAccessories ? 'w-full shrink min-w-0' : '',\n titleWrapperProps?.twClassName,\n )}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null;\n\n let mainContent = null;\n if (titleRow) {\n mainContent = hasAccessories ? (\n <Box twClassName=\"shrink min-w-0\">{titleRow}</Box>\n ) : (\n titleRow\n );\n }\n\n const headerRow = (\n <BoxRow\n gap={1}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {mainContent}\n </BoxRow>\n );\n\n const body = children ? (\n <Box gap={1}>\n {headerRow}\n {children}\n </Box>\n ) : (\n headerRow\n );\n\n if (isInteractive) {\n const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;\n const isDisabled = Boolean(disabled);\n\n return (\n <Pressable\n accessibilityRole={accessibilityRole}\n style={({ pressed }) => {\n const baseStyle = tw.style(\n 'px-4 pb-2 pt-3',\n twClassName,\n pressed && !isDisabled && 'opacity-70',\n );\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;\n }}\n {...props}\n >\n {body}\n </Pressable>\n );\n }\n\n if (children) {\n return (\n <Box\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {headerRow}\n {children}\n </Box>\n );\n }\n\n return (\n <BoxRow\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {mainContent}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
|
|
1
|
+
{"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW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AI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAE7D;QAAA,CAAC,SAAS,CACV;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,GAAG,CAAC,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,aAAa,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAE7D;MAAA,CAAC,sBAAsB,CACvB;MAAA,CAAC,WAAW,CACZ;MAAA,CAAC,oBAAoB,CACvB;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Icon } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.\n * Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.\n *\n * @param sectionHeaderProps - Component props\n * @param sectionHeaderProps.title - Title content for the inner row (required)\n * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)\n * @param sectionHeaderProps.children - Optional full-width content below the header row\n * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`\n * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set\n * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param sectionHeaderProps.endIconName - Optional end icon on the outer header row (trailing chevrons, disclosure arrows); takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided\n * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`\n * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press\n * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)\n * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = (\n sectionHeaderProps,\n) => {\n const {\n title,\n children,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n isInteractive,\n twClassName = '',\n style,\n ...props\n } = sectionHeaderProps;\n\n const tw = useTailwind();\n const resolvedEndIconName =\n endIconName ??\n (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);\n\n const resolvedStartAccessory = startIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={startIconName}\n />\n ) : (\n startAccessory\n );\n\n const resolvedEndAccessory = resolvedEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={resolvedEndIconName}\n />\n ) : (\n endAccessory\n );\n\n const hasAccessories =\n Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);\n\n const titleRow = title ? (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n {...titleWrapperProps}\n twClassName={mergeTwClassName(\n hasAccessories ? 'w-full shrink min-w-0' : '',\n titleWrapperProps?.twClassName,\n )}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n {titleAccessory}\n </Box>\n ) : null;\n\n let mainContent = null;\n if (titleRow) {\n mainContent = hasAccessories ? (\n <Box twClassName=\"shrink min-w-0\">{titleRow}</Box>\n ) : (\n titleRow\n );\n }\n\n const headerRow = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n {resolvedStartAccessory}\n {mainContent}\n {resolvedEndAccessory}\n </Box>\n );\n\n const body = children ? (\n <Box gap={1}>\n {headerRow}\n {children}\n </Box>\n ) : (\n headerRow\n );\n\n if (isInteractive) {\n const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;\n const isDisabled = Boolean(disabled);\n\n return (\n <Pressable\n accessibilityRole={accessibilityRole}\n style={({ pressed }) => {\n const baseStyle = tw.style(\n 'px-4 pb-2 pt-3',\n twClassName,\n pressed && !isDisabled && 'opacity-70',\n );\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;\n }}\n {...props}\n >\n {body}\n </Pressable>\n );\n }\n\n if (children) {\n return (\n <Box\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {headerRow}\n {children}\n </Box>\n );\n }\n\n return (\n <Box\n {...props}\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {resolvedStartAccessory}\n {mainContent}\n {resolvedEndAccessory}\n </Box>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.types.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask-previews/design-system-shared';\nimport type { PressableProps, ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type {
|
|
1
|
+
{"version":3,"file":"SectionHeader.types.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask-previews/design-system-shared';\nimport type { PressableProps, ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxProps } from '../Box/Box.types';\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text/Text.types';\n\ntype SectionHeaderPropsBase = SectionHeaderPropsShared & {\n /**\n * Optional props merged into the title `Text` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props spread onto the title row {@link Box} (a row with centered items and `gap={1}` by default; values here override those defaults). Omits `children` (SectionHeader sets it via `title` and `titleAccessory`).\n */\n titleWrapperProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional prop to pass additional properties to the start icon.\n */\n startIconProps?: Omit<Partial<IconProps>, 'name'>;\n /**\n * Optional prop to pass additional properties to the end icon.\n */\n endIconProps?: Omit<Partial<IconProps>, 'name'>;\n /**\n * Optional Tailwind class name to apply to the outer row.\n */\n twClassName?: string;\n};\n\n/**\n * SectionHeader component props (React Native).\n * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and wrapper props.\n * When `isInteractive` is `true`, the outer wrapper is a `Pressable`; otherwise it is a row {@link Box} with `ViewProps`.\n */\nexport type SectionHeaderProps =\n | (SectionHeaderPropsBase & {\n isInteractive?: false;\n } & Omit<ViewProps, 'children'>)\n | (SectionHeaderPropsBase & {\n isInteractive: true;\n } & Omit<PressableProps, 'children'>);\n"]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { SectionHeaderPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
2
|
import type { PressableProps, ViewProps } from "react-native";
|
|
3
|
-
import type {
|
|
3
|
+
import type { BoxProps } from "../Box/Box.types.cjs";
|
|
4
4
|
import type { IconProps } from "../Icon/index.cjs";
|
|
5
5
|
import type { TextProps } from "../Text/Text.types.cjs";
|
|
6
6
|
type SectionHeaderPropsBase = SectionHeaderPropsShared & {
|
|
7
7
|
/**
|
|
8
|
-
* Optional props merged into
|
|
8
|
+
* Optional props merged into the title `Text` when `title` is a string.
|
|
9
9
|
*/
|
|
10
10
|
titleProps?: Omit<Partial<TextProps>, 'children'>;
|
|
11
11
|
/**
|
|
12
|
-
* Optional props spread onto the title row {@link
|
|
12
|
+
* Optional props spread onto the title row {@link Box} (a row with centered items and `gap={1}` by default; values here override those defaults). Omits `children` (SectionHeader sets it via `title` and `titleAccessory`).
|
|
13
13
|
*/
|
|
14
|
-
titleWrapperProps?: Omit<Partial<
|
|
14
|
+
titleWrapperProps?: Omit<Partial<BoxProps>, 'children'>;
|
|
15
15
|
/**
|
|
16
16
|
* Optional prop to pass additional properties to the start icon.
|
|
17
17
|
*/
|
|
@@ -28,7 +28,7 @@ type SectionHeaderPropsBase = SectionHeaderPropsShared & {
|
|
|
28
28
|
/**
|
|
29
29
|
* SectionHeader component props (React Native).
|
|
30
30
|
* Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and wrapper props.
|
|
31
|
-
* When `isInteractive` is `true`, the outer wrapper is a `Pressable`; otherwise it is a {@link
|
|
31
|
+
* When `isInteractive` is `true`, the outer wrapper is a `Pressable`; otherwise it is a row {@link Box} with `ViewProps`.
|
|
32
32
|
*/
|
|
33
33
|
export type SectionHeaderProps = (SectionHeaderPropsBase & {
|
|
34
34
|
isInteractive?: false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionHeader.types.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gDAAgD;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB;AAG9D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"SectionHeader.types.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gDAAgD;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB;AAG9D,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD,KAAK,sBAAsB,GAAG,wBAAwB,GAAG;IACvD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IAClD;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IAChD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC1B,CAAC,sBAAsB,GAAG;IACxB,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,GAChC,CAAC,sBAAsB,GAAG;IACxB,aAAa,EAAE,IAAI,CAAC;CACrB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC"}
|