@metamask/design-system-react-native 0.5.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -1
- package/dist/components/AvatarBase/AvatarBase.cjs +9 -11
- package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.d.cts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.d.mts.map +1 -1
- package/dist/components/AvatarBase/AvatarBase.mjs +9 -11
- package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -2
- package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.cts +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.mts +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs +2 -2
- package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.cjs +4 -5
- package/dist/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.cts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.mts.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.mjs +4 -5
- package/dist/components/AvatarGroup/AvatarGroup.mjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.cjs +5 -6
- package/dist/components/AvatarIcon/AvatarIcon.cjs.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.d.cts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.d.mts.map +1 -1
- package/dist/components/AvatarIcon/AvatarIcon.mjs +5 -6
- package/dist/components/AvatarIcon/AvatarIcon.mjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs +2 -2
- package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs +2 -2
- package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.cjs +2 -2
- package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts +1 -1
- package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
- package/dist/components/AvatarToken/AvatarToken.mjs +2 -2
- package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.cjs +5 -10
- package/dist/components/BadgeCount/BadgeCount.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.mjs +5 -10
- package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.cjs +5 -10
- package/dist/components/BadgeIcon/BadgeIcon.cjs.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.d.cts.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.d.mts.map +1 -1
- package/dist/components/BadgeIcon/BadgeIcon.mjs +5 -10
- package/dist/components/BadgeIcon/BadgeIcon.mjs.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.cjs +5 -5
- package/dist/components/BadgeStatus/BadgeStatus.cjs.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.d.cts.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.d.mts.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.mjs +5 -5
- package/dist/components/BadgeStatus/BadgeStatus.mjs.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.cjs +3 -3
- package/dist/components/BadgeWrapper/BadgeWrapper.cjs.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.d.cts.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.d.mts.map +1 -1
- package/dist/components/BadgeWrapper/BadgeWrapper.mjs +3 -3
- package/dist/components/BadgeWrapper/BadgeWrapper.mjs.map +1 -1
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs +51 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.cjs +7 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.cjs.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.d.cts +3 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.d.cts.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.d.mts +3 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.d.mts.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.mjs +4 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.mjs.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.cts +4 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.cts.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.mts +4 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.mts.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs +31 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.cjs +3 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.cjs.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.cts +20 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.cts.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.mts +20 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.mts.map +1 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.mjs +2 -0
- package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.mjs.map +1 -0
- package/dist/components/BottomSheetOverlay/index.cjs +6 -0
- package/dist/components/BottomSheetOverlay/index.cjs.map +1 -0
- package/dist/components/BottomSheetOverlay/index.d.cts +3 -0
- package/dist/components/BottomSheetOverlay/index.d.cts.map +1 -0
- package/dist/components/BottomSheetOverlay/index.d.mts +3 -0
- package/dist/components/BottomSheetOverlay/index.d.mts.map +1 -0
- package/dist/components/BottomSheetOverlay/index.mjs +2 -0
- package/dist/components/BottomSheetOverlay/index.mjs.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.cjs +35 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.d.cts +4 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.d.cts.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.d.mts +4 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.d.mts.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.mjs +35 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.types.cjs +12 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.types.cjs.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.types.d.cts +41 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.types.d.cts.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.types.d.mts +41 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.types.d.mts.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.types.mjs +9 -0
- package/dist/components/BottomSheets/BottomSheetFooter/BottomSheetFooter.types.mjs.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/index.cjs +8 -0
- package/dist/components/BottomSheets/BottomSheetFooter/index.cjs.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/index.d.cts +4 -0
- package/dist/components/BottomSheets/BottomSheetFooter/index.d.cts.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/index.d.mts +4 -0
- package/dist/components/BottomSheets/BottomSheetFooter/index.d.mts.map +1 -0
- package/dist/components/BottomSheets/BottomSheetFooter/index.mjs +3 -0
- package/dist/components/BottomSheets/BottomSheetFooter/index.mjs.map +1 -0
- package/dist/components/Box/Box.cjs +12 -27
- package/dist/components/Box/Box.cjs.map +1 -1
- package/dist/components/Box/Box.d.cts.map +1 -1
- package/dist/components/Box/Box.d.mts.map +1 -1
- package/dist/components/Box/Box.mjs +12 -27
- package/dist/components/Box/Box.mjs.map +1 -1
- package/dist/components/ButtonBase/ButtonBase.cjs +50 -41
- 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 +50 -41
- package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.cjs +5 -10
- package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.mjs +5 -10
- package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
- 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/Checkbox/Checkbox.cjs +4 -4
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
- package/dist/components/Checkbox/Checkbox.mjs +4 -4
- package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
- package/dist/components/HeaderBase/HeaderBase.cjs +123 -0
- package/dist/components/HeaderBase/HeaderBase.cjs.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 +103 -0
- package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.cjs +3 -0
- package/dist/components/HeaderBase/HeaderBase.types.cjs.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.cts +71 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.cts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.mts +71 -0
- package/dist/components/HeaderBase/HeaderBase.types.d.mts.map +1 -0
- package/dist/components/HeaderBase/HeaderBase.types.mjs +2 -0
- package/dist/components/HeaderBase/HeaderBase.types.mjs.map +1 -0
- package/dist/components/HeaderBase/index.cjs +6 -0
- package/dist/components/HeaderBase/index.cjs.map +1 -0
- package/dist/components/HeaderBase/index.d.cts +3 -0
- package/dist/components/HeaderBase/index.d.cts.map +1 -0
- package/dist/components/HeaderBase/index.d.mts +3 -0
- package/dist/components/HeaderBase/index.d.mts.map +1 -0
- package/dist/components/HeaderBase/index.mjs +2 -0
- package/dist/components/HeaderBase/index.mjs.map +1 -0
- package/dist/components/Icon/Icon.assets.cjs +4 -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 +4 -0
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/Icon.cjs +4 -32
- package/dist/components/Icon/Icon.cjs.map +1 -1
- package/dist/components/Icon/Icon.d.cts.map +1 -1
- package/dist/components/Icon/Icon.d.mts.map +1 -1
- package/dist/components/Icon/Icon.mjs +2 -10
- package/dist/components/Icon/Icon.mjs.map +1 -1
- package/dist/components/Icon/assets/after-hours.svg +1 -0
- package/dist/components/Icon/assets/corporate-fare.svg +1 -0
- package/dist/components/Input/Input.cjs +53 -0
- package/dist/components/Input/Input.cjs.map +1 -0
- package/dist/components/Input/Input.d.cts +10 -0
- package/dist/components/Input/Input.d.cts.map +1 -0
- package/dist/components/Input/Input.d.mts +10 -0
- package/dist/components/Input/Input.d.mts.map +1 -0
- package/dist/components/Input/Input.mjs +50 -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 +33 -0
- package/dist/components/Input/Input.types.d.cts.map +1 -0
- package/dist/components/Input/Input.types.d.mts +33 -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/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/Text/Text.cjs +9 -14
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.d.cts.map +1 -1
- package/dist/components/Text/Text.d.mts.map +1 -1
- package/dist/components/Text/Text.mjs +10 -15
- package/dist/components/Text/Text.mjs.map +1 -1
- package/dist/components/Toast/Toast.cjs +174 -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 +156 -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 +123 -0
- package/dist/components/Toast/Toast.types.d.cts.map +1 -0
- package/dist/components/Toast/Toast.types.d.mts +123 -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 +21 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +16 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +16 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +8 -0
- package/dist/components/index.mjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +17 -9
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts.map +1 -1
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs +17 -6
- package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs.map +1 -1
- package/dist/components/temp-components/Spinner/Spinner.cjs +2 -2
- package/dist/components/temp-components/Spinner/Spinner.cjs.map +1 -1
- package/dist/components/temp-components/Spinner/Spinner.d.cts.map +1 -1
- package/dist/components/temp-components/Spinner/Spinner.d.mts.map +1 -1
- package/dist/components/temp-components/Spinner/Spinner.mjs +2 -2
- package/dist/components/temp-components/Spinner/Spinner.mjs.map +1 -1
- package/dist/types/index.cjs +19 -17
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +19 -17
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +19 -17
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +19 -17
- package/dist/types/index.mjs.map +1 -1
- package/package.json +13 -9
- package/dist/components/Icon/Icon.utilities.cjs +0 -31
- package/dist/components/Icon/Icon.utilities.cjs.map +0 -1
- package/dist/components/Icon/Icon.utilities.d.cts +0 -22
- package/dist/components/Icon/Icon.utilities.d.cts.map +0 -1
- package/dist/components/Icon/Icon.utilities.d.mts +0 -22
- package/dist/components/Icon/Icon.utilities.d.mts.map +0 -1
- package/dist/components/Icon/Icon.utilities.mjs +0 -27
- package/dist/components/Icon/Icon.utilities.mjs.map +0 -1
- package/dist/components/Text/Text.utilities.cjs +0 -46
- package/dist/components/Text/Text.utilities.cjs.map +0 -1
- package/dist/components/Text/Text.utilities.d.cts +0 -32
- package/dist/components/Text/Text.utilities.d.cts.map +0 -1
- package/dist/components/Text/Text.utilities.d.mts +0 -32
- package/dist/components/Text/Text.utilities.d.mts.map +0 -1
- package/dist/components/Text/Text.utilities.mjs +0 -42
- package/dist/components/Text/Text.utilities.mjs.map +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TextInputProps } from "react-native/index.js";
|
|
2
|
+
import type { TextVariant } from "../../types/index.mjs";
|
|
3
|
+
export type InputProps = Omit<TextInputProps, 'editable'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Optional enum to select between Typography variants.
|
|
6
|
+
*
|
|
7
|
+
* @default BodyMd
|
|
8
|
+
*/
|
|
9
|
+
textVariant?: TextVariant;
|
|
10
|
+
/**
|
|
11
|
+
* Optional boolean to disable Input.
|
|
12
|
+
*
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
isDisabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Optional boolean to show readonly input.
|
|
18
|
+
*
|
|
19
|
+
* @default false
|
|
20
|
+
*/
|
|
21
|
+
isReadonly?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Optional boolean to disable state styles.
|
|
24
|
+
*
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
isStateStylesDisabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Optional prop to add twrnc overriding classNames.
|
|
30
|
+
*/
|
|
31
|
+
twClassName?: string;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=Input.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.types.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC1D;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.types.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<TextInputProps, 'editable'> & {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Input = void 0;
|
|
4
|
+
var Input_1 = require("./Input.cjs");
|
|
5
|
+
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return Input_1.Input; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAAvB,8FAAA,KAAK,OAAA","sourcesContent":["export { Input } from './Input';\nexport type { InputProps } from './Input.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB","sourcesContent":["export { Input } from './Input';\nexport type { InputProps } from './Input.types';\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
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.Label = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const Text_1 = require("../Text/index.cjs");
|
|
9
|
+
const Label = ({ ...props }) => (<Text_1.Text variant={Text_1.TextVariant.BodyMd} {...props}/>);
|
|
10
|
+
exports.Label = Label;
|
|
11
|
+
//# sourceMappingURL=Label.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.cjs","sourceRoot":"","sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,4CAA4C;AAIrC,MAAM,KAAK,GAAyB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC3D,CAAC,WAAI,CAAC,OAAO,CAAC,CAAC,kBAAW,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CACjD,CAAC;AAFW,QAAA,KAAK,SAEhB","sourcesContent":["import React from 'react';\n\nimport { Text, TextVariant } from '../Text';\n\nimport type { LabelProps } from './Label.types';\n\nexport const Label: React.FC<LabelProps> = ({ ...props }) => (\n <Text variant={TextVariant.BodyMd} {...props} />\n);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.d.cts","sourceRoot":"","sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AAEhD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAEtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.d.mts","sourceRoot":"","sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AAEhD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAEtC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { Text, TextVariant } from "../Text/index.mjs";
|
|
10
|
+
export const Label = ({ ...props }) => (<Text variant={TextVariant.BodyMd} {...props}/>);
|
|
11
|
+
//# sourceMappingURL=Label.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.mjs","sourceRoot":"","sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,0BAAgB;AAI5C,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC3D,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CACjD,CAAC","sourcesContent":["import React from 'react';\n\nimport { Text, TextVariant } from '../Text';\n\nimport type { LabelProps } from './Label.types';\n\nexport const Label: React.FC<LabelProps> = ({ ...props }) => (\n <Text variant={TextVariant.BodyMd} {...props} />\n);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.types.cjs","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Label component props.\n *\n * Extends TextProps to inherit all text styling and React Native text properties\n * such as testID and accessibilityLabel.\n */\nexport type LabelProps = TextProps;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TextProps } from "../Text/index.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* Label component props.
|
|
4
|
+
*
|
|
5
|
+
* Extends TextProps to inherit all text styling and React Native text properties
|
|
6
|
+
* such as testID and accessibilityLabel.
|
|
7
|
+
*/
|
|
8
|
+
export type LabelProps = TextProps;
|
|
9
|
+
//# sourceMappingURL=Label.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.types.d.cts","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { TextProps } from "../Text/index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Label component props.
|
|
4
|
+
*
|
|
5
|
+
* Extends TextProps to inherit all text styling and React Native text properties
|
|
6
|
+
* such as testID and accessibilityLabel.
|
|
7
|
+
*/
|
|
8
|
+
export type LabelProps = TextProps;
|
|
9
|
+
//# sourceMappingURL=Label.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.types.d.mts","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.types.mjs","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Label component props.\n *\n * Extends TextProps to inherit all text styling and React Native text properties\n * such as testID and accessibilityLabel.\n */\nexport type LabelProps = TextProps;\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Label = void 0;
|
|
4
|
+
var Label_1 = require("./Label.cjs");
|
|
5
|
+
Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return Label_1.Label; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAAvB,8FAAA,KAAK,OAAA","sourcesContent":["export { Label } from './Label';\nexport type { LabelProps } from './Label.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB","sourcesContent":["export { Label } from './Label';\nexport type { LabelProps } from './Label.types';\n"]}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const react_native_1 = require("react-native/index.js");
|
|
29
|
+
const Skeleton = ({ height, width, children, hideChildren = false, style, childrenWrapperProps, animatedViewProps, twClassName, autoPlay = true, ...props }) => {
|
|
30
|
+
const tw = (0, design_system_twrnc_preset_1.useTailwind)();
|
|
31
|
+
const opacityAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0.2)).current;
|
|
32
|
+
const hasChildren = children !== null && children !== undefined;
|
|
33
|
+
const startAnimation = () => {
|
|
34
|
+
react_native_1.Animated.sequence([
|
|
35
|
+
react_native_1.Animated.timing(opacityAnim, {
|
|
36
|
+
toValue: 0.1,
|
|
37
|
+
duration: 700,
|
|
38
|
+
useNativeDriver: true,
|
|
39
|
+
isInteraction: false,
|
|
40
|
+
}),
|
|
41
|
+
react_native_1.Animated.timing(opacityAnim, {
|
|
42
|
+
toValue: 0.2,
|
|
43
|
+
duration: 700,
|
|
44
|
+
useNativeDriver: true,
|
|
45
|
+
isInteraction: false,
|
|
46
|
+
}),
|
|
47
|
+
]).start(({ finished }) => {
|
|
48
|
+
/* istanbul ignore next - animation interruption is not testable in Jest */
|
|
49
|
+
if (finished) {
|
|
50
|
+
startAnimation();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
(0, react_1.useEffect)(() => {
|
|
55
|
+
if (autoPlay && (!hasChildren || hideChildren)) {
|
|
56
|
+
startAnimation();
|
|
57
|
+
}
|
|
58
|
+
return () => {
|
|
59
|
+
opacityAnim.stopAnimation();
|
|
60
|
+
};
|
|
61
|
+
}, [hasChildren, hideChildren, autoPlay]);
|
|
62
|
+
if (!hideChildren && hasChildren) {
|
|
63
|
+
return <>{children}</>;
|
|
64
|
+
}
|
|
65
|
+
return (<react_native_1.View style={[
|
|
66
|
+
tw.style('rounded overflow-hidden', twClassName),
|
|
67
|
+
height !== undefined && { height },
|
|
68
|
+
width !== undefined && { width },
|
|
69
|
+
style,
|
|
70
|
+
]} {...props}>
|
|
71
|
+
<react_native_1.Animated.View {...animatedViewProps} style={[
|
|
72
|
+
tw.style('absolute inset-0 rounded bg-icon-alternative'),
|
|
73
|
+
{ opacity: opacityAnim },
|
|
74
|
+
animatedViewProps?.style,
|
|
75
|
+
]} pointerEvents="none"/>
|
|
76
|
+
|
|
77
|
+
{hasChildren && (<react_native_1.View {...childrenWrapperProps} style={[
|
|
78
|
+
tw.style('relative z-10 opacity-0'),
|
|
79
|
+
childrenWrapperProps?.style,
|
|
80
|
+
]} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
|
|
81
|
+
{children}
|
|
82
|
+
</react_native_1.View>)}
|
|
83
|
+
</react_native_1.View>);
|
|
84
|
+
};
|
|
85
|
+
exports.default = Skeleton;
|
|
86
|
+
//# sourceMappingURL=Skeleton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAmE;AACnE,+CAAiD;AACjD,wDAA8C;AAI9C,MAAM,QAAQ,GAA4B,CAAC,EACzC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,KAAK,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,IAAI,uBAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,CAAC;IAEhE,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,uBAAQ,CAAC,QAAQ,CAAC;YAChB,uBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;YACF,uBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;SACH,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxB,2EAA2E;YAC3E,IAAI,QAAQ,EAAE;gBACZ,cAAc,EAAE,CAAC;aAClB;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,QAAQ,IAAI,CAAC,CAAC,WAAW,IAAI,YAAY,CAAC,EAAE;YAC9C,cAAc,EAAE,CAAC;SAClB;QAED,OAAO,GAAG,EAAE;YACV,WAAW,CAAC,aAAa,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE1C,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE;QAChC,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;KACxB;IAED,OAAO,CACL,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,WAAW,CAAC;YAChD,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE;YAClC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE;YAChC,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,uBAAQ,CAAC,IAAI,CACZ,IAAI,iBAAiB,CAAC,CACtB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,8CAA8C,CAAC;YACxD,EAAE,OAAO,EAAE,WAAW,EAAE;YACxB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CACF,aAAa,CAAC,MAAM,EAGtB;;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,mBAAI,CACH,IAAI,oBAAoB,CAAC,CACzB,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC;gBACnC,oBAAoB,EAAE,KAAK;aAC5B,CAAC,CACF,aAAa,CAAC,MAAM,CACpB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,CAE/C;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,mBAAI,CAAC,CACR,CACH;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n\nexport default Skeleton;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import { useTailwind } from "@metamask/design-system-twrnc-preset";
|
|
8
|
+
import $React, { useEffect, useRef } from "react";
|
|
9
|
+
const React = $importDefault($React);
|
|
10
|
+
import { Animated, View } from "react-native/index.js";
|
|
11
|
+
const Skeleton = ({ height, width, children, hideChildren = false, style, childrenWrapperProps, animatedViewProps, twClassName, autoPlay = true, ...props }) => {
|
|
12
|
+
const tw = useTailwind();
|
|
13
|
+
const opacityAnim = useRef(new Animated.Value(0.2)).current;
|
|
14
|
+
const hasChildren = children !== null && children !== undefined;
|
|
15
|
+
const startAnimation = () => {
|
|
16
|
+
Animated.sequence([
|
|
17
|
+
Animated.timing(opacityAnim, {
|
|
18
|
+
toValue: 0.1,
|
|
19
|
+
duration: 700,
|
|
20
|
+
useNativeDriver: true,
|
|
21
|
+
isInteraction: false,
|
|
22
|
+
}),
|
|
23
|
+
Animated.timing(opacityAnim, {
|
|
24
|
+
toValue: 0.2,
|
|
25
|
+
duration: 700,
|
|
26
|
+
useNativeDriver: true,
|
|
27
|
+
isInteraction: false,
|
|
28
|
+
}),
|
|
29
|
+
]).start(({ finished }) => {
|
|
30
|
+
/* istanbul ignore next - animation interruption is not testable in Jest */
|
|
31
|
+
if (finished) {
|
|
32
|
+
startAnimation();
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
if (autoPlay && (!hasChildren || hideChildren)) {
|
|
38
|
+
startAnimation();
|
|
39
|
+
}
|
|
40
|
+
return () => {
|
|
41
|
+
opacityAnim.stopAnimation();
|
|
42
|
+
};
|
|
43
|
+
}, [hasChildren, hideChildren, autoPlay]);
|
|
44
|
+
if (!hideChildren && hasChildren) {
|
|
45
|
+
return <>{children}</>;
|
|
46
|
+
}
|
|
47
|
+
return (<View style={[
|
|
48
|
+
tw.style('rounded overflow-hidden', twClassName),
|
|
49
|
+
height !== undefined && { height },
|
|
50
|
+
width !== undefined && { width },
|
|
51
|
+
style,
|
|
52
|
+
]} {...props}>
|
|
53
|
+
<Animated.View {...animatedViewProps} style={[
|
|
54
|
+
tw.style('absolute inset-0 rounded bg-icon-alternative'),
|
|
55
|
+
{ opacity: opacityAnim },
|
|
56
|
+
animatedViewProps?.style,
|
|
57
|
+
]} pointerEvents="none"/>
|
|
58
|
+
|
|
59
|
+
{hasChildren && (<View {...childrenWrapperProps} style={[
|
|
60
|
+
tw.style('relative z-10 opacity-0'),
|
|
61
|
+
childrenWrapperProps?.style,
|
|
62
|
+
]} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
|
|
63
|
+
{children}
|
|
64
|
+
</View>)}
|
|
65
|
+
</View>);
|
|
66
|
+
};
|
|
67
|
+
export default Skeleton;
|
|
68
|
+
//# sourceMappingURL=Skeleton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,QAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc;;AACjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,8BAAqB;AAI9C,MAAM,QAAQ,GAA4B,CAAC,EACzC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,KAAK,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,CAAC;IAEhE,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,QAAQ,CAAC,QAAQ,CAAC;YAChB,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;YACF,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;SACH,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxB,2EAA2E;YAC3E,IAAI,QAAQ,EAAE;gBACZ,cAAc,EAAE,CAAC;aAClB;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,QAAQ,IAAI,CAAC,CAAC,WAAW,IAAI,YAAY,CAAC,EAAE;YAC9C,cAAc,EAAE,CAAC;SAClB;QAED,OAAO,GAAG,EAAE;YACV,WAAW,CAAC,aAAa,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE1C,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE;QAChC,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;KACxB;IAED,OAAO,CACL,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,WAAW,CAAC;YAChD,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE;YAClC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE;YAChC,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CAAC,IAAI,CACZ,IAAI,iBAAiB,CAAC,CACtB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,8CAA8C,CAAC;YACxD,EAAE,OAAO,EAAE,WAAW,EAAE;YACxB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CACF,aAAa,CAAC,MAAM,EAGtB;;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,IAAI,CACH,IAAI,oBAAoB,CAAC,CACzB,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC;gBACnC,oBAAoB,EAAE,KAAK;aAC5B,CAAC,CACF,aAAa,CAAC,MAAM,CACpB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,CAE/C;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n\nexport default Skeleton;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.types.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { ReactNode } from 'react';\nimport type { ViewProps } from 'react-native';\n\n/**\n * Skeleton component props.\n *\n * Extends ViewProps to inherit standard React Native props\n * such as testID and accessibilityLabel.\n */\nexport type SkeletonProps = {\n /**\n * Optional prop to set the height of the Skeleton.\n */\n height?: number | string;\n /**\n * Optional prop to set the width of the Skeleton.\n */\n width?: number | string;\n /**\n * Optional content to display within the skeleton.\n * When provided without `hideChildren`, children are rendered directly.\n * When provided with `hideChildren`, children are rendered invisibly\n * to preserve layout dimensions.\n */\n children?: ReactNode;\n /**\n * When true, children are rendered invisibly while the skeleton\n * animation plays, preserving layout dimensions.\n *\n * @default false\n */\n hideChildren?: boolean;\n /**\n * Props spread to the children wrapper View (e.g., testID, accessibilityLabel).\n */\n childrenWrapperProps?: ViewProps;\n /**\n * Props spread to the animated background View (e.g., testID, accessibilityLabel).\n */\n animatedViewProps?: ViewProps;\n /**\n * Tailwind CSS classes for the skeleton container.\n */\n twClassName?: string;\n /**\n * Whether to automatically start the shimmer animation.\n *\n * @default true\n */\n autoPlay?: boolean;\n} & ViewProps;\n"]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ViewProps } from "react-native/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Skeleton component props.
|
|
5
|
+
*
|
|
6
|
+
* Extends ViewProps to inherit standard React Native props
|
|
7
|
+
* such as testID and accessibilityLabel.
|
|
8
|
+
*/
|
|
9
|
+
export type SkeletonProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Optional prop to set the height of the Skeleton.
|
|
12
|
+
*/
|
|
13
|
+
height?: number | string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional prop to set the width of the Skeleton.
|
|
16
|
+
*/
|
|
17
|
+
width?: number | string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional content to display within the skeleton.
|
|
20
|
+
* When provided without `hideChildren`, children are rendered directly.
|
|
21
|
+
* When provided with `hideChildren`, children are rendered invisibly
|
|
22
|
+
* to preserve layout dimensions.
|
|
23
|
+
*/
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* When true, children are rendered invisibly while the skeleton
|
|
27
|
+
* animation plays, preserving layout dimensions.
|
|
28
|
+
*
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
hideChildren?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Props spread to the children wrapper View (e.g., testID, accessibilityLabel).
|
|
34
|
+
*/
|
|
35
|
+
childrenWrapperProps?: ViewProps;
|
|
36
|
+
/**
|
|
37
|
+
* Props spread to the animated background View (e.g., testID, accessibilityLabel).
|
|
38
|
+
*/
|
|
39
|
+
animatedViewProps?: ViewProps;
|
|
40
|
+
/**
|
|
41
|
+
* Tailwind CSS classes for the skeleton container.
|
|
42
|
+
*/
|
|
43
|
+
twClassName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to automatically start the shimmer animation.
|
|
46
|
+
*
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
autoPlay?: boolean;
|
|
50
|
+
} & ViewProps;
|
|
51
|
+
//# sourceMappingURL=Skeleton.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.types.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ViewProps } from "react-native/index.js";
|
|
3
|
+
/**
|
|
4
|
+
* Skeleton component props.
|
|
5
|
+
*
|
|
6
|
+
* Extends ViewProps to inherit standard React Native props
|
|
7
|
+
* such as testID and accessibilityLabel.
|
|
8
|
+
*/
|
|
9
|
+
export type SkeletonProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Optional prop to set the height of the Skeleton.
|
|
12
|
+
*/
|
|
13
|
+
height?: number | string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional prop to set the width of the Skeleton.
|
|
16
|
+
*/
|
|
17
|
+
width?: number | string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional content to display within the skeleton.
|
|
20
|
+
* When provided without `hideChildren`, children are rendered directly.
|
|
21
|
+
* When provided with `hideChildren`, children are rendered invisibly
|
|
22
|
+
* to preserve layout dimensions.
|
|
23
|
+
*/
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
/**
|
|
26
|
+
* When true, children are rendered invisibly while the skeleton
|
|
27
|
+
* animation plays, preserving layout dimensions.
|
|
28
|
+
*
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
hideChildren?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Props spread to the children wrapper View (e.g., testID, accessibilityLabel).
|
|
34
|
+
*/
|
|
35
|
+
childrenWrapperProps?: ViewProps;
|
|
36
|
+
/**
|
|
37
|
+
* Props spread to the animated background View (e.g., testID, accessibilityLabel).
|
|
38
|
+
*/
|
|
39
|
+
animatedViewProps?: ViewProps;
|
|
40
|
+
/**
|
|
41
|
+
* Tailwind CSS classes for the skeleton container.
|
|
42
|
+
*/
|
|
43
|
+
twClassName?: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether to automatically start the shimmer animation.
|
|
46
|
+
*
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
autoPlay?: boolean;
|
|
50
|
+
} & ViewProps;
|
|
51
|
+
//# sourceMappingURL=Skeleton.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.types.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.types.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { ReactNode } from 'react';\nimport type { ViewProps } from 'react-native';\n\n/**\n * Skeleton component props.\n *\n * Extends ViewProps to inherit standard React Native props\n * such as testID and accessibilityLabel.\n */\nexport type SkeletonProps = {\n /**\n * Optional prop to set the height of the Skeleton.\n */\n height?: number | string;\n /**\n * Optional prop to set the width of the Skeleton.\n */\n width?: number | string;\n /**\n * Optional content to display within the skeleton.\n * When provided without `hideChildren`, children are rendered directly.\n * When provided with `hideChildren`, children are rendered invisibly\n * to preserve layout dimensions.\n */\n children?: ReactNode;\n /**\n * When true, children are rendered invisibly while the skeleton\n * animation plays, preserving layout dimensions.\n *\n * @default false\n */\n hideChildren?: boolean;\n /**\n * Props spread to the children wrapper View (e.g., testID, accessibilityLabel).\n */\n childrenWrapperProps?: ViewProps;\n /**\n * Props spread to the animated background View (e.g., testID, accessibilityLabel).\n */\n animatedViewProps?: ViewProps;\n /**\n * Tailwind CSS classes for the skeleton container.\n */\n twClassName?: string;\n /**\n * Whether to automatically start the shimmer animation.\n *\n * @default true\n */\n autoPlay?: boolean;\n} & ViewProps;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
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.Skeleton = void 0;
|
|
7
|
+
var Skeleton_1 = require("./Skeleton.cjs");
|
|
8
|
+
Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return __importDefault(Skeleton_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":";;;;;;AAAA,2CAAiD;AAAxC,qHAAA,OAAO,OAAY","sourcesContent":["export { default as Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,uBAAmB;AACjD,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,uBAAmB;AACjD,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,uBAAmB","sourcesContent":["export { default as Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
|