@metamask-previews/design-system-react-native 0.28.0-preview.1f40f69f → 0.30.2-preview.25db973
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 +52 -1
- package/dist/components/AvatarBase/AvatarBase.cjs +1 -1
- 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 +2 -2
- package/dist/components/AvatarBase/AvatarBase.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 +1 -2
- 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 +1 -2
- 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/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 +6 -12
- 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 +7 -13
- 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 +1 -1
- package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
- package/dist/components/SectionHeader/SectionHeader.mjs +2 -2
- package/dist/components/SectionHeader/SectionHeader.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/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 +1 -1
- package/dist/components/Toast/Toast.constants.cjs.map +1 -1
- package/dist/components/Toast/Toast.constants.d.cts +1 -1
- package/dist/components/Toast/Toast.constants.d.mts +1 -1
- package/dist/components/Toast/Toast.constants.mjs +1 -1
- 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/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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/FilterButtonGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gCAA4B","sourcesContent":["export { FilterButtonGroup } from './FilterButtonGroup';\nexport type { FilterButtonGroupProps } from './FilterButtonGroup.types';\n"]}
|
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.HeaderRoot = void 0;
|
|
7
7
|
// Third party dependencies.
|
|
8
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
8
9
|
const react_1 = __importDefault(require("react"));
|
|
9
10
|
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
10
11
|
// External dependencies.
|
|
@@ -40,7 +41,7 @@ const HeaderRoot = ({ children, title, titleProps, titleAccessory, endAccessory,
|
|
|
40
41
|
}
|
|
41
42
|
return null;
|
|
42
43
|
};
|
|
43
|
-
return (<Box_1.Box flexDirection={Box_1.BoxFlexDirection.Row} alignItems={Box_1.BoxAlignItems.Center} gap={4} paddingLeft={4} paddingRight={2} twClassName={
|
|
44
|
+
return (<Box_1.Box flexDirection={Box_1.BoxFlexDirection.Row} alignItems={Box_1.BoxAlignItems.Center} gap={4} paddingLeft={4} paddingRight={2} twClassName={(0, design_system_shared_1.mergeTwClassName)('min-h-14', twClassName)} style={[includesTopInset && { marginTop: insets.top }, style]} testID={testID} {...viewProps}>
|
|
44
45
|
{renderLeftSection()}
|
|
45
46
|
{endSectionContent ? (<Box_1.Box flexDirection={Box_1.BoxFlexDirection.Row} gap={2} twClassName="ml-auto">
|
|
46
47
|
{endSectionContent}
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B,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC,CAC9D,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,iBAAiB,EAAE,CACpB;MAAA,CAAC,iBAAiB,CAAC,CAAC,CAAC,CACnB,CAAC,SAAG,CAAC,aAAa,CAAC,CAAC,sBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CACrE;UAAA,CAAC,iBAAiB,CACpB;QAAA,EAAE,SAAG,CAAC,CACP,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AA3EW,QAAA,UAAU,cA2ErB;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["// Third party dependencies.\nimport { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport React from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\n// External dependencies.\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderRootProps } from './HeaderRoot.types';\n\nexport const HeaderRoot = ({\n children,\n title,\n titleProps,\n titleAccessory,\n endAccessory,\n endButtonIconProps,\n includesTopInset = false,\n style,\n testID,\n twClassName,\n ...viewProps\n}: HeaderRootProps) => {\n const insets = useSafeAreaInsets();\n\n const endSectionContent = (() => {\n if (endAccessory) {\n return endAccessory;\n }\n if (endButtonIconProps && endButtonIconProps.length > 0) {\n const reversedProps = endButtonIconProps\n .map((props, originalIndex) => ({ props, originalIndex }))\n .reverse();\n return reversedProps.map(({ props, originalIndex }) => (\n <ButtonIcon\n key={`end-button-icon-${originalIndex}`}\n size={ButtonIconSize.Md}\n {...props}\n />\n ));\n }\n return null;\n })();\n\n const renderLeftSection = () => {\n if (children) {\n return children;\n }\n if (title) {\n return (\n <BoxRow\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingLg,\n ...titleProps,\n }}\n twClassName=\"flex-1\"\n >\n {title}\n </BoxRow>\n );\n }\n return null;\n };\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={4}\n paddingLeft={4}\n paddingRight={2}\n twClassName={mergeTwClassName('min-h-14', twClassName)}\n style={[includesTopInset && { marginTop: insets.top }, style]}\n testID={testID}\n {...viewProps}\n >\n {renderLeftSection()}\n {endSectionContent ? (\n <Box flexDirection={BoxFlexDirection.Row} gap={2} twClassName=\"ml-auto\">\n {endSectionContent}\n </Box>\n ) : null}\n </Box>\n );\n};\n\nHeaderRoot.displayName = 'HeaderRoot';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderRoot.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderRoot.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc;AAU1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU;oJAYpB,eAAe;;CA+DjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderRoot.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderRoot.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc;AAU1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU;oJAYpB,eAAe;;CA+DjB,CAAC"}
|
|
@@ -5,6 +5,7 @@ function $importDefault(module) {
|
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
7
|
// Third party dependencies.
|
|
8
|
+
import { mergeTwClassName } from "@metamask-previews/design-system-shared";
|
|
8
9
|
import $React from "react";
|
|
9
10
|
const React = $importDefault($React);
|
|
10
11
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
@@ -41,7 +42,7 @@ export const HeaderRoot = ({ children, title, titleProps, titleAccessory, endAcc
|
|
|
41
42
|
}
|
|
42
43
|
return null;
|
|
43
44
|
};
|
|
44
|
-
return (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={4} paddingLeft={4} paddingRight={2} twClassName={
|
|
45
|
+
return (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={4} paddingLeft={4} paddingRight={2} twClassName={mergeTwClassName('min-h-14', twClassName)} style={[includesTopInset && { marginTop: insets.top }, style]} testID={testID} {...viewProps}>
|
|
45
46
|
{renderLeftSection()}
|
|
46
47
|
{endSectionContent ? (<Box flexDirection={BoxFlexDirection.Row} gap={2} twClassName="ml-auto">
|
|
47
48
|
{endSectionContent}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderRoot.mjs","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;AAEnE,yBAAyB;AACzB,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,gBAAgB,EAAE,yBAAe;AAC9D,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAC3D,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAKtC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ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CACf,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,iBAAiB,EAAE,CACpB;MAAA,CAAC,iBAAiB,CAAC,CAAC,CAAC,CACnB,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,SAAS,CACrE;UAAA,CAAC,iBAAiB,CACpB;QAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["// Third party dependencies.\nimport { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport React from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\n// External dependencies.\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderRootProps } from './HeaderRoot.types';\n\nexport const HeaderRoot = ({\n children,\n title,\n titleProps,\n titleAccessory,\n endAccessory,\n endButtonIconProps,\n includesTopInset = false,\n style,\n testID,\n twClassName,\n ...viewProps\n}: HeaderRootProps) => {\n const insets = useSafeAreaInsets();\n\n const endSectionContent = (() => {\n if (endAccessory) {\n return endAccessory;\n }\n if (endButtonIconProps && endButtonIconProps.length > 0) {\n const reversedProps = endButtonIconProps\n .map((props, originalIndex) => ({ props, originalIndex }))\n .reverse();\n return reversedProps.map(({ props, originalIndex }) => (\n <ButtonIcon\n key={`end-button-icon-${originalIndex}`}\n size={ButtonIconSize.Md}\n {...props}\n />\n ));\n }\n return null;\n })();\n\n const renderLeftSection = () => {\n if (children) {\n return children;\n }\n if (title) {\n return (\n <BoxRow\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingLg,\n ...titleProps,\n }}\n twClassName=\"flex-1\"\n >\n {title}\n </BoxRow>\n );\n }\n return null;\n };\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={4}\n paddingLeft={4}\n paddingRight={2}\n twClassName={mergeTwClassName('min-h-14', twClassName)}\n style={[includesTopInset && { marginTop: insets.top }, style]}\n testID={testID}\n {...viewProps}\n >\n {renderLeftSection()}\n {endSectionContent ? (\n <Box flexDirection={BoxFlexDirection.Row} gap={2} twClassName=\"ml-auto\">\n {endSectionContent}\n </Box>\n ) : null}\n </Box>\n );\n};\n\nHeaderRoot.displayName = 'HeaderRoot';\n"]}
|
|
@@ -25,6 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.HeaderStandard = void 0;
|
|
27
27
|
// Third party dependencies.
|
|
28
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
28
29
|
const react_1 = __importStar(require("react"));
|
|
29
30
|
const HeaderBase_1 = require("../HeaderBase/index.cjs");
|
|
30
31
|
const Icon_1 = require("../Icon/index.cjs");
|
|
@@ -68,7 +69,7 @@ const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children,
|
|
|
68
69
|
}
|
|
69
70
|
return null;
|
|
70
71
|
};
|
|
71
|
-
return (<HeaderBase_1.HeaderBase testID={testID} startButtonIconProps={resolvedStartButtonIconProps} endButtonIconProps={resolvedEndButtonIconProps} {...headerBaseProps} twClassName={
|
|
72
|
+
return (<HeaderBase_1.HeaderBase testID={testID} startButtonIconProps={resolvedStartButtonIconProps} endButtonIconProps={resolvedEndButtonIconProps} {...headerBaseProps} twClassName={(0, design_system_shared_1.mergeTwClassName)('px-2', twClassName)}>
|
|
72
73
|
{renderContent()}
|
|
73
74
|
</HeaderBase_1.HeaderBase>);
|
|
74
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderStandard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ED,IAAI,kBAAkB,EAAE;YACtB,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC;SACnC;QACD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9C,CAAC,EAAE,CAAC,kBAAkB,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEpD,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC;SACjB;QACD,IAAI,KAAK,EAAE;YACT,OAAO,CACL,CAAC,uDAA0B,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,EAC7B,CACH,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"HeaderStandard.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,kFAA2E;AAC3E,+CAAuC;AAIvC,wDAA2C;AAC3C,4CAAmC;AACnC,wGAA2F;AAKpF,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAA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;YACT,OAAO,CACL,CAAC,uDAA0B,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,EAC7B,CACH,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAEnD;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AA7EW,QAAA,cAAc,kBA6EzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { HeaderStandardCenterColumn } from '../temp-components/HeaderStandardCenterColumn';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n return (\n <HeaderStandardCenterColumn\n title={title}\n titleProps={titleProps}\n subtitle={subtitle}\n subtitleProps={subtitleProps}\n />\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={mergeTwClassName('px-2', twClassName)}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderStandard.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderStandard.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,cAAc;AASvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6ExD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderStandard.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HeaderStandard.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,cAAc;AASvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6ExD,CAAC"}
|
|
@@ -5,6 +5,7 @@ function $importDefault(module) {
|
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
7
|
// Third party dependencies.
|
|
8
|
+
import { mergeTwClassName } from "@metamask-previews/design-system-shared";
|
|
8
9
|
import $React, { useMemo } from "react";
|
|
9
10
|
const React = $importDefault($React);
|
|
10
11
|
import { HeaderBase } from "../HeaderBase/index.mjs";
|
|
@@ -49,7 +50,7 @@ export const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, chi
|
|
|
49
50
|
}
|
|
50
51
|
return null;
|
|
51
52
|
};
|
|
52
|
-
return (<HeaderBase testID={testID} startButtonIconProps={resolvedStartButtonIconProps} endButtonIconProps={resolvedEndButtonIconProps} {...headerBaseProps} twClassName={
|
|
53
|
+
return (<HeaderBase testID={testID} startButtonIconProps={resolvedStartButtonIconProps} endButtonIconProps={resolvedEndButtonIconProps} {...headerBaseProps} twClassName={mergeTwClassName('px-2', twClassName)}>
|
|
53
54
|
{renderContent()}
|
|
54
55
|
</HeaderBase>);
|
|
55
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderStandard.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AAIvC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,0BAA0B,EAAE,gEAAsD;AAK3F,MAAM,CAAC,MAAM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,CAAC,kBAAkB,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEpD,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC;SACjB;QACD,IAAI,KAAK,EAAE;YACT,OAAO,CACL,CAAC,0BAA0B,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,EAC7B,CACH,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"HeaderStandard.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EAAE,gBAAgB,EAAE,gDAAgD;AAC3E,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AAIvC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,0BAA0B,EAAE,gEAAsD;AAK3F,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,OAAO,CAAC,GAAG,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AU,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,EAC7B,CACH,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAEnD;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { HeaderStandardCenterColumn } from '../temp-components/HeaderStandardCenterColumn';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n return (\n <HeaderStandardCenterColumn\n title={title}\n titleProps={titleProps}\n subtitle={subtitle}\n subtitleProps={subtitleProps}\n />\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={mergeTwClassName('px-2', twClassName)}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.HeaderSubpage = void 0;
|
|
27
|
+
// Third party dependencies.
|
|
28
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
29
|
+
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
31
|
+
const react_native_1 = require("react-native");
|
|
32
|
+
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
33
|
+
// External dependencies.
|
|
34
|
+
const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
|
|
35
|
+
const Icon_1 = require("../Icon/index.cjs");
|
|
36
|
+
const ListItem_1 = require("../ListItem/index.cjs");
|
|
37
|
+
const renderEndButtonIcons = (endButtonIconProps) => endButtonIconProps
|
|
38
|
+
.map((iconProps, originalIndex) => ({
|
|
39
|
+
iconProps,
|
|
40
|
+
originalIndex,
|
|
41
|
+
}))
|
|
42
|
+
.reverse()
|
|
43
|
+
.map(({ iconProps, originalIndex }) => (<ButtonIcon_1.ButtonIcon key={`end-button-icon-${originalIndex}`} size={ButtonIcon_1.ButtonIconSize.Md} {...iconProps}/>));
|
|
44
|
+
const HeaderSubpage = ({ onBack, backButtonProps, onClose, closeButtonProps, startButtonIconProps, endButtonIconProps, startAccessory, endAccessory, includesTopInset = false, twClassName = '', style, accessoryGap = 2, testID, ...listItemProps }) => {
|
|
45
|
+
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
46
|
+
const insets = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
|
|
47
|
+
const resolvedStartAccessory = (0, react_1.useMemo)(() => {
|
|
48
|
+
if (startAccessory) {
|
|
49
|
+
return startAccessory;
|
|
50
|
+
}
|
|
51
|
+
if (startButtonIconProps) {
|
|
52
|
+
return <ButtonIcon_1.ButtonIcon size={ButtonIcon_1.ButtonIconSize.Md} {...startButtonIconProps}/>;
|
|
53
|
+
}
|
|
54
|
+
if (onBack || backButtonProps) {
|
|
55
|
+
return (<ButtonIcon_1.ButtonIcon iconName={Icon_1.IconName.ArrowLeft} size={ButtonIcon_1.ButtonIconSize.Md} {...(backButtonProps ?? {})} onPress={backButtonProps?.onPress ?? onBack}/>);
|
|
56
|
+
}
|
|
57
|
+
return undefined;
|
|
58
|
+
}, [startAccessory, startButtonIconProps, onBack, backButtonProps]);
|
|
59
|
+
const resolvedEndButtonIconProps = (0, react_1.useMemo)(() => {
|
|
60
|
+
const props = [];
|
|
61
|
+
if (onClose || closeButtonProps) {
|
|
62
|
+
props.push({
|
|
63
|
+
iconName: Icon_1.IconName.Close,
|
|
64
|
+
...(closeButtonProps || {}),
|
|
65
|
+
onPress: closeButtonProps?.onPress ?? onClose,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
if (endButtonIconProps) {
|
|
69
|
+
props.push(...endButtonIconProps);
|
|
70
|
+
}
|
|
71
|
+
return props.length > 0 ? props : undefined;
|
|
72
|
+
}, [endButtonIconProps, onClose, closeButtonProps]);
|
|
73
|
+
const resolvedEndAccessory = (0, react_1.useMemo)(() => {
|
|
74
|
+
if (endAccessory) {
|
|
75
|
+
return endAccessory;
|
|
76
|
+
}
|
|
77
|
+
if (resolvedEndButtonIconProps && resolvedEndButtonIconProps.length > 0) {
|
|
78
|
+
const icons = renderEndButtonIcons(resolvedEndButtonIconProps);
|
|
79
|
+
if (resolvedEndButtonIconProps.length > 1) {
|
|
80
|
+
return <react_native_1.View style={tw.style('flex-row gap-2')}>{icons}</react_native_1.View>;
|
|
81
|
+
}
|
|
82
|
+
return icons;
|
|
83
|
+
}
|
|
84
|
+
return undefined;
|
|
85
|
+
}, [endAccessory, resolvedEndButtonIconProps, tw]);
|
|
86
|
+
return (<ListItem_1.ListItem {...listItemProps} testID={testID} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory} accessoryGap={accessoryGap} twClassName={(0, design_system_shared_1.mergeTwClassName)('h-14 px-2 py-0 justify-center', twClassName)} style={[includesTopInset && { marginTop: insets.top }, style]}/>);
|
|
87
|
+
};
|
|
88
|
+
exports.HeaderSubpage = HeaderSubpage;
|
|
89
|
+
exports.HeaderSubpage.displayName = 'HeaderSubpage';
|
|
90
|
+
//# sourceMappingURL=HeaderSubpage.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderSubpage.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,kFAA2E;AAC3E,8FAA4E;AAC5E,+CAAuC;AACvC,+CAAoC;AACpC,mFAAmE;AAEnE,yBAAyB;AACzB,wDAA2D;AAE3D,4CAAmC;AACnC,oDAAuC;AAKvC,MAAM,oBAAoB,GAAG,CAAC,kBAAqC,EAAE,EAAE,CACrE,kBAAkB;KACf,GAAG,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC;IAClC,SAAS;IACT,aAAa;CACd,CAAC,CAAC;KACF,OAAO,EAAE;KACT,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CACrC,CAAC,uBAAU,CACT,GAAG,CAAC,CAAC,mBAAmB,aAAa,EAAE,CAAC,CACxC,IAAI,CAAC,CAAC,2BAAc,CAAC,EAAE,CAAC,CACxB,IAAI,SAAS,CAAC,EACd,CACH,CAAC,CAAC;AAEA,MAAM,aAAa,GAAiC,CAAC,EAC1D,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,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H,CAAC;AACJ,CAAC,CAAC;AA5FW,QAAA,aAAa,iBA4FxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["// Third party dependencies.\nimport { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\n// External dependencies.\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { IconName } from '../Icon';\nimport { ListItem } from '../ListItem';\n\n// Internal dependencies.\nimport type { HeaderSubpageProps } from './HeaderSubpage.types';\n\nconst renderEndButtonIcons = (endButtonIconProps: ButtonIconProps[]) =>\n endButtonIconProps\n .map((iconProps, originalIndex) => ({\n iconProps,\n originalIndex,\n }))\n .reverse()\n .map(({ iconProps, originalIndex }) => (\n <ButtonIcon\n key={`end-button-icon-${originalIndex}`}\n size={ButtonIconSize.Md}\n {...iconProps}\n />\n ));\n\nexport const HeaderSubpage: React.FC<HeaderSubpageProps> = ({\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n startButtonIconProps,\n endButtonIconProps,\n startAccessory,\n endAccessory,\n includesTopInset = false,\n twClassName = '',\n style,\n accessoryGap = 2,\n testID,\n ...listItemProps\n}) => {\n const tw = useTailwind();\n const insets = useSafeAreaInsets();\n\n const resolvedStartAccessory = useMemo(() => {\n if (startAccessory) {\n return startAccessory;\n }\n\n if (startButtonIconProps) {\n return <ButtonIcon size={ButtonIconSize.Md} {...startButtonIconProps} />;\n }\n\n if (onBack || backButtonProps) {\n return (\n <ButtonIcon\n iconName={IconName.ArrowLeft}\n size={ButtonIconSize.Md}\n {...(backButtonProps ?? {})}\n onPress={backButtonProps?.onPress ?? onBack}\n />\n );\n }\n\n return undefined;\n }, [startAccessory, startButtonIconProps, onBack, backButtonProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n props.push({\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n });\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const resolvedEndAccessory = useMemo(() => {\n if (endAccessory) {\n return endAccessory;\n }\n\n if (resolvedEndButtonIconProps && resolvedEndButtonIconProps.length > 0) {\n const icons = renderEndButtonIcons(resolvedEndButtonIconProps);\n\n if (resolvedEndButtonIconProps.length > 1) {\n return <View style={tw.style('flex-row gap-2')}>{icons}</View>;\n }\n\n return icons;\n }\n\n return undefined;\n }, [endAccessory, resolvedEndButtonIconProps, tw]);\n\n return (\n <ListItem\n {...listItemProps}\n testID={testID}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n accessoryGap={accessoryGap}\n twClassName={mergeTwClassName(\n 'h-14 px-2 py-0 justify-center',\n twClassName,\n )}\n style={[includesTopInset && { marginTop: insets.top }, style]}\n />\n );\n};\n\nHeaderSubpage.displayName = 'HeaderSubpage';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderSubpage.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAkB,cAAc;AAWvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAiBhE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA4FtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderSubpage.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAkB,cAAc;AAWvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAiBhE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA4FtD,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
// Third party dependencies.
|
|
8
|
+
import { mergeTwClassName } from "@metamask-previews/design-system-shared";
|
|
9
|
+
import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
|
|
10
|
+
import $React, { useMemo } from "react";
|
|
11
|
+
const React = $importDefault($React);
|
|
12
|
+
import { View } from "react-native";
|
|
13
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
14
|
+
// External dependencies.
|
|
15
|
+
import { ButtonIcon, ButtonIconSize } from "../ButtonIcon/index.mjs";
|
|
16
|
+
import { IconName } from "../Icon/index.mjs";
|
|
17
|
+
import { ListItem } from "../ListItem/index.mjs";
|
|
18
|
+
const renderEndButtonIcons = (endButtonIconProps) => endButtonIconProps
|
|
19
|
+
.map((iconProps, originalIndex) => ({
|
|
20
|
+
iconProps,
|
|
21
|
+
originalIndex,
|
|
22
|
+
}))
|
|
23
|
+
.reverse()
|
|
24
|
+
.map(({ iconProps, originalIndex }) => (<ButtonIcon key={`end-button-icon-${originalIndex}`} size={ButtonIconSize.Md} {...iconProps}/>));
|
|
25
|
+
export const HeaderSubpage = ({ onBack, backButtonProps, onClose, closeButtonProps, startButtonIconProps, endButtonIconProps, startAccessory, endAccessory, includesTopInset = false, twClassName = '', style, accessoryGap = 2, testID, ...listItemProps }) => {
|
|
26
|
+
const tw = useTailwind();
|
|
27
|
+
const insets = useSafeAreaInsets();
|
|
28
|
+
const resolvedStartAccessory = useMemo(() => {
|
|
29
|
+
if (startAccessory) {
|
|
30
|
+
return startAccessory;
|
|
31
|
+
}
|
|
32
|
+
if (startButtonIconProps) {
|
|
33
|
+
return <ButtonIcon size={ButtonIconSize.Md} {...startButtonIconProps}/>;
|
|
34
|
+
}
|
|
35
|
+
if (onBack || backButtonProps) {
|
|
36
|
+
return (<ButtonIcon iconName={IconName.ArrowLeft} size={ButtonIconSize.Md} {...(backButtonProps ?? {})} onPress={backButtonProps?.onPress ?? onBack}/>);
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}, [startAccessory, startButtonIconProps, onBack, backButtonProps]);
|
|
40
|
+
const resolvedEndButtonIconProps = useMemo(() => {
|
|
41
|
+
const props = [];
|
|
42
|
+
if (onClose || closeButtonProps) {
|
|
43
|
+
props.push({
|
|
44
|
+
iconName: IconName.Close,
|
|
45
|
+
...(closeButtonProps || {}),
|
|
46
|
+
onPress: closeButtonProps?.onPress ?? onClose,
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
if (endButtonIconProps) {
|
|
50
|
+
props.push(...endButtonIconProps);
|
|
51
|
+
}
|
|
52
|
+
return props.length > 0 ? props : undefined;
|
|
53
|
+
}, [endButtonIconProps, onClose, closeButtonProps]);
|
|
54
|
+
const resolvedEndAccessory = useMemo(() => {
|
|
55
|
+
if (endAccessory) {
|
|
56
|
+
return endAccessory;
|
|
57
|
+
}
|
|
58
|
+
if (resolvedEndButtonIconProps && resolvedEndButtonIconProps.length > 0) {
|
|
59
|
+
const icons = renderEndButtonIcons(resolvedEndButtonIconProps);
|
|
60
|
+
if (resolvedEndButtonIconProps.length > 1) {
|
|
61
|
+
return <View style={tw.style('flex-row gap-2')}>{icons}</View>;
|
|
62
|
+
}
|
|
63
|
+
return icons;
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
}, [endAccessory, resolvedEndButtonIconProps, tw]);
|
|
67
|
+
return (<ListItem {...listItemProps} testID={testID} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory} accessoryGap={accessoryGap} twClassName={mergeTwClassName('h-14 px-2 py-0 justify-center', twClassName)} style={[includesTopInset && { marginTop: insets.top }, style]}/>);
|
|
68
|
+
};
|
|
69
|
+
HeaderSubpage.displayName = 'HeaderSubpage';
|
|
70
|
+
//# sourceMappingURL=HeaderSubpage.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderSubpage.mjs","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EAAE,gBAAgB,EAAE,gDAAgD;AAC3E,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,IAAI,EAAE,qBAAqB;AACpC,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;AAEnE,yBAAyB;AACzB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAE3D,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAKvC,MAAM,oBAAoB,GAAG,CAAC,kBAAqC,EAAE,EAAE,CACrE,kBAAkB;KACf,GAAG,CAAC,CAAC,SAAS,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC;IAClC,SAAS;IACT,aAAa;CACd,CAAC,CAAC;KACF,OAAO,EAAE;KACT,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CACrC,CAAC,UAAU,CACT,GAAG,CAAC,CAAC,mBAAmB,aAAa,EAAE,CAAC,CACxC,IAAI,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,CACxB,IAAI,SAAS,CAAC,EACd,CACH,CAAC,CAAC;AAEP,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,gBAAgB,GAAG,KAAK,EACxB,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,Y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';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\n// External dependencies.\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { IconName } from '../Icon';\nimport { ListItem } from '../ListItem';\n\n// Internal dependencies.\nimport type { HeaderSubpageProps } from './HeaderSubpage.types';\n\nconst renderEndButtonIcons = (endButtonIconProps: ButtonIconProps[]) =>\n endButtonIconProps\n .map((iconProps, originalIndex) => ({\n iconProps,\n originalIndex,\n }))\n .reverse()\n .map(({ iconProps, originalIndex }) => (\n <ButtonIcon\n key={`end-button-icon-${originalIndex}`}\n size={ButtonIconSize.Md}\n {...iconProps}\n />\n ));\n\nexport const HeaderSubpage: React.FC<HeaderSubpageProps> = ({\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n startButtonIconProps,\n endButtonIconProps,\n startAccessory,\n endAccessory,\n includesTopInset = false,\n twClassName = '',\n style,\n accessoryGap = 2,\n testID,\n ...listItemProps\n}) => {\n const tw = useTailwind();\n const insets = useSafeAreaInsets();\n\n const resolvedStartAccessory = useMemo(() => {\n if (startAccessory) {\n return startAccessory;\n }\n\n if (startButtonIconProps) {\n return <ButtonIcon size={ButtonIconSize.Md} {...startButtonIconProps} />;\n }\n\n if (onBack || backButtonProps) {\n return (\n <ButtonIcon\n iconName={IconName.ArrowLeft}\n size={ButtonIconSize.Md}\n {...(backButtonProps ?? {})}\n onPress={backButtonProps?.onPress ?? onBack}\n />\n );\n }\n\n return undefined;\n }, [startAccessory, startButtonIconProps, onBack, backButtonProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n props.push({\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n });\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const resolvedEndAccessory = useMemo(() => {\n if (endAccessory) {\n return endAccessory;\n }\n\n if (resolvedEndButtonIconProps && resolvedEndButtonIconProps.length > 0) {\n const icons = renderEndButtonIcons(resolvedEndButtonIconProps);\n\n if (resolvedEndButtonIconProps.length > 1) {\n return <View style={tw.style('flex-row gap-2')}>{icons}</View>;\n }\n\n return icons;\n }\n\n return undefined;\n }, [endAccessory, resolvedEndButtonIconProps, tw]);\n\n return (\n <ListItem\n {...listItemProps}\n testID={testID}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n accessoryGap={accessoryGap}\n twClassName={mergeTwClassName(\n 'h-14 px-2 py-0 justify-center',\n twClassName,\n )}\n style={[includesTopInset && { marginTop: insets.top }, style]}\n />\n );\n};\n\nHeaderSubpage.displayName = 'HeaderSubpage';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderSubpage.types.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { ListItemProps } from '../ListItem';\n\n/**\n * HeaderSubpage component props.\n *\n * Subpage navigation row built on {@link ListItem} with optional back/close\n * shortcuts matching {@link HeaderStandard}.\n */\nexport type HeaderSubpageProps = Omit<\n ListItemProps,\n 'startAccessory' | 'endAccessory' | 'isInteractive' | 'children'\n> & {\n /**\n * Callback when the back button is pressed.\n * If provided, a back button will be rendered as the start accessory.\n */\n onBack?: () => void;\n /**\n * Additional props to pass to the back ButtonIcon.\n * If provided, a back button will be rendered with these props spread.\n */\n backButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n /**\n * Callback when the close button is pressed.\n * If provided, a close button will be added to the end accessories.\n */\n onClose?: () => void;\n /**\n * Additional props to pass to the close ButtonIcon.\n * If provided, a close button will be added with these props spread.\n */\n closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n /**\n * Optional ButtonIcon props to render as the start accessory.\n * Only used if `startAccessory` is not provided.\n */\n startButtonIconProps?: ButtonIconProps;\n /**\n * Optional array of ButtonIcon props to render as additional end accessories.\n * Rendered in reverse order (first item appears rightmost).\n * Only used if `endAccessory` is not provided.\n */\n endButtonIconProps?: ButtonIconProps[];\n /**\n * Optional content before the ListItem content row.\n * Takes priority over `startButtonIconProps` and back shortcuts.\n */\n startAccessory?: ReactNode;\n /**\n * Optional content after the ListItem content row.\n * Takes priority over `endButtonIconProps` and close shortcuts.\n */\n endAccessory?: ReactNode;\n /**\n * When true, applies top safe-area inset as `marginTop` on the root ListItem.\n *\n * @default false\n */\n includesTopInset?: boolean;\n};\n"]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ButtonIconProps } from "../ButtonIcon/index.cjs";
|
|
3
|
+
import type { ListItemProps } from "../ListItem/index.cjs";
|
|
4
|
+
/**
|
|
5
|
+
* HeaderSubpage component props.
|
|
6
|
+
*
|
|
7
|
+
* Subpage navigation row built on {@link ListItem} with optional back/close
|
|
8
|
+
* shortcuts matching {@link HeaderStandard}.
|
|
9
|
+
*/
|
|
10
|
+
export type HeaderSubpageProps = Omit<ListItemProps, 'startAccessory' | 'endAccessory' | 'isInteractive' | 'children'> & {
|
|
11
|
+
/**
|
|
12
|
+
* Callback when the back button is pressed.
|
|
13
|
+
* If provided, a back button will be rendered as the start accessory.
|
|
14
|
+
*/
|
|
15
|
+
onBack?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Additional props to pass to the back ButtonIcon.
|
|
18
|
+
* If provided, a back button will be rendered with these props spread.
|
|
19
|
+
*/
|
|
20
|
+
backButtonProps?: Omit<ButtonIconProps, 'iconName'>;
|
|
21
|
+
/**
|
|
22
|
+
* Callback when the close button is pressed.
|
|
23
|
+
* If provided, a close button will be added to the end accessories.
|
|
24
|
+
*/
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Additional props to pass to the close ButtonIcon.
|
|
28
|
+
* If provided, a close button will be added with these props spread.
|
|
29
|
+
*/
|
|
30
|
+
closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;
|
|
31
|
+
/**
|
|
32
|
+
* Optional ButtonIcon props to render as the start accessory.
|
|
33
|
+
* Only used if `startAccessory` is not provided.
|
|
34
|
+
*/
|
|
35
|
+
startButtonIconProps?: ButtonIconProps;
|
|
36
|
+
/**
|
|
37
|
+
* Optional array of ButtonIcon props to render as additional end accessories.
|
|
38
|
+
* Rendered in reverse order (first item appears rightmost).
|
|
39
|
+
* Only used if `endAccessory` is not provided.
|
|
40
|
+
*/
|
|
41
|
+
endButtonIconProps?: ButtonIconProps[];
|
|
42
|
+
/**
|
|
43
|
+
* Optional content before the ListItem content row.
|
|
44
|
+
* Takes priority over `startButtonIconProps` and back shortcuts.
|
|
45
|
+
*/
|
|
46
|
+
startAccessory?: ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Optional content after the ListItem content row.
|
|
49
|
+
* Takes priority over `endButtonIconProps` and close shortcuts.
|
|
50
|
+
*/
|
|
51
|
+
endAccessory?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* When true, applies top safe-area inset as `marginTop` on the root ListItem.
|
|
54
|
+
*
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
includesTopInset?: boolean;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=HeaderSubpage.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderSubpage.types.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,8BAAoB;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACb,gBAAgB,GAAG,cAAc,GAAG,eAAe,GAAG,UAAU,CACjE,GAAG;IACF;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACrD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,eAAe,CAAC;IACvC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;IACvC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ButtonIconProps } from "../ButtonIcon/index.mjs";
|
|
3
|
+
import type { ListItemProps } from "../ListItem/index.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* HeaderSubpage component props.
|
|
6
|
+
*
|
|
7
|
+
* Subpage navigation row built on {@link ListItem} with optional back/close
|
|
8
|
+
* shortcuts matching {@link HeaderStandard}.
|
|
9
|
+
*/
|
|
10
|
+
export type HeaderSubpageProps = Omit<ListItemProps, 'startAccessory' | 'endAccessory' | 'isInteractive' | 'children'> & {
|
|
11
|
+
/**
|
|
12
|
+
* Callback when the back button is pressed.
|
|
13
|
+
* If provided, a back button will be rendered as the start accessory.
|
|
14
|
+
*/
|
|
15
|
+
onBack?: () => void;
|
|
16
|
+
/**
|
|
17
|
+
* Additional props to pass to the back ButtonIcon.
|
|
18
|
+
* If provided, a back button will be rendered with these props spread.
|
|
19
|
+
*/
|
|
20
|
+
backButtonProps?: Omit<ButtonIconProps, 'iconName'>;
|
|
21
|
+
/**
|
|
22
|
+
* Callback when the close button is pressed.
|
|
23
|
+
* If provided, a close button will be added to the end accessories.
|
|
24
|
+
*/
|
|
25
|
+
onClose?: () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Additional props to pass to the close ButtonIcon.
|
|
28
|
+
* If provided, a close button will be added with these props spread.
|
|
29
|
+
*/
|
|
30
|
+
closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;
|
|
31
|
+
/**
|
|
32
|
+
* Optional ButtonIcon props to render as the start accessory.
|
|
33
|
+
* Only used if `startAccessory` is not provided.
|
|
34
|
+
*/
|
|
35
|
+
startButtonIconProps?: ButtonIconProps;
|
|
36
|
+
/**
|
|
37
|
+
* Optional array of ButtonIcon props to render as additional end accessories.
|
|
38
|
+
* Rendered in reverse order (first item appears rightmost).
|
|
39
|
+
* Only used if `endAccessory` is not provided.
|
|
40
|
+
*/
|
|
41
|
+
endButtonIconProps?: ButtonIconProps[];
|
|
42
|
+
/**
|
|
43
|
+
* Optional content before the ListItem content row.
|
|
44
|
+
* Takes priority over `startButtonIconProps` and back shortcuts.
|
|
45
|
+
*/
|
|
46
|
+
startAccessory?: ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* Optional content after the ListItem content row.
|
|
49
|
+
* Takes priority over `endButtonIconProps` and close shortcuts.
|
|
50
|
+
*/
|
|
51
|
+
endAccessory?: ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* When true, applies top safe-area inset as `marginTop` on the root ListItem.
|
|
54
|
+
*
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
includesTopInset?: boolean;
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=HeaderSubpage.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderSubpage.types.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,8BAAoB;AAEjD;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACb,gBAAgB,GAAG,cAAc,GAAG,eAAe,GAAG,UAAU,CACjE,GAAG;IACF;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACrD;;;OAGG;IACH,oBAAoB,CAAC,EAAE,eAAe,CAAC;IACvC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;IACvC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderSubpage.types.mjs","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/HeaderSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { ListItemProps } from '../ListItem';\n\n/**\n * HeaderSubpage component props.\n *\n * Subpage navigation row built on {@link ListItem} with optional back/close\n * shortcuts matching {@link HeaderStandard}.\n */\nexport type HeaderSubpageProps = Omit<\n ListItemProps,\n 'startAccessory' | 'endAccessory' | 'isInteractive' | 'children'\n> & {\n /**\n * Callback when the back button is pressed.\n * If provided, a back button will be rendered as the start accessory.\n */\n onBack?: () => void;\n /**\n * Additional props to pass to the back ButtonIcon.\n * If provided, a back button will be rendered with these props spread.\n */\n backButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n /**\n * Callback when the close button is pressed.\n * If provided, a close button will be added to the end accessories.\n */\n onClose?: () => void;\n /**\n * Additional props to pass to the close ButtonIcon.\n * If provided, a close button will be added with these props spread.\n */\n closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n /**\n * Optional ButtonIcon props to render as the start accessory.\n * Only used if `startAccessory` is not provided.\n */\n startButtonIconProps?: ButtonIconProps;\n /**\n * Optional array of ButtonIcon props to render as additional end accessories.\n * Rendered in reverse order (first item appears rightmost).\n * Only used if `endAccessory` is not provided.\n */\n endButtonIconProps?: ButtonIconProps[];\n /**\n * Optional content before the ListItem content row.\n * Takes priority over `startButtonIconProps` and back shortcuts.\n */\n startAccessory?: ReactNode;\n /**\n * Optional content after the ListItem content row.\n * Takes priority over `endButtonIconProps` and close shortcuts.\n */\n endAccessory?: ReactNode;\n /**\n * When true, applies top safe-area inset as `marginTop` on the root ListItem.\n *\n * @default false\n */\n includesTopInset?: boolean;\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HeaderSubpage = void 0;
|
|
4
|
+
var HeaderSubpage_1 = require("./HeaderSubpage.cjs");
|
|
5
|
+
Object.defineProperty(exports, "HeaderSubpage", { enumerable: true, get: function () { return HeaderSubpage_1.HeaderSubpage; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/index.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAAvC,8GAAA,aAAa,OAAA","sourcesContent":["export { HeaderSubpage } from './HeaderSubpage';\nexport type { HeaderSubpageProps } from './HeaderSubpage.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSubpage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
|