@metamask/design-system-react-native 0.29.0 → 0.30.1
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 +33 -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/BadgeCount/BadgeCount.cjs +1 -1
- package/dist/components/BadgeCount/BadgeCount.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.mjs +2 -2
- package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.cjs +1 -1
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.mjs +2 -2
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +10 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +10 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.cjs +5 -3
- package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.mjs +6 -4
- package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
- package/dist/components/Content/Content.cjs +4 -10
- package/dist/components/Content/Content.cjs.map +1 -1
- package/dist/components/Content/Content.d.cts.map +1 -1
- package/dist/components/Content/Content.d.mts.map +1 -1
- package/dist/components/Content/Content.mjs +5 -11
- package/dist/components/Content/Content.mjs.map +1 -1
- package/dist/components/Content/Content.types.cjs.map +1 -1
- package/dist/components/Content/Content.types.d.cts +1 -1
- package/dist/components/Content/Content.types.d.mts +1 -1
- package/dist/components/Content/Content.types.mjs.map +1 -1
- package/dist/components/{SegmentButton/SegmentButton.cjs → FilterButton/FilterButton.cjs} +19 -17
- package/dist/components/FilterButton/FilterButton.cjs.map +1 -0
- package/dist/components/FilterButton/FilterButton.d.cts +7 -0
- package/dist/components/FilterButton/FilterButton.d.cts.map +1 -0
- package/dist/components/FilterButton/FilterButton.d.mts +7 -0
- package/dist/components/FilterButton/FilterButton.d.mts.map +1 -0
- package/dist/components/{SegmentButton/SegmentButton.mjs → FilterButton/FilterButton.mjs} +18 -16
- package/dist/components/FilterButton/FilterButton.mjs.map +1 -0
- package/dist/components/{SegmentGroup/SegmentGroup.types.cjs → FilterButton/FilterButton.types.cjs} +1 -1
- package/dist/components/FilterButton/FilterButton.types.cjs.map +1 -0
- package/dist/components/FilterButton/FilterButton.types.d.cts +9 -0
- package/dist/components/FilterButton/FilterButton.types.d.cts.map +1 -0
- package/dist/components/FilterButton/FilterButton.types.d.mts +9 -0
- package/dist/components/FilterButton/FilterButton.types.d.mts.map +1 -0
- package/dist/components/FilterButton/FilterButton.types.mjs +2 -0
- package/dist/components/FilterButton/FilterButton.types.mjs.map +1 -0
- package/dist/components/FilterButton/index.cjs +8 -0
- package/dist/components/FilterButton/index.cjs.map +1 -0
- package/dist/components/FilterButton/index.d.cts +4 -0
- package/dist/components/FilterButton/index.d.cts.map +1 -0
- package/dist/components/FilterButton/index.d.mts +4 -0
- package/dist/components/FilterButton/index.d.mts.map +1 -0
- package/dist/components/FilterButton/index.mjs +3 -0
- package/dist/components/FilterButton/index.mjs.map +1 -0
- package/dist/components/{SegmentGroup/SegmentGroup.cjs → FilterButtonGroup/FilterButtonGroup.cjs} +7 -7
- package/dist/components/FilterButtonGroup/FilterButtonGroup.cjs.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.d.cts +7 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.d.cts.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.d.mts +7 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.d.mts.map +1 -0
- package/dist/components/{SegmentGroup/SegmentGroup.mjs → FilterButtonGroup/FilterButtonGroup.mjs} +6 -6
- package/dist/components/FilterButtonGroup/FilterButtonGroup.mjs.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.cjs +3 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.cjs.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.cts +12 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.cts.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.mts +12 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.mts.map +1 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.mjs +2 -0
- package/dist/components/FilterButtonGroup/FilterButtonGroup.types.mjs.map +1 -0
- package/dist/components/FilterButtonGroup/index.cjs +6 -0
- package/dist/components/FilterButtonGroup/index.cjs.map +1 -0
- package/dist/components/FilterButtonGroup/index.d.cts +3 -0
- package/dist/components/FilterButtonGroup/index.d.cts.map +1 -0
- package/dist/components/FilterButtonGroup/index.d.mts +3 -0
- package/dist/components/FilterButtonGroup/index.d.mts.map +1 -0
- package/dist/components/FilterButtonGroup/index.mjs +2 -0
- package/dist/components/FilterButtonGroup/index.mjs.map +1 -0
- package/dist/components/HeaderRoot/HeaderRoot.cjs +2 -1
- package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
- package/dist/components/HeaderRoot/HeaderRoot.d.cts.map +1 -1
- package/dist/components/HeaderRoot/HeaderRoot.d.mts.map +1 -1
- package/dist/components/HeaderRoot/HeaderRoot.mjs +2 -1
- package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.cjs +2 -1
- package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.d.cts.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.d.mts.map +1 -1
- package/dist/components/HeaderStandard/HeaderStandard.mjs +2 -1
- package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
- package/dist/components/HeaderSubpage/HeaderSubpage.cjs +90 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.cjs.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.d.cts +4 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.d.cts.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.d.mts +4 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.d.mts.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.mjs +70 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.mjs.map +1 -0
- package/dist/components/{SegmentButton/SegmentButton.types.cjs → HeaderSubpage/HeaderSubpage.types.cjs} +1 -1
- package/dist/components/HeaderSubpage/HeaderSubpage.types.cjs.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.d.cts +59 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.d.cts.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.d.mts +59 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.d.mts.map +1 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.mjs +2 -0
- package/dist/components/HeaderSubpage/HeaderSubpage.types.mjs.map +1 -0
- package/dist/components/HeaderSubpage/index.cjs +6 -0
- package/dist/components/HeaderSubpage/index.cjs.map +1 -0
- package/dist/components/HeaderSubpage/index.d.cts +3 -0
- package/dist/components/HeaderSubpage/index.d.cts.map +1 -0
- package/dist/components/HeaderSubpage/index.d.mts +3 -0
- package/dist/components/HeaderSubpage/index.d.mts.map +1 -0
- package/dist/components/HeaderSubpage/index.mjs +2 -0
- package/dist/components/HeaderSubpage/index.mjs.map +1 -0
- package/dist/components/Icon/Icon.assets.cjs +2 -0
- package/dist/components/Icon/Icon.assets.cjs.map +1 -1
- package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
- package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
- package/dist/components/Icon/Icon.assets.mjs +2 -0
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/assets/trophy.svg +1 -0
- package/dist/components/ListItem/ListItem.cjs +12 -4
- 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 +12 -4
- package/dist/components/ListItem/ListItem.mjs.map +1 -1
- package/dist/components/ListItem/ListItem.types.cjs.map +1 -1
- package/dist/components/ListItem/ListItem.types.d.cts +3 -2
- package/dist/components/ListItem/ListItem.types.d.cts.map +1 -1
- package/dist/components/ListItem/ListItem.types.d.mts +3 -2
- package/dist/components/ListItem/ListItem.types.d.mts.map +1 -1
- package/dist/components/ListItem/ListItem.types.mjs.map +1 -1
- package/dist/components/ListItem/index.cjs +3 -1
- package/dist/components/ListItem/index.cjs.map +1 -1
- package/dist/components/ListItem/index.d.cts +1 -0
- package/dist/components/ListItem/index.d.cts.map +1 -1
- package/dist/components/ListItem/index.d.mts +1 -0
- package/dist/components/ListItem/index.d.mts.map +1 -1
- package/dist/components/ListItem/index.mjs +1 -0
- 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/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.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.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 +20 -9
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +17 -7
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +17 -7
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +9 -4
- package/dist/components/index.mjs.map +1 -1
- package/package.json +5 -3
- 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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import { ButtonBaseSize, FilterButtonGroupContext, FilterButtonVariant, mergeTwClassName } from "@metamask/design-system-shared";
|
|
8
|
+
import $React, { Children, useMemo } from "react";
|
|
9
|
+
const React = $importDefault($React);
|
|
10
|
+
import { Box } from "../Box/index.mjs";
|
|
11
|
+
import { getSegmentedControlBorderRadiusTwClass } from "./SegmentedControl.constants.mjs";
|
|
12
|
+
export const SegmentedControl = ({ value, onChange, size = ButtonBaseSize.Sm, isFullWidth = false, children, twClassName, style, ...rest }) => {
|
|
13
|
+
const contextValue = useMemo(() => ({
|
|
14
|
+
value,
|
|
15
|
+
onChange,
|
|
16
|
+
variant: FilterButtonVariant.Secondary,
|
|
17
|
+
size,
|
|
18
|
+
isEqualWidth: isFullWidth,
|
|
19
|
+
}), [value, onChange, size, isFullWidth]);
|
|
20
|
+
const widthClass = isFullWidth ? 'self-stretch' : 'self-start';
|
|
21
|
+
return (<FilterButtonGroupContext.Provider value={contextValue}>
|
|
22
|
+
<Box {...rest} accessibilityRole="tablist" twClassName={mergeTwClassName(mergeTwClassName(`${widthClass} flex-row items-center gap-1 border border-muted p-1`, getSegmentedControlBorderRadiusTwClass(size)), twClassName)} style={style}>
|
|
23
|
+
{Children.map(children, (child, index) => isFullWidth ? (<Box key={index} twClassName="flex-1">
|
|
24
|
+
{child}
|
|
25
|
+
</Box>) : (<React.Fragment key={index}>{child}</React.Fragment>))}
|
|
26
|
+
</Box>
|
|
27
|
+
</FilterButtonGroupContext.Provider>);
|
|
28
|
+
};
|
|
29
|
+
SegmentedControl.displayName = 'SegmentedControl';
|
|
30
|
+
//# sourceMappingURL=SegmentedControl.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControl.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EACjB,uCAAuC;AACxC,OAAO,QAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc;;AAEjD,OAAO,EAAE,GAAG,EAAE,yBAAe;AAE7B,OAAO,EAAE,sCAAsC,EAAE,yCAAqC;AAGtF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR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AwB,CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FilterButtonGroupContext,\n FilterButtonVariant,\n mergeTwClassName,\n} from '@metamask/design-system-shared';\nimport React, { Children, useMemo } from 'react';\n\nimport { Box } from '../Box';\n\nimport { getSegmentedControlBorderRadiusTwClass } from './SegmentedControl.constants';\nimport type { SegmentedControlProps } from './SegmentedControl.types';\n\nexport const SegmentedControl = ({\n value,\n onChange,\n size = ButtonBaseSize.Sm,\n isFullWidth = false,\n children,\n twClassName,\n style,\n ...rest\n}: SegmentedControlProps) => {\n const contextValue = useMemo(\n () => ({\n value,\n onChange,\n variant: FilterButtonVariant.Secondary,\n size,\n isEqualWidth: isFullWidth,\n }),\n [value, onChange, size, isFullWidth],\n );\n\n const widthClass = isFullWidth ? 'self-stretch' : 'self-start';\n\n return (\n <FilterButtonGroupContext.Provider value={contextValue}>\n <Box\n {...rest}\n accessibilityRole=\"tablist\"\n twClassName={mergeTwClassName(\n mergeTwClassName(\n `${widthClass} flex-row items-center gap-1 border border-muted p-1`,\n getSegmentedControlBorderRadiusTwClass(size),\n ),\n twClassName,\n )}\n style={style}\n >\n {Children.map(children, (child, index) =>\n isFullWidth ? (\n <Box key={index} twClassName=\"flex-1\">\n {child}\n </Box>\n ) : (\n <React.Fragment key={index}>{child}</React.Fragment>\n ),\n )}\n </Box>\n </FilterButtonGroupContext.Provider>\n );\n};\n\nSegmentedControl.displayName = 'SegmentedControl';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControl.types.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SegmentedControlPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n/**\n * SegmentedControl component props.\n */\nexport type SegmentedControlProps = SegmentedControlPropsShared &\n ViewProps & {\n /**\n * Optional twrnc classes merged into the root container after defaults.\n */\n twClassName?: string;\n };\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SegmentedControlPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { ViewProps } from "react-native";
|
|
3
|
+
/**
|
|
4
|
+
* SegmentedControl component props.
|
|
5
|
+
*/
|
|
6
|
+
export type SegmentedControlProps = SegmentedControlPropsShared & ViewProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Optional twrnc classes merged into the root container after defaults.
|
|
9
|
+
*/
|
|
10
|
+
twClassName?: string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=SegmentedControl.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControl.types.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,uCAAuC;AAClF,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAC7D,SAAS,GAAG;IACV;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SegmentedControlPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { ViewProps } from "react-native";
|
|
3
|
+
/**
|
|
4
|
+
* SegmentedControl component props.
|
|
5
|
+
*/
|
|
6
|
+
export type SegmentedControlProps = SegmentedControlPropsShared & ViewProps & {
|
|
7
|
+
/**
|
|
8
|
+
* Optional twrnc classes merged into the root container after defaults.
|
|
9
|
+
*/
|
|
10
|
+
twClassName?: string;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=SegmentedControl.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControl.types.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,uCAAuC;AAClF,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAC7D,SAAS,GAAG;IACV;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControl.types.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SegmentedControlPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n/**\n * SegmentedControl component props.\n */\nexport type SegmentedControlProps = SegmentedControlPropsShared &\n ViewProps & {\n /**\n * Optional twrnc classes merged into the root container after defaults.\n */\n twClassName?: string;\n };\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SegmentedControl = void 0;
|
|
4
|
+
var SegmentedControl_1 = require("./SegmentedControl.cjs");
|
|
5
|
+
Object.defineProperty(exports, "SegmentedControl", { enumerable: true, get: function () { return SegmentedControl_1.SegmentedControl; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAA7C,oHAAA,gBAAgB,OAAA","sourcesContent":["export { SegmentedControl } from './SegmentedControl';\nexport type { SegmentedControlProps } from './SegmentedControl.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B;AACtD,YAAY,EAAE,qBAAqB,EAAE,qCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B;AACtD,YAAY,EAAE,qBAAqB,EAAE,qCAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B","sourcesContent":["export { SegmentedControl } from './SegmentedControl';\nexport type { SegmentedControlProps } from './SegmentedControl.types';\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Switch = void 0;
|
|
7
|
+
const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const react_native_1 = require("react-native");
|
|
10
|
+
const Text_1 = require("../Text/index.cjs");
|
|
11
|
+
const IOS_SWITCH_MARGIN_FIX = 4;
|
|
12
|
+
const Switch = ({ isOn, isDisabled = false, onValueChange, label, style, testID, ...props }) => {
|
|
13
|
+
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
14
|
+
return (<react_native_1.View testID={testID} style={tw.style('flex-row items-center', isDisabled && 'opacity-50')}>
|
|
15
|
+
{label ? (<Text_1.Text variant={Text_1.TextVariant.BodyMd} color={Text_1.TextColor.TextDefault} style={tw `mr-2 flex-1`}>
|
|
16
|
+
{label}
|
|
17
|
+
</Text_1.Text>) : null}
|
|
18
|
+
<react_native_1.Switch {...props} value={isOn} disabled={isDisabled} onValueChange={onValueChange} accessibilityRole="switch" accessibilityState={{
|
|
19
|
+
checked: isOn,
|
|
20
|
+
disabled: isDisabled,
|
|
21
|
+
}} accessibilityLabel={label} style={[
|
|
22
|
+
react_native_1.Platform.OS === 'ios' && { marginRight: IOS_SWITCH_MARGIN_FIX },
|
|
23
|
+
style,
|
|
24
|
+
]}/>
|
|
25
|
+
</react_native_1.View>);
|
|
26
|
+
};
|
|
27
|
+
exports.Switch = Switch;
|
|
28
|
+
//# sourceMappingURL=Switch.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.cjs","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;AAAA,qFAAmE;AACnE,kDAA0B;AAC1B,+CAAkE;AAElE,4CAAuD;AAIvD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEzB,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,EACJ,UAAU,GAAG,KAAK,EAClB,aAAa,EACb,KAAK,EACL,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,OAAO,CACL,CAAC,mBAAI,CACH,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,IAAI,YAAY,CAAC,CAAC,CAErE;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,WAAI,CACH,OAAO,CAAC,CAAC,kBAAW,CAAC,MAAM,CAAC,CAC5B,KAAK,CAAC,CAAC,gBAAS,CAAC,WAAW,CAAC,CAC7B,KAAK,CAAC,CAAC,EAAE,CAAA,aAAa,CAAC,CAEvB;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,WAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,qBAAQ,CACP,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,iBAAiB,CAAC,QAAQ,CAC1B,kBAAkB,CAAC,CAAC;YAClB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,UAAU;SACrB,CAAC,CACF,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAC1B,KAAK,CAAC,CAAC;YACL,uBAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE;YAC/D,KAAK;SACN,CAAC,EAEN;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,MAAM,UA2CjB","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { Switch as RNSwitch, Platform, View } from 'react-native';\n\nimport { Text, TextVariant, TextColor } from '../Text';\n\nimport type { SwitchProps } from './Switch.types';\n\nconst IOS_SWITCH_MARGIN_FIX = 4;\n\nexport const Switch = ({\n isOn,\n isDisabled = false,\n onValueChange,\n label,\n style,\n testID,\n ...props\n}: SwitchProps) => {\n const tw = useTailwind();\n\n return (\n <View\n testID={testID}\n style={tw.style('flex-row items-center', isDisabled && 'opacity-50')}\n >\n {label ? (\n <Text\n variant={TextVariant.BodyMd}\n color={TextColor.TextDefault}\n style={tw`mr-2 flex-1`}\n >\n {label}\n </Text>\n ) : null}\n <RNSwitch\n {...props}\n value={isOn}\n disabled={isDisabled}\n onValueChange={onValueChange}\n accessibilityRole=\"switch\"\n accessibilityState={{\n checked: isOn,\n disabled: isDisabled,\n }}\n accessibilityLabel={label}\n style={[\n Platform.OS === 'ios' && { marginRight: IOS_SWITCH_MARGIN_FIX },\n style,\n ]}\n />\n </View>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.cts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAIlD,eAAO,MAAM,MAAM,wEAQhB,WAAW,sBAmCb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.mts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAIlD,eAAO,MAAM,MAAM,wEAQhB,WAAW,sBAmCb,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import { useTailwind } from "@metamask/design-system-twrnc-preset";
|
|
8
|
+
import $React from "react";
|
|
9
|
+
const React = $importDefault($React);
|
|
10
|
+
import { Switch as RNSwitch, Platform, View } from "react-native";
|
|
11
|
+
import { Text, TextVariant, TextColor } from "../Text/index.mjs";
|
|
12
|
+
const IOS_SWITCH_MARGIN_FIX = 4;
|
|
13
|
+
export const Switch = ({ isOn, isDisabled = false, onValueChange, label, style, testID, ...props }) => {
|
|
14
|
+
const tw = useTailwind();
|
|
15
|
+
return (<View testID={testID} style={tw.style('flex-row items-center', isDisabled && 'opacity-50')}>
|
|
16
|
+
{label ? (<Text variant={TextVariant.BodyMd} color={TextColor.TextDefault} style={tw `mr-2 flex-1`}>
|
|
17
|
+
{label}
|
|
18
|
+
</Text>) : null}
|
|
19
|
+
<RNSwitch {...props} value={isOn} disabled={isDisabled} onValueChange={onValueChange} accessibilityRole="switch" accessibilityState={{
|
|
20
|
+
checked: isOn,
|
|
21
|
+
disabled: isDisabled,
|
|
22
|
+
}} accessibilityLabel={label} style={[
|
|
23
|
+
Platform.OS === 'ios' && { marginRight: IOS_SWITCH_MARGIN_FIX },
|
|
24
|
+
style,
|
|
25
|
+
]}/>
|
|
26
|
+
</View>);
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=Switch.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.mjs","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAqB;AAElE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,0BAAgB;AAIvD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,EACJ,UAAU,GAAG,KAAK,EAClB,aAAa,EACb,KAAK,EACL,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,OAAO,CACL,CAAC,IAAI,CACH,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,IAAI,YAAY,CAAC,CAAC,CAErE;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,IAAI,CACH,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAC5B,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAC7B,KAAK,CAAC,CAAC,EAAE,CAAA,aAAa,CAAC,CAEvB;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,QAAQ,CACP,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,iBAAiB,CAAC,QAAQ,CAC1B,kBAAkB,CAAC,CAAC;YAClB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,UAAU;SACrB,CAAC,CACF,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAC1B,KAAK,CAAC,CAAC;YACL,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE;YAC/D,KAAK;SACN,CAAC,EAEN;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { Switch as RNSwitch, Platform, View } from 'react-native';\n\nimport { Text, TextVariant, TextColor } from '../Text';\n\nimport type { SwitchProps } from './Switch.types';\n\nconst IOS_SWITCH_MARGIN_FIX = 4;\n\nexport const Switch = ({\n isOn,\n isDisabled = false,\n onValueChange,\n label,\n style,\n testID,\n ...props\n}: SwitchProps) => {\n const tw = useTailwind();\n\n return (\n <View\n testID={testID}\n style={tw.style('flex-row items-center', isDisabled && 'opacity-50')}\n >\n {label ? (\n <Text\n variant={TextVariant.BodyMd}\n color={TextColor.TextDefault}\n style={tw`mr-2 flex-1`}\n >\n {label}\n </Text>\n ) : null}\n <RNSwitch\n {...props}\n value={isOn}\n disabled={isDisabled}\n onValueChange={onValueChange}\n accessibilityRole=\"switch\"\n accessibilityState={{\n checked: isOn,\n disabled: isDisabled,\n }}\n accessibilityLabel={label}\n style={[\n Platform.OS === 'ios' && { marginRight: IOS_SWITCH_MARGIN_FIX },\n style,\n ]}\n />\n </View>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.types.cjs","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SwitchPropsShared } from '@metamask/design-system-shared';\nimport type { SwitchProps as RNSwitchProps } from 'react-native';\n\n/**\n * Switch component props (React Native platform-specific)\n * Extends shared props from @metamask/design-system-shared with React Native specific platform concerns\n */\nexport type SwitchProps = SwitchPropsShared &\n Omit<RNSwitchProps, 'value' | 'disabled' | 'onValueChange'> & {\n /**\n * Required callback for when the switch value changes.\n * Use this to update your state.\n */\n onValueChange: (value: boolean) => void;\n };\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SwitchPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { SwitchProps as RNSwitchProps } from "react-native";
|
|
3
|
+
/**
|
|
4
|
+
* Switch component props (React Native platform-specific)
|
|
5
|
+
* Extends shared props from @metamask/design-system-shared with React Native specific platform concerns
|
|
6
|
+
*/
|
|
7
|
+
export type SwitchProps = SwitchPropsShared & Omit<RNSwitchProps, 'value' | 'disabled' | 'onValueChange'> & {
|
|
8
|
+
/**
|
|
9
|
+
* Required callback for when the switch value changes.
|
|
10
|
+
* Use this to update your state.
|
|
11
|
+
*/
|
|
12
|
+
onValueChange: (value: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=Switch.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.types.d.cts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uCAAuC;AACxE,OAAO,KAAK,EAAE,WAAW,IAAI,aAAa,EAAE,qBAAqB;AAEjE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC,GAAG;IAC5D;;;OAGG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SwitchPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { SwitchProps as RNSwitchProps } from "react-native";
|
|
3
|
+
/**
|
|
4
|
+
* Switch component props (React Native platform-specific)
|
|
5
|
+
* Extends shared props from @metamask/design-system-shared with React Native specific platform concerns
|
|
6
|
+
*/
|
|
7
|
+
export type SwitchProps = SwitchPropsShared & Omit<RNSwitchProps, 'value' | 'disabled' | 'onValueChange'> & {
|
|
8
|
+
/**
|
|
9
|
+
* Required callback for when the switch value changes.
|
|
10
|
+
* Use this to update your state.
|
|
11
|
+
*/
|
|
12
|
+
onValueChange: (value: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=Switch.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.types.d.mts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,uCAAuC;AACxE,OAAO,KAAK,EAAE,WAAW,IAAI,aAAa,EAAE,qBAAqB;AAEjE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC,GAAG;IAC5D;;;OAGG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.types.mjs","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SwitchPropsShared } from '@metamask/design-system-shared';\nimport type { SwitchProps as RNSwitchProps } from 'react-native';\n\n/**\n * Switch component props (React Native platform-specific)\n * Extends shared props from @metamask/design-system-shared with React Native specific platform concerns\n */\nexport type SwitchProps = SwitchPropsShared &\n Omit<RNSwitchProps, 'value' | 'disabled' | 'onValueChange'> & {\n /**\n * Required callback for when the switch value changes.\n * Use this to update your state.\n */\n onValueChange: (value: boolean) => void;\n };\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Switch = void 0;
|
|
4
|
+
var Switch_1 = require("./Switch.cjs");
|
|
5
|
+
Object.defineProperty(exports, "Switch", { enumerable: true, get: function () { return Switch_1.Switch; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAAzB,gGAAA,MAAM,OAAA","sourcesContent":["export { Switch } from './Switch';\nexport type { SwitchProps } from './Switch.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,qBAAiB;AAClC,YAAY,EAAE,WAAW,EAAE,2BAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,qBAAiB;AAClC,YAAY,EAAE,WAAW,EAAE,2BAAuB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Switch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,qBAAiB","sourcesContent":["export { Switch } from './Switch';\nexport type { SwitchProps } from './Switch.types';\n"]}
|
|
@@ -4,11 +4,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.TabEmptyState = void 0;
|
|
7
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
7
8
|
const react_1 = __importDefault(require("react"));
|
|
8
9
|
const Box_1 = require("../Box/index.cjs");
|
|
9
10
|
const Button_1 = require("../Button/index.cjs");
|
|
10
11
|
const Text_1 = require("../Text/index.cjs");
|
|
11
|
-
const TabEmptyState = ({ icon, description, descriptionProps, actionButtonText, actionButtonProps, onAction, children, style, twClassName = '', ...props }) => (<Box_1.Box flexDirection={Box_1.BoxFlexDirection.Column} alignItems={Box_1.BoxAlignItems.Center} justifyContent={Box_1.BoxJustifyContent.Center} backgroundColor={Box_1.BoxBackgroundColor.BackgroundDefault} gap={3} twClassName={
|
|
12
|
+
const TabEmptyState = ({ icon, description, descriptionProps, actionButtonText, actionButtonProps, onAction, children, style, twClassName = '', ...props }) => (<Box_1.Box flexDirection={Box_1.BoxFlexDirection.Column} alignItems={Box_1.BoxAlignItems.Center} justifyContent={Box_1.BoxJustifyContent.Center} backgroundColor={Box_1.BoxBackgroundColor.BackgroundDefault} gap={3} twClassName={(0, design_system_shared_1.mergeTwClassName)('max-w-64', twClassName)} style={style} {...props}>
|
|
12
13
|
{icon}
|
|
13
14
|
{description && (<Text_1.Text variant={Text_1.TextVariant.BodyMd} color={Text_1.TextColor.TextAlternative} twClassName="text-center" {...descriptionProps}>
|
|
14
15
|
{description}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabEmptyState.cjs","sourceRoot":"","sources":["../../../src/components/TabEmptyState/TabEmptyState.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,0CAMgB;AAChB,gDAAkD;AAClD,4CAAuD;AAIhD,MAAM,aAAa,GAAG,CAAC,EAC5B,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACW,EAAE,EAAE,CAAC,CACxB,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,sBAAgB,CAAC,MAAM,CAAC,CACvC,UAAU,CAAC,CAAC,mBAAa,CAAC,MAAM,CAAC,CACjC,cAAc,CAAC,CAAC,uBAAiB,CAAC,MAAM,CAAC,CACzC,eAAe,CAAC,CAAC,wBAAkB,CAAC,iBAAiB,CAAC,CACtD,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"TabEmptyState.cjs","sourceRoot":"","sources":["../../../src/components/TabEmptyState/TabEmptyState.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAAkE;AAClE,kDAA0B;AAE1B,0CAMgB;AAChB,gDAAkD;AAClD,4CAAuD;AAIhD,MAAM,aAAa,GAAG,CAAC,EAC5B,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACW,EAAE,EAAE,CAAC,CACxB,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,sBAAgB,CAAC,MAAM,CAAC,CACvC,UAAU,CAAC,CAAC,mBAAa,CAAC,MAAM,CAAC,CACjC,cAAc,CAAC,CAAC,uBAAiB,CAAC,MAAM,CAAC,CACzC,eAAe,CAAC,CAAC,wBAAkB,CAAC,iBAAiB,CAAC,CACtD,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,UAAU,EAAE,WAAW,CAAC,CAAC,CACvD,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,KAAK,CAAC,CAEV;IAAA,CAAC,IAAI,CACL;IAAA,CAAC,WAAW,IAAI,CACd,CAAC,WAAI,CACH,OAAO,CAAC,CAAC,kBAAW,CAAC,MAAM,CAAC,CAC5B,KAAK,CAAC,CAAC,gBAAS,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,aAAa,CACzB,IAAI,gBAAgB,CAAC,CAErB;QAAA,CAAC,WAAW,CACd;MAAA,EAAE,WAAI,CAAC,CACR,CACD;IAAA,CAAC,gBAAgB,IAAI,QAAQ,IAAI,CAC/B,CAAC,eAAM,CACL,OAAO,CAAC,CAAC,sBAAa,CAAC,SAAS,CAAC,CACjC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAClB,WAAW,CAAC,aAAa,CACzB,IAAI,iBAAiB,CAAC,CAEtB;QAAA,CAAC,gBAAgB,CACnB;MAAA,EAAE,eAAM,CAAC,CACV,CACD;IAAA,CAAC,QAAQ,CACX;EAAA,EAAE,SAAG,CAAC,CACP,CAAC;AA7CW,QAAA,aAAa,iBA6CxB","sourcesContent":["import { mergeTwClassName } from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport {\n Box,\n BoxFlexDirection,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n} from '../Box';\nimport { Button, ButtonVariant } from '../Button';\nimport { Text, TextVariant, TextColor } from '../Text';\n\nimport type { TabEmptyStateProps } from './TabEmptyState.types';\n\nexport const TabEmptyState = ({\n icon,\n description,\n descriptionProps,\n actionButtonText,\n actionButtonProps,\n onAction,\n children,\n style,\n twClassName = '',\n ...props\n}: TabEmptyStateProps) => (\n <Box\n flexDirection={BoxFlexDirection.Column}\n alignItems={BoxAlignItems.Center}\n justifyContent={BoxJustifyContent.Center}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n gap={3}\n twClassName={mergeTwClassName('max-w-64', twClassName)}\n style={style}\n {...props}\n >\n {icon}\n {description && (\n <Text\n variant={TextVariant.BodyMd}\n color={TextColor.TextAlternative}\n twClassName=\"text-center\"\n {...descriptionProps}\n >\n {description}\n </Text>\n )}\n {actionButtonText && onAction && (\n <Button\n variant={ButtonVariant.Secondary}\n onPress={onAction}\n twClassName=\"self-center\"\n {...actionButtonProps}\n >\n {actionButtonText}\n </Button>\n )}\n {children}\n </Box>\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabEmptyState.d.cts","sourceRoot":"","sources":["../../../src/components/TabEmptyState/TabEmptyState.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabEmptyState.d.cts","sourceRoot":"","sources":["../../../src/components/TabEmptyState/TabEmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,mIAWvB,kBAAkB,sBAkCpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabEmptyState.d.mts","sourceRoot":"","sources":["../../../src/components/TabEmptyState/TabEmptyState.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TabEmptyState.d.mts","sourceRoot":"","sources":["../../../src/components/TabEmptyState/TabEmptyState.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,mIAWvB,kBAAkB,sBAkCpB,CAAC"}
|
|
@@ -4,12 +4,13 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
+
import { mergeTwClassName } from "@metamask/design-system-shared";
|
|
7
8
|
import $React from "react";
|
|
8
9
|
const React = $importDefault($React);
|
|
9
10
|
import { Box, BoxFlexDirection, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor } from "../Box/index.mjs";
|
|
10
11
|
import { Button, ButtonVariant } from "../Button/index.mjs";
|
|
11
12
|
import { Text, TextVariant, TextColor } from "../Text/index.mjs";
|
|
12
|
-
export const TabEmptyState = ({ icon, description, descriptionProps, actionButtonText, actionButtonProps, onAction, children, style, twClassName = '', ...props }) => (<Box flexDirection={BoxFlexDirection.Column} alignItems={BoxAlignItems.Center} justifyContent={BoxJustifyContent.Center} backgroundColor={BoxBackgroundColor.BackgroundDefault} gap={3} twClassName={
|
|
13
|
+
export const TabEmptyState = ({ icon, description, descriptionProps, actionButtonText, actionButtonProps, onAction, children, style, twClassName = '', ...props }) => (<Box flexDirection={BoxFlexDirection.Column} alignItems={BoxAlignItems.Center} justifyContent={BoxJustifyContent.Center} backgroundColor={BoxBackgroundColor.BackgroundDefault} gap={3} twClassName={mergeTwClassName('max-w-64', twClassName)} style={style} {...props}>
|
|
13
14
|
{icon}
|
|
14
15
|
{description && (<Text variant={TextVariant.BodyMd} color={TextColor.TextAlternative} twClassName="text-center" {...descriptionProps}>
|
|
15
16
|
{description}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabEmptyState.mjs","sourceRoot":"","sources":["../../../src/components/TabEmptyState/TabEmptyState.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAK,cAAc;;AAE1B,OAAO,EACL,GAAG,EACH,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EACnB,yBAAe;AAChB,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,4BAAkB;AAClD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,0BAAgB;AAIvD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,IAAI,EACJ,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACW,EAAE,EAAE,CAAC,CACxB,CAAC,GAAG,CACF,aAAa,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CACvC,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,cAAc,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CACzC,eAAe,CAAC,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,CACtD,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":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AAC,gBAAgB,IAAI,QAAQ,IAAI,CAC/B,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CACjC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAClB,WAAW,CAAC,aAAa,CACzB,IAAI,iBAAiB,CAAC,CAEtB;QAAA,CAAC,gBAAgB,CACnB;MAAA,EAAE,MAAM,CAAC,CACV,CACD;IAAA,CAAC,QAAQ,CACX;EAAA,EAAE,GAAG,CAAC,CACP,CAAC","sourcesContent":["import { mergeTwClassName } from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport {\n Box,\n BoxFlexDirection,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n} from '../Box';\nimport { Button, ButtonVariant } from '../Button';\nimport { Text, TextVariant, TextColor } from '../Text';\n\nimport type { TabEmptyStateProps } from './TabEmptyState.types';\n\nexport const TabEmptyState = ({\n icon,\n description,\n descriptionProps,\n actionButtonText,\n actionButtonProps,\n onAction,\n children,\n style,\n twClassName = '',\n ...props\n}: TabEmptyStateProps) => (\n <Box\n flexDirection={BoxFlexDirection.Column}\n alignItems={BoxAlignItems.Center}\n justifyContent={BoxJustifyContent.Center}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n gap={3}\n twClassName={mergeTwClassName('max-w-64', twClassName)}\n style={style}\n {...props}\n >\n {icon}\n {description && (\n <Text\n variant={TextVariant.BodyMd}\n color={TextColor.TextAlternative}\n twClassName=\"text-center\"\n {...descriptionProps}\n >\n {description}\n </Text>\n )}\n {actionButtonText && onAction && (\n <Button\n variant={ButtonVariant.Secondary}\n onPress={onAction}\n twClassName=\"self-center\"\n {...actionButtonProps}\n >\n {actionButtonText}\n </Button>\n )}\n {children}\n </Box>\n);\n"]}
|
|
@@ -20,7 +20,7 @@ const Tag = ({ children, severity = design_system_shared_1.TagSeverity.Neutral,
|
|
|
20
20
|
tw.style('rounded-md self-start', (startIconName ?? startIconProps?.name) ? 'pl-1' : 'pl-1.5', (endIconName ?? endIconProps?.name) ? 'pr-1' : 'pr-1.5', twClassName),
|
|
21
21
|
style,
|
|
22
22
|
]}>
|
|
23
|
-
<BoxRow_1.BoxRow textProps={{
|
|
23
|
+
<BoxRow_1.BoxRow twClassName="gap-0.5" textProps={{
|
|
24
24
|
color: textColor,
|
|
25
25
|
variant: design_system_shared_1.TextVariant.BodyXs,
|
|
26
26
|
fontWeight: design_system_shared_1.FontWeight.Medium,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.cjs","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAIwC;AACxC,qFAAmE;AACnE,kDAA0B;AAE1B,0CAA6B;AAC7B,gDAAmC;AACnC,4CAAyC;AAEzC,uDAIyB;AAGlB,MAAM,GAAG,GAAuB,CAAC,EACtC,QAAQ,EACR,QAAQ,GAAG,kCAAW,CAAC,OAAO,EAC9B,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,eAAe,GAAG,2CAA2B,CAAC,QAAQ,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,2CAA2B,CAAC,QAAQ,CAAC,CAAC;IACxD,MAAM,SAAS,GAAG,2CAA2B,CAAC,QAAQ,CAAC,CAAC;IAExD,OAAO,CACL,CAAC,SAAG,CACF,IAAI,KAAK,CAAC,CACV,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,uBAAuB,EACvB,CAAC,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,EAC3D,CAAC,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC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C;YACnD,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,cAAc,IAAI,IAAI,CAAC;aAC/B;YACD,OAAO,CACL,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,eAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,EACnB,CACH,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC,CACL,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE;YAClB,MAAM,IAAI,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;YAC/C,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,YAAY,IAAI,IAAI,CAAC;aAC7B;YACD,OAAO,CACL,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,eAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,UAAU,CACtB,IAAI,YAAY,CAAC,EACjB,CACH,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC,CAEL;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,eAAM,CACV;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AA1EW,QAAA,GAAG,OA0Ed","sourcesContent":["import {\n FontWeight,\n TagSeverity,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon, IconSize } from '../Icon';\n\nimport {\n MAP_TAG_SEVERITY_BACKGROUND,\n MAP_TAG_SEVERITY_ICON_COLOR,\n MAP_TAG_SEVERITY_TEXT_COLOR,\n} from './Tag.constants';\nimport type { TagProps } from './Tag.types';\n\nexport const Tag: React.FC<TagProps> = ({\n children,\n severity = TagSeverity.Neutral,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n const backgroundColor = MAP_TAG_SEVERITY_BACKGROUND[severity];\n const textColor = MAP_TAG_SEVERITY_TEXT_COLOR[severity];\n const iconColor = MAP_TAG_SEVERITY_ICON_COLOR[severity];\n\n return (\n <Box\n {...props}\n backgroundColor={backgroundColor}\n style={[\n tw.style(\n 'rounded-md self-start',\n (startIconName ?? startIconProps?.name) ? 'pl-1' : 'pl-1.5',\n (endIconName ?? endIconProps?.name) ? 'pr-1' : 'pr-1.5',\n twClassName,\n ),\n style,\n ]}\n >\n <BoxRow\n twClassName=\"gap-0.5\"\n textProps={{\n color: textColor,\n variant: TextVariant.BodyXs,\n fontWeight: FontWeight.Medium,\n }}\n startAccessory={(() => {\n const name = startIconName ?? startIconProps?.name;\n if (!name) {\n return startAccessory ?? null;\n }\n return (\n <Icon\n name={name}\n color={iconColor}\n size={IconSize.Xs}\n twClassName=\"shrink-0\"\n {...startIconProps}\n />\n );\n })()}\n endAccessory={(() => {\n const name = endIconName ?? endIconProps?.name;\n if (!name) {\n return endAccessory ?? null;\n }\n return (\n <Icon\n name={name}\n color={iconColor}\n size={IconSize.Xs}\n twClassName=\"shrink-0\"\n {...endIconProps}\n />\n );\n })()}\n >\n {children}\n </BoxRow>\n </Box>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.cts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAW1B,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAoB;AAE5C,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"Tag.d.cts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAW1B,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAoB;AAE5C,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CA0ElC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.mts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAW1B,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAoB;AAE5C,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,
|
|
1
|
+
{"version":3,"file":"Tag.d.mts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAW1B,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAoB;AAE5C,eAAO,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CA0ElC,CAAC"}
|
|
@@ -21,7 +21,7 @@ export const Tag = ({ children, severity = TagSeverity.Neutral, startIconName, s
|
|
|
21
21
|
tw.style('rounded-md self-start', (startIconName ?? startIconProps?.name) ? 'pl-1' : 'pl-1.5', (endIconName ?? endIconProps?.name) ? 'pr-1' : 'pr-1.5', twClassName),
|
|
22
22
|
style,
|
|
23
23
|
]}>
|
|
24
|
-
<BoxRow textProps={{
|
|
24
|
+
<BoxRow twClassName="gap-0.5" textProps={{
|
|
25
25
|
color: textColor,
|
|
26
26
|
variant: TextVariant.BodyXs,
|
|
27
27
|
fontWeight: FontWeight.Medium,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.mjs","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,UAAU,EACV,WAAW,EACX,WAAW,EACZ,uCAAuC;AACxC,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,MAAK,cAAc;;AAE1B,OAAO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Aa,IAAI,cAAc,EAAE,IAAI,CAAC;YACnD,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,cAAc,IAAI,IAAI,CAAC;aAC/B;YACD,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,EACnB,CACH,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC,CACL,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE;YAClB,MAAM,IAAI,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;YAC/C,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,YAAY,IAAI,IAAI,CAAC;aAC7B;YACD,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,UAAU,CACtB,IAAI,YAAY,CAAC,EACjB,CACH,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC,CAEL;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,MAAM,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n FontWeight,\n TagSeverity,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon, IconSize } from '../Icon';\n\nimport {\n MAP_TAG_SEVERITY_BACKGROUND,\n MAP_TAG_SEVERITY_ICON_COLOR,\n MAP_TAG_SEVERITY_TEXT_COLOR,\n} from './Tag.constants';\nimport type { TagProps } from './Tag.types';\n\nexport const Tag: React.FC<TagProps> = ({\n children,\n severity = TagSeverity.Neutral,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n const backgroundColor = MAP_TAG_SEVERITY_BACKGROUND[severity];\n const textColor = MAP_TAG_SEVERITY_TEXT_COLOR[severity];\n const iconColor = MAP_TAG_SEVERITY_ICON_COLOR[severity];\n\n return (\n <Box\n {...props}\n backgroundColor={backgroundColor}\n style={[\n tw.style(\n 'rounded-md self-start',\n (startIconName ?? startIconProps?.name) ? 'pl-1' : 'pl-1.5',\n (endIconName ?? endIconProps?.name) ? 'pr-1' : 'pr-1.5',\n twClassName,\n ),\n style,\n ]}\n >\n <BoxRow\n textProps={{\n color: textColor,\n variant: TextVariant.BodyXs,\n fontWeight: FontWeight.Medium,\n }}\n startAccessory={(() => {\n const name = startIconName ?? startIconProps?.name;\n if (!name) {\n return startAccessory ?? null;\n }\n return (\n <Icon\n name={name}\n color={iconColor}\n size={IconSize.Xs}\n twClassName=\"shrink-0\"\n {...startIconProps}\n />\n );\n })()}\n endAccessory={(() => {\n const name = endIconName ?? endIconProps?.name;\n if (!name) {\n return endAccessory ?? null;\n }\n return (\n <Icon\n name={name}\n color={iconColor}\n size={IconSize.Xs}\n twClassName=\"shrink-0\"\n {...endIconProps}\n />\n );\n })()}\n >\n {children}\n </BoxRow>\n </Box>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Tag.mjs","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,UAAU,EACV,WAAW,EACX,WAAW,EACZ,uCAAuC;AACxC,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,0BAAgB;AAEzC,OAAO,EACL,2BAA2B,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L,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,EACnB,CACH,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC,CACL,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE;YAClB,MAAM,IAAI,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;YAC/C,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,YAAY,IAAI,IAAI,CAAC;aAC7B;YACD,OAAO,CACL,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,UAAU,CACtB,IAAI,YAAY,CAAC,EACjB,CACH,CAAC;QACJ,CAAC,CAAC,EAAE,CAAC,CAEL;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,MAAM,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n FontWeight,\n TagSeverity,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon, IconSize } from '../Icon';\n\nimport {\n MAP_TAG_SEVERITY_BACKGROUND,\n MAP_TAG_SEVERITY_ICON_COLOR,\n MAP_TAG_SEVERITY_TEXT_COLOR,\n} from './Tag.constants';\nimport type { TagProps } from './Tag.types';\n\nexport const Tag: React.FC<TagProps> = ({\n children,\n severity = TagSeverity.Neutral,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n const backgroundColor = MAP_TAG_SEVERITY_BACKGROUND[severity];\n const textColor = MAP_TAG_SEVERITY_TEXT_COLOR[severity];\n const iconColor = MAP_TAG_SEVERITY_ICON_COLOR[severity];\n\n return (\n <Box\n {...props}\n backgroundColor={backgroundColor}\n style={[\n tw.style(\n 'rounded-md self-start',\n (startIconName ?? startIconProps?.name) ? 'pl-1' : 'pl-1.5',\n (endIconName ?? endIconProps?.name) ? 'pr-1' : 'pr-1.5',\n twClassName,\n ),\n style,\n ]}\n >\n <BoxRow\n twClassName=\"gap-0.5\"\n textProps={{\n color: textColor,\n variant: TextVariant.BodyXs,\n fontWeight: FontWeight.Medium,\n }}\n startAccessory={(() => {\n const name = startIconName ?? startIconProps?.name;\n if (!name) {\n return startAccessory ?? null;\n }\n return (\n <Icon\n name={name}\n color={iconColor}\n size={IconSize.Xs}\n twClassName=\"shrink-0\"\n {...startIconProps}\n />\n );\n })()}\n endAccessory={(() => {\n const name = endIconName ?? endIconProps?.name;\n if (!name) {\n return endAccessory ?? null;\n }\n return (\n <Icon\n name={name}\n color={iconColor}\n size={IconSize.Xs}\n twClassName=\"shrink-0\"\n {...endIconProps}\n />\n );\n })()}\n >\n {children}\n </BoxRow>\n </Box>\n );\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,GAAE,CAAC;IAEzB,MAAM,EACJ,WAAW,EAAE,yBAAyB,EACtC,GAAG,2BAA2B,EAC/B,GAAG,UAAU,IAAI,EAAE,CAAC;IAErB,MAAM,aAAa,GAAG,IAAA,mBAA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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,CAAC;YACpB,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;SACb;IACH,CAAC,EACD,CAAC,UAAU,EAAE,MAAM,CAAC,CACrB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,mBAA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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
|
});
|