@metamask/design-system-react-native 0.28.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -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/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 +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.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/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/Toast.types.cjs +2 -10
- package/dist/components/Toast/Toast.types.cjs.map +1 -1
- package/dist/components/Toast/Toast.types.d.cts +4 -11
- package/dist/components/Toast/Toast.types.d.cts.map +1 -1
- package/dist/components/Toast/Toast.types.d.mts +4 -11
- package/dist/components/Toast/Toast.types.d.mts.map +1 -1
- package/dist/components/Toast/Toast.types.mjs +2 -10
- package/dist/components/Toast/Toast.types.mjs.map +1 -1
- package/dist/components/Toast/index.cjs +3 -5
- package/dist/components/Toast/index.cjs.map +1 -1
- package/dist/components/Toast/index.d.cts +2 -2
- package/dist/components/Toast/index.d.cts.map +1 -1
- package/dist/components/Toast/index.d.mts +2 -2
- package/dist/components/Toast/index.d.mts.map +1 -1
- package/dist/components/Toast/index.mjs +2 -2
- 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/package.json +7 -5
- 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,13 +1,10 @@
|
|
|
1
|
+
import type { TextButtonPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { TextProps } from "../Text/index.cjs";
|
|
2
3
|
/**
|
|
3
4
|
* Props for `TextButton`, a text-only control for links and inline actions.
|
|
4
5
|
* Extends {@link Text} props.
|
|
5
6
|
*/
|
|
6
|
-
export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & {
|
|
7
|
-
/**
|
|
8
|
-
* Content shown as the label.
|
|
9
|
-
*/
|
|
10
|
-
children: React.ReactNode;
|
|
7
|
+
export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & TextButtonPropsShared & {
|
|
11
8
|
/**
|
|
12
9
|
* Called when the user presses the label. Primary interaction for this control.
|
|
13
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,
|
|
1
|
+
{"version":3,"file":"TextButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uCAAuC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GACC,qBAAqB,GAAG;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import type { TextButtonPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { TextProps } from "../Text/index.mjs";
|
|
2
3
|
/**
|
|
3
4
|
* Props for `TextButton`, a text-only control for links and inline actions.
|
|
4
5
|
* Extends {@link Text} props.
|
|
5
6
|
*/
|
|
6
|
-
export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & {
|
|
7
|
-
/**
|
|
8
|
-
* Content shown as the label.
|
|
9
|
-
*/
|
|
10
|
-
children: React.ReactNode;
|
|
7
|
+
export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & TextButtonPropsShared & {
|
|
11
8
|
/**
|
|
12
9
|
* Called when the user presses the label. Primary interaction for this control.
|
|
13
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,
|
|
1
|
+
{"version":3,"file":"TextButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uCAAuC;AAE5E,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GACC,qBAAqB,GAAG;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextButton.types.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Props for `TextButton`, a text-only control for links and inline actions.\n * Extends {@link Text} props.\n */\nexport type TextButtonProps = Omit<\n TextProps,\n 'children' | 'color' | 'onPress'\n> & {\n
|
|
1
|
+
{"version":3,"file":"TextButton.types.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextButtonPropsShared } from '@metamask/design-system-shared';\n\nimport type { TextProps } from '../Text';\n\n/**\n * Props for `TextButton`, a text-only control for links and inline actions.\n * Extends {@link Text} props.\n */\nexport type TextButtonProps = Omit<\n TextProps,\n 'children' | 'color' | 'onPress'\n> &\n TextButtonPropsShared & {\n /**\n * Called when the user presses the label. Primary interaction for this control.\n */\n onPress?: TextProps['onPress'];\n };\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TextField = void 0;
|
|
4
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
4
5
|
const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
|
|
5
6
|
const react_1 = require("react");
|
|
6
7
|
const react_native_1 = require("react-native");
|
|
@@ -27,7 +28,7 @@ exports.TextField = (0, react_1.forwardRef)(({ value, onChangeText, placeholder,
|
|
|
27
28
|
style,
|
|
28
29
|
]}>
|
|
29
30
|
{startAccessory}
|
|
30
|
-
{inputElement || (<Input_1.Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled twClassName={
|
|
31
|
+
{inputElement || (<Input_1.Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled twClassName={(0, design_system_shared_1.mergeTwClassName)('min-h-0 flex-1 justify-center h-[46px] bg-transparent border-0', inputTwClassNameFromProps)} numberOfLines={1} multiline={false}/>)}
|
|
31
32
|
{endAccessory}
|
|
32
33
|
</Box_1.Box>);
|
|
33
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.cjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";;;AAAA,qFAAmE;AACnE,iCAA0D;AAC1D,+CAAoC;AAEpC,0CAA6B;AAC7B,8CAAiC;AAKpB,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CACE,EACE,KAAK,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,MAAM,EACN,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,KAAK,EACL,WAAW,EACX,MAAM,EACN,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,IAAA,wCAAW,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CAAC,CAChC,GAAG,CAAC,CAAC,QAAQ,CAAC,CACd,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,qBAAqB,CACrB,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"TextField.cjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";;;AAAA,yEAAkE;AAClE,qFAAmE;AACnE,iCAA0D;AAC1D,+CAAoC;AAEpC,0CAA6B;AAC7B,8CAAiC;AAKpB,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CACE,EACE,KAAK,EACL,YAAY,EACZ,WAAW,EACX,UAAU,EACV,MAAM,EACN,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,UAAU,EACV,QAAQ,EACR,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,KAAK,EACL,WAAW,EACX,MAAM,EACN,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,EACJ,WAAW,EAAE,yBAAyB,EACtC,GAAG,2BAA2B,EAC/B,GAAG,UAAU,IAAI,EAAE,CAAC;IAErB,MAAM,aAAa,GAAG,IAAA,mBAAW,EAC/B,CAAC,CAAmD,EAAE,EAAE;QACtD,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,KAAK,CAAC,C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,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,qBAAqB,CACrB,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAC3B,gEAAgE,EAChE,yBAAyB,CAC1B,CAAC,CACF,aAAa,CAAC,CAAC,CAAC,CAAC,CACjB,SAAS,CAAC,CAAC,KAAK,CAAC,EACjB,CACH,CACD;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { mergeTwClassName } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport { forwardRef, useCallback, useState } from 'react';\nimport { View } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Input } from '../Input';\nimport type { InputProps } from '../Input/Input.types';\n\nimport type { TextFieldProps } from './TextField.types';\n\nexport const TextField = forwardRef<View, TextFieldProps>(\n (\n {\n value,\n onChangeText,\n placeholder,\n isReadOnly,\n onBlur,\n onFocus,\n autoFocus = false,\n inputProps,\n inputRef,\n isDisabled = false,\n isError = false,\n inputElement,\n startAccessory,\n endAccessory,\n style,\n twClassName,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n\n const {\n twClassName: inputTwClassNameFromProps,\n ...inputRestWithoutTwClassName\n } = inputProps ?? {};\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n return (\n <Box\n ref={ref}\n {...props}\n testID={testID}\n accessible={false}\n style={[\n tw.style(\n 'flex-row',\n 'items-center',\n 'gap-3',\n 'rounded-lg',\n 'h-12',\n 'border',\n 'px-4',\n 'bg-muted',\n isDisabled && 'border-muted',\n !isDisabled && isError && 'border-error-default',\n !isDisabled && !isError && isFocused && 'border-default',\n !isDisabled && !isError && !isFocused && 'border-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n style,\n ]}\n >\n {startAccessory}\n {inputElement || (\n <Input\n {...inputRestWithoutTwClassName}\n ref={inputRef}\n value={value}\n onChangeText={onChangeText}\n placeholder={placeholder}\n isReadOnly={isReadOnly}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n twClassName={mergeTwClassName(\n 'min-h-0 flex-1 justify-center h-[46px] bg-transparent border-0',\n inputTwClassNameFromProps,\n )}\n numberOfLines={1}\n multiline={false}\n />\n )}\n {endAccessory}\n </Box>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextField.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,qBAAqB;AAQpC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qVAwGrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.d.mts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextField.d.mts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,qBAAqB;AAQpC,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qVAwGrB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mergeTwClassName } from "@metamask/design-system-shared";
|
|
1
2
|
import { useTailwind } from "@metamask/design-system-twrnc-preset";
|
|
2
3
|
import { forwardRef, useCallback, useState } from "react";
|
|
3
4
|
import { View } from "react-native";
|
|
@@ -24,7 +25,7 @@ export const TextField = forwardRef(({ value, onChangeText, placeholder, isReadO
|
|
|
24
25
|
style,
|
|
25
26
|
]}>
|
|
26
27
|
{startAccessory}
|
|
27
|
-
{inputElement || (<Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled twClassName={
|
|
28
|
+
{inputElement || (<Input {...inputRestWithoutTwClassName} ref={inputRef} value={value} onChangeText={onChangeText} placeholder={placeholder} isReadOnly={isReadOnly} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled twClassName={mergeTwClassName('min-h-0 flex-1 justify-center h-[46px] bg-transparent border-0', inputTwClassNameFromProps)} numberOfLines={1} multiline={false}/>)}
|
|
28
29
|
{endAccessory}
|
|
29
30
|
</Box>);
|
|
30
31
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.mjs","sour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CAAC,UAAU,EAAE,OAAO,CAAC,CACtB,CAAC;IAEF,OAAO,CACL,CAAC,GAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,UAAU,CAAC,CAAC,KAAK,CAAC,CAClB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,UAAU,EACV,cAAc,EACd,OAAO,EACP,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,UAAU,EACV,UAAU,IAAI,cAAc,EAC5B,CAAC,UAAU,IAAI,OAAO,IAAI,sBAAsB,EAChD,CAAC,UAAU,IAAI,CAAC,OAAO,IAAI,SAAS,IAAI,gBAAgB,EACxD,CAAC,UAAU,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,IAAI,cAAc,EACvD,UAAU,IAAI,YAAY,EAC1B,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CAEF;QAAA,CAAC,cAAc,CACf;QAAA,CAAC,YAAY,IAAI,CACf,CAAC,KAAK,CACJ,IAAI,2BAA2B,CAAC,CAChC,GAAG,CAAC,CAAC,QAAQ,CAAC,CACd,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,qBAAqB,CACrB,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"TextField.mjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uCAAuC;AAClE,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OA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mergeTwClassName } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport { forwardRef, useCallback, useState } from 'react';\nimport { View } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Input } from '../Input';\nimport type { InputProps } from '../Input/Input.types';\n\nimport type { TextFieldProps } from './TextField.types';\n\nexport const TextField = forwardRef<View, TextFieldProps>(\n (\n {\n value,\n onChangeText,\n placeholder,\n isReadOnly,\n onBlur,\n onFocus,\n autoFocus = false,\n inputProps,\n inputRef,\n isDisabled = false,\n isError = false,\n inputElement,\n startAccessory,\n endAccessory,\n style,\n twClassName,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n\n const {\n twClassName: inputTwClassNameFromProps,\n ...inputRestWithoutTwClassName\n } = inputProps ?? {};\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n return (\n <Box\n ref={ref}\n {...props}\n testID={testID}\n accessible={false}\n style={[\n tw.style(\n 'flex-row',\n 'items-center',\n 'gap-3',\n 'rounded-lg',\n 'h-12',\n 'border',\n 'px-4',\n 'bg-muted',\n isDisabled && 'border-muted',\n !isDisabled && isError && 'border-error-default',\n !isDisabled && !isError && isFocused && 'border-default',\n !isDisabled && !isError && !isFocused && 'border-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n style,\n ]}\n >\n {startAccessory}\n {inputElement || (\n <Input\n {...inputRestWithoutTwClassName}\n ref={inputRef}\n value={value}\n onChangeText={onChangeText}\n placeholder={placeholder}\n isReadOnly={isReadOnly}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n twClassName={mergeTwClassName(\n 'min-h-0 flex-1 justify-center h-[46px] bg-transparent border-0',\n inputTwClassNameFromProps,\n )}\n numberOfLines={1}\n multiline={false}\n />\n )}\n {endAccessory}\n </Box>\n );\n },\n);\n\nTextField.displayName = 'TextField';\n"]}
|
|
@@ -46,7 +46,7 @@ const Toast = ({ actionButtonLabel, actionButtonOnPress, actionButtonProps, chil
|
|
|
46
46
|
iconAlertProps,
|
|
47
47
|
severity,
|
|
48
48
|
startAccessory,
|
|
49
|
-
})} title={title} titleProps={titleProps} twClassName={
|
|
49
|
+
})} title={title} titleProps={titleProps} twClassName={(0, design_system_shared_1.mergeTwClassName)('rounded-xl', twClassName)}/>);
|
|
50
50
|
};
|
|
51
51
|
exports.Toast = Toast;
|
|
52
52
|
//# sourceMappingURL=Toast.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"Toast.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,yEAMwC;AACxC,kDAA0B;AAE1B,yBAAyB;AACzB,wDAA2C;AAC3C,sDAAyC;AAEzC,yBAAyB;AACzB,2DAA4D;AAC5D,mDAA8C;AAG9C,MAAM,uBAAuB,GAAG,CAAC,EAC/B,cAAc,EACd,QAAQ,EACR,cAAc,GACqD,EAAE,EAAE;IACvE,IAAI,cAAc,KAAK,IAAI,IAAI,cAAc,KAAK,SAAS,EAAE;QAC3D,OAAO,cAAc,CAAC;KACvB;IAED,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,2BAAa,CAAC,OAAO,EAAE;QACnD,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,iBAAiB,GAAG,yC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,CAAC,WAAW,CAAC,CACzB,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,CACnC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,cAAc,CAAC,CAAC,uBAAuB,CAAC;YACtC,cAAc;YACd,QAAQ;YACR,cAAc;SACf,CAAC,CAAC,CACH,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,YAAY,EAAE,WAAW,CAAC,CAAC,EACzD,CACH,CAAC;AACJ,CAAC,CAAC;AA9DW,QAAA,KAAK,SA8DhB","sourcesContent":["// Third party dependencies.\nimport {\n BoxBackgroundColor,\n BoxBorderColor,\n ButtonSize,\n IconSize,\n mergeTwClassName,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\n// External dependencies.\nimport { BannerBase } from '../BannerBase';\nimport { IconAlert } from '../IconAlert';\n\n// Internal dependencies.\nimport { TOAST_SEVERITY_ICON_MAP } from './Toast.constants';\nimport { ToastSeverity } from './Toast.types';\nimport type { ToastProps } from './Toast.types';\n\nconst renderSeverityAccessory = ({\n iconAlertProps,\n severity,\n startAccessory,\n}: Pick<ToastProps, 'iconAlertProps' | 'severity' | 'startAccessory'>) => {\n if (startAccessory !== null && startAccessory !== undefined) {\n return startAccessory;\n }\n\n if (!severity || severity === ToastSeverity.Default) {\n return undefined;\n }\n\n const iconAlertSeverity = TOAST_SEVERITY_ICON_MAP[severity];\n\n return (\n <IconAlert\n severity={iconAlertSeverity}\n size={IconSize.Lg}\n {...iconAlertProps}\n />\n );\n};\n\nexport const Toast: React.FC<ToastProps> = ({\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n children,\n childrenWrapperProps,\n closeButtonProps,\n description,\n descriptionProps,\n onClose,\n iconAlertProps,\n severity = ToastSeverity.Default,\n startAccessory,\n title,\n titleProps,\n twClassName,\n ...props\n}) => {\n const actionProps =\n actionButtonLabel && actionButtonOnPress\n ? {\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps: {\n size: ButtonSize.Sm,\n ...actionButtonProps,\n },\n }\n : {};\n // TODO: Remove this conditional once BannerBase only renders a close button\n // from onClose. At that point Toast can pass closeButtonProps directly.\n const resolvedCloseButtonProps =\n onClose || closeButtonProps\n ? {\n accessibilityLabel: 'Close toast',\n ...closeButtonProps,\n }\n : undefined;\n\n return (\n <BannerBase\n {...actionProps}\n {...props}\n backgroundColor={BoxBackgroundColor.BackgroundSection}\n borderColor={BoxBorderColor.BorderMuted}\n borderWidth={1}\n children={children}\n childrenWrapperProps={childrenWrapperProps}\n closeButtonProps={resolvedCloseButtonProps}\n description={description}\n descriptionProps={descriptionProps}\n onClose={onClose}\n startAccessory={renderSeverityAccessory({\n iconAlertProps,\n severity,\n startAccessory,\n })}\n title={title}\n titleProps={titleProps}\n twClassName={mergeTwClassName('rounded-xl', twClassName)}\n />\n );\n};\n"]}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TOAST_SEVERITY_ICON_MAP = exports.TOAST_BOTTOM_PADDING = exports.
|
|
3
|
+
exports.TOAST_SEVERITY_ICON_MAP = exports.TOAST_BOTTOM_PADDING = exports.TOAST_VISIBILITY_DURATION = exports.TOAST_ANIMATION_DURATION = void 0;
|
|
4
4
|
// External dependencies.
|
|
5
5
|
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
6
|
-
const design_tokens_1 = require("@metamask/design-tokens");
|
|
7
6
|
const Toast_types_1 = require("./Toast.types.cjs");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
exports.TOAST_VISIBILITY_DURATION = 2750;
|
|
12
|
-
exports.TOAST_ANIMATION_DURATION = design_tokens_1.AnimationDuration.Regularly;
|
|
7
|
+
var design_system_shared_2 = require("@metamask/design-system-shared");
|
|
8
|
+
Object.defineProperty(exports, "TOAST_ANIMATION_DURATION", { enumerable: true, get: function () { return design_system_shared_2.TOAST_ANIMATION_DURATION; } });
|
|
9
|
+
Object.defineProperty(exports, "TOAST_VISIBILITY_DURATION", { enumerable: true, get: function () { return design_system_shared_2.TOAST_VISIBILITY_DURATION; } });
|
|
13
10
|
exports.TOAST_BOTTOM_PADDING = 36;
|
|
14
11
|
exports.TOAST_SEVERITY_ICON_MAP = {
|
|
15
12
|
[Toast_types_1.ToastSeverity.Success]: design_system_shared_1.IconAlertSeverity.Success,
|
|
16
13
|
[Toast_types_1.ToastSeverity.Warning]: design_system_shared_1.IconAlertSeverity.Warning,
|
|
17
|
-
[Toast_types_1.ToastSeverity.Danger]: design_system_shared_1.IconAlertSeverity.
|
|
14
|
+
[Toast_types_1.ToastSeverity.Danger]: design_system_shared_1.IconAlertSeverity.Danger,
|
|
18
15
|
};
|
|
19
16
|
//# sourceMappingURL=Toast.constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.constants.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.constants.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,yEAAmE;
|
|
1
|
+
{"version":3,"file":"Toast.constants.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.constants.ts"],"names":[],"mappings":";;;AAAA,yBAAyB;AACzB,yEAAmE;AAEnE,mDAA8C;AAE9C,uEAGwC;AAFtC,gIAAA,wBAAwB,OAAA;AACxB,iIAAA,yBAAyB,OAAA;AAGd,QAAA,oBAAoB,GAAG,EAAE,CAAC;AAE1B,QAAA,uBAAuB,GAAG;IACrC,CAAC,2BAAa,CAAC,OAAO,CAAC,EAAE,wCAAiB,CAAC,OAAO;IAClD,CAAC,2BAAa,CAAC,OAAO,CAAC,EAAE,wCAAiB,CAAC,OAAO;IAClD,CAAC,2BAAa,CAAC,MAAM,CAAC,EAAE,wCAAiB,CAAC,MAAM;CACxC,CAAC","sourcesContent":["// External dependencies.\nimport { IconAlertSeverity } from '@metamask/design-system-shared';\n\nimport { ToastSeverity } from './Toast.types';\n\nexport {\n TOAST_ANIMATION_DURATION,\n TOAST_VISIBILITY_DURATION,\n} from '@metamask/design-system-shared';\n\nexport const TOAST_BOTTOM_PADDING = 36;\n\nexport const TOAST_SEVERITY_ICON_MAP = {\n [ToastSeverity.Success]: IconAlertSeverity.Success,\n [ToastSeverity.Warning]: IconAlertSeverity.Warning,\n [ToastSeverity.Danger]: IconAlertSeverity.Danger,\n} as const;\n"]}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Animation constants.
|
|
4
|
-
*/
|
|
5
|
-
export declare const TOAST_VISIBILITY_DURATION = 2750;
|
|
6
|
-
export declare const TOAST_ANIMATION_DURATION = AnimationDuration.Regularly;
|
|
1
|
+
export { TOAST_ANIMATION_DURATION, TOAST_VISIBILITY_DURATION, } from "@metamask/design-system-shared";
|
|
7
2
|
export declare const TOAST_BOTTOM_PADDING = 36;
|
|
8
3
|
export declare const TOAST_SEVERITY_ICON_MAP: {
|
|
9
4
|
readonly success: "success";
|
|
10
5
|
readonly warning: "warning";
|
|
11
|
-
readonly danger: "
|
|
6
|
+
readonly danger: "danger";
|
|
12
7
|
};
|
|
13
8
|
//# sourceMappingURL=Toast.constants.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toast.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.constants.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,uCAAuC;AAExC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC"}
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Animation constants.
|
|
4
|
-
*/
|
|
5
|
-
export declare const TOAST_VISIBILITY_DURATION = 2750;
|
|
6
|
-
export declare const TOAST_ANIMATION_DURATION = AnimationDuration.Regularly;
|
|
1
|
+
export { TOAST_ANIMATION_DURATION, TOAST_VISIBILITY_DURATION, } from "@metamask/design-system-shared";
|
|
7
2
|
export declare const TOAST_BOTTOM_PADDING = 36;
|
|
8
3
|
export declare const TOAST_SEVERITY_ICON_MAP: {
|
|
9
4
|
readonly success: "success";
|
|
10
5
|
readonly warning: "warning";
|
|
11
|
-
readonly danger: "
|
|
6
|
+
readonly danger: "danger";
|
|
12
7
|
};
|
|
13
8
|
//# sourceMappingURL=Toast.constants.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toast.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.constants.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,uCAAuC;AAExC,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,uBAAuB;;;;CAI1B,CAAC"}
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
// External dependencies.
|
|
2
2
|
import { IconAlertSeverity } from "@metamask/design-system-shared";
|
|
3
|
-
import { AnimationDuration } from "@metamask/design-tokens";
|
|
4
3
|
import { ToastSeverity } from "./Toast.types.mjs";
|
|
5
|
-
|
|
6
|
-
* Animation constants.
|
|
7
|
-
*/
|
|
8
|
-
export const TOAST_VISIBILITY_DURATION = 2750;
|
|
9
|
-
export const TOAST_ANIMATION_DURATION = AnimationDuration.Regularly;
|
|
4
|
+
export { TOAST_ANIMATION_DURATION, TOAST_VISIBILITY_DURATION } from "@metamask/design-system-shared";
|
|
10
5
|
export const TOAST_BOTTOM_PADDING = 36;
|
|
11
6
|
export const TOAST_SEVERITY_ICON_MAP = {
|
|
12
7
|
[ToastSeverity.Success]: IconAlertSeverity.Success,
|
|
13
8
|
[ToastSeverity.Warning]: IconAlertSeverity.Warning,
|
|
14
|
-
[ToastSeverity.Danger]: IconAlertSeverity.
|
|
9
|
+
[ToastSeverity.Danger]: IconAlertSeverity.Danger,
|
|
15
10
|
};
|
|
16
11
|
//# sourceMappingURL=Toast.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.constants.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.constants.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;
|
|
1
|
+
{"version":3,"file":"Toast.constants.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.constants.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;AAEnE,OAAO,EAAE,aAAa,EAAE,0BAAsB;AAE9C,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EAC1B,uCAAuC;AAExC,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC,OAAO;IAClD,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,iBAAiB,CAAC,OAAO;IAClD,CAAC,aAAa,CAAC,MAAM,CAAC,EAAE,iBAAiB,CAAC,MAAM;CACxC,CAAC","sourcesContent":["// External dependencies.\nimport { IconAlertSeverity } from '@metamask/design-system-shared';\n\nimport { ToastSeverity } from './Toast.types';\n\nexport {\n TOAST_ANIMATION_DURATION,\n TOAST_VISIBILITY_DURATION,\n} from '@metamask/design-system-shared';\n\nexport const TOAST_BOTTOM_PADDING = 36;\n\nexport const TOAST_SEVERITY_ICON_MAP = {\n [ToastSeverity.Success]: IconAlertSeverity.Success,\n [ToastSeverity.Warning]: IconAlertSeverity.Warning,\n [ToastSeverity.Danger]: IconAlertSeverity.Danger,\n} as const;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toast.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAS1B,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AA0BhD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA8DtC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toast.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAS1B,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AA0BhD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CA8DtC,CAAC"}
|
|
@@ -5,7 +5,7 @@ function $importDefault(module) {
|
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
7
|
// Third party dependencies.
|
|
8
|
-
import { BoxBackgroundColor, BoxBorderColor, ButtonSize, IconSize } from "@metamask/design-system-shared";
|
|
8
|
+
import { BoxBackgroundColor, BoxBorderColor, ButtonSize, IconSize, mergeTwClassName } from "@metamask/design-system-shared";
|
|
9
9
|
import $React from "react";
|
|
10
10
|
const React = $importDefault($React);
|
|
11
11
|
// External dependencies.
|
|
@@ -47,6 +47,6 @@ export const Toast = ({ actionButtonLabel, actionButtonOnPress, actionButtonProp
|
|
|
47
47
|
iconAlertProps,
|
|
48
48
|
severity,
|
|
49
49
|
startAccessory,
|
|
50
|
-
})} title={title} titleProps={titleProps} twClassName={
|
|
50
|
+
})} title={title} titleProps={titleProps} twClassName={mergeTwClassName('rounded-xl', twClassName)}/>);
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=Toast.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,QAAQ,
|
|
1
|
+
{"version":3,"file":"Toast.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,QAAQ,EACR,gBAAgB,EACjB,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,yBAAyB;AACzB,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,SAAS,EAAE,+BAAqB;AAEzC,yBAAyB;AACzB,OAAO,EAAE,uBAAuB,EAAE,8BAA0B;AAC5D,OAAO,EAAE,aAAa,EAAE,0BAAsB;AAG9C,MAAM,uBAAuB,GAAG,CAAC,EAC/B,cAAc,EACd,QAAQ,EACR,cAAc,GACqD,EAAE,EAAE;IACvE,IAAI,cAAc,KAAK,IAAI,IAAI,cAAc,KAAK,SAAS,EAAE;QAC3D,OAAO,cAAc,CAAC;KACvB;IAED,IAAI,CAAC,QAAQ,IAAI,QAAQ,KAAK,aAAa,CAAC,OAAO,EAAE;QACnD,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,iBAAiB,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAE5D,OAAO,CACL,CAAC,SAAS,CACR,QAAQ,CAAC,CAAC,iBAAiB,CAAC,CAC5B,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,IAAI,cAAc,CAAC,EACnB,CACH,CAAC;AAC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H,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,WAAW,CAAC,CAAC,gBAAgB,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC,EACzD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Third party dependencies.\nimport {\n BoxBackgroundColor,\n BoxBorderColor,\n ButtonSize,\n IconSize,\n mergeTwClassName,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\n// External dependencies.\nimport { BannerBase } from '../BannerBase';\nimport { IconAlert } from '../IconAlert';\n\n// Internal dependencies.\nimport { TOAST_SEVERITY_ICON_MAP } from './Toast.constants';\nimport { ToastSeverity } from './Toast.types';\nimport type { ToastProps } from './Toast.types';\n\nconst renderSeverityAccessory = ({\n iconAlertProps,\n severity,\n startAccessory,\n}: Pick<ToastProps, 'iconAlertProps' | 'severity' | 'startAccessory'>) => {\n if (startAccessory !== null && startAccessory !== undefined) {\n return startAccessory;\n }\n\n if (!severity || severity === ToastSeverity.Default) {\n return undefined;\n }\n\n const iconAlertSeverity = TOAST_SEVERITY_ICON_MAP[severity];\n\n return (\n <IconAlert\n severity={iconAlertSeverity}\n size={IconSize.Lg}\n {...iconAlertProps}\n />\n );\n};\n\nexport const Toast: React.FC<ToastProps> = ({\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n children,\n childrenWrapperProps,\n closeButtonProps,\n description,\n descriptionProps,\n onClose,\n iconAlertProps,\n severity = ToastSeverity.Default,\n startAccessory,\n title,\n titleProps,\n twClassName,\n ...props\n}) => {\n const actionProps =\n actionButtonLabel && actionButtonOnPress\n ? {\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps: {\n size: ButtonSize.Sm,\n ...actionButtonProps,\n },\n }\n : {};\n // TODO: Remove this conditional once BannerBase only renders a close button\n // from onClose. At that point Toast can pass closeButtonProps directly.\n const resolvedCloseButtonProps =\n onClose || closeButtonProps\n ? {\n accessibilityLabel: 'Close toast',\n ...closeButtonProps,\n }\n : undefined;\n\n return (\n <BannerBase\n {...actionProps}\n {...props}\n backgroundColor={BoxBackgroundColor.BackgroundSection}\n borderColor={BoxBorderColor.BorderMuted}\n borderWidth={1}\n children={children}\n childrenWrapperProps={childrenWrapperProps}\n closeButtonProps={resolvedCloseButtonProps}\n description={description}\n descriptionProps={descriptionProps}\n onClose={onClose}\n startAccessory={renderSeverityAccessory({\n iconAlertProps,\n severity,\n startAccessory,\n })}\n title={title}\n titleProps={titleProps}\n twClassName={mergeTwClassName('rounded-xl', twClassName)}\n />\n );\n};\n"]}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ToastSeverity = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* `Default` renders no built-in leading icon.
|
|
7
|
-
*/
|
|
8
|
-
exports.ToastSeverity = {
|
|
9
|
-
Default: 'default',
|
|
10
|
-
Success: 'success',
|
|
11
|
-
Warning: 'warning',
|
|
12
|
-
Danger: 'danger',
|
|
13
|
-
};
|
|
4
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "ToastSeverity", { enumerable: true, get: function () { return design_system_shared_1.ToastSeverity; } });
|
|
14
6
|
//# sourceMappingURL=Toast.types.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.types.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Toast.types.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":";;;AACA,yEAA+D;AAMtD,8FANA,oCAAa,OAMA","sourcesContent":["import type { ToastPropsShared } from '@metamask/design-system-shared';\nimport { ToastSeverity } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\nexport { ToastSeverity };\nexport type { ToastPropsShared };\n\n/**\n * Optional props for the leading severity `Icon`.\n */\nexport type ToastIconProps = Omit<IconProps, 'name' | 'size' | 'color'>;\n\n/**\n * Shared toast props aligned with BannerBase, plus optional severity/icon props.\n */\nexport type ToastSharedProps = Omit<BannerBaseProps, 'closeButtonProps'> & {\n closeButtonProps?: Omit<\n NonNullable<BannerBaseProps['closeButtonProps']>,\n 'onPress'\n >;\n severity?: ToastSeverity;\n iconAlertProps?: ToastIconProps;\n};\n\n/**\n * Toast options used by the imperative `toast(...)` API.\n */\nexport type ToastOptions = ToastSharedProps & {\n hasNoTimeout?: boolean;\n bottomOffset?: number;\n};\n\n/**\n * Toaster component reference.\n */\nexport type ToasterRef = {\n showToast: (toastOptions: ToastOptions) => void;\n closeToast: () => void;\n};\n\n/**\n * Toast component props intended for direct rendering of a single toast surface.\n */\nexport type ToastProps = ToastSharedProps;\n\n/**\n * Toaster component props.\n * Extends ViewProps to inherit standard React Native props such as testID and accessibilityLabel.\n */\nexport type ToasterProps = {\n /**\n * Optional Tailwind CSS classes for the toast container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'style'>;\n"]}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
+
import type { ToastPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import { ToastSeverity } from "@metamask/design-system-shared";
|
|
1
3
|
import type { ViewProps } from "react-native";
|
|
2
4
|
import type { BannerBaseProps } from "../BannerBase/index.cjs";
|
|
3
5
|
import type { IconProps } from "../Icon/Icon.types.cjs";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* `Default` renders no built-in leading icon.
|
|
7
|
-
*/
|
|
8
|
-
export declare const ToastSeverity: {
|
|
9
|
-
readonly Default: "default";
|
|
10
|
-
readonly Success: "success";
|
|
11
|
-
readonly Warning: "warning";
|
|
12
|
-
readonly Danger: "danger";
|
|
13
|
-
};
|
|
14
|
-
export type ToastSeverity = (typeof ToastSeverity)[keyof typeof ToastSeverity];
|
|
6
|
+
export { ToastSeverity };
|
|
7
|
+
export type { ToastPropsShared };
|
|
15
8
|
/**
|
|
16
9
|
* Optional props for the leading severity `Icon`.
|
|
17
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.types.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD
|
|
1
|
+
{"version":3,"file":"Toast.types.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,uCAAuC;AACvE,OAAO,EAAE,aAAa,EAAE,uCAAuC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD,OAAO,EAAE,aAAa,EAAE,CAAC;AACzB,YAAY,EAAE,gBAAgB,EAAE,CAAC;AAEjC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG;IACzE,gBAAgB,CAAC,EAAE,IAAI,CACrB,WAAW,CAAC,eAAe,CAAC,kBAAkB,CAAC,CAAC,EAChD,SAAS,CACV,CAAC;IACF,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAE1C;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
+
import type { ToastPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import { ToastSeverity } from "@metamask/design-system-shared";
|
|
1
3
|
import type { ViewProps } from "react-native";
|
|
2
4
|
import type { BannerBaseProps } from "../BannerBase/index.mjs";
|
|
3
5
|
import type { IconProps } from "../Icon/Icon.types.mjs";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* `Default` renders no built-in leading icon.
|
|
7
|
-
*/
|
|
8
|
-
export declare const ToastSeverity: {
|
|
9
|
-
readonly Default: "default";
|
|
10
|
-
readonly Success: "success";
|
|
11
|
-
readonly Warning: "warning";
|
|
12
|
-
readonly Danger: "danger";
|
|
13
|
-
};
|
|
14
|
-
export type ToastSeverity = (typeof ToastSeverity)[keyof typeof ToastSeverity];
|
|
6
|
+
export { ToastSeverity };
|
|
7
|
+
export type { ToastPropsShared };
|
|
15
8
|
/**
|
|
16
9
|
* Optional props for the leading severity `Icon`.
|
|
17
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.types.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C,OAAO,KAAK,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AAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC"}
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* `Default` renders no built-in leading icon.
|
|
4
|
-
*/
|
|
5
|
-
export const ToastSeverity = {
|
|
6
|
-
Default: 'default',
|
|
7
|
-
Success: 'success',
|
|
8
|
-
Warning: 'warning',
|
|
9
|
-
Danger: 'danger',
|
|
10
|
-
};
|
|
1
|
+
import { ToastSeverity } from "@metamask/design-system-shared";
|
|
2
|
+
export { ToastSeverity };
|
|
11
3
|
//# sourceMappingURL=Toast.types.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.types.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Toast.types.mjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,uCAAuC;AAM/D,OAAO,EAAE,aAAa,EAAE,CAAC","sourcesContent":["import type { ToastPropsShared } from '@metamask/design-system-shared';\nimport { ToastSeverity } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\nexport { ToastSeverity };\nexport type { ToastPropsShared };\n\n/**\n * Optional props for the leading severity `Icon`.\n */\nexport type ToastIconProps = Omit<IconProps, 'name' | 'size' | 'color'>;\n\n/**\n * Shared toast props aligned with BannerBase, plus optional severity/icon props.\n */\nexport type ToastSharedProps = Omit<BannerBaseProps, 'closeButtonProps'> & {\n closeButtonProps?: Omit<\n NonNullable<BannerBaseProps['closeButtonProps']>,\n 'onPress'\n >;\n severity?: ToastSeverity;\n iconAlertProps?: ToastIconProps;\n};\n\n/**\n * Toast options used by the imperative `toast(...)` API.\n */\nexport type ToastOptions = ToastSharedProps & {\n hasNoTimeout?: boolean;\n bottomOffset?: number;\n};\n\n/**\n * Toaster component reference.\n */\nexport type ToasterRef = {\n showToast: (toastOptions: ToastOptions) => void;\n closeToast: () => void;\n};\n\n/**\n * Toast component props intended for direct rendering of a single toast surface.\n */\nexport type ToastProps = ToastSharedProps;\n\n/**\n * Toaster component props.\n * Extends ViewProps to inherit standard React Native props such as testID and accessibilityLabel.\n */\nexport type ToasterProps = {\n /**\n * Optional Tailwind CSS classes for the toast container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'style'>;\n"]}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TOAST_BOTTOM_PADDING = exports.
|
|
3
|
+
exports.TOAST_BOTTOM_PADDING = exports.ToastSeverity = exports.toast = exports.Toaster = exports.Toast = void 0;
|
|
4
4
|
var Toast_1 = require("./Toast.cjs");
|
|
5
5
|
Object.defineProperty(exports, "Toast", { enumerable: true, get: function () { return Toast_1.Toast; } });
|
|
6
6
|
var Toaster_1 = require("./Toaster.cjs");
|
|
7
7
|
Object.defineProperty(exports, "Toaster", { enumerable: true, get: function () { return Toaster_1.Toaster; } });
|
|
8
8
|
Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return Toaster_1.toast; } });
|
|
9
|
-
var
|
|
10
|
-
Object.defineProperty(exports, "ToastSeverity", { enumerable: true, get: function () { return
|
|
9
|
+
var design_system_shared_1 = require("@metamask/design-system-shared");
|
|
10
|
+
Object.defineProperty(exports, "ToastSeverity", { enumerable: true, get: function () { return design_system_shared_1.ToastSeverity; } });
|
|
11
11
|
var Toast_constants_1 = require("./Toast.constants.cjs");
|
|
12
|
-
Object.defineProperty(exports, "TOAST_VISIBILITY_DURATION", { enumerable: true, get: function () { return Toast_constants_1.TOAST_VISIBILITY_DURATION; } });
|
|
13
|
-
Object.defineProperty(exports, "TOAST_ANIMATION_DURATION", { enumerable: true, get: function () { return Toast_constants_1.TOAST_ANIMATION_DURATION; } });
|
|
14
12
|
Object.defineProperty(exports, "TOAST_BOTTOM_PADDING", { enumerable: true, get: function () { return Toast_constants_1.TOAST_BOTTOM_PADDING; } });
|
|
15
13
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,yCAA2C;AAAlC,kGAAA,OAAO,OAAA;AAAE,gGAAA,KAAK,OAAA;AACvB,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAAvB,8FAAA,KAAK,OAAA;AACd,yCAA2C;AAAlC,kGAAA,OAAO,OAAA;AAAE,gGAAA,KAAK,OAAA;AACvB,uEAA+D;AAAtD,qHAAA,aAAa,OAAA;AAQtB,yDAAyD;AAAhD,uHAAA,oBAAoB,OAAA","sourcesContent":["export { Toast } from './Toast';\nexport { Toaster, toast } from './Toaster';\nexport { ToastSeverity } from '@metamask/design-system-shared';\nexport type {\n ToastOptions,\n ToastProps,\n ToastIconProps,\n ToasterProps,\n ToasterRef,\n} from './Toast.types';\nexport { TOAST_BOTTOM_PADDING } from './Toast.constants';\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Toast } from "./Toast.cjs";
|
|
2
2
|
export { Toaster, toast } from "./Toaster.cjs";
|
|
3
|
-
export { ToastSeverity } from "
|
|
3
|
+
export { ToastSeverity } from "@metamask/design-system-shared";
|
|
4
4
|
export type { ToastOptions, ToastProps, ToastIconProps, ToasterProps, ToasterRef, } from "./Toast.types.cjs";
|
|
5
|
-
export {
|
|
5
|
+
export { TOAST_BOTTOM_PADDING } from "./Toast.constants.cjs";
|
|
6
6
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,sBAAkB;AAC3C,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,sBAAkB;AAC3C,OAAO,EAAE,aAAa,EAAE,uCAAuC;AAC/D,YAAY,EACV,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,GACX,0BAAsB;AACvB,OAAO,EAAE,oBAAoB,EAAE,8BAA0B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { Toast } from "./Toast.mjs";
|
|
2
2
|
export { Toaster, toast } from "./Toaster.mjs";
|
|
3
|
-
export { ToastSeverity } from "
|
|
3
|
+
export { ToastSeverity } from "@metamask/design-system-shared";
|
|
4
4
|
export type { ToastOptions, ToastProps, ToastIconProps, ToasterProps, ToasterRef, } from "./Toast.types.mjs";
|
|
5
|
-
export {
|
|
5
|
+
export { TOAST_BOTTOM_PADDING } from "./Toast.constants.mjs";
|
|
6
6
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,sBAAkB;AAC3C,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,sBAAkB;AAC3C,OAAO,EAAE,aAAa,EAAE,uCAAuC;AAC/D,YAAY,EACV,YAAY,EACZ,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,GACX,0BAAsB;AACvB,OAAO,EAAE,oBAAoB,EAAE,8BAA0B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Toast } from "./Toast.mjs";
|
|
2
2
|
export { Toaster, toast } from "./Toaster.mjs";
|
|
3
|
-
export { ToastSeverity } from "
|
|
4
|
-
export {
|
|
3
|
+
export { ToastSeverity } from "@metamask/design-system-shared";
|
|
4
|
+
export { TOAST_BOTTOM_PADDING } from "./Toast.constants.mjs";
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,sBAAkB;AAC3C,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,sBAAkB;AAC3C,OAAO,EAAE,aAAa,EAAE,uCAAuC;AAQ/D,OAAO,EAAE,oBAAoB,EAAE,8BAA0B","sourcesContent":["export { Toast } from './Toast';\nexport { Toaster, toast } from './Toaster';\nexport { ToastSeverity } from '@metamask/design-system-shared';\nexport type {\n ToastOptions,\n ToastProps,\n ToastIconProps,\n ToasterProps,\n ToasterRef,\n} from './Toast.types';\nexport { TOAST_BOTTOM_PADDING } from './Toast.constants';\n"]}
|