@metamask-previews/design-system-react-native 0.6.0-preview.3dc70e1 → 0.11.0-preview.fa05289
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/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 +2 -9
- package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.mjs +3 -10
- package/dist/components/ButtonBase/ButtonBase.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/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 +50 -2
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +50 -2
- 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/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 +6 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.types.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gDAAgD;AAEtF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,eAAe,GAAG;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BannerAlertPropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { BannerBaseProps } from "../BannerBase/index.mjs";
|
|
3
|
+
import type { IconProps } from "../Icon/Icon.types.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* BannerAlert component props (React Native platform-specific).
|
|
6
|
+
*/
|
|
7
|
+
export type BannerAlertProps = BannerAlertPropsShared & BannerBaseProps & {
|
|
8
|
+
iconProps?: Omit<IconProps, 'name' | 'size' | 'color'>;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=BannerAlert.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.types.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gDAAgD;AAEtF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,eAAe,GAAG;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.types.mjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BannerAlertPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\n/**\n * BannerAlert component props (React Native platform-specific).\n */\nexport type BannerAlertProps = BannerAlertPropsShared &\n BannerBaseProps & {\n iconProps?: Omit<IconProps, 'name' | 'size' | 'color'>;\n };\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BannerAlert = exports.BannerAlertSeverity = void 0;
|
|
4
|
+
var design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "BannerAlertSeverity", { enumerable: true, get: function () { return design_system_shared_1.BannerAlertSeverity; } });
|
|
6
|
+
var BannerAlert_1 = require("./BannerAlert.cjs");
|
|
7
|
+
Object.defineProperty(exports, "BannerAlert", { enumerable: true, get: function () { return BannerAlert_1.BannerAlert; } });
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/index.ts"],"names":[],"mappings":";;;AAAA,gFAA8E;AAArE,2HAAA,mBAAmB,OAAA;AAC5B,iDAA4C;AAAnC,0GAAA,WAAW,OAAA","sourcesContent":["export { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\nexport { BannerAlert } from './BannerAlert';\nexport type { BannerAlertProps } from './BannerAlert.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,YAAY,EAAE,gBAAgB,EAAE,gCAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,YAAY,EAAE,gBAAgB,EAAE,gCAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,WAAW,EAAE,0BAAsB","sourcesContent":["export { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\nexport { BannerAlert } from './BannerAlert';\nexport type { BannerAlertProps } from './BannerAlert.types';\n"]}
|
|
@@ -0,0 +1,63 @@
|
|
|
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.BannerBase = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const types_1 = require("../../types/index.cjs");
|
|
9
|
+
const Box_1 = require("../Box/index.cjs");
|
|
10
|
+
const Button_1 = require("../Button/index.cjs");
|
|
11
|
+
const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
|
|
12
|
+
const Text_1 = require("../Text/index.cjs");
|
|
13
|
+
const isTextContent = (content) => typeof content === 'string' || typeof content === 'number';
|
|
14
|
+
const hasContent = (content) => content !== null && content !== undefined;
|
|
15
|
+
const BannerBase = ({ title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnPress, actionButtonProps, startAccessory, onClose, closeButtonProps, twClassName, ...props }) => {
|
|
16
|
+
const resolvedActionButtonProps = actionButtonProps ?? {};
|
|
17
|
+
const { accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner', onPress: closeButtonPropsOnPress, twClassName: closeButtonTwClassName, ...resolvedCloseButtonProps } = closeButtonProps ?? {};
|
|
18
|
+
const shouldShowCloseButton = Boolean(onClose || closeButtonProps);
|
|
19
|
+
const shouldShowActionButton = Boolean(actionButtonOnPress);
|
|
20
|
+
const handleClosePress = onClose || closeButtonPropsOnPress
|
|
21
|
+
? (event) => {
|
|
22
|
+
if (onClose) {
|
|
23
|
+
onClose();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
closeButtonPropsOnPress?.(event);
|
|
27
|
+
}
|
|
28
|
+
: undefined;
|
|
29
|
+
const mergedCloseButtonTwClassName = closeButtonTwClassName
|
|
30
|
+
? `ml-3 ${closeButtonTwClassName}`
|
|
31
|
+
: 'ml-3';
|
|
32
|
+
return (<Box_1.Box flexDirection={types_1.BoxFlexDirection.Row} alignItems={types_1.BoxAlignItems.Start} gap={2} backgroundColor={types_1.BoxBackgroundColor.BackgroundDefault} padding={3} twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'} {...props}>
|
|
33
|
+
{startAccessory}
|
|
34
|
+
|
|
35
|
+
<Box_1.Box twClassName="flex-1">
|
|
36
|
+
{hasContent(title) &&
|
|
37
|
+
(isTextContent(title) ? (<Text_1.Text variant={types_1.TextVariant.BodyMd} fontWeight={types_1.FontWeight.Medium} {...titleProps}>
|
|
38
|
+
{title}
|
|
39
|
+
</Text_1.Text>) : (title))}
|
|
40
|
+
|
|
41
|
+
{hasContent(description) && (<Box_1.Box twClassName={hasContent(title) ? 'mt-1' : undefined}>
|
|
42
|
+
{isTextContent(description) ? (<Text_1.Text variant={types_1.TextVariant.BodySm} {...descriptionProps}>
|
|
43
|
+
{description}
|
|
44
|
+
</Text_1.Text>) : (description)}
|
|
45
|
+
</Box_1.Box>)}
|
|
46
|
+
|
|
47
|
+
{hasContent(children) &&
|
|
48
|
+
(isTextContent(children) ? (<Text_1.Text variant={types_1.TextVariant.BodyMd} {...childrenWrapperProps}>
|
|
49
|
+
{children}
|
|
50
|
+
</Text_1.Text>) : (children))}
|
|
51
|
+
|
|
52
|
+
{shouldShowActionButton && (<Box_1.Box twClassName="mt-4">
|
|
53
|
+
<Button_1.Button size={types_1.ButtonSize.Md} onPress={actionButtonOnPress} {...resolvedActionButtonProps}>
|
|
54
|
+
{actionButtonLabel}
|
|
55
|
+
</Button_1.Button>
|
|
56
|
+
</Box_1.Box>)}
|
|
57
|
+
</Box_1.Box>
|
|
58
|
+
|
|
59
|
+
{shouldShowCloseButton && (<ButtonIcon_1.ButtonIcon twClassName={mergedCloseButtonTwClassName} iconName={types_1.IconName.Close} size={types_1.ButtonIconSize.Sm} accessibilityLabel={closeButtonAccessibilityLabel} onPress={handleClosePress} {...resolvedCloseButtonProps}/>)}
|
|
60
|
+
</Box_1.Box>);
|
|
61
|
+
};
|
|
62
|
+
exports.BannerBase = BannerBase;
|
|
63
|
+
//# sourceMappingURL=BannerBase.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerBase.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,iDASqB;AACrB,0CAA6B;AAC7B,gDAAmC;AACnC,wDAA2C;AAC3C,4CAA+B;AAI/B,MAAM,aAAa,GAAG,CAAC,OAAwB,EAA8B,EAAE,CAC7E,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC;AAE7D,MAAM,UAAU,GAAG,CAAC,OAAwB,EAAE,EAAE,CAC9C,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AAErC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EACL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,yBAAyB,GAAG,iBAAiB,IAAI,EAAE,CAAC;IAE1D,MAAM,EACJ,kBAAkB,EAAE,6BAA6B,GAAG,cAAc,EAClE,OAAO,EAAE,uBAAuB,EAChC,WAAW,EAAE,sBAAsB,EACnC,GAAG,wBAAwB,EAC5B,GAAG,gBAAgB,IAAI,EAAE,CAAC;IAE3B,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,IAAI,gBAAgB,CAAC,CAAC;IACnE,MAAM,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE5D,MAAM,gBA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AAI,wBAAwB,CAAC,EAC7B,CACH,CACH;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAnHW,QAAA,UAAU,cAmHrB","sourcesContent":["import React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n BoxAlignItems,\n BoxBackgroundColor,\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n BoxFlexDirection,\n IconName,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box twClassName={hasContent(title) ? 'mt-1' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerBase.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAkB1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmHhD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerBase.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAkB1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmHhD,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import $React from "react";
|
|
8
|
+
const React = $importDefault($React);
|
|
9
|
+
import { BoxAlignItems, BoxBackgroundColor, ButtonIconSize, ButtonSize, FontWeight, BoxFlexDirection, IconName, TextVariant } from "../../types/index.mjs";
|
|
10
|
+
import { Box } from "../Box/index.mjs";
|
|
11
|
+
import { Button } from "../Button/index.mjs";
|
|
12
|
+
import { ButtonIcon } from "../ButtonIcon/index.mjs";
|
|
13
|
+
import { Text } from "../Text/index.mjs";
|
|
14
|
+
const isTextContent = (content) => typeof content === 'string' || typeof content === 'number';
|
|
15
|
+
const hasContent = (content) => content !== null && content !== undefined;
|
|
16
|
+
export const BannerBase = ({ title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnPress, actionButtonProps, startAccessory, onClose, closeButtonProps, twClassName, ...props }) => {
|
|
17
|
+
const resolvedActionButtonProps = actionButtonProps ?? {};
|
|
18
|
+
const { accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner', onPress: closeButtonPropsOnPress, twClassName: closeButtonTwClassName, ...resolvedCloseButtonProps } = closeButtonProps ?? {};
|
|
19
|
+
const shouldShowCloseButton = Boolean(onClose || closeButtonProps);
|
|
20
|
+
const shouldShowActionButton = Boolean(actionButtonOnPress);
|
|
21
|
+
const handleClosePress = onClose || closeButtonPropsOnPress
|
|
22
|
+
? (event) => {
|
|
23
|
+
if (onClose) {
|
|
24
|
+
onClose();
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
closeButtonPropsOnPress?.(event);
|
|
28
|
+
}
|
|
29
|
+
: undefined;
|
|
30
|
+
const mergedCloseButtonTwClassName = closeButtonTwClassName
|
|
31
|
+
? `ml-3 ${closeButtonTwClassName}`
|
|
32
|
+
: 'ml-3';
|
|
33
|
+
return (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Start} gap={2} backgroundColor={BoxBackgroundColor.BackgroundDefault} padding={3} twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'} {...props}>
|
|
34
|
+
{startAccessory}
|
|
35
|
+
|
|
36
|
+
<Box twClassName="flex-1">
|
|
37
|
+
{hasContent(title) &&
|
|
38
|
+
(isTextContent(title) ? (<Text variant={TextVariant.BodyMd} fontWeight={FontWeight.Medium} {...titleProps}>
|
|
39
|
+
{title}
|
|
40
|
+
</Text>) : (title))}
|
|
41
|
+
|
|
42
|
+
{hasContent(description) && (<Box twClassName={hasContent(title) ? 'mt-1' : undefined}>
|
|
43
|
+
{isTextContent(description) ? (<Text variant={TextVariant.BodySm} {...descriptionProps}>
|
|
44
|
+
{description}
|
|
45
|
+
</Text>) : (description)}
|
|
46
|
+
</Box>)}
|
|
47
|
+
|
|
48
|
+
{hasContent(children) &&
|
|
49
|
+
(isTextContent(children) ? (<Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>
|
|
50
|
+
{children}
|
|
51
|
+
</Text>) : (children))}
|
|
52
|
+
|
|
53
|
+
{shouldShowActionButton && (<Box twClassName="mt-4">
|
|
54
|
+
<Button size={ButtonSize.Md} onPress={actionButtonOnPress} {...resolvedActionButtonProps}>
|
|
55
|
+
{actionButtonLabel}
|
|
56
|
+
</Button>
|
|
57
|
+
</Box>)}
|
|
58
|
+
</Box>
|
|
59
|
+
|
|
60
|
+
{shouldShowCloseButton && (<ButtonIcon twClassName={mergedCloseButtonTwClassName} iconName={IconName.Close} size={ButtonIconSize.Sm} accessibilityLabel={closeButtonAccessibilityLabel} onPress={handleClosePress} {...resolvedCloseButtonProps}/>)}
|
|
61
|
+
</Box>);
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=BannerBase.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerBase.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAK,cAAc;;AAG1B,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACZ,8BAAoB;AACrB,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B,MAAM,aAAa,GAAG,CAAC,OAAwB,EAA8B,EAAE,CAC7E,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC;AAE7D,MAAM,UAAU,GAAG,CAAC,OAAwB,EAAE,EAAE,CAC9C,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EACL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,yBAAyB,GAAG,iBAAiB,IAAI,EAAE,CAAC;IAE1D,MAAM,EACJ,kBAAkB,EAAE,6BAA6B,GAAG,cAAc,EAClE,OAAO,EAAE,uBAAuB,EAChC,WAAW,EAAE,sBAAsB,EACnC,GAAG,wBAAwB,EAC5B,GAAG,gBAAgB,IAAI,EAAE,CAAC;IAE3B,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,IAAI,gBAAgB,CAAC,CAAC;IACnE,MAAM,sBAAsB,GAAG,OA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,CAAC,CAAC,gBAAgB,CAAC,CAC1B,IAAI,wBAAwB,CAAC,EAC7B,CACH,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n BoxAlignItems,\n BoxBackgroundColor,\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n BoxFlexDirection,\n IconName,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box twClassName={hasContent(title) ? 'mt-1' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerBase.types.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BannerBasePropsShared } from '@metamask-previews/design-system-shared';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonProps } from '../Button';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextProps } from '../Text';\n\ntype BannerBaseActionButtonProps = Omit<\n Partial<ButtonProps>,\n 'children' | 'onPress' | 'variant'\n>;\n\ntype BannerBaseCloseButtonProps = Omit<\n Partial<ButtonIconProps>,\n 'iconName' | 'onPress'\n> & {\n /**\n * Optional press handler for the close button.\n */\n onPress?: (event: GestureResponderEvent) => void;\n};\n\ntype BannerBasePropsBase = BannerBasePropsShared &\n Omit<BoxProps, 'children'> & {\n /**\n * Optional props for the title `Text` when title is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props for the description `Text` when description is a string.\n */\n descriptionProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props for the children wrapper `Text` when children is a string.\n */\n childrenWrapperProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional callback for the close button.\n * If provided, a close button is shown.\n */\n onClose?: () => void;\n /**\n * Optional props for the close `ButtonIcon`.\n * Providing this also shows a close button.\n */\n closeButtonProps?: BannerBaseCloseButtonProps;\n };\n\ntype BannerBaseActionPropsWithHandler = {\n actionButtonOnPress: (event: GestureResponderEvent) => void;\n actionButtonLabel: string;\n actionButtonProps?: BannerBaseActionButtonProps;\n};\n\ntype BannerBaseActionPropsWithoutHandler = {\n actionButtonOnPress?: undefined;\n actionButtonLabel?: string;\n actionButtonProps?: BannerBaseActionButtonProps;\n};\n\n/**\n * BannerBase component props.\n */\nexport type BannerBaseProps = BannerBasePropsBase &\n (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler);\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { BannerBasePropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { GestureResponderEvent } from "react-native/index.js";
|
|
3
|
+
import type { BoxProps } from "../Box/index.cjs";
|
|
4
|
+
import type { ButtonProps } from "../Button/index.cjs";
|
|
5
|
+
import type { ButtonIconProps } from "../ButtonIcon/index.cjs";
|
|
6
|
+
import type { TextProps } from "../Text/index.cjs";
|
|
7
|
+
type BannerBaseActionButtonProps = Omit<Partial<ButtonProps>, 'children' | 'onPress' | 'variant'>;
|
|
8
|
+
type BannerBaseCloseButtonProps = Omit<Partial<ButtonIconProps>, 'iconName' | 'onPress'> & {
|
|
9
|
+
/**
|
|
10
|
+
* Optional press handler for the close button.
|
|
11
|
+
*/
|
|
12
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
13
|
+
};
|
|
14
|
+
type BannerBasePropsBase = BannerBasePropsShared & Omit<BoxProps, 'children'> & {
|
|
15
|
+
/**
|
|
16
|
+
* Optional props for the title `Text` when title is a string.
|
|
17
|
+
*/
|
|
18
|
+
titleProps?: Omit<Partial<TextProps>, 'children'>;
|
|
19
|
+
/**
|
|
20
|
+
* Optional props for the description `Text` when description is a string.
|
|
21
|
+
*/
|
|
22
|
+
descriptionProps?: Omit<Partial<TextProps>, 'children'>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional props for the children wrapper `Text` when children is a string.
|
|
25
|
+
*/
|
|
26
|
+
childrenWrapperProps?: Omit<Partial<TextProps>, 'children'>;
|
|
27
|
+
/**
|
|
28
|
+
* Optional callback for the close button.
|
|
29
|
+
* If provided, a close button is shown.
|
|
30
|
+
*/
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Optional props for the close `ButtonIcon`.
|
|
34
|
+
* Providing this also shows a close button.
|
|
35
|
+
*/
|
|
36
|
+
closeButtonProps?: BannerBaseCloseButtonProps;
|
|
37
|
+
};
|
|
38
|
+
type BannerBaseActionPropsWithHandler = {
|
|
39
|
+
actionButtonOnPress: (event: GestureResponderEvent) => void;
|
|
40
|
+
actionButtonLabel: string;
|
|
41
|
+
actionButtonProps?: BannerBaseActionButtonProps;
|
|
42
|
+
};
|
|
43
|
+
type BannerBaseActionPropsWithoutHandler = {
|
|
44
|
+
actionButtonOnPress?: undefined;
|
|
45
|
+
actionButtonLabel?: string;
|
|
46
|
+
actionButtonProps?: BannerBaseActionButtonProps;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* BannerBase component props.
|
|
50
|
+
*/
|
|
51
|
+
export type BannerBaseProps = BannerBasePropsBase & (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler);
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=BannerBase.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerBase.types.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gDAAgD;AACrF,OAAO,KAAK,EAAE,qBAAqB,EAAE,8BAAqB;AAE1D,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAe;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,4BAAkB;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,KAAK,2BAA2B,GAAG,IAAI,CACrC,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,SAAS,GAAG,SAAS,CACnC,CAAC;AAEF,KAAK,0BAA0B,GAAG,IAAI,CACpC,OAAO,CAAC,eAAe,CAAC,EACxB,UAAU,GAAG,SAAS,CACvB,GAAG;IACF;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CAClD,CAAC;AAEF,KAAK,mBAAmB,GAAG,qBAAqB,GAC9C,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG;IAC3B;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,oBAAoB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAC5D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C,CAAC;AAEJ,KAAK,gCAAgC,GAAG;IACtC,mBAAmB,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC5D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;CACjD,CAAC;AAEF,KAAK,mCAAmC,GAAG;IACzC,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,2BAA2B,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAC/C,CAAC,gCAAgC,GAAG,mCAAmC,CAAC,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { BannerBasePropsShared } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import type { GestureResponderEvent } from "react-native/index.js";
|
|
3
|
+
import type { BoxProps } from "../Box/index.mjs";
|
|
4
|
+
import type { ButtonProps } from "../Button/index.mjs";
|
|
5
|
+
import type { ButtonIconProps } from "../ButtonIcon/index.mjs";
|
|
6
|
+
import type { TextProps } from "../Text/index.mjs";
|
|
7
|
+
type BannerBaseActionButtonProps = Omit<Partial<ButtonProps>, 'children' | 'onPress' | 'variant'>;
|
|
8
|
+
type BannerBaseCloseButtonProps = Omit<Partial<ButtonIconProps>, 'iconName' | 'onPress'> & {
|
|
9
|
+
/**
|
|
10
|
+
* Optional press handler for the close button.
|
|
11
|
+
*/
|
|
12
|
+
onPress?: (event: GestureResponderEvent) => void;
|
|
13
|
+
};
|
|
14
|
+
type BannerBasePropsBase = BannerBasePropsShared & Omit<BoxProps, 'children'> & {
|
|
15
|
+
/**
|
|
16
|
+
* Optional props for the title `Text` when title is a string.
|
|
17
|
+
*/
|
|
18
|
+
titleProps?: Omit<Partial<TextProps>, 'children'>;
|
|
19
|
+
/**
|
|
20
|
+
* Optional props for the description `Text` when description is a string.
|
|
21
|
+
*/
|
|
22
|
+
descriptionProps?: Omit<Partial<TextProps>, 'children'>;
|
|
23
|
+
/**
|
|
24
|
+
* Optional props for the children wrapper `Text` when children is a string.
|
|
25
|
+
*/
|
|
26
|
+
childrenWrapperProps?: Omit<Partial<TextProps>, 'children'>;
|
|
27
|
+
/**
|
|
28
|
+
* Optional callback for the close button.
|
|
29
|
+
* If provided, a close button is shown.
|
|
30
|
+
*/
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Optional props for the close `ButtonIcon`.
|
|
34
|
+
* Providing this also shows a close button.
|
|
35
|
+
*/
|
|
36
|
+
closeButtonProps?: BannerBaseCloseButtonProps;
|
|
37
|
+
};
|
|
38
|
+
type BannerBaseActionPropsWithHandler = {
|
|
39
|
+
actionButtonOnPress: (event: GestureResponderEvent) => void;
|
|
40
|
+
actionButtonLabel: string;
|
|
41
|
+
actionButtonProps?: BannerBaseActionButtonProps;
|
|
42
|
+
};
|
|
43
|
+
type BannerBaseActionPropsWithoutHandler = {
|
|
44
|
+
actionButtonOnPress?: undefined;
|
|
45
|
+
actionButtonLabel?: string;
|
|
46
|
+
actionButtonProps?: BannerBaseActionButtonProps;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* BannerBase component props.
|
|
50
|
+
*/
|
|
51
|
+
export type BannerBaseProps = BannerBasePropsBase & (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler);
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=BannerBase.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerBase.types.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gDAAgD;AACrF,OAAO,KAAK,EAAE,qBAAqB,EAAE,8BAAqB;AAE1D,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAe;AACvC,OAAO,KAAK,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E,2BAA2B,CAAC;CACjD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAC/C,CAAC,gCAAgC,GAAG,mCAAmC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerBase.types.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BannerBasePropsShared } from '@metamask-previews/design-system-shared';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonProps } from '../Button';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextProps } from '../Text';\n\ntype BannerBaseActionButtonProps = Omit<\n Partial<ButtonProps>,\n 'children' | 'onPress' | 'variant'\n>;\n\ntype BannerBaseCloseButtonProps = Omit<\n Partial<ButtonIconProps>,\n 'iconName' | 'onPress'\n> & {\n /**\n * Optional press handler for the close button.\n */\n onPress?: (event: GestureResponderEvent) => void;\n};\n\ntype BannerBasePropsBase = BannerBasePropsShared &\n Omit<BoxProps, 'children'> & {\n /**\n * Optional props for the title `Text` when title is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props for the description `Text` when description is a string.\n */\n descriptionProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props for the children wrapper `Text` when children is a string.\n */\n childrenWrapperProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional callback for the close button.\n * If provided, a close button is shown.\n */\n onClose?: () => void;\n /**\n * Optional props for the close `ButtonIcon`.\n * Providing this also shows a close button.\n */\n closeButtonProps?: BannerBaseCloseButtonProps;\n };\n\ntype BannerBaseActionPropsWithHandler = {\n actionButtonOnPress: (event: GestureResponderEvent) => void;\n actionButtonLabel: string;\n actionButtonProps?: BannerBaseActionButtonProps;\n};\n\ntype BannerBaseActionPropsWithoutHandler = {\n actionButtonOnPress?: undefined;\n actionButtonLabel?: string;\n actionButtonProps?: BannerBaseActionButtonProps;\n};\n\n/**\n * BannerBase component props.\n */\nexport type BannerBaseProps = BannerBasePropsBase &\n (BannerBaseActionPropsWithHandler | BannerBaseActionPropsWithoutHandler);\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BannerBase = void 0;
|
|
4
|
+
var BannerBase_1 = require("./BannerBase.cjs");
|
|
5
|
+
Object.defineProperty(exports, "BannerBase", { enumerable: true, get: function () { return BannerBase_1.BannerBase; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export { BannerBase } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export { BannerBase } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase.types';\n"]}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.BottomSheet = void 0;
|
|
30
|
+
const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
|
|
31
|
+
const react_1 = __importStar(require("react"));
|
|
32
|
+
const react_native_1 = require("react-native/index.js");
|
|
33
|
+
const react_native_safe_area_context_1 = require("react-native-safe-area-context");
|
|
34
|
+
const BottomSheetDialog_1 = __importDefault(require("../BottomSheetDialog/index.cjs"));
|
|
35
|
+
const BottomSheetOverlay_1 = require("../BottomSheetOverlay/BottomSheetOverlay.cjs");
|
|
36
|
+
exports.BottomSheet = (0, react_1.forwardRef)(({ children, onClose, onOpen, goBack, style, twClassName, isInteractable = true, shouldNavigateBack = true, isFullscreen = false, keyboardAvoidingViewEnabled = true, ...props }, ref) => {
|
|
37
|
+
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
38
|
+
const { bottom: screenBottomPadding } = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
|
|
39
|
+
const { y: frameY } = (0, react_native_safe_area_context_1.useSafeAreaFrame)();
|
|
40
|
+
const postCallback = (0, react_1.useRef)();
|
|
41
|
+
const bottomSheetDialogRef = (0, react_1.useRef)(null);
|
|
42
|
+
const didNavigateBackRef = (0, react_1.useRef)(false);
|
|
43
|
+
const closeRequestedRef = (0, react_1.useRef)(false);
|
|
44
|
+
const didRunPostCallbackRef = (0, react_1.useRef)(false);
|
|
45
|
+
const onOpenCB = (0, react_1.useCallback)(() => {
|
|
46
|
+
// Reset when the sheet is opened again.
|
|
47
|
+
didNavigateBackRef.current = false;
|
|
48
|
+
closeRequestedRef.current = false;
|
|
49
|
+
didRunPostCallbackRef.current = false;
|
|
50
|
+
onOpen?.(Boolean(postCallback.current));
|
|
51
|
+
const callback = postCallback.current;
|
|
52
|
+
postCallback.current = undefined;
|
|
53
|
+
callback?.();
|
|
54
|
+
}, [onOpen]);
|
|
55
|
+
const onCloseCB = (0, react_1.useCallback)(() => {
|
|
56
|
+
if (shouldNavigateBack && !didNavigateBackRef.current) {
|
|
57
|
+
didNavigateBackRef.current = true;
|
|
58
|
+
goBack();
|
|
59
|
+
}
|
|
60
|
+
const callback = postCallback.current;
|
|
61
|
+
const hasCallback = Boolean(callback);
|
|
62
|
+
onClose?.(hasCallback);
|
|
63
|
+
if (!didRunPostCallbackRef.current && hasCallback) {
|
|
64
|
+
didRunPostCallbackRef.current = true;
|
|
65
|
+
postCallback.current = undefined;
|
|
66
|
+
callback?.();
|
|
67
|
+
}
|
|
68
|
+
}, [goBack, onClose, shouldNavigateBack]);
|
|
69
|
+
// Dismiss the sheet when Android back button is pressed.
|
|
70
|
+
(0, react_1.useEffect)(() => {
|
|
71
|
+
const hardwareBackPress = () => {
|
|
72
|
+
if (isInteractable) {
|
|
73
|
+
bottomSheetDialogRef.current?.onCloseDialog();
|
|
74
|
+
}
|
|
75
|
+
return true;
|
|
76
|
+
};
|
|
77
|
+
react_native_1.BackHandler.addEventListener('hardwareBackPress', hardwareBackPress);
|
|
78
|
+
return () => {
|
|
79
|
+
react_native_1.BackHandler.removeEventListener('hardwareBackPress', hardwareBackPress);
|
|
80
|
+
};
|
|
81
|
+
}, [isInteractable]);
|
|
82
|
+
(0, react_1.useImperativeHandle)(ref, () => ({
|
|
83
|
+
onCloseBottomSheet: (callback) => {
|
|
84
|
+
if (closeRequestedRef.current) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
closeRequestedRef.current = true;
|
|
88
|
+
postCallback.current = callback;
|
|
89
|
+
bottomSheetDialogRef.current?.onCloseDialog();
|
|
90
|
+
},
|
|
91
|
+
onOpenBottomSheet: (callback) => {
|
|
92
|
+
didNavigateBackRef.current = false;
|
|
93
|
+
closeRequestedRef.current = false;
|
|
94
|
+
didRunPostCallbackRef.current = false;
|
|
95
|
+
postCallback.current = callback;
|
|
96
|
+
bottomSheetDialogRef.current?.onOpenDialog();
|
|
97
|
+
},
|
|
98
|
+
}));
|
|
99
|
+
return (<react_native_1.KeyboardAvoidingView behavior={react_native_1.Platform.OS === 'ios' ? 'padding' : undefined} keyboardVerticalOffset={react_native_1.Platform.OS === 'ios' ? -screenBottomPadding : frameY} style={[tw.style('absolute inset-0 justify-end'), style]} enabled={keyboardAvoidingViewEnabled} {...props}>
|
|
100
|
+
<BottomSheetOverlay_1.BottomSheetOverlay onPress={isInteractable
|
|
101
|
+
? () => bottomSheetDialogRef.current?.onCloseDialog()
|
|
102
|
+
: undefined}/>
|
|
103
|
+
<BottomSheetDialog_1.default isInteractable={isInteractable} onClose={onCloseCB} onOpen={onOpenCB} ref={bottomSheetDialogRef} isFullscreen={isFullscreen} twClassName={twClassName} keyboardAvoidingViewEnabled={keyboardAvoidingViewEnabled}>
|
|
104
|
+
{children}
|
|
105
|
+
</BottomSheetDialog_1.default>
|
|
106
|
+
</react_native_1.KeyboardAvoidingView>);
|
|
107
|
+
});
|
|
108
|
+
exports.BottomSheet.displayName = 'BottomSheet';
|
|
109
|
+
//# sourceMappingURL=BottomSheet.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAMe;AACf,wDAA2E;AAC3E,mFAGwC;AAExC,uFAAqD;AAErD,qFAA8E;AAQjE,QAAA,WAAW,GAAG,IAAA,kBAAU,EACnC,CACE,EACE,QAAQ,EACR,OAAO,EACP,MAAM,EACN,MAAM,EACN,KAAK,EACL,WAAW,EACX,cAAc,GAAG,IAAI,EACrB,kBAAkB,GAAG,IAAI,EACzB,YAAY,GAAG,KAAK,EACpB,2BAA2B,GAAG,IAAI,EAClC,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAA,kDAAiB,GAAE,CAAC;IAC5D,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,IAAA,iDAAgB,GAAE,CAAC;IACzC,MAAM,YAAY,GAAG,IAAA,cAAM,GAA2B,CAAC;IACvD,MAAM,oBAAoB,GAAG,IAAA,cAAM,EAAuB,IAAI,CAAC,CAAC;IAChE,MAAM,kBAAkB,GAAG,IAAA,cAAM,EAAC,KAAK,CAAC,CAAC;IACzC,MAAM,iBAAiB,GAAG,IAAA,cAAM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AAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,8BAA8B,CAAC,EAAE,KAAK,CAAC,CAAC,CACzD,OAAO,CAAC,CAAC,2BAA2B,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,uCAAkB,CACjB,OAAO,CAAC,CACN,cAAc;YACZ,CAAC,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,OAAO,EAAE,aAAa,EAAE;YACrD,CAAC,CAAC,SAAS,CACd,EAEH;QAAA,CAAC,2BAAiB,CAChB,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,OAAO,CAAC,CAAC,SAAS,CAAC,CACnB,MAAM,CAAC,CAAC,QAAQ,CAAC,CACjB,GAAG,CAAC,CAAC,oBAAoB,CAAC,CAC1B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,2BAA2B,CAAC,CAAC,2BAA2B,CAAC,CAEzD;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,2BAAiB,CACrB;MAAA,EAAE,mCAAoB,CAAC,CACxB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport { BackHandler, KeyboardAvoidingView, Platform } from 'react-native';\nimport {\n useSafeAreaFrame,\n useSafeAreaInsets,\n} from 'react-native-safe-area-context';\n\nimport BottomSheetDialog from '../BottomSheetDialog';\nimport type { BottomSheetDialogRef } from '../BottomSheetDialog';\nimport { BottomSheetOverlay } from '../BottomSheetOverlay/BottomSheetOverlay';\n\nimport type {\n BottomSheetPostCallback,\n BottomSheetProps,\n BottomSheetRef,\n} from './BottomSheet.types';\n\nexport const BottomSheet = forwardRef<BottomSheetRef, BottomSheetProps>(\n (\n {\n children,\n onClose,\n onOpen,\n goBack,\n style,\n twClassName,\n isInteractable = true,\n shouldNavigateBack = true,\n isFullscreen = false,\n keyboardAvoidingViewEnabled = true,\n ...props\n },\n ref,\n ) => {\n const tw = useTailwind();\n const { bottom: screenBottomPadding } = useSafeAreaInsets();\n const { y: frameY } = useSafeAreaFrame();\n const postCallback = useRef<BottomSheetPostCallback>();\n const bottomSheetDialogRef = useRef<BottomSheetDialogRef>(null);\n const didNavigateBackRef = useRef(false);\n const closeRequestedRef = useRef(false);\n const didRunPostCallbackRef = useRef(false);\n\n const onOpenCB = useCallback(() => {\n // Reset when the sheet is opened again.\n didNavigateBackRef.current = false;\n closeRequestedRef.current = false;\n didRunPostCallbackRef.current = false;\n\n onOpen?.(Boolean(postCallback.current));\n const callback = postCallback.current;\n postCallback.current = undefined;\n callback?.();\n }, [onOpen]);\n\n const onCloseCB = useCallback(() => {\n if (shouldNavigateBack && !didNavigateBackRef.current) {\n didNavigateBackRef.current = true;\n goBack();\n }\n\n const callback = postCallback.current;\n const hasCallback = Boolean(callback);\n\n onClose?.(hasCallback);\n\n if (!didRunPostCallbackRef.current && hasCallback) {\n didRunPostCallbackRef.current = true;\n postCallback.current = undefined;\n callback?.();\n }\n }, [goBack, onClose, shouldNavigateBack]);\n\n // Dismiss the sheet when Android back button is pressed.\n useEffect(() => {\n const hardwareBackPress = () => {\n if (isInteractable) {\n bottomSheetDialogRef.current?.onCloseDialog();\n }\n return true;\n };\n BackHandler.addEventListener('hardwareBackPress', hardwareBackPress);\n return () => {\n BackHandler.removeEventListener('hardwareBackPress', hardwareBackPress);\n };\n }, [isInteractable]);\n\n useImperativeHandle(ref, () => ({\n onCloseBottomSheet: (callback) => {\n if (closeRequestedRef.current) {\n return;\n }\n closeRequestedRef.current = true;\n postCallback.current = callback;\n bottomSheetDialogRef.current?.onCloseDialog();\n },\n onOpenBottomSheet: (callback) => {\n didNavigateBackRef.current = false;\n closeRequestedRef.current = false;\n didRunPostCallbackRef.current = false;\n postCallback.current = callback;\n bottomSheetDialogRef.current?.onOpenDialog();\n },\n }));\n\n return (\n <KeyboardAvoidingView\n behavior={Platform.OS === 'ios' ? 'padding' : undefined}\n keyboardVerticalOffset={\n Platform.OS === 'ios' ? -screenBottomPadding : frameY\n }\n style={[tw.style('absolute inset-0 justify-end'), style]}\n enabled={keyboardAvoidingViewEnabled}\n {...props}\n >\n <BottomSheetOverlay\n onPress={\n isInteractable\n ? () => bottomSheetDialogRef.current?.onCloseDialog()\n : undefined\n }\n />\n <BottomSheetDialog\n isInteractable={isInteractable}\n onClose={onCloseCB}\n onOpen={onOpenCB}\n ref={bottomSheetDialogRef}\n isFullscreen={isFullscreen}\n twClassName={twClassName}\n keyboardAvoidingViewEnabled={keyboardAvoidingViewEnabled}\n >\n {children}\n </BottomSheetDialog>\n </KeyboardAvoidingView>\n );\n },\n);\n\nBottomSheet.displayName = 'BottomSheet';\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BottomSheetRef } from "./BottomSheet.types.cjs";
|
|
3
|
+
export declare const BottomSheet: React.ForwardRefExoticComponent<{
|
|
4
|
+
shouldNavigateBack?: boolean | undefined;
|
|
5
|
+
goBack: () => void;
|
|
6
|
+
keyboardAvoidingViewEnabled?: boolean | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
isFullscreen?: boolean | undefined;
|
|
10
|
+
isInteractable?: boolean | undefined;
|
|
11
|
+
keyboardAvoidingViewEnabled?: boolean | undefined;
|
|
12
|
+
onClose?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
|
|
13
|
+
onOpen?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
|
|
14
|
+
twClassName?: string | undefined;
|
|
15
|
+
} & import("react-native").ViewProps & React.RefAttributes<BottomSheetRef>>;
|
|
16
|
+
//# sourceMappingURL=BottomSheet.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,cAAc;AAWf,OAAO,KAAK,EAGV,cAAc,EACf,gCAA4B;AAE7B,eAAO,MAAM,WAAW;;;;;;;;;;;;2EAuHvB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BottomSheetRef } from "./BottomSheet.types.mjs";
|
|
3
|
+
export declare const BottomSheet: React.ForwardRefExoticComponent<{
|
|
4
|
+
shouldNavigateBack?: boolean | undefined;
|
|
5
|
+
goBack: () => void;
|
|
6
|
+
keyboardAvoidingViewEnabled?: boolean | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
isFullscreen?: boolean | undefined;
|
|
10
|
+
isInteractable?: boolean | undefined;
|
|
11
|
+
keyboardAvoidingViewEnabled?: boolean | undefined;
|
|
12
|
+
onClose?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
|
|
13
|
+
onOpen?: ((hasPendingAction?: boolean | undefined) => void) | undefined;
|
|
14
|
+
twClassName?: string | undefined;
|
|
15
|
+
} & import("react-native").ViewProps & React.RefAttributes<BottomSheetRef>>;
|
|
16
|
+
//# sourceMappingURL=BottomSheet.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BottomSheet.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAMN,cAAc;AAWf,OAAO,KAAK,EAGV,cAAc,EACf,gCAA4B;AAE7B,eAAO,MAAM,WAAW;;;;;;;;;;;;2EAuHvB,CAAC"}
|