@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
|
@@ -2,13 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useEffect, useRef, useState } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
import { motion } from "../../../theme/index.js";
|
|
5
|
+
import { motion, usePrefersReducedMotion } from "../../../theme/index.js";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
/**
|
|
8
8
|
* Web 端 Reveal —— RN-Web 上 reanimated 4 的 layout 动画(FadeIn/FadeOut)会在
|
|
9
9
|
* _updatePropsJS 里 Object.keys 抛 TypeError(layoutReanimation/web,渲染即每帧崩),
|
|
10
10
|
* 改用 React state + CSS transition 复刻入场淡入。退场在 web 省略(消费者卸载即移除);
|
|
11
11
|
* native 走 Reveal.tsx 的 reanimated 实现。
|
|
12
|
+
*
|
|
13
|
+
* **结构分叉说明(三层容器)**:
|
|
14
|
+
* - 外层 `<View style={style}>` —— 承接 RN StyleSheet 样式(flex/margin/padding 等),
|
|
15
|
+
* 与 native Reveal 保持相同的容器语义;
|
|
16
|
+
* - 中间 `<div style={animatedWebStyle}>` —— CSS opacity transition 动画层;
|
|
17
|
+
* 必须是真正的 DOM 元素才能触发 CSS transition(react-native-web 的 <View> 会先
|
|
18
|
+
* inline 合并 style 再设 opacity,时序不稳定);
|
|
19
|
+
* - 因此这里刻意不用 animationKeyframes(需要 @keyframes 注入 document),
|
|
20
|
+
* 而用 CSS transition + state 切换 opacity。
|
|
12
21
|
*/
|
|
13
22
|
export function Reveal({
|
|
14
23
|
children,
|
|
@@ -16,9 +25,15 @@ export function Reveal({
|
|
|
16
25
|
duration = motion.base,
|
|
17
26
|
testID
|
|
18
27
|
}) {
|
|
28
|
+
const reduced = usePrefersReducedMotion();
|
|
19
29
|
const [visible, setVisible] = useState(false);
|
|
20
30
|
const rafRef = useRef(null);
|
|
21
31
|
useEffect(() => {
|
|
32
|
+
// reduce-motion:跳过淡入,内容即时呈现(与 native FadeIn 在 ReduceMotion.System 下一致)。
|
|
33
|
+
if (reduced) {
|
|
34
|
+
setVisible(true);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
22
37
|
let cancelled = false;
|
|
23
38
|
// 双 RAF 过一帧 commit/paint,确保 CSS transition 有 opacity:0 起点(仿 ToastHost.web)。
|
|
24
39
|
rafRef.current = requestAnimationFrame(() => {
|
|
@@ -31,10 +46,10 @@ export function Reveal({
|
|
|
31
46
|
cancelled = true;
|
|
32
47
|
if (rafRef.current != null) cancelAnimationFrame(rafRef.current);
|
|
33
48
|
};
|
|
34
|
-
}, []);
|
|
49
|
+
}, [reduced]);
|
|
35
50
|
const animatedWebStyle = {
|
|
36
51
|
opacity: visible ? 1 : 0,
|
|
37
|
-
transition: `opacity ${duration}ms ease-out`
|
|
52
|
+
transition: reduced ? undefined : `opacity ${duration}ms ease-out`
|
|
38
53
|
};
|
|
39
54
|
return /*#__PURE__*/_jsx(View, {
|
|
40
55
|
style: style,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","useState","View","motion","jsx","_jsx","Reveal","children","style","duration","base","testID","visible","setVisible","rafRef","cancelled","current","requestAnimationFrame","cancelAnimationFrame","animatedWebStyle","opacity","transition"],"sourceRoot":"../../../../../src","sources":["components/ui/Reveal/Reveal.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,QAAQ,yBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","useState","View","motion","usePrefersReducedMotion","jsx","_jsx","Reveal","children","style","duration","base","testID","reduced","visible","setVisible","rafRef","cancelled","current","requestAnimationFrame","cancelAnimationFrame","animatedWebStyle","opacity","transition","undefined"],"sourceRoot":"../../../../../src","sources":["components/ui/Reveal/Reveal.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,MAAM,EAAEC,uBAAuB,QAAQ,yBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGjE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,MAAMA,CAAC;EACrBC,QAAQ;EACRC,KAAK;EACLC,QAAQ,GAAGP,MAAM,CAACQ,IAAI;EACtBC;AACW,CAAC,EAAqB;EACjC,MAAMC,OAAO,GAAGT,uBAAuB,CAAC,CAAC;EACzC,MAAM,CAACU,OAAO,EAAEC,UAAU,CAAC,GAAGd,QAAQ,CAAC,KAAK,CAAC;EAC7C,MAAMe,MAAM,GAAGhB,MAAM,CAAgB,IAAI,CAAC;EAE1CD,SAAS,CAAC,MAAM;IACd;IACA,IAAIc,OAAO,EAAE;MACXE,UAAU,CAAC,IAAI,CAAC;MAChB;IACF;IACA,IAAIE,SAAS,GAAG,KAAK;IACrB;IACAD,MAAM,CAACE,OAAO,GAAGC,qBAAqB,CAAC,MAAM;MAC3C,IAAIF,SAAS,EAAE;MACfD,MAAM,CAACE,OAAO,GAAGC,qBAAqB,CAAC,MAAM;QAC3C,IAAI,CAACF,SAAS,EAAEF,UAAU,CAAC,IAAI,CAAC;MAClC,CAAC,CAAC;IACJ,CAAC,CAAC;IACF,OAAO,MAAM;MACXE,SAAS,GAAG,IAAI;MAChB,IAAID,MAAM,CAACE,OAAO,IAAI,IAAI,EAAEE,oBAAoB,CAACJ,MAAM,CAACE,OAAO,CAAC;IAClE,CAAC;EACH,CAAC,EAAE,CAACL,OAAO,CAAC,CAAC;EAEb,MAAMQ,gBAAqC,GAAG;IAC5CC,OAAO,EAAER,OAAO,GAAG,CAAC,GAAG,CAAC;IACxBS,UAAU,EAAEV,OAAO,GAAGW,SAAS,GAAG,WAAWd,QAAQ;EACvD,CAAC;EAED,oBACEJ,IAAA,CAACJ,IAAI;IAACO,KAAK,EAAEA,KAAM;IAACG,MAAM,EAAEA,MAAO;IAAAJ,QAAA,eACjCF,IAAA;MAAKG,KAAK,EAAEY,gBAAiB;MAAAb,QAAA,EAAEA;IAAQ,CAAM;EAAC,CAC1C,CAAC;AAEX","ignoreList":[]}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import { Pressable } from 'react-native-gesture-handler';
|
|
5
|
-
import { useColors } from "../../../theme/index.js";
|
|
5
|
+
import { control, fixed, r, useColors } from "../../../theme/index.js";
|
|
6
|
+
import { childTestID } from "../../../utils/testID/index.js";
|
|
6
7
|
import { Icon } from "../Icon/index.js";
|
|
7
8
|
import { Input } from "../Input/index.js";
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
/**
|
|
10
11
|
* 搜索输入框 —— `<Input>` 的预设:前置搜索图标、清除按钮、
|
|
11
|
-
* 高
|
|
12
|
+
* 高 control.md、键盘 return 键为「搜索」。
|
|
12
13
|
*
|
|
13
14
|
* Ref 透传到 Input 内部 TextInput,业务可调 `searchRef.current?.focus()`。
|
|
14
15
|
*/
|
|
@@ -17,6 +18,7 @@ export const Search = /*#__PURE__*/forwardRef(function Search({
|
|
|
17
18
|
placeholder = '搜索…',
|
|
18
19
|
value,
|
|
19
20
|
onChangeText,
|
|
21
|
+
testID,
|
|
20
22
|
...rest
|
|
21
23
|
}, ref) {
|
|
22
24
|
const c = useColors();
|
|
@@ -26,26 +28,40 @@ export const Search = /*#__PURE__*/forwardRef(function Search({
|
|
|
26
28
|
...rest,
|
|
27
29
|
value: value,
|
|
28
30
|
onChangeText: onChangeText,
|
|
29
|
-
placeholder: placeholder
|
|
30
|
-
|
|
31
|
+
placeholder: placeholder
|
|
32
|
+
// [L-81] 高度裸 36 → control.md(r(36),随设备缩放)
|
|
33
|
+
,
|
|
34
|
+
height: control.md,
|
|
31
35
|
returnKeyType: "search",
|
|
32
36
|
accessibilityRole: "search",
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
testID: testID,
|
|
38
|
+
onSubmitEditing: e => {
|
|
39
|
+
// [M-9] 改读 e.nativeEvent.text —— 不再依赖受控 value,非受控场景也能触发
|
|
40
|
+
const text = e.nativeEvent.text;
|
|
41
|
+
onSubmit?.(text);
|
|
35
42
|
},
|
|
36
43
|
leading: /*#__PURE__*/_jsx(Icon, {
|
|
37
44
|
name: "search",
|
|
38
|
-
size: 18,
|
|
45
|
+
size: r(18),
|
|
39
46
|
color: c.foregroundSubtle
|
|
40
47
|
}),
|
|
41
48
|
trailing: filled ? /*#__PURE__*/_jsx(Pressable, {
|
|
42
|
-
onPress: () => onChangeText?.('')
|
|
43
|
-
|
|
49
|
+
onPress: () => onChangeText?.('')
|
|
50
|
+
// [M-7] 清除按钮 icon r(14)≈14pt;Input 高 control.md≈36pt 限制垂直扩展
|
|
51
|
+
// horizontal 走 (44-14)/2=15;vertical 走 (44-control.md)/2≈4
|
|
52
|
+
,
|
|
53
|
+
hitSlop: {
|
|
54
|
+
top: Math.round((fixed.hitTarget - control.md) / 2),
|
|
55
|
+
bottom: Math.round((fixed.hitTarget - control.md) / 2),
|
|
56
|
+
left: Math.round((fixed.hitTarget - r(14)) / 2),
|
|
57
|
+
right: Math.round((fixed.hitTarget - r(14)) / 2)
|
|
58
|
+
},
|
|
44
59
|
accessibilityRole: "button",
|
|
45
60
|
accessibilityLabel: "\u6E05\u9664",
|
|
61
|
+
testID: childTestID(testID, 'clear'),
|
|
46
62
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
47
63
|
name: "close",
|
|
48
|
-
size: 14,
|
|
64
|
+
size: r(14),
|
|
49
65
|
color: c.foregroundSubtle
|
|
50
66
|
})
|
|
51
67
|
}) : null
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","Pressable","useColors","Icon","Input","jsx","_jsx","Search","onSubmit","placeholder","value","onChangeText","rest","ref","c","filled","length","height","returnKeyType","accessibilityRole","onSubmitEditing","leading","name","size","color","foregroundSubtle","trailing","onPress","hitSlop","accessibilityLabel","children","displayName"],"sourceRoot":"../../../../../src","sources":["components/ui/Search/Search.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,SAAS,QAAQ,8BAA8B;AAExD,SAASC,SAAS,QAAQ,yBAAgB;
|
|
1
|
+
{"version":3,"names":["React","forwardRef","Pressable","control","fixed","r","useColors","childTestID","Icon","Input","jsx","_jsx","Search","onSubmit","placeholder","value","onChangeText","testID","rest","ref","c","filled","length","height","md","returnKeyType","accessibilityRole","onSubmitEditing","e","text","nativeEvent","leading","name","size","color","foregroundSubtle","trailing","onPress","hitSlop","top","Math","round","hitTarget","bottom","left","right","accessibilityLabel","children","displayName"],"sourceRoot":"../../../../../src","sources":["components/ui/Search/Search.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,QAAQ,OAAO;AACzC,SAASC,SAAS,QAAQ,8BAA8B;AAExD,SAASC,OAAO,EAAEC,KAAK,EAAEC,CAAC,EAAEC,SAAS,QAAQ,yBAAgB;AAC7D,SAASC,WAAW,QAAQ,gCAAuB;AACnD,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,KAAK,QAAQ,mBAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIjC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,MAAM,gBAAGX,UAAU,CAA4B,SAASW,MAAMA,CACzE;EAAEC,QAAQ;EAAEC,WAAW,GAAG,KAAK;EAAEC,KAAK;EAAEC,YAAY;EAAEC,MAAM;EAAE,GAAGC;AAAK,CAAC,EACvEC,GAAG,EACgB;EACnB,MAAMC,CAAC,GAAGd,SAAS,CAAC,CAAC;EACrB,MAAMe,MAAM,GAAG,OAAON,KAAK,KAAK,QAAQ,IAAIA,KAAK,CAACO,MAAM,GAAG,CAAC;EAC5D,oBACEX,IAAA,CAACF,KAAK;IACJU,GAAG,EAAEA,GAAI;IAAA,GACLD,IAAI;IACRH,KAAK,EAAEA,KAAM;IACbC,YAAY,EAAEA,YAAa;IAC3BF,WAAW,EAAEA;IACb;IAAA;IACAS,MAAM,EAAEpB,OAAO,CAACqB,EAAG;IACnBC,aAAa,EAAC,QAAQ;IACtBC,iBAAiB,EAAC,QAAQ;IAC1BT,MAAM,EAAEA,MAAO;IACfU,eAAe,EAAGC,CAAC,IAAK;MACtB;MACA,MAAMC,IAAI,GAAGD,CAAC,CAACE,WAAW,CAACD,IAAI;MAC/BhB,QAAQ,GAAGgB,IAAI,CAAC;IAClB,CAAE;IACFE,OAAO,eAAEpB,IAAA,CAACH,IAAI;MAACwB,IAAI,EAAC,QAAQ;MAACC,IAAI,EAAE5B,CAAC,CAAC,EAAE,CAAE;MAAC6B,KAAK,EAAEd,CAAC,CAACe;IAAiB,CAAE,CAAE;IACxEC,QAAQ,EACNf,MAAM,gBACJV,IAAA,CAACT,SAAS;MACRmC,OAAO,EAAEA,CAAA,KAAMrB,YAAY,GAAG,EAAE;MAChC;MACA;MAAA;MACAsB,OAAO,EAAE;QACPC,GAAG,EAAEC,IAAI,CAACC,KAAK,CAAC,CAACrC,KAAK,CAACsC,SAAS,GAAGvC,OAAO,CAACqB,EAAE,IAAI,CAAC,CAAC;QACnDmB,MAAM,EAAEH,IAAI,CAACC,KAAK,CAAC,CAACrC,KAAK,CAACsC,SAAS,GAAGvC,OAAO,CAACqB,EAAE,IAAI,CAAC,CAAC;QACtDoB,IAAI,EAAEJ,IAAI,CAACC,KAAK,CAAC,CAACrC,KAAK,CAACsC,SAAS,GAAGrC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;QAC/CwC,KAAK,EAAEL,IAAI,CAACC,KAAK,CAAC,CAACrC,KAAK,CAACsC,SAAS,GAAGrC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC;MACjD,CAAE;MACFqB,iBAAiB,EAAC,QAAQ;MAC1BoB,kBAAkB,EAAC,cAAI;MACvB7B,MAAM,EAAEV,WAAW,CAACU,MAAM,EAAE,OAAO,CAAE;MAAA8B,QAAA,eAErCpC,IAAA,CAACH,IAAI;QAACwB,IAAI,EAAC,OAAO;QAACC,IAAI,EAAE5B,CAAC,CAAC,EAAE,CAAE;QAAC6B,KAAK,EAAEd,CAAC,CAACe;MAAiB,CAAE;IAAC,CACpD,CAAC,GACV;EACL,CACF,CAAC;AAEN,CAAC,CAAC;AAEFvB,MAAM,CAACoC,WAAW,GAAG,QAAQ","ignoreList":[]}
|
|
@@ -17,6 +17,7 @@ export function Segmented({
|
|
|
17
17
|
value,
|
|
18
18
|
onChange,
|
|
19
19
|
items,
|
|
20
|
+
disabled = false,
|
|
20
21
|
testID
|
|
21
22
|
}) {
|
|
22
23
|
const {
|
|
@@ -27,37 +28,46 @@ export function Segmented({
|
|
|
27
28
|
const styles = useThemedStyles(makeStyles);
|
|
28
29
|
const activeBg = scheme === 'dark' ? c.surfaceContainerHighest : c.surface;
|
|
29
30
|
const activeShadow = scheme === 'dark' ? null : shadow.subtle;
|
|
30
|
-
return
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
style:
|
|
53
|
-
|
|
54
|
-
|
|
31
|
+
return (
|
|
32
|
+
/*#__PURE__*/
|
|
33
|
+
// [L-34] accessibilityRole="tablist" —— SR 宣读"标签列表"
|
|
34
|
+
_jsx(View, {
|
|
35
|
+
style: styles.seg,
|
|
36
|
+
testID: testID,
|
|
37
|
+
accessibilityRole: "tablist",
|
|
38
|
+
children: items.map(it => {
|
|
39
|
+
const on = it.id === value;
|
|
40
|
+
const itemTestID = childTestID(testID, it.id, it.testID);
|
|
41
|
+
// [L-82] item 禁用 = 整体 disabled OR 单项 it.disabled
|
|
42
|
+
const itemDisabled = disabled || !!it.disabled;
|
|
43
|
+
return /*#__PURE__*/_jsx(Pressable, {
|
|
44
|
+
onPress: () => !itemDisabled && onChange(it.id),
|
|
45
|
+
disabled: itemDisabled,
|
|
46
|
+
accessibilityRole: "tab",
|
|
47
|
+
accessibilityState: {
|
|
48
|
+
selected: on,
|
|
49
|
+
disabled: itemDisabled
|
|
50
|
+
},
|
|
51
|
+
accessibilityLabel: it.label,
|
|
52
|
+
testID: itemTestID,
|
|
53
|
+
style: ({
|
|
54
|
+
pressed
|
|
55
|
+
}) => [styles.segItem, on && {
|
|
56
|
+
backgroundColor: activeBg
|
|
57
|
+
}, on && activeShadow, {
|
|
58
|
+
opacity: pressed ? 0.85 : 1
|
|
55
59
|
}],
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
61
|
+
style: [styles.segLabel, {
|
|
62
|
+
color: on ? c.foreground : c.foregroundSubtle,
|
|
63
|
+
fontWeight: on ? fw.semi : fw.medium
|
|
64
|
+
}],
|
|
65
|
+
numberOfLines: 1,
|
|
66
|
+
children: it.label
|
|
67
|
+
})
|
|
68
|
+
}, it.id);
|
|
69
|
+
})
|
|
60
70
|
})
|
|
61
|
-
|
|
71
|
+
);
|
|
62
72
|
}
|
|
63
73
|
//# sourceMappingURL=Segmented.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Text","View","Pressable","fw","useTheme","useThemedStyles","childTestID","makeStyles","jsx","_jsx","Segmented","value","onChange","items","testID","colors","c","scheme","shadow","styles","activeBg","surfaceContainerHighest","surface","activeShadow","subtle","style","seg","children","map","it","on","id","itemTestID","
|
|
1
|
+
{"version":3,"names":["React","Text","View","Pressable","fw","useTheme","useThemedStyles","childTestID","makeStyles","jsx","_jsx","Segmented","value","onChange","items","disabled","testID","colors","c","scheme","shadow","styles","activeBg","surfaceContainerHighest","surface","activeShadow","subtle","style","seg","accessibilityRole","children","map","it","on","id","itemTestID","itemDisabled","onPress","accessibilityState","selected","accessibilityLabel","label","pressed","segItem","backgroundColor","opacity","segLabel","color","foreground","foregroundSubtle","fontWeight","semi","medium","numberOfLines"],"sourceRoot":"../../../../../src","sources":["components/ui/Segmented/Segmented.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,8BAA8B;AACxD,SAASC,EAAE,EAAEC,QAAQ,EAAEC,eAAe,QAAQ,yBAAgB;AAC9D,SAASC,WAAW,QAAQ,gCAAuB;AACnD,SAASC,UAAU,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGtC;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,SAASA,CAAC;EACxBC,KAAK;EACLC,QAAQ;EACRC,KAAK;EACLC,QAAQ,GAAG,KAAK;EAChBC;AACc,CAAC,EAAqB;EACpC,MAAM;IAAEC,MAAM,EAAEC,CAAC;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGf,QAAQ,CAAC,CAAC;EAChD,MAAMgB,MAAM,GAAGf,eAAe,CAACE,UAAU,CAAC;EAC1C,MAAMc,QAAQ,GAAGH,MAAM,KAAK,MAAM,GAAGD,CAAC,CAACK,uBAAuB,GAAGL,CAAC,CAACM,OAAO;EAC1E,MAAMC,YAAY,GAAGN,MAAM,KAAK,MAAM,GAAG,IAAI,GAAGC,MAAM,CAACM,MAAM;EAE7D;IAAA;IACE;IACAhB,IAAA,CAACR,IAAI;MAACyB,KAAK,EAAEN,MAAM,CAACO,GAAI;MAACZ,MAAM,EAAEA,MAAO;MAACa,iBAAiB,EAAC,SAAS;MAAAC,QAAA,EACjEhB,KAAK,CAACiB,GAAG,CAAEC,EAAE,IAAK;QACjB,MAAMC,EAAE,GAAGD,EAAE,CAACE,EAAE,KAAKtB,KAAK;QAC1B,MAAMuB,UAAU,GAAG5B,WAAW,CAACS,MAAM,EAAEgB,EAAE,CAACE,EAAE,EAAEF,EAAE,CAAChB,MAAM,CAAC;QACxD;QACA,MAAMoB,YAAY,GAAGrB,QAAQ,IAAI,CAAC,CAACiB,EAAE,CAACjB,QAAQ;QAC9C,oBACEL,IAAA,CAACP,SAAS;UAERkC,OAAO,EAAEA,CAAA,KAAM,CAACD,YAAY,IAAIvB,QAAQ,CAACmB,EAAE,CAACE,EAAE,CAAE;UAChDnB,QAAQ,EAAEqB,YAAa;UACvBP,iBAAiB,EAAC,KAAK;UACvBS,kBAAkB,EAAE;YAAEC,QAAQ,EAAEN,EAAE;YAAElB,QAAQ,EAAEqB;UAAa,CAAE;UAC7DI,kBAAkB,EAAER,EAAE,CAACS,KAAM;UAC7BzB,MAAM,EAAEmB,UAAW;UACnBR,KAAK,EAAEA,CAAC;YAAEe;UAAQ,CAAC,KAAK,CACtBrB,MAAM,CAACsB,OAAO,EACdV,EAAE,IAAI;YAAEW,eAAe,EAAEtB;UAAS,CAAC,EACnCW,EAAE,IAAIR,YAAY,EAClB;YAAEoB,OAAO,EAAEH,OAAO,GAAG,IAAI,GAAG;UAAE,CAAC,CAC/B;UAAAZ,QAAA,eAEFpB,IAAA,CAACT,IAAI;YACH0B,KAAK,EAAE,CACLN,MAAM,CAACyB,QAAQ,EACf;cACEC,KAAK,EAAEd,EAAE,GAAGf,CAAC,CAAC8B,UAAU,GAAG9B,CAAC,CAAC+B,gBAAgB;cAC7CC,UAAU,EAAEjB,EAAE,GAAG7B,EAAE,CAAC+C,IAAI,GAAG/C,EAAE,CAACgD;YAChC,CAAC,CACD;YACFC,aAAa,EAAE,CAAE;YAAAvB,QAAA,EAEhBE,EAAE,CAACS;UAAK,CACL;QAAC,GAzBFT,EAAE,CAACE,EA0BC,CAAC;MAEhB,CAAC;IAAC,CACE;EAAC;AAEX","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { StyleSheet } from 'react-native';
|
|
4
|
-
import {
|
|
4
|
+
import { fixed, r, radius, space, type as t } from "../../../theme/index.js";
|
|
5
5
|
export const makeStyles = c => StyleSheet.create({
|
|
6
6
|
seg: {
|
|
7
7
|
flexDirection: 'row',
|
|
@@ -11,7 +11,9 @@ export const makeStyles = c => StyleSheet.create({
|
|
|
11
11
|
alignSelf: 'flex-start'
|
|
12
12
|
},
|
|
13
13
|
segItem: {
|
|
14
|
-
|
|
14
|
+
// [M-7] Segmented item 高原为 control.sm≈28pt < 44pt;
|
|
15
|
+
// hitSlop 不越父 seg 容器边界 → 改用 minHeight 直接对齐 fixed.hitTarget(44pt)
|
|
16
|
+
minHeight: fixed.hitTarget,
|
|
15
17
|
paddingHorizontal: space[7],
|
|
16
18
|
alignItems: 'center',
|
|
17
19
|
justifyContent: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","
|
|
1
|
+
{"version":3,"names":["StyleSheet","fixed","r","radius","space","type","t","makeStyles","c","create","seg","flexDirection","backgroundColor","surfaceContainerHigh","borderRadius","md","padding","alignSelf","segItem","minHeight","hitTarget","paddingHorizontal","alignItems","justifyContent","sm","segLabel","fontSize","xs"],"sourceRoot":"../../../../../src","sources":["components/ui/Segmented/styles.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,KAAK,EAAEC,CAAC,EAAEC,MAAM,EAAEC,KAAK,EAAEC,IAAI,IAAIC,CAAC,QAAQ,yBAAgB;AAEnE,OAAO,MAAMC,UAAU,GAAIC,CAAc,IACvCR,UAAU,CAACS,MAAM,CAAC;EAChBC,GAAG,EAAE;IACHC,aAAa,EAAE,KAAK;IACpBC,eAAe,EAAEJ,CAAC,CAACK,oBAAoB;IACvCC,YAAY,EAAEX,MAAM,CAACY,EAAE;IACvBC,OAAO,EAAEd,CAAC,CAAC,CAAC,CAAC;IACbe,SAAS,EAAE;EACb,CAAC;EACDC,OAAO,EAAE;IACP;IACA;IACAC,SAAS,EAAElB,KAAK,CAACmB,SAAS;IAC1BC,iBAAiB,EAAEjB,KAAK,CAAC,CAAC,CAAC;IAC3BkB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBT,YAAY,EAAEX,MAAM,CAACqB;EACvB,CAAC;EACDC,QAAQ,EAAE;IACRC,QAAQ,EAAEpB,CAAC,CAACqB;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Animated from 'react-native-reanimated';
|
|
5
5
|
import { usePulse } from "../Pulse/index.js";
|
|
6
|
-
import { useColors } from "../../../theme/index.js";
|
|
6
|
+
import { r, useColors } from "../../../theme/index.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
/**
|
|
9
9
|
* 页面级加载占位骨架。3 个形状由 `shape` 切换。
|
|
@@ -14,13 +14,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
14
14
|
* <Skeleton shape="circle" size={40} /> // 头像占位
|
|
15
15
|
* ```
|
|
16
16
|
*
|
|
17
|
-
* `usePulse({ from: 0.5 })`
|
|
18
|
-
*
|
|
17
|
+
* `usePulse({ from: 0.5 })` 每实例独立脉冲 —— native 端走 Reanimated 4 worklet,
|
|
18
|
+
* web 端走 CSS transition + setInterval(零 rAF JS 帧),opacity 在 0.5~1 循环。
|
|
19
|
+
* 区别于沿 X 横扫高光的流式 shimmer。 */
|
|
19
20
|
export function Skeleton({
|
|
20
21
|
shape = 'rect',
|
|
21
22
|
width,
|
|
22
23
|
height,
|
|
23
|
-
size = 40,
|
|
24
|
+
size = r(40),
|
|
24
25
|
radius,
|
|
25
26
|
style,
|
|
26
27
|
testID
|
|
@@ -42,14 +43,14 @@ export function Skeleton({
|
|
|
42
43
|
if (shape === 'line') {
|
|
43
44
|
return {
|
|
44
45
|
width: width ?? '100%',
|
|
45
|
-
height: height ?? 11,
|
|
46
|
-
borderRadius: radius ?? 3
|
|
46
|
+
height: height ?? r(11),
|
|
47
|
+
borderRadius: radius ?? r(3)
|
|
47
48
|
};
|
|
48
49
|
}
|
|
49
50
|
return {
|
|
50
51
|
width: width ?? '100%',
|
|
51
|
-
height: height ?? 80,
|
|
52
|
-
borderRadius: radius ?? 8
|
|
52
|
+
height: height ?? r(80),
|
|
53
|
+
borderRadius: radius ?? r(8)
|
|
53
54
|
};
|
|
54
55
|
})();
|
|
55
56
|
return /*#__PURE__*/_jsx(Animated.View, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Animated","usePulse","useColors","jsx","_jsx","Skeleton","shape","width","height","size","radius","style","testID","c","animatedStyle","from","dim","borderRadius","View","backgroundColor","surfaceContainerHigh","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../../src","sources":["components/ui/Skeleton/Skeleton.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,QAAQ,QAAQ,mBAAU;AACnC,SAASC,SAAS,QAAQ,yBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
|
1
|
+
{"version":3,"names":["React","Animated","usePulse","r","useColors","jsx","_jsx","Skeleton","shape","width","height","size","radius","style","testID","c","animatedStyle","from","dim","borderRadius","View","backgroundColor","surfaceContainerHigh","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../../src","sources":["components/ui/Skeleton/Skeleton.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,QAAQ,QAAQ,mBAAU;AACnC,SAASC,CAAC,EAAEC,SAAS,QAAQ,yBAAgB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,QAAQA,CAAC;EACvBC,KAAK,GAAG,MAAM;EACdC,KAAK;EACLC,MAAM;EACNC,IAAI,GAAGR,CAAC,CAAC,EAAE,CAAC;EACZS,MAAM;EACNC,KAAK;EACLC;AACa,CAAC,EAAqB;EACnC,MAAMC,CAAC,GAAGX,SAAS,CAAC,CAAC;EACrB,MAAMY,aAAa,GAAGd,QAAQ,CAAC;IAAEe,IAAI,EAAE;EAAI,CAAC,CAAC;;EAE7C;EACA,MAAMC,GAAG,GAAG,CAAC,MAAM;IACjB,IAAIV,KAAK,KAAK,QAAQ,EAAE;MACtB,OAAO;QAAEC,KAAK,EAAEE,IAAI;QAAED,MAAM,EAAEC,IAAI;QAAEQ,YAAY,EAAEP,MAAM,IAAID,IAAI,GAAG;MAAE,CAAC;IACxE;IACA,IAAIH,KAAK,KAAK,MAAM,EAAE;MACpB,OAAO;QACLC,KAAK,EAAEA,KAAK,IAAI,MAAM;QACtBC,MAAM,EAAEA,MAAM,IAAIP,CAAC,CAAC,EAAE,CAAC;QACvBgB,YAAY,EAAEP,MAAM,IAAIT,CAAC,CAAC,CAAC;MAC7B,CAAC;IACH;IACA,OAAO;MACLM,KAAK,EAAEA,KAAK,IAAI,MAAM;MACtBC,MAAM,EAAEA,MAAM,IAAIP,CAAC,CAAC,EAAE,CAAC;MACvBgB,YAAY,EAAEP,MAAM,IAAIT,CAAC,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAAC;EAEJ,oBACEG,IAAA,CAACL,QAAQ,CAACmB,IAAI;IACZP,KAAK,EAAE,CACL;MAAE,GAAGK,GAAG;MAAEG,eAAe,EAAEN,CAAC,CAACO;IAAqB,CAAC,EACnDN,aAAa,EACbH,KAAK,CACL;IACFC,MAAM,EAAEA,MAAO;IACfS,2BAA2B;IAC3BC,yBAAyB,EAAC;EAAqB,CAChD,CAAC;AAEN","ignoreList":[]}
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
|
-
import Animated, { cancelAnimation, Easing, useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
|
|
5
|
-
import { useColors } from "../../../theme/index.js";
|
|
6
|
-
import {
|
|
4
|
+
import Animated, { cancelAnimation, Easing, ReduceMotion, useAnimatedStyle, useSharedValue, withRepeat, withTiming } from 'react-native-reanimated';
|
|
5
|
+
import { r, useColors } from "../../../theme/index.js";
|
|
6
|
+
import { sanitizeSpinnerProps } from "./shared.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const log = createLogger('Spinner');
|
|
9
8
|
export function Spinner({
|
|
10
|
-
size = 18,
|
|
9
|
+
size = r(18),
|
|
11
10
|
color,
|
|
12
|
-
thickness = 2,
|
|
11
|
+
thickness = r(2),
|
|
13
12
|
style,
|
|
14
13
|
testID
|
|
15
14
|
}) {
|
|
16
15
|
const c = useColors();
|
|
17
16
|
const angle = useSharedValue(0);
|
|
18
17
|
const stroke = color ?? c.primary;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
log.warn(`thickness 应为正数,传入 ${thickness},已 fallback 为 2`);
|
|
24
|
-
}
|
|
25
|
-
const safeSize = Number.isFinite(size) && size > 8 ? size : 8;
|
|
26
|
-
const safeThickness = Number.isFinite(thickness) && thickness > 0 ? thickness : 2;
|
|
18
|
+
const {
|
|
19
|
+
safeSize,
|
|
20
|
+
safeThickness
|
|
21
|
+
} = sanitizeSpinnerProps(size, thickness);
|
|
27
22
|
useEffect(() => {
|
|
23
|
+
// 加载指示属 essential motion(W3C):系统「减弱动态效果」下仍应旋转,否则会冻结成
|
|
24
|
+
// 与空闲/完成不可区分的静止圆环(形似卡死)。显式 ReduceMotion.Never 覆盖 reanimated
|
|
25
|
+
// 默认的 System —— 后者在 reduce-motion 下让 withTiming 跳端值、withRepeat 一轮即停。
|
|
28
26
|
angle.value = withRepeat(withTiming(360, {
|
|
29
27
|
duration: 900,
|
|
30
|
-
easing: Easing.linear
|
|
31
|
-
|
|
28
|
+
easing: Easing.linear,
|
|
29
|
+
reduceMotion: ReduceMotion.Never
|
|
30
|
+
}), -1, false, undefined, ReduceMotion.Never);
|
|
32
31
|
return () => cancelAnimation(angle);
|
|
33
32
|
}, [angle]);
|
|
34
33
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","Animated","cancelAnimation","Easing","useAnimatedStyle","useSharedValue","withRepeat","withTiming","useColors","
|
|
1
|
+
{"version":3,"names":["useEffect","Animated","cancelAnimation","Easing","ReduceMotion","useAnimatedStyle","useSharedValue","withRepeat","withTiming","r","useColors","sanitizeSpinnerProps","jsx","_jsx","Spinner","size","color","thickness","style","testID","c","angle","stroke","primary","safeSize","safeThickness","value","duration","easing","linear","reduceMotion","Never","undefined","animatedStyle","transform","rotate","View","width","height","borderRadius","borderWidth","borderColor","outline","borderTopColor","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../../src","sources":["components/ui/Spinner/Spinner.tsx"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,OAAOC,QAAQ,IACbC,eAAe,EACfC,MAAM,EACNC,YAAY,EACZC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAChC,SAASC,CAAC,EAAEC,SAAS,QAAQ,yBAAgB;AAC7C,SAASC,oBAAoB,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGhD,OAAO,SAASC,OAAOA,CAAC;EACtBC,IAAI,GAAGN,CAAC,CAAC,EAAE,CAAC;EACZO,KAAK;EACLC,SAAS,GAAGR,CAAC,CAAC,CAAC,CAAC;EAChBS,KAAK;EACLC;AACY,CAAC,EAAE;EACf,MAAMC,CAAC,GAAGV,SAAS,CAAC,CAAC;EACrB,MAAMW,KAAK,GAAGf,cAAc,CAAC,CAAC,CAAC;EAC/B,MAAMgB,MAAM,GAAGN,KAAK,IAAII,CAAC,CAACG,OAAO;EACjC,MAAM;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAGd,oBAAoB,CAACI,IAAI,EAAEE,SAAS,CAAC;EAEzEjB,SAAS,CAAC,MAAM;IACd;IACA;IACA;IACAqB,KAAK,CAACK,KAAK,GAAGnB,UAAU,CACtBC,UAAU,CAAC,GAAG,EAAE;MACdmB,QAAQ,EAAE,GAAG;MACbC,MAAM,EAAEzB,MAAM,CAAC0B,MAAM;MACrBC,YAAY,EAAE1B,YAAY,CAAC2B;IAC7B,CAAC,CAAC,EACF,CAAC,CAAC,EACF,KAAK,EACLC,SAAS,EACT5B,YAAY,CAAC2B,KACf,CAAC;IACD,OAAO,MAAM7B,eAAe,CAACmB,KAAK,CAAC;EACrC,CAAC,EAAE,CAACA,KAAK,CAAC,CAAC;EAEX,MAAMY,aAAa,GAAG5B,gBAAgB,CAAC,OAAO;IAC5C6B,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAE,GAAGd,KAAK,CAACK,KAAK;IAAM,CAAC;EAC7C,CAAC,CAAC,CAAC;EAEH,oBACEb,IAAA,CAACZ,QAAQ,CAACmC,IAAI;IACZlB,KAAK,EAAE,CACL;MACEmB,KAAK,EAAEb,QAAQ;MACfc,MAAM,EAAEd,QAAQ;MAChBe,YAAY,EAAEf,QAAQ,GAAG,CAAC;MAC1BgB,WAAW,EAAEf,aAAa;MAC1BgB,WAAW,EAAErB,CAAC,CAACsB,OAAO;MACtBC,cAAc,EAAErB;IAClB,CAAC,EACDW,aAAa,EACbf,KAAK,CACL;IACFC,MAAM,EAAEA,MAAO;IACfyB,2BAA2B;IAC3BC,yBAAyB,EAAC;EAAqB,CAChD,CAAC;AAEN","ignoreList":[]}
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
import React, { useEffect, useRef } from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
import { useColors } from "../../../theme/index.js";
|
|
6
|
-
import {
|
|
5
|
+
import { r, useColors } from "../../../theme/index.js";
|
|
6
|
+
import { sanitizeSpinnerProps } from "./shared.js";
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const log = createLogger('Spinner');
|
|
9
|
-
|
|
10
8
|
// React-Native-Web 上 reanimated 4 + worklets 0.9.x 的 useAnimatedStyle 链路在
|
|
11
9
|
// web bundle 里跑会触发 `_updatePropsJS` 里 `Object.keys(updates)` 的 worklet
|
|
12
10
|
// 回值打包 edge case(animation frame 每帧抛 TypeError),旋转停滞。
|
|
@@ -31,9 +29,9 @@ function ensureKeyframes() {
|
|
|
31
29
|
win.document.head.appendChild(style);
|
|
32
30
|
}
|
|
33
31
|
export function Spinner({
|
|
34
|
-
size = 18,
|
|
32
|
+
size = r(18),
|
|
35
33
|
color,
|
|
36
|
-
thickness = 2,
|
|
34
|
+
thickness = r(2),
|
|
37
35
|
style,
|
|
38
36
|
testID
|
|
39
37
|
}) {
|
|
@@ -43,14 +41,10 @@ export function Spinner({
|
|
|
43
41
|
|
|
44
42
|
const ref = useRef(null);
|
|
45
43
|
const stroke = color ?? c.primary;
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
log.warn(`thickness 应为正数,传入 ${thickness},已 fallback 为 2`);
|
|
51
|
-
}
|
|
52
|
-
const safeSize = Number.isFinite(size) && size > 8 ? size : 8;
|
|
53
|
-
const safeThickness = Number.isFinite(thickness) && thickness > 0 ? thickness : 2;
|
|
44
|
+
const {
|
|
45
|
+
safeSize,
|
|
46
|
+
safeThickness
|
|
47
|
+
} = sanitizeSpinnerProps(size, thickness);
|
|
54
48
|
|
|
55
49
|
// RN-Web 把 View 渲染成 div,我们用 ref 拿到底层 DOM 节点直接挂 CSS animation
|
|
56
50
|
// (RN style 不支持 animation 字段;只能事后注入)。
|
|
@@ -58,6 +52,8 @@ export function Spinner({
|
|
|
58
52
|
ensureKeyframes();
|
|
59
53
|
const node = ref.current;
|
|
60
54
|
if (node && node.style) {
|
|
55
|
+
// essential motion:加载指示在 prefers-reduced-motion 下仍应旋转(与 native 的
|
|
56
|
+
// ReduceMotion.Never 对齐),故意不加 @media (prefers-reduced-motion) 停转。
|
|
61
57
|
node.style.animation = 'unif-spinner-spin 900ms linear infinite';
|
|
62
58
|
}
|
|
63
59
|
}, []);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useRef","View","useColors","
|
|
1
|
+
{"version":3,"names":["React","useEffect","useRef","View","r","useColors","sanitizeSpinnerProps","jsx","_jsx","SPIN_KEYFRAMES_ID","win","globalThis","ensureKeyframes","document","getElementById","style","createElement","id","textContent","head","appendChild","Spinner","size","color","thickness","testID","c","ref","stroke","primary","safeSize","safeThickness","node","current","animation","width","height","borderRadius","borderWidth","borderColor","outline","borderTopColor","accessibilityElementsHidden","importantForAccessibility"],"sourceRoot":"../../../../../src","sources":["components/ui/Spinner/Spinner.web.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChD,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,CAAC,EAAEC,SAAS,QAAQ,yBAAgB;AAC7C,SAASC,oBAAoB,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGhD;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG,6BAA6B;;AAEvD;AACA;;AAEA,MAAMC,GAAQ,GAAGC,UAAiB;AAElC,SAASC,eAAeA,CAAA,EAAG;EACzB,IAAI,OAAOF,GAAG,CAACG,QAAQ,KAAK,WAAW,EAAE;EACzC,IAAIH,GAAG,CAACG,QAAQ,CAACC,cAAc,CAACL,iBAAiB,CAAC,EAAE;EACpD,MAAMM,KAAK,GAAGL,GAAG,CAACG,QAAQ,CAACG,aAAa,CAAC,OAAO,CAAC;EACjDD,KAAK,CAACE,EAAE,GAAGR,iBAAiB;EAC5B;EACA;EACA;EACA;EACAM,KAAK,CAACG,WAAW,GACf,sGAAsG;EACxGR,GAAG,CAACG,QAAQ,CAACM,IAAI,CAACC,WAAW,CAACL,KAAK,CAAC;AACtC;AAEA,OAAO,SAASM,OAAOA,CAAC;EACtBC,IAAI,GAAGlB,CAAC,CAAC,EAAE,CAAC;EACZmB,KAAK;EACLC,SAAS,GAAGpB,CAAC,CAAC,CAAC,CAAC;EAChBW,KAAK;EACLU;AACY,CAAC,EAAqB;EAClC,MAAMC,CAAC,GAAGrB,SAAS,CAAC,CAAC;EACrB;EACA;;EAEA,MAAMsB,GAAG,GAAGzB,MAAM,CAAM,IAAI,CAAC;EAC7B,MAAM0B,MAAM,GAAGL,KAAK,IAAIG,CAAC,CAACG,OAAO;EACjC,MAAM;IAAEC,QAAQ;IAAEC;EAAc,CAAC,GAAGzB,oBAAoB,CAACgB,IAAI,EAAEE,SAAS,CAAC;;EAEzE;EACA;EACAvB,SAAS,CAAC,MAAM;IACdW,eAAe,CAAC,CAAC;IACjB,MAAMoB,IAAI,GAAGL,GAAG,CAACM,OAAO;IACxB,IAAID,IAAI,IAAIA,IAAI,CAACjB,KAAK,EAAE;MACtB;MACA;MACAiB,IAAI,CAACjB,KAAK,CAACmB,SAAS,GAAG,yCAAyC;IAClE;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,oBACE1B,IAAA,CAACL,IAAI;IACHwB,GAAG,EAAEA,GAAI;IACTZ,KAAK,EAAE,CACL;MACEoB,KAAK,EAAEL,QAAQ;MACfM,MAAM,EAAEN,QAAQ;MAChBO,YAAY,EAAEP,QAAQ,GAAG,CAAC;MAC1BQ,WAAW,EAAEP,aAAa;MAC1BQ,WAAW,EAAEb,CAAC,CAACc,OAAO;MACtBC,cAAc,EAAEb;IAClB,CAAC,EACDb,KAAK,CACL;IACFU,MAAM,EAAEA,MAAO;IACfiB,2BAA2B;IAC3BC,yBAAyB,EAAC;EAAqB,CAChD,CAAC;AAEN","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { createLogger } from "../../../utils/logger/index.js";
|
|
4
|
+
const log = createLogger('Spinner');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* [M-24][L-11] 入参防御逻辑抽到单一模块,native/web 两端 import 同一份:
|
|
8
|
+
* - 去重 warn:同一异常值只告警一次(模块级 Set 记录),避免渲染路径每帧刷日志。
|
|
9
|
+
* - size / thickness 两字段均覆盖非有限值告警(thickness 原缺失 isFinite 守卫)。
|
|
10
|
+
* - 返回已钳制的安全值,调用方直接使用。
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const warnedKeys = new Set();
|
|
14
|
+
function warnOnce(key, msg) {
|
|
15
|
+
if (warnedKeys.has(key)) return;
|
|
16
|
+
warnedKeys.add(key);
|
|
17
|
+
log.warn(msg);
|
|
18
|
+
}
|
|
19
|
+
export function sanitizeSpinnerProps(size, thickness) {
|
|
20
|
+
if (!Number.isFinite(size) || size < 8) {
|
|
21
|
+
warnOnce(`size:${size}`, `size 应为 ≥8 的有限数,传入 ${size},已钳到 8`);
|
|
22
|
+
}
|
|
23
|
+
if (!Number.isFinite(thickness) || thickness <= 0) {
|
|
24
|
+
warnOnce(`thickness:${thickness}`, `thickness 应为正有限数,传入 ${thickness},已 fallback 为 2`);
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
safeSize: Number.isFinite(size) && size > 8 ? size : 8,
|
|
28
|
+
safeThickness: Number.isFinite(thickness) && thickness > 0 ? thickness : 2
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=shared.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createLogger","log","warnedKeys","Set","warnOnce","key","msg","has","add","warn","sanitizeSpinnerProps","size","thickness","Number","isFinite","safeSize","safeThickness"],"sourceRoot":"../../../../../src","sources":["components/ui/Spinner/shared.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,gCAAuB;AAEpD,MAAMC,GAAG,GAAGD,YAAY,CAAC,SAAS,CAAC;;AAEnC;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAME,UAAU,GAAG,IAAIC,GAAG,CAAS,CAAC;AAEpC,SAASC,QAAQA,CAACC,GAAW,EAAEC,GAAW,EAAE;EAC1C,IAAIJ,UAAU,CAACK,GAAG,CAACF,GAAG,CAAC,EAAE;EACzBH,UAAU,CAACM,GAAG,CAACH,GAAG,CAAC;EACnBJ,GAAG,CAACQ,IAAI,CAACH,GAAG,CAAC;AACf;AAEA,OAAO,SAASI,oBAAoBA,CAClCC,IAAY,EACZC,SAAiB,EAC4B;EAC7C,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACH,IAAI,CAAC,IAAIA,IAAI,GAAG,CAAC,EAAE;IACtCP,QAAQ,CAAC,QAAQO,IAAI,EAAE,EAAE,sBAAsBA,IAAI,QAAQ,CAAC;EAC9D;EACA,IAAI,CAACE,MAAM,CAACC,QAAQ,CAACF,SAAS,CAAC,IAAIA,SAAS,IAAI,CAAC,EAAE;IACjDR,QAAQ,CACN,aAAaQ,SAAS,EAAE,EACxB,uBAAuBA,SAAS,iBAClC,CAAC;EACH;EACA,OAAO;IACLG,QAAQ,EAAEF,MAAM,CAACC,QAAQ,CAACH,IAAI,CAAC,IAAIA,IAAI,GAAG,CAAC,GAAGA,IAAI,GAAG,CAAC;IACtDK,aAAa,EAAEH,MAAM,CAACC,QAAQ,CAACF,SAAS,CAAC,IAAIA,SAAS,GAAG,CAAC,GAAGA,SAAS,GAAG;EAC3E,CAAC;AACH","ignoreList":[]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { View } from 'react-native';
|
|
5
|
-
import { useColors } from "../../../theme/index.js";
|
|
5
|
+
import { r, useColors } from "../../../theme/index.js";
|
|
6
6
|
import { Icon } from "../Icon/index.js";
|
|
7
7
|
import { PulseDot } from "../Pulse/index.js";
|
|
8
8
|
import { paletteFor, styles } from "./styles.js";
|
|
@@ -11,10 +11,18 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
11
11
|
* 任务列表 / 推理链通用的状态圆点。
|
|
12
12
|
* done = 绿底 + 白勾;active = 边框 + 内部 PulseDot;pending = 仅边框。
|
|
13
13
|
*/
|
|
14
|
+
// status 派生默认 a11y label —— 不传时 SR 仍能播报状态语义。
|
|
15
|
+
const DEFAULT_A11Y = {
|
|
16
|
+
pending: 'pending',
|
|
17
|
+
active: 'active',
|
|
18
|
+
done: 'done'
|
|
19
|
+
};
|
|
14
20
|
export function StatusDot({
|
|
15
21
|
status,
|
|
16
|
-
size = 16,
|
|
22
|
+
size = r(16),
|
|
17
23
|
tone = 'flat',
|
|
24
|
+
accessibilityLabel,
|
|
25
|
+
style,
|
|
18
26
|
testID
|
|
19
27
|
}) {
|
|
20
28
|
const c = useColors();
|
|
@@ -22,6 +30,8 @@ export function StatusDot({
|
|
|
22
30
|
bg,
|
|
23
31
|
border
|
|
24
32
|
} = paletteFor(status, tone, c);
|
|
33
|
+
// [L-14] 优先用 caller 传入值;空字符串表示由容器负责播报,不派生默认。
|
|
34
|
+
const a11yLabel = accessibilityLabel !== undefined ? accessibilityLabel || undefined : DEFAULT_A11Y[status];
|
|
25
35
|
return /*#__PURE__*/_jsx(View, {
|
|
26
36
|
style: [styles.dot, {
|
|
27
37
|
width: size,
|
|
@@ -29,14 +39,21 @@ export function StatusDot({
|
|
|
29
39
|
borderRadius: size / 2,
|
|
30
40
|
backgroundColor: bg,
|
|
31
41
|
borderColor: border
|
|
32
|
-
}],
|
|
42
|
+
}, style],
|
|
43
|
+
accessible: !!a11yLabel,
|
|
44
|
+
accessibilityLabel: a11yLabel,
|
|
33
45
|
testID: testID,
|
|
34
46
|
children: status === 'done' ? /*#__PURE__*/_jsx(Icon, {
|
|
35
47
|
name: "check",
|
|
36
48
|
size: Math.round(size * 0.6),
|
|
37
49
|
color: c.onPrimary,
|
|
38
50
|
strokeWidth: 2.5
|
|
39
|
-
}) : status === 'active' ?
|
|
51
|
+
}) : status === 'active' ?
|
|
52
|
+
/*#__PURE__*/
|
|
53
|
+
// [L-13] size 随外圈等比派生(系数 0.375 ≈ 6/16),视觉居中且不溢出。
|
|
54
|
+
_jsx(PulseDot, {
|
|
55
|
+
size: Math.round(size * 0.375)
|
|
56
|
+
}) : null
|
|
40
57
|
});
|
|
41
58
|
}
|
|
42
59
|
//# sourceMappingURL=StatusDot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","useColors","Icon","PulseDot","paletteFor","styles","jsx","_jsx","StatusDot","status","size","tone","testID","c","bg","border","
|
|
1
|
+
{"version":3,"names":["React","View","r","useColors","Icon","PulseDot","paletteFor","styles","jsx","_jsx","DEFAULT_A11Y","pending","active","done","StatusDot","status","size","tone","accessibilityLabel","style","testID","c","bg","border","a11yLabel","undefined","dot","width","height","borderRadius","backgroundColor","borderColor","accessible","children","name","Math","round","color","onPrimary","strokeWidth"],"sourceRoot":"../../../../../src","sources":["components/ui/StatusDot/StatusDot.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,CAAC,EAAEC,SAAS,QAAQ,yBAAgB;AAC7C,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,QAAQ,QAAQ,mBAAU;AACnC,SAASC,UAAU,EAAEC,MAAM,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG9C;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAoC,GAAG;EAC3CC,OAAO,EAAE,SAAS;EAClBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE;AACR,CAAC;AAED,OAAO,SAASC,SAASA,CAAC;EACxBC,MAAM;EACNC,IAAI,GAAGd,CAAC,CAAC,EAAE,CAAC;EACZe,IAAI,GAAG,MAAM;EACbC,kBAAkB;EAClBC,KAAK;EACLC;AACc,CAAC,EAAqB;EACpC,MAAMC,CAAC,GAAGlB,SAAS,CAAC,CAAC;EACrB,MAAM;IAAEmB,EAAE;IAAEC;EAAO,CAAC,GAAGjB,UAAU,CAACS,MAAM,EAAEE,IAAI,EAAEI,CAAC,CAAC;EAClD;EACA,MAAMG,SAAS,GACbN,kBAAkB,KAAKO,SAAS,GAC5BP,kBAAkB,IAAIO,SAAS,GAC/Bf,YAAY,CAACK,MAAM,CAAC;EAE1B,oBACEN,IAAA,CAACR,IAAI;IACHkB,KAAK,EAAE,CACLZ,MAAM,CAACmB,GAAG,EACV;MACEC,KAAK,EAAEX,IAAI;MACXY,MAAM,EAAEZ,IAAI;MACZa,YAAY,EAAEb,IAAI,GAAG,CAAC;MACtBc,eAAe,EAAER,EAAE;MACnBS,WAAW,EAAER;IACf,CAAC,EACDJ,KAAK,CACL;IACFa,UAAU,EAAE,CAAC,CAACR,SAAU;IACxBN,kBAAkB,EAAEM,SAAU;IAC9BJ,MAAM,EAAEA,MAAO;IAAAa,QAAA,EAEdlB,MAAM,KAAK,MAAM,gBAChBN,IAAA,CAACL,IAAI;MACH8B,IAAI,EAAC,OAAO;MACZlB,IAAI,EAAEmB,IAAI,CAACC,KAAK,CAACpB,IAAI,GAAG,GAAG,CAAE;MAC7BqB,KAAK,EAAEhB,CAAC,CAACiB,SAAU;MACnBC,WAAW,EAAE;IAAI,CAClB,CAAC,GACAxB,MAAM,KAAK,QAAQ;IAAA;IACrB;IACAN,IAAA,CAACJ,QAAQ;MAACW,IAAI,EAAEmB,IAAI,CAACC,KAAK,CAACpB,IAAI,GAAG,KAAK;IAAE,CAAE,CAAC,GAC1C;EAAI,CACJ,CAAC;AAEX","ignoreList":[]}
|
|
@@ -16,7 +16,7 @@ export const styles = StyleSheet.create({
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
/** StatusDot 颜色推导:status × tone → { bg, border } 二色,全走 ColorTokens。
|
|
19
|
-
*
|
|
19
|
+
* 与 Tag/Button 的 paletteFor 同约定(状态入参 + ColorTokens → 配色对象),多一维 tone。
|
|
20
20
|
* `flat` = pending/active 底色透明;`soft` = pending 走 surface、active 走 primaryContainer。 */
|
|
21
21
|
export function paletteFor(status, tone, c) {
|
|
22
22
|
switch (status) {
|