@metamask-previews/design-system-react-native 0.27.0-preview.f5c2542 → 0.30.0-preview.0a4d6f8
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 +51 -1
- package/dist/components/AvatarBase/AvatarBase.cjs +2 -2
- package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.d.cts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.d.mts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs +3 -3
- package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -2
- 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 +2 -2
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +2 -2
- package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +2 -2
- package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs +3 -4
- 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 +3 -4
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarNetwork/index.cjs +2 -2
- package/dist/components/AvatarNetwork/index.cjs.map +1 -1
- package/dist/components/AvatarNetwork/index.d.cts +1 -1
- package/dist/components/AvatarNetwork/index.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/index.d.mts +1 -1
- package/dist/components/AvatarNetwork/index.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/index.mjs +1 -1
- package/dist/components/AvatarNetwork/index.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +2 -2
- 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 +2 -2
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.cjs +1 -1
- package/dist/components/BadgeCount/BadgeCount.cjs.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/BadgeCount/BadgeCount.mjs +2 -2
- package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.cjs +1 -1
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.mjs +2 -2
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +10 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +10 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.cjs +5 -3
- package/dist/components/ButtonBase/ButtonBase.cjs.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 +6 -4
- package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
- package/dist/components/Content/Content.cjs +4 -10
- 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 +5 -11
- package/dist/components/Content/Content.mjs.map +1 -1
- package/dist/components/Content/Content.types.cjs.map +1 -1
- package/dist/components/Content/Content.types.d.cts +1 -1
- package/dist/components/Content/Content.types.d.mts +1 -1
- package/dist/components/Content/Content.types.mjs.map +1 -1
- package/dist/components/{SegmentButton/SegmentButton.cjs → FilterButton/FilterButton.cjs} +19 -17
- package/dist/components/FilterButton/FilterButton.cjs.map +1 -0
- package/dist/components/FilterButton/FilterButton.d.cts +7 -0
- package/dist/components/FilterButton/FilterButton.d.cts.map +1 -0
- package/dist/components/FilterButton/FilterButton.d.mts +7 -0
- package/dist/components/FilterButton/FilterButton.d.mts.map +1 -0
- package/dist/components/{SegmentButton/SegmentButton.mjs → FilterButton/FilterButton.mjs} +18 -16
- package/dist/components/FilterButton/FilterButton.mjs.map +1 -0
- package/dist/components/{SegmentGroup/SegmentGroup.types.cjs → FilterButton/FilterButton.types.cjs} +1 -1
- package/dist/components/FilterButton/FilterButton.types.cjs.map +1 -0
- package/dist/components/FilterButton/FilterButton.types.d.cts +9 -0
- package/dist/components/FilterButton/FilterButton.types.d.cts.map +1 -0
- package/dist/components/FilterButton/FilterButton.types.d.mts +9 -0
- package/dist/components/FilterButton/FilterButton.types.d.mts.map +1 -0
- package/dist/components/FilterButton/FilterButton.types.mjs +2 -0
- package/dist/components/FilterButton/FilterButton.types.mjs.map +1 -0
- package/dist/components/FilterButton/index.cjs +8 -0
- package/dist/components/FilterButton/index.cjs.map +1 -0
- package/dist/components/FilterButton/index.d.cts +4 -0
- package/dist/components/FilterButton/index.d.cts.map +1 -0
- package/dist/components/FilterButton/index.d.mts +4 -0
- package/dist/components/FilterButton/index.d.mts.map +1 -0
- package/dist/components/FilterButton/index.mjs +3 -0
- package/dist/components/FilterButton/index.mjs.map +1 -0
- package/dist/components/{SegmentGroup/SegmentGroup.cjs → FilterButtonGroup/FilterButtonGroup.cjs} +7 -7
- package/dist/components/FilterButtonGroup/FilterButtonGroup.cjs.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.d.cts +7 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.d.cts.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.d.mts +7 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.d.mts.map +1 -0
- package/dist/components/{SegmentGroup/SegmentGroup.mjs → FilterButtonGroup/FilterButtonGroup.mjs} +6 -6
- package/dist/components/FilterButtonGroup/FilterButtonGroup.mjs.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.cjs +3 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.cjs.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.cts +12 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.cts.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.mts +12 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.mts.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.mjs +2 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.mjs.map +1 -0
- package/dist/components/FilterButtonGroup/index.cjs +6 -0
- package/dist/components/FilterButtonGroup/index.cjs.map +1 -0
- package/dist/components/FilterButtonGroup/index.d.cts +3 -0
- package/dist/components/FilterButtonGroup/index.d.cts.map +1 -0
- package/dist/components/FilterButtonGroup/index.d.mts +3 -0
- package/dist/components/FilterButtonGroup/index.d.mts.map +1 -0
- package/dist/components/FilterButtonGroup/index.mjs +2 -0
- package/dist/components/FilterButtonGroup/index.mjs.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.cjs +2 -1
- 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 +2 -1
- package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.cjs +2 -1
- package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.d.cts.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.d.mts.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.mjs +2 -1
- package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
- package/dist/components/HeaderSubpage/HeaderSubpage.cjs +90 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.cjs.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.d.cts +4 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.d.cts.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.d.mts +4 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.d.mts.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.mjs +70 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.mjs.map +1 -0
- package/dist/components/{SegmentButton/SegmentButton.types.cjs → HeaderSubpage/HeaderSubpage.types.cjs} +1 -1
- package/dist/components/HeaderSubpage/HeaderSubpage.types.cjs.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.d.cts +59 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.d.cts.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.d.mts +59 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.d.mts.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.mjs +2 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.mjs.map +1 -0
- package/dist/components/HeaderSubpage/index.cjs +6 -0
- package/dist/components/HeaderSubpage/index.cjs.map +1 -0
- package/dist/components/HeaderSubpage/index.d.cts +3 -0
- package/dist/components/HeaderSubpage/index.d.cts.map +1 -0
- package/dist/components/HeaderSubpage/index.d.mts +3 -0
- package/dist/components/HeaderSubpage/index.d.mts.map +1 -0
- package/dist/components/HeaderSubpage/index.mjs +2 -0
- package/dist/components/HeaderSubpage/index.mjs.map +1 -0
- package/dist/components/Icon/Icon.assets.cjs +2 -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 +2 -0
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/Icon.constants.cjs +6 -6
- package/dist/components/Icon/Icon.constants.cjs.map +1 -1
- package/dist/components/Icon/Icon.constants.d.cts +1 -1
- package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
- package/dist/components/Icon/Icon.constants.d.mts +1 -1
- package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
- package/dist/components/Icon/Icon.constants.mjs +1 -1
- package/dist/components/Icon/Icon.constants.mjs.map +1 -1
- package/dist/components/Icon/assets/trophy.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/KeyValueColumn/KeyValueColumn.cjs +2 -3
- 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 +1 -2
- package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
- package/dist/components/KeyValueRow/KeyValueRow.cjs +2 -3
- 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 +1 -2
- package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
- package/dist/components/ListItem/ListItem.cjs +34 -48
- 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 +34 -28
- package/dist/components/ListItem/ListItem.mjs.map +1 -1
- package/dist/components/ListItem/ListItem.types.cjs +0 -9
- package/dist/components/ListItem/ListItem.types.cjs.map +1 -1
- package/dist/components/ListItem/ListItem.types.d.cts +14 -55
- package/dist/components/ListItem/ListItem.types.d.cts.map +1 -1
- package/dist/components/ListItem/ListItem.types.d.mts +14 -55
- package/dist/components/ListItem/ListItem.types.d.mts.map +1 -1
- package/dist/components/ListItem/ListItem.types.mjs +1 -8
- package/dist/components/ListItem/ListItem.types.mjs.map +1 -1
- package/dist/components/ListItem/index.cjs +3 -3
- package/dist/components/ListItem/index.cjs.map +1 -1
- package/dist/components/ListItem/index.d.cts +1 -1
- package/dist/components/ListItem/index.d.cts.map +1 -1
- package/dist/components/ListItem/index.d.mts +1 -1
- package/dist/components/ListItem/index.d.mts.map +1 -1
- package/dist/components/ListItem/index.mjs +1 -1
- package/dist/components/ListItem/index.mjs.map +1 -1
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.cjs +20 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.cjs.map +1 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.d.cts +7 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.d.cts.map +1 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.d.mts +7 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.d.mts.map +1 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.mjs +20 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.mjs.map +1 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.cjs +3 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.cjs.map +1 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.d.cts +14 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.d.cts.map +1 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.d.mts +14 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.d.mts.map +1 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.mjs +2 -0
- package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.mjs.map +1 -0
- package/dist/components/ListItemMultiSelect/index.cjs +6 -0
- package/dist/components/ListItemMultiSelect/index.cjs.map +1 -0
- package/dist/components/ListItemMultiSelect/index.d.cts +3 -0
- package/dist/components/ListItemMultiSelect/index.d.cts.map +1 -0
- package/dist/components/ListItemMultiSelect/index.d.mts +3 -0
- package/dist/components/ListItemMultiSelect/index.d.mts.map +1 -0
- package/dist/components/ListItemMultiSelect/index.mjs +2 -0
- package/dist/components/ListItemMultiSelect/index.mjs.map +1 -0
- package/dist/components/ListItemSelect/ListItemSelect.cjs +21 -0
- package/dist/components/ListItemSelect/ListItemSelect.cjs.map +1 -0
- package/dist/components/ListItemSelect/ListItemSelect.d.cts +7 -0
- package/dist/components/ListItemSelect/ListItemSelect.d.cts.map +1 -0
- package/dist/components/ListItemSelect/ListItemSelect.d.mts +7 -0
- package/dist/components/ListItemSelect/ListItemSelect.d.mts.map +1 -0
- package/dist/components/ListItemSelect/ListItemSelect.mjs +21 -0
- package/dist/components/ListItemSelect/ListItemSelect.mjs.map +1 -0
- package/dist/components/ListItemSelect/ListItemSelect.types.cjs +3 -0
- package/dist/components/ListItemSelect/ListItemSelect.types.cjs.map +1 -0
- package/dist/components/ListItemSelect/ListItemSelect.types.d.cts +18 -0
- package/dist/components/ListItemSelect/ListItemSelect.types.d.cts.map +1 -0
- package/dist/components/ListItemSelect/ListItemSelect.types.d.mts +18 -0
- package/dist/components/ListItemSelect/ListItemSelect.types.d.mts.map +1 -0
- package/dist/components/ListItemSelect/ListItemSelect.types.mjs +2 -0
- package/dist/components/ListItemSelect/ListItemSelect.types.mjs.map +1 -0
- package/dist/components/ListItemSelect/index.cjs +6 -0
- package/dist/components/ListItemSelect/index.cjs.map +1 -0
- package/dist/components/ListItemSelect/index.d.cts +3 -0
- package/dist/components/ListItemSelect/index.d.cts.map +1 -0
- package/dist/components/ListItemSelect/index.d.mts +3 -0
- package/dist/components/ListItemSelect/index.d.mts.map +1 -0
- package/dist/components/ListItemSelect/index.mjs +2 -0
- package/dist/components/ListItemSelect/index.mjs.map +1 -0
- package/dist/components/SectionHeader/SectionHeader.cjs +47 -24
- package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.cts +16 -13
- package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.mts +16 -13
- package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.mjs +48 -25
- 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 +16 -9
- package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.types.d.mts +16 -9
- 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 +50 -0
- package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.constants.cjs +12 -0
- package/dist/components/SegmentedControl/SegmentedControl.constants.cjs.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.constants.d.cts +4 -0
- package/dist/components/SegmentedControl/SegmentedControl.constants.d.cts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.constants.d.mts +4 -0
- package/dist/components/SegmentedControl/SegmentedControl.constants.d.mts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.constants.mjs +8 -0
- package/dist/components/SegmentedControl/SegmentedControl.constants.mjs.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.cts +7 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.cts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.mts +7 -0
- package/dist/components/SegmentedControl/SegmentedControl.d.mts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.mjs +30 -0
- package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.cjs +3 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.cjs.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.d.cts +12 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.d.cts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.d.mts +12 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.d.mts.map +1 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.mjs +2 -0
- package/dist/components/SegmentedControl/SegmentedControl.types.mjs.map +1 -0
- package/dist/components/SegmentedControl/index.cjs +6 -0
- package/dist/components/SegmentedControl/index.cjs.map +1 -0
- package/dist/components/SegmentedControl/index.d.cts +3 -0
- package/dist/components/SegmentedControl/index.d.cts.map +1 -0
- package/dist/components/SegmentedControl/index.d.mts +3 -0
- package/dist/components/SegmentedControl/index.d.mts.map +1 -0
- package/dist/components/SegmentedControl/index.mjs +2 -0
- package/dist/components/SegmentedControl/index.mjs.map +1 -0
- package/dist/components/SelectButton/SelectButton.constants.cjs +4 -5
- package/dist/components/SelectButton/SelectButton.constants.cjs.map +1 -1
- package/dist/components/SelectButton/SelectButton.constants.d.cts +1 -2
- package/dist/components/SelectButton/SelectButton.constants.d.cts.map +1 -1
- package/dist/components/SelectButton/SelectButton.constants.d.mts +1 -2
- package/dist/components/SelectButton/SelectButton.constants.d.mts.map +1 -1
- package/dist/components/SelectButton/SelectButton.constants.mjs +1 -2
- package/dist/components/SelectButton/SelectButton.constants.mjs.map +1 -1
- package/dist/components/Switch/Switch.cjs +28 -0
- package/dist/components/Switch/Switch.cjs.map +1 -0
- package/dist/components/Switch/Switch.d.cts +4 -0
- package/dist/components/Switch/Switch.d.cts.map +1 -0
- package/dist/components/Switch/Switch.d.mts +4 -0
- package/dist/components/Switch/Switch.d.mts.map +1 -0
- package/dist/components/Switch/Switch.mjs +28 -0
- package/dist/components/Switch/Switch.mjs.map +1 -0
- package/dist/components/Switch/Switch.types.cjs +3 -0
- package/dist/components/Switch/Switch.types.cjs.map +1 -0
- package/dist/components/Switch/Switch.types.d.cts +14 -0
- package/dist/components/Switch/Switch.types.d.cts.map +1 -0
- package/dist/components/Switch/Switch.types.d.mts +14 -0
- package/dist/components/Switch/Switch.types.d.mts.map +1 -0
- package/dist/components/Switch/Switch.types.mjs +2 -0
- package/dist/components/Switch/Switch.types.mjs.map +1 -0
- package/dist/components/Switch/index.cjs +6 -0
- package/dist/components/Switch/index.cjs.map +1 -0
- package/dist/components/Switch/index.d.cts +3 -0
- package/dist/components/Switch/index.d.cts.map +1 -0
- package/dist/components/Switch/index.d.mts +3 -0
- package/dist/components/Switch/index.d.mts.map +1 -0
- package/dist/components/Switch/index.mjs +2 -0
- package/dist/components/Switch/index.mjs.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.cjs +2 -1
- package/dist/components/TabEmptyState/TabEmptyState.cjs.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/TabEmptyState/TabEmptyState.mjs +2 -1
- package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -1
- package/dist/components/Tag/Tag.cjs +1 -1
- package/dist/components/Tag/Tag.cjs.map +1 -1
- package/dist/components/Tag/Tag.constants.cjs +3 -3
- package/dist/components/Tag/Tag.constants.cjs.map +1 -1
- package/dist/components/Tag/Tag.constants.mjs +3 -3
- package/dist/components/Tag/Tag.constants.mjs.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 +1 -1
- package/dist/components/Tag/Tag.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.cjs +3 -7
- package/dist/components/TextArea/TextArea.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.d.cts +158 -163
- package/dist/components/TextArea/TextArea.d.cts.map +1 -1
- package/dist/components/TextArea/TextArea.d.mts +158 -163
- package/dist/components/TextArea/TextArea.d.mts.map +1 -1
- package/dist/components/TextArea/TextArea.mjs +4 -8
- package/dist/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/components/TextArea/TextArea.types.cjs.map +1 -1
- package/dist/components/TextArea/TextArea.types.d.cts +12 -45
- package/dist/components/TextArea/TextArea.types.d.cts.map +1 -1
- package/dist/components/TextArea/TextArea.types.d.mts +12 -45
- package/dist/components/TextArea/TextArea.types.d.mts.map +1 -1
- package/dist/components/TextArea/TextArea.types.mjs.map +1 -1
- package/dist/components/TextButton/TextButton.types.cjs.map +1 -1
- package/dist/components/TextButton/TextButton.types.d.cts +2 -5
- package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
- package/dist/components/TextButton/TextButton.types.d.mts +2 -5
- package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
- package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
- package/dist/components/TextField/TextField.cjs +2 -1
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.cts.map +1 -1
- package/dist/components/TextField/TextField.d.mts.map +1 -1
- package/dist/components/TextField/TextField.mjs +2 -1
- package/dist/components/TextField/TextField.mjs.map +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.cjs.map +1 -1
- package/dist/components/Toast/Toast.constants.cjs +5 -8
- package/dist/components/Toast/Toast.constants.cjs.map +1 -1
- package/dist/components/Toast/Toast.constants.d.cts +2 -7
- package/dist/components/Toast/Toast.constants.d.cts.map +1 -1
- package/dist/components/Toast/Toast.constants.d.mts +2 -7
- package/dist/components/Toast/Toast.constants.d.mts.map +1 -1
- package/dist/components/Toast/Toast.constants.mjs +2 -7
- package/dist/components/Toast/Toast.constants.mjs.map +1 -1
- package/dist/components/Toast/Toast.d.cts.map +1 -1
- package/dist/components/Toast/Toast.d.mts.map +1 -1
- package/dist/components/Toast/Toast.mjs +2 -2
- package/dist/components/Toast/Toast.mjs.map +1 -1
- package/dist/components/Toast/index.cjs +1 -3
- package/dist/components/Toast/index.cjs.map +1 -1
- package/dist/components/Toast/index.d.cts +1 -1
- package/dist/components/Toast/index.d.cts.map +1 -1
- package/dist/components/Toast/index.d.mts +1 -1
- package/dist/components/Toast/index.d.mts.map +1 -1
- package/dist/components/Toast/index.mjs +1 -1
- package/dist/components/Toast/index.mjs.map +1 -1
- package/dist/components/index.cjs +19 -9
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +16 -6
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +16 -6
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +8 -3
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.cjs.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts +2 -2
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts +2 -2
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts.map +1 -1
- package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.mjs.map +1 -1
- package/package.json +11 -9
- package/dist/components/ListItem/ListItem.constants.cjs +0 -14
- package/dist/components/ListItem/ListItem.constants.cjs.map +0 -1
- package/dist/components/ListItem/ListItem.constants.d.cts +0 -8
- package/dist/components/ListItem/ListItem.constants.d.cts.map +0 -1
- package/dist/components/ListItem/ListItem.constants.d.mts +0 -8
- package/dist/components/ListItem/ListItem.constants.d.mts.map +0 -1
- package/dist/components/ListItem/ListItem.constants.mjs +0 -11
- package/dist/components/ListItem/ListItem.constants.mjs.map +0 -1
- package/dist/components/SegmentButton/SegmentButton.cjs.map +0 -1
- package/dist/components/SegmentButton/SegmentButton.d.cts +0 -7
- package/dist/components/SegmentButton/SegmentButton.d.cts.map +0 -1
- package/dist/components/SegmentButton/SegmentButton.d.mts +0 -7
- package/dist/components/SegmentButton/SegmentButton.d.mts.map +0 -1
- package/dist/components/SegmentButton/SegmentButton.mjs.map +0 -1
- package/dist/components/SegmentButton/SegmentButton.types.cjs.map +0 -1
- package/dist/components/SegmentButton/SegmentButton.types.d.cts +0 -9
- package/dist/components/SegmentButton/SegmentButton.types.d.cts.map +0 -1
- package/dist/components/SegmentButton/SegmentButton.types.d.mts +0 -9
- package/dist/components/SegmentButton/SegmentButton.types.d.mts.map +0 -1
- package/dist/components/SegmentButton/SegmentButton.types.mjs +0 -2
- package/dist/components/SegmentButton/SegmentButton.types.mjs.map +0 -1
- package/dist/components/SegmentButton/index.cjs +0 -8
- package/dist/components/SegmentButton/index.cjs.map +0 -1
- package/dist/components/SegmentButton/index.d.cts +0 -4
- package/dist/components/SegmentButton/index.d.cts.map +0 -1
- package/dist/components/SegmentButton/index.d.mts +0 -4
- package/dist/components/SegmentButton/index.d.mts.map +0 -1
- package/dist/components/SegmentButton/index.mjs +0 -3
- package/dist/components/SegmentButton/index.mjs.map +0 -1
- package/dist/components/SegmentGroup/SegmentGroup.cjs.map +0 -1
- package/dist/components/SegmentGroup/SegmentGroup.d.cts +0 -7
- package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +0 -1
- package/dist/components/SegmentGroup/SegmentGroup.d.mts +0 -7
- package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +0 -1
- package/dist/components/SegmentGroup/SegmentGroup.mjs.map +0 -1
- package/dist/components/SegmentGroup/SegmentGroup.types.cjs.map +0 -1
- package/dist/components/SegmentGroup/SegmentGroup.types.d.cts +0 -12
- package/dist/components/SegmentGroup/SegmentGroup.types.d.cts.map +0 -1
- package/dist/components/SegmentGroup/SegmentGroup.types.d.mts +0 -12
- package/dist/components/SegmentGroup/SegmentGroup.types.d.mts.map +0 -1
- package/dist/components/SegmentGroup/SegmentGroup.types.mjs +0 -2
- package/dist/components/SegmentGroup/SegmentGroup.types.mjs.map +0 -1
- package/dist/components/SegmentGroup/index.cjs +0 -6
- package/dist/components/SegmentGroup/index.cjs.map +0 -1
- package/dist/components/SegmentGroup/index.d.cts +0 -3
- package/dist/components/SegmentGroup/index.d.cts.map +0 -1
- package/dist/components/SegmentGroup/index.d.mts +0 -3
- package/dist/components/SegmentGroup/index.d.mts.map +0 -1
- package/dist/components/SegmentGroup/index.mjs +0 -2
- package/dist/components/SegmentGroup/index.mjs.map +0 -1
- package/dist/types/index.cjs +0 -18
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/index.d.cts +0 -8
- package/dist/types/index.d.cts.map +0 -1
- package/dist/types/index.d.mts +0 -8
- package/dist/types/index.d.mts.map +0 -1
- package/dist/types/index.mjs +0 -8
- package/dist/types/index.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc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B,cAAc,CAAC,CACb,kBAAkB,CAAC,CAAC,CAAC,CACnB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,kBAAkB,CAAC,CACzB,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,WAAW,CAAC,CAAC,YAAY,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvE,IAAI,cAAc,CAAC,EACnB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CACF,CACD,YAAY,CAAC,CACX,gBAAgB,CAAC,CAAC,CAAC,CACjB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,gBAAgB,CAAC,CACvB,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,WAAW,CAAC,CAAC,YAAY,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvE,IAAI,YAAY,CAAC,EACjB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACF,CACD,SAAS,CAAC,CAAC;oBACT,OAAO,EAAE,gBAAgB;oBACzB,UAAU,EAAE,UAAU,CAAC,MAAM;oBAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;oBAC5B,aAAa,EAAE,CAAC;oBAChB,aAAa,EAAE,MAAM;oBACrB,GAAG,SAAS;oBACZ,WAAW,EAAE,uCAAuC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,SAAS,EAAE,WAAW,IAAI,EAAE,EAAE;iBAClI,CAAC,CAEF;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,MAAM,CACV;UAAA,GAAG,CACJ,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FontWeight,\n TextColor,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon, IconColor } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { Spinner } from '../temp-components/Spinner';\n\nimport {\n MAP_BUTTONBASE_SIZE_ICONSIZE,\n MAP_BUTTONBASE_SIZE_TEXT_VARIANT,\n getButtonBaseBorderRadiusTwClass,\n getButtonBaseHorizontalPaddingTwClasses,\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION,\n} from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n loadingWrapperProps,\n contentWrapperProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n const hasStart = Boolean(finalStartIconName || startAccessory);\n const hasEnd = Boolean(finalEndIconName || endAccessory);\n const hasAccessories = hasStart || hasEnd;\n\n const iconSize = MAP_BUTTONBASE_SIZE_ICONSIZE[size];\n const labelTextVariant = MAP_BUTTONBASE_SIZE_TEXT_VARIANT[size];\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading, please wait';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center',\n // Visual styling\n 'bg-muted overflow-hidden',\n // Conditional Border Radius and Horizontal Spacing based on requirements\n getButtonBaseBorderRadiusTwClass(size),\n getButtonBaseHorizontalPaddingTwClasses(size, hasStart, hasEnd),\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => {\n const { twClassName: loadingWrapperTw, ...restLoadingWrapper } =\n loadingWrapperProps ?? {};\n const { twClassName: contentWrapperTw, ...restContentWrapper } =\n contentWrapperProps ?? {};\n\n return (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <Box\n {...restLoadingWrapper}\n twClassName={`absolute inset-0 flex items-center justify-center ${loadingWrapperTw ?? ''}`}\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n {...spinnerProps}\n spinnerIconProps={{\n size: iconSize,\n ...spinnerProps?.spinnerIconProps,\n }}\n loadingTextProps={{\n numberOfLines: 1,\n variant: labelTextVariant,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n />\n </Box>\n )}\n\n <BoxRow\n {...restContentWrapper}\n twClassName={`${contentWrapperTw ?? ''} ${isLoading ? 'opacity-0' : ''}`}\n gap={hasAccessories ? 1 : 0}\n startAccessory={\n finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={iconSize}\n twClassName={`shrink-0 ${iconClassName ? iconClassName(pressed) : ''}`}\n {...startIconProps}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={iconSize}\n twClassName={`shrink-0 ${iconClassName ? iconClassName(pressed) : ''}`}\n {...endIconProps}\n />\n ) : (\n endAccessory\n )\n }\n textProps={{\n variant: labelTextVariant,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n twClassName: `shrink grow-0 flex-wrap text-center ${textClassName ? textClassName(pressed) : ''} ${textProps?.twClassName ?? ''}`,\n }}\n >\n {children}\n </BoxRow>\n </>\n );\n }}\n </ButtonAnimated>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ButtonBase.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,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aseSize,\n FontWeight,\n mergeTwClassName,\n TextColor,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon, IconColor } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { Spinner } from '../temp-components/Spinner';\n\nimport {\n MAP_BUTTONBASE_SIZE_ICONSIZE,\n MAP_BUTTONBASE_SIZE_TEXT_VARIANT,\n getButtonBaseBorderRadiusTwClass,\n getButtonBaseHorizontalPaddingTwClasses,\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION,\n} from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n loadingWrapperProps,\n contentWrapperProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n const hasStart = Boolean(finalStartIconName || startAccessory);\n const hasEnd = Boolean(finalEndIconName || endAccessory);\n const hasAccessories = hasStart || hasEnd;\n\n const iconSize = MAP_BUTTONBASE_SIZE_ICONSIZE[size];\n const labelTextVariant = MAP_BUTTONBASE_SIZE_TEXT_VARIANT[size];\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading, please wait';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center',\n // Visual styling\n 'bg-muted overflow-hidden',\n // Conditional Border Radius and Horizontal Spacing based on requirements\n getButtonBaseBorderRadiusTwClass(size),\n getButtonBaseHorizontalPaddingTwClasses(size, hasStart, hasEnd),\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => {\n const { twClassName: loadingWrapperTw, ...restLoadingWrapper } =\n loadingWrapperProps ?? {};\n const { twClassName: contentWrapperTw, ...restContentWrapper } =\n contentWrapperProps ?? {};\n\n return (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <Box\n {...restLoadingWrapper}\n twClassName={mergeTwClassName(\n 'absolute inset-0 flex items-center justify-center',\n loadingWrapperTw,\n )}\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n {...spinnerProps}\n spinnerIconProps={{\n size: iconSize,\n ...spinnerProps?.spinnerIconProps,\n }}\n loadingTextProps={{\n numberOfLines: 1,\n variant: labelTextVariant,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n />\n </Box>\n )}\n\n <BoxRow\n {...restContentWrapper}\n twClassName={\n isLoading\n ? mergeTwClassName('opacity-0', contentWrapperTw)\n : contentWrapperTw\n }\n gap={hasAccessories ? 1 : 0}\n startAccessory={\n finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={iconSize}\n twClassName={mergeTwClassName(\n 'shrink-0',\n iconClassName ? iconClassName(pressed) : undefined,\n )}\n {...startIconProps}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={iconSize}\n twClassName={mergeTwClassName(\n 'shrink-0',\n iconClassName ? iconClassName(pressed) : undefined,\n )}\n {...endIconProps}\n />\n ) : (\n endAccessory\n )\n }\n textProps={{\n variant: labelTextVariant,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n twClassName: mergeTwClassName(\n mergeTwClassName(\n 'shrink grow-0 flex-wrap text-center',\n textClassName ? textClassName(pressed) : undefined,\n ),\n textProps?.twClassName,\n ),\n }}\n >\n {children}\n </BoxRow>\n </>\n );\n }}\n </ButtonAnimated>\n );\n};\n"]}
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Content = void 0;
|
|
7
7
|
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const Box_1 = require("../Box/index.cjs");
|
|
9
10
|
const BoxColumn_1 = require("../BoxColumn/index.cjs");
|
|
10
11
|
const BoxRow_1 = require("../BoxRow/index.cjs");
|
|
11
12
|
const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
|
|
12
13
|
const Content_constants_1 = require("./Content.constants.cjs");
|
|
13
|
-
const Content = ({
|
|
14
|
-
|
|
15
|
-
const contentRow = (<BoxRow_1.BoxRow startAccessory={startAccessory} endAccessory={endAccessory} alignItems={Content_constants_1.VERTICAL_ALIGNMENT_MAP[verticalAlignment]} gap={4} twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()} {...(hasColumnShell ? {} : props)}>
|
|
14
|
+
const Content = ({ verticalAlignment = design_system_shared_1.ContentVerticalAlignment.Center, avatar, twClassName, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, ...props }) => {
|
|
15
|
+
return (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={Content_constants_1.VERTICAL_ALIGNMENT_MAP[verticalAlignment]} gap={4} twClassName={(0, design_system_shared_1.mergeTwClassName)('min-h-[46px]', twClassName)} {...props}>
|
|
16
16
|
{avatar}
|
|
17
17
|
{/* Title and description Column */}
|
|
18
18
|
<BoxColumn_1.BoxColumn twClassName="flex-1 min-w-0" bottomAccessory={description ? (<BoxRow_1.BoxRow twClassName="w-full" startAccessory={descriptionStartAccessory} endAccessory={descriptionEndAccessory} gap={1}>
|
|
@@ -58,13 +58,7 @@ const Content = ({ startAccessory, endAccessory, topAccessory, bottomAccessory,
|
|
|
58
58
|
</TextOrChildren_1.TextOrChildren>
|
|
59
59
|
</BoxRow_1.BoxRow>) : null}
|
|
60
60
|
</BoxColumn_1.BoxColumn>) : null}
|
|
61
|
-
</
|
|
62
|
-
if (hasColumnShell) {
|
|
63
|
-
return (<BoxColumn_1.BoxColumn gap={1} topAccessory={topAccessory} bottomAccessory={bottomAccessory} twClassName={twClassName} {...props}>
|
|
64
|
-
{contentRow}
|
|
65
|
-
</BoxColumn_1.BoxColumn>);
|
|
66
|
-
}
|
|
67
|
-
return contentRow;
|
|
61
|
+
</Box_1.Box>);
|
|
68
62
|
};
|
|
69
63
|
exports.Content = Content;
|
|
70
64
|
exports.Content.displayName = 'Content';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Content.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAOiD;AACjD,kDAA0B;AAE1B,0CAA6B;AAC7B,sDAAyC;AACzC,gDAAmC;AACnC,gFAAmE;AAEnE,+DAA6D;AAGtD,MAAM,OAAO,GAA2B,CAAC,EAC9C,iBAAiB,GAAG,+CAAwB,CAAC,MAAM,EACnD,MAAM,EACN,WAAW,EACX,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,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,uCAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,0C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AAS,CAAC,CACb,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AA7HW,QAAA,OAAO,WA6HlB;AAEF,eAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import {\n BoxFlexDirection,\n ContentVerticalAlignment,\n FontWeight,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport { VERTICAL_ALIGNMENT_MAP } from './Content.constants';\nimport type { ContentProps } from './Content.types';\n\nexport const Content: React.FC<ContentProps> = ({\n verticalAlignment = ContentVerticalAlignment.Center,\n avatar,\n twClassName,\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 ...props\n}) => {\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n gap={4}\n twClassName={mergeTwClassName('min-h-[46px]', twClassName)}\n {...props}\n >\n {avatar}\n {/* Title and description Column */}\n <BoxColumn\n twClassName=\"flex-1 min-w-0\"\n bottomAccessory={\n description ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={descriptionStartAccessory}\n endAccessory={descriptionEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...descriptionProps,\n }}\n >\n {description}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {title ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={titleStartAccessory}\n endAccessory={titleEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n {/* Value and subvalue Column */}\n {value || subvalue ? (\n <BoxColumn\n twClassName=\"min-w-0\"\n bottomAccessory={\n subvalue ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={subvalueStartAccessory}\n endAccessory={subvalueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subvalueProps,\n }}\n >\n {subvalue}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {value ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...valueProps,\n }}\n >\n {value}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n ) : null}\n </Box>\n );\n};\n\nContent.displayName = 'Content';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.d.cts","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.d.cts","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,YAAY,EAAE,4BAAwB;AAEpD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA6H1C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.d.mts","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Content.d.mts","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,YAAY,EAAE,4BAAwB;AAEpD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA6H1C,CAAC"}
|
|
@@ -4,16 +4,16 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { ContentVerticalAlignment, FontWeight, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
|
|
7
|
+
import { BoxFlexDirection, ContentVerticalAlignment, FontWeight, mergeTwClassName, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
|
|
8
8
|
import $React from "react";
|
|
9
9
|
const React = $importDefault($React);
|
|
10
|
+
import { Box } from "../Box/index.mjs";
|
|
10
11
|
import { BoxColumn } from "../BoxColumn/index.mjs";
|
|
11
12
|
import { BoxRow } from "../BoxRow/index.mjs";
|
|
12
13
|
import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
|
|
13
14
|
import { VERTICAL_ALIGNMENT_MAP } from "./Content.constants.mjs";
|
|
14
|
-
export const Content = ({
|
|
15
|
-
|
|
16
|
-
const contentRow = (<BoxRow startAccessory={startAccessory} endAccessory={endAccessory} alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]} gap={4} twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()} {...(hasColumnShell ? {} : props)}>
|
|
15
|
+
export const Content = ({ verticalAlignment = ContentVerticalAlignment.Center, avatar, twClassName, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, ...props }) => {
|
|
16
|
+
return (<Box flexDirection={BoxFlexDirection.Row} alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]} gap={4} twClassName={mergeTwClassName('min-h-[46px]', twClassName)} {...props}>
|
|
17
17
|
{avatar}
|
|
18
18
|
{/* Title and description Column */}
|
|
19
19
|
<BoxColumn twClassName="flex-1 min-w-0" bottomAccessory={description ? (<BoxRow twClassName="w-full" startAccessory={descriptionStartAccessory} endAccessory={descriptionEndAccessory} gap={1}>
|
|
@@ -59,13 +59,7 @@ export const Content = ({ startAccessory, endAccessory, topAccessory, bottomAcce
|
|
|
59
59
|
</TextOrChildren>
|
|
60
60
|
</BoxRow>) : null}
|
|
61
61
|
</BoxColumn>) : null}
|
|
62
|
-
</
|
|
63
|
-
if (hasColumnShell) {
|
|
64
|
-
return (<BoxColumn gap={1} topAccessory={topAccessory} bottomAccessory={bottomAccessory} twClassName={twClassName} {...props}>
|
|
65
|
-
{contentRow}
|
|
66
|
-
</BoxColumn>);
|
|
67
|
-
}
|
|
68
|
-
return contentRow;
|
|
62
|
+
</Box>);
|
|
69
63
|
};
|
|
70
64
|
Content.displayName = 'Content';
|
|
71
65
|
//# sourceMappingURL=Content.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,wBAAwB,EACxB,UAAU,EACV,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EAAE,sBAAsB,EAAE,gCAA4B;AAG7D,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,EAC9C,
|
|
1
|
+
{"version":3,"file":"Content.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,gBAAgB,E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,UAAU,CAAC,MAAM;oBAC7B,KAAK,EAAE,SAAS,CAAC,eAAe;oBAChC,GAAG,aAAa;iBACjB,CAAC,CAEF;kBAAA,CAAC,QAAQ,CACX;gBAAA,EAAE,cAAc,CAClB;cAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACT,CAED;UAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,MAAM,CACL,WAAW,CAAC,QAAQ,CACpB,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,GAAG,CAAC,CAAC,CAAC,CAAC,CAEP;cAAA,CAAC,cAAc,CACb,SAAS,CAAC,CAAC;oBACT,OAAO,EAAE,WAAW,CAAC,MAAM;oBAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;oBAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;oBAC5B,GAAG,UAAU;iBACd,CAAC,CAEF;gBAAA,CAAC,KAAK,CACR;cAAA,EAAE,cAAc,CAClB;YAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,SAAS,CAAC,CACb,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import {\n BoxFlexDirection,\n ContentVerticalAlignment,\n FontWeight,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport { VERTICAL_ALIGNMENT_MAP } from './Content.constants';\nimport type { ContentProps } from './Content.types';\n\nexport const Content: React.FC<ContentProps> = ({\n verticalAlignment = ContentVerticalAlignment.Center,\n avatar,\n twClassName,\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 ...props\n}) => {\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n gap={4}\n twClassName={mergeTwClassName('min-h-[46px]', twClassName)}\n {...props}\n >\n {avatar}\n {/* Title and description Column */}\n <BoxColumn\n twClassName=\"flex-1 min-w-0\"\n bottomAccessory={\n description ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={descriptionStartAccessory}\n endAccessory={descriptionEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...descriptionProps,\n }}\n >\n {description}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {title ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={titleStartAccessory}\n endAccessory={titleEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n {/* Value and subvalue Column */}\n {value || subvalue ? (\n <BoxColumn\n twClassName=\"min-w-0\"\n bottomAccessory={\n subvalue ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={subvalueStartAccessory}\n endAccessory={subvalueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subvalueProps,\n }}\n >\n {subvalue}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {value ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...valueProps,\n }}\n >\n {value}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n ) : null}\n </Box>\n );\n};\n\nContent.displayName = 'Content';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.types.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * Content component props.\n *\n * Props-only layout for list
|
|
1
|
+
{"version":3,"file":"Content.types.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * Content component props.\n *\n * Props-only layout for the inner list row (`title`, `avatar`, inline row accessories, etc.).\n */\nexport type ContentProps = Omit<BoxProps, 'children'> &\n ContentPropsShared & {\n /**\n * Optional props for the title Text when `title` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n titleProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the description Text when `description` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n descriptionProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the value Text when `value` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n valueProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the subvalue Text when `subvalue` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n subvalueProps?: Partial<Omit<TextProps, 'children'>>;\n };\n"]}
|
|
@@ -4,7 +4,7 @@ import type { TextProps } from "../Text/Text.types.cjs";
|
|
|
4
4
|
/**
|
|
5
5
|
* Content component props.
|
|
6
6
|
*
|
|
7
|
-
* Props-only layout for list
|
|
7
|
+
* Props-only layout for the inner list row (`title`, `avatar`, inline row accessories, etc.).
|
|
8
8
|
*/
|
|
9
9
|
export type ContentProps = Omit<BoxProps, 'children'> & ContentPropsShared & {
|
|
10
10
|
/**
|
|
@@ -4,7 +4,7 @@ import type { TextProps } from "../Text/Text.types.mjs";
|
|
|
4
4
|
/**
|
|
5
5
|
* Content component props.
|
|
6
6
|
*
|
|
7
|
-
* Props-only layout for list
|
|
7
|
+
* Props-only layout for the inner list row (`title`, `avatar`, inline row accessories, etc.).
|
|
8
8
|
*/
|
|
9
9
|
export type ContentProps = Omit<BoxProps, 'children'> & ContentPropsShared & {
|
|
10
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Content.types.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * Content component props.\n *\n * Props-only layout for list
|
|
1
|
+
{"version":3,"file":"Content.types.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * Content component props.\n *\n * Props-only layout for the inner list row (`title`, `avatar`, inline row accessories, etc.).\n */\nexport type ContentProps = Omit<BoxProps, 'children'> &\n ContentPropsShared & {\n /**\n * Optional props for the title Text when `title` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n titleProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the description Text when `description` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n descriptionProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the value Text when `value` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n valueProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the subvalue Text when `subvalue` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n subvalueProps?: Partial<Omit<TextProps, 'children'>>;\n };\n"]}
|
|
@@ -23,25 +23,27 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.
|
|
26
|
+
exports.FilterButton = void 0;
|
|
27
27
|
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
const ButtonBase_1 = require("../ButtonBase/index.cjs");
|
|
30
30
|
const Icon_1 = require("../Icon/index.cjs");
|
|
31
31
|
const Text_1 = require("../Text/index.cjs");
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const usesGroupSelection =
|
|
35
|
-
const effectiveVariant = variant ??
|
|
32
|
+
const FilterButton = ({ children, textProps, startIconProps, endIconProps, value, isSelected = false, variant, isLoading = false, size, isFullWidth, twClassName = '', style, onPress, ...buttonBaseRest }) => {
|
|
33
|
+
const filterButtonGroup = (0, react_1.useContext)(design_system_shared_1.FilterButtonGroupContext);
|
|
34
|
+
const usesGroupSelection = filterButtonGroup !== null && value !== undefined;
|
|
35
|
+
const effectiveVariant = variant ?? filterButtonGroup?.variant ?? design_system_shared_1.FilterButtonVariant.Primary;
|
|
36
|
+
const effectiveSize = size ?? filterButtonGroup?.size ?? design_system_shared_1.ButtonBaseSize.Sm;
|
|
37
|
+
const effectiveIsFullWidth = isFullWidth ?? filterButtonGroup?.isEqualWidth ?? false;
|
|
36
38
|
const effectiveIsSelected = usesGroupSelection
|
|
37
|
-
?
|
|
39
|
+
? filterButtonGroup.value === value
|
|
38
40
|
: isSelected;
|
|
39
41
|
const getTextAndIconClassName = () => {
|
|
40
|
-
if (effectiveVariant === design_system_shared_1.
|
|
42
|
+
if (effectiveVariant === design_system_shared_1.FilterButtonVariant.Primary &&
|
|
41
43
|
effectiveIsSelected) {
|
|
42
44
|
return 'text-primary-inverse';
|
|
43
45
|
}
|
|
44
|
-
if (effectiveVariant === design_system_shared_1.
|
|
46
|
+
if (effectiveVariant === design_system_shared_1.FilterButtonVariant.Secondary &&
|
|
45
47
|
effectiveIsSelected) {
|
|
46
48
|
return 'text-default';
|
|
47
49
|
}
|
|
@@ -49,14 +51,14 @@ const SegmentButton = ({ children, textProps, startIconProps, endIconProps, valu
|
|
|
49
51
|
};
|
|
50
52
|
const handlePress = (event) => {
|
|
51
53
|
if (usesGroupSelection &&
|
|
52
|
-
|
|
54
|
+
filterButtonGroup !== null &&
|
|
53
55
|
value !== undefined &&
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
filterButtonGroup.value !== value) {
|
|
57
|
+
filterButtonGroup.onChange(value);
|
|
56
58
|
}
|
|
57
59
|
onPress?.(event);
|
|
58
60
|
};
|
|
59
|
-
return (<ButtonBase_1.ButtonBase {...buttonBaseRest} size={
|
|
61
|
+
return (<ButtonBase_1.ButtonBase {...buttonBaseRest} size={effectiveSize} isFullWidth={effectiveIsFullWidth} isLoading={isLoading} children={children} onPress={handlePress} textProps={{
|
|
60
62
|
...(!effectiveIsSelected ? { color: Text_1.TextColor.TextAlternative } : {}),
|
|
61
63
|
...textProps,
|
|
62
64
|
}} startIconProps={{
|
|
@@ -66,13 +68,13 @@ const SegmentButton = ({ children, textProps, startIconProps, endIconProps, valu
|
|
|
66
68
|
...(!effectiveIsSelected ? { color: Icon_1.IconColor.IconAlternative } : {}),
|
|
67
69
|
...endIconProps,
|
|
68
70
|
}} twClassName={(pressed) => {
|
|
69
|
-
if (effectiveVariant === design_system_shared_1.
|
|
71
|
+
if (effectiveVariant === design_system_shared_1.FilterButtonVariant.Primary &&
|
|
70
72
|
effectiveIsSelected) {
|
|
71
73
|
return `${pressed || isLoading ? 'bg-icon-default-pressed' : 'bg-icon-default'} ${typeof twClassName === 'function'
|
|
72
74
|
? twClassName(pressed)
|
|
73
75
|
: twClassName}`;
|
|
74
76
|
}
|
|
75
|
-
if (effectiveVariant === design_system_shared_1.
|
|
77
|
+
if (effectiveVariant === design_system_shared_1.FilterButtonVariant.Secondary &&
|
|
76
78
|
effectiveIsSelected) {
|
|
77
79
|
return `${pressed || isLoading ? 'bg-muted-pressed' : 'bg-muted'} ${typeof twClassName === 'function'
|
|
78
80
|
? twClassName(pressed)
|
|
@@ -81,6 +83,6 @@ const SegmentButton = ({ children, textProps, startIconProps, endIconProps, valu
|
|
|
81
83
|
return `${pressed || isLoading ? 'bg-pressed' : 'bg-transparent'} border-0 ${typeof twClassName === 'function' ? twClassName(pressed) : twClassName}`;
|
|
82
84
|
}} textClassName={getTextAndIconClassName} iconClassName={getTextAndIconClassName} style={style}/>);
|
|
83
85
|
};
|
|
84
|
-
exports.
|
|
85
|
-
exports.
|
|
86
|
-
//# sourceMappingURL=
|
|
86
|
+
exports.FilterButton = FilterButton;
|
|
87
|
+
exports.FilterButton.displayName = 'FilterButton';
|
|
88
|
+
//# sourceMappingURL=FilterButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterButton.cjs","sourceRoot":"","sources":["../../../src/components/FilterButton/FilterButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAIiD;AACjD,+CAA0C;AAG1C,wDAA2C;AAC3C,4CAAoC;AACpC,4CAAoC;AAI7B,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,KAAK,EACL,UAAU,G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IAC9D,OAAO,WAAW,KAAK,UAAU;oBAC/B,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC;oBACtB,CAAC,CAAC,WACN,EAAE,CAAC;aACJ;YAED,OAAO,GAAG,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,aAC9D,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAC7D,EAAE,CAAC;QACL,CAAC,CAAC,CACF,aAAa,CAAC,CAAC,uBAAuB,CAAC,CACvC,aAAa,CAAC,CAAC,uBAAuB,CAAC,CACvC,KAAK,CAAC,CAAC,KAAK,CAAC,EACb,CACH,CAAC;AACJ,CAAC,CAAC;AA/GW,QAAA,YAAY,gBA+GvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FilterButtonVariant,\n FilterButtonGroupContext,\n} from '@metamask-previews/design-system-shared';\nimport React, { useContext } from 'react';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport { ButtonBase } from '../ButtonBase';\nimport { IconColor } from '../Icon';\nimport { TextColor } from '../Text';\n\nimport type { FilterButtonProps } from './FilterButton.types';\n\nexport const FilterButton = ({\n children,\n textProps,\n startIconProps,\n endIconProps,\n value,\n isSelected = false,\n variant,\n isLoading = false,\n size,\n isFullWidth,\n twClassName = '',\n style,\n onPress,\n ...buttonBaseRest\n}: FilterButtonProps) => {\n const filterButtonGroup = useContext(FilterButtonGroupContext);\n const usesGroupSelection = filterButtonGroup !== null && value !== undefined;\n\n const effectiveVariant =\n variant ?? filterButtonGroup?.variant ?? FilterButtonVariant.Primary;\n\n const effectiveSize = size ?? filterButtonGroup?.size ?? ButtonBaseSize.Sm;\n\n const effectiveIsFullWidth =\n isFullWidth ?? filterButtonGroup?.isEqualWidth ?? false;\n\n const effectiveIsSelected = usesGroupSelection\n ? filterButtonGroup.value === value\n : isSelected;\n\n const getTextAndIconClassName = () => {\n if (\n effectiveVariant === FilterButtonVariant.Primary &&\n effectiveIsSelected\n ) {\n return 'text-primary-inverse';\n }\n if (\n effectiveVariant === FilterButtonVariant.Secondary &&\n effectiveIsSelected\n ) {\n return 'text-default';\n }\n return '';\n };\n\n const handlePress = (event: GestureResponderEvent) => {\n if (\n usesGroupSelection &&\n filterButtonGroup !== null &&\n value !== undefined &&\n filterButtonGroup.value !== value\n ) {\n filterButtonGroup.onChange(value);\n }\n onPress?.(event);\n };\n\n return (\n <ButtonBase\n {...buttonBaseRest}\n size={effectiveSize}\n isFullWidth={effectiveIsFullWidth}\n isLoading={isLoading}\n children={children}\n onPress={handlePress}\n textProps={{\n ...(!effectiveIsSelected ? { color: TextColor.TextAlternative } : {}),\n ...textProps,\n }}\n startIconProps={{\n ...(!effectiveIsSelected ? { color: IconColor.IconAlternative } : {}),\n ...startIconProps,\n }}\n endIconProps={{\n ...(!effectiveIsSelected ? { color: IconColor.IconAlternative } : {}),\n ...endIconProps,\n }}\n twClassName={(pressed) => {\n if (\n effectiveVariant === FilterButtonVariant.Primary &&\n effectiveIsSelected\n ) {\n return `${pressed || isLoading ? 'bg-icon-default-pressed' : 'bg-icon-default'} ${\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName\n }`;\n }\n\n if (\n effectiveVariant === FilterButtonVariant.Secondary &&\n effectiveIsSelected\n ) {\n return `${pressed || isLoading ? 'bg-muted-pressed' : 'bg-muted'} ${\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName\n }`;\n }\n\n return `${pressed || isLoading ? 'bg-pressed' : 'bg-transparent'} border-0 ${\n typeof twClassName === 'function' ? twClassName(pressed) : twClassName\n }`;\n }}\n textClassName={getTextAndIconClassName}\n iconClassName={getTextAndIconClassName}\n style={style}\n />\n );\n};\n\nFilterButton.displayName = 'FilterButton';\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { FilterButtonProps } from "./FilterButton.types.cjs";
|
|
3
|
+
export declare const FilterButton: {
|
|
4
|
+
({ children, textProps, startIconProps, endIconProps, value, isSelected, variant, isLoading, size, isFullWidth, twClassName, style, onPress, ...buttonBaseRest }: FilterButtonProps): React.JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=FilterButton.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterButton.d.cts","sourceRoot":"","sources":["../../../src/components/FilterButton/FilterButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,cAAc;AAO1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY;sKAetB,iBAAiB;;CAgGnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { FilterButtonProps } from "./FilterButton.types.mjs";
|
|
3
|
+
export declare const FilterButton: {
|
|
4
|
+
({ children, textProps, startIconProps, endIconProps, value, isSelected, variant, isLoading, size, isFullWidth, twClassName, style, onPress, ...buttonBaseRest }: FilterButtonProps): React.JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=FilterButton.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterButton.d.mts","sourceRoot":"","sources":["../../../src/components/FilterButton/FilterButton.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,cAAc;AAO1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY;sKAetB,iBAAiB;;CAgGnB,CAAC"}
|
|
@@ -4,25 +4,27 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { ButtonBaseSize,
|
|
7
|
+
import { ButtonBaseSize, FilterButtonVariant, FilterButtonGroupContext } from "@metamask-previews/design-system-shared";
|
|
8
8
|
import $React, { useContext } from "react";
|
|
9
9
|
const React = $importDefault($React);
|
|
10
10
|
import { ButtonBase } from "../ButtonBase/index.mjs";
|
|
11
11
|
import { IconColor } from "../Icon/index.mjs";
|
|
12
12
|
import { TextColor } from "../Text/index.mjs";
|
|
13
|
-
export const
|
|
14
|
-
const
|
|
15
|
-
const usesGroupSelection =
|
|
16
|
-
const effectiveVariant = variant ??
|
|
13
|
+
export const FilterButton = ({ children, textProps, startIconProps, endIconProps, value, isSelected = false, variant, isLoading = false, size, isFullWidth, twClassName = '', style, onPress, ...buttonBaseRest }) => {
|
|
14
|
+
const filterButtonGroup = useContext(FilterButtonGroupContext);
|
|
15
|
+
const usesGroupSelection = filterButtonGroup !== null && value !== undefined;
|
|
16
|
+
const effectiveVariant = variant ?? filterButtonGroup?.variant ?? FilterButtonVariant.Primary;
|
|
17
|
+
const effectiveSize = size ?? filterButtonGroup?.size ?? ButtonBaseSize.Sm;
|
|
18
|
+
const effectiveIsFullWidth = isFullWidth ?? filterButtonGroup?.isEqualWidth ?? false;
|
|
17
19
|
const effectiveIsSelected = usesGroupSelection
|
|
18
|
-
?
|
|
20
|
+
? filterButtonGroup.value === value
|
|
19
21
|
: isSelected;
|
|
20
22
|
const getTextAndIconClassName = () => {
|
|
21
|
-
if (effectiveVariant ===
|
|
23
|
+
if (effectiveVariant === FilterButtonVariant.Primary &&
|
|
22
24
|
effectiveIsSelected) {
|
|
23
25
|
return 'text-primary-inverse';
|
|
24
26
|
}
|
|
25
|
-
if (effectiveVariant ===
|
|
27
|
+
if (effectiveVariant === FilterButtonVariant.Secondary &&
|
|
26
28
|
effectiveIsSelected) {
|
|
27
29
|
return 'text-default';
|
|
28
30
|
}
|
|
@@ -30,14 +32,14 @@ export const SegmentButton = ({ children, textProps, startIconProps, endIconProp
|
|
|
30
32
|
};
|
|
31
33
|
const handlePress = (event) => {
|
|
32
34
|
if (usesGroupSelection &&
|
|
33
|
-
|
|
35
|
+
filterButtonGroup !== null &&
|
|
34
36
|
value !== undefined &&
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
filterButtonGroup.value !== value) {
|
|
38
|
+
filterButtonGroup.onChange(value);
|
|
37
39
|
}
|
|
38
40
|
onPress?.(event);
|
|
39
41
|
};
|
|
40
|
-
return (<ButtonBase {...buttonBaseRest} size={
|
|
42
|
+
return (<ButtonBase {...buttonBaseRest} size={effectiveSize} isFullWidth={effectiveIsFullWidth} isLoading={isLoading} children={children} onPress={handlePress} textProps={{
|
|
41
43
|
...(!effectiveIsSelected ? { color: TextColor.TextAlternative } : {}),
|
|
42
44
|
...textProps,
|
|
43
45
|
}} startIconProps={{
|
|
@@ -47,13 +49,13 @@ export const SegmentButton = ({ children, textProps, startIconProps, endIconProp
|
|
|
47
49
|
...(!effectiveIsSelected ? { color: IconColor.IconAlternative } : {}),
|
|
48
50
|
...endIconProps,
|
|
49
51
|
}} twClassName={(pressed) => {
|
|
50
|
-
if (effectiveVariant ===
|
|
52
|
+
if (effectiveVariant === FilterButtonVariant.Primary &&
|
|
51
53
|
effectiveIsSelected) {
|
|
52
54
|
return `${pressed || isLoading ? 'bg-icon-default-pressed' : 'bg-icon-default'} ${typeof twClassName === 'function'
|
|
53
55
|
? twClassName(pressed)
|
|
54
56
|
: twClassName}`;
|
|
55
57
|
}
|
|
56
|
-
if (effectiveVariant ===
|
|
58
|
+
if (effectiveVariant === FilterButtonVariant.Secondary &&
|
|
57
59
|
effectiveIsSelected) {
|
|
58
60
|
return `${pressed || isLoading ? 'bg-muted-pressed' : 'bg-muted'} ${typeof twClassName === 'function'
|
|
59
61
|
? twClassName(pressed)
|
|
@@ -62,5 +64,5 @@ export const SegmentButton = ({ children, textProps, startIconProps, endIconProp
|
|
|
62
64
|
return `${pressed || isLoading ? 'bg-pressed' : 'bg-transparent'} border-0 ${typeof twClassName === 'function' ? twClassName(pressed) : twClassName}`;
|
|
63
65
|
}} textClassName={getTextAndIconClassName} iconClassName={getTextAndIconClassName} style={style}/>);
|
|
64
66
|
};
|
|
65
|
-
|
|
66
|
-
//# sourceMappingURL=
|
|
67
|
+
FilterButton.displayName = 'FilterButton';
|
|
68
|
+
//# sourceMappingURL=FilterButton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterButton.mjs","sourceRoot":"","sources":["../../../src/components/FilterButton/FilterButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACzB,gDAAgD;AACjD,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAG1C,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,SAAS,EAAE,0BAAgB;AACpC,OAAO,EAAE,SAAS,EAAE,0BAAgB;AAIpC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,KAAK,EACL,UAAU,GAAG,KAAK,EAClB,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,IAAI,EACJ,WAAW,EACX,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,OAAO,EACP,GAAG,cAAc,EACC,EAAE,EAAE;IACtB,MAAM,iBAAiB,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC;IAC/D,MAAM,kBAAkB,GAAG,iBAAiB,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC;IAE7E,MAAM,gBAAgB,GACpB,OAAO,IAAI,iBAAiB,EAAE,OAAO,IAAI,mBAAmB,CAAC,OAAO,CAAC;IAEvE,MAAM,aAAa,GAAG,IAAI,IAAI,iBAAiB,EAAE,IAAI,IAAI,cAAc,CAAC,EAAE,CAAC;IAE3E,MAAM,oBAAoB,GACxB,WAAW,IAAI,iBAAiB,EAAE,YAAY,IAAI,KAAK,CAAC;IAE1D,MAAM,mBAAmB,GAAG,kBAAkB;QAC5C,CAAC,CAAC,iBAAiB,CAAC,KAAK,KAAK,KAAK;QACnC,CAAC,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AE,KAAK,EAAE,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACrE,GAAG,YAAY;SAChB,CAAC,CACF,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE;YACvB,IACE,gBAAgB,KAAK,mBAAmB,CAAC,OAAO;gBAChD,mBAAmB,EACnB;gBACA,OAAO,GAAG,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,iBAAiB,IAC5E,OAAO,WAAW,KAAK,UAAU;oBAC/B,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC;oBACtB,CAAC,CAAC,WACN,EAAE,CAAC;aACJ;YAED,IACE,gBAAgB,KAAK,mBAAmB,CAAC,SAAS;gBAClD,mBAAmB,EACnB;gBACA,OAAO,GAAG,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,UAAU,IAC9D,OAAO,WAAW,KAAK,UAAU;oBAC/B,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC;oBACtB,CAAC,CAAC,WACN,EAAE,CAAC;aACJ;YAED,OAAO,GAAG,OAAO,IAAI,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,aAC9D,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAC7D,EAAE,CAAC;QACL,CAAC,CAAC,CACF,aAAa,CAAC,CAAC,uBAAuB,CAAC,CACvC,aAAa,CAAC,CAAC,uBAAuB,CAAC,CACvC,KAAK,CAAC,CAAC,KAAK,CAAC,EACb,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FilterButtonVariant,\n FilterButtonGroupContext,\n} from '@metamask-previews/design-system-shared';\nimport React, { useContext } from 'react';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport { ButtonBase } from '../ButtonBase';\nimport { IconColor } from '../Icon';\nimport { TextColor } from '../Text';\n\nimport type { FilterButtonProps } from './FilterButton.types';\n\nexport const FilterButton = ({\n children,\n textProps,\n startIconProps,\n endIconProps,\n value,\n isSelected = false,\n variant,\n isLoading = false,\n size,\n isFullWidth,\n twClassName = '',\n style,\n onPress,\n ...buttonBaseRest\n}: FilterButtonProps) => {\n const filterButtonGroup = useContext(FilterButtonGroupContext);\n const usesGroupSelection = filterButtonGroup !== null && value !== undefined;\n\n const effectiveVariant =\n variant ?? filterButtonGroup?.variant ?? FilterButtonVariant.Primary;\n\n const effectiveSize = size ?? filterButtonGroup?.size ?? ButtonBaseSize.Sm;\n\n const effectiveIsFullWidth =\n isFullWidth ?? filterButtonGroup?.isEqualWidth ?? false;\n\n const effectiveIsSelected = usesGroupSelection\n ? filterButtonGroup.value === value\n : isSelected;\n\n const getTextAndIconClassName = () => {\n if (\n effectiveVariant === FilterButtonVariant.Primary &&\n effectiveIsSelected\n ) {\n return 'text-primary-inverse';\n }\n if (\n effectiveVariant === FilterButtonVariant.Secondary &&\n effectiveIsSelected\n ) {\n return 'text-default';\n }\n return '';\n };\n\n const handlePress = (event: GestureResponderEvent) => {\n if (\n usesGroupSelection &&\n filterButtonGroup !== null &&\n value !== undefined &&\n filterButtonGroup.value !== value\n ) {\n filterButtonGroup.onChange(value);\n }\n onPress?.(event);\n };\n\n return (\n <ButtonBase\n {...buttonBaseRest}\n size={effectiveSize}\n isFullWidth={effectiveIsFullWidth}\n isLoading={isLoading}\n children={children}\n onPress={handlePress}\n textProps={{\n ...(!effectiveIsSelected ? { color: TextColor.TextAlternative } : {}),\n ...textProps,\n }}\n startIconProps={{\n ...(!effectiveIsSelected ? { color: IconColor.IconAlternative } : {}),\n ...startIconProps,\n }}\n endIconProps={{\n ...(!effectiveIsSelected ? { color: IconColor.IconAlternative } : {}),\n ...endIconProps,\n }}\n twClassName={(pressed) => {\n if (\n effectiveVariant === FilterButtonVariant.Primary &&\n effectiveIsSelected\n ) {\n return `${pressed || isLoading ? 'bg-icon-default-pressed' : 'bg-icon-default'} ${\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName\n }`;\n }\n\n if (\n effectiveVariant === FilterButtonVariant.Secondary &&\n effectiveIsSelected\n ) {\n return `${pressed || isLoading ? 'bg-muted-pressed' : 'bg-muted'} ${\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName\n }`;\n }\n\n return `${pressed || isLoading ? 'bg-pressed' : 'bg-transparent'} border-0 ${\n typeof twClassName === 'function' ? twClassName(pressed) : twClassName\n }`;\n }}\n textClassName={getTextAndIconClassName}\n iconClassName={getTextAndIconClassName}\n style={style}\n />\n );\n};\n\nFilterButton.displayName = 'FilterButton';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterButton.types.cjs","sourceRoot":"","sources":["../../../src/components/FilterButton/FilterButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { FilterButtonPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { ButtonBaseProps } from '../ButtonBase/ButtonBase.types';\n\n/**\n * FilterButton component props.\n */\nexport type FilterButtonProps = FilterButtonPropsShared &\n Omit<ButtonBaseProps, 'onPress'> & {\n onPress?: ButtonBaseProps['onPress'];\n };\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FilterButtonPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { ButtonBaseProps } from "../ButtonBase/ButtonBase.types.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* FilterButton component props.
|
|
5
|
+
*/
|
|
6
|
+
export type FilterButtonProps = FilterButtonPropsShared & Omit<ButtonBaseProps, 'onPress'> & {
|
|
7
|
+
onPress?: ButtonBaseProps['onPress'];
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=FilterButton.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/FilterButton/FilterButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AAEvF,OAAO,KAAK,EAAE,eAAe,EAAE,2CAAuC;AAEtE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GACrD,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IACjC,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACtC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FilterButtonPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { ButtonBaseProps } from "../ButtonBase/ButtonBase.types.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* FilterButton component props.
|
|
5
|
+
*/
|
|
6
|
+
export type FilterButtonProps = FilterButtonPropsShared & Omit<ButtonBaseProps, 'onPress'> & {
|
|
7
|
+
onPress?: ButtonBaseProps['onPress'];
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=FilterButton.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/FilterButton/FilterButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AAEvF,OAAO,KAAK,EAAE,eAAe,EAAE,2CAAuC;AAEtE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GACrD,IAAI,CAAC,eAAe,EAAE,SAAS,CAAC,GAAG;IACjC,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterButton.types.mjs","sourceRoot":"","sources":["../../../src/components/FilterButton/FilterButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { FilterButtonPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { ButtonBaseProps } from '../ButtonBase/ButtonBase.types';\n\n/**\n * FilterButton component props.\n */\nexport type FilterButtonProps = FilterButtonPropsShared &\n Omit<ButtonBaseProps, 'onPress'> & {\n onPress?: ButtonBaseProps['onPress'];\n };\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FilterButton = exports.FilterButtonVariant = void 0;
|
|
4
|
+
var design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "FilterButtonVariant", { enumerable: true, get: function () { return design_system_shared_1.FilterButtonVariant; } });
|
|
6
|
+
var FilterButton_1 = require("./FilterButton.cjs");
|
|
7
|
+
Object.defineProperty(exports, "FilterButton", { enumerable: true, get: function () { return FilterButton_1.FilterButton; } });
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/FilterButton/index.ts"],"names":[],"mappings":";;;AAAA,gFAA8E;AAArE,2HAAA,mBAAmB,OAAA;AAC5B,mDAA8C;AAArC,4GAAA,YAAY,OAAA","sourcesContent":["export { FilterButtonVariant } from '@metamask-previews/design-system-shared';\nexport { FilterButton } from './FilterButton';\nexport type { FilterButtonProps } from './FilterButton.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/FilterButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/FilterButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
|