@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,6 +1,7 @@
|
|
|
1
1
|
import React, { type ComponentRef, forwardRef, useState } from 'react';
|
|
2
2
|
import { Text, TextInput, View } from 'react-native';
|
|
3
|
-
import { control, space, useColors, useThemedStyles } from '../../../theme';
|
|
3
|
+
import { control, r, space, useColors, useThemedStyles } from '../../../theme';
|
|
4
|
+
import { childTestID } from '../../../utils/testID';
|
|
4
5
|
import { makeStyles } from './styles';
|
|
5
6
|
import type { TextFieldBaseProps } from './types';
|
|
6
7
|
|
|
@@ -26,7 +27,8 @@ export const TextFieldBase = forwardRef<TextInputRef, TextFieldBaseProps>(
|
|
|
26
27
|
{
|
|
27
28
|
multiline = false,
|
|
28
29
|
height = control.lg,
|
|
29
|
-
minHeight
|
|
30
|
+
// [L-81] multiline minHeight 裸 96 → r(96),随设备缩放
|
|
31
|
+
minHeight = r(96),
|
|
30
32
|
maxHeight,
|
|
31
33
|
leading,
|
|
32
34
|
trailing,
|
|
@@ -37,6 +39,7 @@ export const TextFieldBase = forwardRef<TextInputRef, TextFieldBaseProps>(
|
|
|
37
39
|
value,
|
|
38
40
|
onFocus,
|
|
39
41
|
onBlur,
|
|
42
|
+
onChangeText,
|
|
40
43
|
testID,
|
|
41
44
|
...rest
|
|
42
45
|
},
|
|
@@ -45,8 +48,15 @@ export const TextFieldBase = forwardRef<TextInputRef, TextFieldBaseProps>(
|
|
|
45
48
|
const c = useColors();
|
|
46
49
|
const styles = useThemedStyles(makeStyles);
|
|
47
50
|
const [focused, setFocused] = useState(false);
|
|
48
|
-
|
|
51
|
+
// [M-9] 内部镜像 state:非受控场景 value 不传,用 _mirror 做 hasValue 判断
|
|
52
|
+
const [_mirror, setMirror] = useState('');
|
|
53
|
+
// [M-9] filled 在受控 value 和内部镜像 state 之间取 hasValue,
|
|
54
|
+
// 保证非受控场景 filled 视觉态能正确响应用户输入,且受控用法行为不变
|
|
55
|
+
const filled =
|
|
56
|
+
value != null ? String(value).length > 0 : _mirror.length > 0;
|
|
49
57
|
const isEditable = disabled ? false : editable;
|
|
58
|
+
// [L-31] editable=false(非 disabled)时也应进入 disabled a11y state
|
|
59
|
+
const isDisabledA11y = disabled || editable === false;
|
|
50
60
|
|
|
51
61
|
// 视觉态优先级:error > focused > filled > idle。
|
|
52
62
|
// active 三态(focus/filled/error)共享 wrapActive 白底,各自只覆 borderColor 差量。
|
|
@@ -79,6 +89,11 @@ export const TextFieldBase = forwardRef<TextInputRef, TextFieldBaseProps>(
|
|
|
79
89
|
{...rest}
|
|
80
90
|
editable={isEditable}
|
|
81
91
|
value={value}
|
|
92
|
+
onChangeText={(text) => {
|
|
93
|
+
// [M-9] 同步内部镜像,非受控场景 filled 视觉态依赖此 state
|
|
94
|
+
setMirror(text);
|
|
95
|
+
onChangeText?.(text);
|
|
96
|
+
}}
|
|
82
97
|
multiline={multiline}
|
|
83
98
|
onFocus={(e) => {
|
|
84
99
|
setFocused(true);
|
|
@@ -97,12 +112,22 @@ export const TextFieldBase = forwardRef<TextInputRef, TextFieldBaseProps>(
|
|
|
97
112
|
},
|
|
98
113
|
]}
|
|
99
114
|
placeholderTextColor={c.foregroundSubtle}
|
|
100
|
-
|
|
101
|
-
|
|
115
|
+
// [L-31] editable=false 并入 disabled a11y state,SR 能正确播报不可编辑
|
|
116
|
+
accessibilityState={isDisabledA11y ? { disabled: true } : undefined}
|
|
117
|
+
testID={childTestID(testID, 'input')}
|
|
102
118
|
/>
|
|
103
119
|
{trailing != null ? <View>{trailing}</View> : null}
|
|
104
120
|
</View>
|
|
105
|
-
{error
|
|
121
|
+
{/* [L-31] error Text 补 accessibilityLiveRegion="polite" —— 错误出现时 SR 自动播报 */}
|
|
122
|
+
{error ? (
|
|
123
|
+
<Text
|
|
124
|
+
style={styles.errorMsg}
|
|
125
|
+
accessibilityLiveRegion="polite"
|
|
126
|
+
testID={childTestID(testID, 'error')}
|
|
127
|
+
>
|
|
128
|
+
{error}
|
|
129
|
+
</Text>
|
|
130
|
+
) : null}
|
|
106
131
|
</View>
|
|
107
132
|
);
|
|
108
133
|
}
|
|
@@ -15,7 +15,8 @@ export type TextareaProps = Omit<
|
|
|
15
15
|
leading?: ReactNode;
|
|
16
16
|
/** 可选的后置插槽(如字符计数器) */
|
|
17
17
|
trailing?: ReactNode;
|
|
18
|
-
/** 错误信息 ——
|
|
18
|
+
/** 错误信息 —— 容器进入错误态并在下方显示。
|
|
19
|
+
* 空串 `""` / undefined 都不进 error 态(truthy 判定),与 TextFieldBase 保持一致。[L-96] */
|
|
19
20
|
error?: string;
|
|
20
21
|
/** 最小高度,默认 96(约 5 行) */
|
|
21
22
|
minHeight?: number;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Image, View } from 'react-native';
|
|
3
3
|
import { useThemedStyles } from '../../../theme';
|
|
4
|
-
import {
|
|
4
|
+
import { createLogger } from '../../../utils/logger';
|
|
5
|
+
import { makeStyles, RING_EXTRA_RADIUS, sizingFor } from './styles';
|
|
5
6
|
import type { ThumbnailProps } from './types';
|
|
6
7
|
|
|
8
|
+
const log = createLogger('Thumbnail');
|
|
9
|
+
|
|
7
10
|
/** 缩略图基础组件 —— 列表 / 卡片 / chat 行内通用 16:9.5 小图。
|
|
8
11
|
*
|
|
9
12
|
* 尺寸阶梯:sm / md(默认 113×67)/ lg,与 NewsList / NewsArea 历史一致。
|
|
@@ -26,7 +29,12 @@ export function Thumbnail({
|
|
|
26
29
|
testID,
|
|
27
30
|
}: ThumbnailProps): React.JSX.Element | null {
|
|
28
31
|
const styles = useThemedStyles(makeStyles);
|
|
29
|
-
if (!uri && !source)
|
|
32
|
+
if (!uri && !source) {
|
|
33
|
+
// [L-18] uri/source 均未传:一次性告警,返回 null 而非空白区域。
|
|
34
|
+
// types 注释已说明二选一语义;此 warn 用于开发期快速定位漏传。
|
|
35
|
+
log.warn('Thumbnail: uri 和 source 均未提供,组件将渲染为 null');
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
30
38
|
const dim = sizingFor(size);
|
|
31
39
|
const image = (
|
|
32
40
|
<Image
|
|
@@ -42,7 +50,10 @@ export function Thumbnail({
|
|
|
42
50
|
// ring 容器:borderRadius 比 image 大 (border + padding) 才能贴合包裹外圈
|
|
43
51
|
return (
|
|
44
52
|
<View
|
|
45
|
-
style={[
|
|
53
|
+
style={[
|
|
54
|
+
styles.ring,
|
|
55
|
+
{ borderRadius: dim.borderRadius + RING_EXTRA_RADIUS },
|
|
56
|
+
]}
|
|
46
57
|
testID={testID}
|
|
47
58
|
>
|
|
48
59
|
{image}
|
|
@@ -2,6 +2,10 @@ import { StyleSheet } from 'react-native';
|
|
|
2
2
|
import { r, type ColorTokens } from '../../../theme';
|
|
3
3
|
import type { ThumbnailSize } from './types';
|
|
4
4
|
|
|
5
|
+
/** [L-94] ring 圆角外展量:border(2) + padding(1) = 3pt,让外圈圆角贴合内圆角。
|
|
6
|
+
* Thumbnail.tsx 侧用此常量替代魔数 `+ 3`。 */
|
|
7
|
+
export const RING_EXTRA_RADIUS = r(2) + r(1); // border + padding
|
|
8
|
+
|
|
5
9
|
/** Thumbnail 静态样式 ——
|
|
6
10
|
* - `base`:Image 占位色,加载中 / 失败时不至于空白
|
|
7
11
|
* - `ring`:`selected` 态的外圈品牌色描边,padding 抵消 ring 与 image 之间留 1pt gap */
|
|
@@ -11,9 +15,9 @@ export const makeStyles = (c: ColorTokens) =>
|
|
|
11
15
|
backgroundColor: c.surfaceContainer,
|
|
12
16
|
},
|
|
13
17
|
ring: {
|
|
14
|
-
borderWidth: 2,
|
|
18
|
+
borderWidth: r(2),
|
|
15
19
|
borderColor: c.primary,
|
|
16
|
-
padding: 1,
|
|
20
|
+
padding: r(1),
|
|
17
21
|
},
|
|
18
22
|
});
|
|
19
23
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
1
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { AccessibilityInfo, Text, View } from 'react-native';
|
|
3
3
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
4
|
import Animated, {
|
|
5
5
|
cancelAnimation,
|
|
@@ -9,6 +9,7 @@ import Animated, {
|
|
|
9
9
|
withTiming,
|
|
10
10
|
} from 'react-native-reanimated';
|
|
11
11
|
import { useColors, useThemedStyles, motion, space } from '../../../theme';
|
|
12
|
+
import { childTestID } from '../../../utils/testID';
|
|
12
13
|
import { dotColorFor, makeStyles } from './styles';
|
|
13
14
|
import { _subs } from './toast';
|
|
14
15
|
import type { Subscriber, ToastEntry, ToastHostProps } from './types';
|
|
@@ -42,8 +43,18 @@ export function ToastHost({
|
|
|
42
43
|
};
|
|
43
44
|
}, []);
|
|
44
45
|
|
|
46
|
+
// 退场完成只清「仍是自己」的 entry:withTiming 完成回调经 runOnJS 跨线程异步投递,
|
|
47
|
+
// 投递到执行之间若来了新 toast,无 id 守卫的 setEntry(null) 会把新 toast 瞬时清掉([M-14])。
|
|
48
|
+
const dismissIfCurrent = useCallback((id: number) => {
|
|
49
|
+
setEntry((cur) => (cur?.id === id ? null : cur));
|
|
50
|
+
}, []);
|
|
51
|
+
|
|
45
52
|
useEffect(() => {
|
|
46
53
|
if (!entry) return;
|
|
54
|
+
// [M-15] toast 出现时主动播报 —— 容器 pointerEvents="none" + 3s 自动消失,
|
|
55
|
+
// SR 用户对一闪而过的反馈本无任何感知通道。
|
|
56
|
+
AccessibilityInfo.announceForAccessibility(entry.message);
|
|
57
|
+
const id = entry.id;
|
|
47
58
|
// 进入方向:top 从上(-8)滑入,bottom / center 从下(8)滑入
|
|
48
59
|
const from = entry.position === 'top' ? -8 : 8;
|
|
49
60
|
cancelAnimation(op);
|
|
@@ -56,7 +67,7 @@ export function ToastHost({
|
|
|
56
67
|
dismissTimer.current = setTimeout(() => {
|
|
57
68
|
op.value = withTiming(0, { duration: motion.base });
|
|
58
69
|
ty.value = withTiming(from, { duration: motion.base }, (finished) => {
|
|
59
|
-
if (finished) runOnJS(
|
|
70
|
+
if (finished) runOnJS(dismissIfCurrent)(id);
|
|
60
71
|
});
|
|
61
72
|
}, entry.duration);
|
|
62
73
|
|
|
@@ -65,7 +76,7 @@ export function ToastHost({
|
|
|
65
76
|
cancelAnimation(op);
|
|
66
77
|
cancelAnimation(ty);
|
|
67
78
|
};
|
|
68
|
-
}, [entry, op, ty]);
|
|
79
|
+
}, [entry, op, ty, dismissIfCurrent]);
|
|
69
80
|
|
|
70
81
|
const animatedStyle = useAnimatedStyle(() => ({
|
|
71
82
|
opacity: op.value,
|
|
@@ -90,10 +101,7 @@ export function ToastHost({
|
|
|
90
101
|
{dotColor ? (
|
|
91
102
|
<View style={[styles.dot, { backgroundColor: dotColor }]} />
|
|
92
103
|
) : null}
|
|
93
|
-
<Text
|
|
94
|
-
style={styles.text}
|
|
95
|
-
testID={testID ? `${testID}-text` : undefined}
|
|
96
|
-
>
|
|
104
|
+
<Text style={styles.text} testID={childTestID(testID, 'text')}>
|
|
97
105
|
{entry.message}
|
|
98
106
|
</Text>
|
|
99
107
|
</Animated.View>
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { Text, View } from 'react-native';
|
|
3
|
-
import {
|
|
2
|
+
import { AccessibilityInfo, Text, View } from 'react-native';
|
|
3
|
+
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
4
|
+
import {
|
|
5
|
+
motion,
|
|
6
|
+
space,
|
|
7
|
+
useColors,
|
|
8
|
+
usePrefersReducedMotion,
|
|
9
|
+
useThemedStyles,
|
|
10
|
+
} from '../../../theme';
|
|
4
11
|
import { dotColorFor, makeStyles } from './styles';
|
|
5
12
|
import { _subs } from './toast';
|
|
6
13
|
import type { Subscriber, ToastEntry, ToastHostProps } from './types';
|
|
@@ -20,6 +27,8 @@ export function ToastHost({
|
|
|
20
27
|
}: ToastHostProps = {}): React.JSX.Element | null {
|
|
21
28
|
const c = useColors();
|
|
22
29
|
const styles = useThemedStyles(makeStyles);
|
|
30
|
+
const insets = useSafeAreaInsets();
|
|
31
|
+
const reduced = usePrefersReducedMotion();
|
|
23
32
|
const [entry, setEntry] = useState<ToastEntry | null>(null);
|
|
24
33
|
const [visible, setVisible] = useState(false);
|
|
25
34
|
const dismissTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
@@ -39,6 +48,8 @@ export function ToastHost({
|
|
|
39
48
|
useEffect(() => {
|
|
40
49
|
// entry=null:上一轮 effect 的 cleanup 已清 timer/RAF,这里无需重复。
|
|
41
50
|
if (!entry) return;
|
|
51
|
+
// [M-15] web 同样主动播报(RN-Web announceForAccessibility 注入 aria-live region)。
|
|
52
|
+
AccessibilityInfo.announceForAccessibility(entry.message);
|
|
42
53
|
|
|
43
54
|
// cancelled 标志:entry 快速连续切换 / 组件卸载时,cleanup 置 true。RAF 与
|
|
44
55
|
// timer 回调执行前都检查它 —— cancelAnimationFrame 在部分浏览器不保证取消
|
|
@@ -77,15 +88,26 @@ export function ToastHost({
|
|
|
77
88
|
|
|
78
89
|
if (!entry) return null;
|
|
79
90
|
|
|
91
|
+
// 位置:top=顶部(safe-area + 间距)/ center=屏幕居中 / bottom=底部(默认),复刻 native 版。
|
|
92
|
+
// 此前 web 完全未注入定位,position 参数被静默忽略、垂直位置随挂载次序漂移([H-6])。
|
|
93
|
+
const posStyle =
|
|
94
|
+
entry.position === 'top'
|
|
95
|
+
? { top: insets.top + space[10] }
|
|
96
|
+
: entry.position === 'center'
|
|
97
|
+
? { top: 0, bottom: 0, justifyContent: 'center' as const }
|
|
98
|
+
: { bottom: insets.bottom + space[10] };
|
|
99
|
+
|
|
80
100
|
const dotColor = dotColorFor(entry.kind, c);
|
|
81
101
|
const animatedWebStyle: React.CSSProperties = {
|
|
82
102
|
opacity: visible ? 1 : 0,
|
|
83
103
|
transform: visible ? 'translateY(0px)' : 'translateY(8px)',
|
|
84
|
-
transition:
|
|
104
|
+
transition: reduced
|
|
105
|
+
? 'none'
|
|
106
|
+
: `opacity ${motion.base}ms ease-out, transform ${motion.base}ms ease-out`,
|
|
85
107
|
};
|
|
86
108
|
|
|
87
109
|
return (
|
|
88
|
-
<View style={styles.host} pointerEvents="none" testID={testID}>
|
|
110
|
+
<View style={[styles.host, posStyle]} pointerEvents="none" testID={testID}>
|
|
89
111
|
<div style={animatedWebStyle}>
|
|
90
112
|
<View style={styles.toast}>
|
|
91
113
|
{dotColor ? (
|
|
@@ -14,6 +14,8 @@ export const makeStyles = (c: ColorTokens) =>
|
|
|
14
14
|
// zIndex: toast 浮层 —— 盖在 Screen 内容之上(navigator / overlay 之下)。
|
|
15
15
|
// 同级兄弟节点无 z 顺序需求,但作为 absolute 浮岛对其他屏内 absolute 节点
|
|
16
16
|
// 需要显式 200 抢占,保留并锁数值。
|
|
17
|
+
// 注意:confirm() 的原生 Modal 是 window 级,永远盖在 toast 之上 —— confirm
|
|
18
|
+
// 打开期间到达的 toast 不可见,勿把 toast 当作 confirm 显示期间的反馈通道。
|
|
17
19
|
zIndex: 200,
|
|
18
20
|
},
|
|
19
21
|
toast: {
|
|
@@ -3,22 +3,55 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 文件名故意小写 `toast.ts`,host 组件叫 `ToastHost.tsx`,避免 APFS 大小写冲突。
|
|
5
5
|
*/
|
|
6
|
+
import { createLogger } from '../../../utils/logger';
|
|
6
7
|
import type { Subscriber, ToastEntry, ToastInput, ToastKind } from './types';
|
|
7
8
|
|
|
9
|
+
const log = createLogger('toast');
|
|
10
|
+
|
|
8
11
|
let _id = 0;
|
|
9
12
|
export const _subs = new Set<Subscriber>();
|
|
10
13
|
|
|
14
|
+
const DEFAULT_DURATION = 3000;
|
|
15
|
+
// [L-55] duration 合法域:[1, 2^31)。INT32_MAX = 2^31-1 = 2147483647,
|
|
16
|
+
// setTimeout 内部用 int32 存储,超出会溢出变成 0 立即触发。
|
|
17
|
+
const MAX_DURATION = 2147483647;
|
|
18
|
+
|
|
19
|
+
/** [L-55] 钳制 duration 到 [1, 2^31),域外回落 DEFAULT_DURATION 并 dev warn。 */
|
|
20
|
+
function clampDuration(raw: number | undefined): number {
|
|
21
|
+
if (raw == null) return DEFAULT_DURATION;
|
|
22
|
+
if (!Number.isFinite(raw) || raw < 1 || raw >= MAX_DURATION) {
|
|
23
|
+
log.warn(
|
|
24
|
+
`toast duration(${raw}) 超出合法域 [1, 2^31),已回落 ${DEFAULT_DURATION}ms。`
|
|
25
|
+
);
|
|
26
|
+
return DEFAULT_DURATION;
|
|
27
|
+
}
|
|
28
|
+
return Math.trunc(raw);
|
|
29
|
+
}
|
|
30
|
+
|
|
11
31
|
function emit(input: ToastInput, kind: ToastKind = 'info') {
|
|
12
32
|
const entry: ToastEntry =
|
|
13
33
|
typeof input === 'string'
|
|
14
|
-
? {
|
|
34
|
+
? {
|
|
35
|
+
id: ++_id,
|
|
36
|
+
message: input,
|
|
37
|
+
kind,
|
|
38
|
+
duration: DEFAULT_DURATION,
|
|
39
|
+
position: 'bottom',
|
|
40
|
+
}
|
|
15
41
|
: {
|
|
16
42
|
id: ++_id,
|
|
17
43
|
message: input.message,
|
|
18
44
|
kind: input.kind ?? kind,
|
|
19
|
-
duration: input.duration
|
|
45
|
+
duration: clampDuration(input.duration),
|
|
20
46
|
position: input.position ?? 'bottom',
|
|
21
47
|
};
|
|
48
|
+
// 未挂 <ToastHost />:消息无人接收,告警提示集成漏挂(对照 confirm 重入告警的纪律)。
|
|
49
|
+
if (_subs.size === 0) {
|
|
50
|
+
log.warn(
|
|
51
|
+
'toast() 调用时未挂载 <ToastHost />,消息被丢弃。请在 app 根附近挂一次 <ToastHost />。'
|
|
52
|
+
);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
22
55
|
_subs.forEach((s) => s(entry));
|
|
23
56
|
}
|
|
24
57
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import {
|
|
3
|
+
fw,
|
|
4
|
+
r,
|
|
5
|
+
radius,
|
|
6
|
+
space,
|
|
7
|
+
type as t,
|
|
8
|
+
type ColorTokens,
|
|
9
|
+
} from '../../../theme';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* 角标样式工厂 —— Grid/TabBar 等组件图标右上角小红点共用。
|
|
13
|
+
* @param c 颜色 token
|
|
14
|
+
* @param top 角标纵向偏移(不同场景基点不同:Grid 图标 r(-6) / TabBar 图标 r(-3))
|
|
15
|
+
*/
|
|
16
|
+
export const badgeStyles = (c: ColorTokens, top: number) =>
|
|
17
|
+
StyleSheet.create({
|
|
18
|
+
badge: {
|
|
19
|
+
position: 'absolute',
|
|
20
|
+
top,
|
|
21
|
+
right: r(-10),
|
|
22
|
+
minWidth: r(16),
|
|
23
|
+
height: r(16),
|
|
24
|
+
borderRadius: radius.md,
|
|
25
|
+
backgroundColor: c.error,
|
|
26
|
+
paddingHorizontal: space[1],
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
},
|
|
30
|
+
badgeText: {
|
|
31
|
+
color: c.onError,
|
|
32
|
+
fontSize: t.nano,
|
|
33
|
+
fontWeight: fw.bold,
|
|
34
|
+
lineHeight: 12,
|
|
35
|
+
},
|
|
36
|
+
});
|
package/src/icons/data.ts
CHANGED
|
@@ -16,6 +16,7 @@ export type IconName =
|
|
|
16
16
|
| 'attachment'
|
|
17
17
|
| 'bag-check'
|
|
18
18
|
| 'bell'
|
|
19
|
+
| 'bluetooth'
|
|
19
20
|
| 'bot'
|
|
20
21
|
| 'box-list'
|
|
21
22
|
| 'box-up'
|
|
@@ -166,6 +167,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
166
167
|
cy: 16.3,
|
|
167
168
|
r: 0.95,
|
|
168
169
|
fill: 'currentColor',
|
|
170
|
+
stroke: 'none',
|
|
169
171
|
},
|
|
170
172
|
],
|
|
171
173
|
},
|
|
@@ -235,6 +237,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
235
237
|
{
|
|
236
238
|
kind: 'path',
|
|
237
239
|
d: 'M6 10v4M10 10v4M14 10v4M18 10v4',
|
|
240
|
+
opacity: 0.55,
|
|
238
241
|
},
|
|
239
242
|
],
|
|
240
243
|
},
|
|
@@ -252,6 +255,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
252
255
|
{
|
|
253
256
|
kind: 'path',
|
|
254
257
|
d: 'M8 10v4M12 10v4M16 10v4',
|
|
258
|
+
opacity: 0.55,
|
|
255
259
|
},
|
|
256
260
|
],
|
|
257
261
|
},
|
|
@@ -294,6 +298,15 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
294
298
|
},
|
|
295
299
|
],
|
|
296
300
|
},
|
|
301
|
+
'bluetooth': {
|
|
302
|
+
strokeWidth: 1.75,
|
|
303
|
+
elements: [
|
|
304
|
+
{
|
|
305
|
+
kind: 'path',
|
|
306
|
+
d: 'm7 7 10 10-5 5V2l5 5L7 17',
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
},
|
|
297
310
|
'bot': {
|
|
298
311
|
strokeWidth: 1.75,
|
|
299
312
|
elements: [
|
|
@@ -459,6 +472,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
459
472
|
cy: 13,
|
|
460
473
|
r: 0.9,
|
|
461
474
|
fill: 'currentColor',
|
|
475
|
+
stroke: 'none',
|
|
462
476
|
},
|
|
463
477
|
{
|
|
464
478
|
kind: 'circle',
|
|
@@ -466,6 +480,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
466
480
|
cy: 13,
|
|
467
481
|
r: 0.9,
|
|
468
482
|
fill: 'currentColor',
|
|
483
|
+
stroke: 'none',
|
|
469
484
|
},
|
|
470
485
|
{
|
|
471
486
|
kind: 'circle',
|
|
@@ -473,6 +488,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
473
488
|
cy: 13,
|
|
474
489
|
r: 0.9,
|
|
475
490
|
fill: 'currentColor',
|
|
491
|
+
stroke: 'none',
|
|
476
492
|
},
|
|
477
493
|
{
|
|
478
494
|
kind: 'circle',
|
|
@@ -480,6 +496,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
480
496
|
cy: 17,
|
|
481
497
|
r: 0.9,
|
|
482
498
|
fill: 'currentColor',
|
|
499
|
+
stroke: 'none',
|
|
483
500
|
},
|
|
484
501
|
{
|
|
485
502
|
kind: 'circle',
|
|
@@ -487,6 +504,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
487
504
|
cy: 17,
|
|
488
505
|
r: 0.9,
|
|
489
506
|
fill: 'currentColor',
|
|
507
|
+
stroke: 'none',
|
|
490
508
|
},
|
|
491
509
|
{
|
|
492
510
|
kind: 'circle',
|
|
@@ -494,6 +512,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
494
512
|
cy: 17,
|
|
495
513
|
r: 0.9,
|
|
496
514
|
fill: 'currentColor',
|
|
515
|
+
stroke: 'none',
|
|
497
516
|
},
|
|
498
517
|
],
|
|
499
518
|
},
|
|
@@ -880,6 +899,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
880
899
|
kind: 'path',
|
|
881
900
|
d: 'M8.8 11.4v1.2l3.4 1.3V10.1z',
|
|
882
901
|
fill: 'currentColor',
|
|
902
|
+
stroke: 'none',
|
|
883
903
|
},
|
|
884
904
|
{
|
|
885
905
|
kind: 'path',
|
|
@@ -910,6 +930,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
910
930
|
kind: 'path',
|
|
911
931
|
d: 'M12 8.5l1.2 2.42 2.68.39-1.94 1.89.46 2.67L12 14.61l-2.4 1.26.46-2.67L8.12 11.31l2.68-.39z',
|
|
912
932
|
fill: 'currentColor',
|
|
933
|
+
stroke: 'none',
|
|
913
934
|
},
|
|
914
935
|
],
|
|
915
936
|
},
|
|
@@ -983,6 +1004,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
983
1004
|
cy: 20,
|
|
984
1005
|
r: 0.7,
|
|
985
1006
|
fill: 'currentColor',
|
|
1007
|
+
stroke: 'none',
|
|
986
1008
|
},
|
|
987
1009
|
],
|
|
988
1010
|
},
|
|
@@ -1789,6 +1811,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
1789
1811
|
cy: 17.6,
|
|
1790
1812
|
r: 0.9,
|
|
1791
1813
|
fill: 'currentColor',
|
|
1814
|
+
stroke: 'none',
|
|
1792
1815
|
},
|
|
1793
1816
|
{
|
|
1794
1817
|
kind: 'path',
|
|
@@ -1939,6 +1962,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
1939
1962
|
height: 8,
|
|
1940
1963
|
rx: 2,
|
|
1941
1964
|
fill: 'currentColor',
|
|
1965
|
+
stroke: 'none',
|
|
1942
1966
|
},
|
|
1943
1967
|
],
|
|
1944
1968
|
},
|
|
@@ -1957,6 +1981,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
1957
1981
|
cy: 12,
|
|
1958
1982
|
r: 6,
|
|
1959
1983
|
fill: 'currentColor',
|
|
1984
|
+
stroke: 'none',
|
|
1960
1985
|
},
|
|
1961
1986
|
],
|
|
1962
1987
|
},
|
|
@@ -2059,6 +2084,8 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
2059
2084
|
width: 12,
|
|
2060
2085
|
height: 12,
|
|
2061
2086
|
rx: 1.5,
|
|
2087
|
+
fill: 'currentColor',
|
|
2088
|
+
stroke: 'none',
|
|
2062
2089
|
},
|
|
2063
2090
|
],
|
|
2064
2091
|
},
|
|
@@ -2091,6 +2118,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
2091
2118
|
kind: 'path',
|
|
2092
2119
|
d: 'M19.2 2.5l.55 1.55 1.55.55-1.55.55-.55 1.55-.55-1.55-1.55-.55 1.55-.55z',
|
|
2093
2120
|
fill: 'currentColor',
|
|
2121
|
+
stroke: 'none',
|
|
2094
2122
|
},
|
|
2095
2123
|
],
|
|
2096
2124
|
},
|
|
@@ -2175,6 +2203,7 @@ export const ICONS: Record<IconName, IconDef> = {
|
|
|
2175
2203
|
cy: 16.5,
|
|
2176
2204
|
r: 0.75,
|
|
2177
2205
|
fill: 'currentColor',
|
|
2206
|
+
stroke: 'none',
|
|
2178
2207
|
},
|
|
2179
2208
|
],
|
|
2180
2209
|
},
|
|
@@ -2425,6 +2454,7 @@ export const ICON_NAMES: IconName[] = [
|
|
|
2425
2454
|
'attachment',
|
|
2426
2455
|
'bag-check',
|
|
2427
2456
|
'bell',
|
|
2457
|
+
'bluetooth',
|
|
2428
2458
|
'bot',
|
|
2429
2459
|
'box-list',
|
|
2430
2460
|
'box-up',
|
package/src/icons/types.ts
CHANGED
|
@@ -1,19 +1,34 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** 图标清单的稳定类型;几何与样式数据由 scripts/build-icons.js 生成。 */
|
|
2
|
+
|
|
3
|
+
/** 元素共享的可选样式属性(脚本从 svg 抽取,Icon 渲染端透传)。 */
|
|
4
|
+
type IconElementStyle = {
|
|
5
|
+
/** `currentColor` → 渲染时换成主题 stroke 色;缺省则继承 Svg 根的 `fill="none"`。 */
|
|
6
|
+
readonly fill?: string;
|
|
7
|
+
/** 元素不透明度(svg `opacity`),用于次要笔画(如格线 .55)。 */
|
|
8
|
+
readonly opacity?: number;
|
|
9
|
+
/** `'none'` = 该元素不描边(纯 fill 的圆点/方块),覆盖 Svg 根的 stroke 继承。 */
|
|
10
|
+
readonly stroke?: 'none';
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
// readonly 防止消费端原地改 ICONS 的元素数据污染模块级单例。
|
|
2
14
|
export type IconElement =
|
|
3
|
-
| { kind: 'path'; d: string
|
|
4
|
-
| { kind: 'circle'; cx: number; cy: number; r: number
|
|
5
|
-
|
|
15
|
+
| (Readonly<{ kind: 'path'; d: string }> & IconElementStyle)
|
|
16
|
+
| (Readonly<{ kind: 'circle'; cx: number; cy: number; r: number }> &
|
|
17
|
+
IconElementStyle)
|
|
18
|
+
| (Readonly<{
|
|
6
19
|
kind: 'rect';
|
|
7
20
|
x: number;
|
|
8
21
|
y: number;
|
|
9
22
|
width: number;
|
|
10
23
|
height: number;
|
|
24
|
+
// ry 未被 build-icons.js 抽取(脚本只取 rx),不在生成物中 —— 此处不声明,
|
|
25
|
+
// 保持类型与生成端契约一致,防渲染端出现永远不可达的 ry 分支。
|
|
11
26
|
rx?: number;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
27
|
+
}> &
|
|
28
|
+
IconElementStyle);
|
|
15
29
|
|
|
16
|
-
export type IconDef = {
|
|
30
|
+
export type IconDef = Readonly<{
|
|
17
31
|
strokeWidth: number;
|
|
18
|
-
elements
|
|
19
|
-
|
|
32
|
+
// readonly 数组:防止消费端 push/splice ICONS 的 elements 污染单例。
|
|
33
|
+
elements: readonly IconElement[];
|
|
34
|
+
}>;
|