@metamask-previews/design-system-react-native 0.53.0-preview.f03faa2 → 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 +61 -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 +24 -8
- 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/AvatarFavicon/AvatarFavicon.mjs +7 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.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 +24 -8
- 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 +7 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +24 -8
- 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 +7 -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 +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.d.cts +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.d.mts +2 -0
- package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -1
- package/dist/components/HeaderSearch/HeaderSearch.mjs +2 -0
- 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.assets.cjs +32 -0
- package/dist/components/Icon/Icon.assets.cjs.map +1 -1
- package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
- package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
- package/dist/components/Icon/Icon.assets.mjs +32 -0
- package/dist/components/Icon/Icon.assets.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/baseball.svg +1 -0
- package/dist/components/Icon/assets/basketball.svg +1 -0
- package/dist/components/Icon/assets/bicycle.svg +1 -0
- package/dist/components/Icon/assets/boxing-glove.svg +1 -0
- package/dist/components/Icon/assets/cricket.svg +1 -0
- package/dist/components/Icon/assets/feed-post.svg +1 -0
- package/dist/components/Icon/assets/flag-checkered.svg +1 -0
- package/dist/components/Icon/assets/football.svg +1 -0
- package/dist/components/Icon/assets/game-controller.svg +1 -0
- package/dist/components/Icon/assets/golf.svg +1 -0
- package/dist/components/Icon/assets/hockey.svg +1 -0
- package/dist/components/Icon/assets/horse.svg +1 -0
- package/dist/components/Icon/assets/medal.svg +1 -0
- package/dist/components/Icon/assets/musd-filled.svg +1 -1
- package/dist/components/Icon/assets/ping-pong.svg +1 -0
- package/dist/components/Icon/assets/soccer-ball.svg +1 -0
- package/dist/components/Icon/assets/tennis-ball.svg +1 -0
- package/dist/components/IconAlert/IconAlert.constants.cjs +1 -1
- package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs +1 -1
- package/dist/components/IconAlert/IconAlert.constants.mjs.map +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 +2 -2
- 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 +2 -2
- 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 +22 -9
- package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +137 -136
- package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +137 -136
- package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs +5 -2
- package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts +5 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts +5 -0
- package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts.map +1 -1
- package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.cjs +21 -19
- package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.d.cts +4 -4
- package/dist/components/TitleAlert/TitleAlert.d.cts.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.d.mts +4 -4
- package/dist/components/TitleAlert/TitleAlert.d.mts.map +1 -1
- package/dist/components/TitleAlert/TitleAlert.mjs +22 -20
- 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 +8 -8
- 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
|
@@ -4,40 +4,49 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { ButtonIconSize, FontWeight, IconColor, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
|
|
7
|
+
import { BoxAlignItems, BoxFlexDirection, ButtonIconSize, FontWeight, IconColor, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
|
|
8
8
|
import $React from "react";
|
|
9
9
|
const React = $importDefault($React);
|
|
10
|
-
import {
|
|
11
|
-
import { BoxRow } from "../BoxRow/index.mjs";
|
|
10
|
+
import { Box } from "../Box/index.mjs";
|
|
12
11
|
import { ButtonIcon } from "../ButtonIcon/index.mjs";
|
|
12
|
+
import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
13
13
|
export const KeyValueColumn = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps, keyLabel: keyContent, keyTextProps, valueStartAccessory, valueEndAccessory, valueEndButtonIconProps, value: valueContent, valueTextProps, twClassName, ...viewProps }) => {
|
|
14
14
|
const keyEndAccessoryNode = keyEndButtonIconProps?.iconName !== undefined &&
|
|
15
15
|
keyEndButtonIconProps.iconName !== null ? (<ButtonIcon size={ButtonIconSize.Sm} iconProps={{ color: IconColor.IconAlternative }} {...keyEndButtonIconProps} iconName={keyEndButtonIconProps.iconName}/>) : (keyEndAccessory);
|
|
16
16
|
const valueEndAccessoryNode = valueEndButtonIconProps?.iconName !== undefined &&
|
|
17
17
|
valueEndButtonIconProps.iconName !== null ? (<ButtonIcon size={ButtonIconSize.Sm} iconProps={{ color: IconColor.IconDefault }} {...valueEndButtonIconProps} iconName={valueEndButtonIconProps.iconName}/>) : (valueEndAccessory);
|
|
18
|
-
const keyBox = (<
|
|
18
|
+
const keyBox = (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} twClassName="w-full min-w-0">
|
|
19
|
+
{keyStartAccessory}
|
|
20
|
+
<TextOrChildren textProps={{
|
|
19
21
|
variant: TextVariant.BodyMd,
|
|
20
22
|
fontWeight: FontWeight.Medium,
|
|
21
23
|
color: TextColor.TextAlternative,
|
|
22
24
|
numberOfLines: 1,
|
|
23
25
|
ellipsizeMode: 'tail',
|
|
24
26
|
...keyTextProps,
|
|
25
|
-
}}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
}}>
|
|
28
|
+
{keyContent}
|
|
29
|
+
</TextOrChildren>
|
|
30
|
+
{keyEndAccessoryNode}
|
|
31
|
+
</Box>);
|
|
32
|
+
const valueBox = (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} twClassName="w-full min-w-0">
|
|
33
|
+
{valueStartAccessory}
|
|
34
|
+
<TextOrChildren textProps={{
|
|
29
35
|
variant: TextVariant.BodyMd,
|
|
30
36
|
fontWeight: FontWeight.Medium,
|
|
31
37
|
color: TextColor.TextDefault,
|
|
32
38
|
numberOfLines: 1,
|
|
33
39
|
ellipsizeMode: 'tail',
|
|
34
40
|
...valueTextProps,
|
|
35
|
-
}}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
}}>
|
|
42
|
+
{valueContent}
|
|
43
|
+
</TextOrChildren>
|
|
44
|
+
{valueEndAccessoryNode}
|
|
45
|
+
</Box>);
|
|
46
|
+
return (<Box flexDirection={BoxFlexDirection.Column} twClassName={twClassName} {...viewProps}>
|
|
39
47
|
{keyBox}
|
|
40
|
-
|
|
48
|
+
{valueBox}
|
|
49
|
+
</Box>);
|
|
41
50
|
};
|
|
42
51
|
KeyValueColumn.displayName = 'KeyValueColumn';
|
|
43
52
|
//# sourceMappingURL=KeyValueColumn.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueColumn.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"KeyValueColumn.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,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CAAC,gBAAgB,CAAC,MAAM,CAAC,CACvC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,MAAM,CACP;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n ButtonIconSize,\n FontWeight,\n IconColor,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { KeyValueColumnProps } from './KeyValueColumn.types';\n\nexport const KeyValueColumn = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n twClassName,\n ...viewProps\n}: KeyValueColumnProps) => {\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconAlternative }}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconDefault }}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName=\"w-full min-w-0\"\n >\n {keyStartAccessory}\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </TextOrChildren>\n {keyEndAccessoryNode}\n </Box>\n );\n\n const valueBox = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName=\"w-full min-w-0\"\n >\n {valueStartAccessory}\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n >\n {valueContent}\n </TextOrChildren>\n {valueEndAccessoryNode}\n </Box>\n );\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Column}\n twClassName={twClassName}\n {...viewProps}\n >\n {keyBox}\n {valueBox}\n </Box>\n );\n};\n\nKeyValueColumn.displayName = 'KeyValueColumn';\n"]}
|
|
@@ -8,8 +8,8 @@ const design_system_shared_1 = require("@metamask-previews/design-system-shared"
|
|
|
8
8
|
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
9
9
|
const react_1 = __importDefault(require("react"));
|
|
10
10
|
const Box_1 = require("../Box/index.cjs");
|
|
11
|
-
const BoxRow_1 = require("../BoxRow/index.cjs");
|
|
12
11
|
const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
|
|
12
|
+
const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
|
|
13
13
|
const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps, keyLabel: keyContent, keyTextProps, valueStartAccessory, valueEndAccessory, valueEndButtonIconProps, value: valueContent, valueTextProps, variant = design_system_shared_1.KeyValueRowVariant.Summary, twClassName, style, ...viewProps }) => {
|
|
14
14
|
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
15
15
|
const keyEndAccessoryNode = keyEndButtonIconProps?.iconName !== undefined &&
|
|
@@ -22,7 +22,9 @@ const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps
|
|
|
22
22
|
color: design_system_shared_1.IconColor.IconDefault,
|
|
23
23
|
...valueEndButtonIconProps.iconProps,
|
|
24
24
|
}}/>) : (valueEndAccessory);
|
|
25
|
-
const keyBox = (<
|
|
25
|
+
const keyBox = (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1}>
|
|
26
|
+
{keyStartAccessory}
|
|
27
|
+
<TextOrChildren_1.TextOrChildren textProps={{
|
|
26
28
|
variant: design_system_shared_1.TextVariant.BodyMd,
|
|
27
29
|
fontWeight: design_system_shared_1.FontWeight.Medium,
|
|
28
30
|
color: design_system_shared_1.TextColor.TextAlternative,
|
|
@@ -30,24 +32,31 @@ const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps
|
|
|
30
32
|
ellipsizeMode: 'tail',
|
|
31
33
|
...keyTextProps,
|
|
32
34
|
}}>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
{keyContent}
|
|
36
|
+
</TextOrChildren_1.TextOrChildren>
|
|
37
|
+
{keyEndAccessoryNode}
|
|
38
|
+
</Box_1.Box>);
|
|
39
|
+
const valueBox = (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} twClassName="flex-1 min-w-0 justify-end">
|
|
40
|
+
{valueStartAccessory}
|
|
41
|
+
<TextOrChildren_1.TextOrChildren textProps={{
|
|
36
42
|
variant: design_system_shared_1.TextVariant.BodyMd,
|
|
37
43
|
fontWeight: design_system_shared_1.FontWeight.Medium,
|
|
38
44
|
color: design_system_shared_1.TextColor.TextDefault,
|
|
39
45
|
numberOfLines: 1,
|
|
40
46
|
ellipsizeMode: 'tail',
|
|
41
47
|
...valueTextProps,
|
|
42
|
-
}}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
}}>
|
|
49
|
+
{valueContent}
|
|
50
|
+
</TextOrChildren_1.TextOrChildren>
|
|
51
|
+
{valueEndAccessoryNode}
|
|
52
|
+
</Box_1.Box>);
|
|
53
|
+
return (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={4} style={[
|
|
46
54
|
tw.style('px-4', variant === design_system_shared_1.KeyValueRowVariant.Input ? 'h-12' : 'h-10', twClassName),
|
|
47
55
|
style,
|
|
48
56
|
]} {...viewProps}>
|
|
49
57
|
<Box_1.Box twClassName="shrink-0">{keyBox}</Box_1.Box>
|
|
50
|
-
|
|
58
|
+
{valueBox}
|
|
59
|
+
</Box_1.Box>);
|
|
51
60
|
};
|
|
52
61
|
exports.KeyValueRow = KeyValueRow;
|
|
53
62
|
exports.KeyValueRow.displayName = 'KeyValueRow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueRow.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"KeyValueRow.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,kFASiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAE1B,0CAA6B;AAC7B,wDAA2C;AAC3C,gFAAmE;AAI5D,MAAM,WAAW,GAAG,CAAC,EAC1B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,EAAE,YAAY,EACnB,cAAc,EACd,OAAO,GAAG,yCAAkB,CAAC,OAAO,EACpC,WAAW,EACX,KAAK,EACL,GAAG,SAAS,EACK,EAAE,EAAE;IACrB,MAAM,EAAE,GAAG,IAA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SAAG,CACzC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AApHW,QAAA,WAAW,eAoHtB;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n ButtonIconSize,\n FontWeight,\n IconColor,\n KeyValueRowVariant,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { KeyValueRowProps } from './KeyValueRow.types';\n\nexport const KeyValueRow = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n variant = KeyValueRowVariant.Summary,\n twClassName,\n style,\n ...viewProps\n}: KeyValueRowProps) => {\n const tw = useTailwind();\n\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconAlternative,\n ...keyEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconDefault,\n ...valueEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n {keyStartAccessory}\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </TextOrChildren>\n {keyEndAccessoryNode}\n </Box>\n );\n\n const valueBox = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName=\"flex-1 min-w-0 justify-end\"\n >\n {valueStartAccessory}\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n >\n {valueContent}\n </TextOrChildren>\n {valueEndAccessoryNode}\n </Box>\n );\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={4}\n style={[\n tw.style(\n 'px-4',\n variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10',\n twClassName,\n ),\n style,\n ]}\n {...viewProps}\n >\n <Box twClassName=\"shrink-0\">{keyBox}</Box>\n {valueBox}\n </Box>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueRow.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeyValueRow.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW;yPAerB,gBAAgB;;CAqGlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueRow.d.mts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeyValueRow.d.mts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW;yPAerB,gBAAgB;;CAqGlB,CAAC"}
|
|
@@ -4,13 +4,13 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { ButtonIconSize, FontWeight, IconColor, KeyValueRowVariant, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
|
|
7
|
+
import { BoxAlignItems, BoxFlexDirection, ButtonIconSize, FontWeight, IconColor, KeyValueRowVariant, 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 { Box } from "../Box/index.mjs";
|
|
12
|
-
import { BoxRow } from "../BoxRow/index.mjs";
|
|
13
12
|
import { ButtonIcon } from "../ButtonIcon/index.mjs";
|
|
13
|
+
import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
14
14
|
export const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps, keyLabel: keyContent, keyTextProps, valueStartAccessory, valueEndAccessory, valueEndButtonIconProps, value: valueContent, valueTextProps, variant = KeyValueRowVariant.Summary, twClassName, style, ...viewProps }) => {
|
|
15
15
|
const tw = useTailwind();
|
|
16
16
|
const keyEndAccessoryNode = keyEndButtonIconProps?.iconName !== undefined &&
|
|
@@ -23,7 +23,9 @@ export const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIc
|
|
|
23
23
|
color: IconColor.IconDefault,
|
|
24
24
|
...valueEndButtonIconProps.iconProps,
|
|
25
25
|
}}/>) : (valueEndAccessory);
|
|
26
|
-
const keyBox = (<
|
|
26
|
+
const keyBox = (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1}>
|
|
27
|
+
{keyStartAccessory}
|
|
28
|
+
<TextOrChildren textProps={{
|
|
27
29
|
variant: TextVariant.BodyMd,
|
|
28
30
|
fontWeight: FontWeight.Medium,
|
|
29
31
|
color: TextColor.TextAlternative,
|
|
@@ -31,24 +33,31 @@ export const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIc
|
|
|
31
33
|
ellipsizeMode: 'tail',
|
|
32
34
|
...keyTextProps,
|
|
33
35
|
}}>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
{keyContent}
|
|
37
|
+
</TextOrChildren>
|
|
38
|
+
{keyEndAccessoryNode}
|
|
39
|
+
</Box>);
|
|
40
|
+
const valueBox = (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} twClassName="flex-1 min-w-0 justify-end">
|
|
41
|
+
{valueStartAccessory}
|
|
42
|
+
<TextOrChildren textProps={{
|
|
37
43
|
variant: TextVariant.BodyMd,
|
|
38
44
|
fontWeight: FontWeight.Medium,
|
|
39
45
|
color: TextColor.TextDefault,
|
|
40
46
|
numberOfLines: 1,
|
|
41
47
|
ellipsizeMode: 'tail',
|
|
42
48
|
...valueTextProps,
|
|
43
|
-
}}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
}}>
|
|
50
|
+
{valueContent}
|
|
51
|
+
</TextOrChildren>
|
|
52
|
+
{valueEndAccessoryNode}
|
|
53
|
+
</Box>);
|
|
54
|
+
return (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={4} style={[
|
|
47
55
|
tw.style('px-4', variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10', twClassName),
|
|
48
56
|
style,
|
|
49
57
|
]} {...viewProps}>
|
|
50
58
|
<Box twClassName="shrink-0">{keyBox}</Box>
|
|
51
|
-
|
|
59
|
+
{valueBox}
|
|
60
|
+
</Box>);
|
|
52
61
|
};
|
|
53
62
|
KeyValueRow.displayName = 'KeyValueRow';
|
|
54
63
|
//# sourceMappingURL=KeyValueRow.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueRow.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"KeyValueRow.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,EAAE,YAAY,EACnB,cAAc,EACd,OAAO,GAAG,kBAAkB,CAAC,OAAO,EACpC,WAAW,EACX,KAAK,EACL,GAAG,SAAS,EAC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CAAC,EAAE,GAAG,CACzC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n ButtonIconSize,\n FontWeight,\n IconColor,\n KeyValueRowVariant,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { KeyValueRowProps } from './KeyValueRow.types';\n\nexport const KeyValueRow = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n variant = KeyValueRowVariant.Summary,\n twClassName,\n style,\n ...viewProps\n}: KeyValueRowProps) => {\n const tw = useTailwind();\n\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconAlternative,\n ...keyEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconDefault,\n ...valueEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n {keyStartAccessory}\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </TextOrChildren>\n {keyEndAccessoryNode}\n </Box>\n );\n\n const valueBox = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName=\"flex-1 min-w-0 justify-end\"\n >\n {valueStartAccessory}\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n >\n {valueContent}\n </TextOrChildren>\n {valueEndAccessoryNode}\n </Box>\n );\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={4}\n style={[\n tw.style(\n 'px-4',\n variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10',\n twClassName,\n ),\n style,\n ]}\n {...viewProps}\n >\n <Box twClassName=\"shrink-0\">{keyBox}</Box>\n {valueBox}\n </Box>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\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.KeyValueSelect = void 0;
|
|
27
37
|
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueSelect.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueSelect/KeyValueSelect.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"KeyValueSelect.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueSelect/KeyValueSelect.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAIiD;AACjD,8FAA4E;AAC5E,+CAA0C;AAC1C,+CAAyC;AAQzC,0DAA6C;AAC7C,4DAA+C;AAI/C,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAEpC,yFAAyF;AACzF,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAE9B,QAAA,cAAc,GAAG,IAAA,kBAAU,EACtC,CACE,EACE,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,OAAO,EACP,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,GAAG,cAAc,EAClB,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW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,CAAC,iBAAiB,IAAI,QAAQ,CAAC,CACjD,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,KAAK,CAAC,CAAC,iBAAiB,CAAC,CACzB,IAAI,cAAc,CAAC,CAEnB;QAAA,CAAC,yBAAW,CACV,IAAI,oBAAoB,CAAC,CACzB,WAAW,CAAC,CAAC,8BAA8B,CAAC,CAC5C,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,CAC7C,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,iBAAiB,EAAE,CAAC,EAE/B;MAAA,EAAE,wBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import {\n mergeTwClassName,\n SelectButtonSize,\n SelectButtonVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport { Pressable } from 'react-native';\nimport type {\n PressableStateCallbackType,\n StyleProp,\n View,\n ViewStyle,\n} from 'react-native';\n\nimport { KeyValueRow } from '../KeyValueRow';\nimport { SelectButton } from '../SelectButton';\n\nimport type { KeyValueSelectProps } from './KeyValueSelect.types';\n\nconst ROOT_TW_CLASS_NAME = 'w-full';\n\n/** Overrides KeyValueRow `pr-4` so SelectButton's `pr-3` keeps a 16px trailing inset. */\nconst KEY_VALUE_ROW_TW_CLASS_NAME = 'pr-1';\n\nexport const KeyValueSelect = forwardRef<View, KeyValueSelectProps>(\n (\n {\n keyLabel,\n keyStartAccessory,\n keyEndAccessory,\n keyTextProps,\n keyEndButtonIconProps,\n variant,\n value,\n valueStartAccessory,\n valueEndAccessory,\n valueTextProps,\n selectButtonProps,\n keyValueRowProps,\n isDisabled = false,\n twClassName,\n style,\n accessibilityRole,\n ...pressableProps\n },\n ref,\n ) => {\n const tw = useTailwind();\n const rootTwClassName = mergeTwClassName(ROOT_TW_CLASS_NAME, twClassName);\n const { twClassName: keyValueRowTwClassName, ...restKeyValueRowProps } =\n keyValueRowProps ?? {};\n const resolvedKeyValueRowTwClassName = mergeTwClassName(\n KEY_VALUE_ROW_TW_CLASS_NAME,\n keyValueRowTwClassName,\n );\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 =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return [baseStyle, userStyle];\n };\n\n const renderSelectValue = () => (\n <SelectButton\n {...selectButtonProps}\n value={value}\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessory}\n textProps={valueTextProps}\n variant={SelectButtonVariant.Secondary}\n isDisabled={isDisabled}\n size={SelectButtonSize.Md}\n pointerEvents=\"none\"\n accessible={false}\n />\n );\n\n return (\n <Pressable\n ref={ref}\n accessibilityRole={accessibilityRole ?? 'button'}\n disabled={isDisabled}\n style={getPressableStyle}\n {...pressableProps}\n >\n <KeyValueRow\n {...restKeyValueRowProps}\n twClassName={resolvedKeyValueRowTwClassName}\n keyLabel={keyLabel}\n keyStartAccessory={keyStartAccessory}\n keyEndAccessory={keyEndAccessory}\n keyTextProps={keyTextProps}\n keyEndButtonIconProps={keyEndButtonIconProps}\n variant={variant}\n value={renderSelectValue()}\n />\n </Pressable>\n );\n },\n);\n\nKeyValueSelect.displayName = 'KeyValueSelect';\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { View } from "react-native";
|
|
3
3
|
export declare const KeyValueSelect: React.ForwardRefExoticComponent<Omit<import("@metamask-previews/design-system-shared").KeyValueSelectPropsShared, "selectButtonProps"> & Omit<import("react-native").PressableProps, "children" | "disabled"> & {
|
|
4
|
-
keyTextProps?: Partial<Omit<import("../index.cjs").TextProps, "children"
|
|
5
|
-
keyEndButtonIconProps?: Partial<import("../index.cjs").ButtonIconProps
|
|
6
|
-
valueTextProps?: Partial<Omit<import("../index.cjs").TextProps, "children"
|
|
4
|
+
keyTextProps?: Partial<Omit<import("../index.cjs").TextProps, "children">>;
|
|
5
|
+
keyEndButtonIconProps?: Partial<import("../index.cjs").ButtonIconProps>;
|
|
6
|
+
valueTextProps?: Partial<Omit<import("../index.cjs").TextProps, "children">>;
|
|
7
7
|
selectButtonProps: import("./KeyValueSelect.types.cjs").KeyValueSelectSelectButtonProps;
|
|
8
|
-
keyValueRowProps?: import("./KeyValueSelect.types.cjs").KeyValueSelectKeyValueRowProps
|
|
9
|
-
twClassName?: string
|
|
8
|
+
keyValueRowProps?: import("./KeyValueSelect.types.cjs").KeyValueSelectKeyValueRowProps;
|
|
9
|
+
twClassName?: string;
|
|
10
10
|
} & React.RefAttributes<View>>;
|
|
11
11
|
//# sourceMappingURL=KeyValueSelect.d.cts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { View } from "react-native";
|
|
3
3
|
export declare const KeyValueSelect: React.ForwardRefExoticComponent<Omit<import("@metamask-previews/design-system-shared").KeyValueSelectPropsShared, "selectButtonProps"> & Omit<import("react-native").PressableProps, "children" | "disabled"> & {
|
|
4
|
-
keyTextProps?: Partial<Omit<import("../index.mjs").TextProps, "children"
|
|
5
|
-
keyEndButtonIconProps?: Partial<import("../index.mjs").ButtonIconProps
|
|
6
|
-
valueTextProps?: Partial<Omit<import("../index.mjs").TextProps, "children"
|
|
4
|
+
keyTextProps?: Partial<Omit<import("../index.mjs").TextProps, "children">>;
|
|
5
|
+
keyEndButtonIconProps?: Partial<import("../index.mjs").ButtonIconProps>;
|
|
6
|
+
valueTextProps?: Partial<Omit<import("../index.mjs").TextProps, "children">>;
|
|
7
7
|
selectButtonProps: import("./KeyValueSelect.types.mjs").KeyValueSelectSelectButtonProps;
|
|
8
|
-
keyValueRowProps?: import("./KeyValueSelect.types.mjs").KeyValueSelectKeyValueRowProps
|
|
9
|
-
twClassName?: string
|
|
8
|
+
keyValueRowProps?: import("./KeyValueSelect.types.mjs").KeyValueSelectKeyValueRowProps;
|
|
9
|
+
twClassName?: string;
|
|
10
10
|
} & React.RefAttributes<View>>;
|
|
11
11
|
//# sourceMappingURL=KeyValueSelect.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeyValueSelect.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueSelect/KeyValueSelect.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAC1C,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAQzC,OAAO,EAAE,WAAW,EAAE,iCAAuB;AAC7C,OAAO,EAAE,YAAY,EAAE,kCAAwB;AAI/C,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAEpC,yFAAyF;AACzF,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,CACE,EACE,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,OAAO,EACP,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,GAAG,cAAc,EAClB,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,eAAe,GAAG,gBAAgB,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;IAC1E,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,GAAG,oBAAoB,EAAE,GACpE,gBAAgB,IAAI,EAAE,CAAC;IACzB,MAAM,8BAA8B,GAAG,gBAAgB,CACrD,2BAA2B,EAC3B,sBAAsB,CACvB,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,EACzB,OAAO,GACoB,EAAwB,EAAE;QACrD,MAAM,SAAS,GAAG,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,OAAO,IAAI,YAAY,CAAC,CAAC;QAErE,IAAI,CAAC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"KeyValueSelect.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueSelect/KeyValueSelect.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACpB,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAC1C,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAQzC,OAAO,EAAE,WAAW,EAAE,iCAAuB;AAC7C,OAAO,EAAE,YAAY,EAAE,kCAAwB;AAI/C,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAEpC,yFAAyF;AACzF,MAAM,2BAA2B,GAAG,MAAM,CAAC;AAE3C,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,CACE,EACE,QAAQ,EACR,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,qBAAqB,EACrB,OAAO,EACP,KAAK,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,KAAK,EACL,iBAAiB,EACjB,GAAG,cAAc,EAClB,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,eAAe,GAAG,gBAAgB,CAAC,k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AAC,CACrB,KAAK,CAAC,CAAC,iBAAiB,CAAC,CACzB,IAAI,cAAc,CAAC,CAEnB;QAAA,CAAC,WAAW,CACV,IAAI,oBAAoB,CAAC,CACzB,WAAW,CAAC,CAAC,8BAA8B,CAAC,CAC5C,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,qBAAqB,CAAC,CAAC,qBAAqB,CAAC,CAC7C,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,KAAK,CAAC,CAAC,iBAAiB,EAAE,CAAC,EAE/B;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import {\n mergeTwClassName,\n SelectButtonSize,\n SelectButtonVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport { Pressable } from 'react-native';\nimport type {\n PressableStateCallbackType,\n StyleProp,\n View,\n ViewStyle,\n} from 'react-native';\n\nimport { KeyValueRow } from '../KeyValueRow';\nimport { SelectButton } from '../SelectButton';\n\nimport type { KeyValueSelectProps } from './KeyValueSelect.types';\n\nconst ROOT_TW_CLASS_NAME = 'w-full';\n\n/** Overrides KeyValueRow `pr-4` so SelectButton's `pr-3` keeps a 16px trailing inset. */\nconst KEY_VALUE_ROW_TW_CLASS_NAME = 'pr-1';\n\nexport const KeyValueSelect = forwardRef<View, KeyValueSelectProps>(\n (\n {\n keyLabel,\n keyStartAccessory,\n keyEndAccessory,\n keyTextProps,\n keyEndButtonIconProps,\n variant,\n value,\n valueStartAccessory,\n valueEndAccessory,\n valueTextProps,\n selectButtonProps,\n keyValueRowProps,\n isDisabled = false,\n twClassName,\n style,\n accessibilityRole,\n ...pressableProps\n },\n ref,\n ) => {\n const tw = useTailwind();\n const rootTwClassName = mergeTwClassName(ROOT_TW_CLASS_NAME, twClassName);\n const { twClassName: keyValueRowTwClassName, ...restKeyValueRowProps } =\n keyValueRowProps ?? {};\n const resolvedKeyValueRowTwClassName = mergeTwClassName(\n KEY_VALUE_ROW_TW_CLASS_NAME,\n keyValueRowTwClassName,\n );\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 =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return [baseStyle, userStyle];\n };\n\n const renderSelectValue = () => (\n <SelectButton\n {...selectButtonProps}\n value={value}\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessory}\n textProps={valueTextProps}\n variant={SelectButtonVariant.Secondary}\n isDisabled={isDisabled}\n size={SelectButtonSize.Md}\n pointerEvents=\"none\"\n accessible={false}\n />\n );\n\n return (\n <Pressable\n ref={ref}\n accessibilityRole={accessibilityRole ?? 'button'}\n disabled={isDisabled}\n style={getPressableStyle}\n {...pressableProps}\n >\n <KeyValueRow\n {...restKeyValueRowProps}\n twClassName={resolvedKeyValueRowTwClassName}\n keyLabel={keyLabel}\n keyStartAccessory={keyStartAccessory}\n keyEndAccessory={keyEndAccessory}\n keyTextProps={keyTextProps}\n keyEndButtonIconProps={keyEndButtonIconProps}\n variant={variant}\n value={renderSelectValue()}\n />\n </Pressable>\n );\n },\n);\n\nKeyValueSelect.displayName = 'KeyValueSelect';\n"]}
|
|
@@ -9,7 +9,6 @@ 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 Content_1 = require("../Content/index.cjs");
|
|
14
13
|
const ListItem = ({ children, isInteractive = false, twClassName, style, startAccessory, endAccessory, accessoryGap = 0, variant = design_system_shared_1.ContentVariant.TwoLines, avatar, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, accessibilityRole, ...props }) => {
|
|
15
14
|
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
@@ -39,9 +38,11 @@ const ListItem = ({ children, isInteractive = false, twClassName, style, startAc
|
|
|
39
38
|
};
|
|
40
39
|
const hasRowAccessories = Boolean(startAccessory) || Boolean(endAccessory);
|
|
41
40
|
const content = (<Content_1.Content twClassName={hasRowAccessories ? 'flex-1 min-w-0' : undefined} variant={variant} avatar={avatar} title={title} titleProps={titleProps} titleStartAccessory={titleStartAccessory} titleEndAccessory={titleEndAccessory} description={description} descriptionProps={descriptionProps} descriptionStartAccessory={descriptionStartAccessory} descriptionEndAccessory={descriptionEndAccessory} value={value} valueProps={valueProps} valueStartAccessory={valueStartAccessory} valueEndAccessory={valueEndAccessory} subvalue={subvalue} subvalueProps={subvalueProps} subvalueStartAccessory={subvalueStartAccessory} subvalueEndAccessory={subvalueEndAccessory}/>);
|
|
42
|
-
const listContent = hasRowAccessories ? (<
|
|
41
|
+
const listContent = hasRowAccessories ? (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={accessoryAlignItems} gap={accessoryGap}>
|
|
42
|
+
{startAccessory}
|
|
43
43
|
{content}
|
|
44
|
-
|
|
44
|
+
{endAccessory}
|
|
45
|
+
</Box_1.Box>) : (content);
|
|
45
46
|
if (isInteractive) {
|
|
46
47
|
return (<react_native_1.Pressable accessibilityRole={accessibilityRole ?? 'button'} style={getPressableStyle} {...props}>
|
|
47
48
|
{listContent}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ListItem.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAKiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAyC;AAOzC,0CAA6B;AAC7B,kDAAqC;AAI9B,MAAM,QAAQ,GAA4B,CAAC,EAChD,QAAQ,EACR,aAAa,GAAG,KAAK,EACrB,WAAW,EACX,KAAK,EACL,cAAc,EACd,YAAY,EACZ,YAAY,GAAG,CAAC,EAChB,OAAO,GAAG,qCAAc,CAAC,QAAQ,EACjC,MAAM,EACN,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,WAAW,GAAG,OAAO,KAAK,qCAAc,CAAC,SAAS,CAAC;IACzD,IAAI,iBAAiB,GAAG,6BAA6B,CAAC;IACtD,IAAI,OAAO,KAAK,qCAAc,CAAC,OAAO,EAAE,CAAC;QACvC,iBAAiB,GAAG,6BAA6B,CAAC;IACpD,CAAC;SAAM,IAAI,WAAW,EAAE,CAAC;QACvB,iBAAiB,GAAG,4BAA4B,CAAC;IACnD,CAAC;IACD,MAAM,mBAAmB,GAAG,WAAW;QACrC,CAAC,CAAC,oCAAa,CAAC,KAAK;QACrB,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC;IAEzB,MAAM,iBAAiB,GAAG,IAAA,uCAAgB,EACxC,kBAAkB,EAClB,iBAAiB,CAClB,CAAC;IACF,MAAM,eAAe,G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","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":"ListItem.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,cAAc;AAW1B,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA4H5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItem.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,cAAc;AAW1B,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA4H5C,CAAC"}
|
|
@@ -4,13 +4,12 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { BoxAlignItems, ContentVariant, mergeTwClassName } from "@metamask-previews/design-system-shared";
|
|
7
|
+
import { BoxAlignItems, BoxFlexDirection, ContentVariant, mergeTwClassName } 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 { Content } from "../Content/index.mjs";
|
|
15
14
|
export const ListItem = ({ children, isInteractive = false, twClassName, style, startAccessory, endAccessory, accessoryGap = 0, variant = ContentVariant.TwoLines, avatar, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, accessibilityRole, ...props }) => {
|
|
16
15
|
const tw = useTailwind();
|
|
@@ -40,9 +39,11 @@ export const ListItem = ({ children, isInteractive = false, twClassName, style,
|
|
|
40
39
|
};
|
|
41
40
|
const hasRowAccessories = Boolean(startAccessory) || Boolean(endAccessory);
|
|
42
41
|
const content = (<Content twClassName={hasRowAccessories ? 'flex-1 min-w-0' : undefined} variant={variant} avatar={avatar} title={title} titleProps={titleProps} titleStartAccessory={titleStartAccessory} titleEndAccessory={titleEndAccessory} description={description} descriptionProps={descriptionProps} descriptionStartAccessory={descriptionStartAccessory} descriptionEndAccessory={descriptionEndAccessory} value={value} valueProps={valueProps} valueStartAccessory={valueStartAccessory} valueEndAccessory={valueEndAccessory} subvalue={subvalue} subvalueProps={subvalueProps} subvalueStartAccessory={subvalueStartAccessory} subvalueEndAccessory={subvalueEndAccessory}/>);
|
|
43
|
-
const listContent = hasRowAccessories ? (<
|
|
42
|
+
const listContent = hasRowAccessories ? (<Box flexDirection={BoxFlexDirection.Row} alignItems={accessoryAlignItems} gap={accessoryGap}>
|
|
43
|
+
{startAccessory}
|
|
44
44
|
{content}
|
|
45
|
-
|
|
45
|
+
{endAccessory}
|
|
46
|
+
</Box>) : (content);
|
|
46
47
|
if (isInteractive) {
|
|
47
48
|
return (<Pressable accessibilityRole={accessibilityRole ?? 'button'} style={getPressableStyle} {...props}>
|
|
48
49
|
{listContent}
|
|
@@ -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,yBA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B,aAAa,CAAC,CAAC,aAAa,CAAC,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"]}
|