@unif/react-native-design 0.8.2 → 0.10.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/README.md +1 -2
- package/lib/module/components/business/AvatarWithRing/AvatarWithRing.js +6 -4
- package/lib/module/components/business/AvatarWithRing/AvatarWithRing.js.map +1 -1
- package/lib/module/components/business/AvatarWithRing/styles.js +15 -3
- package/lib/module/components/business/AvatarWithRing/styles.js.map +1 -1
- package/lib/module/components/business/Decorations/GradientWash.js +50 -36
- package/lib/module/components/business/Decorations/GradientWash.js.map +1 -1
- package/lib/module/components/business/Decorations/RadialHalo.js +10 -4
- package/lib/module/components/business/Decorations/RadialHalo.js.map +1 -1
- package/lib/module/components/business/Decorations/ScreenBackdrop.js +22 -14
- package/lib/module/components/business/Decorations/ScreenBackdrop.js.map +1 -1
- package/lib/module/components/business/Decorations/index.js +3 -0
- package/lib/module/components/business/Decorations/index.js.map +1 -1
- package/lib/module/components/business/GlassStats/GlassStats.js +7 -4
- package/lib/module/components/business/GlassStats/GlassStats.js.map +1 -1
- package/lib/module/components/business/GlassStats/types.js +2 -0
- package/lib/module/components/business/VersionPill/VersionPill.js +23 -5
- package/lib/module/components/business/VersionPill/VersionPill.js.map +1 -1
- package/lib/module/components/business/VersionPill/styles.js +1 -1
- package/lib/module/components/business/index.js.map +1 -1
- package/lib/module/components/business/useSvgId.js +20 -0
- package/lib/module/components/business/useSvgId.js.map +1 -0
- package/lib/module/components/ui/Avatar/Avatar.js +13 -8
- package/lib/module/components/ui/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/ui/Avatar/styles.js +7 -7
- package/lib/module/components/ui/Avatar/styles.js.map +1 -1
- package/lib/module/components/ui/BlurLayer/BlurLayer.js +5 -1
- package/lib/module/components/ui/BlurLayer/BlurLayer.js.map +1 -1
- package/lib/module/components/ui/BlurLayer/BlurLayer.web.js +7 -1
- package/lib/module/components/ui/BlurLayer/BlurLayer.web.js.map +1 -1
- package/lib/module/components/ui/Button/Button.js +2 -1
- package/lib/module/components/ui/Button/Button.js.map +1 -1
- package/lib/module/components/ui/Button/ButtonBase.js +36 -2
- package/lib/module/components/ui/Button/ButtonBase.js.map +1 -1
- package/lib/module/components/ui/Button/styles.js +27 -25
- package/lib/module/components/ui/Button/styles.js.map +1 -1
- package/lib/module/components/ui/Card/Card.js +17 -8
- package/lib/module/components/ui/Card/Card.js.map +1 -1
- package/lib/module/components/ui/Card/styles.js +6 -1
- package/lib/module/components/ui/Card/styles.js.map +1 -1
- package/lib/module/components/ui/Carousel/Carousel.js +36 -6
- package/lib/module/components/ui/Carousel/Carousel.js.map +1 -1
- package/lib/module/components/ui/Cell/Cell.js +23 -5
- package/lib/module/components/ui/Cell/Cell.js.map +1 -1
- package/lib/module/components/ui/Cell/Leading.js +2 -2
- package/lib/module/components/ui/Cell/Leading.js.map +1 -1
- package/lib/module/components/ui/Cell/List.js +10 -5
- package/lib/module/components/ui/Cell/List.js.map +1 -1
- package/lib/module/components/ui/Cell/styles.js +7 -6
- package/lib/module/components/ui/Cell/styles.js.map +1 -1
- package/lib/module/components/ui/Checkbox/Checkbox.js +10 -8
- package/lib/module/components/ui/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/components/ui/Checkbox/styles.js +9 -1
- package/lib/module/components/ui/Checkbox/styles.js.map +1 -1
- package/lib/module/components/ui/Chip/Chip.js +19 -5
- package/lib/module/components/ui/Chip/Chip.js.map +1 -1
- package/lib/module/components/ui/Confirm/ConfirmHost.js +28 -11
- package/lib/module/components/ui/Confirm/ConfirmHost.js.map +1 -1
- package/lib/module/components/ui/Confirm/confirm.js +6 -0
- package/lib/module/components/ui/Confirm/confirm.js.map +1 -1
- package/lib/module/components/ui/DrawerHeader/DrawerHeader.js +14 -9
- package/lib/module/components/ui/DrawerHeader/DrawerHeader.js.map +1 -1
- package/lib/module/components/ui/DrawerHeader/styles.js +10 -6
- package/lib/module/components/ui/DrawerHeader/styles.js.map +1 -1
- package/lib/module/components/ui/Empty/Empty.js +5 -4
- package/lib/module/components/ui/Empty/Empty.js.map +1 -1
- package/lib/module/components/ui/EntryCard/EntryCard.js +5 -3
- package/lib/module/components/ui/EntryCard/EntryCard.js.map +1 -1
- package/lib/module/components/ui/EntryCard/styles.js +4 -4
- package/lib/module/components/ui/EntryCard/styles.js.map +1 -1
- package/lib/module/components/ui/Form/FormRow.js +1 -0
- package/lib/module/components/ui/Form/FormRow.js.map +1 -1
- package/lib/module/components/ui/Form/styles.js +3 -1
- package/lib/module/components/ui/Form/styles.js.map +1 -1
- package/lib/module/components/ui/Grid/Grid.js +39 -24
- package/lib/module/components/ui/Grid/Grid.js.map +1 -1
- package/lib/module/components/ui/Grid/styles.js +35 -46
- package/lib/module/components/ui/Grid/styles.js.map +1 -1
- package/lib/module/components/ui/Icon/Icon.js +46 -29
- package/lib/module/components/ui/Icon/Icon.js.map +1 -1
- package/lib/module/components/ui/IconButton/IconButton.js +2 -0
- package/lib/module/components/ui/IconButton/IconButton.js.map +1 -1
- package/lib/module/components/ui/Logo/Logo.js +2 -1
- package/lib/module/components/ui/Logo/Logo.js.map +1 -1
- package/lib/module/components/ui/NavBar/NavBar.js +15 -3
- package/lib/module/components/ui/NavBar/NavBar.js.map +1 -1
- package/lib/module/components/ui/PasswordInput/PasswordInput.js +43 -14
- package/lib/module/components/ui/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/module/components/ui/PasswordInput/styles.js +1 -1
- package/lib/module/components/ui/Pulse/Pulse.js +2 -1
- package/lib/module/components/ui/Pulse/Pulse.js.map +1 -1
- package/lib/module/components/ui/Pulse/PulseDot.js +8 -10
- package/lib/module/components/ui/Pulse/PulseDot.js.map +1 -1
- package/lib/module/components/ui/Pulse/types.js +2 -0
- package/lib/module/components/ui/Pulse/usePulse.web.js +51 -30
- package/lib/module/components/ui/Pulse/usePulse.web.js.map +1 -1
- package/lib/module/components/ui/Radio/Radio.js +19 -5
- package/lib/module/components/ui/Radio/Radio.js.map +1 -1
- package/lib/module/components/ui/Radio/RadioGroup.js +10 -6
- package/lib/module/components/ui/Radio/RadioGroup.js.map +1 -1
- package/lib/module/components/ui/Radio/styles.js +10 -3
- package/lib/module/components/ui/Radio/styles.js.map +1 -1
- package/lib/module/components/ui/Reveal/Reveal.web.js +18 -3
- package/lib/module/components/ui/Reveal/Reveal.web.js.map +1 -1
- package/lib/module/components/ui/Search/Search.js +26 -10
- package/lib/module/components/ui/Search/Search.js.map +1 -1
- package/lib/module/components/ui/Segmented/Segmented.js +40 -30
- package/lib/module/components/ui/Segmented/Segmented.js.map +1 -1
- package/lib/module/components/ui/Segmented/styles.js +4 -2
- package/lib/module/components/ui/Segmented/styles.js.map +1 -1
- package/lib/module/components/ui/Skeleton/Skeleton.js +9 -8
- package/lib/module/components/ui/Skeleton/Skeleton.js.map +1 -1
- package/lib/module/components/ui/Spinner/Spinner.js +15 -16
- package/lib/module/components/ui/Spinner/Spinner.js.map +1 -1
- package/lib/module/components/ui/Spinner/Spinner.web.js +10 -14
- package/lib/module/components/ui/Spinner/Spinner.web.js.map +1 -1
- package/lib/module/components/ui/Spinner/shared.js +31 -0
- package/lib/module/components/ui/Spinner/shared.js.map +1 -0
- package/lib/module/components/ui/StatusDot/StatusDot.js +21 -4
- package/lib/module/components/ui/StatusDot/StatusDot.js.map +1 -1
- package/lib/module/components/ui/StatusDot/styles.js +1 -1
- package/lib/module/components/ui/StatusDot/types.js +2 -0
- package/lib/module/components/ui/Stepper/Stepper.js +46 -10
- package/lib/module/components/ui/Stepper/Stepper.js.map +1 -1
- package/lib/module/components/ui/Switch/Switch.js +6 -11
- package/lib/module/components/ui/Switch/Switch.js.map +1 -1
- package/lib/module/components/ui/Switch/Switch.web.js +2 -8
- package/lib/module/components/ui/Switch/Switch.web.js.map +1 -1
- package/lib/module/components/ui/Switch/styles.js +12 -3
- package/lib/module/components/ui/Switch/styles.js.map +1 -1
- package/lib/module/components/ui/TabBar/TabBar.js +10 -6
- package/lib/module/components/ui/TabBar/TabBar.js.map +1 -1
- package/lib/module/components/ui/TabBar/styles.js +28 -39
- package/lib/module/components/ui/TabBar/styles.js.map +1 -1
- package/lib/module/components/ui/Tabs/Tabs.js +19 -5
- package/lib/module/components/ui/Tabs/Tabs.js.map +1 -1
- package/lib/module/components/ui/Tabs/styles.js +6 -2
- package/lib/module/components/ui/Tabs/styles.js.map +1 -1
- package/lib/module/components/ui/Tabs/types.js +2 -0
- package/lib/module/components/ui/Tag/styles.js +15 -14
- package/lib/module/components/ui/Tag/styles.js.map +1 -1
- package/lib/module/components/ui/TextField/TextFieldBase.js +24 -6
- package/lib/module/components/ui/TextField/TextFieldBase.js.map +1 -1
- package/lib/module/components/ui/Thumbnail/Thumbnail.js +11 -3
- package/lib/module/components/ui/Thumbnail/Thumbnail.js.map +1 -1
- package/lib/module/components/ui/Thumbnail/styles.js +6 -2
- package/lib/module/components/ui/Thumbnail/styles.js.map +1 -1
- package/lib/module/components/ui/Toast/ToastHost.js +16 -5
- package/lib/module/components/ui/Toast/ToastHost.js.map +1 -1
- package/lib/module/components/ui/Toast/ToastHost.web.js +21 -4
- package/lib/module/components/ui/Toast/ToastHost.web.js.map +1 -1
- package/lib/module/components/ui/Toast/styles.js +2 -0
- package/lib/module/components/ui/Toast/styles.js.map +1 -1
- package/lib/module/components/ui/Toast/toast.js +23 -3
- package/lib/module/components/ui/Toast/toast.js.map +1 -1
- package/lib/module/components/ui/shared/badgeStyles.js +31 -0
- package/lib/module/components/ui/shared/badgeStyles.js.map +1 -0
- package/lib/module/icons/data.js +45 -19
- package/lib/module/icons/data.js.map +1 -1
- package/lib/module/theme/colors.js +28 -10
- package/lib/module/theme/colors.js.map +1 -1
- package/lib/module/theme/index.js +6 -2
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/scale.js +9 -1
- package/lib/module/theme/scale.js.map +1 -1
- package/lib/module/theme/shadow.js +24 -41
- package/lib/module/theme/shadow.js.map +1 -1
- package/lib/module/theme/tokens.js +10 -5
- package/lib/module/theme/tokens.js.map +1 -1
- package/lib/module/theme/usePrefersReducedMotion.js +12 -0
- package/lib/module/theme/usePrefersReducedMotion.js.map +1 -0
- package/lib/module/theme/usePrefersReducedMotion.web.js +25 -0
- package/lib/module/theme/usePrefersReducedMotion.web.js.map +1 -0
- package/lib/module/theme/useTheme.js +13 -0
- package/lib/module/theme/useTheme.js.map +1 -1
- package/lib/module/utils/logger/logger.js +5 -1
- package/lib/module/utils/logger/logger.js.map +1 -1
- package/lib/module/utils/testID/testID.js +6 -3
- package/lib/module/utils/testID/testID.js.map +1 -1
- package/lib/typescript/src/components/business/AvatarWithRing/AvatarWithRing.d.ts +1 -1
- package/lib/typescript/src/components/business/AvatarWithRing/AvatarWithRing.d.ts.map +1 -1
- package/lib/typescript/src/components/business/AvatarWithRing/styles.d.ts +5 -5
- package/lib/typescript/src/components/business/AvatarWithRing/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/business/AvatarWithRing/types.d.ts +3 -1
- package/lib/typescript/src/components/business/AvatarWithRing/types.d.ts.map +1 -1
- package/lib/typescript/src/components/business/Decorations/GradientWash.d.ts +25 -0
- package/lib/typescript/src/components/business/Decorations/GradientWash.d.ts.map +1 -1
- package/lib/typescript/src/components/business/Decorations/RadialHalo.d.ts.map +1 -1
- package/lib/typescript/src/components/business/Decorations/ScreenBackdrop.d.ts +1 -1
- package/lib/typescript/src/components/business/Decorations/ScreenBackdrop.d.ts.map +1 -1
- package/lib/typescript/src/components/business/Decorations/index.d.ts +1 -1
- package/lib/typescript/src/components/business/Decorations/index.d.ts.map +1 -1
- package/lib/typescript/src/components/business/Decorations/types.d.ts +2 -0
- package/lib/typescript/src/components/business/Decorations/types.d.ts.map +1 -1
- package/lib/typescript/src/components/business/GlassStats/GlassStats.d.ts +1 -1
- package/lib/typescript/src/components/business/GlassStats/GlassStats.d.ts.map +1 -1
- package/lib/typescript/src/components/business/GlassStats/styles.d.ts +2 -2
- package/lib/typescript/src/components/business/GlassStats/types.d.ts +5 -0
- package/lib/typescript/src/components/business/GlassStats/types.d.ts.map +1 -1
- package/lib/typescript/src/components/business/VersionPill/VersionPill.d.ts +1 -1
- package/lib/typescript/src/components/business/VersionPill/VersionPill.d.ts.map +1 -1
- package/lib/typescript/src/components/business/VersionPill/styles.d.ts +1 -1
- package/lib/typescript/src/components/business/VersionPill/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/business/VersionPill/types.d.ts +13 -1
- package/lib/typescript/src/components/business/VersionPill/types.d.ts.map +1 -1
- package/lib/typescript/src/components/business/index.d.ts +1 -1
- package/lib/typescript/src/components/business/index.d.ts.map +1 -1
- package/lib/typescript/src/components/business/useSvgId.d.ts +12 -0
- package/lib/typescript/src/components/business/useSvgId.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Avatar/Avatar.d.ts +1 -1
- package/lib/typescript/src/components/ui/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Avatar/styles.d.ts +1 -1
- package/lib/typescript/src/components/ui/Avatar/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Avatar/types.d.ts +3 -1
- package/lib/typescript/src/components/ui/Avatar/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.d.ts +1 -1
- package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/BlurLayer/BlurLayer.web.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Button/Button.d.ts +1 -1
- package/lib/typescript/src/components/ui/Button/Button.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Button/ButtonBase.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Button/styles.d.ts +2 -1
- package/lib/typescript/src/components/ui/Button/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Button/types.d.ts +1 -1
- package/lib/typescript/src/components/ui/Button/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Card/Card.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Card/styles.d.ts +2 -0
- package/lib/typescript/src/components/ui/Card/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Card/types.d.ts +4 -4
- package/lib/typescript/src/components/ui/Card/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Carousel/Carousel.d.ts +4 -11
- package/lib/typescript/src/components/ui/Carousel/Carousel.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Carousel/index.d.ts +1 -1
- package/lib/typescript/src/components/ui/Carousel/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Carousel/types.d.ts +4 -0
- package/lib/typescript/src/components/ui/Carousel/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Cell/Cell.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Cell/List.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Cell/styles.d.ts +1 -1
- package/lib/typescript/src/components/ui/Cell/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Cell/types.d.ts +5 -2
- package/lib/typescript/src/components/ui/Cell/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Checkbox/styles.d.ts +6 -0
- package/lib/typescript/src/components/ui/Checkbox/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Chip/Chip.d.ts +4 -3
- package/lib/typescript/src/components/ui/Chip/Chip.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Chip/types.d.ts +2 -0
- package/lib/typescript/src/components/ui/Chip/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Confirm/ConfirmHost.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Confirm/confirm.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Confirm/types.d.ts +4 -2
- package/lib/typescript/src/components/ui/Confirm/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/DrawerHeader/DrawerHeader.d.ts +1 -1
- package/lib/typescript/src/components/ui/DrawerHeader/DrawerHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/DrawerHeader/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/DrawerHeader/types.d.ts +3 -1
- package/lib/typescript/src/components/ui/DrawerHeader/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Empty/Empty.d.ts +2 -2
- package/lib/typescript/src/components/ui/Empty/Empty.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Empty/types.d.ts +3 -0
- package/lib/typescript/src/components/ui/Empty/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/EntryCard/EntryCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/EntryCard/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/EntryCard/types.d.ts +2 -2
- package/lib/typescript/src/components/ui/EntryCard/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Form/FormRow.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Form/styles.d.ts +1 -0
- package/lib/typescript/src/components/ui/Form/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Form/types.d.ts +7 -2
- package/lib/typescript/src/components/ui/Form/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Grid/Grid.d.ts +1 -1
- package/lib/typescript/src/components/ui/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Grid/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Grid/types.d.ts +4 -1
- package/lib/typescript/src/components/ui/Grid/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Icon/Icon.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/IconButton/IconButton.d.ts +1 -1
- package/lib/typescript/src/components/ui/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/IconButton/types.d.ts +7 -2
- package/lib/typescript/src/components/ui/IconButton/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Input/Input.d.ts +16 -16
- package/lib/typescript/src/components/ui/Input/types.d.ts +3 -2
- package/lib/typescript/src/components/ui/Input/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/NavBar/NavBar.d.ts +8 -1
- package/lib/typescript/src/components/ui/NavBar/NavBar.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/NavBar/types.d.ts +5 -1
- package/lib/typescript/src/components/ui/NavBar/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/PasswordInput/PasswordInput.d.ts +13 -5
- package/lib/typescript/src/components/ui/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/PasswordInput/styles.d.ts +1 -1
- package/lib/typescript/src/components/ui/PasswordInput/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/PasswordInput/types.d.ts +7 -2
- package/lib/typescript/src/components/ui/PasswordInput/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Pulse/Pulse.d.ts +1 -1
- package/lib/typescript/src/components/ui/Pulse/Pulse.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Pulse/PulseDot.d.ts +1 -1
- package/lib/typescript/src/components/ui/Pulse/PulseDot.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Pulse/types.d.ts +5 -0
- package/lib/typescript/src/components/ui/Pulse/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Pulse/usePulse.web.d.ts +12 -8
- package/lib/typescript/src/components/ui/Pulse/usePulse.web.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Radio/Radio.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Radio/RadioGroup.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Radio/styles.d.ts +4 -2
- package/lib/typescript/src/components/ui/Radio/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Reveal/Reveal.web.d.ts +9 -0
- package/lib/typescript/src/components/ui/Reveal/Reveal.web.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Search/Search.d.ts +16 -15
- package/lib/typescript/src/components/ui/Search/Search.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Search/types.d.ts +3 -1
- package/lib/typescript/src/components/ui/Search/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Segmented/Segmented.d.ts +1 -1
- package/lib/typescript/src/components/ui/Segmented/Segmented.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Segmented/styles.d.ts +1 -1
- package/lib/typescript/src/components/ui/Segmented/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Segmented/types.d.ts +2 -0
- package/lib/typescript/src/components/ui/Segmented/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Skeleton/Skeleton.d.ts +3 -2
- package/lib/typescript/src/components/ui/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Spinner/Spinner.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Spinner/Spinner.web.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Spinner/shared.d.ts +5 -0
- package/lib/typescript/src/components/ui/Spinner/shared.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/StatusDot/StatusDot.d.ts +1 -5
- package/lib/typescript/src/components/ui/StatusDot/StatusDot.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/StatusDot/styles.d.ts +1 -1
- package/lib/typescript/src/components/ui/StatusDot/types.d.ts +13 -1
- package/lib/typescript/src/components/ui/StatusDot/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Switch/Switch.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Switch/Switch.web.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Switch/styles.d.ts +7 -1
- package/lib/typescript/src/components/ui/Switch/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TabBar/TabBar.d.ts +2 -2
- package/lib/typescript/src/components/ui/TabBar/TabBar.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TabBar/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TabBar/types.d.ts +3 -0
- package/lib/typescript/src/components/ui/TabBar/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Tabs/Tabs.d.ts +1 -1
- package/lib/typescript/src/components/ui/Tabs/Tabs.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Tabs/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Tabs/types.d.ts +9 -1
- package/lib/typescript/src/components/ui/Tabs/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Tag/styles.d.ts +2 -1
- package/lib/typescript/src/components/ui/Tag/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Tag/types.d.ts +6 -2
- package/lib/typescript/src/components/ui/Tag/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TextField/TextFieldBase.d.ts +16 -16
- package/lib/typescript/src/components/ui/TextField/TextFieldBase.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Textarea/Textarea.d.ts +16 -16
- package/lib/typescript/src/components/ui/Textarea/types.d.ts +2 -1
- package/lib/typescript/src/components/ui/Textarea/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Thumbnail/styles.d.ts +3 -0
- package/lib/typescript/src/components/ui/Thumbnail/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/ToastHost.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/ToastHost.web.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/toast.d.ts +0 -5
- package/lib/typescript/src/components/ui/Toast/toast.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/types.d.ts +1 -1
- package/lib/typescript/src/components/ui/Toast/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/shared/badgeStyles.d.ts +27 -0
- package/lib/typescript/src/components/ui/shared/badgeStyles.d.ts.map +1 -0
- package/lib/typescript/src/icons/data.d.ts +1 -1
- package/lib/typescript/src/icons/data.d.ts.map +1 -1
- package/lib/typescript/src/icons/types.d.ts +18 -12
- package/lib/typescript/src/icons/types.d.ts.map +1 -1
- package/lib/typescript/src/theme/colors.d.ts +9 -3
- package/lib/typescript/src/theme/colors.d.ts.map +1 -1
- package/lib/typescript/src/theme/index.d.ts +3 -2
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/scale.d.ts.map +1 -1
- package/lib/typescript/src/theme/shadow.d.ts +8 -8
- package/lib/typescript/src/theme/shadow.d.ts.map +1 -1
- package/lib/typescript/src/theme/tokens.d.ts +7 -3
- package/lib/typescript/src/theme/tokens.d.ts.map +1 -1
- package/lib/typescript/src/theme/usePrefersReducedMotion.d.ts +8 -0
- package/lib/typescript/src/theme/usePrefersReducedMotion.d.ts.map +1 -0
- package/lib/typescript/src/theme/usePrefersReducedMotion.web.d.ts +6 -0
- package/lib/typescript/src/theme/usePrefersReducedMotion.web.d.ts.map +1 -0
- package/lib/typescript/src/theme/useTheme.d.ts.map +1 -1
- package/lib/typescript/src/utils/logger/logger.d.ts.map +1 -1
- package/lib/typescript/src/utils/testID/testID.d.ts +6 -3
- package/lib/typescript/src/utils/testID/testID.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/components/business/AvatarWithRing/AvatarWithRing.tsx +5 -4
- package/src/components/business/AvatarWithRing/styles.ts +21 -3
- package/src/components/business/AvatarWithRing/types.ts +3 -1
- package/src/components/business/Decorations/GradientWash.tsx +46 -22
- package/src/components/business/Decorations/RadialHalo.tsx +8 -4
- package/src/components/business/Decorations/ScreenBackdrop.tsx +23 -5
- package/src/components/business/Decorations/index.ts +4 -0
- package/src/components/business/Decorations/types.ts +2 -0
- package/src/components/business/GlassStats/GlassStats.tsx +8 -4
- package/src/components/business/GlassStats/types.ts +6 -0
- package/src/components/business/VersionPill/VersionPill.tsx +46 -6
- package/src/components/business/VersionPill/styles.ts +1 -1
- package/src/components/business/VersionPill/types.ts +13 -1
- package/src/components/business/index.ts +1 -0
- package/src/components/business/useSvgId.ts +17 -0
- package/src/components/ui/Avatar/Avatar.tsx +17 -10
- package/src/components/ui/Avatar/styles.ts +7 -7
- package/src/components/ui/Avatar/types.ts +3 -1
- package/src/components/ui/BlurLayer/BlurLayer.tsx +4 -1
- package/src/components/ui/BlurLayer/BlurLayer.web.tsx +7 -1
- package/src/components/ui/Button/Button.tsx +2 -1
- package/src/components/ui/Button/ButtonBase.tsx +26 -2
- package/src/components/ui/Button/styles.ts +27 -25
- package/src/components/ui/Button/types.ts +1 -1
- package/src/components/ui/Card/Card.tsx +17 -7
- package/src/components/ui/Card/styles.ts +5 -0
- package/src/components/ui/Card/types.ts +4 -4
- package/src/components/ui/Carousel/Carousel.tsx +44 -15
- package/src/components/ui/Carousel/index.ts +1 -1
- package/src/components/ui/Carousel/types.ts +5 -0
- package/src/components/ui/Cell/Cell.tsx +28 -6
- package/src/components/ui/Cell/Leading.tsx +2 -2
- package/src/components/ui/Cell/List.tsx +14 -8
- package/src/components/ui/Cell/styles.ts +8 -5
- package/src/components/ui/Cell/types.ts +5 -2
- package/src/components/ui/Checkbox/Checkbox.tsx +18 -5
- package/src/components/ui/Checkbox/styles.ts +8 -0
- package/src/components/ui/Chip/Chip.tsx +20 -5
- package/src/components/ui/Chip/types.ts +2 -0
- package/src/components/ui/Confirm/ConfirmHost.tsx +26 -10
- package/src/components/ui/Confirm/confirm.ts +8 -0
- package/src/components/ui/Confirm/types.ts +4 -2
- package/src/components/ui/DrawerHeader/DrawerHeader.tsx +18 -12
- package/src/components/ui/DrawerHeader/styles.ts +10 -6
- package/src/components/ui/DrawerHeader/types.ts +3 -1
- package/src/components/ui/Empty/Empty.tsx +5 -4
- package/src/components/ui/Empty/types.ts +3 -0
- package/src/components/ui/EntryCard/EntryCard.tsx +5 -3
- package/src/components/ui/EntryCard/styles.ts +13 -4
- package/src/components/ui/EntryCard/types.ts +2 -2
- package/src/components/ui/Form/FormRow.tsx +7 -1
- package/src/components/ui/Form/styles.ts +2 -0
- package/src/components/ui/Form/types.ts +7 -2
- package/src/components/ui/Grid/Grid.tsx +42 -25
- package/src/components/ui/Grid/styles.ts +8 -20
- package/src/components/ui/Grid/types.ts +4 -1
- package/src/components/ui/Icon/Icon.tsx +42 -27
- package/src/components/ui/IconButton/IconButton.tsx +2 -0
- package/src/components/ui/IconButton/types.ts +8 -2
- package/src/components/ui/Input/types.ts +3 -2
- package/src/components/ui/Logo/Logo.tsx +2 -1
- package/src/components/ui/NavBar/NavBar.tsx +16 -2
- package/src/components/ui/NavBar/types.ts +5 -1
- package/src/components/ui/PasswordInput/PasswordInput.tsx +77 -43
- package/src/components/ui/PasswordInput/styles.ts +1 -1
- package/src/components/ui/PasswordInput/types.ts +7 -2
- package/src/components/ui/Pulse/Pulse.tsx +2 -1
- package/src/components/ui/Pulse/PulseDot.tsx +7 -6
- package/src/components/ui/Pulse/types.ts +6 -0
- package/src/components/ui/Pulse/usePulse.web.ts +50 -33
- package/src/components/ui/Radio/Radio.tsx +29 -6
- package/src/components/ui/Radio/RadioGroup.tsx +10 -3
- package/src/components/ui/Radio/styles.ts +9 -2
- package/src/components/ui/Reveal/Reveal.web.tsx +18 -3
- package/src/components/ui/Search/Search.tsx +22 -9
- package/src/components/ui/Search/types.ts +7 -1
- package/src/components/ui/Segmented/Segmented.tsx +8 -3
- package/src/components/ui/Segmented/styles.ts +4 -2
- package/src/components/ui/Segmented/types.ts +2 -0
- package/src/components/ui/Skeleton/Skeleton.tsx +9 -8
- package/src/components/ui/Spinner/Spinner.tsx +17 -17
- package/src/components/ui/Spinner/Spinner.web.tsx +7 -15
- package/src/components/ui/Spinner/shared.ts +37 -0
- package/src/components/ui/StatusDot/StatusDot.tsx +21 -3
- package/src/components/ui/StatusDot/styles.ts +1 -1
- package/src/components/ui/StatusDot/types.ts +14 -1
- package/src/components/ui/Stepper/Stepper.tsx +45 -10
- package/src/components/ui/Switch/Switch.tsx +4 -10
- package/src/components/ui/Switch/Switch.web.tsx +2 -8
- package/src/components/ui/Switch/styles.ts +10 -1
- package/src/components/ui/TabBar/TabBar.tsx +14 -6
- package/src/components/ui/TabBar/styles.ts +9 -21
- package/src/components/ui/TabBar/types.ts +3 -0
- package/src/components/ui/Tabs/Tabs.tsx +24 -5
- package/src/components/ui/Tabs/styles.ts +6 -2
- package/src/components/ui/Tabs/types.ts +10 -1
- package/src/components/ui/Tag/styles.ts +18 -10
- package/src/components/ui/Tag/types.ts +6 -2
- package/src/components/ui/TextField/TextFieldBase.tsx +31 -6
- package/src/components/ui/Textarea/types.ts +2 -1
- package/src/components/ui/Thumbnail/Thumbnail.tsx +14 -3
- package/src/components/ui/Thumbnail/styles.ts +6 -2
- package/src/components/ui/Toast/ToastHost.tsx +16 -8
- package/src/components/ui/Toast/ToastHost.web.tsx +26 -4
- package/src/components/ui/Toast/styles.ts +2 -0
- package/src/components/ui/Toast/toast.ts +35 -2
- package/src/components/ui/Toast/types.ts +1 -1
- package/src/components/ui/shared/badgeStyles.ts +36 -0
- package/src/icons/data.ts +30 -0
- package/src/icons/types.ts +25 -10
- package/src/theme/colors.ts +29 -10
- package/src/theme/index.ts +10 -1
- package/src/theme/scale.ts +5 -1
- package/src/theme/shadow.ts +33 -24
- package/src/theme/tokens.ts +10 -5
- package/src/theme/usePrefersReducedMotion.ts +9 -0
- package/src/theme/usePrefersReducedMotion.web.ts +27 -0
- package/src/theme/useTheme.ts +15 -0
- package/src/utils/logger/logger.ts +5 -1
- package/src/utils/testID/testID.ts +6 -3
- package/lib/module/components/index.js +0 -5
- package/lib/module/components/index.js.map +0 -1
- package/lib/typescript/src/components/index.d.ts +0 -3
- package/lib/typescript/src/components/index.d.ts.map +0 -1
- package/src/components/index.ts +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text, View } from 'react-native';
|
|
3
3
|
import { Pressable } from 'react-native-gesture-handler';
|
|
4
|
-
import { useColors, useThemedStyles } from '../../../theme';
|
|
4
|
+
import { pressedOpacity, r, useColors, useThemedStyles } from '../../../theme';
|
|
5
5
|
import { createLogger } from '../../../utils/logger';
|
|
6
6
|
import { childTestID } from '../../../utils/testID';
|
|
7
7
|
import { Icon } from '../Icon';
|
|
@@ -10,6 +10,9 @@ import type { GridProps } from './types';
|
|
|
10
10
|
|
|
11
11
|
const log = createLogger('Grid');
|
|
12
12
|
|
|
13
|
+
// 渲染路径去重集合 —— 同一 columns 值只在首次渲染时告警一次,避免长列表重复刷 log。
|
|
14
|
+
const _warnedColumns = new Set<number>();
|
|
15
|
+
|
|
13
16
|
/**
|
|
14
17
|
* 图标入口宫格 —— 首页 / 分类落地页。1..6 列。
|
|
15
18
|
* 每格:图标 + 小标签,纵向居中。
|
|
@@ -21,44 +24,58 @@ export function Grid({
|
|
|
21
24
|
columns = 4,
|
|
22
25
|
onPress,
|
|
23
26
|
card = true,
|
|
27
|
+
style,
|
|
24
28
|
testID,
|
|
25
29
|
}: GridProps): React.JSX.Element {
|
|
26
30
|
const c = useColors();
|
|
27
31
|
const styles = useThemedStyles(makeStyles);
|
|
28
|
-
if (![1, 2, 3, 4, 5, 6].includes(columns)) {
|
|
32
|
+
if (![1, 2, 3, 4, 5, 6].includes(columns) && !_warnedColumns.has(columns)) {
|
|
33
|
+
_warnedColumns.add(columns);
|
|
29
34
|
log.warn(`columns 仅支持 1..6,传入 ${columns},已 fallback 为 4 列`);
|
|
30
35
|
}
|
|
31
36
|
const cellWidth = colWidth(columns);
|
|
32
37
|
return (
|
|
33
|
-
<View style={[styles.wrap, card && styles.card]} testID={testID}>
|
|
38
|
+
<View style={[styles.wrap, card && styles.card, style]} testID={testID}>
|
|
34
39
|
<View style={styles.inner}>
|
|
35
40
|
{items.map((item) => {
|
|
36
41
|
const itemTestID = childTestID(testID, item.id, item.testID);
|
|
42
|
+
const cellContent = (
|
|
43
|
+
<>
|
|
44
|
+
<View>
|
|
45
|
+
{/* 28pt 介于 icon.md(26) / icon.lg(30) 之间的设计稿专定字形尺寸 */}
|
|
46
|
+
<Icon name={item.icon} size={r(28)} color={c.foregroundMuted} />
|
|
47
|
+
{item.badge != null ? (
|
|
48
|
+
<View style={styles.badge}>
|
|
49
|
+
<Text style={styles.badgeText}>{item.badge}</Text>
|
|
50
|
+
</View>
|
|
51
|
+
) : null}
|
|
52
|
+
</View>
|
|
53
|
+
<Text style={styles.label} numberOfLines={1}>
|
|
54
|
+
{item.label}
|
|
55
|
+
</Text>
|
|
56
|
+
</>
|
|
57
|
+
);
|
|
37
58
|
return (
|
|
38
59
|
<View key={item.id} style={cellWidth}>
|
|
39
|
-
|
|
40
|
-
onPress
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
) : null}
|
|
60
|
+
{onPress ? (
|
|
61
|
+
// 有 onPress 才挂 Pressable + button 语义,纯展示宫格不播报 button
|
|
62
|
+
<Pressable
|
|
63
|
+
onPress={() => onPress(item)}
|
|
64
|
+
accessibilityRole="button"
|
|
65
|
+
accessibilityLabel={item.label}
|
|
66
|
+
testID={itemTestID}
|
|
67
|
+
style={({ pressed }) => [
|
|
68
|
+
styles.cell,
|
|
69
|
+
{ opacity: pressed ? pressedOpacity : 1 },
|
|
70
|
+
]}
|
|
71
|
+
>
|
|
72
|
+
{cellContent}
|
|
73
|
+
</Pressable>
|
|
74
|
+
) : (
|
|
75
|
+
<View style={styles.cell} testID={itemTestID}>
|
|
76
|
+
{cellContent}
|
|
57
77
|
</View>
|
|
58
|
-
|
|
59
|
-
{item.label}
|
|
60
|
-
</Text>
|
|
61
|
-
</Pressable>
|
|
78
|
+
)}
|
|
62
79
|
</View>
|
|
63
80
|
);
|
|
64
81
|
})}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
type as t,
|
|
8
8
|
type ColorTokens,
|
|
9
9
|
} from '../../../theme';
|
|
10
|
+
import { badgeStyles } from '../shared/badgeStyles';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* 预生成 1..6 列的宽度规则,避免 render 时创建 `{ width: pct }` 内联对象
|
|
@@ -39,8 +40,10 @@ export const colWidth = (columns: number) => {
|
|
|
39
40
|
}
|
|
40
41
|
};
|
|
41
42
|
|
|
42
|
-
export const makeStyles = (c: ColorTokens) =>
|
|
43
|
-
|
|
43
|
+
export const makeStyles = (c: ColorTokens) => {
|
|
44
|
+
// Grid 图标容器上边缘偏移 r(-6):图标高 r(28),角标圆心对齐图标右上角
|
|
45
|
+
const badge = badgeStyles(c, r(-6));
|
|
46
|
+
return StyleSheet.create({
|
|
44
47
|
wrap: {
|
|
45
48
|
width: '100%',
|
|
46
49
|
},
|
|
@@ -67,22 +70,7 @@ export const makeStyles = (c: ColorTokens) =>
|
|
|
67
70
|
fontWeight: fw.medium,
|
|
68
71
|
color: c.foreground,
|
|
69
72
|
},
|
|
70
|
-
badge:
|
|
71
|
-
|
|
72
|
-
top: r(-6),
|
|
73
|
-
right: r(-10),
|
|
74
|
-
minWidth: r(16),
|
|
75
|
-
height: r(16),
|
|
76
|
-
borderRadius: radius.md,
|
|
77
|
-
backgroundColor: c.error,
|
|
78
|
-
paddingHorizontal: space[1],
|
|
79
|
-
alignItems: 'center',
|
|
80
|
-
justifyContent: 'center',
|
|
81
|
-
},
|
|
82
|
-
badgeText: {
|
|
83
|
-
color: c.onError,
|
|
84
|
-
fontSize: t.nano,
|
|
85
|
-
fontWeight: fw.bold,
|
|
86
|
-
lineHeight: 12,
|
|
87
|
-
},
|
|
73
|
+
badge: badge.badge,
|
|
74
|
+
badgeText: badge.badgeText,
|
|
88
75
|
});
|
|
76
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
1
2
|
import type { IconName } from '../Icon';
|
|
2
3
|
|
|
3
4
|
export type GridItem = {
|
|
@@ -14,12 +15,14 @@ export type GridProps = {
|
|
|
14
15
|
items: GridItem[];
|
|
15
16
|
/**
|
|
16
17
|
* 列数 1..6;默认 4。
|
|
17
|
-
* ⚠️ 类型外的值(如 `7
|
|
18
|
+
* ⚠️ 类型外的值(如 `7`)会**告警**(dev log.warn)并回退到 4 列 — 业务应在传入前自行校验。
|
|
18
19
|
*/
|
|
19
20
|
columns?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
20
21
|
onPress?: (item: GridItem) => void;
|
|
21
22
|
/** 是否套白色卡片;传 false 则背景透明 */
|
|
22
23
|
card?: boolean;
|
|
24
|
+
/** 容器附加样式(margin / position 等布局微调)。 */
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
23
26
|
/** 容器 testID;item testID 会自动派生为 `${testID}-${item.id}` */
|
|
24
27
|
testID?: string;
|
|
25
28
|
};
|
|
@@ -2,15 +2,18 @@ import React from 'react';
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import Svg, { Circle, Path, Rect } from 'react-native-svg';
|
|
4
4
|
import { ICONS, type IconDef } from '../../../icons';
|
|
5
|
-
import { useColors } from '../../../theme';
|
|
5
|
+
import { r, useColors } from '../../../theme';
|
|
6
6
|
import { createLogger } from '../../../utils/logger';
|
|
7
7
|
import type { IconProps } from './types';
|
|
8
8
|
|
|
9
9
|
const log = createLogger('Icon');
|
|
10
10
|
|
|
11
|
+
// 模块级去重集合:同一未知 name 只警一次,避免列表场景告警风暴。
|
|
12
|
+
const warnedNames = new Set<string>();
|
|
13
|
+
|
|
11
14
|
export function Icon({
|
|
12
15
|
name,
|
|
13
|
-
size = 18,
|
|
16
|
+
size = r(18),
|
|
14
17
|
color,
|
|
15
18
|
strokeWidth,
|
|
16
19
|
style,
|
|
@@ -20,7 +23,10 @@ export function Icon({
|
|
|
20
23
|
const stroke = color ?? c.foregroundMuted;
|
|
21
24
|
const def: IconDef | undefined = ICONS[name];
|
|
22
25
|
if (!def) {
|
|
23
|
-
|
|
26
|
+
if (!warnedNames.has(name)) {
|
|
27
|
+
warnedNames.add(name);
|
|
28
|
+
log.warn(`unknown icon: ${name}`);
|
|
29
|
+
}
|
|
24
30
|
return (
|
|
25
31
|
<View
|
|
26
32
|
style={[{ width: size, height: size }, style]}
|
|
@@ -50,31 +56,40 @@ export function Icon({
|
|
|
50
56
|
strokeLinejoin="round"
|
|
51
57
|
>
|
|
52
58
|
{def.elements.map((el, i) => {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
59
|
+
// fill:currentColor → 主题 stroke 色;其余原样;缺省继承根 fill="none"。
|
|
60
|
+
// opacity / stroke:透传源 svg 的元素级覆盖(stroke="none" = 纯 fill 不继承根描边)。
|
|
61
|
+
const elProps = {
|
|
62
|
+
fill: el.fill === 'currentColor' ? stroke : (el.fill ?? 'none'),
|
|
63
|
+
opacity: el.opacity,
|
|
64
|
+
stroke: el.stroke,
|
|
65
|
+
};
|
|
66
|
+
switch (el.kind) {
|
|
67
|
+
case 'path':
|
|
68
|
+
return <Path key={i} d={el.d} {...elProps} />;
|
|
69
|
+
case 'circle':
|
|
70
|
+
return (
|
|
71
|
+
<Circle key={i} cx={el.cx} cy={el.cy} r={el.r} {...elProps} />
|
|
72
|
+
);
|
|
73
|
+
case 'rect':
|
|
74
|
+
// ry 不被 build-icons.js 抽取,不在 IconElement 类型中 —— 此处不传。
|
|
75
|
+
return (
|
|
76
|
+
<Rect
|
|
77
|
+
key={i}
|
|
78
|
+
x={el.x}
|
|
79
|
+
y={el.y}
|
|
80
|
+
width={el.width}
|
|
81
|
+
height={el.height}
|
|
82
|
+
rx={el.rx}
|
|
83
|
+
{...elProps}
|
|
84
|
+
/>
|
|
85
|
+
);
|
|
86
|
+
default: {
|
|
87
|
+
// 穷尽兜底:未来若 build-icons.js 新增 kind(如 line/ellipse),
|
|
88
|
+
// TypeScript 会在此行报错提示渲染端同步处理,防静默渲染空。
|
|
89
|
+
const _exhaustive: never = el;
|
|
90
|
+
return _exhaustive;
|
|
91
|
+
}
|
|
76
92
|
}
|
|
77
|
-
return null;
|
|
78
93
|
})}
|
|
79
94
|
</Svg>
|
|
80
95
|
</View>
|
|
@@ -19,6 +19,7 @@ export function IconButton({
|
|
|
19
19
|
variant = 'ghost',
|
|
20
20
|
color,
|
|
21
21
|
disabled,
|
|
22
|
+
loading,
|
|
22
23
|
accessibilityLabel,
|
|
23
24
|
accessibilityHint,
|
|
24
25
|
style,
|
|
@@ -30,6 +31,7 @@ export function IconButton({
|
|
|
30
31
|
onPress={onPress}
|
|
31
32
|
size={size}
|
|
32
33
|
variant={variant}
|
|
34
|
+
loading={loading}
|
|
33
35
|
disabled={disabled}
|
|
34
36
|
accessibilityLabel={accessibilityLabel}
|
|
35
37
|
accessibilityHint={accessibilityHint}
|
|
@@ -2,6 +2,9 @@ import type { StyleProp, ViewStyle } from 'react-native';
|
|
|
2
2
|
import type { IconName } from '../Icon';
|
|
3
3
|
import type { ButtonSize, ButtonVariant } from '../Button/types';
|
|
4
4
|
|
|
5
|
+
/** IconButton 支持的视觉变体:排除 'text'——text 撕除高度,与 square 方形布局语义冲突。 */
|
|
6
|
+
export type IconButtonVariant = Exclude<ButtonVariant, 'text'>;
|
|
7
|
+
|
|
5
8
|
export type IconButtonProps = {
|
|
6
9
|
/** 图标名 */
|
|
7
10
|
icon: IconName;
|
|
@@ -9,14 +12,17 @@ export type IconButtonProps = {
|
|
|
9
12
|
onPress?: () => void;
|
|
10
13
|
/** 尺寸,默认 'md'(28 / 36 / 44 方形) */
|
|
11
14
|
size?: ButtonSize;
|
|
12
|
-
/** 视觉变体,默认 'ghost'(透明底,适合 header right-tray 场景)
|
|
13
|
-
variant
|
|
15
|
+
/** 视觉变体,默认 'ghost'(透明底,适合 header right-tray 场景)。
|
|
16
|
+
* 不支持 'text'——text variant 撕除高度,与 square 方形布局冲突。 */
|
|
17
|
+
variant?: IconButtonVariant;
|
|
14
18
|
/** Icon 颜色 override —— 不传走 variant.palette.fg(品牌一致默认);
|
|
15
19
|
* caller 显式控制 icon 色场景(eg NavBar 内部按 variant 推导出 foreground /
|
|
16
20
|
* onPrimary)。仅影响 icon 色,bg/border 仍由 variant palette 决定。 */
|
|
17
21
|
color?: string;
|
|
18
22
|
/** 整体禁用:opacity 0.5 + 不响应 */
|
|
19
23
|
disabled?: boolean;
|
|
24
|
+
/** 加载态:显示 ActivityIndicator 替代 icon,自动 disabled */
|
|
25
|
+
loading?: boolean;
|
|
20
26
|
/** **必填** — 无文本提示语义,SR 需要 */
|
|
21
27
|
accessibilityLabel: string;
|
|
22
28
|
/** SR 朗读 label 后的行为说明 hint。仅在"行为不显然"时加。 */
|
|
@@ -17,9 +17,10 @@ export type InputProps = Omit<
|
|
|
17
17
|
leading?: ReactNode;
|
|
18
18
|
/** 可选的后置插槽(清除按钮、眼睛切换等) */
|
|
19
19
|
trailing?: ReactNode;
|
|
20
|
-
/** 错误信息 ——
|
|
20
|
+
/** 错误信息 —— 容器进入错误态并在下方显示。
|
|
21
|
+
* 空串 `""` / undefined 都不进 error 态(truthy 判定),与 TextFieldBase 保持一致。[L-96] */
|
|
21
22
|
error?: string;
|
|
22
|
-
/** 覆盖单行高度,默认 44
|
|
23
|
+
/** 覆盖单行高度,默认 control.lg(r(44),随设备缩放) */
|
|
23
24
|
height?: number;
|
|
24
25
|
/** 容器外层样式(含 leading/trailing 整个 wrap) */
|
|
25
26
|
containerStyle?: StyleProp<ViewStyle>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Image } from 'react-native';
|
|
3
|
+
import { r } from '../../../theme';
|
|
3
4
|
import type { LogoProps } from './types';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -13,7 +14,7 @@ import type { LogoProps } from './types';
|
|
|
13
14
|
*/
|
|
14
15
|
export function Logo({
|
|
15
16
|
source,
|
|
16
|
-
size = 64,
|
|
17
|
+
size = r(64),
|
|
17
18
|
borderRadius,
|
|
18
19
|
label = 'Logo',
|
|
19
20
|
style,
|
|
@@ -6,9 +6,14 @@ import { isSlot } from './isSlot';
|
|
|
6
6
|
import { makeStyles } from './styles';
|
|
7
7
|
import type { NavBarProps, NavBarSlotConfig } from './types';
|
|
8
8
|
|
|
9
|
-
/** NavBarSlotConfig → IconButton(variant='ghost' + 外部 tint)。
|
|
10
|
-
* accessibilityLabel 必填(IconButton 强制),fallback 到 icon 名。 */
|
|
9
|
+
/** NavBarSlotConfig → IconButton(variant='ghost' + 外部 tint)。 */
|
|
11
10
|
function renderSlot(slot: NavBarSlotConfig, tint: string) {
|
|
11
|
+
// [L-50] 缺 accessibilityLabel 时 dev 告警 —— 回退读英文 icon 名(如 "menu")体验不佳。
|
|
12
|
+
if (!slot.accessibilityLabel && typeof __DEV__ !== 'undefined' && __DEV__) {
|
|
13
|
+
console.warn(
|
|
14
|
+
`NavBar slot(icon="${slot.icon}")未传 accessibilityLabel,SR 将读出 icon 名,请传人类可读短语。`
|
|
15
|
+
);
|
|
16
|
+
}
|
|
12
17
|
return (
|
|
13
18
|
<IconButton
|
|
14
19
|
icon={slot.icon}
|
|
@@ -30,12 +35,20 @@ function resolveSlot(
|
|
|
30
35
|
return slot;
|
|
31
36
|
}
|
|
32
37
|
|
|
38
|
+
/**
|
|
39
|
+
* 安全区归属:NavBar **不**内置 top safe-area inset。
|
|
40
|
+
* 宿主页面负责处理(推荐做法:在屏幕根容器或 Stack.Screen header 里
|
|
41
|
+
* 用 `<SafeAreaView edges={['top']}>` 包住 NavBar,或配合
|
|
42
|
+
* `react-navigation` 的 `headerStatusBarHeight` 选项)。
|
|
43
|
+
* 这样 NavBar 可在任何场景复用(modal、底部抽屉 header 等不需要 top inset)。
|
|
44
|
+
*/
|
|
33
45
|
export function NavBar({
|
|
34
46
|
title,
|
|
35
47
|
subtitle,
|
|
36
48
|
left,
|
|
37
49
|
right,
|
|
38
50
|
variant = 'default',
|
|
51
|
+
style,
|
|
39
52
|
testID,
|
|
40
53
|
}: NavBarProps) {
|
|
41
54
|
const c = useColors();
|
|
@@ -53,6 +66,7 @@ export function NavBar({
|
|
|
53
66
|
styles.bar,
|
|
54
67
|
isBrand && styles.barBrand,
|
|
55
68
|
isTransparent && styles.barTransparent,
|
|
69
|
+
style,
|
|
56
70
|
]}
|
|
57
71
|
testID={testID}
|
|
58
72
|
>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
3
|
import type { IconName } from '../Icon';
|
|
3
4
|
|
|
4
5
|
export type NavBarSlotConfig = {
|
|
5
6
|
icon: IconName;
|
|
6
7
|
onPress?: () => void;
|
|
7
|
-
/**
|
|
8
|
+
/** 屏幕阅读器读出的功能描述。强烈建议传 —— icon-only 按钮无文字,缺省时 SR 回退
|
|
9
|
+
* 读英文 icon 名(如 "menu")且 dev 下告警。请传人类可读短语(如「返回」「更多」)。 */
|
|
8
10
|
accessibilityLabel?: string;
|
|
9
11
|
};
|
|
10
12
|
|
|
@@ -26,6 +28,8 @@ export type NavBarProps = {
|
|
|
26
28
|
* 'transparentLight' variant。
|
|
27
29
|
*/
|
|
28
30
|
variant?: 'default' | 'brand' | 'transparent';
|
|
31
|
+
/** 容器附加样式(margin / position 等布局微调)。 */
|
|
32
|
+
style?: StyleProp<ViewStyle>;
|
|
29
33
|
/** E2E / 测试定位 */
|
|
30
34
|
testID?: string;
|
|
31
35
|
};
|
|
@@ -1,50 +1,84 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { forwardRef, useState } from 'react';
|
|
2
2
|
import { Pressable } from 'react-native-gesture-handler';
|
|
3
3
|
import { Icon } from '../Icon';
|
|
4
4
|
import { Input } from '../Input';
|
|
5
|
-
import { useColors } from '../../../theme';
|
|
5
|
+
import { control, fixed, r, useColors } from '../../../theme';
|
|
6
|
+
import { childTestID } from '../../../utils/testID';
|
|
6
7
|
import { styles } from './styles';
|
|
8
|
+
import type { TextInputRef } from '../TextField/TextFieldBase';
|
|
7
9
|
import type { PasswordInputProps } from './types';
|
|
8
10
|
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
11
|
+
/**
|
|
12
|
+
* 密码 Input —— Input + leading lock + trailing eye 切换明文 / 密文。
|
|
13
|
+
*
|
|
14
|
+
* [L-32] 增强:
|
|
15
|
+
* - forwardRef<TextInput> —— 业务表单 focus() 聚焦
|
|
16
|
+
* - inputProps 类型改为 Omit<TextInputProps,'secureTextEntry'>
|
|
17
|
+
* - 补 textContentType='password' / autoComplete='current-password' / autoCapitalize='none' 默认值
|
|
18
|
+
* - 暴露 error / disabled 透传给底层 Input
|
|
19
|
+
*
|
|
20
|
+
* showPw 内部 useState,caller 只关心 value/onChangeText。
|
|
21
|
+
* a11y:label 已表达"显示/隐藏密码"意图,不再加 accessibilityHint(避免 SR 朗读 over-hint)。
|
|
22
|
+
*/
|
|
23
|
+
export const PasswordInput = forwardRef<TextInputRef, PasswordInputProps>(
|
|
24
|
+
function PasswordInput(
|
|
25
|
+
{
|
|
26
|
+
value,
|
|
27
|
+
onChangeText,
|
|
28
|
+
placeholder = '请输入密码',
|
|
29
|
+
testID,
|
|
30
|
+
error,
|
|
31
|
+
disabled,
|
|
32
|
+
inputProps,
|
|
33
|
+
},
|
|
34
|
+
ref
|
|
35
|
+
): React.JSX.Element {
|
|
36
|
+
const c = useColors();
|
|
37
|
+
const [showPw, setShowPw] = useState(false);
|
|
22
38
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
39
|
+
return (
|
|
40
|
+
<Input
|
|
41
|
+
ref={ref}
|
|
42
|
+
testID={testID}
|
|
43
|
+
value={value}
|
|
44
|
+
onChangeText={onChangeText}
|
|
45
|
+
placeholder={placeholder}
|
|
46
|
+
error={error}
|
|
47
|
+
disabled={disabled}
|
|
48
|
+
// [L-32] 补 textContentType / autoComplete / autoCapitalize 默认值 —— 提升密码自动填充体验
|
|
49
|
+
textContentType="password"
|
|
50
|
+
autoComplete="current-password"
|
|
51
|
+
autoCapitalize="none"
|
|
52
|
+
{...inputProps}
|
|
53
|
+
// secureTextEntry 在 inputProps spread 之后覆盖,确保组件自管不被 caller 干扰
|
|
54
|
+
secureTextEntry={!showPw}
|
|
55
|
+
leading={<Icon name="lock" size={r(18)} color={c.iconFaint40} />}
|
|
56
|
+
trailing={
|
|
57
|
+
<Pressable
|
|
58
|
+
testID={childTestID(testID, 'toggle')}
|
|
59
|
+
style={styles.eyeBtn}
|
|
60
|
+
onPress={() => setShowPw((v) => !v)}
|
|
61
|
+
accessibilityRole="button"
|
|
62
|
+
accessibilityLabel={showPw ? '隐藏密码' : '显示密码'}
|
|
63
|
+
// [M-7] eye icon r(16)≈16pt;Input 高 control.md≈36pt 限制垂直扩展
|
|
64
|
+
// vertical 走 (44-control.md)/2≈4;horizontal 走 (44-16)/2=14
|
|
65
|
+
hitSlop={{
|
|
66
|
+
top: Math.round((fixed.hitTarget - control.md) / 2),
|
|
67
|
+
bottom: Math.round((fixed.hitTarget - control.md) / 2),
|
|
68
|
+
left: Math.round((fixed.hitTarget - r(16)) / 2),
|
|
69
|
+
right: Math.round((fixed.hitTarget - r(16)) / 2),
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
<Icon
|
|
73
|
+
name={showPw ? 'eye' : 'eye-off'}
|
|
74
|
+
size={r(16)}
|
|
75
|
+
color={c.iconFaint40}
|
|
76
|
+
/>
|
|
77
|
+
</Pressable>
|
|
78
|
+
}
|
|
79
|
+
/>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
|
|
84
|
+
PasswordInput.displayName = 'PasswordInput';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
import { space } from '../../../theme';
|
|
3
3
|
|
|
4
|
-
/** eye Pressable hit area
|
|
4
|
+
/** eye Pressable hit area 微间距 4px。 */
|
|
5
5
|
export const styles = StyleSheet.create({
|
|
6
6
|
eyeBtn: { paddingHorizontal: space['1'] },
|
|
7
7
|
});
|
|
@@ -6,7 +6,12 @@ export type PasswordInputProps = {
|
|
|
6
6
|
/** 默认 "请输入密码" */
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
testID?: string;
|
|
9
|
+
/** 错误信息 —— 传入时 Input 进入 error 态并在下方显示 */
|
|
10
|
+
error?: string;
|
|
11
|
+
/** 整体禁用:等价于 editable=false + 视觉变灰 */
|
|
12
|
+
disabled?: boolean;
|
|
9
13
|
/** 透传给底层 Input 的其他 RN TextInput 属性(maxLength / autoFocus 等)。
|
|
10
|
-
* ⚠ 不要传 secureTextEntry,组件自管;传了会被组件内部覆盖。
|
|
11
|
-
|
|
14
|
+
* ⚠ 不要传 secureTextEntry,组件自管;传了会被组件内部覆盖。
|
|
15
|
+
* [L-32] 类型显式 Omit<TextInputProps,'secureTextEntry'> 封堵传入歧义 */
|
|
16
|
+
inputProps?: Omit<TextInputProps, 'secureTextEntry'>;
|
|
12
17
|
};
|
|
@@ -5,12 +5,13 @@ import type { PulseProps } from './types';
|
|
|
5
5
|
|
|
6
6
|
export function Pulse({
|
|
7
7
|
children,
|
|
8
|
+
style,
|
|
8
9
|
testID,
|
|
9
10
|
...opts
|
|
10
11
|
}: PulseProps & { children: React.ReactNode }): React.JSX.Element {
|
|
11
12
|
const animatedStyle = usePulse(opts);
|
|
12
13
|
return (
|
|
13
|
-
<Animated.View style={animatedStyle} testID={testID}>
|
|
14
|
+
<Animated.View style={[animatedStyle, style]} testID={testID}>
|
|
14
15
|
{children}
|
|
15
16
|
</Animated.View>
|
|
16
17
|
);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Animated from 'react-native-reanimated';
|
|
3
|
-
import { useColors } from '../../../theme';
|
|
3
|
+
import { r, useColors } from '../../../theme';
|
|
4
4
|
import { usePulse } from './usePulse';
|
|
5
5
|
import type { PulseDotProps } from './types';
|
|
6
6
|
|
|
7
7
|
export function PulseDot({
|
|
8
|
-
size = 6,
|
|
8
|
+
size = r(6),
|
|
9
9
|
color,
|
|
10
10
|
from = 0.5,
|
|
11
|
-
|
|
12
|
-
duration = 700,
|
|
13
|
-
delay = 0,
|
|
11
|
+
style,
|
|
14
12
|
testID,
|
|
13
|
+
...opts
|
|
15
14
|
}: PulseDotProps = {}): React.JSX.Element {
|
|
16
15
|
const c = useColors();
|
|
17
16
|
const fill = color ?? c.primary;
|
|
18
|
-
|
|
17
|
+
// [L-93] 只显式覆盖 from(默认 0.5 与 usePulse 的 0.6 不同),其余 opts 透传 usePulse。
|
|
18
|
+
const animatedStyle = usePulse({ from, ...opts });
|
|
19
19
|
return (
|
|
20
20
|
<Animated.View
|
|
21
21
|
style={[
|
|
@@ -26,6 +26,7 @@ export function PulseDot({
|
|
|
26
26
|
backgroundColor: fill,
|
|
27
27
|
},
|
|
28
28
|
animatedStyle,
|
|
29
|
+
style,
|
|
29
30
|
]}
|
|
30
31
|
testID={testID}
|
|
31
32
|
accessibilityElementsHidden
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
|
|
1
3
|
export type PulseOptions = {
|
|
2
4
|
/** 透明度下界(默认 0.6) */
|
|
3
5
|
from?: number;
|
|
@@ -12,11 +14,15 @@ export type PulseOptions = {
|
|
|
12
14
|
export type PulseDotProps = PulseOptions & {
|
|
13
15
|
size?: number;
|
|
14
16
|
color?: string;
|
|
17
|
+
/** 容器附加样式(margin / position 等布局微调)。 */
|
|
18
|
+
style?: StyleProp<ViewStyle>;
|
|
15
19
|
/** E2E / 测试定位 */
|
|
16
20
|
testID?: string;
|
|
17
21
|
};
|
|
18
22
|
|
|
19
23
|
export type PulseProps = PulseOptions & {
|
|
24
|
+
/** 容器附加样式(margin / position 等布局微调)。 */
|
|
25
|
+
style?: StyleProp<ViewStyle>;
|
|
20
26
|
/** E2E / 测试定位 */
|
|
21
27
|
testID?: string;
|
|
22
28
|
};
|