@unif/react-native-design 0.20.0 → 0.21.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 +68 -12
- package/lib/module/components/business/AvatarWithRing/AvatarWithRing.js +4 -5
- package/lib/module/components/business/AvatarWithRing/AvatarWithRing.js.map +1 -1
- package/lib/module/components/business/AvatarWithRing/styles.js +10 -9
- package/lib/module/components/business/AvatarWithRing/styles.js.map +1 -1
- package/lib/module/components/business/VersionPill/VersionPill.js +32 -15
- package/lib/module/components/business/VersionPill/VersionPill.js.map +1 -1
- package/lib/module/components/business/VersionPill/content.js +30 -0
- package/lib/module/components/business/VersionPill/content.js.map +1 -0
- package/lib/module/components/business/VersionPill/styles.js +4 -0
- package/lib/module/components/business/VersionPill/styles.js.map +1 -1
- package/lib/module/components/business/useSvgId.js +17 -8
- package/lib/module/components/business/useSvgId.js.map +1 -1
- package/lib/module/components/ui/Avatar/Avatar.js +22 -29
- package/lib/module/components/ui/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/ui/Button/Button.js +40 -23
- package/lib/module/components/ui/Button/Button.js.map +1 -1
- package/lib/module/components/ui/Button/ButtonBase.js +13 -13
- package/lib/module/components/ui/Button/ButtonBase.js.map +1 -1
- package/lib/module/components/ui/Carousel/Carousel.js +68 -40
- package/lib/module/components/ui/Carousel/Carousel.js.map +1 -1
- package/lib/module/components/ui/Carousel/behavior.js +60 -0
- package/lib/module/components/ui/Carousel/behavior.js.map +1 -0
- package/lib/module/components/ui/Carousel/styles.js +6 -8
- package/lib/module/components/ui/Carousel/styles.js.map +1 -1
- package/lib/module/components/ui/Cell/Cell.js +76 -65
- package/lib/module/components/ui/Cell/Cell.js.map +1 -1
- package/lib/module/components/ui/Cell/Leading.js +11 -5
- package/lib/module/components/ui/Cell/Leading.js.map +1 -1
- package/lib/module/components/ui/Cell/content.js +34 -0
- package/lib/module/components/ui/Cell/content.js.map +1 -0
- package/lib/module/components/ui/Checkbox/Checkbox.js +25 -8
- package/lib/module/components/ui/Checkbox/Checkbox.js.map +1 -1
- package/lib/module/components/ui/Confirm/ConfirmHost.js +49 -25
- package/lib/module/components/ui/Confirm/ConfirmHost.js.map +1 -1
- package/lib/module/components/ui/Confirm/confirm.js +15 -29
- package/lib/module/components/ui/Confirm/confirm.js.map +1 -1
- package/lib/module/components/ui/Confirm/labels.js +10 -0
- package/lib/module/components/ui/Confirm/labels.js.map +1 -0
- package/lib/module/components/ui/Confirm/store.js +113 -0
- package/lib/module/components/ui/Confirm/store.js.map +1 -0
- package/lib/module/components/ui/Confirm/styles.js +4 -0
- package/lib/module/components/ui/Confirm/styles.js.map +1 -1
- package/lib/module/components/ui/DrawerHeader/DrawerHeader.js +17 -25
- package/lib/module/components/ui/DrawerHeader/DrawerHeader.js.map +1 -1
- package/lib/module/components/ui/Grid/Grid.js +26 -9
- package/lib/module/components/ui/Grid/Grid.js.map +1 -1
- package/lib/module/components/ui/Grid/accessibility.js +13 -0
- package/lib/module/components/ui/Grid/accessibility.js.map +1 -0
- package/lib/module/components/ui/IconButton/IconButton.js +16 -3
- package/lib/module/components/ui/IconButton/IconButton.js.map +1 -1
- package/lib/module/components/ui/Input/Input.js +8 -5
- package/lib/module/components/ui/Input/Input.js.map +1 -1
- package/lib/module/components/ui/Logo/Logo.js +22 -4
- package/lib/module/components/ui/Logo/Logo.js.map +1 -1
- package/lib/module/components/ui/NavBar/NavBar.js +23 -14
- package/lib/module/components/ui/NavBar/NavBar.js.map +1 -1
- package/lib/module/components/ui/NavBar/isSlot.js +297 -4
- package/lib/module/components/ui/NavBar/isSlot.js.map +1 -1
- package/lib/module/components/ui/PasswordInput/PasswordInput.js +61 -66
- package/lib/module/components/ui/PasswordInput/PasswordInput.js.map +1 -1
- package/lib/module/components/ui/Pulse/Pulse.js +1 -1
- package/lib/module/components/ui/Pulse/Pulse.js.map +1 -1
- package/lib/module/components/ui/Pulse/PulseDot.js +5 -7
- package/lib/module/components/ui/Pulse/PulseDot.js.map +1 -1
- package/lib/module/components/ui/Pulse/index.js +1 -1
- package/lib/module/components/ui/Pulse/index.js.map +1 -1
- package/lib/module/components/ui/Pulse/normalizePulseOptions.js +45 -0
- package/lib/module/components/ui/Pulse/normalizePulseOptions.js.map +1 -0
- package/lib/module/components/ui/Pulse/usePulse.js +61 -24
- package/lib/module/components/ui/Pulse/usePulse.js.map +1 -1
- package/lib/module/components/ui/Pulse/usePulseDriver.js +44 -0
- package/lib/module/components/ui/Pulse/usePulseDriver.js.map +1 -0
- package/lib/module/components/ui/Pulse/usePulseDriver.web.js +67 -0
- package/lib/module/components/ui/Pulse/usePulseDriver.web.js.map +1 -0
- package/lib/module/components/ui/Radio/Radio.js +31 -14
- package/lib/module/components/ui/Radio/Radio.js.map +1 -1
- package/lib/module/components/ui/Radio/RadioGroup.js +15 -2
- package/lib/module/components/ui/Radio/RadioGroup.js.map +1 -1
- package/lib/module/components/ui/Reveal/Reveal.js +4 -3
- package/lib/module/components/ui/Reveal/Reveal.js.map +1 -1
- package/lib/module/components/ui/Reveal/Reveal.web.js +55 -32
- package/lib/module/components/ui/Reveal/Reveal.web.js.map +1 -1
- package/lib/module/components/ui/Reveal/webTransition.js +157 -0
- package/lib/module/components/ui/Reveal/webTransition.js.map +1 -0
- package/lib/module/components/ui/Search/Search.js +85 -58
- package/lib/module/components/ui/Search/Search.js.map +1 -1
- package/lib/module/components/ui/Segmented/Segmented.js +4 -2
- package/lib/module/components/ui/Segmented/Segmented.js.map +1 -1
- package/lib/module/components/ui/Skeleton/Skeleton.js +5 -7
- package/lib/module/components/ui/Skeleton/Skeleton.js.map +1 -1
- package/lib/module/components/ui/Spinner/Spinner.js +18 -11
- package/lib/module/components/ui/Spinner/Spinner.js.map +1 -1
- package/lib/module/components/ui/Spinner/Spinner.web.js +18 -14
- package/lib/module/components/ui/Spinner/Spinner.web.js.map +1 -1
- package/lib/module/components/ui/Spinner/shared.js +6 -0
- package/lib/module/components/ui/Spinner/shared.js.map +1 -1
- package/lib/module/components/ui/Stepper/Stepper.js +131 -99
- package/lib/module/components/ui/Stepper/Stepper.js.map +1 -1
- package/lib/module/components/ui/Stepper/StepperPressable.js +4 -0
- package/lib/module/components/ui/Stepper/StepperPressable.js.map +1 -0
- package/lib/module/components/ui/Stepper/StepperPressable.web.js +4 -0
- package/lib/module/components/ui/Stepper/StepperPressable.web.js.map +1 -0
- package/lib/module/components/ui/Stepper/accessibility.js +30 -0
- package/lib/module/components/ui/Stepper/accessibility.js.map +1 -0
- package/lib/module/components/ui/Stepper/accessibility.types.js +4 -0
- package/lib/module/components/ui/Stepper/accessibility.types.js.map +1 -0
- package/lib/module/components/ui/Stepper/accessibility.web.js +57 -0
- package/lib/module/components/ui/Stepper/accessibility.web.js.map +1 -0
- package/lib/module/components/ui/Stepper/layout.js +28 -0
- package/lib/module/components/ui/Stepper/layout.js.map +1 -0
- package/lib/module/components/ui/Stepper/normalizeStepper.js +53 -0
- package/lib/module/components/ui/Stepper/normalizeStepper.js.map +1 -0
- package/lib/module/components/ui/Stepper/styles.js +9 -2
- package/lib/module/components/ui/Stepper/styles.js.map +1 -1
- package/lib/module/components/ui/Switch/Switch.js +45 -19
- package/lib/module/components/ui/Switch/Switch.js.map +1 -1
- package/lib/module/components/ui/Switch/Switch.web.js +47 -20
- package/lib/module/components/ui/Switch/Switch.web.js.map +1 -1
- package/lib/module/components/ui/Switch/styles.js +12 -5
- package/lib/module/components/ui/Switch/styles.js.map +1 -1
- package/lib/module/components/ui/Tag/Tag.js +3 -2
- package/lib/module/components/ui/Tag/Tag.js.map +1 -1
- package/lib/module/components/ui/TextField/TextFieldBase.js +131 -86
- package/lib/module/components/ui/TextField/TextFieldBase.js.map +1 -1
- package/lib/module/components/ui/TextField/TextFieldSlot.js +82 -0
- package/lib/module/components/ui/TextField/TextFieldSlot.js.map +1 -0
- package/lib/module/components/ui/TextField/normalize.js +238 -0
- package/lib/module/components/ui/TextField/normalize.js.map +1 -0
- package/lib/module/components/ui/TextField/styles.js +31 -0
- package/lib/module/components/ui/TextField/styles.js.map +1 -1
- package/lib/module/components/ui/TextField/useErrorAnnouncement.js +27 -0
- package/lib/module/components/ui/TextField/useErrorAnnouncement.js.map +1 -0
- package/lib/module/components/ui/TextField/useTextFieldValue.js +66 -0
- package/lib/module/components/ui/TextField/useTextFieldValue.js.map +1 -0
- package/lib/module/components/ui/TextField/valueState.js +93 -0
- package/lib/module/components/ui/TextField/valueState.js.map +1 -0
- package/lib/module/components/ui/Textarea/Textarea.js +7 -3
- package/lib/module/components/ui/Textarea/Textarea.js.map +1 -1
- package/lib/module/components/ui/Thumbnail/Thumbnail.js +67 -48
- package/lib/module/components/ui/Thumbnail/Thumbnail.js.map +1 -1
- package/lib/module/components/ui/Thumbnail/normalize.js +58 -0
- package/lib/module/components/ui/Thumbnail/normalize.js.map +1 -0
- package/lib/module/components/ui/Thumbnail/styles.js +6 -11
- package/lib/module/components/ui/Thumbnail/styles.js.map +1 -1
- package/lib/module/components/ui/Toast/ToastHost.js +64 -21
- package/lib/module/components/ui/Toast/ToastHost.js.map +1 -1
- package/lib/module/components/ui/Toast/ToastHost.web.js +73 -24
- package/lib/module/components/ui/Toast/ToastHost.web.js.map +1 -1
- package/lib/module/components/ui/Toast/store.js +110 -0
- package/lib/module/components/ui/Toast/store.js.map +1 -0
- package/lib/module/components/ui/Toast/toast.js +17 -7
- package/lib/module/components/ui/Toast/toast.js.map +1 -1
- package/lib/module/components/ui/index.js.map +1 -1
- package/lib/module/components/ui/shared/ImageAttempt.js +28 -0
- package/lib/module/components/ui/shared/ImageAttempt.js.map +1 -0
- package/lib/module/components/ui/shared/a11y.js +21 -0
- package/lib/module/components/ui/shared/a11y.js.map +1 -0
- package/lib/module/components/ui/shared/accessibilityName.js +9 -0
- package/lib/module/components/ui/shared/accessibilityName.js.map +1 -0
- package/lib/module/components/ui/shared/selectImageAttemptSource.js +5 -0
- package/lib/module/components/ui/shared/selectImageAttemptSource.js.map +1 -0
- package/lib/module/components/ui/shared/selectImageAttemptSource.shared.js +13 -0
- package/lib/module/components/ui/shared/selectImageAttemptSource.shared.js.map +1 -0
- package/lib/module/components/ui/shared/selectImageAttemptSource.web.js +5 -0
- package/lib/module/components/ui/shared/selectImageAttemptSource.web.js.map +1 -0
- package/lib/module/icons/data.js +1 -1
- package/lib/module/icons/data.js.map +1 -1
- package/lib/module/theme/ThemeProvider.js +14 -4
- package/lib/module/theme/ThemeProvider.js.map +1 -1
- package/lib/module/theme/fontScale.js +13 -0
- package/lib/module/theme/fontScale.js.map +1 -0
- package/lib/module/theme/index.js +2 -4
- package/lib/module/theme/index.js.map +1 -1
- package/lib/module/theme/themeContext.js +15 -0
- package/lib/module/theme/themeContext.js.map +1 -0
- package/lib/module/theme/themeDiagnostics.js +29 -0
- package/lib/module/theme/themeDiagnostics.js.map +1 -0
- package/lib/module/theme/usePrefersReducedMotion.js +11 -4
- package/lib/module/theme/usePrefersReducedMotion.js.map +1 -1
- package/lib/module/theme/usePrefersReducedMotion.web.js +5 -2
- package/lib/module/theme/usePrefersReducedMotion.web.js.map +1 -1
- package/lib/module/theme/useTheme.js +12 -25
- package/lib/module/theme/useTheme.js.map +1 -1
- package/lib/module/theme/useThemedStyles.js +9 -6
- package/lib/module/theme/useThemedStyles.js.map +1 -1
- package/lib/module/utils/imageSource.js +198 -0
- package/lib/module/utils/imageSource.js.map +1 -0
- package/lib/typescript/manual-tests/runtime-api/RuntimeApiScreen.d.ts +12 -0
- package/lib/typescript/manual-tests/runtime-api/RuntimeApiScreen.d.ts.map +1 -0
- package/lib/typescript/src/components/business/AvatarWithRing/AvatarWithRing.d.ts.map +1 -1
- package/lib/typescript/src/components/business/AvatarWithRing/styles.d.ts +8 -7
- package/lib/typescript/src/components/business/AvatarWithRing/styles.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/content.d.ts +19 -0
- package/lib/typescript/src/components/business/VersionPill/content.d.ts.map +1 -0
- package/lib/typescript/src/components/business/VersionPill/index.d.ts +1 -1
- package/lib/typescript/src/components/business/VersionPill/index.d.ts.map +1 -1
- package/lib/typescript/src/components/business/VersionPill/styles.d.ts +4 -0
- package/lib/typescript/src/components/business/VersionPill/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/business/VersionPill/types.d.ts +6 -2
- 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 +6 -5
- package/lib/typescript/src/components/business/useSvgId.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Avatar/Avatar.d.ts +2 -2
- package/lib/typescript/src/components/ui/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Avatar/types.d.ts +6 -2
- package/lib/typescript/src/components/ui/Avatar/types.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 +5 -3
- package/lib/typescript/src/components/ui/Button/ButtonBase.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Button/types.d.ts +5 -3
- package/lib/typescript/src/components/ui/Button/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Carousel/Carousel.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Carousel/behavior.d.ts +25 -0
- package/lib/typescript/src/components/ui/Carousel/behavior.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Carousel/styles.d.ts +4 -6
- package/lib/typescript/src/components/ui/Carousel/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Carousel/types.d.ts +14 -6
- package/lib/typescript/src/components/ui/Carousel/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Cell/Cell.d.ts +1 -1
- package/lib/typescript/src/components/ui/Cell/Cell.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Cell/Leading.d.ts +2 -3
- package/lib/typescript/src/components/ui/Cell/Leading.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Cell/content.d.ts +18 -0
- package/lib/typescript/src/components/ui/Cell/content.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Cell/index.d.ts +1 -1
- package/lib/typescript/src/components/ui/Cell/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Cell/types.d.ts +66 -30
- package/lib/typescript/src/components/ui/Cell/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Checkbox/Checkbox.d.ts +1 -1
- package/lib/typescript/src/components/ui/Checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Checkbox/types.d.ts +12 -3
- package/lib/typescript/src/components/ui/Checkbox/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Confirm/ConfirmHost.d.ts +6 -3
- package/lib/typescript/src/components/ui/Confirm/ConfirmHost.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Confirm/confirm.d.ts +10 -4
- package/lib/typescript/src/components/ui/Confirm/confirm.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Confirm/labels.d.ts +6 -0
- package/lib/typescript/src/components/ui/Confirm/labels.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Confirm/store.d.ts +44 -0
- package/lib/typescript/src/components/ui/Confirm/store.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Confirm/styles.d.ts +3 -0
- package/lib/typescript/src/components/ui/Confirm/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Confirm/types.d.ts +0 -9
- package/lib/typescript/src/components/ui/Confirm/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/DrawerHeader/DrawerHeader.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/DrawerHeader/types.d.ts +7 -1
- package/lib/typescript/src/components/ui/DrawerHeader/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Grid/Grid.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Grid/accessibility.d.ts +5 -0
- package/lib/typescript/src/components/ui/Grid/accessibility.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Grid/types.d.ts +2 -0
- package/lib/typescript/src/components/ui/Grid/types.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 +4 -2
- package/lib/typescript/src/components/ui/IconButton/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Input/Input.d.ts +5 -383
- package/lib/typescript/src/components/ui/Input/Input.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Input/index.d.ts +1 -0
- package/lib/typescript/src/components/ui/Input/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Input/types.d.ts +3 -17
- package/lib/typescript/src/components/ui/Input/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Logo/Logo.d.ts +2 -2
- package/lib/typescript/src/components/ui/Logo/Logo.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Logo/types.d.ts +2 -2
- package/lib/typescript/src/components/ui/Logo/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/NavBar/NavBar.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/NavBar/index.d.ts +1 -1
- package/lib/typescript/src/components/ui/NavBar/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/NavBar/isSlot.d.ts +24 -4
- package/lib/typescript/src/components/ui/NavBar/isSlot.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/NavBar/types.d.ts +8 -8
- package/lib/typescript/src/components/ui/NavBar/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/PasswordInput/PasswordInput.d.ts +6 -14
- package/lib/typescript/src/components/ui/PasswordInput/PasswordInput.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/PasswordInput/types.d.ts +4 -14
- package/lib/typescript/src/components/ui/PasswordInput/types.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/normalizePulseOptions.d.ts +32 -0
- package/lib/typescript/src/components/ui/Pulse/normalizePulseOptions.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Pulse/usePulse.d.ts +10 -5
- package/lib/typescript/src/components/ui/Pulse/usePulse.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Pulse/usePulseDriver.d.ts +11 -0
- package/lib/typescript/src/components/ui/Pulse/usePulseDriver.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Pulse/usePulseDriver.web.d.ts +18 -0
- package/lib/typescript/src/components/ui/Pulse/usePulseDriver.web.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Radio/Radio.d.ts +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 +2 -2
- package/lib/typescript/src/components/ui/Radio/RadioGroup.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Radio/types.d.ts +14 -3
- package/lib/typescript/src/components/ui/Radio/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Reveal/Reveal.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Reveal/Reveal.web.d.ts +2 -8
- package/lib/typescript/src/components/ui/Reveal/Reveal.web.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Reveal/types.d.ts +1 -1
- package/lib/typescript/src/components/ui/Reveal/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Reveal/webTransition.d.ts +38 -0
- package/lib/typescript/src/components/ui/Reveal/webTransition.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Search/Search.d.ts +4 -214
- package/lib/typescript/src/components/ui/Search/Search.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Search/types.d.ts +13 -6
- package/lib/typescript/src/components/ui/Search/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Segmented/Segmented.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Skeleton/Skeleton.d.ts +3 -3
- package/lib/typescript/src/components/ui/Skeleton/Skeleton.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Spinner/Spinner.d.ts +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 +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 -1
- package/lib/typescript/src/components/ui/Spinner/types.d.ts +1 -1
- package/lib/typescript/src/components/ui/Spinner/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Stepper/Stepper.d.ts +3 -3
- package/lib/typescript/src/components/ui/Stepper/Stepper.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Stepper/StepperPressable.d.ts +2 -0
- package/lib/typescript/src/components/ui/Stepper/StepperPressable.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Stepper/StepperPressable.web.d.ts +2 -0
- package/lib/typescript/src/components/ui/Stepper/StepperPressable.web.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Stepper/accessibility.d.ts +3 -0
- package/lib/typescript/src/components/ui/Stepper/accessibility.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Stepper/accessibility.types.d.ts +23 -0
- package/lib/typescript/src/components/ui/Stepper/accessibility.types.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Stepper/accessibility.web.d.ts +9 -0
- package/lib/typescript/src/components/ui/Stepper/accessibility.web.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Stepper/layout.d.ts +22 -0
- package/lib/typescript/src/components/ui/Stepper/layout.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Stepper/normalizeStepper.d.ts +31 -0
- package/lib/typescript/src/components/ui/Stepper/normalizeStepper.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Stepper/styles.d.ts +9 -2
- package/lib/typescript/src/components/ui/Stepper/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Stepper/types.d.ts +3 -1
- package/lib/typescript/src/components/ui/Stepper/types.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 +9 -3
- package/lib/typescript/src/components/ui/Switch/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Switch/types.d.ts +2 -2
- package/lib/typescript/src/components/ui/Switch/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Tag/Tag.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TextField/TextFieldBase.d.ts +4 -401
- package/lib/typescript/src/components/ui/TextField/TextFieldBase.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TextField/TextFieldSlot.d.ts +13 -0
- package/lib/typescript/src/components/ui/TextField/TextFieldSlot.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/TextField/normalize.d.ts +51 -0
- package/lib/typescript/src/components/ui/TextField/normalize.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/TextField/styles.d.ts +30 -0
- package/lib/typescript/src/components/ui/TextField/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TextField/types.d.ts +92 -18
- package/lib/typescript/src/components/ui/TextField/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/TextField/useErrorAnnouncement.d.ts +3 -0
- package/lib/typescript/src/components/ui/TextField/useErrorAnnouncement.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/TextField/useTextFieldValue.d.ts +18 -0
- package/lib/typescript/src/components/ui/TextField/useTextFieldValue.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/TextField/valueState.d.ts +50 -0
- package/lib/typescript/src/components/ui/TextField/valueState.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Textarea/Textarea.d.ts +4 -382
- package/lib/typescript/src/components/ui/Textarea/Textarea.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Textarea/index.d.ts +1 -0
- package/lib/typescript/src/components/ui/Textarea/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Textarea/types.d.ts +3 -14
- package/lib/typescript/src/components/ui/Textarea/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Thumbnail/Thumbnail.d.ts +5 -12
- package/lib/typescript/src/components/ui/Thumbnail/Thumbnail.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Thumbnail/index.d.ts +1 -1
- package/lib/typescript/src/components/ui/Thumbnail/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Thumbnail/normalize.d.ts +13 -0
- package/lib/typescript/src/components/ui/Thumbnail/normalize.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Thumbnail/styles.d.ts +4 -8
- package/lib/typescript/src/components/ui/Thumbnail/styles.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Thumbnail/types.d.ts +21 -13
- package/lib/typescript/src/components/ui/Thumbnail/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/ToastHost.d.ts +6 -2
- package/lib/typescript/src/components/ui/Toast/ToastHost.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/ToastHost.web.d.ts +6 -3
- package/lib/typescript/src/components/ui/Toast/ToastHost.web.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/store.d.ts +39 -0
- package/lib/typescript/src/components/ui/Toast/store.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/Toast/toast.d.ts +7 -2
- package/lib/typescript/src/components/ui/Toast/toast.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/Toast/types.d.ts +5 -3
- package/lib/typescript/src/components/ui/Toast/types.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/index.d.ts +4 -4
- package/lib/typescript/src/components/ui/index.d.ts.map +1 -1
- package/lib/typescript/src/components/ui/shared/ImageAttempt.d.ts +13 -0
- package/lib/typescript/src/components/ui/shared/ImageAttempt.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/shared/a11y.d.ts +19 -0
- package/lib/typescript/src/components/ui/shared/a11y.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/shared/accessibilityName.d.ts +3 -0
- package/lib/typescript/src/components/ui/shared/accessibilityName.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/shared/selectImageAttemptSource.d.ts +3 -0
- package/lib/typescript/src/components/ui/shared/selectImageAttemptSource.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/shared/selectImageAttemptSource.shared.d.ts +4 -0
- package/lib/typescript/src/components/ui/shared/selectImageAttemptSource.shared.d.ts.map +1 -0
- package/lib/typescript/src/components/ui/shared/selectImageAttemptSource.web.d.ts +3 -0
- package/lib/typescript/src/components/ui/shared/selectImageAttemptSource.web.d.ts.map +1 -0
- package/lib/typescript/src/theme/ThemeProvider.d.ts +2 -3
- package/lib/typescript/src/theme/ThemeProvider.d.ts.map +1 -1
- package/lib/typescript/src/theme/fontScale.d.ts +4 -0
- package/lib/typescript/src/theme/fontScale.d.ts.map +1 -0
- package/lib/typescript/src/theme/index.d.ts +2 -1
- package/lib/typescript/src/theme/index.d.ts.map +1 -1
- package/lib/typescript/src/theme/themeContext.d.ts +6 -0
- package/lib/typescript/src/theme/themeContext.d.ts.map +1 -0
- package/lib/typescript/src/theme/themeDiagnostics.d.ts +6 -0
- package/lib/typescript/src/theme/themeDiagnostics.d.ts.map +1 -0
- package/lib/typescript/src/theme/usePrefersReducedMotion.d.ts +8 -3
- package/lib/typescript/src/theme/usePrefersReducedMotion.d.ts.map +1 -1
- package/lib/typescript/src/theme/usePrefersReducedMotion.web.d.ts +5 -2
- package/lib/typescript/src/theme/usePrefersReducedMotion.web.d.ts.map +1 -1
- package/lib/typescript/src/theme/useTheme.d.ts +1 -1
- package/lib/typescript/src/theme/useTheme.d.ts.map +1 -1
- package/lib/typescript/src/theme/useThemedStyles.d.ts +1 -1
- package/lib/typescript/src/theme/useThemedStyles.d.ts.map +1 -1
- package/lib/typescript/src/utils/imageSource.d.ts +20 -0
- package/lib/typescript/src/utils/imageSource.d.ts.map +1 -0
- package/lib/typescript/type-tests/public-api.d.ts +2 -0
- package/lib/typescript/type-tests/public-api.d.ts.map +1 -0
- package/lib/typescript/website/src/components/iconCatalogCategories.d.ts +11 -0
- package/lib/typescript/website/src/components/iconCatalogCategories.d.ts.map +1 -0
- package/package.json +27 -13
- package/src/components/business/AvatarWithRing/AvatarWithRing.tsx +11 -4
- package/src/components/business/AvatarWithRing/styles.ts +11 -9
- package/src/components/business/VersionPill/VersionPill.tsx +31 -25
- package/src/components/business/VersionPill/content.ts +47 -0
- package/src/components/business/VersionPill/index.ts +1 -1
- package/src/components/business/VersionPill/styles.ts +4 -0
- package/src/components/business/VersionPill/types.ts +7 -2
- package/src/components/business/index.ts +1 -1
- package/src/components/business/useSvgId.ts +29 -8
- package/src/components/ui/Avatar/Avatar.tsx +25 -34
- package/src/components/ui/Avatar/types.ts +6 -2
- package/src/components/ui/Button/Button.tsx +39 -20
- package/src/components/ui/Button/ButtonBase.tsx +21 -12
- package/src/components/ui/Button/types.ts +5 -3
- package/src/components/ui/Carousel/Carousel.tsx +102 -40
- package/src/components/ui/Carousel/behavior.ts +78 -0
- package/src/components/ui/Carousel/styles.ts +5 -7
- package/src/components/ui/Carousel/types.ts +18 -6
- package/src/components/ui/Cell/Cell.tsx +85 -74
- package/src/components/ui/Cell/Leading.tsx +14 -14
- package/src/components/ui/Cell/content.ts +53 -0
- package/src/components/ui/Cell/index.ts +7 -1
- package/src/components/ui/Cell/types.ts +64 -30
- package/src/components/ui/Checkbox/Checkbox.tsx +35 -8
- package/src/components/ui/Checkbox/types.ts +15 -3
- package/src/components/ui/Confirm/ConfirmHost.tsx +51 -26
- package/src/components/ui/Confirm/confirm.ts +17 -34
- package/src/components/ui/Confirm/labels.ts +14 -0
- package/src/components/ui/Confirm/store.ts +147 -0
- package/src/components/ui/Confirm/styles.ts +4 -0
- package/src/components/ui/Confirm/types.ts +2 -10
- package/src/components/ui/DrawerHeader/DrawerHeader.tsx +22 -27
- package/src/components/ui/DrawerHeader/types.ts +7 -1
- package/src/components/ui/Grid/Grid.tsx +44 -12
- package/src/components/ui/Grid/accessibility.ts +21 -0
- package/src/components/ui/Grid/types.ts +2 -0
- package/src/components/ui/IconButton/IconButton.tsx +20 -3
- package/src/components/ui/IconButton/types.ts +4 -2
- package/src/components/ui/Input/Input.tsx +16 -6
- package/src/components/ui/Input/index.ts +5 -0
- package/src/components/ui/Input/types.ts +12 -23
- package/src/components/ui/Logo/Logo.tsx +27 -4
- package/src/components/ui/Logo/types.ts +2 -2
- package/src/components/ui/NavBar/NavBar.tsx +27 -19
- package/src/components/ui/NavBar/index.ts +1 -1
- package/src/components/ui/NavBar/isSlot.ts +372 -5
- package/src/components/ui/NavBar/types.ts +9 -8
- package/src/components/ui/PasswordInput/PasswordInput.tsx +67 -69
- package/src/components/ui/PasswordInput/types.ts +12 -14
- package/src/components/ui/Pulse/PulseDot.tsx +5 -4
- package/src/components/ui/Pulse/normalizePulseOptions.ts +76 -0
- package/src/components/ui/Pulse/usePulse.ts +80 -34
- package/src/components/ui/Pulse/usePulseDriver.ts +49 -0
- package/src/components/ui/Pulse/usePulseDriver.web.ts +66 -0
- package/src/components/ui/Radio/Radio.tsx +44 -15
- package/src/components/ui/Radio/RadioGroup.tsx +21 -3
- package/src/components/ui/Radio/types.ts +17 -3
- package/src/components/ui/Reveal/Reveal.tsx +5 -3
- package/src/components/ui/Reveal/Reveal.web.tsx +72 -29
- package/src/components/ui/Reveal/types.ts +1 -1
- package/src/components/ui/Reveal/webTransition.ts +206 -0
- package/src/components/ui/Search/Search.tsx +127 -58
- package/src/components/ui/Search/types.ts +30 -9
- package/src/components/ui/Segmented/Segmented.tsx +10 -2
- package/src/components/ui/Skeleton/Skeleton.tsx +9 -5
- package/src/components/ui/Spinner/Spinner.tsx +25 -17
- package/src/components/ui/Spinner/Spinner.web.tsx +23 -18
- package/src/components/ui/Spinner/shared.ts +7 -0
- package/src/components/ui/Spinner/types.ts +1 -1
- package/src/components/ui/Stepper/Stepper.tsx +166 -86
- package/src/components/ui/Stepper/StepperPressable.tsx +1 -0
- package/src/components/ui/Stepper/StepperPressable.web.tsx +1 -0
- package/src/components/ui/Stepper/accessibility.ts +32 -0
- package/src/components/ui/Stepper/accessibility.types.ts +22 -0
- package/src/components/ui/Stepper/accessibility.web.ts +65 -0
- package/src/components/ui/Stepper/layout.ts +44 -0
- package/src/components/ui/Stepper/normalizeStepper.ts +85 -0
- package/src/components/ui/Stepper/styles.ts +9 -2
- package/src/components/ui/Stepper/types.ts +3 -1
- package/src/components/ui/Switch/Switch.tsx +54 -15
- package/src/components/ui/Switch/Switch.web.tsx +57 -19
- package/src/components/ui/Switch/styles.ts +11 -4
- package/src/components/ui/Switch/types.ts +2 -2
- package/src/components/ui/Tag/Tag.tsx +6 -2
- package/src/components/ui/TextField/TextFieldBase.tsx +175 -70
- package/src/components/ui/TextField/TextFieldSlot.tsx +91 -0
- package/src/components/ui/TextField/normalize.ts +280 -0
- package/src/components/ui/TextField/styles.ts +31 -0
- package/src/components/ui/TextField/types.ts +118 -22
- package/src/components/ui/TextField/useErrorAnnouncement.ts +27 -0
- package/src/components/ui/TextField/useTextFieldValue.ts +94 -0
- package/src/components/ui/TextField/valueState.ts +125 -0
- package/src/components/ui/Textarea/Textarea.tsx +11 -4
- package/src/components/ui/Textarea/index.ts +5 -0
- package/src/components/ui/Textarea/types.ts +14 -22
- package/src/components/ui/Thumbnail/Thumbnail.tsx +86 -51
- package/src/components/ui/Thumbnail/index.ts +5 -1
- package/src/components/ui/Thumbnail/normalize.ts +78 -0
- package/src/components/ui/Thumbnail/styles.ts +5 -10
- package/src/components/ui/Thumbnail/types.ts +43 -13
- package/src/components/ui/Toast/ToastHost.tsx +81 -22
- package/src/components/ui/Toast/ToastHost.web.tsx +91 -29
- package/src/components/ui/Toast/store.ts +148 -0
- package/src/components/ui/Toast/toast.ts +19 -10
- package/src/components/ui/Toast/types.ts +7 -3
- package/src/components/ui/index.ts +19 -4
- package/src/components/ui/shared/ImageAttempt.tsx +30 -0
- package/src/components/ui/shared/a11y.ts +18 -0
- package/src/components/ui/shared/accessibilityName.ts +6 -0
- package/src/components/ui/shared/selectImageAttemptSource.shared.ts +17 -0
- package/src/components/ui/shared/selectImageAttemptSource.ts +3 -0
- package/src/components/ui/shared/selectImageAttemptSource.web.ts +3 -0
- package/src/icons/data.ts +1 -1
- package/src/theme/ThemeProvider.tsx +18 -7
- package/src/theme/fontScale.ts +15 -0
- package/src/theme/index.ts +2 -3
- package/src/theme/themeContext.ts +24 -0
- package/src/theme/themeDiagnostics.ts +41 -0
- package/src/theme/usePrefersReducedMotion.ts +11 -4
- package/src/theme/usePrefersReducedMotion.web.ts +5 -2
- package/src/theme/useTheme.ts +19 -27
- package/src/theme/useThemedStyles.ts +12 -7
- package/src/utils/imageSource.ts +303 -0
- package/lib/module/components/ui/PasswordInput/styles.js +0 -12
- package/lib/module/components/ui/PasswordInput/styles.js.map +0 -1
- package/lib/module/components/ui/Pulse/usePulse.web.js +0 -76
- package/lib/module/components/ui/Pulse/usePulse.web.js.map +0 -1
- package/lib/typescript/src/components/ui/PasswordInput/styles.d.ts +0 -7
- package/lib/typescript/src/components/ui/PasswordInput/styles.d.ts.map +0 -1
- package/lib/typescript/src/components/ui/Pulse/usePulse.web.d.ts +0 -21
- package/lib/typescript/src/components/ui/Pulse/usePulse.web.d.ts.map +0 -1
- package/src/components/ui/PasswordInput/styles.ts +0 -7
- package/src/components/ui/Pulse/usePulse.web.ts +0 -74
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ImageProps, ImageSourcePropType, ImageStyle, StyleProp, ViewStyle } from 'react-native';
|
|
2
2
|
/** 缩略图尺寸阶梯 —— 跨场景统一,新增 size 在这里 + sizingFor.ts 同步。
|
|
3
3
|
* - sm:64×40 chat 行内、列表二级图缩略
|
|
4
4
|
* - md:113×67 NewsList / NewsArea 公告右侧缩略(默认)
|
|
5
5
|
* - lg:160×96 详情顶部 hero 小图、卡片头图缩略 */
|
|
6
6
|
export type ThumbnailSize = 'sm' | 'md' | 'lg';
|
|
7
|
-
export type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
source?:
|
|
7
|
+
export type ThumbnailImageStyle = Omit<ImageStyle, 'position' | 'top' | 'right' | 'bottom' | 'left' | 'width' | 'height' | 'minWidth' | 'minHeight' | 'maxWidth' | 'maxHeight'>;
|
|
8
|
+
type ThumbnailSource = {
|
|
9
|
+
/** 远程 URL(http/https/data URI),运行时 trim 后必须非空。 */
|
|
10
|
+
uri: string;
|
|
11
|
+
source?: never;
|
|
12
|
+
} | {
|
|
13
|
+
/** RN Image source —— 本地 require / URI object / URI candidate 数组。 */
|
|
14
|
+
source: ImageSourcePropType;
|
|
15
|
+
uri?: never;
|
|
16
|
+
};
|
|
17
|
+
export type ThumbnailProps = ThumbnailSource & {
|
|
12
18
|
/** 视觉尺寸阶梯,默认 'md'。 */
|
|
13
19
|
size?: ThumbnailSize;
|
|
14
|
-
/**
|
|
15
|
-
* 用于"图片多选 / picker 选中" —— 不再需要 caller 自行套 TouchableOpacity + borderColor。 */
|
|
20
|
+
/** 选中态:在固定 visual frame 内显示 2pt 品牌色 ring。 */
|
|
16
21
|
selected?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
|
|
22
|
+
/** 完整外部布局样式,只落到稳定根 View。 */
|
|
23
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
24
|
+
/** 图片表面样式;不能覆盖 frame 的 position / inset / size geometry。 */
|
|
25
|
+
imageStyle?: StyleProp<ThumbnailImageStyle>;
|
|
19
26
|
/** Image.resizeMode,默认 'cover'(裁切撑满)。 */
|
|
20
|
-
resizeMode?: '
|
|
21
|
-
/**
|
|
27
|
+
resizeMode?: NonNullable<ImageProps['resizeMode']>;
|
|
28
|
+
/** trim 后非空时作为图片名称;缺省或空白时图片从 a11y tree 隐藏。 */
|
|
22
29
|
accessibilityLabel?: string;
|
|
23
|
-
/**
|
|
30
|
+
/** E2E / 测试定位,只落到外层 layout View。 */
|
|
24
31
|
testID?: string;
|
|
25
32
|
};
|
|
33
|
+
export {};
|
|
26
34
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Thumbnail/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Thumbnail/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB;;;sCAGsC;AACtC,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,UAAU,EACR,UAAU,GACV,KAAK,GACL,OAAO,GACP,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,GACR,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,CACd,CAAC;AAEF,KAAK,eAAe,GAChB;IACE,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB,GACD;IACE,qEAAqE;IACrE,MAAM,EAAE,mBAAmB,CAAC;IAC5B,GAAG,CAAC,EAAE,KAAK,CAAC;CACb,CAAC;AAEN,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG;IAC7C,sBAAsB;IACtB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,4BAA4B;IAC5B,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,4DAA4D;IAC5D,UAAU,CAAC,EAAE,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAC5C,yCAAyC;IACzC,UAAU,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;IACnD,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ToastHostProps } from './types';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* 同一时间只显示一条 ——
|
|
4
|
+
* 在根附近挂**一次**。监听 toast() 调用并渲染当前 toast。
|
|
5
|
+
* 同一时间只显示一条 —— 新的会替换旧的(latest-wins)。
|
|
6
6
|
*
|
|
7
7
|
* 位置由 `entry.position`('top' / 'bottom' / 'center')决定,top/bottom 自动避让
|
|
8
8
|
* safe-area;进入动画方向随位置(top 从上滑、bottom/center 从下滑)。
|
|
9
|
+
*
|
|
10
|
+
* 竞态纪律:每个 timer / 动画完成回调在改 UI 或上报完成前,都要同时通过同步 ref
|
|
11
|
+
* 与 `isCurrentToastDelivery(delivery)` 两道校验 —— 只靠其中之一都不够:ref 挡不住
|
|
12
|
+
* 「Host 重挂后同一 entry 的新投递」,Store 挡不住 React 批处理造成的 state 滞后。
|
|
9
13
|
*/
|
|
10
14
|
export declare function ToastHost({ testID, }?: ToastHostProps): React.JSX.Element | null;
|
|
11
15
|
//# sourceMappingURL=ToastHost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastHost.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/ToastHost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ToastHost.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/ToastHost.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAmBxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAS9C;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,EACxB,MAAM,GACP,GAAE,cAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA+HhD"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ToastHostProps } from './types';
|
|
3
3
|
/**
|
|
4
|
-
* Web 端 ToastHost —— RN-Web 上 reanimated
|
|
5
|
-
*
|
|
6
|
-
* transition 实现 fade + slide
|
|
4
|
+
* Web 端 ToastHost —— RN-Web 上 reanimated 的 useAnimatedStyle 链路会在
|
|
5
|
+
* `_updatePropsJS` 里 `Object.keys` 抛 TypeError(点击就崩),故走纯 React + CSS
|
|
6
|
+
* transition 实现 fade + slide;native 端仍走 ToastHost.tsx 的 reanimated 实现。
|
|
7
7
|
*
|
|
8
8
|
* 行为复刻 native 版:
|
|
9
9
|
* - opacity 0→1 + translateY 8→0 入场(motion.base ms)
|
|
10
10
|
* - 停留 entry.duration ms
|
|
11
11
|
* - opacity 1→0 + translateY 0→8 退场后 unmount
|
|
12
|
+
*
|
|
13
|
+
* 竞态纪律与 native 版一致:timer / RAF 在改 UI 或上报完成前,都要同时通过同步 ref
|
|
14
|
+
* 与 `isCurrentToastDelivery(delivery)` 两道校验。
|
|
12
15
|
*/
|
|
13
16
|
export declare function ToastHost({ testID, }?: ToastHostProps): React.JSX.Element | null;
|
|
14
17
|
//# sourceMappingURL=ToastHost.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToastHost.web.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/ToastHost.web.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ToastHost.web.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/ToastHost.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAkBxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAS9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,EACxB,MAAM,GACP,GAAE,cAAmB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAiJhD"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Logger } from '../../../utils/logger';
|
|
2
|
+
import type { ToastEntry } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Toast 的纯状态机 —— 不含任何 React / 渲染依赖,可直接单测。
|
|
5
|
+
*
|
|
6
|
+
* 与 Confirm 的语义**不同**,故意不抽成泛型事件总线:
|
|
7
|
+
* - Confirm 是「一次决策」,需要 active entry + Promise;
|
|
8
|
+
* - Toast 是「最新一条覆盖旧的」,需要 pending / delivery 双态。
|
|
9
|
+
*
|
|
10
|
+
* 双态模型:
|
|
11
|
+
* - `pending` —— 还没有 Host 接住的最新一条消息。**latest-wins**:后来的直接覆盖,
|
|
12
|
+
* 不排队(toast 是瞬时反馈,补投一串历史消息毫无意义)。
|
|
13
|
+
* - `delivered` —— 已交给当前 Host 的那一条,带 `ownerToken` + `leaseId` + `entry.id`
|
|
14
|
+
* 三重身份。Host 的每个 timer / RAF / 动画完成回调在动 UI 前都必须用这三项做 CAS,
|
|
15
|
+
* 否则旧回调会把新 toast 提前抹掉(经典竞态:A 的 3s 定时器在 B 显示后才触发)。
|
|
16
|
+
*
|
|
17
|
+
* `leaseId` 单调递增,同一 entry 被重新投递(Host 重挂)也会拿到新的 leaseId ——
|
|
18
|
+
* 仅比较 entry.id 不足以区分「同一条消息的两次投递」。
|
|
19
|
+
*/
|
|
20
|
+
export type ToastDelivery = {
|
|
21
|
+
entry: ToastEntry;
|
|
22
|
+
ownerToken: symbol;
|
|
23
|
+
leaseId: number;
|
|
24
|
+
};
|
|
25
|
+
export type ToastSubscriber = (delivery: ToastDelivery) => void;
|
|
26
|
+
export type ToastHostLease = {
|
|
27
|
+
readonly ownerToken: symbol;
|
|
28
|
+
release(): void;
|
|
29
|
+
};
|
|
30
|
+
export type ToastStore = {
|
|
31
|
+
publish(entry: ToastEntry): void;
|
|
32
|
+
registerHost(subscriber: ToastSubscriber): ToastHostLease | null;
|
|
33
|
+
complete(ownerToken: symbol, leaseId: number, entryId: number): boolean;
|
|
34
|
+
isCurrent(delivery: ToastDelivery): boolean;
|
|
35
|
+
pendingEntry(): ToastEntry | null;
|
|
36
|
+
currentDelivery(): ToastDelivery | null;
|
|
37
|
+
};
|
|
38
|
+
export declare function createToastStore(log: Logger): ToastStore;
|
|
39
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/store.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,OAAO,IAAI,IAAI,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACjC,YAAY,CAAC,UAAU,EAAE,eAAe,GAAG,cAAc,GAAG,IAAI,CAAC;IACjE,QAAQ,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IACxE,SAAS,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC;IAC5C,YAAY,IAAI,UAAU,GAAG,IAAI,CAAC;IAClC,eAAe,IAAI,aAAa,GAAG,IAAI,CAAC;CACzC,CAAC;AAIF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAsGxD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const _subs: Set<Subscriber>;
|
|
1
|
+
import type { ToastInput } from './types';
|
|
3
2
|
/**
|
|
4
3
|
* 命令式 toast API。在 app 根附近挂一次 `<ToastHost />` 即可。
|
|
5
4
|
*
|
|
@@ -13,4 +12,10 @@ export declare const toast: ((input: ToastInput) => void) & {
|
|
|
13
12
|
success: (input: ToastInput) => void;
|
|
14
13
|
error: (input: ToastInput) => void;
|
|
15
14
|
};
|
|
15
|
+
/** 内部:ToastHost 挂载时注册唯一 owner;重复挂载得到 null。 */
|
|
16
|
+
export declare const registerToastHost: (subscriber: import("./store").ToastSubscriber) => import("./store").ToastHostLease | null;
|
|
17
|
+
/** 内部:三重身份 CAS —— owner token + leaseId + entry id 全对才算完成。 */
|
|
18
|
+
export declare const completeToast: (ownerToken: symbol, leaseId: number, entryId: number) => boolean;
|
|
19
|
+
/** 内部:timer / RAF / 动画回调动 UI 前的守卫。 */
|
|
20
|
+
export declare const isCurrentToastDelivery: (delivery: import("./store").ToastDelivery) => boolean;
|
|
16
21
|
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/toast.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/toast.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAc,UAAU,EAAa,MAAM,SAAS,CAAC;AA+CjE;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,WAAyB,UAAU;kBACrC,UAAU;qBACP,UAAU;mBACZ,UAAU;CACzB,CAAC;AAEH,8CAA8C;AAC9C,eAAO,MAAM,iBAAiB,4FAAqB,CAAC;AAEpD,8DAA8D;AAC9D,eAAO,MAAM,aAAa,mEAAiB,CAAC;AAE5C,sCAAsC;AACtC,eAAO,MAAM,sBAAsB,wDAAkB,CAAC"}
|
|
@@ -17,8 +17,12 @@ export type ToastInput = string | {
|
|
|
17
17
|
/** 显示位置,默认 'bottom' */
|
|
18
18
|
position?: ToastPosition;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* 归一化后的一条 toast。`id` 是**内部身份**,与 `ToastDelivery` 的 ownerToken /
|
|
22
|
+
* leaseId 一起构成竞态守卫,不保证跨版本稳定 —— 业务不要依赖它的具体取值。
|
|
23
|
+
*/
|
|
20
24
|
export type ToastEntry = {
|
|
21
|
-
/**
|
|
25
|
+
/** 内部自增 id —— 竞态守卫的一环,Host 只处理「仍是当前投递」的回调 */
|
|
22
26
|
id: number;
|
|
23
27
|
/** 消息文本 */
|
|
24
28
|
message: string;
|
|
@@ -29,8 +33,6 @@ export type ToastEntry = {
|
|
|
29
33
|
/** 显示位置 */
|
|
30
34
|
position: ToastPosition;
|
|
31
35
|
};
|
|
32
|
-
/** Toast 订阅者函数签名(ToastHost 内部用) */
|
|
33
|
-
export type Subscriber = (entry: ToastEntry) => void;
|
|
34
36
|
export type ToastHostProps = {
|
|
35
37
|
/** E2E / 测试定位(业务读 toast 文本时用) */
|
|
36
38
|
testID?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/types.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD,sDAAsD;AACtD,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAClB,MAAM,GACN;IACE,WAAW;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEN,MAAM,MAAM,UAAU,GAAG;IACvB,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/Toast/types.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAErD,sDAAsD;AACtD,MAAM,MAAM,aAAa,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAClB,MAAM,GACN;IACE,WAAW;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,yBAAyB;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEN;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,6CAA6C;IAC7C,EAAE,EAAE,MAAM,CAAC;IACX,WAAW;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe;IACf,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW;IACX,QAAQ,EAAE,aAAa,CAAC;CACzB,CAAC;AAKF,MAAM,MAAM,cAAc,GAAG;IAC3B,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
|
@@ -9,7 +9,7 @@ export type { CardProps, CardVariant } from './Card';
|
|
|
9
9
|
export { Carousel } from './Carousel';
|
|
10
10
|
export type { CarouselProps, CarouselRef } from './Carousel';
|
|
11
11
|
export { Cell, List } from './Cell';
|
|
12
|
-
export type { CellProps, ListProps } from './Cell';
|
|
12
|
+
export type { CellExtra, CellLeading, CellProps, CellTextValue, ListProps, } from './Cell';
|
|
13
13
|
export { Checkbox } from './Checkbox';
|
|
14
14
|
export type { CheckboxProps } from './Checkbox';
|
|
15
15
|
export { Chip } from './Chip';
|
|
@@ -31,11 +31,11 @@ export type { IconName, IconProps } from './Icon';
|
|
|
31
31
|
export { IconButton } from './IconButton';
|
|
32
32
|
export type { IconButtonProps } from './IconButton';
|
|
33
33
|
export { Input } from './Input';
|
|
34
|
-
export type { InputProps } from './Input';
|
|
34
|
+
export type { InputProps, TextFieldContainerStyle, TextFieldHandle, TextFieldSlot, } from './Input';
|
|
35
35
|
export { Logo } from './Logo';
|
|
36
36
|
export type { LogoProps } from './Logo';
|
|
37
37
|
export { NavBar } from './NavBar';
|
|
38
|
-
export type { NavBarProps,
|
|
38
|
+
export type { NavBarAction, NavBarProps, NavBarSlot } from './NavBar';
|
|
39
39
|
export { PasswordInput } from './PasswordInput';
|
|
40
40
|
export type { PasswordInputProps } from './PasswordInput';
|
|
41
41
|
export { Pulse, PulseDot, usePulse } from './Pulse';
|
|
@@ -67,7 +67,7 @@ export type { TagProps, TagSize, TagVariant } from './Tag';
|
|
|
67
67
|
export { Textarea } from './Textarea';
|
|
68
68
|
export type { TextareaProps } from './Textarea';
|
|
69
69
|
export { Thumbnail } from './Thumbnail';
|
|
70
|
-
export type { ThumbnailProps, ThumbnailSize } from './Thumbnail';
|
|
70
|
+
export type { ThumbnailImageStyle, ThumbnailProps, ThumbnailSize, } from './Thumbnail';
|
|
71
71
|
export { toast, ToastHost } from './Toast';
|
|
72
72
|
export type { ToastEntry, ToastHostProps, ToastInput, ToastKind, ToastPosition, } from './Toast';
|
|
73
73
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AACpC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ImageProps, ImageSourcePropType } from 'react-native';
|
|
3
|
+
type ImageAttemptProps = Omit<ImageProps, 'onError' | 'source'> & {
|
|
4
|
+
source: ImageSourcePropType;
|
|
5
|
+
fallback: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* 每个 keyed 挂载实例只拥有自己的失败状态。source identity 变化时由父级 key
|
|
9
|
+
* 同步换实例,旧 onError 无法写入新 attempt。
|
|
10
|
+
*/
|
|
11
|
+
export declare function ImageAttempt({ source, fallback, ...imageProps }: ImageAttemptProps): React.JSX.Element;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=ImageAttempt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageAttempt.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/shared/ImageAttempt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGpE,KAAK,iBAAiB,GAAG,IAAI,CAAC,UAAU,EAAE,SAAS,GAAG,QAAQ,CAAC,GAAG;IAChE,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,QAAQ,EACR,GAAG,UAAU,EACd,EAAE,iBAAiB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAWvC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 装饰性节点从 a11y 树里隐藏所需的**全套**属性 —— 四个平台各认一个,少一个就漏。
|
|
3
|
+
*
|
|
4
|
+
* - `accessible: false` —— iOS/Android 都不把该节点合并成可聚焦元素
|
|
5
|
+
* - `accessibilityElementsHidden` —— iOS 连同后代一起移出 a11y 树
|
|
6
|
+
* - `importantForAccessibility: 'no-hide-descendants'` —— Android 同上
|
|
7
|
+
* - `aria-hidden` —— react-native-web 映射到 DOM 的 `aria-hidden`
|
|
8
|
+
*
|
|
9
|
+
* **只能**落在库内本地的 RN `View` / `Image` / `Text` 上。绝不要展开给未知第三方组件:
|
|
10
|
+
* 它们可能把未识别的 props 原样透传到原生层,或者干脆用同名 prop 表达别的语义。
|
|
11
|
+
* 需要隐藏第三方子树时,用一个本地 View 包住它,把这些属性挂在包装层。
|
|
12
|
+
*/
|
|
13
|
+
export declare const A11Y_HIDDEN_PROPS: {
|
|
14
|
+
readonly accessible: false;
|
|
15
|
+
readonly accessibilityElementsHidden: true;
|
|
16
|
+
readonly importantForAccessibility: "no-hide-descendants";
|
|
17
|
+
readonly 'aria-hidden': true;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=a11y.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a11y.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/shared/a11y.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB;;;;;CAKpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessibilityName.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/shared/accessibilityName.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIxE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectImageAttemptSource.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/shared/selectImageAttemptSource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AAEnF,eAAO,MAAM,wBAAwB,uCAAiC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ImageSourcePropType } from 'react-native';
|
|
2
|
+
export declare function selectNativeImageAttemptSource(source: unknown): ImageSourcePropType | undefined;
|
|
3
|
+
export declare function selectWebImageAttemptSource(source: unknown): ImageSourcePropType | undefined;
|
|
4
|
+
//# sourceMappingURL=selectImageAttemptSource.shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectImageAttemptSource.shared.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/shared/selectImageAttemptSource.shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGxD,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,OAAO,GACd,mBAAmB,GAAG,SAAS,CAEjC;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,OAAO,GACd,mBAAmB,GAAG,SAAS,CAKjC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectImageAttemptSource.web.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ui/shared/selectImageAttemptSource.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAEhF,eAAO,MAAM,wBAAwB,oCAA8B,CAAC"}
|
|
@@ -7,16 +7,15 @@ export type ThemeContextValue = {
|
|
|
7
7
|
colors: ColorTokens;
|
|
8
8
|
shadow: ShadowTokens;
|
|
9
9
|
/** 应用级字号缩放倍数(app 内字体大小档)。useThemedStyles 出口对
|
|
10
|
-
* fontSize / lineHeight / letterSpacing
|
|
10
|
+
* fontSize / lineHeight / letterSpacing 生效;非法值回退 1。 */
|
|
11
11
|
fontScale: number;
|
|
12
12
|
};
|
|
13
|
-
export declare const ThemeContext: React.Context<ThemeContextValue | null>;
|
|
14
13
|
type ThemeProviderProps = {
|
|
15
14
|
children: React.ReactNode;
|
|
16
15
|
/** 强制使用某个 scheme(覆盖 useColorScheme)。用于测试或 settingsStore 接入。 */
|
|
17
16
|
forceScheme?: ColorScheme;
|
|
18
17
|
/** 应用级字号缩放倍数,默认 1(不缩放)。接入方自持档位状态(persist
|
|
19
|
-
* store 等)
|
|
18
|
+
* store 等)并传入;仅接受有限正数,不设上限。 */
|
|
20
19
|
fontScale?: number;
|
|
21
20
|
};
|
|
22
21
|
export declare function ThemeProvider({ children, forceScheme, fontScale, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAElD,OAAO,EAA2B,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAErE,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAKtE,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,MAAM,EAAE,YAAY,CAAC;IACrB;4DACwD;IACxD,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,+DAA+D;IAC/D,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;oCACgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAMF,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,WAAW,EACX,SAAa,GACd,EAAE,kBAAkB,2CAyBpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontScale.d.ts","sourceRoot":"","sources":["../../../../src/theme/fontScale.ts"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAIzD;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAExE;AAED,wBAAgB,YAAY,IAAI,MAAM,CAErC"}
|
|
@@ -3,9 +3,10 @@ export type { ColorTokens } from './colors';
|
|
|
3
3
|
export { warmOrangePalette } from './palettes';
|
|
4
4
|
export { lightShadow, darkShadow } from './shadow';
|
|
5
5
|
export type { ShadowTokens } from './shadow';
|
|
6
|
-
export { ThemeProvider
|
|
6
|
+
export { ThemeProvider } from './ThemeProvider';
|
|
7
7
|
export type { ColorScheme, ThemeContextValue } from './ThemeProvider';
|
|
8
8
|
export { useTheme, useColors, useShadow } from './useTheme';
|
|
9
|
+
export { normalizeFontScale, scaleFontMetric, useFontScale } from './fontScale';
|
|
9
10
|
export { useThemedStyles } from './useThemedStyles';
|
|
10
11
|
export type { StylesMaker } from './useThemedStyles';
|
|
11
12
|
export { usePrefersReducedMotion } from './usePrefersReducedMotion';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/theme/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,GACb,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,EAAE,EACF,KAAK,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,OAAO,EACP,GAAG,EACH,KAAK,EACL,MAAM,EACN,cAAc,GACf,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ThemeContextValue } from './ThemeProvider';
|
|
2
|
+
export declare const FALLBACK_THEME: ThemeContextValue;
|
|
3
|
+
export declare const ThemeContext: import("react").Context<ThemeContextValue | undefined>;
|
|
4
|
+
export declare const resolveThemeContext: (value: ThemeContextValue | undefined) => ThemeContextValue;
|
|
5
|
+
export declare const shouldWarnMissingThemeProvider: (value: ThemeContextValue | undefined, isDev: boolean) => boolean;
|
|
6
|
+
//# sourceMappingURL=themeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeContext.d.ts","sourceRoot":"","sources":["../../../../src/theme/themeContext.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,eAAO,MAAM,cAAc,EAAE,iBAK5B,CAAC;AAEF,eAAO,MAAM,YAAY,wDAExB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,OAAO,iBAAiB,GAAG,SAAS,KACnC,iBAA4C,CAAC;AAEhD,eAAO,MAAM,8BAA8B,GACzC,OAAO,iBAAiB,GAAG,SAAS,EACpC,OAAO,OAAO,KACb,OAAuC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
type DiagnosticWarn = (message: string) => void;
|
|
2
|
+
type DiagnosticFormatter = (value: unknown) => string;
|
|
3
|
+
export declare function createInvalidFontScaleDiagnostic(warn: DiagnosticWarn, formatValue?: DiagnosticFormatter): (value: unknown, normalizedFontScale: number, isDev: boolean) => void;
|
|
4
|
+
export declare function createMissingThemeProviderDiagnostic(warn: DiagnosticWarn): (shouldWarn: boolean) => void;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=themeDiagnostics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeDiagnostics.d.ts","sourceRoot":"","sources":["../../../../src/theme/themeDiagnostics.ts"],"names":[],"mappings":"AAAA,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;AAChD,KAAK,mBAAmB,GAAG,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAC;AAUtD,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,cAAc,EACpB,WAAW,GAAE,mBAA2C,GACvD,CAAC,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAavE;AAED,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,cAAc,GACnB,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAS/B"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* native:读取 iOS / Android 系统「减弱动态效果」设置。
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* 为什么必须真读系统值 —— Reanimated 的 `ReduceMotion.System` 只覆盖它自己驱动的
|
|
5
|
+
* `withTiming` / `withSpring` 等动画;组件自己用 `setInterval`、RAF、Modal 转场或
|
|
6
|
+
* autoplay 做的动效完全不在它管辖内。本 hook 曾恒返回 `false`,导致 native 端
|
|
7
|
+
* Pulse、Carousel autoplay 等路径在系统开启减弱动效后仍继续动。
|
|
8
|
+
*
|
|
9
|
+
* 消费方(Pulse、Switch、Carousel、Reveal……)必须显式分支到这个 hook,不能假设
|
|
10
|
+
* 动画引擎已替自己处理了该偏好。
|
|
6
11
|
*/
|
|
7
12
|
export declare function usePrefersReducedMotion(): boolean;
|
|
8
13
|
//# sourceMappingURL=usePrefersReducedMotion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrefersReducedMotion.d.ts","sourceRoot":"","sources":["../../../../src/theme/usePrefersReducedMotion.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"usePrefersReducedMotion.d.ts","sourceRoot":"","sources":["../../../../src/theme/usePrefersReducedMotion.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAEjD"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* web
|
|
3
|
-
*
|
|
2
|
+
* web:监听系统「减弱动态效果」开关(`matchMedia`),返回当前是否开启;开关变化时自动更新。
|
|
3
|
+
*
|
|
4
|
+
* native 兄弟实现读 Reanimated 的系统信号(`useReducedMotion()`),两端语义一致 ——
|
|
5
|
+
* 都返回真实的系统偏好。Reanimated 只自动处理它自己驱动的动画,timer / RAF / CSS
|
|
6
|
+
* transition / autoplay 一律要由消费方显式分支到本 hook。
|
|
4
7
|
*/
|
|
5
8
|
export declare function usePrefersReducedMotion(): boolean;
|
|
6
9
|
//# sourceMappingURL=usePrefersReducedMotion.web.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrefersReducedMotion.web.d.ts","sourceRoot":"","sources":["../../../../src/theme/usePrefersReducedMotion.web.ts"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"usePrefersReducedMotion.web.d.ts","sourceRoot":"","sources":["../../../../src/theme/usePrefersReducedMotion.web.ts"],"names":[],"mappings":"AAQA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAcjD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ThemeContextValue } from './ThemeProvider';
|
|
2
2
|
export declare function useTheme(): ThemeContextValue;
|
|
3
3
|
export declare function useColors(): import("./colors").ColorTokens;
|
|
4
4
|
export declare function useShadow(): import("./shadow").ShadowTokens;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/theme/useTheme.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/theme/useTheme.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAazD,wBAAgB,QAAQ,IAAI,iBAAiB,CAQ5C;AAED,wBAAgB,SAAS,mCAExB;AAED,wBAAgB,SAAS,oCAExB"}
|
|
@@ -10,7 +10,7 @@ export type StylesMaker<S extends NamedStyles<S>> = (c: ColorTokens, s: ShadowTo
|
|
|
10
10
|
/** maker 产物按 fontScale 缩放字号系属性。factor = 1 时恒等返回**原引用**——
|
|
11
11
|
* 未接入 fontScale 的消费方(web 文档站等)行为与引用完全不变。
|
|
12
12
|
* 导出仅供单测,不进 barrel。 */
|
|
13
|
-
export declare function scaleNamedStyles<S extends NamedStyles<S>>(styles: S, factor:
|
|
13
|
+
export declare function scaleNamedStyles<S extends NamedStyles<S>>(styles: S, factor: unknown): S;
|
|
14
14
|
/**
|
|
15
15
|
* 接收 (colors, shadow) => StyleSheet 工厂,返回当前主题对应的 themed StyleSheet,
|
|
16
16
|
* 并按 ThemeProvider 的 fontScale 缩放字号系属性(fontSize / lineHeight /
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemedStyles.d.ts","sourceRoot":"","sources":["../../../../src/theme/useThemedStyles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useThemedStyles.d.ts","sourceRoot":"","sources":["../../../../src/theme/useThemedStyles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAG7C;sEACsE;AACtE,KAAK,WAAW,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU;CAAE,CAAC;AAE7E,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,IAAI,CAClD,CAAC,EAAE,WAAW,EACd,CAAC,EAAE,YAAY,KACZ,CAAC,CAAC;AA4BP;;wBAEwB;AACxB,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,EACvD,MAAM,EAAE,CAAC,EACT,MAAM,EAAE,OAAO,GACd,CAAC,CAcH;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,CAAC,CAAC,CAAC,EACtD,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,GACpB,CAAC,CAOH"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ImageSourcePropType } from 'react-native';
|
|
2
|
+
type ResolvedImageSource = Readonly<{
|
|
3
|
+
source: ImageSourcePropType;
|
|
4
|
+
key: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function canonicalSourceValue(value: unknown): string;
|
|
7
|
+
/**
|
|
8
|
+
* 组件唯一入口:一次读取完成 runtime validation、deep-frozen plain snapshot
|
|
9
|
+
* 与 semantic key。调用方必须把同一返回值里的 source / key 一起交给 attempt。
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveImageSource(source: unknown): ResolvedImageSource | undefined;
|
|
12
|
+
export declare function imageSourceKey(source: ImageSourcePropType | undefined): string;
|
|
13
|
+
/**
|
|
14
|
+
* JS 消费者可能绕过类型系统。只有能安全 snapshot 的 asset id、URI object 或
|
|
15
|
+
* URI object 数组能进入 Image;accessor、异常 descriptor 与非法 nested value
|
|
16
|
+
* 一律失败关闭。
|
|
17
|
+
*/
|
|
18
|
+
export declare function isValidImageSource(source: unknown): source is ImageSourcePropType;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=imageSource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageSource.d.ts","sourceRoot":"","sources":["../../../../src/utils/imageSource.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA4BxD,KAAK,mBAAmB,GAAG,QAAQ,CAAC;IAClC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC,CAAC;AAkKH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAE3D;AAyED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,mBAAmB,GAAG,SAAS,CAWjC;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACtC,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,mBAAmB,CAE/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../type-tests/public-api.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type IconCategory<TName extends string = string> = {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly desc: string;
|
|
4
|
+
readonly items: ReadonlyArray<TName>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* 手工分类只负责语义分组;源清单负责完整性。重复或未知名称立即抛错,
|
|
8
|
+
* 其余合法图标自动进入末尾“未分类”,避免新增图标在 Website 静默消失。
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildIconCategories<TName extends string>(allNames: readonly TName[], manualCategories: ReadonlyArray<IconCategory<string>>): Array<IconCategory<TName>>;
|
|
11
|
+
//# sourceMappingURL=iconCatalogCategories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iconCatalogCategories.d.ts","sourceRoot":"","sources":["../../../../../website/src/components/iconCatalogCategories.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI;IACxD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;CACtC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,SAAS,MAAM,EACtD,QAAQ,EAAE,SAAS,KAAK,EAAE,EAC1B,gBAAgB,EAAE,aAAa,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,GACpD,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAoC5B"}
|