@metamask-previews/design-system-react-native 0.6.0-preview.3dc70e1 → 0.11.0-preview.23cc337
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 +119 -1
- package/dist/components/ActionListItem/ActionListItem.cjs +86 -0
- package/dist/components/ActionListItem/ActionListItem.cjs.map +1 -0
- package/dist/components/ActionListItem/ActionListItem.d.cts +4 -0
- package/dist/components/ActionListItem/ActionListItem.d.cts.map +1 -0
- package/dist/components/ActionListItem/ActionListItem.d.mts +4 -0
- package/dist/components/ActionListItem/ActionListItem.d.mts.map +1 -0
- package/dist/components/ActionListItem/ActionListItem.mjs +66 -0
- package/dist/components/ActionListItem/ActionListItem.mjs.map +1 -0
- package/dist/components/ActionListItem/ActionListItem.types.cjs +3 -0
- package/dist/components/ActionListItem/ActionListItem.types.cjs.map +1 -0
- package/dist/components/ActionListItem/ActionListItem.types.d.cts +73 -0
- package/dist/components/ActionListItem/ActionListItem.types.d.cts.map +1 -0
- package/dist/components/ActionListItem/ActionListItem.types.d.mts +73 -0
- package/dist/components/ActionListItem/ActionListItem.types.d.mts.map +1 -0
- package/dist/components/ActionListItem/ActionListItem.types.mjs +2 -0
- package/dist/components/ActionListItem/ActionListItem.types.mjs.map +1 -0
- package/dist/components/ActionListItem/index.cjs +6 -0
- package/dist/components/ActionListItem/index.cjs.map +1 -0
- package/dist/components/ActionListItem/index.d.cts +3 -0
- package/dist/components/ActionListItem/index.d.cts.map +1 -0
- package/dist/components/ActionListItem/index.d.mts +3 -0
- package/dist/components/ActionListItem/index.d.mts.map +1 -0
- package/dist/components/ActionListItem/index.mjs +2 -0
- package/dist/components/ActionListItem/index.mjs.map +1 -0
- package/dist/components/AvatarNetwork/AvatarNetwork.types.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts +7 -9
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts +7 -9
- package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.types.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.cjs +3 -3
- package/dist/components/BadgeCount/BadgeCount.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.cjs +6 -10
- package/dist/components/BadgeCount/BadgeCount.constants.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.d.cts +1 -2
- package/dist/components/BadgeCount/BadgeCount.constants.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.d.mts +1 -2
- package/dist/components/BadgeCount/BadgeCount.constants.d.mts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.mjs +3 -7
- package/dist/components/BadgeCount/BadgeCount.constants.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.mjs +3 -3
- package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.types.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.types.d.cts +5 -22
- package/dist/components/BadgeCount/BadgeCount.types.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.types.d.mts +5 -22
- package/dist/components/BadgeCount/BadgeCount.types.d.mts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.types.mjs.map +1 -1
- package/dist/components/BadgeCount/index.cjs +2 -2
- package/dist/components/BadgeCount/index.cjs.map +1 -1
- package/dist/components/BadgeCount/index.d.cts +1 -1
- package/dist/components/BadgeCount/index.d.cts.map +1 -1
- package/dist/components/BadgeCount/index.d.mts +1 -1
- package/dist/components/BadgeCount/index.d.mts.map +1 -1
- package/dist/components/BadgeCount/index.mjs +1 -1
- package/dist/components/BadgeCount/index.mjs.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.cjs.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.d.cts +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.d.cts.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.d.mts +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.d.mts.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.mjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.cjs +23 -0
- package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.constants.cjs +30 -0
- package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts +7 -0
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts +7 -0
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.constants.mjs +27 -0
- package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.d.cts +4 -0
- package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.d.mts +4 -0
- package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.mjs +23 -0
- package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.types.cjs +3 -0
- package/dist/components/BannerAlert/BannerAlert.types.cjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.types.d.cts +10 -0
- package/dist/components/BannerAlert/BannerAlert.types.d.cts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.types.d.mts +10 -0
- package/dist/components/BannerAlert/BannerAlert.types.d.mts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.types.mjs +2 -0
- package/dist/components/BannerAlert/BannerAlert.types.mjs.map +1 -0
- package/dist/components/BannerAlert/index.cjs +8 -0
- package/dist/components/BannerAlert/index.cjs.map +1 -0
- package/dist/components/BannerAlert/index.d.cts +4 -0
- package/dist/components/BannerAlert/index.d.cts.map +1 -0
- package/dist/components/BannerAlert/index.d.mts +4 -0
- package/dist/components/BannerAlert/index.d.mts.map +1 -0
- package/dist/components/BannerAlert/index.mjs +3 -0
- package/dist/components/BannerAlert/index.mjs.map +1 -0
- package/dist/components/BannerBase/BannerBase.cjs +63 -0
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -0
- package/dist/components/BannerBase/BannerBase.d.cts +4 -0
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -0
- package/dist/components/BannerBase/BannerBase.d.mts +4 -0
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -0
- package/dist/components/BannerBase/BannerBase.mjs +63 -0
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -0
- package/dist/components/BannerBase/BannerBase.types.cjs +3 -0
- package/dist/components/BannerBase/BannerBase.types.cjs.map +1 -0
- package/dist/components/BannerBase/BannerBase.types.d.cts +53 -0
- package/dist/components/BannerBase/BannerBase.types.d.cts.map +1 -0
- package/dist/components/BannerBase/BannerBase.types.d.mts +53 -0
- package/dist/components/BannerBase/BannerBase.types.d.mts.map +1 -0
- package/dist/components/BannerBase/BannerBase.types.mjs +2 -0
- package/dist/components/BannerBase/BannerBase.types.mjs.map +1 -0
- package/dist/components/BannerBase/index.cjs +6 -0
- package/dist/components/BannerBase/index.cjs.map +1 -0
- package/dist/components/BannerBase/index.d.cts +3 -0
- package/dist/components/BannerBase/index.d.cts.map +1 -0
- package/dist/components/BannerBase/index.d.mts +3 -0
- package/dist/components/BannerBase/index.d.mts.map +1 -0
- package/dist/components/BannerBase/index.mjs +2 -0
- package/dist/components/BannerBase/index.mjs.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.cjs +109 -0
- package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.d.cts +16 -0
- package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.d.mts +16 -0
- package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.mjs +87 -0
- package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.types.cjs +3 -0
- package/dist/components/BottomSheet/BottomSheet.types.cjs.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.types.d.cts +28 -0
- package/dist/components/BottomSheet/BottomSheet.types.d.cts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.types.d.mts +28 -0
- package/dist/components/BottomSheet/BottomSheet.types.d.mts.map +1 -0
- package/dist/components/BottomSheet/BottomSheet.types.mjs +2 -0
- package/dist/components/BottomSheet/BottomSheet.types.mjs.map +1 -0
- package/dist/components/BottomSheet/index.cjs +6 -0
- package/dist/components/BottomSheet/index.cjs.map +1 -0
- package/dist/components/BottomSheet/index.d.cts +3 -0
- package/dist/components/BottomSheet/index.d.cts.map +1 -0
- package/dist/components/BottomSheet/index.d.mts +3 -0
- package/dist/components/BottomSheet/index.d.mts.map +1 -0
- package/dist/components/BottomSheet/index.mjs +2 -0
- package/dist/components/BottomSheet/index.mjs.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +207 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs +18 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts +14 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts +14 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs +15 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +13 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +13 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +190 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs +3 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +56 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +56 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs +2 -0
- package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -0
- package/dist/components/BottomSheetDialog/index.cjs +9 -0
- package/dist/components/BottomSheetDialog/index.cjs.map +1 -0
- package/dist/components/BottomSheetDialog/index.d.cts +3 -0
- package/dist/components/BottomSheetDialog/index.d.cts.map +1 -0
- package/dist/components/BottomSheetDialog/index.d.mts +3 -0
- package/dist/components/BottomSheetDialog/index.d.mts.map +1 -0
- package/dist/components/BottomSheetDialog/index.mjs +2 -0
- package/dist/components/BottomSheetDialog/index.mjs.map +1 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs +35 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.d.cts +4 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.d.cts.map +1 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.d.mts +4 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.d.mts.map +1 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs +35 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.types.cjs +12 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.types.cjs.map +1 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.cts +41 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.cts.map +1 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.mts +41 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.mts.map +1 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.types.mjs +9 -0
- package/dist/components/BottomSheetFooter/BottomSheetFooter.types.mjs.map +1 -0
- package/dist/components/BottomSheetFooter/index.cjs +8 -0
- package/dist/components/BottomSheetFooter/index.cjs.map +1 -0
- package/dist/components/BottomSheetFooter/index.d.cts +4 -0
- package/dist/components/BottomSheetFooter/index.d.cts.map +1 -0
- package/dist/components/BottomSheetFooter/index.d.mts +4 -0
- package/dist/components/BottomSheetFooter/index.d.mts.map +1 -0
- package/dist/components/BottomSheetFooter/index.mjs +3 -0
- package/dist/components/BottomSheetFooter/index.mjs.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +27 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs +15 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts +7 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts +7 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs +12 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.d.cts +4 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.d.cts.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.d.mts +4 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.d.mts.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +27 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs +14 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts +50 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts +50 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts.map +1 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs +11 -0
- package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs.map +1 -0
- package/dist/components/BottomSheetHeader/index.cjs +8 -0
- package/dist/components/BottomSheetHeader/index.cjs.map +1 -0
- package/dist/components/BottomSheetHeader/index.d.cts +4 -0
- package/dist/components/BottomSheetHeader/index.d.cts.map +1 -0
- package/dist/components/BottomSheetHeader/index.d.mts +4 -0
- package/dist/components/BottomSheetHeader/index.d.mts.map +1 -0
- package/dist/components/BottomSheetHeader/index.mjs +3 -0
- package/dist/components/BottomSheetHeader/index.mjs.map +1 -0
- package/dist/components/ButtonBase/ButtonBase.cjs +4 -11
- package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.cts +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.mts +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.mjs +5 -12
- package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.d.cts +7 -0
- package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.d.mts +7 -0
- package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
- package/dist/components/ButtonFilter/ButtonFilter.cjs +28 -0
- package/dist/components/ButtonFilter/ButtonFilter.cjs.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.d.cts +4 -0
- package/dist/components/ButtonFilter/ButtonFilter.d.cts.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.d.mts +4 -0
- package/dist/components/ButtonFilter/ButtonFilter.d.mts.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.mjs +28 -0
- package/dist/components/ButtonFilter/ButtonFilter.mjs.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.cjs +3 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.cjs.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.d.cts +9 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.d.cts.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.d.mts +9 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.d.mts.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.mjs +2 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.mjs.map +1 -0
- package/dist/components/ButtonFilter/index.cjs +6 -0
- package/dist/components/ButtonFilter/index.cjs.map +1 -0
- package/dist/components/ButtonFilter/index.d.cts +3 -0
- package/dist/components/ButtonFilter/index.d.cts.map +1 -0
- package/dist/components/ButtonFilter/index.d.mts +3 -0
- package/dist/components/ButtonFilter/index.d.mts.map +1 -0
- package/dist/components/ButtonFilter/index.mjs +2 -0
- package/dist/components/ButtonFilter/index.mjs.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.cjs +37 -0
- package/dist/components/ButtonHero/ButtonHero.cjs.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.d.cts +13 -0
- package/dist/components/ButtonHero/ButtonHero.d.cts.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.d.mts +13 -0
- package/dist/components/ButtonHero/ButtonHero.d.mts.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.mjs +37 -0
- package/dist/components/ButtonHero/ButtonHero.mjs.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.types.cjs +3 -0
- package/dist/components/ButtonHero/ButtonHero.types.cjs.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.types.d.cts +3 -0
- package/dist/components/ButtonHero/ButtonHero.types.d.cts.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.types.d.mts +3 -0
- package/dist/components/ButtonHero/ButtonHero.types.d.mts.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.types.mjs +2 -0
- package/dist/components/ButtonHero/ButtonHero.types.mjs.map +1 -0
- package/dist/components/ButtonHero/index.cjs +8 -0
- package/dist/components/ButtonHero/index.cjs.map +1 -0
- package/dist/components/ButtonHero/index.d.cts +4 -0
- package/dist/components/ButtonHero/index.d.cts.map +1 -0
- package/dist/components/ButtonHero/index.d.mts +4 -0
- package/dist/components/ButtonHero/index.d.mts.map +1 -0
- package/dist/components/ButtonHero/index.mjs +3 -0
- package/dist/components/ButtonHero/index.mjs.map +1 -0
- package/dist/components/ButtonIcon/ButtonIcon.cjs +10 -4
- package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.d.cts +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.d.mts +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.mjs +11 -5
- package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +4 -11
- package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +4 -11
- package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
- package/dist/components/ButtonIcon/index.cjs +2 -1
- package/dist/components/ButtonIcon/index.cjs.map +1 -1
- package/dist/components/ButtonIcon/index.d.cts +1 -1
- package/dist/components/ButtonIcon/index.d.cts.map +1 -1
- package/dist/components/ButtonIcon/index.d.mts +1 -1
- package/dist/components/ButtonIcon/index.d.mts.map +1 -1
- package/dist/components/ButtonIcon/index.mjs +1 -1
- package/dist/components/ButtonIcon/index.mjs.map +1 -1
- package/dist/components/ButtonSemantic/ButtonSemantic.cjs +64 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.cjs.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.constants.cjs +17 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.constants.cjs.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.constants.d.cts +5 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.constants.d.cts.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.constants.d.mts +5 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.constants.d.mts.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.constants.mjs +14 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.constants.mjs.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.d.cts +4 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.d.cts.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.d.mts +4 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.d.mts.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.mjs +44 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.mjs.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.types.cjs +18 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.types.cjs.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.types.d.cts +30 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.types.d.cts.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.types.d.mts +30 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.types.d.mts.map +1 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.types.mjs +15 -0
- package/dist/components/ButtonSemantic/ButtonSemantic.types.mjs.map +1 -0
- package/dist/components/ButtonSemantic/index.cjs +8 -0
- package/dist/components/ButtonSemantic/index.cjs.map +1 -0
- package/dist/components/ButtonSemantic/index.d.cts +4 -0
- package/dist/components/ButtonSemantic/index.d.cts.map +1 -0
- package/dist/components/ButtonSemantic/index.d.mts +4 -0
- package/dist/components/ButtonSemantic/index.d.mts.map +1 -0
- package/dist/components/ButtonSemantic/index.mjs +3 -0
- package/dist/components/ButtonSemantic/index.mjs.map +1 -0
- package/dist/components/Card/Card.cjs +26 -0
- package/dist/components/Card/Card.cjs.map +1 -0
- package/dist/components/Card/Card.d.cts +4 -0
- package/dist/components/Card/Card.d.cts.map +1 -0
- package/dist/components/Card/Card.d.mts +4 -0
- package/dist/components/Card/Card.d.mts.map +1 -0
- package/dist/components/Card/Card.mjs +26 -0
- package/dist/components/Card/Card.mjs.map +1 -0
- package/dist/components/Card/Card.types.cjs +3 -0
- package/dist/components/Card/Card.types.cjs.map +1 -0
- package/dist/components/Card/Card.types.d.cts +25 -0
- package/dist/components/Card/Card.types.d.cts.map +1 -0
- package/dist/components/Card/Card.types.d.mts +25 -0
- package/dist/components/Card/Card.types.d.mts.map +1 -0
- package/dist/components/Card/Card.types.mjs +2 -0
- package/dist/components/Card/Card.types.mjs.map +1 -0
- package/dist/components/Card/index.cjs +6 -0
- package/dist/components/Card/index.cjs.map +1 -0
- package/dist/components/Card/index.d.cts +3 -0
- package/dist/components/Card/index.d.cts.map +1 -0
- package/dist/components/Card/index.d.mts +3 -0
- package/dist/components/Card/index.d.mts.map +1 -0
- package/dist/components/Card/index.mjs +2 -0
- package/dist/components/Card/index.mjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.cjs +132 -0
- package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.constants.cjs +15 -0
- package/dist/components/HeaderBase/HeaderBase.constants.cjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.constants.d.cts +7 -0
- package/dist/components/HeaderBase/HeaderBase.constants.d.cts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.constants.d.mts +7 -0
- package/dist/components/HeaderBase/HeaderBase.constants.d.mts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.constants.mjs +12 -0
- package/dist/components/HeaderBase/HeaderBase.constants.mjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.d.cts +4 -0
- package/dist/components/HeaderBase/HeaderBase.d.cts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.d.mts +4 -0
- package/dist/components/HeaderBase/HeaderBase.d.mts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.mjs +112 -0
- package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.cjs +15 -0
- package/dist/components/HeaderBase/HeaderBase.types.cjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.cts +87 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.cts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.mts +87 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.mts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.mjs +12 -0
- package/dist/components/HeaderBase/HeaderBase.types.mjs.map +1 -0
- package/dist/components/HeaderBase/index.cjs +8 -0
- package/dist/components/HeaderBase/index.cjs.map +1 -0
- package/dist/components/HeaderBase/index.d.cts +4 -0
- package/dist/components/HeaderBase/index.d.cts.map +1 -0
- package/dist/components/HeaderBase/index.d.mts +4 -0
- package/dist/components/HeaderBase/index.d.mts.map +1 -0
- package/dist/components/HeaderBase/index.mjs +3 -0
- package/dist/components/HeaderBase/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/ai.svg +1 -1
- package/dist/components/Icon/assets/corporate-fare.svg +1 -0
- package/dist/components/Input/Input.cjs +63 -0
- package/dist/components/Input/Input.cjs.map +1 -0
- package/dist/components/Input/Input.d.cts +11 -0
- package/dist/components/Input/Input.d.cts.map +1 -0
- package/dist/components/Input/Input.d.mts +11 -0
- package/dist/components/Input/Input.d.mts.map +1 -0
- package/dist/components/Input/Input.mjs +60 -0
- package/dist/components/Input/Input.mjs.map +1 -0
- package/dist/components/Input/Input.types.cjs +3 -0
- package/dist/components/Input/Input.types.cjs.map +1 -0
- package/dist/components/Input/Input.types.d.cts +37 -0
- package/dist/components/Input/Input.types.d.cts.map +1 -0
- package/dist/components/Input/Input.types.d.mts +37 -0
- package/dist/components/Input/Input.types.d.mts.map +1 -0
- package/dist/components/Input/Input.types.mjs +2 -0
- package/dist/components/Input/Input.types.mjs.map +1 -0
- package/dist/components/Input/index.cjs +6 -0
- package/dist/components/Input/index.cjs.map +1 -0
- package/dist/components/Input/index.d.cts +3 -0
- package/dist/components/Input/index.d.cts.map +1 -0
- package/dist/components/Input/index.d.mts +3 -0
- package/dist/components/Input/index.d.mts.map +1 -0
- package/dist/components/Input/index.mjs +2 -0
- package/dist/components/Input/index.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +33 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +14 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +14 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +35 -0
- package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +39 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +25 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +25 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +41 -0
- package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.cjs +76 -0
- package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.d.cts +25 -0
- package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.d.mts +25 -0
- package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.mjs +77 -0
- package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.cjs +29 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +177 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +177 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.mjs +26 -0
- package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +6 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +3 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +3 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +2 -0
- package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +29 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +1 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +17 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +17 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +1 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +31 -0
- package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +1 -0
- package/dist/components/KeyValueRow/index.cjs +15 -0
- package/dist/components/KeyValueRow/index.cjs.map +1 -0
- package/dist/components/KeyValueRow/index.d.cts +3 -0
- package/dist/components/KeyValueRow/index.d.cts.map +1 -0
- package/dist/components/KeyValueRow/index.d.mts +3 -0
- package/dist/components/KeyValueRow/index.d.mts.map +1 -0
- package/dist/components/KeyValueRow/index.mjs +3 -0
- package/dist/components/KeyValueRow/index.mjs.map +1 -0
- package/dist/components/Label/Label.cjs +11 -0
- package/dist/components/Label/Label.cjs.map +1 -0
- package/dist/components/Label/Label.d.cts +4 -0
- package/dist/components/Label/Label.d.cts.map +1 -0
- package/dist/components/Label/Label.d.mts +4 -0
- package/dist/components/Label/Label.d.mts.map +1 -0
- package/dist/components/Label/Label.mjs +11 -0
- package/dist/components/Label/Label.mjs.map +1 -0
- package/dist/components/Label/Label.types.cjs +3 -0
- package/dist/components/Label/Label.types.cjs.map +1 -0
- package/dist/components/Label/Label.types.d.cts +9 -0
- package/dist/components/Label/Label.types.d.cts.map +1 -0
- package/dist/components/Label/Label.types.d.mts +9 -0
- package/dist/components/Label/Label.types.d.mts.map +1 -0
- package/dist/components/Label/Label.types.mjs +2 -0
- package/dist/components/Label/Label.types.mjs.map +1 -0
- package/dist/components/Label/index.cjs +6 -0
- package/dist/components/Label/index.cjs.map +1 -0
- package/dist/components/Label/index.d.cts +3 -0
- package/dist/components/Label/index.d.cts.map +1 -0
- package/dist/components/Label/index.d.mts +3 -0
- package/dist/components/Label/index.d.mts.map +1 -0
- package/dist/components/Label/index.mjs +2 -0
- package/dist/components/Label/index.mjs.map +1 -0
- package/dist/components/ListItem/ListItem.cjs +61 -0
- package/dist/components/ListItem/ListItem.cjs.map +1 -0
- package/dist/components/ListItem/ListItem.constants.cjs +14 -0
- package/dist/components/ListItem/ListItem.constants.cjs.map +1 -0
- package/dist/components/ListItem/ListItem.constants.d.cts +8 -0
- package/dist/components/ListItem/ListItem.constants.d.cts.map +1 -0
- package/dist/components/ListItem/ListItem.constants.d.mts +8 -0
- package/dist/components/ListItem/ListItem.constants.d.mts.map +1 -0
- package/dist/components/ListItem/ListItem.constants.mjs +11 -0
- package/dist/components/ListItem/ListItem.constants.mjs.map +1 -0
- package/dist/components/ListItem/ListItem.d.cts +4 -0
- package/dist/components/ListItem/ListItem.d.cts.map +1 -0
- package/dist/components/ListItem/ListItem.d.mts +4 -0
- package/dist/components/ListItem/ListItem.d.mts.map +1 -0
- package/dist/components/ListItem/ListItem.mjs +41 -0
- package/dist/components/ListItem/ListItem.mjs.map +1 -0
- package/dist/components/ListItem/ListItem.types.cjs +12 -0
- package/dist/components/ListItem/ListItem.types.cjs.map +1 -0
- package/dist/components/ListItem/ListItem.types.d.cts +60 -0
- package/dist/components/ListItem/ListItem.types.d.cts.map +1 -0
- package/dist/components/ListItem/ListItem.types.d.mts +60 -0
- package/dist/components/ListItem/ListItem.types.d.mts.map +1 -0
- package/dist/components/ListItem/ListItem.types.mjs +9 -0
- package/dist/components/ListItem/ListItem.types.mjs.map +1 -0
- package/dist/components/ListItem/index.cjs +8 -0
- package/dist/components/ListItem/index.cjs.map +1 -0
- package/dist/components/ListItem/index.d.cts +4 -0
- package/dist/components/ListItem/index.d.cts.map +1 -0
- package/dist/components/ListItem/index.d.mts +4 -0
- package/dist/components/ListItem/index.d.mts.map +1 -0
- package/dist/components/ListItem/index.mjs +3 -0
- package/dist/components/ListItem/index.mjs.map +1 -0
- package/dist/components/MainActionButton/MainActionButton.cjs +28 -0
- package/dist/components/MainActionButton/MainActionButton.cjs.map +1 -0
- package/dist/components/MainActionButton/MainActionButton.d.cts +4 -0
- package/dist/components/MainActionButton/MainActionButton.d.cts.map +1 -0
- package/dist/components/MainActionButton/MainActionButton.d.mts +4 -0
- package/dist/components/MainActionButton/MainActionButton.d.mts.map +1 -0
- package/dist/components/MainActionButton/MainActionButton.mjs +28 -0
- package/dist/components/MainActionButton/MainActionButton.mjs.map +1 -0
- package/dist/components/MainActionButton/MainActionButton.types.cjs +3 -0
- package/dist/components/MainActionButton/MainActionButton.types.cjs.map +1 -0
- package/dist/components/MainActionButton/MainActionButton.types.d.cts +41 -0
- package/dist/components/MainActionButton/MainActionButton.types.d.cts.map +1 -0
- package/dist/components/MainActionButton/MainActionButton.types.d.mts +41 -0
- package/dist/components/MainActionButton/MainActionButton.types.d.mts.map +1 -0
- package/dist/components/MainActionButton/MainActionButton.types.mjs +2 -0
- package/dist/components/MainActionButton/MainActionButton.types.mjs.map +1 -0
- package/dist/components/MainActionButton/index.cjs +6 -0
- package/dist/components/MainActionButton/index.cjs.map +1 -0
- package/dist/components/MainActionButton/index.d.cts +3 -0
- package/dist/components/MainActionButton/index.d.cts.map +1 -0
- package/dist/components/MainActionButton/index.d.mts +3 -0
- package/dist/components/MainActionButton/index.d.mts.map +1 -0
- package/dist/components/MainActionButton/index.mjs +2 -0
- package/dist/components/MainActionButton/index.mjs.map +1 -0
- package/dist/components/RadioButton/RadioButton.cjs +58 -0
- package/dist/components/RadioButton/RadioButton.cjs.map +1 -0
- package/dist/components/RadioButton/RadioButton.constants.cjs +12 -0
- package/dist/components/RadioButton/RadioButton.constants.cjs.map +1 -0
- package/dist/components/RadioButton/RadioButton.constants.d.cts +3 -0
- package/dist/components/RadioButton/RadioButton.constants.d.cts.map +1 -0
- package/dist/components/RadioButton/RadioButton.constants.d.mts +3 -0
- package/dist/components/RadioButton/RadioButton.constants.d.mts.map +1 -0
- package/dist/components/RadioButton/RadioButton.constants.mjs +9 -0
- package/dist/components/RadioButton/RadioButton.constants.mjs.map +1 -0
- package/dist/components/RadioButton/RadioButton.d.cts +4 -0
- package/dist/components/RadioButton/RadioButton.d.cts.map +1 -0
- package/dist/components/RadioButton/RadioButton.d.mts +4 -0
- package/dist/components/RadioButton/RadioButton.d.mts.map +1 -0
- package/dist/components/RadioButton/RadioButton.mjs +58 -0
- package/dist/components/RadioButton/RadioButton.mjs.map +1 -0
- package/dist/components/RadioButton/RadioButton.types.cjs +3 -0
- package/dist/components/RadioButton/RadioButton.types.cjs.map +1 -0
- package/dist/components/RadioButton/RadioButton.types.d.cts +64 -0
- package/dist/components/RadioButton/RadioButton.types.d.cts.map +1 -0
- package/dist/components/RadioButton/RadioButton.types.d.mts +64 -0
- package/dist/components/RadioButton/RadioButton.types.d.mts.map +1 -0
- package/dist/components/RadioButton/RadioButton.types.mjs +2 -0
- package/dist/components/RadioButton/RadioButton.types.mjs.map +1 -0
- package/dist/components/RadioButton/index.cjs +6 -0
- package/dist/components/RadioButton/index.cjs.map +1 -0
- package/dist/components/RadioButton/index.d.cts +3 -0
- package/dist/components/RadioButton/index.d.cts.map +1 -0
- package/dist/components/RadioButton/index.d.mts +3 -0
- package/dist/components/RadioButton/index.d.mts.map +1 -0
- package/dist/components/RadioButton/index.mjs +2 -0
- package/dist/components/RadioButton/index.mjs.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.cjs +47 -0
- package/dist/components/SensitiveText/SensitiveText.cjs.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.constants.cjs +14 -0
- package/dist/components/SensitiveText/SensitiveText.constants.cjs.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.constants.d.cts +11 -0
- package/dist/components/SensitiveText/SensitiveText.constants.d.cts.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.constants.d.mts +11 -0
- package/dist/components/SensitiveText/SensitiveText.constants.d.mts.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.constants.mjs +11 -0
- package/dist/components/SensitiveText/SensitiveText.constants.mjs.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.d.cts +4 -0
- package/dist/components/SensitiveText/SensitiveText.d.cts.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.d.mts +4 -0
- package/dist/components/SensitiveText/SensitiveText.d.mts.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.mjs +27 -0
- package/dist/components/SensitiveText/SensitiveText.mjs.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.types.cjs +3 -0
- package/dist/components/SensitiveText/SensitiveText.types.cjs.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.types.d.cts +38 -0
- package/dist/components/SensitiveText/SensitiveText.types.d.cts.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.types.d.mts +38 -0
- package/dist/components/SensitiveText/SensitiveText.types.d.mts.map +1 -0
- package/dist/components/SensitiveText/SensitiveText.types.mjs +2 -0
- package/dist/components/SensitiveText/SensitiveText.types.mjs.map +1 -0
- package/dist/components/SensitiveText/index.cjs +8 -0
- package/dist/components/SensitiveText/index.cjs.map +1 -0
- package/dist/components/SensitiveText/index.d.cts +4 -0
- package/dist/components/SensitiveText/index.d.cts.map +1 -0
- package/dist/components/SensitiveText/index.d.mts +4 -0
- package/dist/components/SensitiveText/index.d.mts.map +1 -0
- package/dist/components/SensitiveText/index.mjs +3 -0
- package/dist/components/SensitiveText/index.mjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.cjs +86 -0
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.cts +5 -0
- package/dist/components/Skeleton/Skeleton.d.cts.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.mts +5 -0
- package/dist/components/Skeleton/Skeleton.d.mts.map +1 -0
- package/dist/components/Skeleton/Skeleton.mjs +68 -0
- package/dist/components/Skeleton/Skeleton.mjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.types.cjs +3 -0
- package/dist/components/Skeleton/Skeleton.types.cjs.map +1 -0
- package/dist/components/Skeleton/Skeleton.types.d.cts +51 -0
- package/dist/components/Skeleton/Skeleton.types.d.cts.map +1 -0
- package/dist/components/Skeleton/Skeleton.types.d.mts +51 -0
- package/dist/components/Skeleton/Skeleton.types.d.mts.map +1 -0
- package/dist/components/Skeleton/Skeleton.types.mjs +2 -0
- package/dist/components/Skeleton/Skeleton.types.mjs.map +1 -0
- package/dist/components/Skeleton/index.cjs +9 -0
- package/dist/components/Skeleton/index.cjs.map +1 -0
- package/dist/components/Skeleton/index.d.cts +3 -0
- package/dist/components/Skeleton/index.d.cts.map +1 -0
- package/dist/components/Skeleton/index.d.mts +3 -0
- package/dist/components/Skeleton/index.d.mts.map +1 -0
- package/dist/components/Skeleton/index.mjs +2 -0
- package/dist/components/Skeleton/index.mjs.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.cjs +22 -0
- package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.d.cts +4 -0
- package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.d.mts +4 -0
- package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.mjs +22 -0
- package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.types.cjs +3 -0
- package/dist/components/TabEmptyState/TabEmptyState.types.cjs.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.types.d.cts +45 -0
- package/dist/components/TabEmptyState/TabEmptyState.types.d.cts.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.types.d.mts +45 -0
- package/dist/components/TabEmptyState/TabEmptyState.types.d.mts.map +1 -0
- package/dist/components/TabEmptyState/TabEmptyState.types.mjs +2 -0
- package/dist/components/TabEmptyState/TabEmptyState.types.mjs.map +1 -0
- package/dist/components/TabEmptyState/index.cjs +6 -0
- package/dist/components/TabEmptyState/index.cjs.map +1 -0
- package/dist/components/TabEmptyState/index.d.cts +3 -0
- package/dist/components/TabEmptyState/index.d.cts.map +1 -0
- package/dist/components/TabEmptyState/index.d.mts +3 -0
- package/dist/components/TabEmptyState/index.d.mts.map +1 -0
- package/dist/components/TabEmptyState/index.mjs +2 -0
- package/dist/components/TabEmptyState/index.mjs.map +1 -0
- package/dist/components/TextField/TextField.cjs +42 -0
- package/dist/components/TextField/TextField.cjs.map +1 -0
- package/dist/components/TextField/TextField.constants.cjs +13 -0
- package/dist/components/TextField/TextField.constants.cjs.map +1 -0
- package/dist/components/TextField/TextField.constants.d.cts +6 -0
- package/dist/components/TextField/TextField.constants.d.cts.map +1 -0
- package/dist/components/TextField/TextField.constants.d.mts +6 -0
- package/dist/components/TextField/TextField.constants.d.mts.map +1 -0
- package/dist/components/TextField/TextField.constants.mjs +10 -0
- package/dist/components/TextField/TextField.constants.mjs.map +1 -0
- package/dist/components/TextField/TextField.d.cts +12 -0
- package/dist/components/TextField/TextField.d.cts.map +1 -0
- package/dist/components/TextField/TextField.d.mts +12 -0
- package/dist/components/TextField/TextField.d.mts.map +1 -0
- package/dist/components/TextField/TextField.mjs +39 -0
- package/dist/components/TextField/TextField.mjs.map +1 -0
- package/dist/components/TextField/TextField.types.cjs +13 -0
- package/dist/components/TextField/TextField.types.cjs.map +1 -0
- package/dist/components/TextField/TextField.types.d.cts +49 -0
- package/dist/components/TextField/TextField.types.d.cts.map +1 -0
- package/dist/components/TextField/TextField.types.d.mts +49 -0
- package/dist/components/TextField/TextField.types.d.mts.map +1 -0
- package/dist/components/TextField/TextField.types.mjs +10 -0
- package/dist/components/TextField/TextField.types.mjs.map +1 -0
- package/dist/components/TextField/index.cjs +8 -0
- package/dist/components/TextField/index.cjs.map +1 -0
- package/dist/components/TextField/index.d.cts +4 -0
- package/dist/components/TextField/index.d.cts.map +1 -0
- package/dist/components/TextField/index.d.mts +4 -0
- package/dist/components/TextField/index.d.mts.map +1 -0
- package/dist/components/TextField/index.mjs +3 -0
- package/dist/components/TextField/index.mjs.map +1 -0
- package/dist/components/Toast/Toast.cjs +175 -0
- package/dist/components/Toast/Toast.cjs.map +1 -0
- package/dist/components/Toast/Toast.constants.cjs +12 -0
- package/dist/components/Toast/Toast.constants.cjs.map +1 -0
- package/dist/components/Toast/Toast.constants.d.cts +8 -0
- package/dist/components/Toast/Toast.constants.d.cts.map +1 -0
- package/dist/components/Toast/Toast.constants.d.mts +8 -0
- package/dist/components/Toast/Toast.constants.d.mts.map +1 -0
- package/dist/components/Toast/Toast.constants.mjs +9 -0
- package/dist/components/Toast/Toast.constants.mjs.map +1 -0
- package/dist/components/Toast/Toast.context.cjs +40 -0
- package/dist/components/Toast/Toast.context.cjs.map +1 -0
- package/dist/components/Toast/Toast.context.d.cts +7 -0
- package/dist/components/Toast/Toast.context.d.cts.map +1 -0
- package/dist/components/Toast/Toast.context.d.mts +7 -0
- package/dist/components/Toast/Toast.context.d.mts.map +1 -0
- package/dist/components/Toast/Toast.context.mjs +20 -0
- package/dist/components/Toast/Toast.context.mjs.map +1 -0
- package/dist/components/Toast/Toast.d.cts +8 -0
- package/dist/components/Toast/Toast.d.cts.map +1 -0
- package/dist/components/Toast/Toast.d.mts +8 -0
- package/dist/components/Toast/Toast.d.mts.map +1 -0
- package/dist/components/Toast/Toast.mjs +157 -0
- package/dist/components/Toast/Toast.mjs.map +1 -0
- package/dist/components/Toast/Toast.types.cjs +19 -0
- package/dist/components/Toast/Toast.types.cjs.map +1 -0
- package/dist/components/Toast/Toast.types.d.cts +124 -0
- package/dist/components/Toast/Toast.types.d.cts.map +1 -0
- package/dist/components/Toast/Toast.types.d.mts +124 -0
- package/dist/components/Toast/Toast.types.d.mts.map +1 -0
- package/dist/components/Toast/Toast.types.mjs +16 -0
- package/dist/components/Toast/Toast.types.mjs.map +1 -0
- package/dist/components/Toast/index.cjs +19 -0
- package/dist/components/Toast/index.cjs.map +1 -0
- package/dist/components/Toast/index.d.cts +6 -0
- package/dist/components/Toast/index.d.cts.map +1 -0
- package/dist/components/Toast/index.d.mts +6 -0
- package/dist/components/Toast/index.d.mts.map +1 -0
- package/dist/components/Toast/index.mjs +5 -0
- package/dist/components/Toast/index.mjs.map +1 -0
- package/dist/components/index.cjs +67 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +51 -3
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +51 -3
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +25 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +5 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs +5 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.cjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.cts +14 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.cts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.mts +14 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.mts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.mjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/index.cjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/index.d.cts +1 -1
- package/dist/components/temp-components/ButtonAnimated/index.d.cts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/index.d.mts +1 -1
- package/dist/components/temp-components/ButtonAnimated/index.d.mts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/index.mjs.map +1 -1
- package/dist/types/index.cjs +12 -16
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +10 -13
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +10 -13
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +11 -14
- package/dist/types/index.mjs.map +1 -1
- package/package.json +9 -5
|
@@ -31,10 +31,9 @@ const types_1 = require("../../types/index.cjs");
|
|
|
31
31
|
const Icon_1 = require("../Icon/index.cjs");
|
|
32
32
|
const ButtonAnimated_1 = require("../temp-components/ButtonAnimated/index.cjs");
|
|
33
33
|
const Spinner_1 = require("../temp-components/Spinner/index.cjs");
|
|
34
|
-
const TextOrChildren_1 = require("../temp-components/TextOrChildren/TextOrChildren.cjs");
|
|
35
34
|
const Text_1 = require("../Text/index.cjs");
|
|
36
35
|
const ButtonBase_constants_1 = require("./ButtonBase.constants.cjs");
|
|
37
|
-
const ButtonBase = ({ children, textProps, size = types_1.ButtonBaseSize.Lg, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole = 'button', accessibilityActions, onAccessibilityAction, ...props }) => {
|
|
36
|
+
const ButtonBase = ({ children, textProps, size = types_1.ButtonBaseSize.Lg, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole = 'button', accessibilityActions, onAccessibilityAction, hapticFeedback, ...props }) => {
|
|
38
37
|
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
39
38
|
const finalStartIconName = startIconName ?? startIconProps?.name;
|
|
40
39
|
const finalEndIconName = endIconName ?? endIconProps?.name;
|
|
@@ -74,7 +73,7 @@ const ButtonBase = ({ children, textProps, size = types_1.ButtonBaseSize.Lg, isL
|
|
|
74
73
|
}
|
|
75
74
|
return state;
|
|
76
75
|
}, [isDisabled, isLoading]);
|
|
77
|
-
return (<ButtonAnimated_1.ButtonAnimated disabled={isDisabled || isLoading} accessibilityRole={accessibilityRole} accessibilityLabel={finalAccessibilityLabel} accessibilityHint={finalAccessibilityHint} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} accessibilityState={accessibilityState} accessible style={({ pressed }) => {
|
|
76
|
+
return (<ButtonAnimated_1.ButtonAnimated disabled={isDisabled || isLoading} hapticFeedback={hapticFeedback} accessibilityRole={accessibilityRole} accessibilityLabel={finalAccessibilityLabel} accessibilityHint={finalAccessibilityHint} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} accessibilityState={accessibilityState} accessible style={({ pressed }) => {
|
|
78
77
|
// Evaluate custom className if it's a function
|
|
79
78
|
const customClassName = typeof twClassName === 'function'
|
|
80
79
|
? twClassName(pressed)
|
|
@@ -118,15 +117,9 @@ const ButtonBase = ({ children, textProps, size = types_1.ButtonBaseSize.Lg, isL
|
|
|
118
117
|
{startAccessory}
|
|
119
118
|
</react_native_1.View>))}
|
|
120
119
|
|
|
121
|
-
{typeof children === 'string' ? (<
|
|
122
|
-
variant: Text_1.TextVariant.BodyMd,
|
|
123
|
-
fontWeight: Text_1.FontWeight.Medium,
|
|
124
|
-
color: Text_1.TextColor.TextDefault,
|
|
125
|
-
twClassName: `shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''}`,
|
|
126
|
-
...textProps,
|
|
127
|
-
}}>
|
|
120
|
+
{typeof children === 'string' ? (<Text_1.Text variant={Text_1.TextVariant.BodyMd} fontWeight={Text_1.FontWeight.Medium} color={Text_1.TextColor.TextDefault} {...textProps} twClassName={`shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''} ${textProps?.twClassName ?? ''}`}>
|
|
128
121
|
{children}
|
|
129
|
-
</
|
|
122
|
+
</Text_1.Text>) : (<react_native_1.View style={tw.style(isLoading && 'opacity-0')}>{children}</react_native_1.View>)}
|
|
130
123
|
|
|
131
124
|
{finalEndIconName ? (<Icon_1.Icon name={finalEndIconName} size={Icon_1.IconSize.Sm} twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`} {...endIconProps}/>) : (endAccessory && (<react_native_1.View style={tw.style(isLoading && 'opacity-0')}>
|
|
132
125
|
{endAccessory}
|
|
@@ -1 +1 @@
|
|
|
1
|
-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AC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,mBAAI,CAAC,CACnE,CAED;;UAAA,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAClB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,gBAAgB,CAAC,CACvB,IAAI,CAAC,CAAC,eAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,CAAC,YAAY,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvG,IAAI,YAAY,CAAC,EACjB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,IAAI,CACd,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,WAAW,CAAC,CAAC,CAC9C;gBAAA,CAAC,YAAY,CACf;cAAA,EAAE,mBAAI,CAAC,CACR,CACF,CACH;QAAA,GAAG,CACJ,CACH;IAAA,EAAE,+BAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC;AA1MW,QAAA,UAAU,cA0MrB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { ButtonBaseSize } from '../../types';\nimport { Icon, IconColor, IconSize } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { Spinner } from '../temp-components/Spinner';\nimport { TextOrChildren } from '../temp-components/TextOrChildren/TextOrChildren';\nimport { TextVariant, FontWeight, TextColor } from '../Text';\n\nimport { TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION } from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading, please wait';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center gap-x-2',\n // Visual styling\n 'rounded-xl bg-muted px-4 min-w-[80px] overflow-hidden',\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <View\n style={tw.style(\n 'absolute inset-0 flex items-center justify-center',\n )}\n testID=\"spinner-container\"\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n loadingTextProps={{\n numberOfLines: 1,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n {...spinnerProps}\n />\n </View>\n )}\n\n {/* Button content - opacity controlled individually on each child */}\n {finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...startIconProps}\n />\n ) : (\n startAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {startAccessory}\n </View>\n )\n )}\n\n {typeof children === 'string' ? (\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n twClassName: `shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''}`,\n ...textProps,\n }}\n >\n {children}\n </TextOrChildren>\n ) : (\n <View style={tw.style(isLoading && 'opacity-0')}>{children}</View>\n )}\n\n {finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...endIconProps}\n />\n ) : (\n endAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {endAccessory}\n </View>\n )\n )}\n </>\n )}\n </ButtonAnimated>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ButtonBase.cjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAuC;AACvC,wDAAoC;AAGpC,iDAA6C;AAC7C,4CAAoD;AACpD,gFAAmE;AACnE,kEAAqD;AACrD,4CAAmE;AAEnE,qEAA8E;AAGvE,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,sBAAc,CAAC,EAAE,EACxB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAAG,QAAQ,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,GAAG,KAAK,EACQ,EAAE,EAAE;IACpB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAE3D,+CAA+C;IAC/C,MAAM,uBAAuB,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC3C,IAAI,kBAAkB,EAAE;YACtB,OAAO,kBAAkB,CAAC;SAC3B;QAED,6DAA6D;QAC7D,IAAI,SAAS,IAAI,WAAW,EAAE;YAC5B,OAAO,WAAW,CAAC;SACpB;QAED,+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AC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,SAAS,EAAE,WAAW,IAAI,EAAE,EAAE,CAAC,CAElK;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,WAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,mBAAI,CAAC,CACnE,CAED;;UAAA,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAClB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,gBAAgB,CAAC,CACvB,IAAI,CAAC,CAAC,eAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,CAAC,YAAY,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvG,IAAI,YAAY,CAAC,EACjB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,IAAI,CACd,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,WAAW,CAAC,CAAC,CAC9C;gBAAA,CAAC,YAAY,CACf;cAAA,EAAE,mBAAI,CAAC,CACR,CACF,CACH;QAAA,GAAG,CACJ,CACH;IAAA,EAAE,+BAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC;AA1MW,QAAA,UAAU,cA0MrB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { ButtonBaseSize } from '../../types';\nimport { Icon, IconColor, IconSize } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { Spinner } from '../temp-components/Spinner';\nimport { Text, TextVariant, FontWeight, TextColor } from '../Text';\n\nimport { TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION } from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n hapticFeedback,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading, please wait';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n hapticFeedback={hapticFeedback}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center gap-x-2',\n // Visual styling\n 'rounded-xl bg-muted px-4 min-w-[80px] overflow-hidden',\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <View\n style={tw.style(\n 'absolute inset-0 flex items-center justify-center',\n )}\n testID=\"spinner-container\"\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n loadingTextProps={{\n numberOfLines: 1,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n {...spinnerProps}\n />\n </View>\n )}\n\n {/* Button content - opacity controlled individually on each child */}\n {finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...startIconProps}\n />\n ) : (\n startAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {startAccessory}\n </View>\n )\n )}\n\n {typeof children === 'string' ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n color={TextColor.TextDefault}\n {...textProps}\n twClassName={`shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''} ${textProps?.twClassName ?? ''}`}\n >\n {children}\n </Text>\n ) : (\n <View style={tw.style(isLoading && 'opacity-0')}>{children}</View>\n )}\n\n {finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...endIconProps}\n />\n ) : (\n endAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {endAccessory}\n </View>\n )\n )}\n </>\n )}\n </ButtonAnimated>\n );\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ButtonBaseProps } from "./ButtonBase.types.cjs";
|
|
3
|
-
export declare const ButtonBase: ({ children, textProps, size, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityActions, onAccessibilityAction, ...props }: ButtonBaseProps) => React.JSX.Element;
|
|
3
|
+
export declare const ButtonBase: ({ children, textProps, size, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityActions, onAccessibilityAction, hapticFeedback, ...props }: ButtonBaseProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=ButtonBase.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;
|
|
1
|
+
{"version":3,"file":"ButtonBase.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AAWvC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,4WA0BpB,eAAe,sBAgLjB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { ButtonBaseProps } from "./ButtonBase.types.mjs";
|
|
3
|
-
export declare const ButtonBase: ({ children, textProps, size, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityActions, onAccessibilityAction, ...props }: ButtonBaseProps) => React.JSX.Element;
|
|
3
|
+
export declare const ButtonBase: ({ children, textProps, size, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole, accessibilityActions, onAccessibilityAction, hapticFeedback, ...props }: ButtonBaseProps) => React.JSX.Element;
|
|
4
4
|
//# sourceMappingURL=ButtonBase.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;
|
|
1
|
+
{"version":3,"file":"ButtonBase.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AAWvC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,4WA0BpB,eAAe,sBAgLjB,CAAC"}
|
|
@@ -12,10 +12,9 @@ import { ButtonBaseSize } from "../../types/index.mjs";
|
|
|
12
12
|
import { Icon, IconColor, IconSize } from "../Icon/index.mjs";
|
|
13
13
|
import { ButtonAnimated } from "../temp-components/ButtonAnimated/index.mjs";
|
|
14
14
|
import { Spinner } from "../temp-components/Spinner/index.mjs";
|
|
15
|
-
import {
|
|
16
|
-
import { TextVariant, FontWeight, TextColor } from "../Text/index.mjs";
|
|
15
|
+
import { Text, TextVariant, FontWeight, TextColor } from "../Text/index.mjs";
|
|
17
16
|
import { TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION } from "./ButtonBase.constants.mjs";
|
|
18
|
-
export const ButtonBase = ({ children, textProps, size = ButtonBaseSize.Lg, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole = 'button', accessibilityActions, onAccessibilityAction, ...props }) => {
|
|
17
|
+
export const ButtonBase = ({ children, textProps, size = ButtonBaseSize.Lg, isLoading, loadingText, spinnerProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole = 'button', accessibilityActions, onAccessibilityAction, hapticFeedback, ...props }) => {
|
|
19
18
|
const tw = useTailwind();
|
|
20
19
|
const finalStartIconName = startIconName ?? startIconProps?.name;
|
|
21
20
|
const finalEndIconName = endIconName ?? endIconProps?.name;
|
|
@@ -55,7 +54,7 @@ export const ButtonBase = ({ children, textProps, size = ButtonBaseSize.Lg, isLo
|
|
|
55
54
|
}
|
|
56
55
|
return state;
|
|
57
56
|
}, [isDisabled, isLoading]);
|
|
58
|
-
return (<ButtonAnimated disabled={isDisabled || isLoading} accessibilityRole={accessibilityRole} accessibilityLabel={finalAccessibilityLabel} accessibilityHint={finalAccessibilityHint} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} accessibilityState={accessibilityState} accessible style={({ pressed }) => {
|
|
57
|
+
return (<ButtonAnimated disabled={isDisabled || isLoading} hapticFeedback={hapticFeedback} accessibilityRole={accessibilityRole} accessibilityLabel={finalAccessibilityLabel} accessibilityHint={finalAccessibilityHint} accessibilityActions={accessibilityActions} onAccessibilityAction={onAccessibilityAction} accessibilityState={accessibilityState} accessible style={({ pressed }) => {
|
|
59
58
|
// Evaluate custom className if it's a function
|
|
60
59
|
const customClassName = typeof twClassName === 'function'
|
|
61
60
|
? twClassName(pressed)
|
|
@@ -99,15 +98,9 @@ export const ButtonBase = ({ children, textProps, size = ButtonBaseSize.Lg, isLo
|
|
|
99
98
|
{startAccessory}
|
|
100
99
|
</View>))}
|
|
101
100
|
|
|
102
|
-
{typeof children === 'string' ? (<
|
|
103
|
-
variant: TextVariant.BodyMd,
|
|
104
|
-
fontWeight: FontWeight.Medium,
|
|
105
|
-
color: TextColor.TextDefault,
|
|
106
|
-
twClassName: `shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''}`,
|
|
107
|
-
...textProps,
|
|
108
|
-
}}>
|
|
101
|
+
{typeof children === 'string' ? (<Text variant={TextVariant.BodyMd} fontWeight={FontWeight.Medium} color={TextColor.TextDefault} {...textProps} twClassName={`shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''} ${textProps?.twClassName ?? ''}`}>
|
|
109
102
|
{children}
|
|
110
|
-
</
|
|
103
|
+
</Text>) : (<View style={tw.style(isLoading && 'opacity-0')}>{children}</View>)}
|
|
111
104
|
|
|
112
105
|
{finalEndIconName ? (<Icon name={finalEndIconName} size={IconSize.Sm} twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`} {...endIconProps}/>) : (endAccessory && (<View style={tw.style(isLoading && 'opacity-0')}>
|
|
113
106
|
{endAccessory}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;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AA,CAAC,QAAQ,CACX;YAAA,EAAE,cAAc,CAAC,CAClB,CAAC,CAAC,CAAC,CACF,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CACnE,CAED;;UAAA,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAClB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,gBAAgB,CAAC,CACvB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,WAAW,CAAC,CAAC,YAAY,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvG,IAAI,YAAY,CAAC,EACjB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,IAAI,CACd,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,WAAW,CAAC,CAAC,CAC9C;gBAAA,CAAC,YAAY,CACf;cAAA,EAAE,IAAI,CAAC,CACR,CACF,CACH;QAAA,GAAG,CACJ,CACH;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { ButtonBaseSize } from '../../types';\nimport { Icon, IconColor, IconSize } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { Spinner } from '../temp-components/Spinner';\nimport { TextOrChildren } from '../temp-components/TextOrChildren/TextOrChildren';\nimport { TextVariant, FontWeight, TextColor } from '../Text';\n\nimport { TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION } from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading, please wait';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center gap-x-2',\n // Visual styling\n 'rounded-xl bg-muted px-4 min-w-[80px] overflow-hidden',\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <View\n style={tw.style(\n 'absolute inset-0 flex items-center justify-center',\n )}\n testID=\"spinner-container\"\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n loadingTextProps={{\n numberOfLines: 1,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n {...spinnerProps}\n />\n </View>\n )}\n\n {/* Button content - opacity controlled individually on each child */}\n {finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...startIconProps}\n />\n ) : (\n startAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {startAccessory}\n </View>\n )\n )}\n\n {typeof children === 'string' ? (\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n twClassName: `shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''}`,\n ...textProps,\n }}\n >\n {children}\n </TextOrChildren>\n ) : (\n <View style={tw.style(isLoading && 'opacity-0')}>{children}</View>\n )}\n\n {finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...endIconProps}\n />\n ) : (\n endAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {endAccessory}\n </View>\n )\n )}\n </>\n )}\n </ButtonAnimated>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"ButtonBase.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAGpC,OAAO,EAAE,cAAc,EAAE,8BAAoB;AAC7C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACpD,OAAO,EAAE,cAAc,EAAE,oDAA0C;AACnE,OAAO,EAAE,OAAO,EAAE,6CAAmC;AACrD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,0BAAgB;AAEnE,OAAO,EAAE,oCAAoC,EAAE,mCAA+B;AAG9E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,cAAc,CAAC,EAAE,EACxB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAAG,QAAQ,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,GAAG,KAAK,EACQ,EAAE,EAAE;IACp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,CACF,CACH;QAAA,GAAG,CACJ,CACH;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { ButtonBaseSize } from '../../types';\nimport { Icon, IconColor, IconSize } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { Spinner } from '../temp-components/Spinner';\nimport { Text, TextVariant, FontWeight, TextColor } from '../Text';\n\nimport { TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION } from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n hapticFeedback,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading, please wait';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n hapticFeedback={hapticFeedback}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center gap-x-2',\n // Visual styling\n 'rounded-xl bg-muted px-4 min-w-[80px] overflow-hidden',\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <View\n style={tw.style(\n 'absolute inset-0 flex items-center justify-center',\n )}\n testID=\"spinner-container\"\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n loadingTextProps={{\n numberOfLines: 1,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n {...spinnerProps}\n />\n </View>\n )}\n\n {/* Button content - opacity controlled individually on each child */}\n {finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...startIconProps}\n />\n ) : (\n startAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {startAccessory}\n </View>\n )\n )}\n\n {typeof children === 'string' ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n color={TextColor.TextDefault}\n {...textProps}\n twClassName={`shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''} ${textProps?.twClassName ?? ''}`}\n >\n {children}\n </Text>\n ) : (\n <View style={tw.style(isLoading && 'opacity-0')}>{children}</View>\n )}\n\n {finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...endIconProps}\n />\n ) : (\n endAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {endAccessory}\n </View>\n )\n )}\n </>\n )}\n </ButtonAnimated>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.types.cjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonBaseSize } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { SpinnerProps } from '../temp-components/Spinner';\nimport type { TextProps } from '../Text';\n\n/**\n * ButtonBase component props.\n */\nexport type ButtonBaseProps = {\n /**\n * Required prop for the content to be rendered within the ButtonBase\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to control the size of the ButtonBase\n * Possible values: ButtonBaseSize.Sm (32px), ButtonBaseSize.Md (40px), ButtonBaseSize.Lg (48px)\n *\n * @default ButtonBaseSize.Lg\n */\n size?: ButtonBaseSize;\n /**\n * Optional prop that when true, shows a loading spinner\n *\n * @default false\n */\n isLoading?: boolean;\n /**\n * Optional prop for text to display when button is in loading state\n */\n loadingText?: string;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n spinnerProps?: Partial<SpinnerProps>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop that when true, makes the button take up the full width of its container\n *\n * @default false\n */\n isFullWidth?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n * Can be a string or a function that receives pressed state and returns a string.\n */\n twClassName?: string | ((pressed: boolean) => string);\n /**\n * Optional prop to control text className based on pressed state.\n */\n textClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control icon className based on pressed state.\n */\n iconClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional accessibility label to describe the button for screen readers.\n * If not provided, the button content will be used as the label.\n */\n accessibilityLabel?: string;\n /**\n * Optional accessibility hint to provide additional context about the button's action.\n * Should describe what happens when the button is pressed.\n */\n accessibilityHint?: string;\n /**\n * Optional accessibility role. Defaults to 'button'.\n * Can be overridden for specific use cases.\n */\n accessibilityRole?: 'button' | 'link' | 'menuitem' | 'tab' | 'none';\n /**\n * Optional accessibility actions for custom interactions.\n * Use sparingly and only when default button behavior is insufficient.\n */\n accessibilityActions?: {\n name: string;\n label?: string;\n }[];\n /**\n * Optional callback for handling accessibility action events.\n */\n onAccessibilityAction?: (event: {\n nativeEvent: { actionName: string };\n }) => void;\n} & Omit<\n PressableProps,\n | 'accessibilityRole'\n | 'accessibilityLabel'\n | 'accessibilityHint'\n | 'accessibilityActions'\n | 'onAccessibilityAction'\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"ButtonBase.types.cjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonBaseSize } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { HapticFeedbackStyle } from '../temp-components/ButtonAnimated';\nimport type { SpinnerProps } from '../temp-components/Spinner';\nimport type { TextProps } from '../Text';\n\n/**\n * ButtonBase component props.\n */\nexport type ButtonBaseProps = {\n /**\n * Required prop for the content to be rendered within the ButtonBase\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to control the size of the ButtonBase\n * Possible values: ButtonBaseSize.Sm (32px), ButtonBaseSize.Md (40px), ButtonBaseSize.Lg (48px)\n *\n * @default ButtonBaseSize.Lg\n */\n size?: ButtonBaseSize;\n /**\n * Optional prop that when true, shows a loading spinner\n *\n * @default false\n */\n isLoading?: boolean;\n /**\n * Optional prop for text to display when button is in loading state\n */\n loadingText?: string;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n spinnerProps?: Partial<SpinnerProps>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop that when true, makes the button take up the full width of its container\n *\n * @default false\n */\n isFullWidth?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n * Can be a string or a function that receives pressed state and returns a string.\n */\n twClassName?: string | ((pressed: boolean) => string);\n /**\n * Optional prop to control text className based on pressed state.\n */\n textClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control icon className based on pressed state.\n */\n iconClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional accessibility label to describe the button for screen readers.\n * If not provided, the button content will be used as the label.\n */\n accessibilityLabel?: string;\n /**\n * Optional accessibility hint to provide additional context about the button's action.\n * Should describe what happens when the button is pressed.\n */\n accessibilityHint?: string;\n /**\n * Optional accessibility role. Defaults to 'button'.\n * Can be overridden for specific use cases.\n */\n accessibilityRole?: 'button' | 'link' | 'menuitem' | 'tab' | 'none';\n /**\n * Optional accessibility actions for custom interactions.\n * Use sparingly and only when default button behavior is insufficient.\n */\n accessibilityActions?: {\n name: string;\n label?: string;\n }[];\n /**\n * Optional callback for handling accessibility action events.\n */\n onAccessibilityAction?: (event: {\n nativeEvent: { actionName: string };\n }) => void;\n /**\n * Optional haptic feedback style triggered on press.\n *\n * @default 'light'\n */\n hapticFeedback?: HapticFeedbackStyle;\n} & Omit<\n PressableProps,\n | 'accessibilityRole'\n | 'accessibilityLabel'\n | 'accessibilityHint'\n | 'accessibilityActions'\n | 'onAccessibilityAction'\n>;\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PressableProps, StyleProp, ViewStyle } from "react-native/index.js";
|
|
2
2
|
import type { ButtonBaseSize } from "../../types/index.cjs";
|
|
3
3
|
import type { IconProps, IconName } from "../Icon/index.cjs";
|
|
4
|
+
import type { HapticFeedbackStyle } from "../temp-components/ButtonAnimated/index.cjs";
|
|
4
5
|
import type { SpinnerProps } from "../temp-components/Spinner/index.cjs";
|
|
5
6
|
import type { TextProps } from "../Text/index.cjs";
|
|
6
7
|
/**
|
|
@@ -120,5 +121,11 @@ export type ButtonBaseProps = {
|
|
|
120
121
|
actionName: string;
|
|
121
122
|
};
|
|
122
123
|
}) => void;
|
|
124
|
+
/**
|
|
125
|
+
* Optional haptic feedback style triggered on press.
|
|
126
|
+
*
|
|
127
|
+
* @default 'light'
|
|
128
|
+
*/
|
|
129
|
+
hapticFeedback?: HapticFeedbackStyle;
|
|
123
130
|
} & Omit<PressableProps, 'accessibilityRole' | 'accessibilityLabel' | 'accessibilityHint' | 'accessibilityActions' | 'onAccessibilityAction'>;
|
|
124
131
|
//# sourceMappingURL=ButtonBase.types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.types.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAoB;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,6CAAmC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACjD;;;;;OAKG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAI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
|
1
1
|
import type { PressableProps, StyleProp, ViewStyle } from "react-native/index.js";
|
|
2
2
|
import type { ButtonBaseSize } from "../../types/index.mjs";
|
|
3
3
|
import type { IconProps, IconName } from "../Icon/index.mjs";
|
|
4
|
+
import type { HapticFeedbackStyle } from "../temp-components/ButtonAnimated/index.mjs";
|
|
4
5
|
import type { SpinnerProps } from "../temp-components/Spinner/index.mjs";
|
|
5
6
|
import type { TextProps } from "../Text/index.mjs";
|
|
6
7
|
/**
|
|
@@ -120,5 +121,11 @@ export type ButtonBaseProps = {
|
|
|
120
121
|
actionName: string;
|
|
121
122
|
};
|
|
122
123
|
}) => void;
|
|
124
|
+
/**
|
|
125
|
+
* Optional haptic feedback style triggered on press.
|
|
126
|
+
*
|
|
127
|
+
* @default 'light'
|
|
128
|
+
*/
|
|
129
|
+
hapticFeedback?: HapticFeedbackStyle;
|
|
123
130
|
} & Omit<PressableProps, 'accessibilityRole' | 'accessibilityLabel' | 'accessibilityHint' | 'accessibilityActions' | 'onAccessibilityAction'>;
|
|
124
131
|
//# sourceMappingURL=ButtonBase.types.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.types.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAoB;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,6CAAmC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,C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AmB,GACnB,oBAAoB,GACpB,mBAAmB,GACnB,sBAAsB,GACtB,uBAAuB,CAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonBase.types.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonBaseSize } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { SpinnerProps } from '../temp-components/Spinner';\nimport type { TextProps } from '../Text';\n\n/**\n * ButtonBase component props.\n */\nexport type ButtonBaseProps = {\n /**\n * Required prop for the content to be rendered within the ButtonBase\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to control the size of the ButtonBase\n * Possible values: ButtonBaseSize.Sm (32px), ButtonBaseSize.Md (40px), ButtonBaseSize.Lg (48px)\n *\n * @default ButtonBaseSize.Lg\n */\n size?: ButtonBaseSize;\n /**\n * Optional prop that when true, shows a loading spinner\n *\n * @default false\n */\n isLoading?: boolean;\n /**\n * Optional prop for text to display when button is in loading state\n */\n loadingText?: string;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n spinnerProps?: Partial<SpinnerProps>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop that when true, makes the button take up the full width of its container\n *\n * @default false\n */\n isFullWidth?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n * Can be a string or a function that receives pressed state and returns a string.\n */\n twClassName?: string | ((pressed: boolean) => string);\n /**\n * Optional prop to control text className based on pressed state.\n */\n textClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control icon className based on pressed state.\n */\n iconClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional accessibility label to describe the button for screen readers.\n * If not provided, the button content will be used as the label.\n */\n accessibilityLabel?: string;\n /**\n * Optional accessibility hint to provide additional context about the button's action.\n * Should describe what happens when the button is pressed.\n */\n accessibilityHint?: string;\n /**\n * Optional accessibility role. Defaults to 'button'.\n * Can be overridden for specific use cases.\n */\n accessibilityRole?: 'button' | 'link' | 'menuitem' | 'tab' | 'none';\n /**\n * Optional accessibility actions for custom interactions.\n * Use sparingly and only when default button behavior is insufficient.\n */\n accessibilityActions?: {\n name: string;\n label?: string;\n }[];\n /**\n * Optional callback for handling accessibility action events.\n */\n onAccessibilityAction?: (event: {\n nativeEvent: { actionName: string };\n }) => void;\n} & Omit<\n PressableProps,\n | 'accessibilityRole'\n | 'accessibilityLabel'\n | 'accessibilityHint'\n | 'accessibilityActions'\n | 'onAccessibilityAction'\n>;\n"]}
|
|
1
|
+
{"version":3,"file":"ButtonBase.types.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonBaseSize } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { HapticFeedbackStyle } from '../temp-components/ButtonAnimated';\nimport type { SpinnerProps } from '../temp-components/Spinner';\nimport type { TextProps } from '../Text';\n\n/**\n * ButtonBase component props.\n */\nexport type ButtonBaseProps = {\n /**\n * Required prop for the content to be rendered within the ButtonBase\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to control the size of the ButtonBase\n * Possible values: ButtonBaseSize.Sm (32px), ButtonBaseSize.Md (40px), ButtonBaseSize.Lg (48px)\n *\n * @default ButtonBaseSize.Lg\n */\n size?: ButtonBaseSize;\n /**\n * Optional prop that when true, shows a loading spinner\n *\n * @default false\n */\n isLoading?: boolean;\n /**\n * Optional prop for text to display when button is in loading state\n */\n loadingText?: string;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n spinnerProps?: Partial<SpinnerProps>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop that when true, makes the button take up the full width of its container\n *\n * @default false\n */\n isFullWidth?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n * Can be a string or a function that receives pressed state and returns a string.\n */\n twClassName?: string | ((pressed: boolean) => string);\n /**\n * Optional prop to control text className based on pressed state.\n */\n textClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control icon className based on pressed state.\n */\n iconClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional accessibility label to describe the button for screen readers.\n * If not provided, the button content will be used as the label.\n */\n accessibilityLabel?: string;\n /**\n * Optional accessibility hint to provide additional context about the button's action.\n * Should describe what happens when the button is pressed.\n */\n accessibilityHint?: string;\n /**\n * Optional accessibility role. Defaults to 'button'.\n * Can be overridden for specific use cases.\n */\n accessibilityRole?: 'button' | 'link' | 'menuitem' | 'tab' | 'none';\n /**\n * Optional accessibility actions for custom interactions.\n * Use sparingly and only when default button behavior is insufficient.\n */\n accessibilityActions?: {\n name: string;\n label?: string;\n }[];\n /**\n * Optional callback for handling accessibility action events.\n */\n onAccessibilityAction?: (event: {\n nativeEvent: { actionName: string };\n }) => void;\n /**\n * Optional haptic feedback style triggered on press.\n *\n * @default 'light'\n */\n hapticFeedback?: HapticFeedbackStyle;\n} & Omit<\n PressableProps,\n | 'accessibilityRole'\n | 'accessibilityLabel'\n | 'accessibilityHint'\n | 'accessibilityActions'\n | 'onAccessibilityAction'\n>;\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.ButtonFilter = void 0;
|
|
7
|
+
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const ButtonBase_1 = require("../ButtonBase/index.cjs");
|
|
10
|
+
const ButtonFilter = ({ isActive = false, twClassName, textProps, style, ...props }) => {
|
|
11
|
+
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
12
|
+
const mergedStyle = [
|
|
13
|
+
tw.style(isActive ? 'bg-icon-default' : 'bg-background-muted', twClassName),
|
|
14
|
+
style,
|
|
15
|
+
];
|
|
16
|
+
const mergedTextProps = {
|
|
17
|
+
...textProps,
|
|
18
|
+
twClassName: [
|
|
19
|
+
isActive ? 'text-icon-inverse' : 'text-default',
|
|
20
|
+
textProps?.twClassName,
|
|
21
|
+
]
|
|
22
|
+
.filter(Boolean)
|
|
23
|
+
.join(' '),
|
|
24
|
+
};
|
|
25
|
+
return (<ButtonBase_1.ButtonBase textProps={mergedTextProps} style={mergedStyle} {...props}/>);
|
|
26
|
+
};
|
|
27
|
+
exports.ButtonFilter = ButtonFilter;
|
|
28
|
+
//# sourceMappingURL=ButtonFilter.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.cjs","sourceRoot":"","sources":["../../../src/components/ButtonFilter/ButtonFilter.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAE1B,wDAA2C;AAIpC,MAAM,YAAY,GAAgC,CAAC,EACxD,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,WAAW,GAAG;QAClB,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,qBAAqB,EAAE,WAAW,CAAC;QAC3E,KAAK;KACN,CAAC;IAEF,MAAM,eAAe,GAAG;QACtB,GAAG,SAAS;QACZ,WAAW,EAAE;YACX,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAc;YAC/C,SAAS,EAAE,WAAW;SACvB;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC;KACb,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CAC1E,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,YAAY,gBA2BvB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { ButtonBase } from '../ButtonBase';\n\nimport type { ButtonFilterProps } from './ButtonFilter.types';\n\nexport const ButtonFilter: React.FC<ButtonFilterProps> = ({\n isActive = false,\n twClassName,\n textProps,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n const mergedStyle = [\n tw.style(isActive ? 'bg-icon-default' : 'bg-background-muted', twClassName),\n style,\n ];\n\n const mergedTextProps = {\n ...textProps,\n twClassName: [\n isActive ? 'text-icon-inverse' : 'text-default',\n textProps?.twClassName,\n ]\n .filter(Boolean)\n .join(' '),\n };\n\n return (\n <ButtonBase textProps={mergedTextProps} style={mergedStyle} {...props} />\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonFilter/ButtonFilter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAI1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2BpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonFilter/ButtonFilter.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAI1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2BpD,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-previews/design-system-twrnc-preset";
|
|
8
|
+
import $React from "react";
|
|
9
|
+
const React = $importDefault($React);
|
|
10
|
+
import { ButtonBase } from "../ButtonBase/index.mjs";
|
|
11
|
+
export const ButtonFilter = ({ isActive = false, twClassName, textProps, style, ...props }) => {
|
|
12
|
+
const tw = useTailwind();
|
|
13
|
+
const mergedStyle = [
|
|
14
|
+
tw.style(isActive ? 'bg-icon-default' : 'bg-background-muted', twClassName),
|
|
15
|
+
style,
|
|
16
|
+
];
|
|
17
|
+
const mergedTextProps = {
|
|
18
|
+
...textProps,
|
|
19
|
+
twClassName: [
|
|
20
|
+
isActive ? 'text-icon-inverse' : 'text-default',
|
|
21
|
+
textProps?.twClassName,
|
|
22
|
+
]
|
|
23
|
+
.filter(Boolean)
|
|
24
|
+
.join(' '),
|
|
25
|
+
};
|
|
26
|
+
return (<ButtonBase textProps={mergedTextProps} style={mergedStyle} {...props}/>);
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ButtonFilter.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.mjs","sourceRoot":"","sources":["../../../src/components/ButtonFilter/ButtonFilter.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAI3C,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,MAAM,WAAW,GAAG;QAClB,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,qBAAqB,EAAE,WAAW,CAAC;QAC3E,KAAK;KACN,CAAC;IAEF,MAAM,eAAe,GAAG;QACtB,GAAG,SAAS;QACZ,WAAW,EAAE;YACX,QAAQ,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAc;YAC/C,SAAS,EAAE,WAAW;SACvB;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC;KACb,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CAC1E,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { ButtonBase } from '../ButtonBase';\n\nimport type { ButtonFilterProps } from './ButtonFilter.types';\n\nexport const ButtonFilter: React.FC<ButtonFilterProps> = ({\n isActive = false,\n twClassName,\n textProps,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n const mergedStyle = [\n tw.style(isActive ? 'bg-icon-default' : 'bg-background-muted', twClassName),\n style,\n ];\n\n const mergedTextProps = {\n ...textProps,\n twClassName: [\n isActive ? 'text-icon-inverse' : 'text-default',\n textProps?.twClassName,\n ]\n .filter(Boolean)\n .join(' '),\n };\n\n return (\n <ButtonBase textProps={mergedTextProps} style={mergedStyle} {...props} />\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.types.cjs","sourceRoot":"","sources":["../../../src/components/ButtonFilter/ButtonFilter.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonFilterPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { ButtonBaseProps } from '../ButtonBase';\n\nexport type ButtonFilterProps = Omit<\n ButtonBaseProps,\n 'twClassName' | 'textClassName'\n> &\n ButtonFilterPropsShared & {\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n };\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonFilterPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { ButtonBaseProps } from "../ButtonBase/index.cjs";
|
|
3
|
+
export type ButtonFilterProps = Omit<ButtonBaseProps, 'twClassName' | 'textClassName'> & ButtonFilterPropsShared & {
|
|
4
|
+
/**
|
|
5
|
+
* Optional prop to add twrnc overriding classNames.
|
|
6
|
+
*/
|
|
7
|
+
twClassName?: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=ButtonFilter.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.types.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonFilter/ButtonFilter.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AAEvF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AAErD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,eAAe,EACf,aAAa,GAAG,eAAe,CAChC,GACC,uBAAuB,GAAG;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ButtonFilterPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { ButtonBaseProps } from "../ButtonBase/index.mjs";
|
|
3
|
+
export type ButtonFilterProps = Omit<ButtonBaseProps, 'twClassName' | 'textClassName'> & ButtonFilterPropsShared & {
|
|
4
|
+
/**
|
|
5
|
+
* Optional prop to add twrnc overriding classNames.
|
|
6
|
+
*/
|
|
7
|
+
twClassName?: string;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=ButtonFilter.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.types.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonFilter/ButtonFilter.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AAEvF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AAErD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,eAAe,EACf,aAAa,GAAG,eAAe,CAChC,GACC,uBAAuB,GAAG;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.types.mjs","sourceRoot":"","sources":["../../../src/components/ButtonFilter/ButtonFilter.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonFilterPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { ButtonBaseProps } from '../ButtonBase';\n\nexport type ButtonFilterProps = Omit<\n ButtonBaseProps,\n 'twClassName' | 'textClassName'\n> &\n ButtonFilterPropsShared & {\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n };\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ButtonFilter = void 0;
|
|
4
|
+
var ButtonFilter_1 = require("./ButtonFilter.cjs");
|
|
5
|
+
Object.defineProperty(exports, "ButtonFilter", { enumerable: true, get: function () { return ButtonFilter_1.ButtonFilter; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/ButtonFilter/index.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAArC,4GAAA,YAAY,OAAA","sourcesContent":["export { ButtonFilter } from './ButtonFilter';\nexport type { ButtonFilterProps } from './ButtonFilter.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonFilter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonFilter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/ButtonFilter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,2BAAuB","sourcesContent":["export { ButtonFilter } from './ButtonFilter';\nexport type { ButtonFilterProps } from './ButtonFilter.types';\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.ButtonHero = void 0;
|
|
7
|
+
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const ButtonBase_1 = require("../ButtonBase/index.cjs");
|
|
10
|
+
/**
|
|
11
|
+
* Inner component that uses the locked light theme from ThemeProvider.
|
|
12
|
+
* Destructures and ignores twClassName, textClassName, and iconClassName to prevent
|
|
13
|
+
* overriding the hero-specific styling (light theme lock).
|
|
14
|
+
*
|
|
15
|
+
* @param props - Component props destructured below
|
|
16
|
+
* @param props.isDisabled - Whether the button is disabled
|
|
17
|
+
* @param props.isLoading - Whether the button is in a loading state
|
|
18
|
+
* @param props.twClassName - Ignored to prevent override of hero styling
|
|
19
|
+
* @param props.textClassName - Ignored to prevent override of hero styling
|
|
20
|
+
* @param props.iconClassName - Ignored to prevent override of hero styling
|
|
21
|
+
* @returns ButtonBase component with locked light theme styles
|
|
22
|
+
*/
|
|
23
|
+
const ButtonHeroInner = ({ isDisabled, isLoading, twClassName: _twClassName, textClassName: _textClassName, iconClassName: _iconClassName, ...props }) => (<ButtonBase_1.ButtonBase twClassName={(pressed) => `bg-primary-default ${pressed && !isDisabled && !isLoading ? 'bg-primary-default-pressed' : ''}`} textClassName={(_pressed) => 'text-primary-inverse'} iconClassName={(_pressed) => 'text-primary-inverse'} isDisabled={isDisabled} isLoading={isLoading} {...props}/>);
|
|
24
|
+
/**
|
|
25
|
+
* ButtonHero component - Hero button with locked light theme
|
|
26
|
+
*
|
|
27
|
+
* Used for primary marketing and call-to-action use cases.
|
|
28
|
+
* The button is locked to light theme colors regardless of the app's theme setting.
|
|
29
|
+
*
|
|
30
|
+
* @param props - ButtonHero props extending ButtonBaseProps
|
|
31
|
+
* @returns ButtonHero component wrapped in light ThemeProvider
|
|
32
|
+
*/
|
|
33
|
+
const ButtonHero = (props) => (<design_system_twrnc_preset_1.ThemeProvider theme={design_system_twrnc_preset_1.Theme.Light}>
|
|
34
|
+
<ButtonHeroInner {...props}/>
|
|
35
|
+
</design_system_twrnc_preset_1.ThemeProvider>);
|
|
36
|
+
exports.ButtonHero = ButtonHero;
|
|
37
|
+
//# sourceMappingURL=ButtonHero.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonHero.cjs","sourceRoot":"","sources":["../../../src/components/ButtonHero/ButtonHero.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAAqF;AACrF,kDAA0B;AAE1B,wDAA2C;AAI3C;;;;;;;;;;;;GAYG;AACH,MAAM,eAAe,GAA8B,CAAC,EAClD,UAAU,EACV,SAAS,EACT,WAAW,EAAE,YAAY,EACzB,aAAa,EAAE,cAAc,EAC7B,aAAa,EAAE,cAAc,EAC7B,GAAG,KAAK,EACT,EAAE,EAAE,CAAC,CACJ,CAAC,uBAAU,CACT,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CACvB,sBACE,OAAO,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,4BAA4B,CAAC,CAAC,CAAC,EACxE,EAAE,CACH,CACD,aAAa,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CAAC,CACpD,aAAa,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,sBAAsB,CAAC,CACpD,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AAEF;;;;;;;;GAQG;AACI,MAAM,UAAU,GAA8B,CAAC,KAAK,EAAE,EAAE,CAAC,CAC9D,CAAC,0CAAa,CAAC,KAAK,CAAC,CAAC,kCAAK,CAAC,KAAK,CAAC,CAChC;IAAA,CAAC,eAAe,CAAC,IAAI,KAAK,CAAC,EAC7B;EAAA,EAAE,0CAAa,CAAC,CACjB,CAAC;AAJW,QAAA,UAAU,cAIrB","sourcesContent":["import { Theme, ThemeProvider } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { ButtonBase } from '../ButtonBase';\n\nimport type { ButtonHeroProps } from './ButtonHero.types';\n\n/**\n * Inner component that uses the locked light theme from ThemeProvider.\n * Destructures and ignores twClassName, textClassName, and iconClassName to prevent\n * overriding the hero-specific styling (light theme lock).\n *\n * @param props - Component props destructured below\n * @param props.isDisabled - Whether the button is disabled\n * @param props.isLoading - Whether the button is in a loading state\n * @param props.twClassName - Ignored to prevent override of hero styling\n * @param props.textClassName - Ignored to prevent override of hero styling\n * @param props.iconClassName - Ignored to prevent override of hero styling\n * @returns ButtonBase component with locked light theme styles\n */\nconst ButtonHeroInner: React.FC<ButtonHeroProps> = ({\n isDisabled,\n isLoading,\n twClassName: _twClassName,\n textClassName: _textClassName,\n iconClassName: _iconClassName,\n ...props\n}) => (\n <ButtonBase\n twClassName={(pressed) =>\n `bg-primary-default ${\n pressed && !isDisabled && !isLoading ? 'bg-primary-default-pressed' : ''\n }`\n }\n textClassName={(_pressed) => 'text-primary-inverse'}\n iconClassName={(_pressed) => 'text-primary-inverse'}\n isDisabled={isDisabled}\n isLoading={isLoading}\n {...props}\n />\n);\n\n/**\n * ButtonHero component - Hero button with locked light theme\n *\n * Used for primary marketing and call-to-action use cases.\n * The button is locked to light theme colors regardless of the app's theme setting.\n *\n * @param props - ButtonHero props extending ButtonBaseProps\n * @returns ButtonHero component wrapped in light ThemeProvider\n */\nexport const ButtonHero: React.FC<ButtonHeroProps> = (props) => (\n <ThemeProvider theme={Theme.Light}>\n <ButtonHeroInner {...props} />\n </ThemeProvider>\n);\n"]}
|